diff options
author | Daniel Drake <dsd@gentoo.org> | 2007-07-27 15:43:24 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-11 01:47:39 +0200 |
commit | d9430a32886f70c0c16d67c525f6cda2df7906ee (patch) | |
tree | 9d531b23206e62033a6bb9d03ac572ce6ab4c7f1 /net/mac80211/ieee80211.c | |
parent | [MAC80211]: improved short preamble handling (diff) | |
download | linux-d9430a32886f70c0c16d67c525f6cda2df7906ee.tar.xz linux-d9430a32886f70c0c16d67c525f6cda2df7906ee.zip |
[MAC80211]: implement ERP info change notifications
zd1211rw and bcm43xx are interested in being notified when ERP IE conditions
change, so that they can reprogram a register which affects how control frames
are transmitted.
This patch adds an interface similar to the one that can be found in softmac.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r-- | net/mac80211/ieee80211.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index f811a260ee9c..4715a9525918 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c @@ -464,8 +464,10 @@ static int ieee80211_open(struct net_device *dev) if (sdata->type == IEEE80211_IF_TYPE_MNTR) { local->monitors++; local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; - } else + } else { ieee80211_if_config(dev); + ieee80211_reset_erp_info(dev); + } if (sdata->type == IEEE80211_IF_TYPE_STA && !local->user_space_mlme) @@ -748,6 +750,27 @@ int ieee80211_hw_config(struct ieee80211_local *local) return ret; } +void ieee80211_erp_info_change_notify(struct net_device *dev, u8 changes) +{ + struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); + if (local->ops->erp_ie_changed) + local->ops->erp_ie_changed(local_to_hw(local), changes, + sdata->use_protection, + !sdata->short_preamble); +} + +void ieee80211_reset_erp_info(struct net_device *dev) +{ + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); + + sdata->short_preamble = 0; + sdata->use_protection = 0; + ieee80211_erp_info_change_notify(dev, + IEEE80211_ERP_CHANGE_PROTECTION | + IEEE80211_ERP_CHANGE_PREAMBLE); +} + struct dev_mc_list *ieee80211_get_mc_list_item(struct ieee80211_hw *hw, struct dev_mc_list *prev, void **ptr) |