From: Johannes Berg <johannes.berg@xxxxxxxxx> The mesh_id is an array so can't ever be NULL, it looks like mesh_id_len check was intended instead. Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- net/mac80211/cfg.c | 2 +- net/mac80211/mesh.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index db17c9c..cd14bef 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3108,7 +3108,7 @@ static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, case NL80211_IFTYPE_MESH_POINT: ifmsh = &sdata->u.mesh; - if (!ifmsh->mesh_id) + if (!ifmsh->mesh_id_len) return -EINVAL; if (params->chandef.width != sdata->vif.bss_conf.chandef.width) diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index ba10525..59f6243 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -866,7 +866,7 @@ ieee80211_mesh_process_chnswitch(struct ieee80211_sub_if_data *sdata, if (sdata->vif.csa_active) return true; - if (!ifmsh->mesh_id) + if (!ifmsh->mesh_id_len) return false; sta_flags = IEEE80211_STA_DISABLE_VHT; -- 1.8.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html