summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/main.c
diff options
context:
space:
mode:
authorOleksij Rempel <linux@rempel-privat.de>2014-01-15 20:37:42 +0400
committerJohn W. Linville <linville@tuxdriver.com>2014-01-16 23:55:44 +0400
commitf1d267cab2bc6ecd225abfd8d7e130f9a651408f (patch)
tree4056079174c05361be62b0ed3f5548ebb529f18a /drivers/net/wireless/ath/main.c
parentf862bfd1837c36efbb7f3475dbd409ce86edb080 (diff)
downloadlinux-f1d267cab2bc6ecd225abfd8d7e130f9a651408f.tar.xz
ath: add common function ath_is_mybeacon
this function is used by most ath driver, so it can be moved here. 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/main.c')
-rw-r--r--drivers/net/wireless/ath/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/main.c b/drivers/net/wireless/ath/main.c
index 8e99540cd90e..8b0ac14d5c32 100644
--- a/drivers/net/wireless/ath/main.c
+++ b/drivers/net/wireless/ath/main.c
@@ -59,6 +59,14 @@ struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,
}
EXPORT_SYMBOL(ath_rxbuf_alloc);
+bool ath_is_mybeacon(struct ath_common *common, struct ieee80211_hdr *hdr)
+{
+ return ieee80211_is_beacon(hdr->frame_control) &&
+ !is_zero_ether_addr(common->curbssid) &&
+ ether_addr_equal_64bits(hdr->addr3, common->curbssid);
+}
+EXPORT_SYMBOL(ath_is_mybeacon);
+
void ath_printk(const char *level, const struct ath_common* common,
const char *fmt, ...)
{