Re: [PATCHv2] Revert "ath10k: send (re)assoc peer command when NSS changed"

2018-03-29 Thread Kalle Valo
Karthikeyan Periyasamy  wrote:

> This reverts commit 55884c045d31a29cf69db8332d1064a1b61dd159.
> 
> When Ath10k is in AP mode and an unassociated STA sends a VHT action frame
> (Operating Mode Notification for the NSS change) periodically to AP this 
> causes
> ath10k to call ath10k_station_assoc() which sends WMI_PEER_ASSOC_CMDID during
> NSS update. Over the time (with a certain client it can happen within 15 mins
> when there are over 500 of these VHT action frames) continuous calls of
> WMI_PEER_ASSOC_CMDID cause firmware to assert due to resource exhaust.
> 
> To my knowledge setting WMI_PEER_NSS peer param itself enough to handle NSS
> updates and no need to call ath10k_station_assoc(). So revert the original
> commit from 2014 as it's unclear why the change was really needed.
> Now the firmware assert doesn't happen anymore.
> 
> Issue observed in QCA9984 platform with firmware version:10.4-3.5.3-00053.
> This Change tested in QCA9984 with firmware version: 10.4-3.5.3-00053 and
> QCA988x platform with firmware version: 10.2.4-1.0-00036.
> 
> Firmware Assert log:
> 
> ath10k_pci 0002:01:00.0: firmware crashed! (guid 
> e61f1274-9acd-4c5b-bcca-e032ea6e723c)
> ath10k_pci 0002:01:00.0: qca9984/qca9994 hw1.0 target 0x0100 chip_id 
> 0x sub 168c:cafe
> ath10k_pci 0002:01:00.0: kconfig debug 1 debugfs 1 tracing 0 dfs 1 testmode 1
> ath10k_pci 0002:01:00.0: firmware ver 10.4-3.5.3-00053 api 5 features 
> no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast crc32 4c56a386
> ath10k_pci 0002:01:00.0: board_file api 2 bmi_id 0:4 crc32 c2271344
> ath10k_pci 0002:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 
> raw 0 hwcrypto 1
> ath10k_pci 0002:01:00.0: firmware register dump:
> ath10k_pci 0002:01:00.0: [00]: 0x000A 0x15B3 0x00981E5F 0x00975B31
> ath10k_pci 0002:01:00.0: [04]: 0x00981E5F 0x00060530 0x0011 0x00446C60
> ath10k_pci 0002:01:00.0: [08]: 0x0042F1FC 0x00458080 0x0017 0x
> ath10k_pci 0002:01:00.0: [12]: 0x0009 0x 0x00973ABC 0x00973AD2
> ath10k_pci 0002:01:00.0: [16]: 0x00973AB0 0x00960E62 0x009606CA 0x
> ath10k_pci 0002:01:00.0: [20]: 0x40981E5F 0x004066DC 0x0040 0x00981E34
> ath10k_pci 0002:01:00.0: [24]: 0x80983B48 0x0040673C 0x00C0 0xC0981E5F
> ath10k_pci 0002:01:00.0: [28]: 0x80993DEB 0x0040676C 0x00431AB8 0x0045D0C4
> ath10k_pci 0002:01:00.0: [32]: 0x80993E5C 0x004067AC 0x004303C0 0x0045D0C4
> ath10k_pci 0002:01:00.0: [36]: 0x80994AAB 0x004067DC 0x 0x0045D0C4
> ath10k_pci 0002:01:00.0: [40]: 0x809971A0 0x0040681C 0x004303C0 0x00441B00
> ath10k_pci 0002:01:00.0: [44]: 0x80991904 0x0040688C 0x004303C0 0x0045D0C4
> ath10k_pci 0002:01:00.0: [48]: 0x80963AD3 0x00406A7C 0x004303C0 0x009918FC
> ath10k_pci 0002:01:00.0: [52]: 0x80960E80 0x00406A9C 0x001F 0x0040
> ath10k_pci 0002:01:00.0: [56]: 0x80960E51 0x00406ACC 0x0040 0x
> ath10k_pci 0002:01:00.0: Copy Engine register dump:
> ath10k_pci 0002:01:00.0: index: addr: sr_wr_idx: sr_r_idx: dst_wr_idx: 
> dst_r_idx:
> ath10k_pci 0002:01:00.0: [00]: 0x0004a000 15 15 3 3
> ath10k_pci 0002:01:00.0: [01]: 0x0004a400 17 17 212 213
> ath10k_pci 0002:01:00.0: [02]: 0x0004a800 21 21 20 21
> ath10k_pci 0002:01:00.0: [03]: 0x0004ac00 25 25 27 25
> ath10k_pci 0002:01:00.0: [04]: 0x0004b000 515 515 144 104
> ath10k_pci 0002:01:00.0: [05]: 0x0004b400 28 28 155 156
> ath10k_pci 0002:01:00.0: [06]: 0x0004b800 12 12 12 12
> ath10k_pci 0002:01:00.0: [07]: 0x0004bc00 1 1 1 1
> ath10k_pci 0002:01:00.0: [08]: 0x0004c000 0 0 127 0
> ath10k_pci 0002:01:00.0: [09]: 0x0004c400 1 1 1 1
> ath10k_pci 0002:01:00.0: [10]: 0x0004c800 0 0 0 0
> ath10k_pci 0002:01:00.0: [11]: 0x0004cc00 0 0 0 0
> ath10k_pci 0002:01:00.0: CE[1] write_index 212 sw_index 213 hw_index 0 
> nentries_mask 0x01ff
> ath10k_pci 0002:01:00.0: CE[2] write_index 20 sw_index 21 hw_index 0 
> nentries_mask 0x007f
> ath10k_pci 0002:01:00.0: CE[5] write_index 155 sw_index 156 hw_index 0 
> nentries_mask 0x01ff
> ath10k_pci 0002:01:00.0: DMA addr: nbytes: meta data: byte swap: gather:
> ath10k_pci 0002:01:00.0: [455]: 0x580c0042 0 0 0 0
> ath10k_pci 0002:01:00.0: [456]: 0x594a0010 0 0 0 1
> ath10k_pci 0002:01:00.0: [457]: 0x580c0042 0 0 0 0
> ath10k_pci 0002:01:00.0: [458]: 0x594a0038 0 0 0 1
> ath10k_pci 0002:01:00.0: [459]: 0x580c0a42 0 0 0 0
> ath10k_pci 0002:01:00.0: [460]: 0x594a0060 0 0 0 1
> ath10k_pci 0002:01:00.0: [461]: 0x580c0c42 0 0 0 0
> ath10k_pci 0002:01:00.0: [462]: 0x594a0010 0 0 0 1
> ath10k_pci 0002:01:00.0: [463]: 0x580c0c42 0 0 0 0
> ath10k_pci 0002:01:00.0: [464]: 0x594a0038 0 0 0 1
> ath10k_pci 0002:01:00.0: [465]: 0x580c0a42 0 0 0 0
> ath10k_pci 0002:01:00.0: [466]: 0x594a0060 0 0 0 1
> ath10k_pci 0002:01:00.0: [467]: 0x580c0042 0 0 0 0
> ath10k_pci 0002:01:00.0: [468]: 0x594a0010 0 0 0 1
> ath10k_pci 0002:01:00.0: [469]: 0x580c1c42 0 0 0 0
> ath10k_pci 0002:01:00.0: [470]: 0x594a0010 0 0 0 1
> ath10k_pci 0002:01:00.0: [471]: 0x580c1c42 0 0 0 0
> 

