staging: r8188eu: use standard category defines
Replace some of the driver-specific defines for action categories with the defines from ieee80211.h. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220502200652.143665-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
87f4820238
commit
64c62b697f
|
@ -1494,7 +1494,7 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr
|
||||||
frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr));
|
frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr));
|
||||||
|
|
||||||
category = frame_body[0];
|
category = frame_body[0];
|
||||||
if (category == RTW_WLAN_CATEGORY_BACK) { /* representing Block Ack */
|
if (category == WLAN_CATEGORY_BACK) { /* representing Block Ack */
|
||||||
if (!pmlmeinfo->HT_enable)
|
if (!pmlmeinfo->HT_enable)
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
action = frame_body[1];
|
action = frame_body[1];
|
||||||
|
@ -1551,7 +1551,7 @@ static int get_reg_classes_full_count(struct p2p_channels *channel_list)
|
||||||
|
|
||||||
void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr)
|
void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr)
|
||||||
{
|
{
|
||||||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
unsigned char category = WLAN_CATEGORY_PUBLIC;
|
||||||
u8 action = P2P_PUB_ACTION_ACTION;
|
u8 action = P2P_PUB_ACTION_ACTION;
|
||||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||||
u8 oui_subtype = P2P_GO_NEGO_REQ;
|
u8 oui_subtype = P2P_GO_NEGO_REQ;
|
||||||
|
@ -1881,7 +1881,7 @@ void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr)
|
||||||
|
|
||||||
static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame_body, uint len, u8 result)
|
static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame_body, uint len, u8 result)
|
||||||
{
|
{
|
||||||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
unsigned char category = WLAN_CATEGORY_PUBLIC;
|
||||||
u8 action = P2P_PUB_ACTION_ACTION;
|
u8 action = P2P_PUB_ACTION_ACTION;
|
||||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||||
u8 oui_subtype = P2P_GO_NEGO_RESP;
|
u8 oui_subtype = P2P_GO_NEGO_RESP;
|
||||||
|
@ -2243,7 +2243,7 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame
|
||||||
|
|
||||||
static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 result)
|
static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 result)
|
||||||
{
|
{
|
||||||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
unsigned char category = WLAN_CATEGORY_PUBLIC;
|
||||||
u8 action = P2P_PUB_ACTION_ACTION;
|
u8 action = P2P_PUB_ACTION_ACTION;
|
||||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||||
u8 oui_subtype = P2P_GO_NEGO_CONF;
|
u8 oui_subtype = P2P_GO_NEGO_CONF;
|
||||||
|
@ -2404,7 +2404,7 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 result)
|
||||||
|
|
||||||
void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr)
|
void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr)
|
||||||
{
|
{
|
||||||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
unsigned char category = WLAN_CATEGORY_PUBLIC;
|
||||||
u8 action = P2P_PUB_ACTION_ACTION;
|
u8 action = P2P_PUB_ACTION_ACTION;
|
||||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||||
u8 oui_subtype = P2P_INVIT_REQ;
|
u8 oui_subtype = P2P_INVIT_REQ;
|
||||||
|
@ -2651,7 +2651,7 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr)
|
||||||
|
|
||||||
void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialogToken, u8 status_code)
|
void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialogToken, u8 status_code)
|
||||||
{
|
{
|
||||||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
unsigned char category = WLAN_CATEGORY_PUBLIC;
|
||||||
u8 action = P2P_PUB_ACTION_ACTION;
|
u8 action = P2P_PUB_ACTION_ACTION;
|
||||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||||
u8 oui_subtype = P2P_INVIT_RESP;
|
u8 oui_subtype = P2P_INVIT_RESP;
|
||||||
|
@ -2841,7 +2841,7 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialo
|
||||||
|
|
||||||
void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid, u8 ussidlen, u8 *pdev_raddr)
|
void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid, u8 ussidlen, u8 *pdev_raddr)
|
||||||
{
|
{
|
||||||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
unsigned char category = WLAN_CATEGORY_PUBLIC;
|
||||||
u8 action = P2P_PUB_ACTION_ACTION;
|
u8 action = P2P_PUB_ACTION_ACTION;
|
||||||
u8 dialogToken = 1;
|
u8 dialogToken = 1;
|
||||||
u8 oui_subtype = P2P_PROVISION_DISC_REQ;
|
u8 oui_subtype = P2P_PROVISION_DISC_REQ;
|
||||||
|
@ -3812,7 +3812,7 @@ unsigned int on_action_public(struct adapter *padapter, struct recv_frame *precv
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
category = frame_body[0];
|
category = frame_body[0];
|
||||||
if (category != RTW_WLAN_CATEGORY_PUBLIC)
|
if (category != WLAN_CATEGORY_PUBLIC)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
action = frame_body[1];
|
action = frame_body[1];
|
||||||
|
@ -3874,10 +3874,10 @@ unsigned int OnAction(struct adapter *padapter, struct recv_frame *precv_frame)
|
||||||
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data;
|
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data;
|
||||||
|
|
||||||
switch (mgmt->u.action.category) {
|
switch (mgmt->u.action.category) {
|
||||||
case RTW_WLAN_CATEGORY_BACK:
|
case WLAN_CATEGORY_BACK:
|
||||||
OnAction_back(padapter, precv_frame);
|
OnAction_back(padapter, precv_frame);
|
||||||
break;
|
break;
|
||||||
case RTW_WLAN_CATEGORY_PUBLIC:
|
case WLAN_CATEGORY_PUBLIC:
|
||||||
on_action_public(padapter, precv_frame);
|
on_action_public(padapter, precv_frame);
|
||||||
break;
|
break;
|
||||||
case RTW_WLAN_CATEGORY_P2P:
|
case RTW_WLAN_CATEGORY_P2P:
|
||||||
|
@ -5370,7 +5370,7 @@ exit:
|
||||||
|
|
||||||
void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short status)
|
void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short status)
|
||||||
{
|
{
|
||||||
u8 category = RTW_WLAN_CATEGORY_BACK;
|
u8 category = WLAN_CATEGORY_BACK;
|
||||||
u16 start_seq;
|
u16 start_seq;
|
||||||
u16 BA_para_set;
|
u16 BA_para_set;
|
||||||
u16 reason_code;
|
u16 reason_code;
|
||||||
|
@ -5504,7 +5504,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
||||||
if (pmlmeinfo->bwmode_updated)
|
if (pmlmeinfo->bwmode_updated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
category = RTW_WLAN_CATEGORY_PUBLIC;
|
category = WLAN_CATEGORY_PUBLIC;
|
||||||
action = ACT_PUBLIC_BSSCOEXIST;
|
action = ACT_PUBLIC_BSSCOEXIST;
|
||||||
|
|
||||||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||||
|
|
|
@ -171,7 +171,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
|
||||||
struct adapter *padapter = pwdinfo->padapter;
|
struct adapter *padapter = pwdinfo->padapter;
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
unsigned char category = WLAN_CATEGORY_PUBLIC;
|
||||||
u8 action = P2P_PUB_ACTION_ACTION;
|
u8 action = P2P_PUB_ACTION_ACTION;
|
||||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||||
u8 oui_subtype = P2P_DEVDISC_RESP;
|
u8 oui_subtype = P2P_DEVDISC_RESP;
|
||||||
|
@ -233,7 +233,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
|
||||||
static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr, u8 *frame_body, u16 config_method)
|
static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr, u8 *frame_body, u16 config_method)
|
||||||
{
|
{
|
||||||
struct adapter *padapter = pwdinfo->padapter;
|
struct adapter *padapter = pwdinfo->padapter;
|
||||||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
unsigned char category = WLAN_CATEGORY_PUBLIC;
|
||||||
u8 action = P2P_PUB_ACTION_ACTION;
|
u8 action = P2P_PUB_ACTION_ACTION;
|
||||||
u8 dialogToken = frame_body[7]; /* The Dialog Token of provisioning discovery request frame. */
|
u8 dialogToken = frame_body[7]; /* The Dialog Token of provisioning discovery request frame. */
|
||||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||||
|
|
|
@ -596,8 +596,6 @@ static inline int is_broadcast_mac_addr(const u8 *addr)
|
||||||
|
|
||||||
/* Action category code */
|
/* Action category code */
|
||||||
enum rtw_ieee80211_category {
|
enum rtw_ieee80211_category {
|
||||||
RTW_WLAN_CATEGORY_BACK = 3,
|
|
||||||
RTW_WLAN_CATEGORY_PUBLIC = 4, /* IEEE 802.11 public action frames */
|
|
||||||
RTW_WLAN_CATEGORY_P2P = 0x7f,/* P2P action frames */
|
RTW_WLAN_CATEGORY_P2P = 0x7f,/* P2P action frames */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue