Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2012 12:11:32 GMT
From:      Johann <jhugo@meraka.csir.co.za>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/172955: [ath] 11n does not work in adhoc mode
Message-ID:  <201210221211.q9MCBW1S050157@red.freebsd.org>
Resent-Message-ID: <201210221220.q9MCK2Nk053815@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172955
>Category:       misc
>Synopsis:       [ath] 11n does not work in adhoc mode
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 22 12:20:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Johann
>Release:        10.0-CURRENT
>Organization:
CSIR
>Environment:
FreeBSD mesh-1d04 10.0-CURRENT FreeBSD 10.0-CURRENT #4: Thu Oct 11 14:00:10 SAST 2012     root@magrathea.meraka.csir.co.za:/var/scratch/10-current/obj/arm.armeb/var/scratch/10-current/src/sys/SMALL-AVILA-ALTQ  arm
>Description:
802.11n does not work between two 802.11n wifi devices when they are configured in ADHOC mode. 11n works if the same two devices are configured as an AP/CLient mode.

HW = gateworks ARM
OS = FreeBSD 10.0-CURRENT
Build = arm-10-20121011
Wifi = RouterBOARD R52nM = AR9220

- Disabling ampdu does not have any effect - ifconfig wlanX -ampdu 
- Looks like the MCS rate stuff isn't being setup or negotiated right.
>How-To-Repeat:
- Configure two atheros 802.11n wifi adapters in ADHOC mode. 
- Transfer some data between the two devices. 
- Run athratestats - note that it never uses rates above 54Mbps.

static_rix (-1) ratemask 0x0
[ 250] cur rate 54  Mb since switch: packets 4 ticks 154414
[ 250] last sample (6  Mb) cur sample (0 ) packets sent 239
[ 250] packets since sample 8 sample tt 0

[1600] cur rate 54  Mb since switch: packets 1 ticks 154465
[1600] last sample (48  Mb) cur sample (0 ) packets sent 36699
[1600] packets since sample 6 sample tt 644

   TX Rate     TXTOTAL:TXOK       EWMA          T/   F     avg last xmit
[ 9  Mb:1600]        1:1        (100.0%)        1/   0  1848uS 27480
[18  Mb:1600]       21:21       (100.0%)       21/   0  1124uS 39024
[24  Mb:1600]       63:63       (100.0%)       70/   0  1000uS 39117
[36  Mb: 250]        1:1        (100.0%)        1/   0   464uS 27378
[36  Mb:1600]     1976:1976     (100.0%)     2133/   0   909uS 39130
[48  Mb:1600]    13231:13231    (100.0%)    14283/   0   675uS 39130
[54  Mb: 250]      238:238      (100.0%)      238/   0   444uS 154482
[54  Mb:1600]    21407:21407    (100.0%)    23177/   0   644uS 154465

>Fix:


Patch attached with submission follows:

*******************
Node-1
*******************
rc.conf
create_args_wlan1="wlanmode adhoc country ZA"
ifconfig_wlan1="10.50.50.1/24 ssid testADHOC channel 28:ht/40 bssid 02:8c:ca:fe:ca:10"

mesh-1d04:~ # ifconfig wlan1
wlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:0c:42:6c:61:91
        inet 10.50.50.1 netmask 0xffffff00 broadcast 10.50.50.255 
        inet6 fe80::20c:42ff:fe6c:6191%wlan1 prefixlen 64 scopeid 0x8 
        inet6 fde4:7b85:9218:10:20c:42ff:fe6c:6191 prefixlen 64 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11na <adhoc>
        status: running
        ssid testADHOC channel 28 (5140 MHz 11a ht/40-) bssid 02:8c:ca:fe:ca:10
        regdomain NONE country ZA ecm authmode OPEN privacy OFF txpower 17
        mcastrate 6 mgmtrate 6 scanvalid 60 ampdulimit 8k ampdudensity 8
        shortgi wme burst

