diff mbox series

[05/12] nl80211: Always register for Rx authentication frames with PASN

Message ID 20200224091437.15212-6-ilan.peer@intel.com
State Changes Requested
Headers show
Series Preparations for Pre association Security Negotiation(PASN) Support | expand

Commit Message

Ilan Peer Feb. 24, 2020, 9:14 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(+)

Comments

Jouni Malinen Feb. 29, 2020, 9:22 p.m. UTC | #1
On Mon, Feb 24, 2020 at 11:14:30AM +0200, Ilan Peer wrote:
> Register a filter that only requests PASN authentication frames
> to be passed to user space.

> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> @@ -2199,6 +2199,22 @@ static int nl80211_mgmt_subscribe_non_ap(struct i802_bss *bss)

> +#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))

This is still waiting for ANA assignment in P802.11az/D2.0. This is
usually a good sign of the functionality not being stable enough in the
draft to justify pushing it into the repository.. In other words, I'd
rather wait for a bit more stable draft version before applying this.
diff mbox series

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 6d5284e0ef..f630884a94 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2199,6 +2199,22 @@  static int nl80211_mgmt_subscribe_non_ap(struct i802_bss *bss)
 		nl80211_register_frame(bss, bss->nl_mgmt, type,
 				       (u8 *) "\x03\x00", 2);
 
+#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))
+			ret = -1;
+#endif /* CONFIG_PASN */
+
 #ifdef CONFIG_INTERWORKING
 	/* QoS Map Configure */
 	if (nl80211_register_action_frame(bss, (u8 *) "\x01\x04", 2) < 0)