diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-04-16 07:17:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:57:16 -0400 |
commit | d91f36db51661018f6d54ff5966e283bcec4c545 (patch) | |
tree | cde91cde0e6478c3c8cb256786eb61f3c48842c4 /net/mac80211/ieee80211_i.h | |
parent | 10f644a47b76d3e61b98f2d02ce9690b94c51ee5 (diff) |
mac80211: implement beacon filtering in software
Regardless of whether the hardware implements beacon filtering,
there's no need to process all beacons in software all the time
throughout the stack (mac80211 does a lot, then cfg80211, then
in the future possibly userspace).
This patch implements the "best possible" beacon filtering in
mac80211. "Best possible" means that it can look for changes in
all requested information elements, and distinguish vendor IEs
by their OUI.
In the future, we will add nl80211 API for userspace to request
information elements and vendor IE OUIs to watch -- drivers can
then implement the best they can do while software implements
it fully.
It is unclear whether or not this actually saves CPU time, but
the data is all in the cache already so it should be fairly
cheap. The additional _testing_, however, has great benefit;
Without this, and on hardware that doesn't implement beacon
filtering, wrong assumptions about, for example, scan result
updates could quickly creep into code.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index b1d18d967d8c..38c980612518 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -308,6 +308,8 @@ struct ieee80211_if_managed { | |||
308 | int auth_alg; /* currently used IEEE 802.11 authentication algorithm */ | 308 | int auth_alg; /* currently used IEEE 802.11 authentication algorithm */ |
309 | int auth_transaction; | 309 | int auth_transaction; |
310 | 310 | ||
311 | u32 beacon_crc; | ||
312 | |||
311 | enum { | 313 | enum { |
312 | IEEE80211_MFP_DISABLED, | 314 | IEEE80211_MFP_DISABLED, |
313 | IEEE80211_MFP_OPTIONAL, | 315 | IEEE80211_MFP_OPTIONAL, |
@@ -1085,6 +1087,9 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, | |||
1085 | int encrypt); | 1087 | int encrypt); |
1086 | void ieee802_11_parse_elems(u8 *start, size_t len, | 1088 | void ieee802_11_parse_elems(u8 *start, size_t len, |
1087 | struct ieee802_11_elems *elems); | 1089 | struct ieee802_11_elems *elems); |
1090 | u32 ieee802_11_parse_elems_crc(u8 *start, size_t len, | ||
1091 | struct ieee802_11_elems *elems, | ||
1092 | u64 filter, u32 crc); | ||
1088 | int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freq); | 1093 | int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freq); |
1089 | u32 ieee80211_mandatory_rates(struct ieee80211_local *local, | 1094 | u32 ieee80211_mandatory_rates(struct ieee80211_local *local, |
1090 | enum ieee80211_band band); | 1095 | enum ieee80211_band band); |