aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/carl9170/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/carl9170/rx.c')
-rw-r--r--drivers/net/wireless/ath/carl9170/rx.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c
index e935f61c7fad..536bc46a2912 100644
--- a/drivers/net/wireless/ath/carl9170/rx.c
+++ b/drivers/net/wireless/ath/carl9170/rx.c
@@ -37,7 +37,6 @@
37 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 37 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38 */ 38 */
39 39
40#include <linux/init.h>
41#include <linux/slab.h> 40#include <linux/slab.h>
42#include <linux/module.h> 41#include <linux/module.h>
43#include <linux/etherdevice.h> 42#include <linux/etherdevice.h>
@@ -520,6 +519,7 @@ static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len)
520{ 519{
521 struct ieee80211_hdr *hdr = data; 520 struct ieee80211_hdr *hdr = data;
522 struct ieee80211_tim_ie *tim_ie; 521 struct ieee80211_tim_ie *tim_ie;
522 struct ath_common *common = &ar->common;
523 u8 *tim; 523 u8 *tim;
524 u8 tim_len; 524 u8 tim_len;
525 bool cam; 525 bool cam;
@@ -527,17 +527,13 @@ static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len)
527 if (likely(!(ar->hw->conf.flags & IEEE80211_CONF_PS))) 527 if (likely(!(ar->hw->conf.flags & IEEE80211_CONF_PS)))
528 return; 528 return;
529 529
530 /* check if this really is a beacon */
531 if (!ieee80211_is_beacon(hdr->frame_control))
532 return;
533
534 /* min. beacon length + FCS_LEN */ 530 /* min. beacon length + FCS_LEN */
535 if (len <= 40 + FCS_LEN) 531 if (len <= 40 + FCS_LEN)
536 return; 532 return;
537 533
534 /* check if this really is a beacon */
538 /* and only beacons from the associated BSSID, please */ 535 /* and only beacons from the associated BSSID, please */
539 if (!ether_addr_equal(hdr->addr3, ar->common.curbssid) || 536 if (!ath_is_mybeacon(common, hdr) || !common->curaid)
540 !ar->common.curaid)
541 return; 537 return;
542 538
543 ar->ps.last_beacon = jiffies; 539 ar->ps.last_beacon = jiffies;
@@ -602,8 +598,8 @@ static void carl9170_ba_check(struct ar9170 *ar, void *data, unsigned int len)
602 598
603 if (bar->start_seq_num == entry_bar->start_seq_num && 599 if (bar->start_seq_num == entry_bar->start_seq_num &&
604 TID_CHECK(bar->control, entry_bar->control) && 600 TID_CHECK(bar->control, entry_bar->control) &&
605 ether_addr_equal(bar->ra, entry_bar->ta) && 601 ether_addr_equal_64bits(bar->ra, entry_bar->ta) &&
606 ether_addr_equal(bar->ta, entry_bar->ra)) { 602 ether_addr_equal_64bits(bar->ta, entry_bar->ra)) {
607 struct ieee80211_tx_info *tx_info; 603 struct ieee80211_tx_info *tx_info;
608 604
609 tx_info = IEEE80211_SKB_CB(entry_skb); 605 tx_info = IEEE80211_SKB_CB(entry_skb);