diff options
Diffstat (limited to 'sys/compat/linuxkpi/common')
| -rw-r--r-- | sys/compat/linuxkpi/common/include/net/cfg80211.h | 2 | ||||
| -rw-r--r-- | sys/compat/linuxkpi/common/include/net/mac80211.h | 2 | ||||
| -rw-r--r-- | sys/compat/linuxkpi/common/src/linux_80211.c | 17 |
3 files changed, 15 insertions, 6 deletions
diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index f769cfdd4075..305026b34451 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1450,7 +1450,7 @@ cfg80211_chandef_create(struct cfg80211_chan_def *chandef, KASSERT(chandef != NULL, ("%s: chandef is NULL\n", __func__)); KASSERT(chan != NULL, ("%s: chan is NULL\n", __func__)); - /* memset(chandef, 0, sizeof(*chandef)); */ + memset(chandef, 0, sizeof(*chandef)); chandef->chan = chan; chandef->center_freq1 = chan->center_freq; /* chandef->width, center_freq2, punctured */ diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index ee1ace3684de..0eda07a8235c 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1315,7 +1315,7 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif) for (_linkid = 0; _linkid < nitems((_sta)->link); _linkid++) \ if ( ((_vif)->active_links == 0 /* no MLO */ || \ ((_vif)->active_links & BIT(_linkid)) != 0) && \ - (_linksta = link_sta_dereference_protected((_sta), (_linkid))) ) + (_linksta = link_sta_dereference_check((_sta), (_linkid))) ) /* -------------------------------------------------------------------------- */ diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 0dc3b2631804..8b1f5f0e0399 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -832,6 +832,7 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], sta->deflink.smps_mode = IEEE80211_SMPS_OFF; sta->deflink.bandwidth = IEEE80211_STA_RX_BW_20; sta->deflink.rx_nss = 1; + sta->deflink.sta = sta; lkpi_sta_sync_from_ni(hw, vif, sta, ni, false); @@ -2308,6 +2309,10 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); } else { + /* The device is no longer idle. */ + IMPROVE("Once we do multi-vif, only do for 1st chanctx"); + lkpi_hw_conf_idle(hw, false); + error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); if (error == 0 || error == EOPNOTSUPP) { vif->bss_conf.chanreq.oper.chan = chanctx_conf->def.chan; @@ -3081,8 +3086,6 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta->in_mgd = false; } - lkpi_hw_conf_idle(hw, false); - /* * And then: * - (more packets)? @@ -6904,17 +6907,23 @@ linuxkpi_ieee80211_iterate_interfaces(struct ieee80211_hw *hw, if (flags & ~(IEEE80211_IFACE_ITER_NORMAL| IEEE80211_IFACE_ITER_RESUME_ALL| IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER| - IEEE80211_IFACE_ITER_ACTIVE|IEEE80211_IFACE_ITER__ATOMIC)) { + IEEE80211_IFACE_ITER_ACTIVE|IEEE80211_IFACE_ITER__ATOMIC| + IEEE80211_IFACE_ITER__MTX)) { ic_printf(lhw->ic, "XXX TODO %s flags(%#x) not yet supported.\n", __func__, flags); } + if ((flags & IEEE80211_IFACE_ITER__MTX) != 0) + lockdep_assert_wiphy(hw->wiphy); + active = (flags & IEEE80211_IFACE_ITER_ACTIVE) != 0; atomic = (flags & IEEE80211_IFACE_ITER__ATOMIC) != 0; nin_drv = (flags & IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER) != 0; - if (atomic) + if (atomic) { + IMPROVE("LKPI_80211_LHW_LVIF_LOCK atomic assume to be rcu?"); LKPI_80211_LHW_LVIF_LOCK(lhw); + } TAILQ_FOREACH(lvif, &lhw->lvif_head, lvif_entry) { struct ieee80211vap *vap; |
