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 /drivers/net/wireless/zd1211rw | |
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 'drivers/net/wireless/zd1211rw')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 3409cf97f5f8..49127e4b42c2 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -849,17 +849,19 @@ static void set_rts_cts_work(struct work_struct *work) | |||
849 | mutex_unlock(&mac->chip.mutex); | 849 | mutex_unlock(&mac->chip.mutex); |
850 | } | 850 | } |
851 | 851 | ||
852 | static void zd_op_erp_ie_changed(struct ieee80211_hw *hw, u8 changes, | 852 | static void zd_op_bss_info_changed(struct ieee80211_hw *hw, |
853 | int cts_protection, int preamble) | 853 | struct ieee80211_vif *vif, |
854 | struct ieee80211_bss_conf *bss_conf, | ||
855 | u32 changes) | ||
854 | { | 856 | { |
855 | struct zd_mac *mac = zd_hw_mac(hw); | 857 | struct zd_mac *mac = zd_hw_mac(hw); |
856 | unsigned long flags; | 858 | unsigned long flags; |
857 | 859 | ||
858 | dev_dbg_f(zd_mac_dev(mac), "changes: %x\n", changes); | 860 | dev_dbg_f(zd_mac_dev(mac), "changes: %x\n", changes); |
859 | 861 | ||
860 | if (changes & IEEE80211_ERP_CHANGE_PREAMBLE) { | 862 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { |
861 | spin_lock_irqsave(&mac->lock, flags); | 863 | spin_lock_irqsave(&mac->lock, flags); |
862 | mac->short_preamble = !preamble; | 864 | mac->short_preamble = bss_conf->use_short_preamble; |
863 | if (!mac->updating_rts_rate) { | 865 | if (!mac->updating_rts_rate) { |
864 | mac->updating_rts_rate = 1; | 866 | mac->updating_rts_rate = 1; |
865 | /* FIXME: should disable TX here, until work has | 867 | /* FIXME: should disable TX here, until work has |
@@ -879,7 +881,7 @@ static const struct ieee80211_ops zd_ops = { | |||
879 | .config = zd_op_config, | 881 | .config = zd_op_config, |
880 | .config_interface = zd_op_config_interface, | 882 | .config_interface = zd_op_config_interface, |
881 | .configure_filter = zd_op_configure_filter, | 883 | .configure_filter = zd_op_configure_filter, |
882 | .erp_ie_changed = zd_op_erp_ie_changed, | 884 | .bss_info_changed = zd_op_bss_info_changed, |
883 | }; | 885 | }; |
884 | 886 | ||
885 | struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) | 887 | struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) |