All of lore.kernel.org
 help / color / mirror / Atom feed
* ath10k stuck on 6Mbps and spam syslog
@ 2016-09-29 13:39 Matteo Grandi
  2016-09-29 14:47 ` Ben Greear
  0 siblings, 1 reply; 4+ messages in thread
From: Matteo Grandi @ 2016-09-29 13:39 UTC (permalink / raw)
  To: LinuxWireless Mailing List

[-- Attachment #1: Type: text/plain, Size: 6185 bytes --]

Hello all,

I'm struggling with a problem related on ath10k drivers:
I'm using a Compex WLE600V5-27 (802.11ac) miniPCIe card for some HT
tests needed for my thesis.
I'm using ath10k drivers for this card, and backports-4.4.2, in
particular the firmware-5.bin_10.2.4.70.54 because it seem to be the
more recent.
I've connected in mesh mode the WLE600V5 card with an 802.11n card
(using ath9k drivers) but looking at the station dump, the tx bitrate
is stuck on 6.0 Mbit/s for the ath10k. The ath9k one works well and
watch -n1 iw <interfacename> station dump
let me see changes of the tx rate and MCS on the ath9k during iperf
tests, but the ath10k stucks on 6.0 Mbit/s.

Then something misterious (for me) happen while the channel
assignment: the syslog is spammed by this message:

[17554.919459] ------------[ cut here ]------------
[17554.919839] WARNING: CPU: 0 PID: 0 at
/home/matteo/linux-imx6/backports4.4.2-i2CAT/net/mac80211/util.c:2621
ieee80211_calculate_rx_timestamp+0x204/0x278 [mac80211]()
[17554.919855] Modules linked in: arc4 sky2 ath10k_pci(O)
ath10k_core(O) ath(O) mac80211(O) cfg80211(O) compat(O)
[17554.919926] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O
3.14.48-g408ccb9 #4
[17554.919990] [<80015050>] (unwind_backtrace) from [<80011330>]
(show_stack+0x10/0x14)
[17554.920038] [<80011330>] (show_stack) from [<806537dc>]
(dump_stack+0x80/0x90)
[17554.920074] [<806537dc>] (dump_stack) from [<8002c578>]
(warn_slowpath_common+0x6c/0x88)
[17554.920103] [<8002c578>] (warn_slowpath_common) from [<8002c630>]
(warn_slowpath_null+0x1c/0x24)
[17554.920377] [<8002c630>] (warn_slowpath_null) from [<7f089c74>]
(ieee80211_calculate_rx_timestamp+0x204/0x278 [mac80211])
[17554.920826] [<7f089c74>] (ieee80211_calculate_rx_timestamp
[mac80211]) from [<7f07d724>] (ieee80211_rx_napi+0xcc/0x8d4
[mac80211])
[17554.921259] [<7f07d724>] (ieee80211_rx_napi [mac80211]) from
[<7f117fd0>] (ath10k_wmi_event_mgmt_rx+0x1f4/0x35c [ath10k_core])
[17554.921540] [<7f117fd0>] (ath10k_wmi_event_mgmt_rx [ath10k_core])
from [<7f10d844>] (ath10k_htc_rx_completion_handler+0x1cc/0x464
[ath10k_core])
[17554.921706] [<7f10d844>] (ath10k_htc_rx_completion_handler
[ath10k_core]) from [<7f157b4c>] (ath10k_pci_process_rx_cb+0x1ac/0x1fc
[ath10k_pci])
[17554.921773] [<7f157b4c>] (ath10k_pci_process_rx_cb [ath10k_pci])
from [<7f15b3ac>] (ath10k_ce_per_engine_service+0x5c/0x94
[ath10k_pci])
[17554.921835] [<7f15b3ac>] (ath10k_ce_per_engine_service
[ath10k_pci]) from [<7f15b464>]
(ath10k_ce_per_engine_service_any+0x80/0x88 [ath10k_pci])
[17554.921892] [<7f15b464>] (ath10k_ce_per_engine_service_any
[ath10k_pci]) from [<7f15a6d8>] (ath10k_pci_tasklet+0x24/0x5c
[ath10k_pci])
[17554.921946] [<7f15a6d8>] (ath10k_pci_tasklet [ath10k_pci]) from
[<800304c8>] (tasklet_action+0x80/0x110)
[17554.921979] [<800304c8>] (tasklet_action) from [<800306b8>]
(__do_softirq+0x10c/0x248)
[17554.922009] [<800306b8>] (__do_softirq) from [<80030a6c>]
(irq_exit+0xac/0xf4)
[17554.922042] [<80030a6c>] (irq_exit) from [<8000e904>] (handle_IRQ+0x44/0x90)
[17554.922072] [<8000e904>] (handle_IRQ) from [<800084f8>]
(gic_handle_irq+0x2c/0x5c)
[17554.922105] [<800084f8>] (gic_handle_irq) from [<80011e00>]
(__irq_svc+0x40/0x50)
[17554.922122] Exception stack(0x80917f18 to 0x80917f60)
[17554.922141] 7f00:
    80917f60 000d3334
[17554.922166] 7f20: 5221e106 00000ff7 4d693c44 00000ff7 a7705010
80924060 00000001 a7705014
[17554.922190] 7f40: 8096243d 80916000 00000017 80917f60 a6aaaaab
80492940 60000013 ffffffff
[17554.922224] [<80011e00>] (__irq_svc) from [<80492940>]
(cpuidle_enter_state+0x50/0xe0)
[17554.922252] [<80492940>] (cpuidle_enter_state) from [<80492ac8>]
(cpuidle_idle_call+0xf8/0x148)
[17554.922281] [<80492ac8>] (cpuidle_idle_call) from [<8000ec48>]
(arch_cpu_idle+0x8/0x44)
[17554.922322] [<8000ec48>] (arch_cpu_idle) from [<80066648>]
(cpu_startup_entry+0xfc/0x140)
[17554.922362] [<80066648>] (cpu_startup_entry) from [<808c5b08>]
(start_kernel+0x360/0x36c)
[17554.922379] ---[ end trace 87d4775146813aed ]---
[17555.943454] ------------[ cut here ]------------

that repeat continuously...
Forcing legacy bitrates doesn't change the situation.

I made some measurements using iperf, please find it in attachment.

Other info:

root@Yazi:~# modinfo ath10k_pci
filename:
/lib/modules/3.14.48-g408ccb9/kernel/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
firmware:       ath10k/QCA9377/hw1.0/board.bin
firmware:       ath10k/QCA9377/hw1.0/firmware-5.bin
firmware:       ath10k/QCA6174/hw3.0/board-2.bin
firmware:       ath10k/QCA6174/hw3.0/board.bin
firmware:       ath10k/QCA6174/hw3.0/firmware-5.bin
firmware:       ath10k/QCA6174/hw3.0/firmware-4.bin
firmware:       ath10k/QCA6174/hw2.1/board-2.bin
firmware:       ath10k/QCA6174/hw2.1/board.bin
firmware:       ath10k/QCA6174/hw2.1/firmware-5.bin
firmware:       ath10k/QCA6174/hw2.1/firmware-4.bin
firmware:       ath10k/QCA988X/hw2.0/board-2.bin
firmware:       ath10k/QCA988X/hw2.0/board.bin
firmware:       ath10k/QCA988X/hw2.0/firmware-5.bin
firmware:       ath10k/QCA988X/hw2.0/firmware-4.bin
firmware:       ath10k/QCA988X/hw2.0/firmware-3.bin
firmware:       ath10k/QCA988X/hw2.0/firmware-2.bin
firmware:       ath10k/QCA988X/hw2.0/firmware.bin
license:        Dual BSD/GPL
description:    Driver support for Atheros QCA988X PCIe devices
author:         Qualcomm Atheros
version:        backported from Linux (v4.4.2-0-g1cb8570) using
backports v4.4.2-1-0-gbec4037
srcversion:     EBB3D4E36DE49B7EC8057D0
alias:          pci:v0000168Cd00000042sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000040sv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000003Esv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000041sv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000003Csv*sd*bc*sc*i*
depends:        ath10k_core,compat
vermagic:       3.14.48-g408ccb9 SMP mod_unload modversions ARMv7 p2v8
parm:           irq_mode:0: auto, 1: legacy, 2: msi (default: 0) (uint)
parm:           reset_mode:0: auto, 1: warm only (default: 0) (uint)

I don't know if it's only a problem of iw station dump that can't show
the tx rate, but the spammed syslog honestly warn me...

How shall I check what's wrong and see the HT work?

Thanks a lot!

Matteo

[-- Attachment #2: ath10kIssue.txt --]
[-- Type: text/plain, Size: 16132 bytes --]

+++++++++++++++++++
#CONFIGUTRATION#
+++++++++++++++++++

##### HOST YAZI 192.168.149.87 with ath10k #####
root@Yazi:~# iw dev wlan1 interface add mp1 type mp
root@Yazi:~# iw dev mp1 set channel 149 HT40+
root@Yazi:~# ifconfig mp1 192.168.149.87
root@Yazi:~# iw dev mp1 mesh join m149h
root@Yazi:~# iw mp1 station dump
Station 04:f0:21:0a:61:eb (on mp1)
	inactive time:	870 ms
	rx bytes:	4635
	rx packets:	75
	tx bytes:	302
	tx packets:	3
	tx retries:	0
	tx failed:	0
	signal:  	-66 dBm
	signal avg:	-68 dBm
	tx bitrate:	6.0 MBit/s
	mesh llid:	33894
	mesh plid:	35428
	mesh plink:	ESTAB
	authorized:	yes
	authenticated:	yes
	preamble:	long
	WMM/WME:	yes
	MFP:		no
	TDLS peer:		no
	
	
#### HOST GATEWORKS 192.168.149.54 with ath9k ####
root@gateworks:~# iw dev wlan0 interface add mp0 type mp
root@gateworks:~# iw dev mp0 set channel 149 HT40+
root@gateworks:~# ifconfig mp0 192.168.149.54
root@gateworks:~# iw dev mp0 mesh join m149h
root@gateworks:~# iw mp0 station dump
Station 04:f0:21:15:ac:77 (on mp0)
	inactive time:	1000 ms
	rx bytes:	1709
	rx packets:	22
	tx bytes:	260
	tx packets:	3
	tx retries:	23
	tx failed:	3
	signal:  	-80 dBm
	signal avg:	-77 dBm
	tx bitrate:	19.5 MBit/s MCS 2
	mesh llid:	35428
	mesh plid:	33894
	mesh plink:	ESTAB
	authorized:	yes
	authenticated:	yes
	preamble:	long
	WMM/WME:	yes
	MFP:		no
	TDLS peer:		no
	
	
	
###CAPTURE BROADCAST POLL MESSAGES -> file BroadcastPoll149###

++++++++++++++++++++++++++++++++++
###IPERF WITHOUT ANY HT OPTOPNS###
++++++++++++++++++++++++++++++++++

###DELETED BOTH INTERFACES AND CREATED NEW TWO WITHOUT THE HT40+ OPTION###
Used wlan1 instead wlan0 on the host Gateworks

 Iperf+Capture
.87 client
.54 server
file Iperf149_3
.54 change its bitrates from 6 to 18, .87 stuck on 6


#On .54 (server)

Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.149.54 port 5001 connected with 192.168.149.87 port 53471
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3]  0.0-10.0 sec  17.9 MBytes  14.9 Mbits/sec   0.193 ms    3/12762 (0.024%)
[  3]  0.0-10.0 sec  4 datagrams received out-of-order

#On .87 (client)

Client connecting to 192.168.149.54, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.149.87 port 53471 connected with 192.168.149.54 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  17.9 MBytes  15.0 Mbits/sec
[  3] Sent 12763 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec  17.9 MBytes  14.9 Mbits/sec   0.192 ms    3/12762 (0.024%)
[  3]  0.0-10.0 sec  4 datagrams received out-of-order

++++++++++++++++++++++++++++++++++++++++++++++++++++++
.87 Server
.54 Client
file Iperf149_4
.54 change its bitrates from 6 to 18 and then 36, .87 stuck on 6

#On .87 (Server)
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.149.87 port 5001 connected with 192.168.149.54 port 52418
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3]  0.0-10.0 sec  16.4 MBytes  13.7 Mbits/sec   2.684 ms    6/11686 (0.051%)
[  3]  0.0-10.0 sec  7 datagrams received out-of-order

#On .54 (Client)
------------------------------------------------------------
Client connecting to 192.168.149.87, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.149.54 port 52418 connected with 192.168.149.87 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  16.4 MBytes  13.7 Mbits/sec
[  3] Sent 11687 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec  16.4 MBytes  13.7 Mbits/sec   2.683 ms    6/11686 (0.051%)
[  3]  0.0-10.0 sec  7 datagrams received out-of-order


++++++++++++++++++++++++++++++++++
###IPERF WITH HT20 OPTOPNS###
++++++++++++++++++++++++++++++++++
###DELETED AND REBUILTED TWO INTERFACES WITH HT20 OPTION###

in iw <interfacename> station dump .54 shows the bitrates with the MCS, 
.87 doesn't do the same, and bitrate is always 6Mbps

Again Iperf with capture
.54 Server
.87 Client
file Iperf149_5
.54 changes its bitrates in 19.5, 13 and 65MCS7
.87 stuck on 6Mbps

#On .54 (Server)

Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.149.54 port 5001 connected with 192.168.149.87 port 58654
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3]  0.0- 9.9 sec  23.7 MBytes  20.2 Mbits/sec   0.433 ms    0/16936 (0%)
[  3]  0.0- 9.9 sec  1 datagrams received out-of-order

#On .87 (Client)

Client connecting to 192.168.149.54, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.149.87 port 58654 connected with 192.168.149.54 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  23.7 MBytes  19.9 Mbits/sec
[  3] Sent 16937 datagrams
[  3] Server Report:
[  3]  0.0- 9.9 sec  23.7 MBytes  20.2 Mbits/sec   0.433 ms    0/16936 (0%)
[  3]  0.0- 9.9 sec  1 datagrams received out-of-order

++++++++++++++++++++++++++++++++++++++++++++++++++
.87 Server
.54 Client
file Iperf149_6
.54 changes bitrates 26MCS3, 65 MCS7
.87 6Mbps
 
 #On .87 (Server)
 
 [  4] local 192.168.149.87 port 5001 connected with 192.168.149.54 port 37926
[  4]  0.0-10.1 sec  14.8 MBytes  12.3 Mbits/sec   4.649 ms  723/11288 (6.4%)
[  4]  0.0-10.1 sec  4 datagrams received out-of-order

#On .54 (Client)

Client connecting to 192.168.149.87, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.149.54 port 37926 connected with 192.168.149.87 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  15.8 MBytes  13.3 Mbits/sec
[  3] Sent 11289 datagrams
[  3] Server Report:
[  3]  0.0-10.1 sec  14.8 MBytes  12.3 Mbits/sec   4.649 ms  723/11288 (6.4%)
[  3]  0.0-10.1 sec  4 datagrams received out-of-order
 

++++++++++++++++++++
###FORCE TEST###
++++++++++++++++++++

10 secs 50M
.87 Server
.54 Client
file Iperf149_7

#On .87 (Server)

[  3] local 192.168.149.87 port 5001 connected with 192.168.149.54 port 48708
[  3]  0.0-10.5 sec  15.6 MBytes  12.4 Mbits/sec  32.743 ms  197/11300 (1.7%)
[  3]  0.0-10.5 sec  6 datagrams received out-of-order

#On .54 (Client)

Client connecting to 192.168.149.87, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.149.54 port 48708 connected with 192.168.149.87 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.4 sec  15.8 MBytes  12.8 Mbits/sec
[  3] Sent 11301 datagrams
[  3] Server Report:
[  3]  0.0-10.5 sec  15.6 MBytes  12.4 Mbits/sec  32.742 ms  197/11300 (1.7%)
[  3]  0.0-10.5 sec  6 datagrams received out-of-order

++++++++++++++++++++++++++++++++++++++++++++
10 secs 50M
.54 Server
.87 Client
file Iperf149_8

#On .54 (Server)

[  3] local 192.168.149.54 port 5001 connected with 192.168.149.87 port 48488
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3]  0.0-10.0 sec  29.5 MBytes  24.7 Mbits/sec   1.435 ms    8/21055 (0.038%)
[  3]  0.0-10.0 sec  1 datagrams received out-of-order


#On .87 (Client)

[  3] local 192.168.149.87 port 48488 connected with 192.168.149.54 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  29.5 MBytes  24.7 Mbits/sec
[  3] Sent 21056 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec  29.5 MBytes  24.7 Mbits/sec   1.434 ms    8/21055 (0.038%)
[  3]  0.0-10.0 sec  1 datagrams received out-of-order


++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++

10 secs 100M
.54 Server
.87 Client
file Iperf149_9

#On .54 (Server)

[  4] local 192.168.149.54 port 5001 connected with 192.168.149.87 port 52895
[  4]  0.0-10.0 sec  40.3 MBytes  33.8 Mbits/sec   1.108 ms   26/28784 (0.09%)
[  4]  0.0-10.0 sec  11 datagrams received out-of-order

#On .87 (Client)	

[  3] local 192.168.149.87 port 52895 connected with 192.168.149.54 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  40.4 MBytes  33.8 Mbits/sec
[  3] Sent 28785 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec  40.3 MBytes  33.8 Mbits/sec   1.107 ms   26/28784 (0.09%)
[  3]  0.0-10.0 sec  11 datagrams received out-of-order


+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++

10 secs 150M
.54 Server
.87 Client
file Iperf149_10

#On .54 (Server)

[  3] local 192.168.149.54 port 5001 connected with 192.168.149.87 port 43174
[  3]  0.0-10.0 sec  40.6 MBytes  34.1 Mbits/sec   1.108 ms   48/29026 (0.17%)
[  3]  0.0-10.0 sec  11 datagrams received out-of-order

#On .87 (Client)

[  3] local 192.168.149.87 port 43174 connected with 192.168.149.54 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  40.7 MBytes  34.1 Mbits/sec
[  3] Sent 29027 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec  40.6 MBytes  34.1 Mbits/sec   1.108 ms   48/29026 (0.17%)
[  3]  0.0-10.0 sec  11 datagrams received out-of-order


34.1Mbps seems to be the max in HT20; looking the station dump .87 shows 6Mbps, .54 26MCS3 
(that's ok for HT20 without the SGI), however the max nominal throughput for HT20 nonSGI
and 1 spatial stream is 65M (using a 64QAM).
.54 seems to stuch on MCS3 (watch -n<timeinterval> iw <interfacename> station dump)

+++++++++++++++++++++++++++++++++++++++++
###IPERF WITH HT40+ OPTION###
+++++++++++++++++++++++++++++++++++++++++
###DELETED AND REBUILTED TWO INTERFACES WITH HT40+ OPTION###

.54 Server
.87 Client
file Iperf149_11

#On the .87 (Client)

root@Yazi:~# iperf -c 192.168.149.54 -u -t10 -b150M
------------------------------------------------------------
Client connecting to 192.168.149.54, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.149.87 port 59120 connected with 192.168.149.54 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  54.2 MBytes  45.4 Mbits/sec
[  3] Sent 38647 datagrams
[  3] Server Report:
[  3]  0.0- 9.9 sec  54.1 MBytes  46.0 Mbits/sec   0.887 ms   46/38646 (0.12%)
[  3]  0.0- 9.9 sec  29 datagrams received out-of-order
root@Yazi:~# iperf -c 192.168.149.54 -u -t10 -b250M
------------------------------------------------------------
Client connecting to 192.168.149.54, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.149.87 port 54305 connected with 192.168.149.54 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  56.5 MBytes  47.4 Mbits/sec
[  3] Sent 40289 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec  56.4 MBytes  47.3 Mbits/sec   0.659 ms   80/40288 (0.2%)
[  3]  0.0-10.0 sec  1 datagrams received out-of-order
root@Yazi:~# iperf -c 192.168.149.54 -u -t10 -b250M
------------------------------------------------------------
Client connecting to 192.168.149.54, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.149.87 port 42853 connected with 192.168.149.54 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  56.3 MBytes  47.2 Mbits/sec
[  3] Sent 40154 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec  56.2 MBytes  47.1 Mbits/sec   0.666 ms   81/40153 (0.2%)
[  3]  0.0-10.0 sec  1 datagrams received out-of-order

#47.4 seems to be the limit, but .54 changes the bit rates, the MCS and even the GI
#.87 stuck on 6

+++++++++++++++++++++++++++++++++++++++++++
###Change roles with the same parameters###

.87 Server
.54 Client
[  3] local 192.168.149.54 port 59978 connected with 192.168.149.87 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  15.4 MBytes  12.9 Mbits/sec
[  3] Sent 11013 datagrams
[  3] Server Report:
[  3]  0.0-10.3 sec  13.3 MBytes  10.9 Mbits/sec   5.268 ms 1514/11012 (14%)
[  3]  0.0-10.3 sec  19 datagrams received out-of-order






By setting the channel
iw dev <interfacename> set channel <channel> [HT20|HT40-|HT40+]
the syslog is spammed with the repetition of

[17554.919459] ------------[ cut here ]------------
[17554.919839] WARNING: CPU: 0 PID: 0 at /home/matteo/linux-imx6/backports4.4.2-i2CAT/net/mac80211/util.c:2621 ieee80211_calculate_rx_timestamp+0x204/0x278 [mac80211]()
[17554.919855] Modules linked in: arc4 sky2 ath10k_pci(O) ath10k_core(O) ath(O) mac80211(O) cfg80211(O) compat(O)
[17554.919926] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O 3.14.48-g408ccb9 #4
[17554.919990] [<80015050>] (unwind_backtrace) from [<80011330>] (show_stack+0x10/0x14)
[17554.920038] [<80011330>] (show_stack) from [<806537dc>] (dump_stack+0x80/0x90)
[17554.920074] [<806537dc>] (dump_stack) from [<8002c578>] (warn_slowpath_common+0x6c/0x88)
[17554.920103] [<8002c578>] (warn_slowpath_common) from [<8002c630>] (warn_slowpath_null+0x1c/0x24)
[17554.920377] [<8002c630>] (warn_slowpath_null) from [<7f089c74>] (ieee80211_calculate_rx_timestamp+0x204/0x278 [mac80211])
[17554.920826] [<7f089c74>] (ieee80211_calculate_rx_timestamp [mac80211]) from [<7f07d724>] (ieee80211_rx_napi+0xcc/0x8d4 [mac80211])
[17554.921259] [<7f07d724>] (ieee80211_rx_napi [mac80211]) from [<7f117fd0>] (ath10k_wmi_event_mgmt_rx+0x1f4/0x35c [ath10k_core])
[17554.921540] [<7f117fd0>] (ath10k_wmi_event_mgmt_rx [ath10k_core]) from [<7f10d844>] (ath10k_htc_rx_completion_handler+0x1cc/0x464 [ath10k_core])
[17554.921706] [<7f10d844>] (ath10k_htc_rx_completion_handler [ath10k_core]) from [<7f157b4c>] (ath10k_pci_process_rx_cb+0x1ac/0x1fc [ath10k_pci])
[17554.921773] [<7f157b4c>] (ath10k_pci_process_rx_cb [ath10k_pci]) from [<7f15b3ac>] (ath10k_ce_per_engine_service+0x5c/0x94 [ath10k_pci])
[17554.921835] [<7f15b3ac>] (ath10k_ce_per_engine_service [ath10k_pci]) from [<7f15b464>] (ath10k_ce_per_engine_service_any+0x80/0x88 [ath10k_pci])
[17554.921892] [<7f15b464>] (ath10k_ce_per_engine_service_any [ath10k_pci]) from [<7f15a6d8>] (ath10k_pci_tasklet+0x24/0x5c [ath10k_pci])
[17554.921946] [<7f15a6d8>] (ath10k_pci_tasklet [ath10k_pci]) from [<800304c8>] (tasklet_action+0x80/0x110)
[17554.921979] [<800304c8>] (tasklet_action) from [<800306b8>] (__do_softirq+0x10c/0x248)
[17554.922009] [<800306b8>] (__do_softirq) from [<80030a6c>] (irq_exit+0xac/0xf4)
[17554.922042] [<80030a6c>] (irq_exit) from [<8000e904>] (handle_IRQ+0x44/0x90)
[17554.922072] [<8000e904>] (handle_IRQ) from [<800084f8>] (gic_handle_irq+0x2c/0x5c)
[17554.922105] [<800084f8>] (gic_handle_irq) from [<80011e00>] (__irq_svc+0x40/0x50)
[17554.922122] Exception stack(0x80917f18 to 0x80917f60)
[17554.922141] 7f00:                                                       80917f60 000d3334
[17554.922166] 7f20: 5221e106 00000ff7 4d693c44 00000ff7 a7705010 80924060 00000001 a7705014
[17554.922190] 7f40: 8096243d 80916000 00000017 80917f60 a6aaaaab 80492940 60000013 ffffffff
[17554.922224] [<80011e00>] (__irq_svc) from [<80492940>] (cpuidle_enter_state+0x50/0xe0)
[17554.922252] [<80492940>] (cpuidle_enter_state) from [<80492ac8>] (cpuidle_idle_call+0xf8/0x148)
[17554.922281] [<80492ac8>] (cpuidle_idle_call) from [<8000ec48>] (arch_cpu_idle+0x8/0x44)
[17554.922322] [<8000ec48>] (arch_cpu_idle) from [<80066648>] (cpu_startup_entry+0xfc/0x140)
[17554.922362] [<80066648>] (cpu_startup_entry) from [<808c5b08>] (start_kernel+0x360/0x36c)
[17554.922379] ---[ end trace 87d4775146813aed ]---
[17555.943454] ------------[ cut here ]------------

As soon as the HT40+ interface is deleted , it stops

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ath10k stuck on 6Mbps and spam syslog
  2016-09-29 13:39 ath10k stuck on 6Mbps and spam syslog Matteo Grandi
@ 2016-09-29 14:47 ` Ben Greear
  2016-09-30  7:23   ` Matteo Grandi
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Greear @ 2016-09-29 14:47 UTC (permalink / raw)
  To: Matteo Grandi, LinuxWireless Mailing List

stock ath10k firmware does not report tx-rate so the kernel always sees 6Mbps.

I don't know about the splat..maybe post the function
that is causing that?

/home/matteo/linux-imx6/backports4.4.2-i2CAT/net/mac80211/util.c:2621

Thanks,
Ben

On 09/29/2016 06:39 AM, Matteo Grandi wrote:
> Hello all,
>
> I'm struggling with a problem related on ath10k drivers:
> I'm using a Compex WLE600V5-27 (802.11ac) miniPCIe card for some HT
> tests needed for my thesis.
> I'm using ath10k drivers for this card, and backports-4.4.2, in
> particular the firmware-5.bin_10.2.4.70.54 because it seem to be the
> more recent.
> I've connected in mesh mode the WLE600V5 card with an 802.11n card
> (using ath9k drivers) but looking at the station dump, the tx bitrate
> is stuck on 6.0 Mbit/s for the ath10k. The ath9k one works well and
> watch -n1 iw <interfacename> station dump
> let me see changes of the tx rate and MCS on the ath9k during iperf
> tests, but the ath10k stucks on 6.0 Mbit/s.
>
> Then something misterious (for me) happen while the channel
> assignment: the syslog is spammed by this message:
>
> [17554.919459] ------------[ cut here ]------------
> [17554.919839] WARNING: CPU: 0 PID: 0 at
> /home/matteo/linux-imx6/backports4.4.2-i2CAT/net/mac80211/util.c:2621
> ieee80211_calculate_rx_timestamp+0x204/0x278 [mac80211]()
> [17554.919855] Modules linked in: arc4 sky2 ath10k_pci(O)
> ath10k_core(O) ath(O) mac80211(O) cfg80211(O) compat(O)
> [17554.919926] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O
> 3.14.48-g408ccb9 #4
> [17554.919990] [<80015050>] (unwind_backtrace) from [<80011330>]
> (show_stack+0x10/0x14)
> [17554.920038] [<80011330>] (show_stack) from [<806537dc>]
> (dump_stack+0x80/0x90)
> [17554.920074] [<806537dc>] (dump_stack) from [<8002c578>]
> (warn_slowpath_common+0x6c/0x88)
> [17554.920103] [<8002c578>] (warn_slowpath_common) from [<8002c630>]
> (warn_slowpath_null+0x1c/0x24)
> [17554.920377] [<8002c630>] (warn_slowpath_null) from [<7f089c74>]
> (ieee80211_calculate_rx_timestamp+0x204/0x278 [mac80211])
> [17554.920826] [<7f089c74>] (ieee80211_calculate_rx_timestamp
> [mac80211]) from [<7f07d724>] (ieee80211_rx_napi+0xcc/0x8d4
> [mac80211])
> [17554.921259] [<7f07d724>] (ieee80211_rx_napi [mac80211]) from
> [<7f117fd0>] (ath10k_wmi_event_mgmt_rx+0x1f4/0x35c [ath10k_core])
> [17554.921540] [<7f117fd0>] (ath10k_wmi_event_mgmt_rx [ath10k_core])
> from [<7f10d844>] (ath10k_htc_rx_completion_handler+0x1cc/0x464
> [ath10k_core])
> [17554.921706] [<7f10d844>] (ath10k_htc_rx_completion_handler
> [ath10k_core]) from [<7f157b4c>] (ath10k_pci_process_rx_cb+0x1ac/0x1fc
> [ath10k_pci])
> [17554.921773] [<7f157b4c>] (ath10k_pci_process_rx_cb [ath10k_pci])
> from [<7f15b3ac>] (ath10k_ce_per_engine_service+0x5c/0x94
> [ath10k_pci])
> [17554.921835] [<7f15b3ac>] (ath10k_ce_per_engine_service
> [ath10k_pci]) from [<7f15b464>]
> (ath10k_ce_per_engine_service_any+0x80/0x88 [ath10k_pci])
> [17554.921892] [<7f15b464>] (ath10k_ce_per_engine_service_any
> [ath10k_pci]) from [<7f15a6d8>] (ath10k_pci_tasklet+0x24/0x5c
> [ath10k_pci])
> [17554.921946] [<7f15a6d8>] (ath10k_pci_tasklet [ath10k_pci]) from
> [<800304c8>] (tasklet_action+0x80/0x110)
> [17554.921979] [<800304c8>] (tasklet_action) from [<800306b8>]
> (__do_softirq+0x10c/0x248)
> [17554.922009] [<800306b8>] (__do_softirq) from [<80030a6c>]
> (irq_exit+0xac/0xf4)
> [17554.922042] [<80030a6c>] (irq_exit) from [<8000e904>] (handle_IRQ+0x44/0x90)
> [17554.922072] [<8000e904>] (handle_IRQ) from [<800084f8>]
> (gic_handle_irq+0x2c/0x5c)
> [17554.922105] [<800084f8>] (gic_handle_irq) from [<80011e00>]
> (__irq_svc+0x40/0x50)
> [17554.922122] Exception stack(0x80917f18 to 0x80917f60)
> [17554.922141] 7f00:
>      80917f60 000d3334
> [17554.922166] 7f20: 5221e106 00000ff7 4d693c44 00000ff7 a7705010
> 80924060 00000001 a7705014
> [17554.922190] 7f40: 8096243d 80916000 00000017 80917f60 a6aaaaab
> 80492940 60000013 ffffffff
> [17554.922224] [<80011e00>] (__irq_svc) from [<80492940>]
> (cpuidle_enter_state+0x50/0xe0)
> [17554.922252] [<80492940>] (cpuidle_enter_state) from [<80492ac8>]
> (cpuidle_idle_call+0xf8/0x148)
> [17554.922281] [<80492ac8>] (cpuidle_idle_call) from [<8000ec48>]
> (arch_cpu_idle+0x8/0x44)
> [17554.922322] [<8000ec48>] (arch_cpu_idle) from [<80066648>]
> (cpu_startup_entry+0xfc/0x140)
> [17554.922362] [<80066648>] (cpu_startup_entry) from [<808c5b08>]
> (start_kernel+0x360/0x36c)
> [17554.922379] ---[ end trace 87d4775146813aed ]---
> [17555.943454] ------------[ cut here ]------------
>
> that repeat continuously...
> Forcing legacy bitrates doesn't change the situation.
>
> I made some measurements using iperf, please find it in attachment.
>
> Other info:
>
> root@Yazi:~# modinfo ath10k_pci
> filename:
> /lib/modules/3.14.48-g408ccb9/kernel/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
> firmware:       ath10k/QCA9377/hw1.0/board.bin
> firmware:       ath10k/QCA9377/hw1.0/firmware-5.bin
> firmware:       ath10k/QCA6174/hw3.0/board-2.bin
> firmware:       ath10k/QCA6174/hw3.0/board.bin
> firmware:       ath10k/QCA6174/hw3.0/firmware-5.bin
> firmware:       ath10k/QCA6174/hw3.0/firmware-4.bin
> firmware:       ath10k/QCA6174/hw2.1/board-2.bin
> firmware:       ath10k/QCA6174/hw2.1/board.bin
> firmware:       ath10k/QCA6174/hw2.1/firmware-5.bin
> firmware:       ath10k/QCA6174/hw2.1/firmware-4.bin
> firmware:       ath10k/QCA988X/hw2.0/board-2.bin
> firmware:       ath10k/QCA988X/hw2.0/board.bin
> firmware:       ath10k/QCA988X/hw2.0/firmware-5.bin
> firmware:       ath10k/QCA988X/hw2.0/firmware-4.bin
> firmware:       ath10k/QCA988X/hw2.0/firmware-3.bin
> firmware:       ath10k/QCA988X/hw2.0/firmware-2.bin
> firmware:       ath10k/QCA988X/hw2.0/firmware.bin
> license:        Dual BSD/GPL
> description:    Driver support for Atheros QCA988X PCIe devices
> author:         Qualcomm Atheros
> version:        backported from Linux (v4.4.2-0-g1cb8570) using
> backports v4.4.2-1-0-gbec4037
> srcversion:     EBB3D4E36DE49B7EC8057D0
> alias:          pci:v0000168Cd00000042sv*sd*bc*sc*i*
> alias:          pci:v0000168Cd00000040sv*sd*bc*sc*i*
> alias:          pci:v0000168Cd0000003Esv*sd*bc*sc*i*
> alias:          pci:v0000168Cd00000041sv*sd*bc*sc*i*
> alias:          pci:v0000168Cd0000003Csv*sd*bc*sc*i*
> depends:        ath10k_core,compat
> vermagic:       3.14.48-g408ccb9 SMP mod_unload modversions ARMv7 p2v8
> parm:           irq_mode:0: auto, 1: legacy, 2: msi (default: 0) (uint)
> parm:           reset_mode:0: auto, 1: warm only (default: 0) (uint)
>
> I don't know if it's only a problem of iw station dump that can't show
> the tx rate, but the spammed syslog honestly warn me...
>
> How shall I check what's wrong and see the HT work?
>
> Thanks a lot!
>
> Matteo
>

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ath10k stuck on 6Mbps and spam syslog
  2016-09-29 14:47 ` Ben Greear
