aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2023-01-13 01:05:01 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2023-01-18 13:26:32 +0000
commit4c7aee8a700974218831d5ad1e04a6b4f42c7e2e (patch)
tree267b6a1d73bc8b674c356b8304fb376a07c721b3
parenta96d4c86f1d4e22182bc8b5de92ac84a1e1dff22 (diff)
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. (cherry picked from commit 8aaefd0512daea0f9869cd2fe3cee9443d5fb6aa)
-rw-r--r--sys/contrib/dev/rtw88/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/contrib/dev/rtw88/main.c b/sys/contrib/dev/rtw88/main.c
index 35381a35f5d9..deac3564d847 100644
--- a/sys/contrib/dev/rtw88/main.c
+++ b/sys/contrib/dev/rtw88/main.c
@@ -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;