diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2010-07-11 06:24:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-12 16:05:33 -0400 |
commit | d8147f9d9ed6abfa105234a21f05af4a4839eb80 (patch) | |
tree | 5e00a39ec607af756696ded2bcb01b7c1f8f0725 /drivers/net/wireless/rt2x00/rt2x00mac.c | |
parent | 27df2a9ce9ea6a77b9959cf5cc03ee85324aced9 (diff) |
rt2x00: Disable link tuning while scanning
While scanning the link tuner must be disabled. Otherwise
it will interfere with receiving all beacons for each channel
due to changing sensitivity levels.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 3b838c0bf59f..bbce496bc182 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -347,9 +347,11 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed) | |||
347 | /* | 347 | /* |
348 | * Some configuration parameters (e.g. channel and antenna values) can | 348 | * Some configuration parameters (e.g. channel and antenna values) can |
349 | * only be set when the radio is enabled, but do require the RX to | 349 | * only be set when the radio is enabled, but do require the RX to |
350 | * be off. | 350 | * be off. During this period we should keep link tuning enabled, |
351 | * if for any reason the link tuner must be reset, this will be | ||
352 | * handled by rt2x00lib_config(). | ||
351 | */ | 353 | */ |
352 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF); | 354 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF_LINK); |
353 | 355 | ||
354 | /* | 356 | /* |
355 | * When we've just turned on the radio, we want to reprogram | 357 | * When we've just turned on the radio, we want to reprogram |
@@ -367,7 +369,7 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed) | |||
367 | rt2x00lib_config_antenna(rt2x00dev, rt2x00dev->default_ant); | 369 | rt2x00lib_config_antenna(rt2x00dev, rt2x00dev->default_ant); |
368 | 370 | ||
369 | /* Turn RX back on */ | 371 | /* Turn RX back on */ |
370 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON); | 372 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON_LINK); |
371 | 373 | ||
372 | return 0; | 374 | return 0; |
373 | } | 375 | } |
@@ -540,6 +542,22 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
540 | EXPORT_SYMBOL_GPL(rt2x00mac_set_key); | 542 | EXPORT_SYMBOL_GPL(rt2x00mac_set_key); |
541 | #endif /* CONFIG_RT2X00_LIB_CRYPTO */ | 543 | #endif /* CONFIG_RT2X00_LIB_CRYPTO */ |
542 | 544 | ||
545 | void rt2x00mac_sw_scan_start(struct ieee80211_hw *hw) | ||
546 | { | ||
547 | struct rt2x00_dev *rt2x00dev = hw->priv; | ||
548 | __set_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags); | ||
549 | rt2x00link_stop_tuner(rt2x00dev); | ||
550 | } | ||
551 | EXPORT_SYMBOL_GPL(rt2x00mac_sw_scan_start); | ||
552 | |||
553 | void rt2x00mac_sw_scan_complete(struct ieee80211_hw *hw) | ||
554 | { | ||
555 | struct rt2x00_dev *rt2x00dev = hw->priv; | ||
556 | __clear_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags); | ||
557 | rt2x00link_start_tuner(rt2x00dev); | ||
558 | } | ||
559 | EXPORT_SYMBOL_GPL(rt2x00mac_sw_scan_complete); | ||
560 | |||
543 | int rt2x00mac_get_stats(struct ieee80211_hw *hw, | 561 | int rt2x00mac_get_stats(struct ieee80211_hw *hw, |
544 | struct ieee80211_low_level_stats *stats) | 562 | struct ieee80211_low_level_stats *stats) |
545 | { | 563 | { |