mesh-1d04:~ # ifconfig wlan1 list chan
Channel   1 : 2412  MHz 11g ht       Channel  52 : 5260* MHz 11a ht       
Channel   2 : 2417  MHz 11g ht       Channel  56 : 5280* MHz 11a ht       
Channel   3 : 2422  MHz 11g ht       Channel  60 : 5300* MHz 11a ht       
Channel   4 : 2427  MHz 11g ht       Channel  64 : 5320* MHz 11a ht       
Channel   5 : 2432  MHz 11g ht       Channel 100 : 5500* MHz 11a ht       
Channel   6 : 2437  MHz 11g ht       Channel 104 : 5520* MHz 11a ht       
Channel   7 : 2442  MHz 11g ht       Channel 108 : 5540* MHz 11a ht       
Channel   8 : 2447  MHz 11g ht       Channel 112 : 5560* MHz 11a ht       
Channel   9 : 2452  MHz 11g ht       Channel 116 : 5580* MHz 11a ht       
Channel  10 : 2457  MHz 11g ht       Channel 120 : 5600* MHz 11a ht       
Channel  11 : 2462  MHz 11g ht       Channel 124 : 5620* MHz 11a ht       
Channel  12 : 2467* MHz 11g ht       Channel 128 : 5640* MHz 11a ht       
Channel  13 : 2472* MHz 11g ht       Channel 132 : 5660* MHz 11a ht       
Channel  24 : 5120* MHz 11a ht       Channel 136 : 5680* MHz 11a ht       
Channel  28 : 5140* MHz 11a ht       Channel 140 : 5700* MHz 11a ht       
Channel  32 : 5160* MHz 11a ht       Channel 149 : 5745* MHz 11a ht       
Channel  36 : 5180* MHz 11a ht       Channel 153 : 5765* MHz 11a ht       
Channel  40 : 5200* MHz 11a ht       Channel 157 : 5785* MHz 11a ht       
Channel  44 : 5220* MHz 11a ht       Channel 161 : 5805* MHz 11a ht       
Channel  48 : 5240* MHz 11a ht       Channel 165 : 5825* MHz 11a ht

mesh-1d04:~ # ifconfig wlan1 list sta
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG   
00:0c:42:6c:61:91    0   28   0M 18.0    0    585    656 I    A      
00:0c:42:6c:63:20    0   28  54M 19.0    0  20659  24752 I    AQ      HTCAP WME

mesh-1d04:~ # iperf -c 10.50.50.2
------------------------------------------------------------
Client connecting to 10.50.50.2, TCP port 5001
TCP window size: 32.5 KByte (default)
------------------------------------------------------------
[  3] local 10.50.50.1 port 53583 connected with 10.50.50.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.1 sec  14.2 MBytes  11.8 Mbits/sec

mesh-1d04:~ # athratestats -i ath1 -m 00:0c:42:6c:61:91
static_rix (0) ratemask 0x0
[ 250] cur rate 6  Mb since switch: packets 0 ticks 0
[ 250] last sample (6  Mb) cur sample (6  Mb) packets sent 0
[ 250] packets since sample 0 sample tt 0

[1600] cur rate 6  Mb since switch: packets 0 ticks 0
[1600] last sample (6  Mb) cur sample (6  Mb) packets sent 0
[1600] packets since sample 0 sample tt 0

   TX Rate     TXTOTAL:TXOK       EWMA          T/   F     avg last xmit
mesh-1d04:~ # athratestats -i ath1 -m 00:0c:42:6c:63:20
static_rix (-1) ratemask 0x0
[ 250] cur rate 54  Mb since switch: packets 1 ticks 83583
[ 250] last sample (6  Mb) cur sample (0 ) packets sent 22
[ 250] packets since sample 0 sample tt 0

[1600] cur rate 54  Mb since switch: packets 402 ticks 82416
[1600] last sample (48  Mb) cur sample (0 ) packets sent 20640
[1600] packets since sample 8 sample tt 672

   TX Rate     TXTOTAL:TXOK       EWMA          T/   F     avg last xmit
[18  Mb:1600]        6:6        (100.0%)        6/   0  1124uS 82359
[24  Mb:1600]       29:29       (100.0%)       33/   0   940uS 82499
[36  Mb: 250]        1:1        (100.0%)        1/   0   464uS 68917
[36  Mb:1600]      724:724      (100.0%)      785/   0   953uS 82503
[48  Mb:1600]     6200:6200     (100.0%)     6628/   0   693uS 82506
[54  Mb: 250]       21:21       (100.0%)       21/   0   444uS 83583
[54  Mb:1600]    13681:13681    (100.0%)    14539/   0   666uS 82507

*******************
Node-2
*******************
rc.conf
create_args_wlan1="wlanmode adhoc country ZA"
ifconfig_wlan1="10.50.50.2/24 ssid testADHOC channel 28:ht/40 bssid 02:8c:ca:fe:ca:10"

mesh-1909:~ # ifconfig wlan1
wlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:0c:42:6c:63:20
        inet 10.50.50.2 netmask 0xffffff00 broadcast 10.50.50.255 
        inet6 fe80::20c:42ff:fe6c:6320%wlan1 prefixlen 64 scopeid 0x8 
        inet6 fde4:7b85:9218:10:20c:42ff:fe6c:6320 prefixlen 64 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11na <adhoc>
        status: running
        ssid testADHOC channel 28 (5140 MHz 11a ht/40-) bssid 02:8c:ca:fe:ca:10
        regdomain NONE country ZA ecm authmode OPEN privacy OFF txpower 17
        mcastrate 6 mgmtrate 6 scanvalid 60 ampdulimit 8k ampdudensity 8
        shortgi wme burst

mesh-1909:~ # ifconfig wlan1 list chan
Channel   1 : 2412  MHz 11g ht       Channel  52 : 5260* MHz 11a ht       
Channel   2 : 2417  MHz 11g ht       Channel  56 : 5280* MHz 11a ht       
Channel   3 : 2422  MHz 11g ht       Channel  60 : 5300* MHz 11a ht       
Channel   4 : 2427  MHz 11g ht       Channel  64 : 5320* MHz 11a ht       
Channel   5 : 2432  MHz 11g ht       Channel 100 : 5500* MHz 11a ht       
Channel   6 : 2437  MHz 11g ht       Channel 104 : 5520* MHz 11a ht       
Channel   7 : 2442  MHz 11g ht       Channel 108 : 5540* MHz 11a ht       
Channel   8 : 2447  MHz 11g ht       Channel 112 : 5560* MHz 11a ht       
Channel   9 : 2452  MHz 11g ht       Channel 116 : 5580* MHz 11a ht       
Channel  10 : 2457  MHz 11g ht       Channel 120 : 5600* MHz 11a ht       
Channel  11 : 2462  MHz 11g ht       Channel 124 : 5620* MHz 11a ht       
Channel  12 : 2467* MHz 11g ht       Channel 128 : 5640* MHz 11a ht       
Channel  13 : 2472* MHz 11g ht       Channel 132 : 5660* MHz 11a ht       
Channel  24 : 5120* MHz 11a ht       Channel 136 : 5680* MHz 11a ht       
Channel  28 : 5140* MHz 11a ht       Channel 140 : 5700* MHz 11a ht       
Channel  32 : 5160* MHz 11a ht       Channel 149 : 5745* MHz 11a ht       
Channel  36 : 5180* MHz 11a ht       Channel 153 : 5765* MHz 11a ht       
Channel  40 : 5200* MHz 11a ht       Channel 157 : 5785* MHz 11a ht       
Channel  44 : 5220* MHz 11a ht       Channel 161 : 5805* MHz 11a ht       
Channel  48 : 5240* MHz 11a ht       Channel 165 : 5825* MHz 11a ht

mesh-1909:~ # ifconfig wlan1 list sta
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG   
00:0c:42:6c:63:20    0   28   0M 17.0    0    207    656 I    A      
00:0c:42:6c:61:91    0   28  54M 18.5    0  13837   9392 I    AQ      HTCAP WME

mesh-1909:~ # iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[  4] local 10.50.50.2 port 5001 connected with 10.50.50.1 port 53583
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.7 sec  14.2 MBytes  11.2 Mbits/sec

mesh-1909:~ # athratestats -i ath1 -m 00:0c:42:6c:61:91
static_rix (-1) ratemask 0x0
[ 250] cur rate 54  Mb since switch: packets 2 ticks 31507
[ 250] last sample (48  Mb) cur sample (0 ) packets sent 13839
[ 250] packets since sample 4 sample tt 448

[1600] cur rate 6  Mb since switch: packets 0 ticks 0
[1600] last sample (6  Mb) cur sample (0 ) packets sent 0
[1600] packets since sample 0 sample tt 0

   TX Rate     TXTOTAL:TXOK       EWMA          T/   F     avg last xmit
[ 6  Mb: 250]        6:6        (100.0%)        6/   0   760uS 30178
[ 9  Mb: 250]       26:26       (100.0%)       28/   0   688uS 30342
[12  Mb: 250]       68:68       (100.0%)       75/   0   610uS 30421
[18  Mb: 250]      836:836      (100.0%)      921/   0   524uS 30350
[24  Mb: 250]     2523:2523     (100.0%)     2762/   0   669uS 30401
[36  Mb: 250]     1757:1757     (100.0%)     1922/   0   514uS 30414
[48  Mb: 250]     5446:5446     (100.0%)     5913/   0   461uS 30431
[54  Mb: 250]     3178:3178     (100.0%)     3471/   0   447uS 31508



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210221211.q9MCBW1S050157>