switch (txrate.flags) {
        case WMI_RATE_PREAMBLE_OFDM:
                if (arsta->arvif && arsta->arvif->vif)
-                       conf = rcu_dereference(arsta->arvif->vif->chanctx_conf);
+                       conf = rcu_dereference(arsta->arvif->vif->bss_conf.chanctx_conf);
                if (conf && conf->def.chan->band == NL80211_BAND_5GHZ)
                        arsta->tx_info.status.rates[0].idx = rate_idx - 4;
                break;
 
        struct ieee80211_chanctx_conf *conf;
 
        rcu_read_lock();
-       conf = rcu_dereference(vif->chanctx_conf);
+       conf = rcu_dereference(vif->bss_conf.chanctx_conf);
        if (!conf) {
                rcu_read_unlock();
                return -ENOENT;
        if (arvif->vdev_type != WMI_VDEV_TYPE_AP)
                return;
 
-       if (!vif->csa_active)
+       if (!vif->bss_conf.csa_active)
                return;
 
        if (!arvif->is_up)
 {
        struct ath10k_mac_change_chanctx_arg *arg = data;
 
-       if (rcu_access_pointer(vif->chanctx_conf) != arg->ctx)
+       if (rcu_access_pointer(vif->bss_conf.chanctx_conf) != arg->ctx)
                return;
 
        arg->n_vifs++;
        struct ath10k_mac_change_chanctx_arg *arg = data;
        struct ieee80211_chanctx_conf *ctx;
 
-       ctx = rcu_access_pointer(vif->chanctx_conf);
+       ctx = rcu_access_pointer(vif->bss_conf.chanctx_conf);
        if (ctx != arg->ctx)
                return;
 
 
        }
 
        arvif = ath10k_get_arvif(ar, vdev_id);
-       if (arvif && arvif->is_up && arvif->vif->csa_active)
+       if (arvif && arvif->is_up && arvif->vif->bss_conf.csa_active)
                ieee80211_queue_work(ar->hw, &arvif->ap_csa_work);
 
        kfree(tb);
 
                 * Once CSA counter is completed stop sending beacons until
                 * actual channel switch is done
                 */
-               if (arvif->vif->csa_active &&
+               if (arvif->vif->bss_conf.csa_active &&
                    ieee80211_beacon_cntdwn_is_complete(arvif->vif)) {
                        ieee80211_csa_finish(arvif->vif);
                        continue;
 
        struct ieee80211_chanctx_conf *conf;
 
        rcu_read_lock();
-       conf = rcu_dereference(vif->chanctx_conf);
+       conf = rcu_dereference(vif->bss_conf.chanctx_conf);
        if (!conf) {
                rcu_read_unlock();
                return -ENOENT;
 {
        struct ieee80211_vif *vif = arvif->vif;
 
-       if (!vif->color_change_active && !arvif->bcca_zero_sent)
+       if (!vif->bss_conf.color_change_active && !arvif->bcca_zero_sent)
                return;
 
-       if (vif->color_change_active && ieee80211_beacon_cntdwn_is_complete(vif)) {
+       if (vif->bss_conf.color_change_active && ieee80211_beacon_cntdwn_is_complete(vif)) {
                arvif->bcca_zero_sent = true;
                ieee80211_color_change_finish(vif);
                return;
 
        arvif->bcca_zero_sent = false;
 
-       if (vif->color_change_active)
+       if (vif->bss_conf.color_change_active)
                ieee80211_beacon_update_cntdwn(vif);
        ath11k_mac_setup_bcn_tmpl(arvif);
 }
 {
        struct ath11k_mac_change_chanctx_arg *arg = data;
 
-       if (rcu_access_pointer(vif->chanctx_conf) != arg->ctx)
+       if (rcu_access_pointer(vif->bss_conf.chanctx_conf) != arg->ctx)
                return;
 
        arg->n_vifs++;
        struct ath11k_mac_change_chanctx_arg *arg = data;
        struct ieee80211_chanctx_conf *ctx;
 
-       ctx = rcu_access_pointer(vif->chanctx_conf);
+       ctx = rcu_access_pointer(vif->bss_conf.chanctx_conf);
        if (ctx != arg->ctx)
                return;
 
 
        cmd->vdev_id = vdev_id;
        cmd->tim_ie_offset = offs->tim_offset;
 
-       if (vif->csa_active) {
+       if (vif->bss_conf.csa_active) {
                cmd->csa_switch_count_offset = offs->cntdwn_counter_offs[0];
                cmd->ext_csa_switch_count_offset = offs->cntdwn_counter_offs[1];
        }
                        continue;
                }
 
-               if (arvif->is_up && arvif->vif->csa_active)
+               if (arvif->is_up && arvif->vif->bss_conf.csa_active)
                        ieee80211_csa_finish(arvif->vif);
        }
        rcu_read_unlock();
 
 
 bool ath9k_csa_is_finished(struct ath_softc *sc, struct ieee80211_vif *vif)
 {
-       if (!vif || !vif->csa_active)
+       if (!vif || !vif->bss_conf.csa_active)
                return false;
 
        if (!ieee80211_beacon_cntdwn_is_complete(vif))
 
        struct ieee80211_vif *vif;
 
        vif = priv->csa_vif;
-       if (!vif || !vif->csa_active)
+       if (!vif || !vif->bss_conf.csa_active)
                return false;
 
        if (!ieee80211_beacon_cntdwn_is_complete(vif))
 
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2013-2014, 2018-2020 Intel Corporation
+ * Copyright (C) 2013-2014, 2018-2020, 2022 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  */
 #include <linux/ieee80211.h>
 
        rcu_read_lock();
 
-       chanctx_conf = rcu_dereference(vif->chanctx_conf);
+       chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
 
        if (!chanctx_conf ||
             chanctx_conf->def.chan->band != NL80211_BAND_2GHZ) {
                return;
        }
 
-       chanctx_conf = rcu_dereference(vif->chanctx_conf);
+       chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
 
        /* If channel context is invalid or not on 2.4GHz .. */
        if ((!chanctx_conf ||
 
                return -EINVAL;
 
        rcu_read_lock();
-       ctx = rcu_dereference(vif->chanctx_conf);
+       ctx = rcu_dereference(vif->bss_conf.chanctx_conf);
        if (WARN_ON(!ctx)) {
                rcu_read_unlock();
                return -EINVAL;
 
        }
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(vif->chanctx_conf);
+       chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
        if (chanctx_conf)
                pos += scnprintf(buf+pos, bufsz-pos,
                                 "idle rx chains %d, active rx chains: %d\n",
        mutex_lock(&mvm->mutex);
        rcu_read_lock();
 
-       chanctx_conf = rcu_dereference(vif->chanctx_conf);
+       chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
        /* make sure the channel context is assigned */
        if (!chanctx_conf) {
                rcu_read_unlock();
 
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
  * Copyright (C) 2015-2017 Intel Deutschland GmbH
- * Copyright (C) 2018-2021 Intel Corporation
+ * Copyright (C) 2018-2022 Intel Corporation
  */
 #include <net/cfg80211.h>
 #include <linux/etherdevice.h>
        }
 
        rcu_read_lock();
-       pctx = rcu_dereference(vif->chanctx_conf);
+       pctx = rcu_dereference(vif->bss_conf.chanctx_conf);
        /* Copy the ctx to unlock the rcu and send the phy ctxt. We don't care
         * about changes in the ctx after releasing the lock because the driver
         * is still protected by the mutex. */
 
                eth_broadcast_addr(cmd->bssid_addr);
 
        rcu_read_lock();
-       chanctx = rcu_dereference(vif->chanctx_conf);
+       chanctx = rcu_dereference(vif->bss_conf.chanctx_conf);
        iwl_mvm_ack_rates(mvm, vif, chanctx ? chanctx->def.chan->band
                                            : NL80211_BAND_2GHZ,
                          &cck_ack_rates, &ofdm_ack_rates);
 
        /* Enable FILS on PSC channels only */
        rcu_read_lock();
-       ctx = rcu_dereference(vif->chanctx_conf);
+       ctx = rcu_dereference(vif->bss_conf.chanctx_conf);
        channel = ieee80211_frequency_to_channel(ctx->def.chan->center_freq);
        WARN_ON(channel == 0);
        if (cfg80211_channel_is_psc(ctx->def.chan) &&
 
        csa_vif = rcu_dereference_protected(mvm->csa_vif,
                                            lockdep_is_held(&mvm->mutex));
-       if (unlikely(csa_vif && csa_vif->csa_active))
+       if (unlikely(csa_vif && csa_vif->bss_conf.csa_active))
                iwl_mvm_csa_count_down(mvm, csa_vif, mvm->ap_last_beacon_gp2,
                                       (status == TX_STATUS_SUCCESS));
 
        switch (vif->type) {
        case NL80211_IFTYPE_AP:
                csa_vif = rcu_dereference(mvm->csa_vif);
-               if (WARN_ON(!csa_vif || !csa_vif->csa_active ||
+               if (WARN_ON(!csa_vif || !csa_vif->bss_conf.csa_active ||
                            csa_vif != vif))
                        goto out_unlock;
 
                 */
                if (iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP,
                                            CHANNEL_SWITCH_ERROR_NOTIF,
-                                           0) && !vif->csa_active) {
+                                           0) && !vif->bss_conf.csa_active) {
                        IWL_DEBUG_INFO(mvm, "Channel Switch was canceled\n");
                        iwl_mvm_cancel_channel_switch(mvm, vif, mac_id);
                        break;
 
 static void iwl_mvm_mu_mimo_iface_iterator(void *_data, u8 *mac,
                                           struct ieee80211_vif *vif)
 {
-       if (vif->mu_mimo_owner) {
+       if (vif->bss_conf.mu_mimo_owner) {
                struct iwl_mu_group_mgmt_notif *notif = _data;
 
                /*
 
        rcu_read_lock();
 
-       chanctx_conf = rcu_dereference(vif->chanctx_conf);
+       chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
        if (WARN_ON(!chanctx_conf)) {
                rcu_read_unlock();
                return;
                 * However, on HW restart we should restore this data.
                 */
                if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status) &&
-                   (changes & BSS_CHANGED_MU_GROUPS) && vif->mu_mimo_owner) {
+                   (changes & BSS_CHANGED_MU_GROUPS) && vif->bss_conf.mu_mimo_owner) {
                        ret = iwl_mvm_update_mu_groups(mvm, vif);
                        if (ret)
                                IWL_ERR(mvm,
 {
        struct iwl_mvm_ftm_responder_iter_data *data = _data;
 
-       if (rcu_access_pointer(vif->chanctx_conf) == data->ctx &&
+       if (rcu_access_pointer(vif->bss_conf.chanctx_conf) == data->ctx &&
            vif->type == NL80211_IFTYPE_AP && vif->bss_conf.ftmr_params)
                data->responder = true;
 }
                csa_vif =
                        rcu_dereference_protected(mvm->csa_vif,
                                                  lockdep_is_held(&mvm->mutex));
-               if (WARN_ONCE(csa_vif && csa_vif->csa_active,
+               if (WARN_ONCE(csa_vif && csa_vif->bss_conf.csa_active,
                              "Another CSA is already in progress")) {
                        ret = -EBUSY;
                        goto out_unlock;
 
        bool radar_detect = false;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(vif->chanctx_conf);
+       chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
        WARN_ON(!chanctx_conf);
        if (chanctx_conf) {
                chan = chanctx_conf->def.chan;
 
 #endif
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(vif->chanctx_conf);
+       chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
        if (WARN_ON(!chanctx_conf))
                band = NUM_NL80211_BANDS;
        else
 
 /*
  * Copyright (C) 2014 Intel Mobile Communications GmbH
  * Copyright (C) 2017 Intel Deutschland GmbH
- * Copyright (C) 2018-2020 Intel Corporation
+ * Copyright (C) 2018-2020, 2022 Intel Corporation
  */
 #include <linux/etherdevice.h>
 #include "mvm.h"
                           type == TDLS_MOVE_CH) {
                        /* we need to return to base channel */
                        struct ieee80211_chanctx_conf *chanctx =
-                                       rcu_dereference(vif->chanctx_conf);
+                                       rcu_dereference(vif->bss_conf.chanctx_conf);
 
                        if (WARN_ON_ONCE(!chanctx)) {
                                rcu_read_unlock();
 
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2012-2014, 2018-2021 Intel Corporation
+ * Copyright (C) 2012-2014, 2018-2022 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2017 Intel Deutschland GmbH
  */
        rcu_read_lock();
 
        csa_vif = rcu_dereference(mvm->csa_vif);
-       if (!csa_vif || !csa_vif->csa_active)
+       if (!csa_vif || !csa_vif->bss_conf.csa_active)
                goto out_unlock;
 
        IWL_DEBUG_TE(mvm, "CSA NOA started\n");
 
 
                if (mvmsta->vif)
                        chanctx_conf =
-                               rcu_dereference(mvmsta->vif->chanctx_conf);
+                               rcu_dereference(mvmsta->vif->bss_conf.chanctx_conf);
 
                if (WARN_ON_ONCE(!chanctx_conf))
                        goto out;
 
 
        rcu_read_lock();
        mac80211_hwsim_tx_frame(data->hw, skb,
-                               rcu_dereference(vif->chanctx_conf)->def.chan);
+                               rcu_dereference(vif->bss_conf.chanctx_conf)->def.chan);
        rcu_read_unlock();
 }
 
 
        rcu_read_lock();
        mac80211_hwsim_tx_frame(data->hw, skb,
-                               rcu_dereference(vif->chanctx_conf)->def.chan);
+                               rcu_dereference(vif->bss_conf.chanctx_conf)->def.chan);
        rcu_read_unlock();
 }
 
 {
        struct tx_iter_data *data = _data;
 
-       if (!vif->chanctx_conf)
+       if (!vif->bss_conf.chanctx_conf)
                return;
 
        if (!hwsim_chans_compat(data->channel,
-                               rcu_dereference(vif->chanctx_conf)->def.chan))
+                               rcu_dereference(vif->bss_conf.chanctx_conf)->def.chan))
                return;
 
        data->receive = true;
        } else if (txi->hw_queue == 4) {
                channel = data->tmp_chan;
        } else {
-               chanctx_conf = rcu_dereference(txi->control.vif->chanctx_conf);
+               struct ieee80211_bss_conf *bss_conf;
+
+               bss_conf = &txi->control.vif->bss_conf;
+
+               chanctx_conf = rcu_dereference(bss_conf->chanctx_conf);
                if (chanctx_conf) {
                        channel = chanctx_conf->def.chan;
                        confbw = chanctx_conf->def.width;
        }
 
        mac80211_hwsim_tx_frame(hw, skb,
-                               rcu_dereference(vif->chanctx_conf)->def.chan);
+                               rcu_dereference(vif->bss_conf.chanctx_conf)->def.chan);
 
        while ((skb = ieee80211_get_buffered_bc(hw, vif)) != NULL) {
                mac80211_hwsim_tx_frame(hw, skb,
-                               rcu_dereference(vif->chanctx_conf)->def.chan);
+                               rcu_dereference(vif->bss_conf.chanctx_conf)->def.chan);
        }
 
-       if (vif->csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
+       if (vif->bss_conf.csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
                ieee80211_csa_finish(vif);
 }
 
                struct ieee80211_chanctx_conf *chanctx_conf;
 
                rcu_read_lock();
-               chanctx_conf = rcu_dereference(vif->chanctx_conf);
+               chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
 
                if (!WARN_ON(!chanctx_conf))
                        confbw = chanctx_conf->def.width;
 
 static void
 __mt76_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
 {
-       if (vif->csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
+       if (vif->bss_conf.csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
                ieee80211_csa_finish(vif);
 }
 
 {
        struct mt76_dev *dev = priv;
 
-       if (!vif->csa_active)
+       if (!vif->bss_conf.csa_active)
                return;
 
        dev->csa_complete |= ieee80211_beacon_cntdwn_is_complete(vif);
 
 static void
 mt7615_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
 {
-       if (vif->csa_active)
+       if (vif->bss_conf.csa_active)
                ieee80211_csa_finish(vif);
 }
 
 
 static void
 mt7915_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
 {
-       if (vif->csa_active)
+       if (vif->bss_conf.csa_active)
                ieee80211_csa_finish(vif);
 }
 
 static void
 mt7915_mcu_cca_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
 {
-       if (!vif->color_change_active)
+       if (!vif->bss_conf.color_change_active)
                return;
 
        ieee80211_color_change_finish(vif);
        if (!offs->cntdwn_counter_offs[0])
                return;
 
-       sub_tag = vif->csa_active ? BSS_INFO_BCN_CSA : BSS_INFO_BCN_BCC;
+       sub_tag = vif->bss_conf.csa_active ? BSS_INFO_BCN_CSA : BSS_INFO_BCN_BCC;
        tlv = mt7915_mcu_add_nested_subtlv(rskb, sub_tag, sizeof(*info),
                                           &bcn->sub_ntlv, &bcn->len);
        info = (struct bss_info_bcn_cntdwn *)tlv;
        if (offs->cntdwn_counter_offs[0]) {
                u16 offset = offs->cntdwn_counter_offs[0];
 
-               if (vif->csa_active)
+               if (vif->bss_conf.csa_active)
                        cont->csa_ofs = cpu_to_le16(offset - 4);
-               if (vif->color_change_active)
+               if (vif->bss_conf.color_change_active)
                        cont->bcc_ofs = cpu_to_le16(offset - 3);
        }
 
 
                struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
 
                rcu_read_lock();
-               if (rcu_access_pointer(vif->chanctx_conf) != ctx) {
+               if (rcu_access_pointer(vif->bss_conf.chanctx_conf) != ctx) {
                        rcu_read_unlock();
                        continue;
                }
 
  * @tx_pwr_env_num: number of @tx_pwr_env.
  * @pwr_reduction: power constraint of BSS.
  * @eht_support: does this BSS support EHT
+ * @csa_active: marks whether a channel switch is going on. Internally it is
+ *     write-protected by sdata_lock and local->mtx so holding either is fine
+ *     for read access.
+ * @mu_mimo_owner: indicates interface owns MU-MIMO capability
+ * @chanctx_conf: The channel context this interface is assigned to, or %NULL
+ *     when it is not assigned. This pointer is RCU-protected due to the TX
+ *     path needing to access it; even though the netdev carrier will always
+ *     be off when it is %NULL there can still be races and packets could be
+ *     processed after it switches back to %NULL.
+ * @color_change_active: marks whether a color change is ongoing. Internally it is
+ *     write-protected by sdata_lock and local->mtx so holding either is fine
+ *     for read access.
+ * @color_change_color: the bss color that will be used after the change.
  */
 struct ieee80211_bss_conf {
        const u8 *bssid;
        u8 tx_pwr_env_num;
        u8 pwr_reduction;
        bool eht_support;
+
+       bool csa_active;
+       bool mu_mimo_owner;
+       struct ieee80211_chanctx_conf __rcu *chanctx_conf;
+
+       bool color_change_active;
+       u8 color_change_color;
 };
 
 /**
  * @addr: address of this interface
  * @p2p: indicates whether this AP or STA interface is a p2p
  *     interface, i.e. a GO or p2p-sta respectively
- * @csa_active: marks whether a channel switch is going on. Internally it is
- *     write-protected by sdata_lock and local->mtx so holding either is fine
- *     for read access.
- * @mu_mimo_owner: indicates interface owns MU-MIMO capability
  * @driver_flags: flags/capabilities the driver has for this interface,
  *     these need to be set (or cleared) when the interface is added
  *     or, if supported by the driver, the interface type is changed
  *     restrictions.
  * @hw_queue: hardware queue for each AC
  * @cab_queue: content-after-beacon (DTIM beacon really) queue, AP mode only
- * @chanctx_conf: The channel context this interface is assigned to, or %NULL
- *     when it is not assigned. This pointer is RCU-protected due to the TX
- *     path needing to access it; even though the netdev carrier will always
- *     be off when it is %NULL there can still be races and packets could be
- *     processed after it switches back to %NULL.
  * @debugfs_dir: debugfs dentry, can be used by drivers to create own per
  *     interface debug files. Note that it will be NULL for the virtual
  *     monitor interface (if that is requested.)
  *     protected by fq->lock.
  * @offload_flags: 802.3 -> 802.11 enapsulation offload flags, see
  *     &enum ieee80211_offload_flags.
- * @color_change_active: marks whether a color change is ongoing. Internally it is
- *     write-protected by sdata_lock and local->mtx so holding either is fine
- *     for read access.
- * @color_change_color: the bss color that will be used after the change.
  * @mbssid_tx_vif: Pointer to the transmitting interface if MBSSID is enabled.
  */
 struct ieee80211_vif {
        struct ieee80211_bss_conf bss_conf;
        u8 addr[ETH_ALEN] __aligned(2);
        bool p2p;
-       bool csa_active;
-       bool mu_mimo_owner;
 
        u8 cab_queue;
        u8 hw_queue[IEEE80211_NUM_ACS];
 
        struct ieee80211_txq *txq;
 
-       struct ieee80211_chanctx_conf __rcu *chanctx_conf;
-
        u32 driver_flags;
        u32 offload_flags;
 
 
        bool txqs_stopped[IEEE80211_NUM_ACS];
 
-       bool color_change_active;
-       u8 color_change_color;
-
        struct ieee80211_vif *mbssid_tx_vif;
 
        /* must be last */
 
 // SPDX-License-Identifier: ISC
 /*
  * Copyright (C) 2019 Felix Fietkau <nbd@nbd.name>
- * Copyright (C) 2021 Intel Corporation
+ * Copyright (C) 2021-2022 Intel Corporation
  */
 
 #include <net/mac80211.h>
 
        len += 38; /* Ethernet header length */
 
-       conf = rcu_dereference(vif->chanctx_conf);
+       conf = rcu_dereference(vif->bss_conf.chanctx_conf);
        if (conf) {
                band = conf->def.chan->band;
                shift = ieee80211_chandef_get_shift(&conf->def);
 
                                params->vht_mumimo_follow_addr);
        }
 
-       sdata->vif.mu_mimo_owner = mu_mimo_groups || mu_mimo_follow;
+       sdata->vif.bss_conf.mu_mimo_owner = mu_mimo_groups || mu_mimo_follow;
 }
 
 static int ieee80211_set_mon_options(struct ieee80211_sub_if_data *sdata,
        /* don't allow changing the beacon while a countdown is in place - offset
         * of channel switch counter may change
         */
-       if (sdata->vif.csa_active || sdata->vif.color_change_active)
+       if (sdata->vif.bss_conf.csa_active || sdata->vif.bss_conf.color_change_active)
                return -EBUSY;
 
        old = sdata_dereference(sdata->u.ap.beacon, sdata);
 
        /* abort any running channel switch */
        mutex_lock(&local->mtx);
-       sdata->vif.csa_active = false;
+       sdata->vif.bss_conf.csa_active = false;
        if (sdata->csa_block_tx) {
                ieee80211_wake_vif_queues(local, sdata,
                                          IEEE80211_QUEUE_STOP_REASON_CSA);
         * to send something, and if we're an AP we have to be able to do
         * so at a basic rate so that all clients can receive it.
         */
-       if (rcu_access_pointer(sdata->vif.chanctx_conf) &&
+       if (rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf) &&
            sdata->vif.bss_conf.chandef.chan) {
                u32 basic_rates = sdata->vif.bss_conf.basic_rates;
                enum nl80211_band band = sdata->vif.bss_conf.chandef.chan->band;
                                        &sdata->csa_chandef))
                return -EINVAL;
 
-       sdata->vif.csa_active = false;
+       sdata->vif.bss_conf.csa_active = false;
 
        err = ieee80211_set_after_csa_beacon(sdata, &changed);
        if (err)
        mutex_lock(&local->chanctx_mtx);
 
        /* AP might have been stopped while waiting for the lock. */
-       if (!sdata->vif.csa_active)
+       if (!sdata->vif.bss_conf.csa_active)
                goto unlock;
 
        if (!ieee80211_sdata_running(sdata))
 
 static void ieee80211_color_change_abort(struct ieee80211_sub_if_data  *sdata)
 {
-       sdata->vif.color_change_active = false;
+       sdata->vif.bss_conf.color_change_active = false;
 
        ieee80211_free_next_beacon(sdata);
 
                return -EINVAL;
 
        /* don't allow another channel switch if one is already active. */
-       if (sdata->vif.csa_active)
+       if (sdata->vif.bss_conf.csa_active)
                return -EBUSY;
 
        mutex_lock(&local->chanctx_mtx);
-       conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
+       conf = rcu_dereference_protected(sdata->vif.bss_conf.chanctx_conf,
                                         lockdep_is_held(&local->chanctx_mtx));
        if (!conf) {
                err = -EBUSY;
        }
 
        /* if there is a color change in progress, abort it */
-       if (sdata->vif.color_change_active)
+       if (sdata->vif.bss_conf.color_change_active)
                ieee80211_color_change_abort(sdata);
 
        err = ieee80211_set_csa_beacon(sdata, params, &changed);
 
        sdata->csa_chandef = params->chandef;
        sdata->csa_block_tx = params->block_tx;
-       sdata->vif.csa_active = true;
+       sdata->vif.bss_conf.csa_active = true;
 
        if (sdata->csa_block_tx)
                ieee80211_stop_vif_queues(local, sdata,
        mutex_lock(&local->mtx);
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (WARN_ON(!chanctx_conf)) {
                ret = -EINVAL;
                goto unlock;
        int ret = -ENODATA;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (chanctx_conf) {
                *chandef = sdata->vif.bss_conf.chandef;
                ret = 0;
        sdata_assert_lock(sdata);
        lockdep_assert_held(&local->mtx);
 
-       sdata->vif.color_change_active = false;
+       sdata->vif.bss_conf.color_change_active = false;
 
        err = ieee80211_set_after_color_change_beacon(sdata, &changed);
        if (err) {
        }
 
        ieee80211_color_change_bss_config_notify(sdata,
-                                                sdata->vif.color_change_color,
+                                                sdata->vif.bss_conf.color_change_color,
                                                 1, changed);
        cfg80211_color_change_notify(sdata->dev);
 
        mutex_lock(&local->mtx);
 
        /* AP might have been stopped while waiting for the lock. */
-       if (!sdata->vif.color_change_active)
+       if (!sdata->vif.bss_conf.color_change_active)
                goto unlock;
 
        if (!ieee80211_sdata_running(sdata))
 {
        struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
 
-       if (sdata->vif.color_change_active || sdata->vif.csa_active)
+       if (sdata->vif.bss_conf.color_change_active || sdata->vif.bss_conf.csa_active)
                return;
 
        cfg80211_obss_color_collision_notify(sdata->dev, color_bitmap);
        /* don't allow another color change if one is already active or if csa
         * is active
         */
-       if (sdata->vif.color_change_active || sdata->vif.csa_active) {
+       if (sdata->vif.bss_conf.color_change_active || sdata->vif.bss_conf.csa_active) {
                err = -EBUSY;
                goto out;
        }
        if (err)
                goto out;
 
-       sdata->vif.color_change_active = true;
-       sdata->vif.color_change_color = params->color;
+       sdata->vif.bss_conf.color_change_active = true;
+       sdata->vif.bss_conf.color_change_color = params->color;
 
        cfg80211_color_change_started_notify(sdata->dev, params->count);
 
 
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * mac80211 - channel management
- * Copyright 2020 - 2021 Intel Corporation
+ * Copyright 2020 - 2022 Intel Corporation
  */
 
 #include <linux/nl80211.h>
        struct ieee80211_local *local __maybe_unused = sdata->local;
        struct ieee80211_chanctx_conf *conf;
 
-       conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
+       conf = rcu_dereference_protected(sdata->vif.bss_conf.chanctx_conf,
                                         lockdep_is_held(&local->chanctx_mtx));
        if (!conf)
                return NULL;
                if (!ieee80211_sdata_running(sdata))
                        continue;
 
-               if (rcu_access_pointer(sdata->vif.chanctx_conf) != conf)
+               if (rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf) != conf)
                        continue;
 
                switch (vif->type) {
 
        /* use the configured bandwidth in case of monitor interface */
        sdata = rcu_dereference(local->monitor_sdata);
-       if (sdata && rcu_access_pointer(sdata->vif.chanctx_conf) == conf)
+       if (sdata && rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf) == conf)
                max_bw = max(max_bw, conf->def.width);
 
        rcu_read_unlock();
                if (!ieee80211_sdata_running(sta->sdata))
                        continue;
 
-               if (rcu_access_pointer(sta->sdata->vif.chanctx_conf) !=
+               if (rcu_access_pointer(sta->sdata->vif.bss_conf.chanctx_conf) !=
                    &ctx->conf)
                        continue;
 
        list_for_each_entry_rcu(sdata, &local->interfaces, list) {
                if (!ieee80211_sdata_running(sdata))
                        continue;
-               if (rcu_access_pointer(sdata->vif.chanctx_conf) != conf)
+               if (rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf) != conf)
                        continue;
                if (!sdata->radar_required)
                        continue;
 
                if (!ieee80211_sdata_running(sdata))
                        continue;
-               if (rcu_access_pointer(sdata->vif.chanctx_conf) != conf)
+               if (rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf) != conf)
                        continue;
                if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
                        continue;
        if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_NAN))
                return -ENOTSUPP;
 
-       conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
+       conf = rcu_dereference_protected(sdata->vif.bss_conf.chanctx_conf,
                                         lockdep_is_held(&local->chanctx_mtx));
 
        if (conf) {
        }
 
 out:
-       rcu_assign_pointer(sdata->vif.chanctx_conf, conf);
+       rcu_assign_pointer(sdata->vif.bss_conf.chanctx_conf, conf);
 
        sdata->vif.bss_conf.idle = !conf;
 
                if (!ieee80211_sdata_running(sdata))
                        continue;
 
-               if (rcu_access_pointer(sdata->vif.chanctx_conf) !=
+               if (rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf) !=
                                                &chanctx->conf)
                        continue;
 
        /* Disable SMPS for the monitor interface */
        sdata = rcu_dereference(local->monitor_sdata);
        if (sdata &&
-           rcu_access_pointer(sdata->vif.chanctx_conf) == &chanctx->conf)
+           rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf) == &chanctx->conf)
                rx_chains_dynamic = rx_chains_static = local->rx_chains;
 
        rcu_read_unlock();
         * channel context pointer for a while, possibly pointing
         * to a channel context that has already been freed.
         */
-       conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
+       conf = rcu_dereference_protected(sdata->vif.bss_conf.chanctx_conf,
                                         lockdep_is_held(&local->chanctx_mtx));
        WARN_ON(!conf);
 
                conf = NULL;
 
        list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list)
-               rcu_assign_pointer(vlan->vif.chanctx_conf, conf);
+               rcu_assign_pointer(vlan->vif.bss_conf.chanctx_conf, conf);
 }
 
 void ieee80211_vif_copy_chanctx_to_vlans(struct ieee80211_sub_if_data *sdata,
        }
 
        list_move(&sdata->assigned_chanctx_list, &new_ctx->assigned_vifs);
-       rcu_assign_pointer(sdata->vif.chanctx_conf, &new_ctx->conf);
+       rcu_assign_pointer(sdata->vif.bss_conf.chanctx_conf, &new_ctx->conf);
 
        if (sdata->vif.type == NL80211_IFTYPE_AP)
                __ieee80211_vif_copy_chanctx_to_vlans(sdata, false);
                        if (!ieee80211_vif_has_in_place_reservation(sdata))
                                continue;
 
-                       rcu_assign_pointer(sdata->vif.chanctx_conf, &ctx->conf);
+                       rcu_assign_pointer(sdata->vif.bss_conf.chanctx_conf,
+                                          &ctx->conf);
 
                        if (sdata->vif.type == NL80211_IFTYPE_AP)
                                __ieee80211_vif_copy_chanctx_to_vlans(sdata,
 
        lockdep_assert_held(&local->chanctx_mtx);
 
-       conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
+       conf = rcu_dereference_protected(sdata->vif.bss_conf.chanctx_conf,
                                         lockdep_is_held(&local->chanctx_mtx));
        if (!conf)
                return;
                goto out;
        }
 
-       conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
+       conf = rcu_dereference_protected(sdata->vif.bss_conf.chanctx_conf,
                                         lockdep_is_held(&local->chanctx_mtx));
        if (!conf) {
                ret = -EINVAL;
 
        mutex_lock(&local->chanctx_mtx);
 
-       conf = rcu_dereference_protected(ap->vif.chanctx_conf,
+       conf = rcu_dereference_protected(ap->vif.bss_conf.chanctx_conf,
                                         lockdep_is_held(&local->chanctx_mtx));
-       rcu_assign_pointer(sdata->vif.chanctx_conf, conf);
+       rcu_assign_pointer(sdata->vif.bss_conf.chanctx_conf, conf);
        mutex_unlock(&local->chanctx_mtx);
 }
 
 
        if (WARN_ON_ONCE(sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE ||
                         sdata->vif.type == NL80211_IFTYPE_NAN ||
                         (sdata->vif.type == NL80211_IFTYPE_MONITOR &&
-                         !sdata->vif.mu_mimo_owner &&
+                         !sdata->vif.bss_conf.mu_mimo_owner &&
                          !(changed & BSS_CHANGED_TXPOWER))))
                return;
 
 
  * Copied from cfg.c - originally
  * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
  * Copyright 2014      Intel Corporation (Author: Johannes Berg)
- * Copyright (C) 2018 Intel Corporation
+ * Copyright (C) 2018, 2022 Intel Corporation
  */
 #include <linux/types.h>
 #include <net/cfg80211.h>
        survey.filled = 0;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (chanctx_conf)
                channel = chanctx_conf->def.chan;
        else
 
  * Copyright 2009, Johannes Berg <johannes@sipsolutions.net>
  * Copyright 2013-2014  Intel Mobile Communications GmbH
  * Copyright(c) 2016 Intel Deutschland GmbH
- * Copyright(c) 2018-2021 Intel Corporation
+ * Copyright(c) 2018-2022 Intel Corporation
  */
 
 #include <linux/delay.h>
        }
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (WARN_ON_ONCE(!chanctx_conf))
                return NULL;
        band = chanctx_conf->def.chan->band;
        if (len < required_len)
                return;
 
-       if (!sdata->vif.csa_active)
+       if (!sdata->vif.bss_conf.csa_active)
                ieee80211_ibss_process_chanswitch(sdata, elems, false);
 }
 
                goto put_bss;
 
        /* process channel switch */
-       if (sdata->vif.csa_active ||
+       if (sdata->vif.bss_conf.csa_active ||
            ieee80211_ibss_process_chanswitch(sdata, elems, true))
                goto put_bss;
 
                return;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (WARN_ON_ONCE(!chanctx_conf)) {
                rcu_read_unlock();
                return;
 
        int shift = 0;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(vif->chanctx_conf);
+       chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
        if (chanctx_conf)
                shift = ieee80211_chandef_get_shift(&chanctx_conf->def);
        rcu_read_unlock();
        enum nl80211_band band;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
 
        if (!chanctx_conf) {
                rcu_read_unlock();
        struct ieee80211_chanctx_conf *chanctx_conf;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (WARN_ON(!chanctx_conf)) {
                rcu_read_unlock();
                kfree_skb(skb);
 
        int power;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (!chanctx_conf) {
                rcu_read_unlock();
                return false;
                         * will not add another interface while any channel
                         * switch is active.
                         */
-                       if (nsdata->vif.csa_active)
+                       if (nsdata->vif.bss_conf.csa_active)
                                return -EBUSY;
 
                        /*
        cancel_work_sync(&sdata->recalc_smps);
        sdata_lock(sdata);
        mutex_lock(&local->mtx);
-       sdata->vif.csa_active = false;
+       sdata->vif.bss_conf.csa_active = false;
        if (sdata->vif.type == NL80211_IFTYPE_STATION)
                sdata->u.mgd.csa_waiting_bcn = false;
        if (sdata->csa_block_tx) {
                mutex_lock(&local->mtx);
                list_del(&sdata->u.vlan.list);
                mutex_unlock(&local->mtx);
-               RCU_INIT_POINTER(sdata->vif.chanctx_conf, NULL);
+               RCU_INIT_POINTER(sdata->vif.bss_conf.chanctx_conf, NULL);
                /* see comment in the default case below */
                ieee80211_free_keys(sdata, true);
                /* no need to tell driver */
 
 
        rcu_read_lock();
        list_for_each_entry_rcu(sdata, &local->interfaces, list) {
-               if (!rcu_access_pointer(sdata->vif.chanctx_conf))
+               if (!rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf))
                        continue;
                if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
                        continue;
                         * Then we can have a race...
                         */
                        cancel_work_sync(&sdata->u.mgd.csa_connection_drop_work);
-                       if (sdata->vif.csa_active) {
+                       if (sdata->vif.bss_conf.csa_active) {
                                sdata_lock(sdata);
                                ieee80211_sta_connection_lost(sdata,
                                                              WLAN_REASON_UNSPECIFIED,
 
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2008, 2009 open80211s Ltd.
- * Copyright (C) 2018 - 2021 Intel Corporation
+ * Copyright (C) 2018 - 2022 Intel Corporation
  * Authors:    Luis Carlos Cobo <luisca@cozybit.com>
  *            Javier Cardona <javier@cozybit.com>
  */
                return -ENOMEM;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (WARN_ON(!chanctx_conf)) {
                rcu_read_unlock();
                return -EINVAL;
        u8 *pos;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (WARN_ON(!chanctx_conf)) {
                rcu_read_unlock();
                return -EINVAL;
        u8 *pos;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (WARN_ON(!chanctx_conf)) {
                rcu_read_unlock();
                return -EINVAL;
 
        sdata = container_of(ifmsh, struct ieee80211_sub_if_data, u.mesh);
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        band = chanctx_conf->def.chan->band;
        rcu_read_unlock();
 
                                              rx_status);
 
                if (ifmsh->csa_role != IEEE80211_MESH_CSA_ROLE_INIT &&
-                   !sdata->vif.csa_active)
+                   !sdata->vif.bss_conf.csa_active)
                        ieee80211_mesh_process_chnswitch(sdata, elems, true);
        }
 
 
        ifmsh->pre_value = pre_value;
 
-       if (!sdata->vif.csa_active &&
+       if (!sdata->vif.bss_conf.csa_active &&
            !ieee80211_mesh_process_chnswitch(sdata, elems, false)) {
                mcsa_dbg(sdata, "Failed to process CSA action frame");
                goto free;
 
                struct ieee80211_sub_if_data *other;
 
                list_for_each_entry_rcu(other, &local->interfaces, list) {
-                       if (other->vif.mu_mimo_owner) {
+                       if (other->vif.bss_conf.mu_mimo_owner) {
                                disable_mu_mimo = true;
                                break;
                        }
                if (disable_mu_mimo)
                        cap &= ~IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE;
                else
-                       sdata->vif.mu_mimo_owner = true;
+                       sdata->vif.bss_conf.mu_mimo_owner = true;
        }
 
        mask = IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK;
        bool reg_cap = false;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (!WARN_ON_ONCE(!chanctx_conf))
                reg_cap = cfg80211_chandef_usable(sdata->wdev.wiphy,
                                                  &chanctx_conf->def,
        bool reg_cap = false;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (!WARN_ON_ONCE(!chanctx_conf))
                reg_cap = cfg80211_chandef_usable(sdata->wdev.wiphy,
                                                  &chanctx_conf->def,
        sdata_assert_lock(sdata);
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (WARN_ON(!chanctx_conf)) {
                rcu_read_unlock();
                return -EINVAL;
        if (!ifmgd->associated)
                goto out;
 
-       if (!sdata->vif.csa_active)
+       if (!sdata->vif.bss_conf.csa_active)
                goto out;
 
        /*
 
        sdata_assert_lock(sdata);
 
-       WARN_ON(!sdata->vif.csa_active);
+       WARN_ON(!sdata->vif.bss_conf.csa_active);
 
        if (sdata->csa_block_tx) {
                ieee80211_wake_vif_queues(local, sdata,
                sdata->csa_block_tx = false;
        }
 
-       sdata->vif.csa_active = false;
+       sdata->vif.bss_conf.csa_active = false;
        ifmgd->csa_waiting_bcn = false;
        /*
         * If the CSA IE is still present on the beacon after the switch,
                                          IEEE80211_QUEUE_STOP_REASON_CSA);
 
        sdata->csa_block_tx = false;
-       sdata->vif.csa_active = false;
+       sdata->vif.bss_conf.csa_active = false;
 
        mutex_unlock(&local->mtx);
 
        if (res < 0)
                goto lock_and_drop_connection;
 
-       if (beacon && sdata->vif.csa_active && !ifmgd->csa_waiting_bcn) {
+       if (beacon && sdata->vif.bss_conf.csa_active && !ifmgd->csa_waiting_bcn) {
                if (res)
                        ieee80211_sta_abort_chanswitch(sdata);
                else
                        drv_channel_switch_rx_beacon(sdata, &ch_switch);
                return;
-       } else if (sdata->vif.csa_active || res) {
+       } else if (sdata->vif.bss_conf.csa_active || res) {
                /* disregard subsequent announcements if already processing */
                return;
        }
 
        mutex_lock(&local->mtx);
        mutex_lock(&local->chanctx_mtx);
-       conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
+       conf = rcu_dereference_protected(sdata->vif.bss_conf.chanctx_conf,
                                         lockdep_is_held(&local->chanctx_mtx));
        if (!conf) {
                sdata_info(sdata,
        }
        mutex_unlock(&local->chanctx_mtx);
 
-       sdata->vif.csa_active = true;
+       sdata->vif.bss_conf.csa_active = true;
        sdata->csa_chandef = csa_ie.chandef;
        sdata->csa_block_tx = csa_ie.mode;
        ifmgd->csa_ignored_same_chan = false;
         * send a deauthentication frame. Those two fields will be
         * reset when the disconnection worker runs.
         */
-       sdata->vif.csa_active = true;
+       sdata->vif.bss_conf.csa_active = true;
        sdata->csa_block_tx = csa_ie.mode;
 
        ieee80211_queue_work(&local->hw, &ifmgd->csa_connection_drop_work);
        memset(sdata->vif.bss_conf.mu_group.position, 0,
               sizeof(sdata->vif.bss_conf.mu_group.position));
        changed |= BSS_CHANGED_MU_GROUPS;
-       sdata->vif.mu_mimo_owner = false;
+       sdata->vif.bss_conf.mu_mimo_owner = false;
 
        sdata->ap_power_level = IEEE80211_UNSET_POWER_LEVEL;
 
        mutex_lock(&local->mtx);
        ieee80211_vif_release_channel(sdata);
 
-       sdata->vif.csa_active = false;
+       sdata->vif.bss_conf.csa_active = false;
        ifmgd->csa_waiting_bcn = false;
        ifmgd->csa_ignored_same_chan = false;
        if (sdata->csa_block_tx) {
                                        WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY,
                               tx, frame_buf);
        mutex_lock(&local->mtx);
-       sdata->vif.csa_active = false;
+       sdata->vif.bss_conf.csa_active = false;
        ifmgd->csa_waiting_bcn = false;
        if (sdata->csa_block_tx) {
                ieee80211_wake_vif_queues(local, sdata,
                eth_zero_addr(sdata->u.mgd.bssid);
                ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);
                sdata->u.mgd.flags = 0;
-               sdata->vif.mu_mimo_owner = false;
+               sdata->vif.bss_conf.mu_mimo_owner = false;
 
                mutex_lock(&sdata->local->mtx);
                ieee80211_vif_release_channel(sdata);
                return;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (!chanctx_conf) {
                rcu_read_unlock();
                return;
                from_timer(sdata, t, u.mgd.bcn_mon_timer);
        struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
 
-       if (sdata->vif.csa_active && !ifmgd->csa_waiting_bcn)
+       if (sdata->vif.bss_conf.csa_active && !ifmgd->csa_waiting_bcn)
                return;
 
        if (sdata->vif.driver_flags & IEEE80211_VIF_BEACON_FILTER)
        struct sta_info *sta;
        unsigned long timeout;
 
-       if (sdata->vif.csa_active && !ifmgd->csa_waiting_bcn)
+       if (sdata->vif.bss_conf.csa_active && !ifmgd->csa_waiting_bcn)
                return;
 
        sta = sta_info_get(sdata, ifmgd->bssid);
 
  *
  * Copyright: (c) 2014 Czech Technical University in Prague
  *            (c) 2014 Volkswagen Group Research
+ * Copyright (C) 2022 Intel Corporation
  * Author:    Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
  * Funded by: Volkswagen Group Research
  */
        ocb_dbg(sdata, "Adding new OCB station %pM\n", addr);
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (WARN_ON_ONCE(!chanctx_conf)) {
                rcu_read_unlock();
                return;
 
  * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
  * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
  * Copyright 2009      Johannes Berg <johannes@sipsolutions.net>
- * Copyright (C) 2019 Intel Corporation
+ * Copyright (C) 2019, 2022 Intel Corporation
  */
 #include <linux/export.h>
 #include <net/mac80211.h>
                struct ieee80211_chanctx_conf *chanctx_conf;
 
                rcu_read_lock();
-               chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+               chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
 
                if (chanctx_conf) {
                        need_offchan = params->chan &&
        data = skb_put_data(skb, params->buf, params->len);
 
        /* Update CSA counters */
-       if (sdata->vif.csa_active &&
+       if (sdata->vif.bss_conf.csa_active &&
            (sdata->vif.type == NL80211_IFTYPE_AP ||
             sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
             sdata->vif.type == NL80211_IFTYPE_ADHOC) &&
 
  * Copyright 2005-2006, Devicescape Software, Inc.
  * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
  * Copyright 2017      Intel Deutschland GmbH
+ * Copyright (C) 2022 Intel Corporation
  */
 
 #include <linux/kernel.h>
 
        rcu_read_lock();
 
-       chanctx_conf = rcu_dereference(sta->sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sta->sdata->vif.bss_conf.chanctx_conf);
        if (WARN_ON(!chanctx_conf)) {
                rcu_read_unlock();
                return;
        if (ref && ref->ops->rate_update) {
                rcu_read_lock();
 
-               chanctx_conf = rcu_dereference(sta->sdata->vif.chanctx_conf);
+               chanctx_conf = rcu_dereference(sta->sdata->vif.bss_conf.chanctx_conf);
                if (WARN_ON(!chanctx_conf)) {
                        rcu_read_unlock();
                        return;
 
        if (ieee80211_hw_check(&rx->local->hw, DETECTS_COLOR_COLLISION))
                return;
 
-       if (rx->sdata->vif.csa_active)
+       if (rx->sdata->vif.bss_conf.csa_active)
                return;
 
        baselen = mgmt->u.beacon.variable - rx->skb->data;
 
        skb->dev = sdata->dev;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (WARN_ON(!chanctx_conf)) {
                rcu_read_unlock();
                kfree_skb(skb);
 
  * Copyright 2014, Intel Corporation
  * Copyright 2014  Intel Mobile Communications GmbH
  * Copyright 2015 - 2016 Intel Deutschland GmbH
- * Copyright (C) 2019, 2021 Intel Corporation
+ * Copyright (C) 2019, 2021-2022 Intel Corporation
  */
 
 #include <linux/ieee80211.h>
        struct ieee80211_supported_band *sband;
 
        mutex_lock(&local->chanctx_mtx);
-       conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
+       conf = rcu_dereference_protected(sdata->vif.bss_conf.chanctx_conf,
                                         lockdep_is_held(&local->chanctx_mtx));
        if (conf) {
                width = conf->def.width;
 
        switch (oper) {
        case NL80211_TDLS_ENABLE_LINK:
-               if (sdata->vif.csa_active) {
+               if (sdata->vif.bss_conf.csa_active) {
                        tdls_dbg(sdata, "TDLS: disallow link during CSA\n");
                        ret = -EBUSY;
                        break;
 
                return 0;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(tx->sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(tx->sdata->vif.bss_conf.chanctx_conf);
        if (chanctx_conf) {
                shift = ieee80211_chandef_get_shift(&chanctx_conf->def);
                rate_flags = ieee80211_chandef_rate_flags(&chanctx_conf->def);
                }
        }
 
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (!chanctx_conf) {
                tmp_sdata = rcu_dereference(local->monitor_sdata);
                if (tmp_sdata)
                        chanctx_conf =
-                               rcu_dereference(tmp_sdata->vif.chanctx_conf);
+                               rcu_dereference(tmp_sdata->vif.bss_conf.chanctx_conf);
        }
 
        if (chanctx_conf)
                }
                ap_sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
                                        u.ap);
-               chanctx_conf = rcu_dereference(ap_sdata->vif.chanctx_conf);
+               chanctx_conf = rcu_dereference(ap_sdata->vif.bss_conf.chanctx_conf);
                if (!chanctx_conf) {
                        ret = -ENOTCONN;
                        goto free;
                fallthrough;
        case NL80211_IFTYPE_AP:
                if (sdata->vif.type == NL80211_IFTYPE_AP)
-                       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+                       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
                if (!chanctx_conf) {
                        ret = -ENOTCONN;
                        goto free;
                                                skb->data + ETH_ALEN);
 
                }
-               chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+               chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
                if (!chanctx_conf) {
                        ret = -ENOTCONN;
                        goto free;
                        memcpy(hdr.addr3, skb->data, ETH_ALEN);
                        hdrlen = 24;
                }
-               chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+               chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
                if (!chanctx_conf) {
                        ret = -ENOTCONN;
                        goto free;
                memcpy(hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN);
                eth_broadcast_addr(hdr.addr3);
                hdrlen = 24;
-               chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+               chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
                if (!chanctx_conf) {
                        ret = -ENOTCONN;
                        goto free;
                memcpy(hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN);
                memcpy(hdr.addr3, sdata->u.ibss.bssid, ETH_ALEN);
                hdrlen = 24;
-               chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+               chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
                if (!chanctx_conf) {
                        ret = -ENOTCONN;
                        goto free;
                goto out;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (!chanctx_conf) {
                rcu_read_unlock();
                goto out;
        sdata = vif_to_sdata(info->control.vif);
 
        if (info->control.flags & IEEE80211_TX_INTCFL_NEED_TXPROCESSING) {
-               chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+               chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
                if (unlikely(!chanctx_conf)) {
                        dev_kfree_skb(skb);
                        return true;
 
        bcn_offsets = beacon->cntdwn_counter_offsets;
        count = beacon->cntdwn_current_counter;
-       if (sdata->vif.csa_active)
+       if (sdata->vif.bss_conf.csa_active)
                max_count = IEEE80211_MAX_CNTDWN_COUNTERS_NUM;
 
        for (i = 0; i < max_count; ++i) {
        rcu_read_lock();
 
        sdata = vif_to_sdata(vif);
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
 
        if (!ieee80211_sdata_running(sdata) || !chanctx_conf)
                goto out;
        sdata = vif_to_sdata(vif);
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
 
        if (!chanctx_conf)
                goto out;
 
                return;
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        if (chanctx_conf)
                center_freq = chanctx_conf->def.chan->center_freq;
 
        memset(&qparam, 0, sizeof(qparam));
 
        rcu_read_lock();
-       chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+       chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
        use_11b = (chanctx_conf &&
                   chanctx_conf->def.chan->band == NL80211_BAND_2GHZ) &&
                 !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE);
                return;
 
        mutex_lock(&local->chanctx_mtx);
-       conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
+       conf = rcu_dereference_protected(sdata->vif.bss_conf.chanctx_conf,
                                         lockdep_is_held(&local->chanctx_mtx));
        if (conf) {
                ctx = container_of(conf, struct ieee80211_chanctx, conf);
                          BSS_CHANGED_TXPOWER |
                          BSS_CHANGED_MCAST_RATE;
 
-               if (sdata->vif.mu_mimo_owner)
+               if (sdata->vif.bss_conf.mu_mimo_owner)
                        changed |= BSS_CHANGED_MU_GROUPS;
 
                switch (sdata->vif.type) {
 
        mutex_lock(&local->chanctx_mtx);
 
-       chanctx_conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
-                                       lockdep_is_held(&local->chanctx_mtx));
+       chanctx_conf = rcu_dereference_protected(sdata->vif.bss_conf.chanctx_conf,
+                                                lockdep_is_held(&local->chanctx_mtx));
 
        /*
         * This function can be called from a work, thus it may be possible
 
        mutex_lock(&local->chanctx_mtx);
 
-       chanctx_conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
-                                       lockdep_is_held(&local->chanctx_mtx));
+       chanctx_conf = rcu_dereference_protected(sdata->vif.bss_conf.chanctx_conf,
+                                                lockdep_is_held(&local->chanctx_mtx));
 
        if (WARN_ON_ONCE(!chanctx_conf))
                goto unlock;
 
  *
  * Portions of this file
  * Copyright(c) 2015 - 2016 Intel Deutschland GmbH
- * Copyright (C) 2018 - 2021 Intel Corporation
+ * Copyright (C) 2018 - 2022 Intel Corporation
  */
 
 #include <linux/ieee80211.h>
 {
        struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
 
-       if (!sdata->vif.mu_mimo_owner)
+       if (!sdata->vif.bss_conf.mu_mimo_owner)
                return;
 
        if (!memcmp(mgmt->u.action.u.vht_group_notif.position,
 {
        struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
 
-       if (WARN_ON_ONCE(!vif->mu_mimo_owner))
+       if (WARN_ON_ONCE(!vif->bss_conf.mu_mimo_owner))
                return;
 
        memcpy(bss_conf->mu_group.membership, membership, WLAN_MEMBERSHIP_LEN);