@ 2016-09-30  7:23   ` Matteo Grandi
  2016-09-30 14:22     ` Ben Greear
  0 siblings, 1 reply; 4+ messages in thread
From: Matteo Grandi @ 2016-09-30  7:23 UTC (permalink / raw)
  To: Ben Greear; +Cc: LinuxWireless Mailing List

Dear Ben,
Thank you for your reply.
The fact that stock ath10k firmware does not report tx-rate explains
why the station dump shows 6Mbps but the iperf test reach 14.6 (even
if it is really under the expected data rate...).
About the syslog spam, this is the code of the function that seems to
cause the error (I put a comment at line 2621 side). (The warning
start to spam as soon as I assign the channel "iw dev <if_name> set
channel <ch_number>)

/**
 * ieee80211_calculate_rx_timestamp - calculate timestamp in frame
 * @local: mac80211 hw info struct
 * @status: RX status
 * @mpdu_len: total MPDU length (including FCS)
 * @mpdu_offset: offset into MPDU to calculate timestamp at
 *
 * This function calculates the RX timestamp at the given MPDU offset, taking
 * into account what the RX timestamp was. An offset of 0 will just normalize
 * the timestamp to TSF at beginning of MPDU reception.
 */
u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local,
    struct ieee80211_rx_status *status,
    unsigned int mpdu_len,
    unsigned int mpdu_offset)
{
u64 ts = status->mactime;
struct rate_info ri;
u16 rate;

if (WARN_ON(!ieee80211_have_rx_timestamp(status)))    //this is the
line 2621 reported in the warning
return 0;

memset(&ri, 0, sizeof(ri));

/* Fill cfg80211 rate info */
if (status->flag & RX_FLAG_HT) {
ri.mcs = status->rate_idx;
ri.flags |= RATE_INFO_FLAGS_MCS;
if (status->flag & RX_FLAG_40MHZ)
ri.bw = RATE_INFO_BW_40;
else
ri.bw = RATE_INFO_BW_20;
if (status->flag & RX_FLAG_SHORT_GI)
ri.flags |= RATE_INFO_FLAGS_SHORT_GI;
} else if (status->flag & RX_FLAG_VHT) {
ri.flags |= RATE_INFO_FLAGS_VHT_MCS;
ri.mcs = status->rate_idx;
ri.nss = status->vht_nss;
if (status->flag & RX_FLAG_40MHZ)
ri.bw = RATE_INFO_BW_40;
else if (status->vht_flag & RX_VHT_FLAG_80MHZ)
ri.bw = RATE_INFO_BW_80;
else if (status->vht_flag & RX_VHT_FLAG_160MHZ)
ri.bw = RATE_INFO_BW_160;
else
ri.bw = RATE_INFO_BW_20;
if (status->flag & RX_FLAG_SHORT_GI)
ri.flags |= RATE_INFO_FLAGS_SHORT_GI;
} else {
struct ieee80211_supported_band *sband;
int shift = 0;
int bitrate;

if (status->flag & RX_FLAG_10MHZ) {
shift = 1;
ri.bw = RATE_INFO_BW_10;
} else if (status->flag & RX_FLAG_5MHZ) {
shift = 2;
ri.bw = RATE_INFO_BW_5;
} else {
ri.bw = RATE_INFO_BW_20;
}

sband = local->hw.wiphy->bands[status->band];
bitrate = sband->bitrates[status->rate_idx].bitrate;
ri.legacy = DIV_ROUND_UP(bitrate, (1 << shift));
}

rate = cfg80211_calculate_bitrate(&ri);
if (WARN_ONCE(!rate,
     "Invalid bitrate: flags=0x%x, idx=%d, vht_nss=%d\n",
     status->flag, status->rate_idx, status->vht_nss))
return 0;

/* rewind from end of MPDU */
if (status->flag & RX_FLAG_MACTIME_END)
ts -= mpdu_len * 8 * 10 / rate;

ts += mpdu_offset * 8 * 10 / rate;
/* [SESAME] I2CAT. dbg*/
//printk(KERN_DEBUG "calculate_rx_timestamp: ts = %lu;\t rate =
%lu;\tmpdu_offset = %lu;\tmpdu_len = %lu\n",
// (long unsigned int) ts, (long unsigned int) rate, (long unsigned
int) mpdu_offset, (long unsigned int) mpdu_len );

return ts;
}

Thank you so much!

All the best

Matteo


2016-09-29 16:47 GMT+02:00 Ben Greear <greearb@candelatech.com>:
> stock ath10k firmware does not report tx-rate so the kernel always sees
> 6Mbps.
>
> I don't know about the splat..maybe post the function
> that is causing that?
>
> /home/matteo/linux-imx6/backports4.4.2-i2CAT/net/mac80211/util.c:2621
>
> Thanks,
> Ben
>
>
> On 09/29/2016 06:39 AM, Matteo Grandi wrote:
>>
>> Hello all,
>>
>> I'm struggling with a problem related on ath10k drivers:
>> I'm using a Compex WLE600V5-27 (802.11ac) miniPCIe card for some HT
>> tests needed for my thesis.
>> I'm using ath10k drivers for this card, and backports-4.4.2, in
>> particular the firmware-5.bin_10.2.4.70.54 because it seem to be the
>> more recent.
>> I've connected in mesh mode the WLE600V5 card with an 802.11n card
>> (using ath9k drivers) but looking at the station dump, the tx bitrate
>> is stuck on 6.0 Mbit/s for the ath10k. The ath9k one works well and
>> watch -n1 iw <interfacename> station dump
>> let me see changes of the tx rate and MCS on the ath9k during iperf
>> tests, but the ath10k stucks on 6.0 Mbit/s.
>>
>> Then something misterious (for me) happen while the channel
>> assignment: the syslog is spammed by this message:
>>
>> [17554.919459] ------------[ cut here ]------------
>> [17554.919839] WARNING: CPU: 0 PID: 0 at
>> /home/matteo/linux-imx6/backports4.4.2-i2CAT/net/mac80211/util.c:2621
>> ieee80211_calculate_rx_timestamp+0x204/0x278 [mac80211]()
>> [17554.919855] Modules linked in: arc4 sky2 ath10k_pci(O)
>> ath10k_core(O) ath(O) mac80211(O) cfg80211(O) compat(O)
>> [17554.919926] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O
>> 3.14.48-g408ccb9 #4
>> [17554.919990] [<80015050>] (unwind_backtrace) from [<80011330>]
>> (show_stack+0x10/0x14)
>> [17554.920038] [<80011330>] (show_stack) from [<806537dc>]
>> (dump_stack+0x80/0x90)
>> [17554.920074] [<806537dc>] (dump_stack) from [<8002c578>]
>> (warn_slowpath_common+0x6c/0x88)
>> [17554.920103] [<8002c578>] (warn_slowpath_common) from [<8002c630>]
>> (warn_slowpath_null+0x1c/0x24)
>> [17554.920377] [<8002c630>] (warn_slowpath_null) from [<7f089c74>]
>> (ieee80211_calculate_rx_timestamp+0x204/0x278 [mac80211])
>> [17554.920826] [<7f089c74>] (ieee80211_calculate_rx_timestamp
>> [mac80211]) from [<7f07d724>] (ieee80211_rx_napi+0xcc/0x8d4
>> [mac80211])
>> [17554.921259] [<7f07d724>] (ieee80211_rx_napi [mac80211]) from
>> [<7f117fd0>] (ath10k_wmi_event_mgmt_rx+0x1f4/0x35c [ath10k_core])
>> [17554.921540] [<7f117fd0>] (ath10k_wmi_event_mgmt_rx [ath10k_core])
>> from [<7f10d844>] (ath10k_htc_rx_completion_handler+0x1cc/0x464
>> [ath10k_core])
>> [17554.921706] [<7f10d844>] (ath10k_htc_rx_completion_handler
>> [ath10k_core]) from [<7f157b4c>] (ath10k_pci_process_rx_cb+0x1ac/0x1fc
>> [ath10k_pci])
>> [17554.921773] [<7f157b4c>] (ath10k_pci_process_rx_cb [ath10k_pci])
>> from [<7f15b3ac>] (ath10k_ce_per_engine_service+0x5c/0x94
>> [ath10k_pci])
>> [17554.921835] [<7f15b3ac>] (ath10k_ce_per_engine_service
>> [ath10k_pci]) from [<7f15b464>]
>> (ath10k_ce_per_engine_service_any+0x80/0x88 [ath10k_pci])
>> [17554.921892] [<7f15b464>] (ath10k_ce_per_engine_service_any
>> [ath10k_pci]) from [<7f15a6d8>] (ath10k_pci_tasklet+0x24/0x5c
>> [ath10k_pci])
>> [17554.921946] [<7f15a6d8>] (ath10k_pci_tasklet [ath10k_pci]) from
>> [<800304c8>] (tasklet_action+0x80/0x110)
>> [17554.921979] [<800304c8>] (tasklet_action) from [<800306b8>]
>> (__do_softirq+0x10c/0x248)
>> [17554.922009] [<800306b8>] (__do_softirq) from [<80030a6c>]
>> (irq_exit+0xac/0xf4)
>> [17554.922042] [<80030a6c>] (irq_exit) from [<8000e904>]
>> (handle_IRQ+0x44/0x90)
>> [17554.922072] [<8000e904>] (handle_IRQ) from [<800084f8>]
>> (gic_handle_irq+0x2c/0x5c)
>> [17554.922105] [<800084f8>] (gic_handle_irq) from [<80011e00>]
>> (__irq_svc+0x40/0x50)
>> [17554.922122] Exception stack(0x80917f18 to 0x80917f60)
>> [17554.922141] 7f00:
>>      80917f60 000d3334
>> [17554.922166] 7f20: 5221e106 00000ff7 4d693c44 00000ff7 a7705010
>> 80924060 00000001 a7705014
>> [17554.922190] 7f40: 8096243d 80916000 00000017 80917f60 a6aaaaab
>> 80492940 60000013 ffffffff
>> [17554.922224] [<80011e00>] (__irq_svc) from [<80492940>]
>> (cpuidle_enter_state+0x50/0xe0)
>> [17554.922252] [<80492940>] (cpuidle_enter_state) from [<80492ac8>]
>> (cpuidle_idle_call+0xf8/0x148)
>> [17554.922281] [<80492ac8>] (cpuidle_idle_call) from [<8000ec48>]
>> (arch_cpu_idle+0x8/0x44)
>> [17554.922322] [<8000ec48>] (arch_cpu_idle) from [<80066648>]
>> (cpu_startup_entry+0xfc/0x140)
>> [17554.922362] [<80066648>] (cpu_startup_entry) from [<808c5b08>]
>> (start_kernel+0x360/0x36c)
>> [17554.922379] ---[ end trace 87d4775146813aed ]---
>> [17555.943454] ------------[ cut here ]------------
>>
>> that repeat continuously...
>> Forcing legacy bitrates doesn't change the situation.
>>
>> I made some measurements using iperf, please find it in attachment.
>>
>> Other info:
>>
>> root@Yazi:~# modinfo ath10k_pci
>> filename:
>>
>> /lib/modules/3.14.48-g408ccb9/kernel/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
>> firmware:       ath10k/QCA9377/hw1.0/board.bin
>> firmware:       ath10k/QCA9377/hw1.0/firmware-5.bin
>> firmware:       ath10k/QCA6174/hw3.0/board-2.bin
>> firmware:       ath10k/QCA6174/hw3.0/board.bin
>> firmware:       ath10k/QCA6174/hw3.0/firmware-5.bin
>> firmware:       ath10k/QCA6174/hw3.0/firmware-4.bin
>> firmware:       ath10k/QCA6174/hw2.1/board-2.bin
>> firmware:       ath10k/QCA6174/hw2.1/board.bin
>> firmware:       ath10k/QCA6174/hw2.1/firmware-5.bin
>> firmware:       ath10k/QCA6174/hw2.1/firmware-4.bin
>> firmware:       ath10k/QCA988X/hw2.0/board-2.bin
>> firmware:       ath10k/QCA988X/hw2.0/board.bin
>> firmware:       ath10k/QCA988X/hw2.0/firmware-5.bin
>> firmware:       ath10k/QCA988X/hw2.0/firmware-4.bin
>> firmware:       ath10k/QCA988X/hw2.0/firmware-3.bin
>> firmware:       ath10k/QCA988X/hw2.0/firmware-2.bin
>> firmware:       ath10k/QCA988X/hw2.0/firmware.bin
>> license:        Dual BSD/GPL
>> description:    Driver support for Atheros QCA988X PCIe devices
>> author:         Qualcomm Atheros
>> version:        backported from Linux (v4.4.2-0-g1cb8570) using
>> backports v4.4.2-1-0-gbec4037
>> srcversion:     EBB3D4E36DE49B7EC8057D0
>> alias:          pci:v0000168Cd00000042sv*sd*bc*sc*i*
>> alias:          pci:v0000168Cd00000040sv*sd*bc*sc*i*
>> alias:          pci:v0000168Cd0000003Esv*sd*bc*sc*i*
>> alias:          pci:v0000168Cd00000041sv*sd*bc*sc*i*
>> alias:          pci:v0000168Cd0000003Csv*sd*bc*sc*i*
>> depends:        ath10k_core,compat
>> vermagic:       3.14.48-g408ccb9 SMP mod_unload modversions ARMv7 p2v8
>> parm:           irq_mode:0: auto, 1: legacy, 2: msi (default: 0) (uint)
>> parm:           reset_mode:0: auto, 1: warm only (default: 0) (uint)
>>
>> I don't know if it's only a problem of iw station dump that can't show
>> the tx rate, but the spammed syslog honestly warn me...
>>
>> How shall I check what's wrong and see the HT work?
>>
>> Thanks a lot!
>>
>> Matteo
>>
>
> --
> Ben Greear <greearb@candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ath10k stuck on 6Mbps and spam syslog
  2016-09-30  7:23   ` Matteo Grandi
@ 2016-09-30 14:22     ` Ben Greear
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Greear @ 2016-09-30 14:22 UTC (permalink / raw)
  To: Matteo Grandi; +Cc: LinuxWireless Mailing List

