Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jan 2023 16:25:03 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4c7aee8a7009 - stable/13 - rtw88: use #define for NL80211_BAND_2GHZ instead of hardcoded number
Message-ID:  <202301181625.30IGP3u9038256@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=4c7aee8a700974218831d5ad1e04a6b4f42c7e2e

commit 4c7aee8a700974218831d5ad1e04a6b4f42c7e2e
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-18 13:26:32 +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.
    
    (cherry picked from commit 8aaefd0512daea0f9869cd2fe3cee9443d5fb6aa)
---
 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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301181625.30IGP3u9038256>