Hello,
I am running LEDE Trunk on the AP147-010, and noticed that this specific reference board is having a wireless power problem.
Ath9k appears to be running properly with a AP + STA modes:
root@LEDE:/sys/kernel/debug/ieee80211/phy0/ath9k# iwconfig
lo no wireless extensions.
br0 no wireless extensions.
teql0 no wireless extensions.
ath12 IEEE 802.11 Mode:Master Tx-Power=26 dBm
RTS thr:off Fragment thr:off
Power Management:off
eth1 no wireless extensions.
imq1 no wireless extensions.
ath11 IEEE 802.11 ESSID:"space test"
Mode:Managed Frequency:2.462 GHz Access Point: 02:D1:54:33:B5:EA
Bit Rate=1 Mb/s Tx-Power=26 dBm
RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=41/70 Signal level=-71 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:42 Invalid misc:17076 Missed beacon:0
However the signal is much lower than it should be. My question is there some LNA / PA bit that needs to be toggled on the QCA9531 SoC to enable the higher power?
I saw in Ath9k that "AR9300_PWR_TABLE_OFFSET" is set to 0. I thought maybe there needed to be a PWR_TABLE_OFFSET for this chip, but I bet i'm wrong. I tried hard-coding to a higher value, and saw no difference in signal.
I know my regulatory is set correctly in the ART partition ( USA ), so it's not a user-space limitation.
I feel like there is just a bit that I need to toggle that will correct the TX/RX issue.
I read another thread with a board that had the same processor CPE210v2. I saw that the reference clock wasn't being set properly so I applied those patches and insured that the RefClk was 25Mhz
Here is some ath9k data:
/sys/kernel/debug/ieee80211/phy0/ath9k# cat base_eeprom
EEPROM Version : 2
TX Mask : 3
RX Mask : 3
Allow 5GHz : 0
Allow 2GHz : 1
Disable 2GHz HT20 : 0
Disable 2GHz HT40 : 0
Disable 5Ghz HT20 : 0
Disable 5Ghz HT40 : 0
Big Endian : 0
RF Silent : 0
BT option : 0
Device Cap : 0
Device Type : 4
Power Table Offset : 0
Tuning Caps1 : 24
Tuning Caps2 : 0
Enable Tx Temp Comp : 1
Enable Tx Volt Comp : 0
Enable fast clock : 1
Enable doubling : 1
Internal regulator : 0
Enable Paprd : 0
Driver Strength : 0
Quick Drop : 0
Chain mask Reduce : 0
Write enable Gpio : 3
WLAN Disable Gpio : 0
WLAN LED Gpio : 8
Rx Band Select Gpio : 255
Tx Gain : 1
Rx Gain : 1
SW Reg : 0
.
/sys/kernel/debug/ieee80211/phy0/ath9k# cat modal_eeprom
2GHz modal Header :
Chain0 Ant. Control : 336
Chain1 Ant. Control : 336
Chain2 Ant. Control : 336
Ant. Common Control : 1048848
Ant. Common Control2 : 139810
Ant. Gain : 0
Switch Settle : 44
Chain0 xatten1DB : 0
Chain1 xatten1DB : 0
Chain2 xatten1DB : 0
Chain0 xatten1Margin : 0
Chain1 xatten1Margin : 0
Chain2 xatten1Margin : 0
Temp Slope : 20
Volt Slope : 0
spur Channels0 : 100
spur Channels1 : 125
spur Channels2 : 164
spur Channels3 : 175
spur Channels4 : 0
Chain0 NF Threshold : -1
Chain1 NF Threshold : 0
Chain2 NF Threshold : 0
Quick Drop : 0
txEndToXpaOff : 0
xPA Bias Level : 0
txFrameToDataStart : 14
txFrameToPaOn : 14
txFrameToXpaOn : 14
txClip : 3
ADC Desired size : -30
Calibration data
Chain 0
Freq ref volt temp nf_cal nf_pow rx_temp
2412 -8 0 120 0 0 0
2437 -6 0 125 0 0 0
2462 -6 0 126 0 0 0
Chain 1
Freq ref volt temp nf_cal nf_pow rx_temp
2412 -9 0 121 0 0 0
2437 -6 0 127 0 0 0
2462 -6 0 125 0 0 0
.
/sys/kernel/debug/ieee80211/phy0/ath9k# cat ani
ANI: ENABLED
ANI RESET: 233
OFDM LEVEL: 0
CCK LEVEL: 4
SPUR UP: 1
SPUR DOWN: 1
OFDM WS-DET ON: 0
OFDM WS-DET OFF: 0
MRC-CCK ON: 5
MRC-CCK OFF: 7
FIR-STEP UP: 11
FIR-STEP DOWN: 5
INV LISTENTIME: 0
OFDM ERRORS: 55998
CCK ERRORS: 8227
.
/sys/kernel/debug/ieee80211/phy0/ath9k# cat xmit
BE BK VI VO
MPDUs Queued: 0 0 0 89
MPDUs Completed: 0 0 0 89
MPDUs XRetried: 0 0 0 0
Aggregates: 0 0 0 0
AMPDUs Queued HW: 0 0 0 0
AMPDUs Completed: 0 0 0 0
AMPDUs Retried: 0 0 0 0
AMPDUs XRetried: 0 0 0 0
TXERR Filtered: 0 0 0 0
FIFO Underrun: 0 0 0 0
TXOP Exceeded: 0 0 0 0
TXTIMER Expiry: 0 0 0 0
DESC CFG Error: 0 0 0 0
DATA Underrun: 0 0 0 0
DELIM Underrun: 0 0 0 0
TX-Pkts-All: 0 0 0 89
TX-Bytes-All: 0 0 0 6450
HW-put-tx-buf: 0 0 0 89
HW-tx-start: 0 0 0 0
HW-tx-proc-desc: 0 0 0 89
TX-Failed: 0 0 0 0
.
/sys/kernel/debug/ieee80211/phy0/ath9k# cat reset
Baseband Hang: 0
Baseband Watchdog: 0
Fatal HW Error: 0
TX HW error: 0
Transmit timeout: 0
TX Path Hang: 0
PLL RX Hang: 0
MAC Hang: 0
Stuck Beacon: 0
MCI Reset: 0
Calibration error: 0
Tx DMA stop error: 0
Rx DMA stop error: 0
Other than the output power and receive ( power offset ? ) not working properly, ath9k seems to function correctly.
Any help is much appreciated!