wifi: rtw89: mac: generalize code to indirectly access WiFi internal memory
authorPing-Ke Shih <pkshih@realtek.com>
Tue, 22 Aug 2023 12:58:18 +0000 (20:58 +0800)
committerKalle Valo <kvalo@kernel.org>
Fri, 25 Aug 2023 09:59:53 +0000 (12:59 +0300)
commit60168f6c50edd6b972c538aae11cb8861a892c7c
tree173ce8fe534e33c8d4df9b8d7557a40b115dc62b
parentc220d08e1f981c8d381874a55c3c3c76ade43393
wifi: rtw89: mac: generalize code to indirectly access WiFi internal memory

To diagnose abnormal behavior, we need to dump certain internal memory.
For example, dump security CAM when debugging encryption/decryption
problems, or dump BA CAM when debugging abnormal BlockAck.

Since the indirect address and internal memory base address are different
between WiFi 6 and 7 chips, add fields to reuse codes.

Also, only WiFi 6 chips initialize DMAC and CMAC tables via this indirect
interface, so no need to change the constant register address, and
new firmware will help to initialize these tables.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230822125822.23817-3-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/debug.c
drivers/net/wireless/realtek/rtw89/mac.c
drivers/net/wireless/realtek/rtw89/mac.h
drivers/net/wireless/realtek/rtw89/ser.c