mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-01 06:42:31 +00:00
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>
This commit is contained in:
parent
683abfbefe
commit
92445c953e
@ -1857,8 +1857,7 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
|
|||||||
|
|
||||||
mutex_lock(&priv->mutex);
|
mutex_lock(&priv->mutex);
|
||||||
|
|
||||||
if (changes & BSS_CHANGED_BEACON &&
|
if (changes & BSS_CHANGED_BEACON && vif->type == NL80211_IFTYPE_AP) {
|
||||||
priv->iw_mode == NL80211_IFTYPE_AP) {
|
|
||||||
dev_kfree_skb(priv->ibss_beacon);
|
dev_kfree_skb(priv->ibss_beacon);
|
||||||
priv->ibss_beacon = ieee80211_beacon_get(hw, vif);
|
priv->ibss_beacon = ieee80211_beacon_get(hw, vif);
|
||||||
}
|
}
|
||||||
@ -1884,8 +1883,7 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* mac80211 only sets assoc when in STATION mode */
|
/* mac80211 only sets assoc when in STATION mode */
|
||||||
if (priv->iw_mode == NL80211_IFTYPE_ADHOC ||
|
if (vif->type == NL80211_IFTYPE_ADHOC || bss_conf->assoc) {
|
||||||
bss_conf->assoc) {
|
|
||||||
memcpy(priv->staging_rxon.bssid_addr,
|
memcpy(priv->staging_rxon.bssid_addr,
|
||||||
bss_conf->bssid, ETH_ALEN);
|
bss_conf->bssid, ETH_ALEN);
|
||||||
|
|
||||||
@ -1903,7 +1901,7 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
|
|||||||
* mac80211 decides to do both changes at once because
|
* mac80211 decides to do both changes at once because
|
||||||
* it will invoke post_associate.
|
* it will invoke post_associate.
|
||||||
*/
|
*/
|
||||||
if (priv->iw_mode == NL80211_IFTYPE_ADHOC &&
|
if (vif->type == NL80211_IFTYPE_ADHOC &&
|
||||||
changes & BSS_CHANGED_BEACON) {
|
changes & BSS_CHANGED_BEACON) {
|
||||||
struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
|
struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user