Linux wireless drivers development
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@googlemail.com>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, linville@tuxdriver.com
Subject: [PATCH v2] p54: connect to 11w protected networks
Date: Tue, 4 Sep 2012 15:19:33 +0200	[thread overview]
Message-ID: <E1T8tYj-00051o-3z@debian64.localnet> (raw)
In-Reply-To: <1346622538.10113.3.camel@jlt4.sipsolutions.net>

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.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
Johannes,

thank you for making me double-check whenever MFP really works!
Unlike carl9170 which generates and receives a great amount of
addba/delba action frames, p54 - being a legacy product - has
no such "easy to use" debug facilities. 

As you feared: the firmware is corrupting incoming management
frames. However, it does so only when a rxkey was configured.
So as a possible trade-off, MFP will only be supported by p54,
when the firmware crypto offloading is relieved of his duties
(disabled). 

Note: Strictly speaking, it would be enough to no longer upload
any rx key which could affect management frames, as the firmware
does not decrypt any frames unless there is a fitting key candidate.

Regards,
	Chr 
---
 drivers/net/wireless/p54/main.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 5e91ad0..16b75ec 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -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 (nohwcrypt) {
+		/*
+		 * Only support MFP, if the hardware crypto engine
+		 * is disabled, as the firmware's rx-path corrupts
+		 * incoming CCMP encrypted 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) |
-- 
1.7.10.4


  reply	other threads:[~2012-09-04 13:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-02 13:22 [PATCH] p54: connect to 11w protected networks Christian Lamparter
2012-09-02 21:48 ` Johannes Berg
2012-09-04 13:19   ` Christian Lamparter [this message]
2012-09-04 14:15     ` [PATCH v2] " Johannes Berg
2012-09-04 14:33       ` Dan Williams
2012-09-04 14:37         ` Johannes Berg
2012-09-04 14:54           ` Johannes Berg
2012-09-07 12:17             ` Johannes Berg
2012-09-07 15:47               ` Christian Lamparter
2012-09-07 15:55                 ` Johannes Berg
2012-09-07 16:10                   ` Christian Lamparter
2012-09-07 16:15                     ` Johannes Berg
2012-09-07 16:26                       ` Christian Lamparter
     [not found]   ` <201209071825.13588.chunkeey@googlemail.com>
     [not found]     ` <1347035277.4256.33.camel@jlt4.sipsolutions.net>
2012-09-07 17:01       ` Christian Lamparter
2012-09-07 17:09         ` Johannes Berg
2012-09-07 17:28           ` Johannes Berg

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=E1T8tYj-00051o-3z@debian64.localnet \
    --to=chunkeey@googlemail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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