From: Jes Sorensen Date: Tue, 15 Apr 2014 17:44:29 +0000 (+0200) Subject: staging: rtl8723au: OnAction23a(): Use struct ieee80211_mgmt instead of hardcoded... X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f5f05715b2d2092e56d018bf2097bf03f1d147f5;p=linux-beck.git staging: rtl8723au: OnAction23a(): Use struct ieee80211_mgmt instead of hardcoded offsets Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- 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++) {