summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2022-05-02 22:06:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-05 23:22:39 +0200
commit87f4820238bbc8869c5a450fe9a08ef77c0ab6ec (patch)
tree6b0ea14efbee753da5c379c99ff27605eb054352 /drivers
parent11d2e7de0d8a4b706872f6e79679c32dcb3c0393 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/r8188eu/core/rtw_mlme_ext.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 0df89bbdb63a..96b0da90c2ba 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -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;
-
- frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr));
-
- category = frame_body[0];
+ struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data;
- switch (category) {
+ switch (mgmt->u.action.category) {
case RTW_WLAN_CATEGORY_BACK:
OnAction_back(padapter, precv_frame);
break;