LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Kernel
  • Assigned To No-one
  • Operating System All
  • Severity High
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 3
  • Private
Attached to Project: LEDE Project
Opened by jianxi sun - 12.05.2017
Last edited by Yousong Zhou - 14.05.2017

FS#776 - ath9k wds mode station break off

atheros ar9331
Linux version 4.4.61 (gcc version 5.4.0 (LEDE GCC 5.4.0 r4099-4c3953b) )

wds ap:

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path 'platform/ar933x_wmac'
        option distance '3000'
        option txpower '18'
        option country '00'
        option channel '1'
        option htmode 'HT40'

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option encryption 'psk2'
        option key '12345600'
        option max_inactivity '20'
        option wds '1'
        option ssid 'LK-M2-Jianxi'

wds station:

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '1'
        option hwmode '11g'
        option path 'platform/ar933x_wmac'
        option htmode 'HT20'
        option distance '3000'
        option txpower '19'
        option country '00'

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option encryption 'psk2'
        option key '12345600'
        option max_inactivity '20'
        option wds '1'
        option mode 'sta'
        option ssid 'LK-M2-Jianxi'

When the station break off, ping can not reach ap. wifi still connect. kernel have no error info. iwinfo signal still change.

ap with the other station still alive.

Use wpa_cli scan command, will awake station, and ping alive.
wifi command also work.

/proc/interrupts ath9k still alive.


Christian W. commented on 18.05.2017 16:01

I can confirm this report. i have multiple TP-Link WR1043ND v3.0 which exhibit the same behavior.
Usually, both the WDS station and the WDS AP report in CLI/LUCI a connection, but no data is transmitted over the wireless link. sometimes the RX speed is locked to 1 MBit/s or the AP disappears completely until reboot. reboot fixes the problem until it's happening again at random intervals. log files are clean.

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11ng'
        option path 'platform/qca955x_wmac'
        list ht_capab 'LDPC'
        list ht_capab 'SHORT-GI-20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'TX-STBC'
        list ht_capab 'RX-STBC1'
        list ht_capab 'DSSS_CCK-40'
        option noscan '1'
        option channel '3'
        option txpower '17'
        option country 'DE'
        option htmode 'HT40'

config wifi-iface
        option device 'radio0'
        option mode 'ap'
        option ssid 'somewifi'
        option wds '1'
        option network 'lan'
        option encryption 'psk2+ccmp'
        option key 'XXXYYY12'
        option frag '2346'
        option rts '2346'
        option ff '1'
        option compression '0'
        option bursting '1'
        option bgscan '0'
jianxi sun commented on 16.06.2017 09:56

I have checked wpa2 wpa and none encryption. When use none encryption, everything is ok.

jianxi sun commented on 16.06.2017 10:59

I have catched the log info when rx error with:

echo 0xffffffff > /sys/kernel/debug/ieee80211/phy0/ath9k/debug

log info:

[ 524.921114] ath: phy0: enable IER
[ 524.924315] ath: phy0: AR_IMR 0x81840175 IER 0x1
[ 525.000052] ath: phy0: listenTime=183359 OFDM:2 errs=46/s CCK:7
errs=308/s ofdm_turn=1
[ 525.006532] ath: phy0: Calibration @22499 finished: ani, caldone: true
[ 525.021461] ath: phy0: disable IER
[ 525.023486] ath: phy0: enable IER
[ 525.026712] ath: phy0: AR_IMR 0x81840175 IER 0x1
[ 525.123859] ath: phy0: disable IER
[ 525.125887] ath: phy0: enable IER
[ 525.129115] ath: phy0: AR_IMR 0x81840175 IER 0x1
[ 525.226269] ath: phy0: disable IER
[ 525.228315] ath: phy0: enable IER
[ 525.231562] ath: phy0: AR_IMR 0x81840175 IER 0x1
[ 525.310052] ath: phy0: listenTime=183613 OFDM:2 errs=46/s CCK:7
errs=308/s ofdm_turn=1
[ 525.316533] ath: phy0: Calibration @22530 finished: ani, caldone: true
[ 525.328660] ath: phy0: disable IER
[ 525.330732] ath: phy0: enable IER
[ 525.333910] ath: phy0: AR_IMR 0x81840175 IER 0x1
[ 525.431133] ath: phy0: disable IER
[ 525.433165] ath: phy0: enable IER
[ 525.436392] ath: phy0: AR_IMR 0x81840175 IER 0x1
[ 525.533664] ath: phy0: disable IER
[ 525.535690] ath: phy0: enable IER
[ 525.538918] ath: phy0: AR_IMR 0x81840175 IER 0x1
[ 525.620053] ath: phy0: listenTime=183874 OFDM:2 errs=46/s CCK:7
errs=308/s ofdm_tu

the log is normal interrupt and ANI debug info.

I suppose think there should have some other debug info.

   errinfo (117.2 KiB)
