rtw88: use #define for NL80211_BAND_2GHZ instead of hardcoded number

Use NL80211_BAND_2GHZ instead of a hard coded 0 as array index for the
band.  While LinuxKPI provides a KPI compatibility some of these values
may not necessarily be KBI compatible (in this case they shoule be so
this is a NOP) and after all it is better style.

No functional change.

MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb 2023-01-13 01:05:01 +00:00
parent f797d5f370
commit 8aaefd0512

View File

@ -1189,7 +1189,11 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
RA_MASK_OFDM_IN_HT_2G;
wireless_set = WIRELESS_CCK | WIRELESS_OFDM |
WIRELESS_HT;
#if defined(__linux__)
} else if (sta->deflink.supp_rates[0] <= 0xf) {
#elif defined(__FreeBSD__)
} else if (sta->deflink.supp_rates[NL80211_BAND_2GHZ] <= 0xf) {
#endif
wireless_set = WIRELESS_CCK;
} else {
ra_mask &= RA_MASK_OFDM_RATES | RA_MASK_CCK_IN_BG;