UPSTREAM: wifi: cfg80211: Allow action frames to be transmitted with link BSS in MLD

Currently action frames TX only with ML address as A3(BSSID) are
allowed in an ML AP, but TX for a non-ML Station can happen in any
link of an ML BSS with link BSS address as A3.
In case of an MLD, if User-space has provided a valid link_id in
action frame TX request, allow transmission of the frame in that link.

Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Link: https://lore.kernel.org/r/20230201061602.3918-1-quic_ramess@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 272227555
Change-Id: Iceb00b0713d9123f040e10e06cbfc412ee6a0375
(cherry picked from commit 19085ef39f)
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
(cherry picked from commit 05164a8564bacb11ed74b2826b27f8bded606a12)
Signed-off-by: Lee Jones <joneslee@google.com>
This commit is contained in:
Rameshkumar Sundaram
2023-02-01 11:46:02 +05:30
committed by Isaac J. Manjarres
parent a2a5f22724
commit a2c880b765

View File

@@ -736,7 +736,10 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_P2P_GO:
case NL80211_IFTYPE_AP_VLAN:
if (!ether_addr_equal(mgmt->bssid, wdev_address(wdev)))
if (!ether_addr_equal(mgmt->bssid, wdev_address(wdev)) &&
(params->link_id < 0 ||
!ether_addr_equal(mgmt->bssid,
wdev->links[params->link_id].addr)))
err = -EINVAL;
break;
case NL80211_IFTYPE_MESH_POINT: