staging: r8188eu: use ieee80211_mgmt for action category
Use the struct ieee80211_mgmt from ieee80211.h to read the action category. There's no need to parse the incoming frame ourselves. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220502200652.143665-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
11d2e7de0d
commit
87f4820238
@ -3871,15 +3871,9 @@ unsigned int OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_fra
|
||||
|
||||
unsigned int OnAction(struct adapter *padapter, struct recv_frame *precv_frame)
|
||||
{
|
||||
unsigned char category;
|
||||
unsigned char *frame_body;
|
||||
u8 *pframe = precv_frame->rx_data;
|
||||
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data;
|
||||
|
||||
frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr));
|
||||
|
||||
category = frame_body[0];
|
||||
|
||||
switch (category) {
|
||||
switch (mgmt->u.action.category) {
|
||||
case RTW_WLAN_CATEGORY_BACK:
|
||||
OnAction_back(padapter, precv_frame);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user