git: 8aaefd0512da - main - rtw88: use #define for NL80211_BAND_2GHZ instead of hardcoded number
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Jan 2023 01:07:40 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=8aaefd0512daea0f9869cd2fe3cee9443d5fb6aa
commit 8aaefd0512daea0f9869cd2fe3cee9443d5fb6aa
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-01-13 01:05:01 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-01-13 01:05:01 +0000
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
---
sys/contrib/dev/rtw88/main.c | 4 ++++
1 file changed, 4 insertions(+)
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;