Skip to contentSkip to conversation

wifi: cfg80211: Allow multiple userpsace applications to receive the same registered management frame.

PATCH In review quentin.feraboli 2 participants 2 messages Jun 20, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: cfg80211: Allow multiple userpsace applications to receive the same registered management frame.

Currently, only one application can listen to a management frame type.

---
 net/wireless/mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/mlme.c +1 -1
index ac059cefbeb3..0f2e83fa63cb 100644
@@ -572,7 +572,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid,
        list_for_each_entry(reg, &wdev->mgmt_registrations, list) {
                int mlen = min(match_len, reg->match_len);
 
-               if (frame_type != le16_to_cpu(reg->frame_type))
+               if (frame_type != le16_to_cpu(reg->frame_type) || snd_portid != nreg->nlportid)
                        continue;
 
                if (memcmp(reg->match, match_data, mlen) == 0) {

--
2.17.1

-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome’s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.

maintainer
#1 lore raw
Quoted 2 lines · quentin.feraboli

Currently, only one application can listen to a management frame type.

This is incorrect, since there's some responsibility involved when userspace subscribes to this, and if multiple are subscribed then they cannot all take those responsibilities.

johannes