diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 48bdcd8d2e94..21b4b23368e6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -180,7 +180,7 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv) | |||
180 | sizeof(struct iwlagn_scd_bc_tbl); | 180 | sizeof(struct iwlagn_scd_bc_tbl); |
181 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); | 181 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
182 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; | 182 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; |
183 | priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID; | 183 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; |
184 | 184 | ||
185 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; | 185 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; |
186 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; | 186 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; |
@@ -227,7 +227,7 @@ static int iwl5150_hw_set_hw_params(struct iwl_priv *priv) | |||
227 | sizeof(struct iwlagn_scd_bc_tbl); | 227 | sizeof(struct iwlagn_scd_bc_tbl); |
228 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); | 228 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
229 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; | 229 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; |
230 | priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID; | 230 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; |
231 | 231 | ||
232 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; | 232 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; |
233 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; | 233 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; |
@@ -275,14 +275,19 @@ 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 = ctx->vif; |
286 | struct iwl_host_cmd hcmd = { | 291 | struct iwl_host_cmd hcmd = { |
287 | .id = REPLY_CHANNEL_SWITCH, | 292 | .id = REPLY_CHANNEL_SWITCH, |
288 | .len = sizeof(cmd), | 293 | .len = sizeof(cmd), |
@@ -291,12 +296,12 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, | |||
291 | }; | 296 | }; |
292 | 297 | ||
293 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; | 298 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; |
294 | ch = ieee80211_frequency_to_channel(ch_switch->channel->center_freq); | 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; |
@@ -393,18 +398,24 @@ static struct iwl_lib_ops iwl5000_lib = { | |||
393 | .set_ct_kill = iwl5000_set_ct_threshold, | 398 | .set_ct_kill = iwl5000_set_ct_threshold, |
394 | }, | 399 | }, |
395 | .manage_ibss_station = iwlagn_manage_ibss_station, | 400 | .manage_ibss_station = iwlagn_manage_ibss_station, |
396 | .update_bcast_station = iwl_update_bcast_station, | 401 | .update_bcast_stations = iwl_update_bcast_stations, |
397 | .debugfs_ops = { | 402 | .debugfs_ops = { |
398 | .rx_stats_read = iwl_ucode_rx_stats_read, | 403 | .rx_stats_read = iwl_ucode_rx_stats_read, |
399 | .tx_stats_read = iwl_ucode_tx_stats_read, | 404 | .tx_stats_read = iwl_ucode_tx_stats_read, |
400 | .general_stats_read = iwl_ucode_general_stats_read, | 405 | .general_stats_read = iwl_ucode_general_stats_read, |
401 | .bt_stats_read = iwl_ucode_bt_stats_read, | 406 | .bt_stats_read = iwl_ucode_bt_stats_read, |
407 | .reply_tx_error = iwl_reply_tx_error_read, | ||
402 | }, | 408 | }, |
403 | .recover_from_tx_stall = iwl_bg_monitor_recover, | 409 | .recover_from_tx_stall = iwl_bg_monitor_recover, |
404 | .check_plcp_health = iwl_good_plcp_health, | 410 | .check_plcp_health = iwl_good_plcp_health, |
405 | .check_ack_health = iwl_good_ack_health, | 411 | .check_ack_health = iwl_good_ack_health, |
406 | .txfifo_flush = iwlagn_txfifo_flush, | 412 | .txfifo_flush = iwlagn_txfifo_flush, |
407 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, | 413 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, |
414 | .tt_ops = { | ||
415 | .lower_power_detection = iwl_tt_is_low_power_state, | ||
416 | .tt_power_mode = iwl_tt_current_power_mode, | ||
417 | .ct_kill_check = iwl_check_for_ct_kill, | ||
418 | } | ||
408 | }; | 419 | }; |
409 | 420 | ||
410 | static struct iwl_lib_ops iwl5150_lib = { | 421 | static struct iwl_lib_ops iwl5150_lib = { |
@@ -459,17 +470,24 @@ static struct iwl_lib_ops iwl5150_lib = { | |||
459 | .set_ct_kill = iwl5150_set_ct_threshold, | 470 | .set_ct_kill = iwl5150_set_ct_threshold, |
460 | }, | 471 | }, |
461 | .manage_ibss_station = iwlagn_manage_ibss_station, | 472 | .manage_ibss_station = iwlagn_manage_ibss_station, |
462 | .update_bcast_station = iwl_update_bcast_station, | 473 | .update_bcast_stations = iwl_update_bcast_stations, |
463 | .debugfs_ops = { | 474 | .debugfs_ops = { |
464 | .rx_stats_read = iwl_ucode_rx_stats_read, | 475 | .rx_stats_read = iwl_ucode_rx_stats_read, |
465 | .tx_stats_read = iwl_ucode_tx_stats_read, | 476 | .tx_stats_read = iwl_ucode_tx_stats_read, |
466 | .general_stats_read = iwl_ucode_general_stats_read, | 477 | .general_stats_read = iwl_ucode_general_stats_read, |
478 | .bt_stats_read = iwl_ucode_bt_stats_read, | ||
479 | .reply_tx_error = iwl_reply_tx_error_read, | ||
467 | }, | 480 | }, |
468 | .recover_from_tx_stall = iwl_bg_monitor_recover, | 481 | .recover_from_tx_stall = iwl_bg_monitor_recover, |
469 | .check_plcp_health = iwl_good_plcp_health, | 482 | .check_plcp_health = iwl_good_plcp_health, |
470 | .check_ack_health = iwl_good_ack_health, | 483 | .check_ack_health = iwl_good_ack_health, |
471 | .txfifo_flush = iwlagn_txfifo_flush, | 484 | .txfifo_flush = iwlagn_txfifo_flush, |
472 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, | 485 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, |
486 | .tt_ops = { | ||
487 | .lower_power_detection = iwl_tt_is_low_power_state, | ||
488 | .tt_power_mode = iwl_tt_current_power_mode, | ||
489 | .ct_kill_check = iwl_check_for_ct_kill, | ||
490 | } | ||
473 | }; | 491 | }; |
474 | 492 | ||
475 | static const struct iwl_ops iwl5000_ops = { | 493 | static const struct iwl_ops iwl5000_ops = { |