Skip to contentSkip to conversation

p54: connect to 11w protected networks

PATCH Superseded Christian Lamparter 3 participants 6 messages Sep 7, 2012 – Sep 10, 2012 Networking drivers (wireless)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 p54: connect to 11w protected networks

Previously, it was not possible to connect to networks which requires 11w to be supported by the stations.

Note:

As all current (and old) firmwares corrupt incoming, protected management frames, the decryption offloading needs to be disabled.

This can be done by loading the p54common module with the nohwcrypt=1 parameter.

---
v2->v3:
- fixed modparam_nohwcrypt typo (Yes, v2 never compiled :( )

Regards,
Christian

---
 drivers/net/wireless/p54/main.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/net/wireless/p54/main.c +11 -0
index 5e91ad0..8ab5aef 100644
@@ -739,6 +739,17 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len)
 		     IEEE80211_HW_PS_NULLFUNC_STACK |
 		     IEEE80211_HW_REPORTS_TX_ACK_STATUS;
 
+	if (modparam_nohwcrypt) {
+		/*
+		 * Only support MFP, if the hardware crypto engine
+		 * is disabled, as the firmware's rx-path corrupts
+		 * incoming CCMP encrypted RX mgmt frames.
+		 * However, if no rx key is uploaded, the firmware
+		 * passes the unencrypted frame to the driver. 
+		 */
+		dev->flags |= IEEE80211_HW_MFP_CAPABLE;
+	}
+
 	dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
 				      BIT(NL80211_IFTYPE_ADHOC) |
 				      BIT(NL80211_IFTYPE_AP) |
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 3 lines · Christian Lamparter

Previously, it was not possible to connect to networks which requires 11w to be supported by the stations.

If at all possible if we can do this without module parameters, that would be great. Otherwise how is userspace supposed to connect to a W-capable network without twiddling driver-specific module options, something we've tried really hard to not do? Module options really aren't any different than private ioctls or IWPRIV commands...

Dan

Quoted 43 lines

Note:

As all current (and old) firmwares corrupt incoming, protected management frames, the decryption offloading needs to be disabled.

This can be done by loading the p54common module with the nohwcrypt=1 parameter.

---
v2->v3:
- fixed modparam_nohwcrypt typo (Yes, v2 never compiled :( )

Regards,
Christian

---
 drivers/net/wireless/p54/main.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/net/wireless/p54/main.c +11 -0
index 5e91ad0..8ab5aef 100644
@@ -739,6 +739,17 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len)
 		     IEEE80211_HW_PS_NULLFUNC_STACK |
 		     IEEE80211_HW_REPORTS_TX_ACK_STATUS;
 
+	if (modparam_nohwcrypt) {
+		/*
+		 * Only support MFP, if the hardware crypto engine
+		 * is disabled, as the firmware's rx-path corrupts
+		 * incoming CCMP encrypted RX mgmt frames.
+		 * However, if no rx key is uploaded, the firmware
+		 * passes the unencrypted frame to the driver. 
+		 */
+		dev->flags |= IEEE80211_HW_MFP_CAPABLE;
+	}
+
 	dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
 				      BIT(NL80211_IFTYPE_ADHOC) |
 				      BIT(NL80211_IFTYPE_AP) |
#2 lore raw
Quoted 7 lines · On Friday 07 September 2012 18:51:04 Dan Williams wrote:
Quoted 3 lines · Christian Lamparter

Previously, it was not possible to connect
to networks which requires 11w to be supported
by the stations.

If at all possible if we can do this without module parameters, that would be great.

Hm, just a odd question. How does 11w work with TDLS and networks with mandatory 11w. So what happens if a station with 11w wants to connect to a station without over TDLS? So, do we need to have a MFP flag at a per-station level, or is it enough if we have it per-vif?

Regards,
Chr

#3 lore raw
In reply to Dan Williams
Quoted 10 lines · Dan Williams
Quoted 3 lines · Christian Lamparter

Previously, it was not possible to connect
to networks which requires 11w to be supported
by the stations.

If at all possible if we can do this without module parameters, that would be great. Otherwise how is userspace supposed to connect to a W-capable network without twiddling driver-specific module options, something we've tried really hard to not do? Module options really aren't any different than private ioctls or IWPRIV commands...

Sure, and that's how it works with properly supported hardware. But p54 is so old that the user will need to buy newer hardware if he really needs 11w support out-of-box. IMHO there's no point of making a huge effort to add 11w support to older hardware, there are more important things to fix in Linux wireless stack than that.

Signature · 1 line
Kalle Valo
#4 lore raw
Quoted 13 lines · On Monday 10 September 2012 14:28:00 Kalle Valo wrote:
Quoted 10 lines · Dan Williams
Quoted 3 lines · Christian Lamparter

Previously, it was not possible to connect
to networks which requires 11w to be supported
by the stations.

If at all possible if we can do this without module parameters, that would be great. Otherwise how is userspace supposed to connect to a W-capable network without twiddling driver-specific module options, something we've tried really hard to not do? Module options really aren't any different than private ioctls or IWPRIV commands...

Quoted 5 lines

Sure, and that's how it works with properly supported hardware. But p54 is so old that the user will need to buy newer hardware if he really needs 11w support out-of-box. IMHO there's no point of making a huge effort to add 11w support to older hardware, there are more important things to fix in Linux wireless stack than that.

Dan's concern has been addressed by v4 of this patch (which depends on johannes' "add mgmt key flags" patch). p54 should now provide basic support for 11w protected networks w/o messing with any module parameters.

Regards,
Chr

#5 lore raw
Quoted 20 lines · Christian Lamparter
Quoted 13 lines · On Monday 10 September 2012 14:28:00 Kalle Valo wrote:
Quoted 10 lines · Dan Williams
Quoted 3 lines · Christian Lamparter

Previously, it was not possible to connect
to networks which requires 11w to be supported
by the stations.

If at all possible if we can do this without module parameters, that would be great. Otherwise how is userspace supposed to connect to a W-capable network without twiddling driver-specific module options, something we've tried really hard to not do? Module options really aren't any different than private ioctls or IWPRIV commands...

Quoted 5 lines

Sure, and that's how it works with properly supported hardware. But p54 is so old that the user will need to buy newer hardware if he really needs 11w support out-of-box. IMHO there's no point of making a huge effort to add 11w support to older hardware, there are more important things to fix in Linux wireless stack than that.

Quoted 4 lines

Dan's concern has been addressed by v4 of this patch (which depends on johannes' "add mgmt key flags" patch). p54 should now provide basic support for 11w protected networks w/o messing with any module parameters.

Great, thanks!

Dan