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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user