diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 |
6 files changed, 25 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 905575c840cc..ba3a9f9d519e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -1832,8 +1832,9 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv, | |||
1832 | "configuration (%d).\n", rc); | 1832 | "configuration (%d).\n", rc); |
1833 | return rc; | 1833 | return rc; |
1834 | } | 1834 | } |
1835 | iwl_clear_ucode_stations(priv); | 1835 | iwl_clear_ucode_stations(priv, |
1836 | iwl_restore_stations(priv); | 1836 | &priv->contexts[IWL_RXON_CTX_BSS]); |
1837 | iwl_restore_stations(priv, &priv->contexts[IWL_RXON_CTX_BSS]); | ||
1837 | } | 1838 | } |
1838 | 1839 | ||
1839 | IWL_DEBUG_INFO(priv, "Sending RXON\n" | 1840 | IWL_DEBUG_INFO(priv, "Sending RXON\n" |
@@ -1865,8 +1866,9 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv, | |||
1865 | memcpy(active_rxon, staging_rxon, sizeof(*active_rxon)); | 1866 | memcpy(active_rxon, staging_rxon, sizeof(*active_rxon)); |
1866 | 1867 | ||
1867 | if (!new_assoc) { | 1868 | if (!new_assoc) { |
1868 | iwl_clear_ucode_stations(priv); | 1869 | iwl_clear_ucode_stations(priv, |
1869 | iwl_restore_stations(priv); | 1870 | &priv->contexts[IWL_RXON_CTX_BSS]); |
1871 | iwl_restore_stations(priv, &priv->contexts[IWL_RXON_CTX_BSS]); | ||
1870 | } | 1872 | } |
1871 | 1873 | ||
1872 | /* If we issue a new RXON command which required a tune then we must | 1874 | /* If we issue a new RXON command which required a tune then we must |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index d2222782f46c..23db6c3e9aee 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -163,8 +163,8 @@ int iwl_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
163 | IWL_ERR(priv, "Error clearing ASSOC_MSK (%d)\n", ret); | 163 | IWL_ERR(priv, "Error clearing ASSOC_MSK (%d)\n", ret); |
164 | return ret; | 164 | return ret; |
165 | } | 165 | } |
166 | iwl_clear_ucode_stations(priv); | 166 | iwl_clear_ucode_stations(priv, ctx); |
167 | iwl_restore_stations(priv); | 167 | iwl_restore_stations(priv, ctx); |
168 | ret = iwl_restore_default_wep_keys(priv); | 168 | ret = iwl_restore_default_wep_keys(priv); |
169 | if (ret) { | 169 | if (ret) { |
170 | IWL_ERR(priv, "Failed to restore WEP keys (%d)\n", ret); | 170 | IWL_ERR(priv, "Failed to restore WEP keys (%d)\n", ret); |
@@ -195,8 +195,8 @@ int iwl_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
195 | } | 195 | } |
196 | IWL_DEBUG_INFO(priv, "Return from !new_assoc RXON.\n"); | 196 | IWL_DEBUG_INFO(priv, "Return from !new_assoc RXON.\n"); |
197 | memcpy(active_rxon, &ctx->staging, sizeof(*active_rxon)); | 197 | memcpy(active_rxon, &ctx->staging, sizeof(*active_rxon)); |
198 | iwl_clear_ucode_stations(priv); | 198 | iwl_clear_ucode_stations(priv, ctx); |
199 | iwl_restore_stations(priv); | 199 | iwl_restore_stations(priv, ctx); |
200 | ret = iwl_restore_default_wep_keys(priv); | 200 | ret = iwl_restore_default_wep_keys(priv); |
201 | if (ret) { | 201 | if (ret) { |
202 | IWL_ERR(priv, "Failed to restore WEP keys (%d)\n", ret); | 202 | IWL_ERR(priv, "Failed to restore WEP keys (%d)\n", ret); |
@@ -2830,7 +2830,7 @@ static void __iwl_down(struct iwl_priv *priv) | |||
2830 | if (priv->cfg->ops->lib->recover_from_tx_stall) | 2830 | if (priv->cfg->ops->lib->recover_from_tx_stall) |
2831 | del_timer_sync(&priv->monitor_recover); | 2831 | del_timer_sync(&priv->monitor_recover); |
2832 | 2832 | ||
2833 | iwl_clear_ucode_stations(priv); | 2833 | iwl_clear_ucode_stations(priv, NULL); |
2834 | iwl_dealloc_bcast_stations(priv); | 2834 | iwl_dealloc_bcast_stations(priv); |
2835 | iwl_clear_driver_stations(priv); | 2835 | iwl_clear_driver_stations(priv); |
2836 | 2836 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index f51c07c078cc..da54bd53c99d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -495,7 +495,7 @@ struct iwl_qos_info { | |||
495 | struct iwl_station_entry { | 495 | struct iwl_station_entry { |
496 | struct iwl_addsta_cmd sta; | 496 | struct iwl_addsta_cmd sta; |
497 | struct iwl_tid_data tid[MAX_TID_COUNT]; | 497 | struct iwl_tid_data tid[MAX_TID_COUNT]; |
498 | u8 used; | 498 | u8 used, ctxid; |
499 | struct iwl_hw_key keyinfo; | 499 | struct iwl_hw_key keyinfo; |
500 | struct iwl_link_quality_cmd *lq; | 500 | struct iwl_link_quality_cmd *lq; |
501 | }; | 501 | }; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index b1275e34520d..29235626ac0b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -290,6 +290,7 @@ static u8 iwl_prep_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx, | |||
290 | station->sta.mode = 0; | 290 | station->sta.mode = 0; |
291 | station->sta.sta.sta_id = sta_id; | 291 | station->sta.sta.sta_id = sta_id; |
292 | station->sta.station_flags = 0; | 292 | station->sta.station_flags = 0; |
293 | station->ctxid = ctx->ctxid; | ||
293 | 294 | ||
294 | /* | 295 | /* |
295 | * OK to call unconditionally, since local stations (IBSS BSSID | 296 | * OK to call unconditionally, since local stations (IBSS BSSID |
@@ -615,7 +616,8 @@ EXPORT_SYMBOL_GPL(iwl_remove_station); | |||
615 | * other than explicit station management would cause this in | 616 | * other than explicit station management would cause this in |
616 | * the ucode, e.g. unassociated RXON. | 617 | * the ucode, e.g. unassociated RXON. |
617 | */ | 618 | */ |
618 | void iwl_clear_ucode_stations(struct iwl_priv *priv) | 619 | void iwl_clear_ucode_stations(struct iwl_priv *priv, |
620 | struct iwl_rxon_context *ctx) | ||
619 | { | 621 | { |
620 | int i; | 622 | int i; |
621 | unsigned long flags_spin; | 623 | unsigned long flags_spin; |
@@ -625,6 +627,9 @@ void iwl_clear_ucode_stations(struct iwl_priv *priv) | |||
625 | 627 | ||
626 | spin_lock_irqsave(&priv->sta_lock, flags_spin); | 628 | spin_lock_irqsave(&priv->sta_lock, flags_spin); |
627 | for (i = 0; i < priv->hw_params.max_stations; i++) { | 629 | for (i = 0; i < priv->hw_params.max_stations; i++) { |
630 | if (ctx && ctx->ctxid != priv->stations[i].ctxid) | ||
631 | continue; | ||
632 | |||
628 | if (priv->stations[i].used & IWL_STA_UCODE_ACTIVE) { | 633 | if (priv->stations[i].used & IWL_STA_UCODE_ACTIVE) { |
629 | IWL_DEBUG_INFO(priv, "Clearing ucode active for station %d\n", i); | 634 | IWL_DEBUG_INFO(priv, "Clearing ucode active for station %d\n", i); |
630 | priv->stations[i].used &= ~IWL_STA_UCODE_ACTIVE; | 635 | priv->stations[i].used &= ~IWL_STA_UCODE_ACTIVE; |
@@ -646,7 +651,7 @@ EXPORT_SYMBOL(iwl_clear_ucode_stations); | |||
646 | * | 651 | * |
647 | * Function sleeps. | 652 | * Function sleeps. |
648 | */ | 653 | */ |
649 | void iwl_restore_stations(struct iwl_priv *priv) | 654 | void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx) |
650 | { | 655 | { |
651 | struct iwl_addsta_cmd sta_cmd; | 656 | struct iwl_addsta_cmd sta_cmd; |
652 | struct iwl_link_quality_cmd lq; | 657 | struct iwl_link_quality_cmd lq; |
@@ -664,6 +669,8 @@ void iwl_restore_stations(struct iwl_priv *priv) | |||
664 | IWL_DEBUG_ASSOC(priv, "Restoring all known stations ... start.\n"); | 669 | IWL_DEBUG_ASSOC(priv, "Restoring all known stations ... start.\n"); |
665 | spin_lock_irqsave(&priv->sta_lock, flags_spin); | 670 | spin_lock_irqsave(&priv->sta_lock, flags_spin); |
666 | for (i = 0; i < priv->hw_params.max_stations; i++) { | 671 | for (i = 0; i < priv->hw_params.max_stations; i++) { |
672 | if (ctx->ctxid != priv->stations[i].ctxid) | ||
673 | continue; | ||
667 | if ((priv->stations[i].used & IWL_STA_DRIVER_ACTIVE) && | 674 | if ((priv->stations[i].used & IWL_STA_DRIVER_ACTIVE) && |
668 | !(priv->stations[i].used & IWL_STA_UCODE_ACTIVE)) { | 675 | !(priv->stations[i].used & IWL_STA_UCODE_ACTIVE)) { |
669 | IWL_DEBUG_ASSOC(priv, "Restoring sta %pM\n", | 676 | IWL_DEBUG_ASSOC(priv, "Restoring sta %pM\n", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.h b/drivers/net/wireless/iwlwifi/iwl-sta.h index 8a978c6e105f..269a3ed0f3fb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.h +++ b/drivers/net/wireless/iwlwifi/iwl-sta.h | |||
@@ -57,8 +57,9 @@ void iwl_update_tkip_key(struct iwl_priv *priv, | |||
57 | struct ieee80211_key_conf *keyconf, | 57 | struct ieee80211_key_conf *keyconf, |
58 | struct ieee80211_sta *sta, u32 iv32, u16 *phase1key); | 58 | struct ieee80211_sta *sta, u32 iv32, u16 *phase1key); |
59 | 59 | ||
60 | void iwl_restore_stations(struct iwl_priv *priv); | 60 | void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx); |
61 | void iwl_clear_ucode_stations(struct iwl_priv *priv); | 61 | void iwl_clear_ucode_stations(struct iwl_priv *priv, |
62 | struct iwl_rxon_context *ctx); | ||
62 | int iwl_alloc_bcast_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx, | 63 | int iwl_alloc_bcast_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx, |
63 | bool init_lq); | 64 | bool init_lq); |
64 | void iwl_dealloc_bcast_stations(struct iwl_priv *priv); | 65 | void iwl_dealloc_bcast_stations(struct iwl_priv *priv); |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 8b0763264141..630b8d641720 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -2581,7 +2581,7 @@ static void __iwl3945_down(struct iwl_priv *priv) | |||
2581 | del_timer_sync(&priv->monitor_recover); | 2581 | del_timer_sync(&priv->monitor_recover); |
2582 | 2582 | ||
2583 | /* Station information will now be cleared in device */ | 2583 | /* Station information will now be cleared in device */ |
2584 | iwl_clear_ucode_stations(priv); | 2584 | iwl_clear_ucode_stations(priv, NULL); |
2585 | iwl_dealloc_bcast_stations(priv); | 2585 | iwl_dealloc_bcast_stations(priv); |
2586 | iwl_clear_driver_stations(priv); | 2586 | iwl_clear_driver_stations(priv); |
2587 | 2587 | ||