Skip to content

Commit a6d521b

Browse files
committed
wifi: mac80211: don't unreserve never reserved chanctx
If a link has no chanctx, indicating it is an inactive link that we tracked CSA for, then attempting to unreserve the reserved chanctx will throw a warning and fail, since there never was a reserved chanctx. Skip the unreserve. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250709233537.022192f4b1ae.Ib58156ac13e674a9f4d714735be0764a244c0aae@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 5045950 commit a6d521b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/mac80211/mlme.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2561,7 +2561,8 @@ ieee80211_sta_abort_chanswitch(struct ieee80211_link_data *link)
25612561
if (!local->ops->abort_channel_switch)
25622562
return;
25632563

2564-
ieee80211_link_unreserve_chanctx(link);
2564+
if (rcu_access_pointer(link->conf->chanctx_conf))
2565+
ieee80211_link_unreserve_chanctx(link);
25652566

25662567
ieee80211_vif_unblock_queues_csa(sdata);
25672568

0 commit comments

Comments
 (0)