This documents some of the features of the Ath10k-CT Firmware and driver.
[3538979.051973] ath10k_pci 0000:07:00.0: ath10k_pci ATH10K_DBG_BUFFER: [3538979.051998] ath10k: : 07F90DB9 0BFC4C21 00000BAC 00000002 07F9100C 0BFC4C21 00000BF2 00000002 [3538979.052001] ath10k_pci 0000:07:00.0: ATH10K_ENDThis can be used to debug firmware issues, but in systems that are not having any trouble, users may want to disable it. To do so, set flag 0x10000000 in the ath10k debug_level setting. This can be done by echoing a value to the /sys/kernel/debug/ieee80211/phy0/ath10k/debug_level variable debugfs file, or it can be set as a modprobe variable.
# Disable station kick-out logic in firmware echo 0x100100000000 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special # Set station kick-out back to default (20 * 16, or 320 decimal) echo 0x100100000140 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special
# See help info on this option ]# cat /sys/kernel/debug/ieee80211/wiphy0/ath10k/set_rates This is to set fixed bcast, mcast, and beacon rates. Normal rate-ctrl is handled through normal API using 'iw', etc. To set a value, you specify the dev-name, type, band and rate-code: types: bcast, mcast, beacon bands: 2, 5, 60 rate-codes: 0x43 1M, 0x42 2M, 0x41 5.5M, 0x40 11M, 0x3 6M, 0x7 9M, 0x2 12M, 0x6 18M, 0x1 24M, 0x5 36M, 0x0 48M, 0x4 54M, 0xFF default For example, to set beacon to 18Mbps on wlan0: echo "wlan0 beacon 2 0x6" > /debug/..../set_rates # Set beacons to use 18Mbps encoding echo "wlan0 beacon 2 0x6" > /sys/kernel/debug/ieee80211/wiphy0/ath10k/set_rates For the more adventurous, you can figure out HT and VHT rate codes by looking at how the ath10k driver builds/decodes them. I am not sure HT or VHT rates can be used successfully for these frames currently, however.
# Configure for 20Mhz only (disable 80, 40): echo 0xE00000006 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special
# Configure for 40Mhz only (disable 80, 20). Please note than legacy # rates cannot ever use 40Mhz. echo 0xE00000005 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special
# Configure for 80Mhz only (disable 40, 20). Please note that HT # and legacy rates cannot ever use 80Mhz. echo 0xE00000003 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special
# Configure for any available Mhz (default) echo 0xE00000000 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special
# NOTE: VHT rates are not normally available on the 2.4Ghz band without additional # kernel modifications. # Set for vht-rateset, MCS 0, NSS 1: iw dev wlan0 set bitrates legacy-5 ht-mcs-5 vht-mcs-5 1:0 # Set for vht-rateset, MCS 0, NSS 3: iw dev wlan0 set bitrates legacy-5 ht-mcs-5 vht-mcs-5 3:0 # Set for vht-rateset, MCS 9, NSS 3: iw dev wlan0 set bitrates legacy-5 ht-mcs-5 vht-mcs-5 3:9 # The ath10k 9880 3x3 NIC supports up to MCS 9, NSS 3.
# Set for ht-rateset, MCS 0, nss 1: iw dev wlan0 set bitrates legacy-5 ht-mcs-5 0 vht-mcs-5 # For HT MCS 8, nss2: iw dev wlan0 set bitrates legacy-5 ht-mcs-5 8 vht-mcs-5 # The ath10k 9880 3x3 NIC supports ht-mcs 0-23 settings.
# Set for legacy (a/g) 6Mbps iw dev wlan0 set bitrates legacy-5 6 ht-mcs-5 vht-mcs-5 # For legacy 54Mbps iw dev wlan0 set bitrates legacy-5 54 ht-mcs-5 vht-mcs-5 # Available legacy rates for the 2.4Ghz band are: 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54 # Available legacy rates for the 5Ghz band are: 6, 9, 12, 18, 24, 36, 48, 54
# Set back to default rates. iw dev wlan0 set bitrates
iw dev wlan0 station dump
# Disable WMI timeout assert in the firmware: echo 0xCFFFFFFFF > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special # Set to 8 second timeout echo 0xC00001F40 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special
# Enable AMSDU for IBSS connections on wave-1 and wave-2. echo 0x500000001 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special # Enable AMSDU for IBSS connections on wave-1 and wave-2 (default) echo 0x500000000 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special
# Treate IBSS non-beacon txqueues same as normal queues echo 0x1200000001 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special # Treate IBSS beacon txqueues same as normal queues echo 0x1200000002 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special # Treate all IBSS txqueues same as normal queues echo 0x1200000003 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special
# Enable COLD resets in tx-hang work-around. echo 0x1100000001 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special # Disable COLD resets in tx-hang work-around. echo 0x1100000001 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special
# Enable CFR data reporting. echo 0xD00000001 > /sys/kernel/debug/ieee80211/phy1/ath10k/ct_special # Disable CFR data reporting. echo 0xD00000000 > /sys/kernel/debug/ieee80211/phy1/ath10k/ct_special
# Disable MU txbf features. Add option like this in your modprobe.d file(s) options ath10k_core nobeamform_mu=1 # Disable SU txbf features. Add option like this in your modprobe.d file(s) options ath10k_core nobeamform_su=1
# Enable txbf frames and txbf_cv WMI messages to be sent to the driver. echo 0xF00000001 > /sys/kernel/debug/ieee80211/phy1/ath10k/ct_special # Disable txbf frames and txbf_cv WMI messages from being sent to the driver (default). echo 0xF00000000 > /sys/kernel/debug/ieee80211/phy1/ath10k/ct_special
# Enable rc-txbf-probe echo 0x100400000001 > /sys/kernel/debug/ieee80211/wiphy1/ath10k/ct_special # Disable rc-txbf-probe echo 0x100400000000 > /sys/kernel/debug/ieee80211/wiphy1/ath10k/ct_special
As of April 5, 2018: To force NDP probes to go out even when the firmware otherwise thinks that txbf is not necessarily optimal, set the bit 0x2 for the rc-txbf-probe command:
# Enable rc-txbf-probe with extra logic to force NDP to go out more often echo 0x100400000003 > /sys/kernel/debug/ieee80211/wiphy1/ath10k/ct_special
# Enable receiving all mgt frames echo 0x1000000001 > /sys/kernel/debug/ieee80211/phy1/ath10k/ct_special # Disable receiving all mgt frames echo 0x1000000000 > /sys/kernel/debug/ieee80211/phy1/ath10k/ct_special
# Set MU sounding timer to 16ms echo 0x100300000010 > /sys/kernel/debug/ieee80211/phy1/ath10k/ct_special # Set SU sounding timer to 32ms echo 0x100200000020 > /sys/kernel/debug/ieee80211/phy1/ath10k/ct_special # Set values to 0 and restart the firmware (or just reload the entire driver), # and values will be automatically set back to firmware defaults.
# Force sounding frame to station 1. echo 0xFF004A80000001 > /sys/kernel/debug/ieee80211/hy1/ath10k/ct_specialWhile testing this, I noticed that the TX logic in the NIC/Firmware would hang if I ran this command in a fast loop. So, the firmwre now has protection where it will ignore any of these commands that are closer than 25ms apart. Possibly it will still be unstable in long runs even with 25ms spacing...time and testing will tell.
Further testing shows this is fragile at best. It appears to fail entirely on 4019 radios similar to how it failed on 9984 at high speeds. This feature will be compiled out of any diet (trimmed) CT firmware builds, at least until the problems are understood and resolved.
We use the ct_special API to set this. We need the peer-ID as well, and the drivers include a new debugfs file called 'peers' which list the peer-id for each peer. The value sent to ct_special is calculated as:
peer_id << 16 | antenna_pattern
[root@lf0313-6477 lanforge]# cat /debug/ieee80211/wiphy1/ath10k/peers 04:f0:21:95:25:b0 vdev-id: 0 peer-ids: 1
# Set peer-id 0x1 to use antenna pattern 0x1c echo 0x130001001c > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_special # Set peer-id 0x1 to use the default antenna pattern (which is 0x5 on my radio) echo 0x1300010000 > /sys/kernel/debug/ieee80211/phy0/ath10k/ct_specialDue to some register setting commands which I do not full understand, it may be that once you set the antenna mask for any peer, the hardware will need to be reset to go back to the default behaviour. Also, the driver will not cache the value you set through ct_special, so you need to (re)set it each time the firmware restarts or the peer is (re)added.