提交 e4e19c03 编写于 作者: O Oleksij Rempel 提交者: John W. Linville

carl9170: use ath_is_mybeacon

Signed-off-by: NOleksij Rempel <linux@rempel-privat.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 d44efe21
...@@ -519,6 +519,7 @@ static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len) ...@@ -519,6 +519,7 @@ static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len)
{ {
struct ieee80211_hdr *hdr = data; struct ieee80211_hdr *hdr = data;
struct ieee80211_tim_ie *tim_ie; struct ieee80211_tim_ie *tim_ie;
struct ath_common *common = &ar->common;
u8 *tim; u8 *tim;
u8 tim_len; u8 tim_len;
bool cam; bool cam;
...@@ -526,17 +527,13 @@ static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len) ...@@ -526,17 +527,13 @@ static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len)
if (likely(!(ar->hw->conf.flags & IEEE80211_CONF_PS))) if (likely(!(ar->hw->conf.flags & IEEE80211_CONF_PS)))
return; return;
/* check if this really is a beacon */
if (!ieee80211_is_beacon(hdr->frame_control))
return;
/* min. beacon length + FCS_LEN */ /* min. beacon length + FCS_LEN */
if (len <= 40 + FCS_LEN) if (len <= 40 + FCS_LEN)
return; return;
/* check if this really is a beacon */
/* and only beacons from the associated BSSID, please */ /* and only beacons from the associated BSSID, please */
if (!ether_addr_equal_64bits(hdr->addr3, ar->common.curbssid) || if (!ath_is_mybeacon(common, hdr) || !common->curaid)
!ar->common.curaid)
return; return;
ar->ps.last_beacon = jiffies; ar->ps.last_beacon = jiffies;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册