From: Peter Oh <[email protected]>

There is no meaning to call ieee80211_mesh_process_chnswitch
without CSA IE provided, since the function will always return error.

Signed-off-by: Peter Oh <[email protected]>
---
 net/mac80211/mesh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index d51da26e9c18..8ced757dff8d 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -1196,7 +1196,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct 
ieee80211_sub_if_data *sdata,
                        stype, mgmt, &elems, rx_status);
 
        if (ifmsh->csa_role != IEEE80211_MESH_CSA_ROLE_INIT &&
-           !sdata->vif.csa_active)
+           !sdata->vif.csa_active && elems.ch_switch_ie)
                ieee80211_mesh_process_chnswitch(sdata, &elems, true);
 }
 
-- 
2.11.0 (Apple Git-81)

Reply via email to