this function is used by most ath driver, so it can be moved here.

Signed-off-by: Oleksij Rempel <li...@rempel-privat.de>
---
 drivers/net/wireless/ath/ath.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
index e0ba7cd..ab6a0c8 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -17,6 +17,7 @@
 #ifndef ATH_H
 #define ATH_H
 
+#include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 #include <linux/if_ether.h>
 #include <linux/spinlock.h>
@@ -162,10 +163,17 @@ struct ath_common {
        bool bt_ant_diversity;
 };
 
+static inline 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);
+}
+
 struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,
                                u32 len,
                                gfp_t gfp_mask);
-
 void ath_hw_setbssidmask(struct ath_common *common);
 void ath_key_delete(struct ath_common *common, struct ieee80211_key_conf *key);
 int ath_key_config(struct ath_common *common,
-- 
1.8.5.2

_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to