diff mbox series

[v2,02/20] nl80211: Always register for Rx authentication frames with PASN

Message ID 20201216110033.8314-3-ilan.peer@intel.com
State Accepted
Headers show
Series Support base Pre association Security Negotiation (PASN) | expand

Commit Message

Peer, Ilan Dec. 16, 2020, 11 a.m. UTC
Register a filter that only requests PASN authentication frames
to be passed to user space.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
 src/drivers/driver_nl80211.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
diff mbox series

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 3e1b13e366..17fdac9421 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2326,6 +2326,22 @@  static int nl80211_mgmt_subscribe_non_ap(struct i802_bss *bss)
 				       (u8 *) "\x03\x00", 2, false);
 	}
 
+#ifdef CONFIG_PASN
+	wpa_printf(MSG_DEBUG, "nl80211: Subscribe PASN authentication frames");
+
+	/*
+	 * TODO: the PASN authentication identifier was not defined yet in the
+	 * specification, for now using 0x07, as defined in other places in the
+	 * code.
+	 */
+	if (drv->capa.flags & WPA_DRIVER_FLAGS_SME)
+		if (nl80211_register_frame(bss, bss->nl_mgmt,
+					   (WLAN_FC_TYPE_MGMT << 2) |
+					   (WLAN_FC_STYPE_AUTH << 4),
+					   (u8 *)"\x07\x00", 2, false))
+			ret = -1;
+#endif /* CONFIG_PASN */
+
 #ifdef CONFIG_INTERWORKING
 	/* QoS Map Configure */
 	if (nl80211_register_action_frame(bss, (u8 *) "\x01\x04", 2) < 0)