diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-12-28 08:32:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:09:43 -0500 |
commit | 471b3efdfccc257591331724145f8ccf8b3217e1 (patch) | |
tree | c9e576442c7b62c8c667ae1046e560323f0821fd /net/mac80211/ieee80211.c | |
parent | 2bc454b0b30b3645d114689b64321cb49be99923 (diff) |
mac80211: add unified BSS configuration
This patch (based on Ron Rindjunsky's) creates a framework for
a unified way to pass BSS configuration to drivers that require
the information, e.g. for implementing power save mode.
This patch introduces new ieee80211_bss_conf structure that is
passed to the driver via the new bss_info_changed() callback
when the BSS configuration changes.
This new BSS configuration infrastructure adds the following
new features:
* drivers are notified of their association AID
* drivers are notified of association status
and replaces the erp_ie_changed() callback. The patch also does
the relevant driver updates for the latter change.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r-- | net/mac80211/ieee80211.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 859682eee547..177040218232 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -635,25 +635,30 @@ int ieee80211_hw_config_ht(struct ieee80211_local *local, int enable_ht, | |||
635 | return 0; | 635 | return 0; |
636 | } | 636 | } |
637 | 637 | ||
638 | void ieee80211_erp_info_change_notify(struct net_device *dev, u8 changes) | 638 | void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, |
639 | u32 changed) | ||
639 | { | 640 | { |
640 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 641 | struct ieee80211_local *local = sdata->local; |
641 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 642 | |
642 | if (local->ops->erp_ie_changed) | 643 | if (!changed) |
643 | local->ops->erp_ie_changed(local_to_hw(local), changes, | 644 | return; |
644 | !!(sdata->flags & IEEE80211_SDATA_USE_PROTECTION), | 645 | |
645 | !(sdata->flags & IEEE80211_SDATA_SHORT_PREAMBLE)); | 646 | if (local->ops->bss_info_changed) |
647 | local->ops->bss_info_changed(local_to_hw(local), | ||
648 | &sdata->vif, | ||
649 | &sdata->bss_conf, | ||
650 | changed); | ||
646 | } | 651 | } |
647 | 652 | ||
648 | void ieee80211_reset_erp_info(struct net_device *dev) | 653 | void ieee80211_reset_erp_info(struct net_device *dev) |
649 | { | 654 | { |
650 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 655 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
651 | 656 | ||
652 | sdata->flags &= ~(IEEE80211_SDATA_USE_PROTECTION | | 657 | sdata->bss_conf.use_cts_prot = 0; |
653 | IEEE80211_SDATA_SHORT_PREAMBLE); | 658 | sdata->bss_conf.use_short_preamble = 0; |
654 | ieee80211_erp_info_change_notify(dev, | 659 | ieee80211_bss_info_change_notify(sdata, |
655 | IEEE80211_ERP_CHANGE_PROTECTION | | 660 | BSS_CHANGED_ERP_CTS_PROT | |
656 | IEEE80211_ERP_CHANGE_PREAMBLE); | 661 | BSS_CHANGED_ERP_PREAMBLE); |
657 | } | 662 | } |
658 | 663 | ||
659 | void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, | 664 | void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, |