From 8b4385c68917b12da4c11548083239b8600f56f8 Mon Sep 17 00:00:00 2001 From: Aaradhana Sahu Date: Tue, 23 May 2023 15:41:32 +0530 Subject: [PATCH] mac80211: Fix client connection issue on repeater AP During AP-STA configuration, repeater AP sends packet to client then it compares param and chandef channel compatibility but in 6G band different channels pool maintain due to this chandef chan pointer not compatible with param chan pointer and return EBUSY from ieee80211_mgmt_tx. Fix this issue by using cfg80211_chandef_identical API. Signed-off-by: Aaradhana Sahu --- net/mac80211/offchannel.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index e61d867..777b71d 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -922,7 +922,8 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, if (!chanctx_conf) continue; - if (mlo_sta && params->chan == chanctx_conf->def.chan && + if (mlo_sta && cfg80211_channel_identical(params->chan, + chanctx_conf->def.chan) && ether_addr_equal(sdata->vif.addr, mgmt->sa)) { link_id = i; break; @@ -935,7 +936,8 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, */ if (sdata->vif.valid_links && params->link_id >= 0 && params->link_id == i && - params->chan == chanctx_conf->def.chan) + cfg80211_channel_identical(params->chan, + chanctx_conf->def.chan)) link_id = i; break; } @@ -945,8 +947,8 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, if (chanctx_conf) { need_offchan = params->chan && - (params->chan != - chanctx_conf->def.chan); + !cfg80211_channel_identical(params->chan, + chanctx_conf->def.chan); } else { need_offchan = true; } -- 2.17.1