staging: rtl8723au: mgmt_dispatcher23a(): Use struct ieee80211_mgmt
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 15 Apr 2014 17:44:34 +0000 (19:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2014 18:04:07 +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 4b20f07412f932be1fa2b14c10c6eb5b7ceb15f9..3f2f8f91d05610ac897f128718bdba7caad9393d 100644 (file)
@@ -578,28 +578,28 @@ _mgt_dispatcher23a(struct rtw_adapter *padapter, struct mlme_handler *ptable,
 void mgt_dispatcher23a(struct rtw_adapter *padapter,
                    struct recv_frame *precv_frame)
 {
-       int index;
        struct mlme_handler *ptable;
 #ifdef CONFIG_8723AU_AP_MODE
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 #endif /* CONFIG_8723AU_AP_MODE */
        struct sk_buff *skb = precv_frame->pkt;
-       struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
-       u16 stype;
+       struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) skb->data;
        struct sta_info *psta;
+       u16 stype;
+       int index;
 
-       if (!ieee80211_is_mgmt(hdr->frame_control))
+       if (!ieee80211_is_mgmt(mgmt->frame_control))
                return;
 
        /* receive the frames that ra(a1) is my address or ra(a1) is
           bc address. */
-       if (!ether_addr_equal(hdr->addr1, myid(&padapter->eeprompriv)) &&
-           !is_broadcast_ether_addr(hdr->addr1))
+       if (!ether_addr_equal(mgmt->da, myid(&padapter->eeprompriv)) &&
+           !is_broadcast_ether_addr(mgmt->da))
                return;
 
        ptable = mlme_sta_tbl;
 
-       stype = le16_to_cpu(hdr->frame_control) & IEEE80211_FCTL_STYPE;
+       stype = le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE;
        index = stype >> 4;
 
        if (index > 13) {
@@ -610,10 +610,10 @@ void mgt_dispatcher23a(struct rtw_adapter *padapter,
        }
        ptable += index;
 
-       psta = rtw_get_stainfo23a(&padapter->stapriv, hdr->addr2);
+       psta = rtw_get_stainfo23a(&padapter->stapriv, mgmt->sa);
 
        if (psta) {
-               if (ieee80211_has_retry(hdr->frame_control)) {
+               if (ieee80211_has_retry(mgmt->frame_control)) {
                        if (precv_frame->attrib.seq_num ==
                            psta->RxMgmtFrameSeqNum) {
                                /* drop the duplicate management frame */