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-6000.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-6000.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index fc9344b873ba..bf1fe25fae73 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -198,13 +198,18 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | |||
198 | static int iwl6000_hw_channel_switch(struct iwl_priv *priv, | 198 | static int iwl6000_hw_channel_switch(struct iwl_priv *priv, |
199 | struct ieee80211_channel_switch *ch_switch) | 199 | struct ieee80211_channel_switch *ch_switch) |
200 | { | 200 | { |
201 | /* | ||
202 | * MULTI-FIXME | ||
203 | * See iwl_mac_channel_switch. | ||
204 | */ | ||
205 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; | ||
201 | struct iwl6000_channel_switch_cmd cmd; | 206 | struct iwl6000_channel_switch_cmd cmd; |
202 | const struct iwl_channel_info *ch_info; | 207 | const struct iwl_channel_info *ch_info; |
203 | u32 switch_time_in_usec, ucode_switch_time; | 208 | u32 switch_time_in_usec, ucode_switch_time; |
204 | u16 ch; | 209 | u16 ch; |
205 | u32 tsf_low; | 210 | u32 tsf_low; |
206 | u8 switch_count; | 211 | u8 switch_count; |
207 | u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval); | 212 | u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval); |
208 | struct ieee80211_vif *vif = priv->vif; | 213 | struct ieee80211_vif *vif = priv->vif; |
209 | struct iwl_host_cmd hcmd = { | 214 | struct iwl_host_cmd hcmd = { |
210 | .id = REPLY_CHANNEL_SWITCH, | 215 | .id = REPLY_CHANNEL_SWITCH, |
@@ -216,10 +221,10 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, | |||
216 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; | 221 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; |
217 | ch = ch_switch->channel->hw_value; | 222 | ch = ch_switch->channel->hw_value; |
218 | IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", | 223 | IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", |
219 | priv->active_rxon.channel, ch); | 224 | ctx->active.channel, ch); |
220 | cmd.channel = cpu_to_le16(ch); | 225 | cmd.channel = cpu_to_le16(ch); |
221 | cmd.rxon_flags = priv->staging_rxon.flags; | 226 | cmd.rxon_flags = ctx->staging.flags; |
222 | cmd.rxon_filter_flags = priv->staging_rxon.filter_flags; | 227 | cmd.rxon_filter_flags = ctx->staging.filter_flags; |
223 | switch_count = ch_switch->count; | 228 | switch_count = ch_switch->count; |
224 | tsf_low = ch_switch->timestamp & 0x0ffffffff; | 229 | tsf_low = ch_switch->timestamp & 0x0ffffffff; |
225 | /* | 230 | /* |
@@ -254,7 +259,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, | |||
254 | cmd.expect_beacon = is_channel_radar(ch_info); | 259 | cmd.expect_beacon = is_channel_radar(ch_info); |
255 | else { | 260 | else { |
256 | IWL_ERR(priv, "invalid channel switch from %u to %u\n", | 261 | IWL_ERR(priv, "invalid channel switch from %u to %u\n", |
257 | priv->active_rxon.channel, ch); | 262 | ctx->active.channel, ch); |
258 | return -EFAULT; | 263 | return -EFAULT; |
259 | } | 264 | } |
260 | priv->switch_rxon.channel = cmd.channel; | 265 | priv->switch_rxon.channel = cmd.channel; |