iwlwifi: dvm: apply beacon changes immediately
authorJohannes Berg <johannes.berg@intel.com>
Fri, 8 Feb 2013 22:13:39 +0000 (23:13 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 12 Feb 2013 15:52:25 +0000 (16:52 +0100)
If the AP/GO beacon changes, apply such a change
immediately, otherwise the AP/GO beacon can be
stale for a long time.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/dvm/rxon.c

index 9fabd26997ca937a200047f84311718c41dc7be4..23be948cf16220828e1b3bcbceeb5aff31ced74b 100644 (file)
@@ -1545,10 +1545,9 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
                                bss_conf->bssid);
        }
 
-       if (changes & BSS_CHANGED_BEACON && vif->type == NL80211_IFTYPE_ADHOC &&
-           priv->beacon_ctx) {
+       if (changes & BSS_CHANGED_BEACON && priv->beacon_ctx == ctx) {
                if (iwlagn_update_beacon(priv, vif))
-                       IWL_ERR(priv, "Error sending IBSS beacon\n");
+                       IWL_ERR(priv, "Error updating beacon\n");
        }
 
        mutex_unlock(&priv->mutex);