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-5000.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-5000.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 013f3dae69f1..8536f19d7dcc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -275,13 +275,18 @@ static void iwl5150_temperature(struct iwl_priv *priv) | |||
275 | static int iwl5000_hw_channel_switch(struct iwl_priv *priv, | 275 | static int iwl5000_hw_channel_switch(struct iwl_priv *priv, |
276 | struct ieee80211_channel_switch *ch_switch) | 276 | struct ieee80211_channel_switch *ch_switch) |
277 | { | 277 | { |
278 | /* | ||
279 | * MULTI-FIXME | ||
280 | * See iwl_mac_channel_switch. | ||
281 | */ | ||
282 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; | ||
278 | struct iwl5000_channel_switch_cmd cmd; | 283 | struct iwl5000_channel_switch_cmd cmd; |
279 | const struct iwl_channel_info *ch_info; | 284 | const struct iwl_channel_info *ch_info; |
280 | u32 switch_time_in_usec, ucode_switch_time; | 285 | u32 switch_time_in_usec, ucode_switch_time; |
281 | u16 ch; | 286 | u16 ch; |
282 | u32 tsf_low; | 287 | u32 tsf_low; |
283 | u8 switch_count; | 288 | u8 switch_count; |
284 | u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval); | 289 | u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval); |
285 | struct ieee80211_vif *vif = priv->vif; | 290 | struct ieee80211_vif *vif = priv->vif; |
286 | struct iwl_host_cmd hcmd = { | 291 | struct iwl_host_cmd hcmd = { |
287 | .id = REPLY_CHANNEL_SWITCH, | 292 | .id = REPLY_CHANNEL_SWITCH, |
@@ -293,10 +298,10 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, | |||
293 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; | 298 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; |
294 | ch = ch_switch->channel->hw_value; | 299 | ch = ch_switch->channel->hw_value; |
295 | IWL_DEBUG_11H(priv, "channel switch from %d to %d\n", | 300 | IWL_DEBUG_11H(priv, "channel switch from %d to %d\n", |
296 | priv->active_rxon.channel, ch); | 301 | ctx->active.channel, ch); |
297 | cmd.channel = cpu_to_le16(ch); | 302 | cmd.channel = cpu_to_le16(ch); |
298 | cmd.rxon_flags = priv->staging_rxon.flags; | 303 | cmd.rxon_flags = ctx->staging.flags; |
299 | cmd.rxon_filter_flags = priv->staging_rxon.filter_flags; | 304 | cmd.rxon_filter_flags = ctx->staging.filter_flags; |
300 | switch_count = ch_switch->count; | 305 | switch_count = ch_switch->count; |
301 | tsf_low = ch_switch->timestamp & 0x0ffffffff; | 306 | tsf_low = ch_switch->timestamp & 0x0ffffffff; |
302 | /* | 307 | /* |
@@ -331,7 +336,7 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, | |||
331 | cmd.expect_beacon = is_channel_radar(ch_info); | 336 | cmd.expect_beacon = is_channel_radar(ch_info); |
332 | else { | 337 | else { |
333 | IWL_ERR(priv, "invalid channel switch from %u to %u\n", | 338 | IWL_ERR(priv, "invalid channel switch from %u to %u\n", |
334 | priv->active_rxon.channel, ch); | 339 | ctx->active.channel, ch); |
335 | return -EFAULT; | 340 | return -EFAULT; |
336 | } | 341 | } |
337 | priv->switch_rxon.channel = cmd.channel; | 342 | priv->switch_rxon.channel = cmd.channel; |