git: 672ab3812bc6 - stable/15 - LinuxKPI: 802.11: save the default channel
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Apr 2026 21:08:42 UTC
The branch stable/15 has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=672ab3812bc66d4e8cc5f44f5444749bf20749df
commit 672ab3812bc66d4e8cc5f44f5444749bf20749df
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-03-10 20:02:43 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-04-22 20:57:04 +0000
LinuxKPI: 802.11: save the default channel
Add a field to struct lkpi_hw to save the default channel for later
reuse.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit ced6909dd69b8476121dc291e01fa56ae14520e5)
---
sys/compat/linuxkpi/common/src/linux_80211.c | 2 ++
sys/compat/linuxkpi/common/src/linux_80211.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 8bb5bd4201ef..92eccefca078 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -3963,6 +3963,7 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
lvif->lvif_ifllevent = EVENTHANDLER_REGISTER(iflladdr_event,
lkpi_vif_iflladdr, vif, EVENTHANDLER_PRI_ANY);
vif->bss_conf.link_id = 0; /* Non-MLO operation. */
+ vif->bss_conf.chanreq.oper.chan = lhw->dflt_chandef.chan;
vif->bss_conf.chanreq.oper.width = NL80211_CHAN_WIDTH_20_NOHT;
vif->bss_conf.use_short_preamble = false; /* vap->iv_flags IEEE80211_F_SHPREAMBLE */
vif->bss_conf.use_short_slot = false; /* vap->iv_flags IEEE80211_F_SHSLOT */
@@ -6832,6 +6833,7 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw)
(ic->ic_flags_ht & IEEE80211_FHT_HT) ? NL80211_CHAN_HT20 :
#endif
NL80211_CHAN_NO_HT);
+ lhw->dflt_chandef = hw->conf.chandef;
break;
}
}
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h
index 8ae5c3d13d2d..a2945498e8df 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.h
+++ b/sys/compat/linuxkpi/common/src/linux_80211.h
@@ -254,6 +254,8 @@ struct lkpi_hw { /* name it mac80211_sc? */
unsigned int mc_flags;
struct sx mc_sx;
+ struct cfg80211_chan_def dflt_chandef;
+
struct mtx txq_mtx;
uint32_t txq_generation[IEEE80211_NUM_ACS];
spinlock_t txq_scheduled_lock[IEEE80211_NUM_ACS];