linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Hartmann <andihartmann@01019freenet.de>
To: "users@rt2x00.serialmonkey.com" <users@rt2x00.serialmonkey.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: [PATCH][RFC/RFT] rt2800: Enable support for 802.11w (MFP)
Date: Thu, 10 May 2012 19:20:27 +0200	[thread overview]
Message-ID: <201205101720.q4AHKTZp003261@mail.maya.org> (raw)

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);

             reply	other threads:[~2012-05-10 17:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10 17:20 Andreas Hartmann [this message]
2012-05-24  7:54 ` [rt2x00-users] [PATCH][RFC/RFT] rt2800: Enable support for 802.11w (MFP) Andreas Hartmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201205101720.q4AHKTZp003261@mail.maya.org \
    --to=andihartmann@01019freenet.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=users@rt2x00.serialmonkey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).