blob: 981a5324eae4a95032597ccf68be61da117d9a6e [file] [log] [blame]
From 8cb06d601dff5b2728684f230ffe46d42e98cab3 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Fri, 29 Mar 2024 14:55:41 +0800
Subject: [PATCH] mac80211: mtk: send 4 addr nullfunc after drv_event_callback
mt76 set channel in drv_event_callback and the 4 addr nullfunc may
be dropped. Send 4 addr nullfunc after drv_event_callback to avoid
this issue.
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index ed81ebf..0f3d8cc 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3671,13 +3671,6 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
bss_conf->assoc_capability = capab_info;
ieee80211_set_associated(sdata, cbss, changed);
- /*
- * If we're using 4-addr mode, let the AP know that we're
- * doing so, so that it can create the STA VLAN on its side
- */
- if (ifmgd->use_4addr)
- ieee80211_send_4addr_nullfunc(local, sdata);
-
/*
* Start timer to probe the connection to the AP now.
* Also start the timer that will detect beacon loss.
@@ -3798,6 +3791,13 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
drv_event_callback(sdata->local, sdata, &event);
sdata_info(sdata, "associated\n");
+ /*
+ * If we're using 4-addr mode, let the AP know that we're
+ * doing so, so that it can create the STA VLAN on its side
+ */
+ if (ifmgd->use_4addr)
+ ieee80211_send_4addr_nullfunc(sdata->local, sdata);
+
/*
* destroy assoc_data afterwards, as otherwise an idle
* recalc after assoc_data is NULL but before associated
--
2.18.0