jianxi sun commented on 22.06.2017 03:41

With debug 0x82: ATH_DBG_XMIT | ATH_DBG_QUEUE.

station ping ap:

root@LingKe:/sys/kernel/debug/ieee80211/phy0/ath9k# ping 192.168.1.8
PING 192.168.1.8 ([ 9473.036086] ath: phy0: Waking TX queue: c8:ee:a6:2d:ca:e0 (0)
[ 9473.041515] ath: phy0: qnum: 1, txq depth: 0
[ 9473.045630] ath: phy0: TXDP[1] = cd6100 (a0cd6100)
[ 9473.050519] ath: phy0: TX complete: skb: 80fd9180
[ 9473.055195] ath: phy0: ath_tx_aggr_start called
[ 9473.059664] ath: phy0: transmitting packet, skb: 80fd9a80
[ 9473.065077] ath: phy0: qnum: 3, txq depth: 0
[ 9473.069240] ath: phy0: TXDP[3] = cdf700 (a0cdf700)
[ 9473.075046] ath: phy0: TX complete: skb: 80fd9a80
192.168.1.8): 5[ 9473.080411] ath: phy0: Waking TX queue: c8:ee:a6:2d:ca:e0 (0)
6 data bytes
[ 9474.030148] ath: phy0: Waking TX queue: c8:ee:a6:2d:ca:e0 (0)
[ 9474.034517] ath: phy0: qnum: 1, txq depth: 0
[ 9474.038731] ath: phy0: TXDP[1] = cd3700 (a0cd3700)
[ 9474.044122] ath: phy0: TX complete: skb: 8088b9c0
[ 9475.030146] ath: phy0: Waking TX queue: c8:ee:a6:2d:ca:e0 (0)
[ 9475.034513] ath: phy0: qnum: 1, txq depth: 0
[ 9475.038704] ath: phy0: TXDP[1] = cd2880 (a0cd2880)
[ 9475.044065] ath: phy0: TX complete: skb: 81b1f0c0

— 192.168.1.8 ping statistics — 3 packets transmitted, 0 packets received, 100% packet loss

jianxi sun commented on 24.06.2017 02:42

Add some debug info in mac80211, i can get data packet in
__ieee80211_rx_handle_packet

4053 if (ieee80211_is_mgmt(fc)) {
4054 mac80211_dbg(local, RX, "mac80211 mgmt
packet\n");
4055 /* drop frame if too short for header */

4083 } else if (ieee80211_is_data(fc)) {
4084 mac80211_dbg(local, RX, "mac80211 data
packet\n");
4085 struct sta_info *sta, *prev_sta;

with ping packet log:

[ 8996.617367] mac80211 data packet
[ 8996.622783] mac80211 mgmt packet
[ 8996.725036] mac80211 mgmt packet
[ 8996.820829] mac80211 data packet
[ 8996.829383] mac80211 mgmt packet
[ 8996.931682] mac80211 mgmt packet
[ 8997.033052] mac80211 mgmt packet
[ 8997.135956] mac80211 mgmt packet

And station will deauth from ap with PRE_AUTH_NOT_VALID:

[ 8998.621385] wlan0: deauthenticated from c8:ee:a6:2d:cc:6c (Reason:
2=PREV_AUTH_NOT_VALID)
[ 8998.629537] br-lan: port 2(wlan0) entered disabled state
[ 9003.635631] wlan0: authenticate with c8:ee:a6:2d:cc:6c
[ 9003.651230] wlan0: send auth to c8:ee:a6:2d:cc:6c (try 1/3)
[ 9003.670365] wlan0: associate with c8:ee:a6:2d:cc:6c (try 1/3)
[ 9003.681735] wlan0: RX AssocResp from c8:ee:a6:2d:cc:6c (capab=0x431
status=0 aid=1)
[ 9003.815829] br-lan: port 2(wlan0) entered forwarding state

I think some bug in auth cause data packet drop.

jianxi sun commented on 25.06.2017 09:35

I have found the bug position:

mac80211 rx `ieee80211_sta_manage_reorder_buf`:

[ 1248.968407] mac80211 with out of date seq number: 2551 2547 2552
[ 1248.972972] mac80211 with out of date seq number: 2551 2548 2552
[ 1248.978800] mac80211 with out of date seq number: 2551 2549 2552
[ 1248.984760] mac80211 with out of date seq number: 2551 2550 2552
[ 1248.990636] mac80211 with out of date seq number: 2551 2551 2552

head_seq_num will out-of-order.

But i can not find why will out of order.

jianxi sun commented on 27.06.2017 12:31

I am sure its block ack seq num error bug. I am not familier with ath9k. Anybody continue......

Project Manager
Alexander Couzens commented on 10.08.2017 04:49

@jianxi can you create a trace (.pcap file) using a wifi monitor interface?

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing