aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2007-07-27 09:43:24 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:47:39 -0400
commitd9430a32886f70c0c16d67c525f6cda2df7906ee (patch)
tree9d531b23206e62033a6bb9d03ac572ce6ab4c7f1 /net/mac80211/ieee80211.c
parent7e9ed18874f0df84b6651f0636e1cfdac43bc610 (diff)
[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.c25
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)
464 if (sdata->type == IEEE80211_IF_TYPE_MNTR) { 464 if (sdata->type == IEEE80211_IF_TYPE_MNTR) {
465 local->monitors++; 465 local->monitors++;
466 local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; 466 local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP;
467 } else 467 } else {
468 ieee80211_if_config(dev); 468 ieee80211_if_config(dev);
469 ieee80211_reset_erp_info(dev);
470 }
469 471
470 if (sdata->type == IEEE80211_IF_TYPE_STA && 472 if (sdata->type == IEEE80211_IF_TYPE_STA &&
471 !local->user_space_mlme) 473 !local->user_space_mlme)
@@ -748,6 +750,27 @@ int ieee80211_hw_config(struct ieee80211_local *local)
748 return ret; 750 return ret;
749} 751}
750 752
753void ieee80211_erp_info_change_notify(struct net_device *dev, u8 changes)
754{
755 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
756 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
757 if (local->ops->erp_ie_changed)
758 local->ops->erp_ie_changed(local_to_hw(local), changes,
759 sdata->use_protection,
760 !sdata->short_preamble);
761}
762
763void ieee80211_reset_erp_info(struct net_device *dev)
764{
765 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
766
767 sdata->short_preamble = 0;
768 sdata->use_protection = 0;
769 ieee80211_erp_info_change_notify(dev,
770 IEEE80211_ERP_CHANGE_PROTECTION |
771 IEEE80211_ERP_CHANGE_PREAMBLE);
772}
773
751struct dev_mc_list *ieee80211_get_mc_list_item(struct ieee80211_hw *hw, 774struct dev_mc_list *ieee80211_get_mc_list_item(struct ieee80211_hw *hw,
752 struct dev_mc_list *prev, 775 struct dev_mc_list *prev,
753 void **ptr) 776 void **ptr)