diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2014-01-15 11:37:42 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-01-16 14:55:44 -0500 |
commit | f1d267cab2bc6ecd225abfd8d7e130f9a651408f (patch) | |
tree | 4056079174c05361be62b0ed3f5548ebb529f18a /drivers/net/wireless | |
parent | f862bfd1837c36efbb7f3475dbd409ce86edb080 (diff) |
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')
-rw-r--r-- | drivers/net/wireless/ath/ath.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/main.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index e0ba7cd14252..b59cfbe0276b 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #ifndef ATH_H | 17 | #ifndef ATH_H |
18 | #define ATH_H | 18 | #define ATH_H |
19 | 19 | ||
20 | #include <linux/etherdevice.h> | ||
20 | #include <linux/skbuff.h> | 21 | #include <linux/skbuff.h> |
21 | #include <linux/if_ether.h> | 22 | #include <linux/if_ether.h> |
22 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
@@ -165,6 +166,7 @@ struct ath_common { | |||
165 | struct sk_buff *ath_rxbuf_alloc(struct ath_common *common, | 166 | struct sk_buff *ath_rxbuf_alloc(struct ath_common *common, |
166 | u32 len, | 167 | u32 len, |
167 | gfp_t gfp_mask); | 168 | gfp_t gfp_mask); |
169 | bool ath_is_mybeacon(struct ath_common *common, struct ieee80211_hdr *hdr); | ||
168 | 170 | ||
169 | void ath_hw_setbssidmask(struct ath_common *common); | 171 | void ath_hw_setbssidmask(struct ath_common *common); |
170 | void ath_key_delete(struct ath_common *common, struct ieee80211_key_conf *key); | 172 | void ath_key_delete(struct ath_common *common, struct ieee80211_key_conf *key); |
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, | |||
59 | } | 59 | } |
60 | EXPORT_SYMBOL(ath_rxbuf_alloc); | 60 | EXPORT_SYMBOL(ath_rxbuf_alloc); |
61 | 61 | ||
62 | bool ath_is_mybeacon(struct ath_common *common, struct ieee80211_hdr *hdr) | ||
63 | { | ||
64 | return ieee80211_is_beacon(hdr->frame_control) && | ||
65 | !is_zero_ether_addr(common->curbssid) && | ||
66 | ether_addr_equal_64bits(hdr->addr3, common->curbssid); | ||
67 | } | ||
68 | EXPORT_SYMBOL(ath_is_mybeacon); | ||
69 | |||
62 | void ath_printk(const char *level, const struct ath_common* common, | 70 | void ath_printk(const char *level, const struct ath_common* common, |
63 | const char *fmt, ...) | 71 | const char *fmt, ...) |
64 | { | 72 | { |