aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-08-23 04:46:32 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-08-27 11:26:47 -0400
commit246ed355221076884d225f9d8a4c30a048be8162 (patch)
tree64bba3b115c6f0d7ba245c44b81c38e46adec6c8 /drivers/net/wireless/iwlwifi/iwl-agn-tt.c
parent903786a5626e7214d97b232bece88ee75e37d021 (diff)
iwlwifi: initial contextification
In order to support multiple interfaces, we must move a lot of data into per-context structures so we can use the contexts the device offers. To start with, this makes a lot of code context-aware, more changes will move more things into the context structure. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tt.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tt.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
index 30298ea56a24..07b2c6cadf51 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
@@ -416,18 +416,26 @@ static void iwl_advance_tt_handler(struct iwl_priv *priv, s32 temp, bool force)
416 /* stop ct_kill_waiting_tm timer */ 416 /* stop ct_kill_waiting_tm timer */
417 del_timer_sync(&priv->thermal_throttle.ct_kill_waiting_tm); 417 del_timer_sync(&priv->thermal_throttle.ct_kill_waiting_tm);
418 if (changed) { 418 if (changed) {
419 struct iwl_rxon_cmd *rxon = &priv->staging_rxon;
420
421 if (tt->state >= IWL_TI_1) { 419 if (tt->state >= IWL_TI_1) {
422 /* force PI = IWL_POWER_INDEX_5 in the case of TI > 0 */ 420 /* force PI = IWL_POWER_INDEX_5 in the case of TI > 0 */
423 tt->tt_power_mode = IWL_POWER_INDEX_5; 421 tt->tt_power_mode = IWL_POWER_INDEX_5;
424 if (!iwl_ht_enabled(priv)) 422
425 /* disable HT */ 423 if (!iwl_ht_enabled(priv)) {
426 rxon->flags &= ~(RXON_FLG_CHANNEL_MODE_MSK | 424 struct iwl_rxon_context *ctx;
427 RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK | 425
428 RXON_FLG_HT40_PROT_MSK | 426 for_each_context(priv, ctx) {
429 RXON_FLG_HT_PROT_MSK); 427 struct iwl_rxon_cmd *rxon;
430 else { 428
429 rxon = &ctx->staging;
430
431 /* disable HT */
432 rxon->flags &= ~(
433 RXON_FLG_CHANNEL_MODE_MSK |
434 RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK |
435 RXON_FLG_HT40_PROT_MSK |
436 RXON_FLG_HT_PROT_MSK);
437 }
438 } else {
431 /* check HT capability and set 439 /* check HT capability and set
432 * according to the system HT capability 440 * according to the system HT capability
433 * in case get disabled before */ 441 * in case get disabled before */