When we receive a notification from the FW that we joined a cluster, we currently notify cfg80211 by call cfg80211_nan_cluster_joined. But we need to notify mac80211 as well, otherwise, it will not have the updated cluster id and will drop any frame received from this cluster, and will also put the wrong value in addr3 of the TXed frames. Call mac80211's ieee80211_nan_cluster_joined instead. It will already notify cfg80211. Fixes: 43ef5856bdab ("wifi: mac80211: track the id of the NAN cluster we joined") Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/nan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/nan.c b/drivers/net/wireless/intel/iwlwifi/mld/nan.c index 10df33a238d1..441474c4e354 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/nan.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/nan.c @@ -334,8 +334,6 @@ void iwl_mld_handle_nan_cluster_notif(struct iwl_mld *mld, struct iwl_rx_packet *pkt) { struct iwl_nan_cluster_notif *notif = (void *)pkt->data; - struct wireless_dev *wdev = mld->nan_device_vif ? - ieee80211_vif_to_wdev(mld->nan_device_vif) : NULL; bool new_cluster = !!(notif->flags & IWL_NAN_CLUSTER_NOTIF_FLAG_NEW_CLUSTER); u8 cluster_id[ETH_ALEN] = { @@ -347,14 +345,16 @@ void iwl_mld_handle_nan_cluster_notif(struct iwl_mld *mld, "NAN: cluster event: cluster_id=%pM, flags=0x%x\n", cluster_id, notif->flags); - if (IWL_FW_CHECK(mld, !wdev, "NAN: cluster event without wdev\n")) + if (IWL_FW_CHECK(mld, !mld->nan_device_vif, + "NAN: cluster event without NAN vif\n")) return; if (IWL_FW_CHECK(mld, !ieee80211_vif_nan_started(mld->nan_device_vif), "NAN: cluster event without NAN started\n")) return; - cfg80211_nan_cluster_joined(wdev, cluster_id, new_cluster, GFP_KERNEL); + ieee80211_nan_cluster_joined(mld->nan_device_vif, cluster_id, + new_cluster, GFP_KERNEL); } bool iwl_mld_cancel_nan_cluster_notif(struct iwl_mld *mld, -- 2.34.1