diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-04-27 06:36:15 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-05-10 18:08:47 -0400 |
commit | 92445c953eb5698d1abab16b9a43238effdc0a6d (patch) | |
tree | 73b125eec9c0c21ba6b210f2eae7f2d85f7ca6e2 /drivers | |
parent | 683abfbefe95750f8aa47dc6d2a7ee41c01c14ad (diff) |
iwlwifi: use vif iwl_bss_info_changed
The iw_mode will always follow the only vif we
have, but using the vif directly seems easier.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 1e11706dcf63..d8ee5283ecbe 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1857,8 +1857,7 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
1857 | 1857 | ||
1858 | mutex_lock(&priv->mutex); | 1858 | mutex_lock(&priv->mutex); |
1859 | 1859 | ||
1860 | if (changes & BSS_CHANGED_BEACON && | 1860 | if (changes & BSS_CHANGED_BEACON && vif->type == NL80211_IFTYPE_AP) { |
1861 | priv->iw_mode == NL80211_IFTYPE_AP) { | ||
1862 | dev_kfree_skb(priv->ibss_beacon); | 1861 | dev_kfree_skb(priv->ibss_beacon); |
1863 | priv->ibss_beacon = ieee80211_beacon_get(hw, vif); | 1862 | priv->ibss_beacon = ieee80211_beacon_get(hw, vif); |
1864 | } | 1863 | } |
@@ -1884,8 +1883,7 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
1884 | } | 1883 | } |
1885 | 1884 | ||
1886 | /* mac80211 only sets assoc when in STATION mode */ | 1885 | /* mac80211 only sets assoc when in STATION mode */ |
1887 | if (priv->iw_mode == NL80211_IFTYPE_ADHOC || | 1886 | if (vif->type == NL80211_IFTYPE_ADHOC || bss_conf->assoc) { |
1888 | bss_conf->assoc) { | ||
1889 | memcpy(priv->staging_rxon.bssid_addr, | 1887 | memcpy(priv->staging_rxon.bssid_addr, |
1890 | bss_conf->bssid, ETH_ALEN); | 1888 | bss_conf->bssid, ETH_ALEN); |
1891 | 1889 | ||
@@ -1903,7 +1901,7 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
1903 | * mac80211 decides to do both changes at once because | 1901 | * mac80211 decides to do both changes at once because |
1904 | * it will invoke post_associate. | 1902 | * it will invoke post_associate. |
1905 | */ | 1903 | */ |
1906 | if (priv->iw_mode == NL80211_IFTYPE_ADHOC && | 1904 | if (vif->type == NL80211_IFTYPE_ADHOC && |
1907 | changes & BSS_CHANGED_BEACON) { | 1905 | changes & BSS_CHANGED_BEACON) { |
1908 | struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); | 1906 | struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); |
1909 | 1907 | ||