wifi: iwlwifi: mvm: always use the sta->addr as the peers addr
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 28 Mar 2023 07:58:54 +0000 (10:58 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 30 Mar 2023 10:07:54 +0000 (12:07 +0200)
Currently we're setting the sta->addr as the peers address only if
the iftype is NL80211_IFTYPE_AP, otherwise we are setting the bssid to
be the addr. This causes bugs in TDLS. Fix this by always using the
sta->addr.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230328104948.4c104c3074c4.I78912bb85251033e60db99a65165890779203612@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c

index fc380e59c740bf8aee8eec47743ee78aaa5e44f9..41f6be7fe75ecda631a99c017578701acc45a29b 100644 (file)
@@ -380,13 +380,8 @@ static int iwl_mvm_mld_cfg_sta(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
        u32 agg_size = 0, mpdu_dens = 0;
 
        /* For now the link addr is the same as the mld addr */
-       if (vif->type == NL80211_IFTYPE_AP) {
-               memcpy(&cmd.peer_mld_address, sta->addr, ETH_ALEN);
-               memcpy(&cmd.peer_link_address, sta->addr, ETH_ALEN);
-       } else if (vif->bss_conf.bssid) {
-               memcpy(&cmd.peer_mld_address, vif->bss_conf.bssid, ETH_ALEN);
-               memcpy(&cmd.peer_link_address, vif->bss_conf.bssid, ETH_ALEN);
-       }
+       memcpy(&cmd.peer_mld_address, sta->addr, ETH_ALEN);
+       memcpy(&cmd.peer_link_address, sta->addr, ETH_ALEN);
 
        if (mvm_sta->sta_state >= IEEE80211_STA_ASSOC)
                cmd.assoc_id = cpu_to_le32(sta->aid);