staging: rtl8723au: Remove to_fr_ds packet attribute
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>
This commit is contained in:
parent
222203206e
commit
5ca12b7899
|
@ -1334,36 +1334,32 @@ static int validate_recv_data_frame(struct rtw_adapter *adapter,
|
||||||
|
|
||||||
ether_addr_copy(pattrib->bssid, pbssid);
|
ether_addr_copy(pattrib->bssid, pbssid);
|
||||||
|
|
||||||
switch (pattrib->to_fr_ds)
|
switch (hdr->frame_control &
|
||||||
{
|
cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) {
|
||||||
case 0:
|
case cpu_to_le16(0):
|
||||||
ether_addr_copy(pattrib->ra, pda);
|
ether_addr_copy(pattrib->ra, pda);
|
||||||
ether_addr_copy(pattrib->ta, psa);
|
ether_addr_copy(pattrib->ta, psa);
|
||||||
ret = sta2sta_data_frame(adapter, precv_frame, &psta);
|
ret = sta2sta_data_frame(adapter, precv_frame, &psta);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case cpu_to_le16(IEEE80211_FCTL_FROMDS):
|
||||||
ether_addr_copy(pattrib->ra, pda);
|
ether_addr_copy(pattrib->ra, pda);
|
||||||
ether_addr_copy(pattrib->ta, pbssid);
|
ether_addr_copy(pattrib->ta, pbssid);
|
||||||
ret = ap2sta_data_frame(adapter, precv_frame, &psta);
|
ret = ap2sta_data_frame(adapter, precv_frame, &psta);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case cpu_to_le16(IEEE80211_FCTL_TODS):
|
||||||
ether_addr_copy(pattrib->ra, pbssid);
|
ether_addr_copy(pattrib->ra, pbssid);
|
||||||
ether_addr_copy(pattrib->ta, psa);
|
ether_addr_copy(pattrib->ta, psa);
|
||||||
ret = sta2ap_data_frame(adapter, precv_frame, &psta);
|
ret = sta2ap_data_frame(adapter, precv_frame, &psta);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS):
|
||||||
ether_addr_copy(pattrib->ra, hdr->addr1);
|
ether_addr_copy(pattrib->ra, hdr->addr1);
|
||||||
ether_addr_copy(pattrib->ta, hdr->addr2);
|
ether_addr_copy(pattrib->ta, hdr->addr2);
|
||||||
ret = _FAIL;
|
ret = _FAIL;
|
||||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" case 3\n"));
|
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" case 3\n"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
|
||||||
ret = _FAIL;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret == _FAIL) || (ret == RTW_RX_HANDLED))
|
if ((ret == _FAIL) || (ret == RTW_RX_HANDLED))
|
||||||
|
@ -1524,8 +1520,6 @@ static int validate_recv_frame(struct rtw_adapter *adapter,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
pattrib->to_fr_ds = get_tofr_ds(hdr->frame_control);
|
|
||||||
|
|
||||||
seq_ctrl = le16_to_cpu(hdr->seq_ctrl);
|
seq_ctrl = le16_to_cpu(hdr->seq_ctrl);
|
||||||
pattrib->frag_num = seq_ctrl & IEEE80211_SCTL_FRAG;
|
pattrib->frag_num = seq_ctrl & IEEE80211_SCTL_FRAG;
|
||||||
pattrib->seq_num = seq_ctrl >> 4;
|
pattrib->seq_num = seq_ctrl >> 4;
|
||||||
|
|
|
@ -99,7 +99,6 @@ struct rx_pkt_attrib {
|
||||||
u8 drvinfo_sz;
|
u8 drvinfo_sz;
|
||||||
u8 shift_sz;
|
u8 shift_sz;
|
||||||
u8 hdrlen; /* the WLAN Header Len */
|
u8 hdrlen; /* the WLAN Header Len */
|
||||||
u8 to_fr_ds;
|
|
||||||
u8 amsdu;
|
u8 amsdu;
|
||||||
u8 qos;
|
u8 qos;
|
||||||
u8 priority;
|
u8 priority;
|
||||||
|
|
|
@ -87,9 +87,6 @@ enum WIFI_REG_DOMAIN {
|
||||||
#define SetFrDs(pbuf) \
|
#define SetFrDs(pbuf) \
|
||||||
(*(__le16 *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_FROMDS))
|
(*(__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) \
|
#define SetMFrag(pbuf) \
|
||||||
(*(__le16 *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_MOREFRAGS))
|
(*(__le16 *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_MOREFRAGS))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue