diff options
author | Andrei Otcheretianski <andrei.otcheretianski@intel.com> | 2022-06-14 17:21:23 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-07-15 11:43:12 +0200 |
commit | 6df2810ac9a9b11523bda4f2fd4442598787013d (patch) | |
tree | 526e4b0a055c410614c6cb9a13925a0ce0d11686 /net/wireless/mlme.c | |
parent | 54283409cd162fc60480df514924ed4cb313735e (diff) |
wifi: cfg80211: Allow MLO TX with link source address
Management frames are transmitted from link address and not device
address. Allow that.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r-- | net/wireless/mlme.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 14584488de67..935537c64ed8 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c @@ -637,6 +637,18 @@ void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev) cfg80211_mgmt_registrations_update(wdev); } +static bool cfg80211_allowed_address(struct wireless_dev *wdev, const u8 *addr) +{ + int i; + + for_each_valid_link(wdev, i) { + if (ether_addr_equal(addr, wdev->links[i].addr)) + return true; + } + + return ether_addr_equal(addr, wdev_address(wdev)); +} + int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, u64 *cookie) @@ -735,7 +747,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, return err; } - if (!ether_addr_equal(mgmt->sa, wdev_address(wdev))) { + if (!cfg80211_allowed_address(wdev, mgmt->sa)) { /* Allow random TA to be used with Public Action frames if the * driver has indicated support for this. Otherwise, only allow * the local address to be used. |