]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: rtl8723au: Remove to_fr_ds packet attribute
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 9 May 2014 13:03:30 +0000 (15:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 20:11:57 +0000 (13:11 -0700)
This is only used in one place - do the work there properly.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_recv.c
drivers/staging/rtl8723au/include/rtw_recv.h
drivers/staging/rtl8723au/include/wifi.h

index 76873664d432b0c77a1842ade21354f68aa96d5e..fd0958b675d5eab05df722637ee4f162e8bef6b1 100644 (file)
@@ -1334,36 +1334,32 @@ static int validate_recv_data_frame(struct rtw_adapter *adapter,
 
        ether_addr_copy(pattrib->bssid, pbssid);
 
-       switch (pattrib->to_fr_ds)
-       {
-       case 0:
+       switch (hdr->frame_control &
+               cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) {
+       case cpu_to_le16(0):
                ether_addr_copy(pattrib->ra, pda);
                ether_addr_copy(pattrib->ta, psa);
                ret = sta2sta_data_frame(adapter, precv_frame, &psta);
                break;
 
-       case 1:
+       case cpu_to_le16(IEEE80211_FCTL_FROMDS):
                ether_addr_copy(pattrib->ra, pda);
                ether_addr_copy(pattrib->ta, pbssid);
                ret = ap2sta_data_frame(adapter, precv_frame, &psta);
                break;
 
-       case 2:
+       case cpu_to_le16(IEEE80211_FCTL_TODS):
                ether_addr_copy(pattrib->ra, pbssid);
                ether_addr_copy(pattrib->ta, psa);
                ret = sta2ap_data_frame(adapter, precv_frame, &psta);
                break;
 
-       case 3:
+       case cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS):
                ether_addr_copy(pattrib->ra, hdr->addr1);
                ether_addr_copy(pattrib->ta, hdr->addr2);
                ret = _FAIL;
                RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" case 3\n"));
                break;
-
-       default:
-               ret = _FAIL;
-               break;
        }
 
        if ((ret == _FAIL) || (ret == RTW_RX_HANDLED))
@@ -1524,8 +1520,6 @@ static int validate_recv_frame(struct rtw_adapter *adapter,
                goto exit;
        }
 
-       pattrib->to_fr_ds = get_tofr_ds(hdr->frame_control);
-
        seq_ctrl = le16_to_cpu(hdr->seq_ctrl);
        pattrib->frag_num = seq_ctrl & IEEE80211_SCTL_FRAG;
        pattrib->seq_num = seq_ctrl >> 4;
index 1f18af8dcc040a164db3b06cf3ca1cbbdbacbbe5..0a88506ab859989c057d7a006cd75b94ab744c10 100644 (file)
@@ -99,7 +99,6 @@ struct rx_pkt_attrib  {
        u8      drvinfo_sz;
        u8      shift_sz;
        u8      hdrlen; /* the WLAN Header Len */
-       u8      to_fr_ds;
        u8      amsdu;
        u8      qos;
        u8      priority;
index aebc05d8a1235e820b7f9da786f85ea6cc0dc011..e7c34b73ff1d7227e8997265f2696bee61df708e 100644 (file)
@@ -87,9 +87,6 @@ enum WIFI_REG_DOMAIN {
 #define SetFrDs(pbuf)  \
        (*(__le16 *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_FROMDS))
 
-#define get_tofr_ds(pframe)    ((ieee80211_has_tods(pframe) << 1) | \
-                                ieee80211_has_fromds(pframe))
-
 #define SetMFrag(pbuf) \
        (*(__le16 *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_MOREFRAGS))