wifi: rtw89: add subband index of primary channel to struct rtw89_chan
authorPing-Ke Shih <pkshih@realtek.com>
Wed, 20 Sep 2023 07:43:16 +0000 (15:43 +0800)
committerKalle Valo <kvalo@kernel.org>
Fri, 22 Sep 2023 07:43:57 +0000 (10:43 +0300)
commit9483d8b3aac8864e3860278006b414f996677175
tree389ab4b81191e77b19c9ac0eb3ba7c6c27400838
parent804edf4d18e2caf008f0aaffe2a6d1a0b66fc8fc
wifi: rtw89: add subband index of primary channel to struct rtw89_chan

The subband index is a hardware value of relationship between primary
channel and bandwidth, and it is used by setting channel/bandwidth to
specify the primary channel.

Because this index is only needed when bandwidth >= 20 MHz, adjust
order of enumerator bandwidth to access offsets array easier. To prevent
misuse RTW89_CHANNEL_WIDTH_NUM as size, change it to
RTW89_CHANNEL_WIDTH_ORDINARY_NUM that will be the size of array. The
enumerator values of bandwidth (before ordinary number) will be also
used by upcoming TX power table built in firmware file, so add a comment
to remind keeping the order.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230920074322.42898-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/chan.c
drivers/net/wireless/realtek/rtw89/core.h