aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2010-01-08 13:04:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-08 15:49:31 -0500
commitc91c3efca5297bd67324654524ced38162f2e579 (patch)
tree23897fcef28bdc2794b0a973b1134eecff41973f /drivers
parentc8106d7625a58ee4387cb2efe3e82320ad44b467 (diff)
iwlwifi: disable tx on beacon update notification
On beacon change update notification from mac we are not disabling the tx in adhoc mode. Mac sends BSS_CHANGED_BEACON_ENABLED when station leaves IBSS. Driver should indicate uCode to not to send anything on receiving this notification. Functionality to indicate uCode is duplicated across two notifications so created a common function called iwl_set_no_assoc. Fix the issue at http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2133. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Tested-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c45
1 files changed, 25 insertions, 20 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 574d36658702..5461f105bd2d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2344,6 +2344,21 @@ static void iwl_ht_conf(struct iwl_priv *priv,
2344 IWL_DEBUG_MAC80211(priv, "leave\n"); 2344 IWL_DEBUG_MAC80211(priv, "leave\n");
2345} 2345}
2346 2346
2347static inline void iwl_set_no_assoc(struct iwl_priv *priv)
2348{
2349 priv->assoc_id = 0;
2350 iwl_led_disassociate(priv);
2351 /*
2352 * inform the ucode that there is no longer an
2353 * association and that no more packets should be
2354 * sent
2355 */
2356 priv->staging_rxon.filter_flags &=
2357 ~RXON_FILTER_ASSOC_MSK;
2358 priv->staging_rxon.assoc_id = 0;
2359 iwlcore_commit_rxon(priv);
2360}
2361
2347#define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) 2362#define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6)
2348void iwl_bss_info_changed(struct ieee80211_hw *hw, 2363void iwl_bss_info_changed(struct ieee80211_hw *hw,
2349 struct ieee80211_vif *vif, 2364 struct ieee80211_vif *vif,
@@ -2475,20 +2490,8 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
2475 IWL_DELAY_NEXT_SCAN_AFTER_ASSOC; 2490 IWL_DELAY_NEXT_SCAN_AFTER_ASSOC;
2476 if (!iwl_is_rfkill(priv)) 2491 if (!iwl_is_rfkill(priv))
2477 priv->cfg->ops->lib->post_associate(priv); 2492 priv->cfg->ops->lib->post_associate(priv);
2478 } else { 2493 } else
2479 priv->assoc_id = 0; 2494 iwl_set_no_assoc(priv);
2480 iwl_led_disassociate(priv);
2481
2482 /*
2483 * inform the ucode that there is no longer an
2484 * association and that no more packets should be
2485 * send
2486 */
2487 priv->staging_rxon.filter_flags &=
2488 ~RXON_FILTER_ASSOC_MSK;
2489 priv->staging_rxon.assoc_id = 0;
2490 iwlcore_commit_rxon(priv);
2491 }
2492 } 2495 }
2493 2496
2494 if (changes && iwl_is_associated(priv) && priv->assoc_id) { 2497 if (changes && iwl_is_associated(priv) && priv->assoc_id) {
@@ -2503,12 +2506,14 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
2503 } 2506 }
2504 } 2507 }
2505 2508
2506 if ((changes & BSS_CHANGED_BEACON_ENABLED) && 2509 if (changes & BSS_CHANGED_BEACON_ENABLED) {
2507 vif->bss_conf.enable_beacon) { 2510 if (vif->bss_conf.enable_beacon) {
2508 memcpy(priv->staging_rxon.bssid_addr, 2511 memcpy(priv->staging_rxon.bssid_addr,
2509 bss_conf->bssid, ETH_ALEN); 2512 bss_conf->bssid, ETH_ALEN);
2510 memcpy(priv->bssid, bss_conf->bssid, ETH_ALEN); 2513 memcpy(priv->bssid, bss_conf->bssid, ETH_ALEN);
2511 iwlcore_config_ap(priv); 2514 iwlcore_config_ap(priv);
2515 } else
2516 iwl_set_no_assoc(priv);
2512 } 2517 }
2513 2518
2514 mutex_unlock(&priv->mutex); 2519 mutex_unlock(&priv->mutex);