staging: rtl8723au: OnAction23a(): Use struct ieee80211_mgmt instead of hardcoded...
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 15 Apr 2014 17:44:29 +0000 (19:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2014 18:04:06 +0000 (11:04 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme_ext.c

index 2a3d3f7527c91259f99a5ff486855864ba50dede..c113fe3afe2b9d407b5c2546e3651a333697d7d7 100644 (file)
@@ -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++) {