diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-04-29 07:43:09 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-05-10 18:09:00 -0400 |
commit | ca3c1f59dc469e19431c683383d8205397595806 (patch) | |
tree | 0b80e166785074b3d235d0f7f7a897cc041383bc | |
parent | 3a065ab3b57bedefa1d59c88f731da6513ac482a (diff) |
iwlwifi: use vif in iwl_ht_conf
Pass the virtual interface pointer to iwl_ht_conf()
so it doesn't need to rely on iw_mode and other
global variables.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 68c3693a296e..d7a36205f0e1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1740,10 +1740,11 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
1740 | EXPORT_SYMBOL(iwl_mac_conf_tx); | 1740 | EXPORT_SYMBOL(iwl_mac_conf_tx); |
1741 | 1741 | ||
1742 | static void iwl_ht_conf(struct iwl_priv *priv, | 1742 | static void iwl_ht_conf(struct iwl_priv *priv, |
1743 | struct ieee80211_bss_conf *bss_conf) | 1743 | struct ieee80211_vif *vif) |
1744 | { | 1744 | { |
1745 | struct iwl_ht_config *ht_conf = &priv->current_ht_config; | 1745 | struct iwl_ht_config *ht_conf = &priv->current_ht_config; |
1746 | struct ieee80211_sta *sta; | 1746 | struct ieee80211_sta *sta; |
1747 | struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; | ||
1747 | 1748 | ||
1748 | IWL_DEBUG_MAC80211(priv, "enter:\n"); | 1749 | IWL_DEBUG_MAC80211(priv, "enter:\n"); |
1749 | 1750 | ||
@@ -1757,10 +1758,10 @@ static void iwl_ht_conf(struct iwl_priv *priv, | |||
1757 | 1758 | ||
1758 | ht_conf->single_chain_sufficient = false; | 1759 | ht_conf->single_chain_sufficient = false; |
1759 | 1760 | ||
1760 | switch (priv->iw_mode) { | 1761 | switch (vif->type) { |
1761 | case NL80211_IFTYPE_STATION: | 1762 | case NL80211_IFTYPE_STATION: |
1762 | rcu_read_lock(); | 1763 | rcu_read_lock(); |
1763 | sta = ieee80211_find_sta(priv->vif, priv->bssid); | 1764 | sta = ieee80211_find_sta(vif, bss_conf->bssid); |
1764 | if (sta) { | 1765 | if (sta) { |
1765 | struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; | 1766 | struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; |
1766 | int maxstreams; | 1767 | int maxstreams; |
@@ -1911,7 +1912,7 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
1911 | } | 1912 | } |
1912 | 1913 | ||
1913 | if (changes & BSS_CHANGED_HT) { | 1914 | if (changes & BSS_CHANGED_HT) { |
1914 | iwl_ht_conf(priv, bss_conf); | 1915 | iwl_ht_conf(priv, vif); |
1915 | 1916 | ||
1916 | if (priv->cfg->ops->hcmd->set_rxon_chain) | 1917 | if (priv->cfg->ops->hcmd->set_rxon_chain) |
1917 | priv->cfg->ops->hcmd->set_rxon_chain(priv); | 1918 | priv->cfg->ops->hcmd->set_rxon_chain(priv); |