diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-23 04:46:32 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-08-27 11:26:47 -0400 |
commit | 246ed355221076884d225f9d8a4c30a048be8162 (patch) | |
tree | 64bba3b115c6f0d7ba245c44b81c38e46adec6c8 /drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | |
parent | 903786a5626e7214d97b232bece88ee75e37d021 (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-hcmd.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c index 84fe06adcef4..3e5069943dde 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | |||
@@ -37,12 +37,13 @@ | |||
37 | #include "iwl-io.h" | 37 | #include "iwl-io.h" |
38 | #include "iwl-agn.h" | 38 | #include "iwl-agn.h" |
39 | 39 | ||
40 | int iwlagn_send_rxon_assoc(struct iwl_priv *priv) | 40 | int iwlagn_send_rxon_assoc(struct iwl_priv *priv, |
41 | struct iwl_rxon_context *ctx) | ||
41 | { | 42 | { |
42 | int ret = 0; | 43 | int ret = 0; |
43 | struct iwl5000_rxon_assoc_cmd rxon_assoc; | 44 | struct iwl5000_rxon_assoc_cmd rxon_assoc; |
44 | const struct iwl_rxon_cmd *rxon1 = &priv->staging_rxon; | 45 | const struct iwl_rxon_cmd *rxon1 = &ctx->staging; |
45 | const struct iwl_rxon_cmd *rxon2 = &priv->active_rxon; | 46 | const struct iwl_rxon_cmd *rxon2 = &ctx->active; |
46 | 47 | ||
47 | if ((rxon1->flags == rxon2->flags) && | 48 | if ((rxon1->flags == rxon2->flags) && |
48 | (rxon1->filter_flags == rxon2->filter_flags) && | 49 | (rxon1->filter_flags == rxon2->filter_flags) && |
@@ -60,21 +61,21 @@ int iwlagn_send_rxon_assoc(struct iwl_priv *priv) | |||
60 | return 0; | 61 | return 0; |
61 | } | 62 | } |
62 | 63 | ||
63 | rxon_assoc.flags = priv->staging_rxon.flags; | 64 | rxon_assoc.flags = ctx->staging.flags; |
64 | rxon_assoc.filter_flags = priv->staging_rxon.filter_flags; | 65 | rxon_assoc.filter_flags = ctx->staging.filter_flags; |
65 | rxon_assoc.ofdm_basic_rates = priv->staging_rxon.ofdm_basic_rates; | 66 | rxon_assoc.ofdm_basic_rates = ctx->staging.ofdm_basic_rates; |
66 | rxon_assoc.cck_basic_rates = priv->staging_rxon.cck_basic_rates; | 67 | rxon_assoc.cck_basic_rates = ctx->staging.cck_basic_rates; |
67 | rxon_assoc.reserved1 = 0; | 68 | rxon_assoc.reserved1 = 0; |
68 | rxon_assoc.reserved2 = 0; | 69 | rxon_assoc.reserved2 = 0; |
69 | rxon_assoc.reserved3 = 0; | 70 | rxon_assoc.reserved3 = 0; |
70 | rxon_assoc.ofdm_ht_single_stream_basic_rates = | 71 | rxon_assoc.ofdm_ht_single_stream_basic_rates = |
71 | priv->staging_rxon.ofdm_ht_single_stream_basic_rates; | 72 | ctx->staging.ofdm_ht_single_stream_basic_rates; |
72 | rxon_assoc.ofdm_ht_dual_stream_basic_rates = | 73 | rxon_assoc.ofdm_ht_dual_stream_basic_rates = |
73 | priv->staging_rxon.ofdm_ht_dual_stream_basic_rates; | 74 | ctx->staging.ofdm_ht_dual_stream_basic_rates; |
74 | rxon_assoc.rx_chain_select_flags = priv->staging_rxon.rx_chain; | 75 | rxon_assoc.rx_chain_select_flags = ctx->staging.rx_chain; |
75 | rxon_assoc.ofdm_ht_triple_stream_basic_rates = | 76 | rxon_assoc.ofdm_ht_triple_stream_basic_rates = |
76 | priv->staging_rxon.ofdm_ht_triple_stream_basic_rates; | 77 | ctx->staging.ofdm_ht_triple_stream_basic_rates; |
77 | rxon_assoc.acquisition_data = priv->staging_rxon.acquisition_data; | 78 | rxon_assoc.acquisition_data = ctx->staging.acquisition_data; |
78 | 79 | ||
79 | ret = iwl_send_cmd_pdu_async(priv, REPLY_RXON_ASSOC, | 80 | ret = iwl_send_cmd_pdu_async(priv, REPLY_RXON_ASSOC, |
80 | sizeof(rxon_assoc), &rxon_assoc, NULL); | 81 | sizeof(rxon_assoc), &rxon_assoc, NULL); |
@@ -184,7 +185,7 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv) | |||
184 | int ret; | 185 | int ret; |
185 | 186 | ||
186 | if ((data->state == IWL_CHAIN_NOISE_ALIVE) && | 187 | if ((data->state == IWL_CHAIN_NOISE_ALIVE) && |
187 | iwl_is_associated(priv)) { | 188 | iwl_is_any_associated(priv)) { |
188 | struct iwl_calib_chain_noise_reset_cmd cmd; | 189 | struct iwl_calib_chain_noise_reset_cmd cmd; |
189 | 190 | ||
190 | /* clear data for chain noise calibration algorithm */ | 191 | /* clear data for chain noise calibration algorithm */ |