aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-07-19 10:39:04 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-20 16:02:58 -0400
commit4ced3f74dae18715920cb680098ec7ff4345d0a3 (patch)
tree4a1b35285921fb25e01363af48a8c7db7423098d /drivers/net/wireless/iwlwifi/iwl-core.c
parent875ae5f68883c75aad826e715df8ec0619551a07 (diff)
mac80211: move QoS-enable to BSS info
Ever since commit e1b3ec1a2a336c328c336cfa5485a5f0484cc90d Author: Stanislaw Gruszka <sgruszka@redhat.com> Date: Mon Mar 29 12:18:34 2010 +0200 mac80211: explicitly disable/enable QoS mac80211 is telling drivers, in particular iwlwifi, whether QoS is enabled or not. However, this is only relevant for station mode, since only then will any device send nullfunc frames and need to know whether they should be QoS frames or not. In other modes, there are (currently) no frames the device is supposed to send. When you now consider virtual interfaces, it becomes apparent that the current mechanism is inadequate since it enables/disables QoS on a global scale, where for nullfunc frames it has to be on a per-interface scale. Due to the above considerations, we can change the way mac80211 advertises the QoS state to drivers to only ever advertise it as "off" in station mode, and make it a per-BSS setting. Tested-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index f73eb08a949..676d49df77e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1763,6 +1763,15 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
1763 1763
1764 mutex_lock(&priv->mutex); 1764 mutex_lock(&priv->mutex);
1765 1765
1766 if (changes & BSS_CHANGED_QOS) {
1767 unsigned long flags;
1768
1769 spin_lock_irqsave(&priv->lock, flags);
1770 priv->qos_data.qos_active = bss_conf->qos;
1771 iwl_update_qos(priv);
1772 spin_unlock_irqrestore(&priv->lock, flags);
1773 }
1774
1766 if (changes & BSS_CHANGED_BEACON && vif->type == NL80211_IFTYPE_AP) { 1775 if (changes & BSS_CHANGED_BEACON && vif->type == NL80211_IFTYPE_AP) {
1767 dev_kfree_skb(priv->ibss_beacon); 1776 dev_kfree_skb(priv->ibss_beacon);
1768 priv->ibss_beacon = ieee80211_beacon_get(hw, vif); 1777 priv->ibss_beacon = ieee80211_beacon_get(hw, vif);
@@ -2134,15 +2143,6 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
2134 iwl_set_tx_power(priv, conf->power_level, false); 2143 iwl_set_tx_power(priv, conf->power_level, false);
2135 } 2144 }
2136 2145
2137 if (changed & IEEE80211_CONF_CHANGE_QOS) {
2138 bool qos_active = !!(conf->flags & IEEE80211_CONF_QOS);
2139
2140 spin_lock_irqsave(&priv->lock, flags);
2141 priv->qos_data.qos_active = qos_active;
2142 iwl_update_qos(priv);
2143 spin_unlock_irqrestore(&priv->lock, flags);
2144 }
2145
2146 if (!iwl_is_ready(priv)) { 2146 if (!iwl_is_ready(priv)) {
2147 IWL_DEBUG_MAC80211(priv, "leave - not ready\n"); 2147 IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
2148 goto out; 2148 goto out;