linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][RFC/RFT] rt2800: Enable support for 802.11w (MFP)
@ 2012-05-10 17:20 Andreas Hartmann
  2012-05-24  7:54 ` [rt2x00-users] " Andreas Hartmann
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Hartmann @ 2012-05-10 17:20 UTC (permalink / raw)
  To: users@rt2x00.serialmonkey.com; +Cc: linux-wireless@vger.kernel.org

This patch adds support for 802.11w for rt2800. This is achieved by
using the 802.11w implementation in mac80211.

To get this working, it is necessary that hw encryption of
rt2800pci / rt2800usb is disabled, because I don't know of any support
in hardware for 802.11w and therefore let mac80211 do the whole job.

The user can enable 802.11w support by disabling hw encryption by
setting module parameter nohwcrypt=1.

Tested with rt2860 and rt3572.

This is a workaround as long as there isn't hardware support implemented
in the driver.

Signed-off-by: Andreas Hartmann <andihartmann@01019freenet.de>
---
diff -ru compat-wireless-2012-04-26.orig/drivers/net/wireless/rt2x00/rt2800pci.c compat-wireless-2012-04-26/drivers/net/wireless/rt2x00/rt2800pci.c
--- compat-wireless-2012-04-26.orig/drivers/net/wireless/rt2x00/rt2800pci.c	2012-04-26 22:10:30.000000000 +0200
+++ compat-wireless-2012-04-26/drivers/net/wireless/rt2x00/rt2800pci.c	2012-05-10 19:06:51.813040835 +0200
@@ -52,7 +52,7 @@
  */
 static bool modparam_nohwcrypt = false;
 module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
-MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
+MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption. Enable MFP (802.11w)");
 
 static void rt2800pci_mcu_status(struct rt2x00_dev *rt2x00dev, const u8 token)
 {
@@ -1020,6 +1020,11 @@
 	__set_bit(REQUIRE_TASKLET_CONTEXT, &rt2x00dev->cap_flags);
 	if (!modparam_nohwcrypt)
 		__set_bit(CAPABILITY_HW_CRYPTO, &rt2x00dev->cap_flags);
+	else {
+		INFO(rt2x00dev, "802.11w support (MFP) enabled.\n");
+		rt2x00dev->hw->flags |=
+		    IEEE80211_HW_MFP_CAPABLE;
+	}
 	__set_bit(CAPABILITY_LINK_TUNING, &rt2x00dev->cap_flags);
 	__set_bit(REQUIRE_HT_TX_DESC, &rt2x00dev->cap_flags);
 
diff -ru compat-wireless-2012-04-26.orig/drivers/net/wireless/rt2x00/rt2800usb.c compat-wireless-2012-04-26/drivers/net/wireless/rt2x00/rt2800usb.c
--- compat-wireless-2012-04-26.orig/drivers/net/wireless/rt2x00/rt2800usb.c	2012-04-26 22:10:30.000000000 +0200
+++ compat-wireless-2012-04-26/drivers/net/wireless/rt2x00/rt2800usb.c	2012-05-10 19:08:06.642042805 +0200
@@ -47,7 +47,7 @@
  */
 static bool modparam_nohwcrypt;
 module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
-MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
+MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption. Enable MFP (802.11w).");
 
 /*
  * Queue handlers.
@@ -769,6 +769,11 @@
 	__set_bit(REQUIRE_L2PAD, &rt2x00dev->cap_flags);
 	if (!modparam_nohwcrypt)
 		__set_bit(CAPABILITY_HW_CRYPTO, &rt2x00dev->cap_flags);
+	else {
+		INFO(rt2x00dev, "802.11w support (MFP) enabled.\n");
+		rt2x00dev->hw->flags |=
+		    IEEE80211_HW_MFP_CAPABLE;
+	}
 	__set_bit(CAPABILITY_LINK_TUNING, &rt2x00dev->cap_flags);
 	__set_bit(REQUIRE_HT_TX_DESC, &rt2x00dev->cap_flags);
 	__set_bit(REQUIRE_TXSTATUS_FIFO, &rt2x00dev->cap_flags);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-24  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10 17:20 [PATCH][RFC/RFT] rt2800: Enable support for 802.11w (MFP) Andreas Hartmann
2012-05-24  7:54 ` [rt2x00-users] " Andreas Hartmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).