Search Linux Wireless

Re: carl9170 - monitor mode TP drop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



W dniu 23 kwietnia 2012 19:45 użytkownik Christian Lamparter
<chunkeey@xxxxxxxxxxxxxx> napisał:
> On Monday, April 23, 2012 06:27:03 AM Janusz Dziedzic wrote:
>> This is a scenario:
>> AP <--> STA1 (channel 6)
>> STA2 == carl_monitor (channel 6)
> ah, I assumed you were running the STA & Monitor on the same
> device [which is possible for most mac80211 devices!].
>
>> This is what I can see on STA1:
>> # iperf -c 192.168.254.1 -t 100 -i 5
>> ------------------------------------------------------------
>> Client connecting to 192.168.254.1, TCP port 5001
>> TCP window size:  512 KByte (default)
>> ------------------------------------------------------------
>> [  3] local 192.168.254.181 port 46048 connected with 192.168.254.1 port 5001
>> [ ID] Interval       Transfer     Bandwidth
>> [  3]  0.0- 5.0 sec  17.4 MBytes  29.2 Mbits/sec
>> [  3]  5.0-10.0 sec  19.6 MBytes  32.9 Mbits/sec
>> [ 3] 10.0-15.0 sec  20.4 MBytes  34.2 Mbits/sec
>>
>> =====> here I setup carl monitor on second PC, like this:
>> =====> iw dev wlan0 set type monitor
>> =====> iw dev wlan0 set freq 2437
>> =====> ifconfig wlan0 up
>>
>> [  3] 40.0-45.0 sec  2.38 MBytes  3.98 Mbits/sec
>> [  3] 45.0-50.0 sec  2.50 MBytes  4.19 Mbits/sec
>> [  3] 50.0-55.0 sec  3.00 MBytes  5.03 Mbits/sec
>>
>> Seems I don't even need to start wireshark here ... and see this TP drop.
> Well, there's the "AR9170_MAC_RX_CTRL_ACK_IN_SNIFFER = bit (30)"
> in "AR9170_MAC_REG_RX_CONTROL = (0x1c3c40)".  If you have enabled
> CONFIG_CARL9170_DEBUGFS build option, you can disable this
> bit (on the fly) by executing:
>
> echo "0x1c3c40 0x10000003" > /sys/kernel/debug/ieee80211/phyX/carl9170/hw_iowrite32
>
> (phyX needs to be the phy dev of the carl9170 instance)
>
> and there's the AR9170_MAC_SNIFFER_ENABLE_PROMISC (bit 0) in
> AR9170_MAC_REG_SNIFFER (0x1c3674). Which can be disabled in a
> similar way:
>
> echo "0x1c3674 0x02000000" > /sys/...
>

Hello,

Thanks Christian.
I disabled this in code.

diff --git a/drivers/net/wireless/ath/carl9170/mac.c
b/drivers/net/wireless/ath/carl9170/mac.c
index 53415bf..f3a7669 100644
--- a/drivers/net/wireless/ath/carl9170/mac.c
+++ b/drivers/net/wireless/ath/carl9170/mac.c
@@ -354,7 +354,7 @@ int carl9170_set_operating_mode(struct ar9170 *ar)
                enc_mode |= AR9170_MAC_ENCRYPTION_RX_SOFTWARE;

        if (ar->sniffer_enabled) {
-               rx_ctrl |= AR9170_MAC_RX_CTRL_ACK_IN_SNIFFER;
+//             rx_ctrl |= AR9170_MAC_RX_CTRL_ACK_IN_SNIFFER;
                sniffer |= AR9170_MAC_SNIFFER_ENABLE_PROMISC;
                enc_mode |= AR9170_MAC_ENCRYPTION_RX_SOFTWARE;
        }

After that I don't see any TP drop and can see all packets in
wireshark (as expected).

Why carl try to ACK rx packets in monitor mode? Is that a correct behaviour?

BR
Janusz
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux