aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00link.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2010-07-11 06:24:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-12 16:05:33 -0400
commitd8147f9d9ed6abfa105234a21f05af4a4839eb80 (patch)
tree5e00a39ec607af756696ded2bcb01b7c1f8f0725 /drivers/net/wireless/rt2x00/rt2x00link.c
parent27df2a9ce9ea6a77b9959cf5cc03ee85324aced9 (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/rt2x00link.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00link.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00link.c b/drivers/net/wireless/rt2x00/rt2x00link.c
index 801925bb157f..14f1d5126289 100644
--- a/drivers/net/wireless/rt2x00/rt2x00link.c
+++ b/drivers/net/wireless/rt2x00/rt2x00link.c
@@ -278,6 +278,15 @@ void rt2x00link_start_tuner(struct rt2x00_dev *rt2x00dev)
278 if (!rt2x00dev->intf_sta_count) 278 if (!rt2x00dev->intf_sta_count)
279 return; 279 return;
280 280
281 /**
282 * While scanning, link tuning is disabled. By default
283 * the most sensitive settings will be used to make sure
284 * that all beacons and probe responses will be recieved
285 * during the scan.
286 */
287 if (test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags))
288 return;
289
281 rt2x00link_reset_tuner(rt2x00dev, false); 290 rt2x00link_reset_tuner(rt2x00dev, false);
282 291
283 if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) 292 if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
@@ -338,7 +347,8 @@ static void rt2x00link_tuner(struct work_struct *work)
338 * When the radio is shutting down we should 347 * When the radio is shutting down we should
339 * immediately cease all link tuning. 348 * immediately cease all link tuning.
340 */ 349 */
341 if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) 350 if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags) ||
351 test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags))
342 return; 352 return;
343 353
344 /* 354 /*