diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-03-10 20:02:43 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-04-18 01:12:08 +0000 |
| commit | ced6909dd69b8476121dc291e01fa56ae14520e5 (patch) | |
| tree | 89aa1fe0bf0227cacbf35644d5b2614f932d3549 | |
| parent | 695f0f0d037a876fa27c0cdca9890e09fd75429e (diff) | |
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
MFC after: 3 days
| -rw-r--r-- | sys/compat/linuxkpi/common/src/linux_80211.c | 2 | ||||
| -rw-r--r-- | sys/compat/linuxkpi/common/src/linux_80211.h | 2 |
2 files changed, 4 insertions, 0 deletions
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]; |
