Commit 86a8db67 authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: fix channel switch link data

Use the correct link ID and per-link puncturing data instead
of hardcoding link ID 0 and using deflink puncturing.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230827135854.0b6a211c8e75.I5724d32bb2dae440888efbc47334d8c115db9d50@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 563fe446
...@@ -3618,7 +3618,7 @@ static int __ieee80211_csa_finalize(struct ieee80211_link_data *link_data) ...@@ -3618,7 +3618,7 @@ static int __ieee80211_csa_finalize(struct ieee80211_link_data *link_data)
return ieee80211_link_use_reserved_context(&sdata->deflink); return ieee80211_link_use_reserved_context(&sdata->deflink);
} }
if (!cfg80211_chandef_identical(&sdata->vif.bss_conf.chandef, if (!cfg80211_chandef_identical(&link_data->conf->chandef,
&link_data->csa_chandef)) &link_data->csa_chandef))
return -EINVAL; return -EINVAL;
...@@ -3634,7 +3634,7 @@ static int __ieee80211_csa_finalize(struct ieee80211_link_data *link_data) ...@@ -3634,7 +3634,7 @@ static int __ieee80211_csa_finalize(struct ieee80211_link_data *link_data)
changed |= BSS_CHANGED_EHT_PUNCTURING; changed |= BSS_CHANGED_EHT_PUNCTURING;
} }
ieee80211_link_info_change_notify(sdata, &sdata->deflink, changed); ieee80211_link_info_change_notify(sdata, link_data, changed);
if (link_data->csa_block_tx) { if (link_data->csa_block_tx) {
ieee80211_wake_vif_queues(local, sdata, ieee80211_wake_vif_queues(local, sdata,
...@@ -3646,8 +3646,9 @@ static int __ieee80211_csa_finalize(struct ieee80211_link_data *link_data) ...@@ -3646,8 +3646,9 @@ static int __ieee80211_csa_finalize(struct ieee80211_link_data *link_data)
if (err) if (err)
return err; return err;
cfg80211_ch_switch_notify(sdata->dev, &link_data->csa_chandef, 0, cfg80211_ch_switch_notify(sdata->dev, &link_data->csa_chandef,
sdata->vif.bss_conf.eht_puncturing); link_data->link_id,
link_data->conf->eht_puncturing);
return 0; return 0;
} }
......
...@@ -1772,7 +1772,8 @@ static void ieee80211_chswitch_post_beacon(struct ieee80211_link_data *link) ...@@ -1772,7 +1772,8 @@ static void ieee80211_chswitch_post_beacon(struct ieee80211_link_data *link)
return; return;
} }
cfg80211_ch_switch_notify(sdata->dev, &link->reserved_chandef, 0, 0); cfg80211_ch_switch_notify(sdata->dev, &link->reserved_chandef,
link->link_id, 0);
} }
void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success, void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment