diff options
| author | Oleksij Rempel <linux@rempel-privat.de> | 2014-01-15 11:11:39 -0500 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2014-01-16 14:55:45 -0500 |
| commit | e4e19c031901e95dc7d1cf0a2c9c50525d71651f (patch) | |
| tree | 1d6b8dc065e9a0d666b69d2ec55f396a3c20b4d8 /drivers/net/wireless/ath/carl9170 | |
| parent | d44efe21859777784aea9afef934ad67bbb16935 (diff) | |
carl9170: use ath_is_mybeacon
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/carl9170')
| -rw-r--r-- | drivers/net/wireless/ath/carl9170/rx.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c index 1b1b20751ead..536bc46a2912 100644 --- a/drivers/net/wireless/ath/carl9170/rx.c +++ b/drivers/net/wireless/ath/carl9170/rx.c | |||
| @@ -519,6 +519,7 @@ static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len) | |||
| 519 | { | 519 | { |
| 520 | struct ieee80211_hdr *hdr = data; | 520 | struct ieee80211_hdr *hdr = data; |
| 521 | struct ieee80211_tim_ie *tim_ie; | 521 | struct ieee80211_tim_ie *tim_ie; |
| 522 | struct ath_common *common = &ar->common; | ||
| 522 | u8 *tim; | 523 | u8 *tim; |
| 523 | u8 tim_len; | 524 | u8 tim_len; |
| 524 | bool cam; | 525 | bool cam; |
| @@ -526,17 +527,13 @@ static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len) | |||
| 526 | if (likely(!(ar->hw->conf.flags & IEEE80211_CONF_PS))) | 527 | if (likely(!(ar->hw->conf.flags & IEEE80211_CONF_PS))) |
| 527 | return; | 528 | return; |
| 528 | 529 | ||
| 529 | /* check if this really is a beacon */ | ||
| 530 | if (!ieee80211_is_beacon(hdr->frame_control)) | ||
| 531 | return; | ||
| 532 | |||
| 533 | /* min. beacon length + FCS_LEN */ | 530 | /* min. beacon length + FCS_LEN */ |
| 534 | if (len <= 40 + FCS_LEN) | 531 | if (len <= 40 + FCS_LEN) |
| 535 | return; | 532 | return; |
| 536 | 533 | ||
| 534 | /* check if this really is a beacon */ | ||
| 537 | /* and only beacons from the associated BSSID, please */ | 535 | /* and only beacons from the associated BSSID, please */ |
| 538 | if (!ether_addr_equal_64bits(hdr->addr3, ar->common.curbssid) || | 536 | if (!ath_is_mybeacon(common, hdr) || !common->curaid) |
| 539 | !ar->common.curaid) | ||
| 540 | return; | 537 | return; |
| 541 | 538 | ||
| 542 | ar->ps.last_beacon = jiffies; | 539 | ar->ps.last_beacon = jiffies; |