At least some stock ath10k firmware can send frames at CCK (.11b) encodings
on 5Ghz, which is out-of-spec, and may cause this warning.  Maybe you
could check the values printed and see if that is indeed what is causing
this splat?

Thanks,
Ben

On 09/30/2016 12:23 AM, Matteo Grandi wrote:
> Dear Ben,
> Thank you for your reply.
> The fact that stock ath10k firmware does not report tx-rate explains
> why the station dump shows 6Mbps but the iperf test reach 14.6 (even
> if it is really under the expected data rate...).
> About the syslog spam, this is the code of the function that seems to
> cause the error (I put a comment at line 2621 side). (The warning
> start to spam as soon as I assign the channel "iw dev <if_name> set
> channel <ch_number>)
>
> /**
>   * ieee80211_calculate_rx_timestamp - calculate timestamp in frame
>   * @local: mac80211 hw info struct
>   * @status: RX status
>   * @mpdu_len: total MPDU length (including FCS)
>   * @mpdu_offset: offset into MPDU to calculate timestamp at
>   *
>   * This function calculates the RX timestamp at the given MPDU offset, taking
>   * into account what the RX timestamp was. An offset of 0 will just normalize
>   * the timestamp to TSF at beginning of MPDU reception.
>   */
> u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local,
>      struct ieee80211_rx_status *status,
>      unsigned int mpdu_len,
>      unsigned int mpdu_offset)
> {
> u64 ts = status->mactime;
> struct rate_info ri;
> u16 rate;
>
> if (WARN_ON(!ieee80211_have_rx_timestamp(status)))    //this is the
> line 2621 reported in the warning
> return 0;
>
> memset(&ri, 0, sizeof(ri));
>
> /* Fill cfg80211 rate info */
> if (status->flag & RX_FLAG_HT) {
> ri.mcs = status->rate_idx;
> ri.flags |= RATE_INFO_FLAGS_MCS;
> if (status->flag & RX_FLAG_40MHZ)
> ri.bw = RATE_INFO_BW_40;
> else
> ri.bw = RATE_INFO_BW_20;
> if (status->flag & RX_FLAG_SHORT_GI)
> ri.flags |= RATE_INFO_FLAGS_SHORT_GI;
> } else if (status->flag & RX_FLAG_VHT) {
> ri.flags |= RATE_INFO_FLAGS_VHT_MCS;
> ri.mcs = status->rate_idx;
> ri.nss = status->vht_nss;
> if (status->flag & RX_FLAG_40MHZ)
> ri.bw = RATE_INFO_BW_40;
> else if (status->vht_flag & RX_VHT_FLAG_80MHZ)
> ri.bw = RATE_INFO_BW_80;
> else if (status->vht_flag & RX_VHT_FLAG_160MHZ)
> ri.bw = RATE_INFO_BW_160;
> else
> ri.bw = RATE_INFO_BW_20;
> if (status->flag & RX_FLAG_SHORT_GI)
> ri.flags |= RATE_INFO_FLAGS_SHORT_GI;
> } else {
> struct ieee80211_supported_band *sband;
> int shift = 0;
> int bitrate;
>
> if (status->flag & RX_FLAG_10MHZ) {
> shift = 1;
> ri.bw = RATE_INFO_BW_10;
> } else if (status->flag & RX_FLAG_5MHZ) {
> shift = 2;
> ri.bw = RATE_INFO_BW_5;
> } else {
> ri.bw = RATE_INFO_BW_20;
> }
>
> sband = local->hw.wiphy->bands[status->band];
> bitrate = sband->bitrates[status->rate_idx].bitrate;
> ri.legacy = DIV_ROUND_UP(bitrate, (1 << shift));
> }
>
> rate = cfg80211_calculate_bitrate(&ri);
> if (WARN_ONCE(!rate,
>       "Invalid bitrate: flags=0x%x, idx=%d, vht_nss=%d\n",
>       status->flag, status->rate_idx, status->vht_nss))
> return 0;
>
> /* rewind from end of MPDU */
> if (status->flag & RX_FLAG_MACTIME_END)
> ts -= mpdu_len * 8 * 10 / rate;
>
> ts += mpdu_offset * 8 * 10 / rate;
> /* [SESAME] I2CAT. dbg*/
> //printk(KERN_DEBUG "calculate_rx_timestamp: ts = %lu;\t rate =
> %lu;\tmpdu_offset = %lu;\tmpdu_len = %lu\n",
> // (long unsigned int) ts, (long unsigned int) rate, (long unsigned
> int) mpdu_offset, (long unsigned int) mpdu_len );
>
> return ts;
> }
>
> Thank you so much!
>
> All the best
>
> Matteo
>
>
> 2016-09-29 16:47 GMT+02:00 Ben Greear <greearb@candelatech.com>:
>> stock ath10k firmware does not report tx-rate so the kernel always sees
>> 6Mbps.
>>
>> I don't know about the splat..maybe post the function
>> that is causing that?
>>
>> /home/matteo/linux-imx6/backports4.4.2-i2CAT/net/mac80211/util.c:2621
>>
>> Thanks,
>> Ben
>>
>>
>> On 09/29/2016 06:39 AM, Matteo Grandi wrote:
>>>
>>> Hello all,
>>>
>>> I'm struggling with a problem related on ath10k drivers:
>>> I'm using a Compex WLE600V5-27 (802.11ac) miniPCIe card for some HT
>>> tests needed for my thesis.
>>> I'm using ath10k drivers for this card, and backports-4.4.2, in
>>> particular the firmware-5.bin_10.2.4.70.54 because it seem to be the
>>> more recent.
>>> I've connected in mesh mode the WLE600V5 card with an 802.11n card
>>> (using ath9k drivers) but looking at the station dump, the tx bitrate
>>> is stuck on 6.0 Mbit/s for the ath10k. The ath9k one works well and
>>> watch -n1 iw <interfacename> station dump
>>> let me see changes of the tx rate and MCS on the ath9k during iperf
>>> tests, but the ath10k stucks on 6.0 Mbit/s.
>>>
>>> Then something misterious (for me) happen while the channel
>>> assignment: the syslog is spammed by this message:
>>>
>>> [17554.919459] ------------[ cut here ]------------
>>> [17554.919839] WARNING: CPU: 0 PID: 0 at
>>> /home/matteo/linux-imx6/backports4.4.2-i2CAT/net/mac80211/util.c:2621
>>> ieee80211_calculate_rx_timestamp+0x204/0x278 [mac80211]()
>>> [17554.919855] Modules linked in: arc4 sky2 ath10k_pci(O)
>>> ath10k_core(O) ath(O) mac80211(O) cfg80211(O) compat(O)
>>> [17554.919926] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O
>>> 3.14.48-g408ccb9 #4
>>> [17554.919990] [<80015050>] (unwind_backtrace) from [<80011330>]
>>> (show_stack+0x10/0x14)
>>> [17554.920038] [<80011330>] (show_stack) from [<806537dc>]
>>> (dump_stack+0x80/0x90)
>>> [17554.920074] [<806537dc>] (dump_stack) from [<8002c578>]
>>> (warn_slowpath_common+0x6c/0x88)
>>> [17554.920103] [<8002c578>] (warn_slowpath_common) from [<8002c630>]
>>> (warn_slowpath_null+0x1c/0x24)
>>> [17554.920377] [<8002c630>] (warn_slowpath_null) from [<7f089c74>]
>>> (ieee80211_calculate_rx_timestamp+0x204/0x278 [mac80211])
>>> [17554.920826] [<7f089c74>] (ieee80211_calculate_rx_timestamp
>>> [mac80211]) from [<7f07d724>] (ieee80211_rx_napi+0xcc/0x8d4
>>> [mac80211])
>>> [17554.921259] [<7f07d724>] (ieee80211_rx_napi [mac80211]) from
>>> [<7f117fd0>] (ath10k_wmi_event_mgmt_rx+0x1f4/0x35c [ath10k_core])
>>> [17554.921540] [<7f117fd0>] (ath10k_wmi_event_mgmt_rx [ath10k_core])
>>> from [<7f10d844>] (ath10k_htc_rx_completion_handler+0x1cc/0x464
>>> [ath10k_core])
>>> [17554.921706] [<7f10d844>] (ath10k_htc_rx_completion_handler
>>> [ath10k_core]) from [<7f157b4c>] (ath10k_pci_process_rx_cb+0x1ac/0x1fc
>>> [ath10k_pci])
>>> [17554.921773] [<7f157b4c>] (ath10k_pci_process_rx_cb [ath10k_pci])
>>> from [<7f15b3ac>] (ath10k_ce_per_engine_service+0x5c/0x94
>>> [ath10k_pci])
>>> [17554.921835] [<7f15b3ac>] (ath10k_ce_per_engine_service
>>> [ath10k_pci]) from [<7f15b464>]
>>> (ath10k_ce_per_engine_service_any+0x80/0x88 [ath10k_pci])
>>> [17554.921892] [<7f15b464>] (ath10k_ce_per_engine_service_any
>>> [ath10k_pci]) from [<7f15a6d8>] (ath10k_pci_tasklet+0x24/0x5c
>>> [ath10k_pci])
>>> [17554.921946] [<7f15a6d8>] (ath10k_pci_tasklet [ath10k_pci]) from
>>> [<800304c8>] (tasklet_action+0x80/0x110)
>>> [17554.921979] [<800304c8>] (tasklet_action) from [<800306b8>]
>>> (__do_softirq+0x10c/0x248)
>>> [17554.922009] [<800306b8>] (__do_softirq) from [<80030a6c>]
>>> (irq_exit+0xac/0xf4)
>>> [17554.922042] [<80030a6c>] (irq_exit) from [<8000e904>]
>>> (handle_IRQ+0x44/0x90)
>>> [17554.922072] [<8000e904>] (handle_IRQ) from [<800084f8>]
>>> (gic_handle_irq+0x2c/0x5c)
>>> [17554.922105] [<800084f8>] (gic_handle_irq) from [<80011e00>]
>>> (__irq_svc+0x40/0x50)
>>> [17554.922122] Exception stack(0x80917f18 to 0x80917f60)
>>> [17554.922141] 7f00:
>>>       80917f60 000d3334
>>> [17554.922166] 7f20: 5221e106 00000ff7 4d693c44 00000ff7 a7705010
>>> 80924060 00000001 a7705014
>>> [17554.922190] 7f40: 8096243d 80916000 00000017 80917f60 a6aaaaab
>>> 80492940 60000013 ffffffff
>>> [17554.922224] [<80011e00>] (__irq_svc) from [<80492940>]
>>> (cpuidle_enter_state+0x50/0xe0)
>>> [17554.922252] [<80492940>] (cpuidle_enter_state) from [<80492ac8>]
>>> (cpuidle_idle_call+0xf8/0x148)
>>> [17554.922281] [<80492ac8>] (cpuidle_idle_call) from [<8000ec48>]
>>> (arch_cpu_idle+0x8/0x44)
>>> [17554.922322] [<8000ec48>] (arch_cpu_idle) from [<80066648>]
>>> (cpu_startup_entry+0xfc/0x140)
>>> [17554.922362] [<80066648>] (cpu_startup_entry) from [<808c5b08>]
>>> (start_kernel+0x360/0x36c)
>>> [17554.922379] ---[ end trace 87d4775146813aed ]---
>>> [17555.943454] ------------[ cut here ]------------
>>>
>>> that repeat continuously...
>>> Forcing legacy bitrates doesn't change the situation.
>>>
>>> I made some measurements using iperf, please find it in attachment.
>>>
>>> Other info:
>>>
>>> root@Yazi:~# modinfo ath10k_pci
>>> filename:
>>>
>>> /lib/modules/3.14.48-g408ccb9/kernel/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
>>> firmware:       ath10k/QCA9377/hw1.0/board.bin
>>> firmware:       ath10k/QCA9377/hw1.0/firmware-5.bin
>>> firmware:       ath10k/QCA6174/hw3.0/board-2.bin
>>> firmware:       ath10k/QCA6174/hw3.0/board.bin
>>> firmware:       ath10k/QCA6174/hw3.0/firmware-5.bin
>>> firmware:       ath10k/QCA6174/hw3.0/firmware-4.bin
>>> firmware:       ath10k/QCA6174/hw2.1/board-2.bin
>>> firmware:       ath10k/QCA6174/hw2.1/board.bin
>>> firmware:       ath10k/QCA6174/hw2.1/firmware-5.bin
>>> firmware:       ath10k/QCA6174/hw2.1/firmware-4.bin
>>> firmware:       ath10k/QCA988X/hw2.0/board-2.bin
>>> firmware:       ath10k/QCA988X/hw2.0/board.bin
>>> firmware:       ath10k/QCA988X/hw2.0/firmware-5.bin
>>> firmware:       ath10k/QCA988X/hw2.0/firmware-4.bin
>>> firmware:       ath10k/QCA988X/hw2.0/firmware-3.bin
>>> firmware:       ath10k/QCA988X/hw2.0/firmware-2.bin
>>> firmware:       ath10k/QCA988X/hw2.0/firmware.bin
>>> license:        Dual BSD/GPL
>>> description:    Driver support for Atheros QCA988X PCIe devices
>>> author:         Qualcomm Atheros
>>> version:        backported from Linux (v4.4.2-0-g1cb8570) using
>>> backports v4.4.2-1-0-gbec4037
>>> srcversion:     EBB3D4E36DE49B7EC8057D0
>>> alias:          pci:v0000168Cd00000042sv*sd*bc*sc*i*
>>> alias:          pci:v0000168Cd00000040sv*sd*bc*sc*i*
>>> alias:          pci:v0000168Cd0000003Esv*sd*bc*sc*i*
>>> alias:          pci:v0000168Cd00000041sv*sd*bc*sc*i*
>>> alias:          pci:v0000168Cd0000003Csv*sd*bc*sc*i*
>>> depends:        ath10k_core,compat
>>> vermagic:       3.14.48-g408ccb9 SMP mod_unload modversions ARMv7 p2v8
>>> parm:           irq_mode:0: auto, 1: legacy, 2: msi (default: 0) (uint)
>>> parm:           reset_mode:0: auto, 1: warm only (default: 0) (uint)
>>>
>>> I don't know if it's only a problem of iw station dump that can't show
>>> the tx rate, but the spammed syslog honestly warn me...
>>>
>>> How shall I check what's wrong and see the HT work?
>>>
>>> Thanks a lot!
>>>
>>> Matteo
>>>
>>
>> --
>> Ben Greear <greearb@candelatech.com>
>> Candela Technologies Inc  http://www.candelatech.com
>


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-30 14:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29 13:39 ath10k stuck on 6Mbps and spam syslog Matteo Grandi
2016-09-29 14:47 ` Ben Greear
2016-09-30  7:23   ` Matteo Grandi
2016-09-30 14:22     ` Ben Greear

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.