Commit 5ca12b78 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Remove to_fr_ds packet attribute

This is only used in one place - do the work there properly.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 22220320
......@@ -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;
......
......@@ -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;
......
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment