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

staging: rtl8723au: Use struct ieee80211_pspoll to obtain 'aid'

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9c4a961d
...@@ -1119,7 +1119,6 @@ static int validate_recv_ctrl_frame(struct rtw_adapter *padapter, ...@@ -1119,7 +1119,6 @@ static int validate_recv_ctrl_frame(struct rtw_adapter *padapter,
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
struct sk_buff *skb = precv_frame->pkt; struct sk_buff *skb = precv_frame->pkt;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
u8 *pframe = skb->data;
if (!ieee80211_is_ctl(hdr->frame_control)) if (!ieee80211_is_ctl(hdr->frame_control))
return _FAIL; return _FAIL;
...@@ -1130,14 +1129,15 @@ static int validate_recv_ctrl_frame(struct rtw_adapter *padapter, ...@@ -1130,14 +1129,15 @@ static int validate_recv_ctrl_frame(struct rtw_adapter *padapter,
/* only handle ps-poll */ /* only handle ps-poll */
if (ieee80211_is_pspoll(hdr->frame_control)) { if (ieee80211_is_pspoll(hdr->frame_control)) {
struct ieee80211_pspoll *psp = (struct ieee80211_pspoll *)hdr;
u16 aid; u16 aid;
u8 wmmps_ac = 0; u8 wmmps_ac = 0;
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
aid = GetAid(pframe); aid = le16_to_cpu(psp->aid) & 0x3fff;
psta = rtw_get_stainfo23a(pstapriv, hdr->addr2); psta = rtw_get_stainfo23a(pstapriv, hdr->addr2);
if ((!psta) || (psta->aid != aid)) if (!psta || psta->aid != aid)
return _FAIL; return _FAIL;
/* for rx pkt statistics */ /* for rx pkt statistics */
......
...@@ -149,10 +149,6 @@ enum WIFI_REG_DOMAIN { ...@@ -149,10 +149,6 @@ enum WIFI_REG_DOMAIN {
#define SetAMsdu(pbuf, amsdu) \ #define SetAMsdu(pbuf, amsdu) \
(*(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7)) (*(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7))
#define GetAid(pbuf) \
(cpu_to_le16(*(unsigned short *)((unsigned long)(pbuf) + 2)) & \
0x3fff)
#define GetTid(pbuf) \ #define GetTid(pbuf) \
(cpu_to_le16(*(unsigned short *)((unsigned long)(pbuf) + \ (cpu_to_le16(*(unsigned short *)((unsigned long)(pbuf) + \
(((ieee80211_has_tods(pbuf)<<1) | \ (((ieee80211_has_tods(pbuf)<<1) | \
......
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