From f5f05715b2d2092e56d018bf2097bf03f1d147f5 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Tue, 15 Apr 2014 19:44:29 +0200 Subject: [PATCH] staging: rtl8723au: OnAction23a(): Use struct ieee80211_mgmt instead of hardcoded offsets Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 2a3d3f7527c9..c113fe3afe2b 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -2245,16 +2245,12 @@ static int OnAction23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) { int i; - unsigned char category; + u8 category; struct action_handler *ptable; - unsigned char *frame_body; struct sk_buff *skb = precv_frame->pkt; - u8 *pframe = skb->data; - - frame_body = (unsigned char *) - (pframe + sizeof(struct ieee80211_hdr_3addr)); + struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) skb->data; - category = frame_body[0]; + category = mgmt->u.action.category; for (i = 0; i < sizeof(OnAction23a_tbl) / sizeof(struct action_handler); i++) { -- 2.30.2