wifi: rtw89: refine clearing supported bands to check 2/5 GHz first
authorZong-Zhe Yang <kevin_yang@realtek.com>
Fri, 2 Jun 2023 15:05:49 +0000 (23:05 +0800)
committerKalle Valo <kvalo@kernel.org>
Thu, 8 Jun 2023 15:58:51 +0000 (18:58 +0300)
commitb7d170d5a670de8d30d2db94179099f52f8df485
tree30166779ecc3cbf4d543093460e4916f5bee7f95
parent57369e2aa2eb9812368c6cf3c4378d1fbe9e8c8a
wifi: rtw89: refine clearing supported bands to check 2/5 GHz first

We refine to check if supported bands of NL80211_BAND_2GHZ and
NL80211_BAND_5GHZ exist before freeing their iftype_data. For
now, it does not really encounter problems because all current
chips support both 2 GHz and 5 GHz. But, driver actually allows
chips to declare whether 2/5 GHz are supported or not. In case
some future chips really don't support them, we refine this code.

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