aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-07 12:52:42 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-08 14:02:29 -0500
commit974205153be8944539890084a170e3ad407164bc (patch)
tree4b8da67657cf324b998ef5ced44c894189e14092 /drivers/net/wireless/iwlwifi/iwl-agn-sta.c
parente6dd5838acf312516fcc4eb34516de5bc45e2980 (diff)
iwlwifi: don't delete AP station directly
With the mac80211 deauth sequence changes, the station is deleted before the device is set unassociated. This can cause the device to get confused as it expects the station to be there while the associated bit is set. To fix this, do not delete the AP station from the device when mac80211 asks for deletion, instead just mark it as unused and rely on the unassociated RXON to drop it from the station database in the device. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-sta.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-sta.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index 23e9eab477bb..c4175603864b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -546,6 +546,41 @@ out_err:
546 return -EINVAL; 546 return -EINVAL;
547} 547}
548 548
549void iwl_deactivate_station(struct iwl_priv *priv, const u8 sta_id,
550 const u8 *addr)
551{
552 u8 tid;
553
554 if (!iwl_is_ready(priv)) {
555 IWL_DEBUG_INFO(priv,
556 "Unable to remove station %pM, device not ready.\n",
557 addr);
558 return;
559 }
560
561 IWL_DEBUG_ASSOC(priv, "Deactivating STA: %pM (%d)\n", addr, sta_id);
562
563 if (WARN_ON_ONCE(sta_id == IWL_INVALID_STATION))
564 return;
565
566 spin_lock_bh(&priv->sta_lock);
567
568 WARN_ON_ONCE(!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE));
569
570 for (tid = 0; tid < IWL_MAX_TID_COUNT; tid++)
571 memset(&priv->tid_data[sta_id][tid], 0,
572 sizeof(priv->tid_data[sta_id][tid]));
573
574 priv->stations[sta_id].used &= ~IWL_STA_DRIVER_ACTIVE;
575
576 priv->num_stations--;
577
578 if (WARN_ON_ONCE(priv->num_stations < 0))
579 priv->num_stations = 0;
580
581 spin_unlock_bh(&priv->sta_lock);
582}
583
549/** 584/**
550 * iwl_clear_ucode_stations - clear ucode station table bits 585 * iwl_clear_ucode_stations - clear ucode station table bits
551 * 586 *