Commit d0a9123e authored by Johannes Berg's avatar Johannes Berg
Browse files

wifi: mac80211: move some future per-link data to bss_conf



To add MLD, reuse the bss_conf structure later for per-link
information, so move some things into it that are per link.

Most transformations were done with the following spatch:

    @@
    expression sdata;
    identifier var = { chanctx_conf, mu_mimo_owner, csa_active, color_change_active, color_change_color };
    @@
    -sdata->vif.var
    +sdata->vif.bss_conf.var

    @@
    struct ieee80211_vif *vif;
    identifier var = { chanctx_conf, mu_mimo_owner, csa_active, color_change_active, color_change_color };
    @@
    -vif->var
    +vif->bss_conf.var

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 7b0a0e3c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3840,7 +3840,7 @@ ath10k_update_per_peer_tx_stats(struct ath10k *ar,
	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;
+4 −4
Original line number Diff line number Diff line
@@ -659,7 +659,7 @@ int ath10k_mac_vif_chan(struct ieee80211_vif *vif,
	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;
@@ -2028,7 +2028,7 @@ static void ath10k_mac_vif_ap_csa_count_down(struct ath10k_vif *arvif)
	if (arvif->vdev_type != WMI_VDEV_TYPE_AP)
		return;

	if (!vif->csa_active)
	if (!vif->bss_conf.csa_active)
		return;

	if (!arvif->is_up)
@@ -8832,7 +8832,7 @@ ath10k_mac_change_chanctx_cnt_iter(void *data, u8 *mac,
{
	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++;
@@ -8845,7 +8845,7 @@ ath10k_mac_change_chanctx_fill_iter(void *data, u8 *mac,
	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;

+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ static int ath10k_wmi_tlv_event_bcn_tx_status(struct ath10k *ar,
	}

	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);
+1 −1
Original line number Diff line number Diff line
@@ -3882,7 +3882,7 @@ void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
		 * 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;
+6 −6
Original line number Diff line number Diff line
@@ -505,7 +505,7 @@ static int ath11k_mac_vif_chan(struct ieee80211_vif *vif,
	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;
@@ -1398,10 +1398,10 @@ void ath11k_mac_bcn_tx_event(struct ath11k_vif *arvif)
{
	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;
@@ -1409,7 +1409,7 @@ void ath11k_mac_bcn_tx_event(struct ath11k_vif *arvif)

	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);
}
@@ -6849,7 +6849,7 @@ ath11k_mac_change_chanctx_cnt_iter(void *data, u8 *mac,
{
	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++;
@@ -6862,7 +6862,7 @@ ath11k_mac_change_chanctx_fill_iter(void *data, u8 *mac,
	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;

Loading