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:
Jes Sorensen 2014-05-09 15:03:30 +02:00 committed by Greg Kroah-Hartman
parent 222203206e
commit 5ca12b7899
3 changed files with 6 additions and 16 deletions

View 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;

View 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;

View 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))