[PATCHv2] Revert "ath10k: send (re)assoc peer command when NSS changed"

2018-03-02 Thread Karthikeyan Periyasamy
This reverts commit 55884c045d31a29cf69db8332d1064a1b61dd159.

When Ath10k is in AP mode and an unassociated STA sends a VHT action frame
(Operating Mode Notification for the NSS change) periodically to AP this causes
ath10k to call ath10k_station_assoc() which sends WMI_PEER_ASSOC_CMDID during
NSS update. Over the time (with a certain client it can happen within 15 mins
when there are over 500 of these VHT action frames) continuous calls of
WMI_PEER_ASSOC_CMDID cause firmware to assert due to resource exhaust.

To my knowledge setting WMI_PEER_NSS peer param itself enough to handle NSS
updates and no need to call ath10k_station_assoc(). So revert the original
commit from 2014 as it's unclear why the change was really needed.
Now the firmware assert doesn't happen anymore.

Issue observed in QCA9984 platform with firmware version:10.4-3.5.3-00053.
This Change tested in QCA9984 with firmware version: 10.4-3.5.3-00053 and
QCA988x platform with firmware version: 10.2.4-1.0-00036.

Firmware Assert log:

ath10k_pci 0002:01:00.0: firmware crashed! (guid 
e61f1274-9acd-4c5b-bcca-e032ea6e723c)
ath10k_pci 0002:01:00.0: qca9984/qca9994 hw1.0 target 0x0100 chip_id 
0x sub 168c:cafe
ath10k_pci 0002:01:00.0: kconfig debug 1 debugfs 1 tracing 0 dfs 1 testmode 1
ath10k_pci 0002:01:00.0: firmware ver 10.4-3.5.3-00053 api 5 features 
no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast crc32 4c56a386
ath10k_pci 0002:01:00.0: board_file api 2 bmi_id 0:4 crc32 c2271344
ath10k_pci 0002:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 
0 hwcrypto 1
ath10k_pci 0002:01:00.0: firmware register dump:
ath10k_pci 0002:01:00.0: [00]: 0x000A 0x15B3 0x00981E5F 0x00975B31
ath10k_pci 0002:01:00.0: [04]: 0x00981E5F 0x00060530 0x0011 0x00446C60
ath10k_pci 0002:01:00.0: [08]: 0x0042F1FC 0x00458080 0x0017 0x
ath10k_pci 0002:01:00.0: [12]: 0x0009 0x 0x00973ABC 0x00973AD2
ath10k_pci 0002:01:00.0: [16]: 0x00973AB0 0x00960E62 0x009606CA 0x
ath10k_pci 0002:01:00.0: [20]: 0x40981E5F 0x004066DC 0x0040 0x00981E34
ath10k_pci 0002:01:00.0: [24]: 0x80983B48 0x0040673C 0x00C0 0xC0981E5F
ath10k_pci 0002:01:00.0: [28]: 0x80993DEB 0x0040676C 0x00431AB8 0x0045D0C4
ath10k_pci 0002:01:00.0: [32]: 0x80993E5C 0x004067AC 0x004303C0 0x0045D0C4
ath10k_pci 0002:01:00.0: [36]: 0x80994AAB 0x004067DC 0x 0x0045D0C4
ath10k_pci 0002:01:00.0: [40]: 0x809971A0 0x0040681C 0x004303C0 0x00441B00
ath10k_pci 0002:01:00.0: [44]: 0x80991904 0x0040688C 0x004303C0 0x0045D0C4
ath10k_pci 0002:01:00.0: [48]: 0x80963AD3 0x00406A7C 0x004303C0 0x009918FC
ath10k_pci 0002:01:00.0: [52]: 0x80960E80 0x00406A9C 0x001F 0x0040
ath10k_pci 0002:01:00.0: [56]: 0x80960E51 0x00406ACC 0x0040 0x
ath10k_pci 0002:01:00.0: Copy Engine register dump:
ath10k_pci 0002:01:00.0: index: addr: sr_wr_idx: sr_r_idx: dst_wr_idx: 
dst_r_idx:
ath10k_pci 0002:01:00.0: [00]: 0x0004a000 15 15 3 3
ath10k_pci 0002:01:00.0: [01]: 0x0004a400 17 17 212 213
ath10k_pci 0002:01:00.0: [02]: 0x0004a800 21 21 20 21
ath10k_pci 0002:01:00.0: [03]: 0x0004ac00 25 25 27 25
ath10k_pci 0002:01:00.0: [04]: 0x0004b000 515 515 144 104
ath10k_pci 0002:01:00.0: [05]: 0x0004b400 28 28 155 156
ath10k_pci 0002:01:00.0: [06]: 0x0004b800 12 12 12 12
ath10k_pci 0002:01:00.0: [07]: 0x0004bc00 1 1 1 1
ath10k_pci 0002:01:00.0: [08]: 0x0004c000 0 0 127 0
ath10k_pci 0002:01:00.0: [09]: 0x0004c400 1 1 1 1
ath10k_pci 0002:01:00.0: [10]: 0x0004c800 0 0 0 0
ath10k_pci 0002:01:00.0: [11]: 0x0004cc00 0 0 0 0
ath10k_pci 0002:01:00.0: CE[1] write_index 212 sw_index 213 hw_index 0 
nentries_mask 0x01ff
ath10k_pci 0002:01:00.0: CE[2] write_index 20 sw_index 21 hw_index 0 
nentries_mask 0x007f
ath10k_pci 0002:01:00.0: CE[5] write_index 155 sw_index 156 hw_index 0 
nentries_mask 0x01ff
ath10k_pci 0002:01:00.0: DMA addr: nbytes: meta data: byte swap: gather:
ath10k_pci 0002:01:00.0: [455]: 0x580c0042 0 0 0 0
ath10k_pci 0002:01:00.0: [456]: 0x594a0010 0 0 0 1
ath10k_pci 0002:01:00.0: [457]: 0x580c0042 0 0 0 0
ath10k_pci 0002:01:00.0: [458]: 0x594a0038 0 0 0 1
ath10k_pci 0002:01:00.0: [459]: 0x580c0a42 0 0 0 0
ath10k_pci 0002:01:00.0: [460]: 0x594a0060 0 0 0 1
ath10k_pci 0002:01:00.0: [461]: 0x580c0c42 0 0 0 0
ath10k_pci 0002:01:00.0: [462]: 0x594a0010 0 0 0 1
ath10k_pci 0002:01:00.0: [463]: 0x580c0c42 0 0 0 0
ath10k_pci 0002:01:00.0: [464]: 0x594a0038 0 0 0 1
ath10k_pci 0002:01:00.0: [465]: 0x580c0a42 0 0 0 0
ath10k_pci 0002:01:00.0: [466]: 0x594a0060 0 0 0 1
ath10k_pci 0002:01:00.0: [467]: 0x580c0042 0 0 0 0
ath10k_pci 0002:01:00.0: [468]: 0x594a0010 0 0 0 1
ath10k_pci 0002:01:00.0: [469]: 0x580c1c42 0 0 0 0
ath10k_pci 0002:01:00.0: [470]: 0x594a0010 0 0 0 1
ath10k_pci 0002:01:00.0: [471]: 0x580c1c42 0 0 0 0
ath10k_pci 0002:01:00.0: [472]: 0x594a0010 0 0 0 1
ath10k_pci 0002:01:00.0: [473]: 0x580c1c42 0 0 0 0
ath10k_pci 0002:01:00.0: [474]: 0x594a0010 0 0 0 1
ath10k_pci 0002:01:00.0: [475]: 0x580c0642 0 0 0 0
ath10k_pci 0002:01:00.0: [476]: