aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2012-09-11 17:18:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-10-29 15:18:04 -0400
commite0509d3bdd7365d06c9bf570bf9f118cae6cbd58 (patch)
treee2a5d8d6d5c8e6a5558d11662853d4cd893f30a0
parente298c79efcf7b88fded994a03375589d8b726ce7 (diff)
carl9170: fix spurious transmissions in sniffer mode
Several people have complained about an unusual and undocumented feature of the AR9170 hardware: In siffer mode, the hardware generates spurious ACK frames for every received frame... even broadcasts. The reason for this malfunction is unknown: <http://marc.info/?l=linux-wireless&m=134517238506033> But there's a workaround: Instead of the special sniffer mode, the hardware will be put into station mode and all rx filters are disabled. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reported-by: Marco Fonseca <marco@tampabay.rr.com> Reported-by: Janusz Dziedzic <janusz.dziedzic@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/carl9170/mac.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/carl9170/mac.c b/drivers/net/wireless/ath/carl9170/mac.c
index e3b1b6e87760..24d75ab94f0d 100644
--- a/drivers/net/wireless/ath/carl9170/mac.c
+++ b/drivers/net/wireless/ath/carl9170/mac.c
@@ -343,7 +343,24 @@ int carl9170_set_operating_mode(struct ar9170 *ar)
343 break; 343 break;
344 } 344 }
345 } else { 345 } else {
346 mac_addr = NULL; 346 /*
347 * Enable monitor mode
348 *
349 * rx_ctrl |= AR9170_MAC_RX_CTRL_ACK_IN_SNIFFER;
350 * sniffer |= AR9170_MAC_SNIFFER_ENABLE_PROMISC;
351 *
352 * When the hardware is in SNIFFER_PROMISC mode,
353 * it generates spurious ACKs for every incoming
354 * frame. This confuses every peer in the
355 * vicinity and the network throughput will suffer
356 * badly.
357 *
358 * Hence, the hardware will be put into station
359 * mode and just the rx filters are disabled.
360 */
361 cam_mode |= AR9170_MAC_CAM_STA;
362 rx_ctrl |= AR9170_MAC_RX_CTRL_PASS_TO_HOST;
363 mac_addr = common->macaddr;
347 bssid = NULL; 364 bssid = NULL;
348 } 365 }
349 rcu_read_unlock(); 366 rcu_read_unlock();
@@ -355,8 +372,6 @@ int carl9170_set_operating_mode(struct ar9170 *ar)
355 enc_mode |= AR9170_MAC_ENCRYPTION_RX_SOFTWARE; 372 enc_mode |= AR9170_MAC_ENCRYPTION_RX_SOFTWARE;
356 373
357 if (ar->sniffer_enabled) { 374 if (ar->sniffer_enabled) {
358 rx_ctrl |= AR9170_MAC_RX_CTRL_ACK_IN_SNIFFER;
359 sniffer |= AR9170_MAC_SNIFFER_ENABLE_PROMISC;
360 enc_mode |= AR9170_MAC_ENCRYPTION_RX_SOFTWARE; 375 enc_mode |= AR9170_MAC_ENCRYPTION_RX_SOFTWARE;
361 } 376 }
362 377