Skip to content

Commit

Permalink
carl9170: use ath_is_mybeacon
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Oleksij Rempel authored and John W. Linville committed Jan 16, 2014
1 parent d44efe2 commit e4e19c0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/net/wireless/ath/carl9170/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,24 +519,21 @@ static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len)
{
struct ieee80211_hdr *hdr = data;
struct ieee80211_tim_ie *tim_ie;
struct ath_common *common = &ar->common;
u8 *tim;
u8 tim_len;
bool cam;

if (likely(!(ar->hw->conf.flags & IEEE80211_CONF_PS)))
return;

/* check if this really is a beacon */
if (!ieee80211_is_beacon(hdr->frame_control))
return;

/* min. beacon length + FCS_LEN */
if (len <= 40 + FCS_LEN)
return;

/* check if this really is a beacon */
/* and only beacons from the associated BSSID, please */
if (!ether_addr_equal_64bits(hdr->addr3, ar->common.curbssid) ||
!ar->common.curaid)
if (!ath_is_mybeacon(common, hdr) || !common->curaid)
return;

ar->ps.last_beacon = jiffies;
Expand Down

0 comments on commit e4e19c0

Please sign in to comment.