Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#776 - ath9k wds mode station break off #7102

Closed
openwrt-bot opened this issue May 12, 2017 · 9 comments
Closed

FS#776 - ath9k wds mode station break off #7102

openwrt-bot opened this issue May 12, 2017 · 9 comments
Labels

Comments

@openwrt-bot
Copy link

ycsunjane:

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.

@openwrt-bot
Copy link
Author

cvbkf:

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'

@openwrt-bot
Copy link
Author

ycsunjane:

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

@openwrt-bot
Copy link
Author

ycsunjane:

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.

@openwrt-bot
Copy link
Author

ycsunjane:

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
^C
--- 192.168.1.8 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

@openwrt-bot
Copy link
Author

ycsunjane:

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.

@openwrt-bot
Copy link
Author

ycsunjane:

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.

@openwrt-bot
Copy link
Author

ycsunjane:

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

@openwrt-bot
Copy link
Author

lynxis:

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

@openwrt-bot
Copy link
Author

bers:

Hi,
I can repro this (or a similar) issue on my TP-Link WR841N v9.0 using LuCI openwrt-18.06 branch (git-19.020.41695-6f6641d) / OpenWrt 18.06.2 r7676-cddd7b4c77, in "Client (WDS)" mode only. This one is using ath10k, but the observation is the same.

Often, even immediately after reboot, I see this:
RX Rate / TX Rate
59 / -95 dBm
1.0 Mbit/s, 20MHz
130.0 Mbit/s, 20MHz, MCS 14, Short GI

Consistently, my FritzBox says this:
0 / 99 (this is MBit/s)
2,4 GHz / n / 20 MHz
WPA2, 2 x 2
11k

Can I do anything to help investigate this? I have installed a snapshot build, but without Luci, I find it hard to check what is going on (Windows person with basic Linux knowledge).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant