From: Oleksij Rempel <linux@rempel-privat.de>
To: Yeoh Chun-Yeow <yeohchunyeow@gmail.com>
Cc: John Linville <linville@tuxdriver.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
ath9k-devel@lists.ath9k.org, Adrian Chadd <adrian@freebsd.org>
Subject: Re: [PATCH] ath9k_htc: turn on software mgmt crypto for secured mesh
Date: Fri, 14 Nov 2014 10:57:43 +0100 [thread overview]
Message-ID: <5465D217.2050107@rempel-privat.de> (raw)
In-Reply-To: <CAEFj987ng6Jxa4u3+Z+0oGFX7LUnkLPP96bBrCSnSetjU+YjpQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2754 bytes --]
Am 14.11.2014 um 10:06 schrieb Yeoh Chun-Yeow:
> On Fri, Nov 14, 2014 at 4:54 PM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>> Am 14.11.2014 um 06:07 schrieb Chun-Yeow Yeoh:
>>> Secured mesh encrypts the unicast mgmt frame using the same
>>> key that used for encrypting the unicast data frame. The patch
>>> "ath9k_htc_firmware: fix the offset of CCMP header for mesh
>>> data frame" applied to open-ath9k-htc-firmware allows the
>>> ath9k_htc to be loaded without "nohwcrypt=1". Unfortunately,
>>> this is not working and we still need CCMP encryption of
>>> management frames to be done in software. Fix this.
>>>
>>> This patch is tested with the following hardwares:
>>> - TP-Link TL-WN821N v3 802.11n [Atheros AR7010+AR9287]
>>> - AR9271 802.11n
>>>
>>> and managed to work with peer mesh STA equipped with ath9k.
>>>
>>> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
>>> ---
>>> drivers/net/wireless/ath/ath9k/htc_drv_main.c | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
>>> index 689ac99..d3f65a2 100644
>>> --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
>>> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
>>> @@ -1447,7 +1447,8 @@ static int ath9k_htc_set_key(struct ieee80211_hw *hw,
>>> key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
>>> if (key->cipher == WLAN_CIPHER_SUITE_TKIP)
>>> key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
>>> - if (priv->ah->sw_mgmt_crypto &&
>>> + if ((vif->type == NL80211_IFTYPE_MESH_POINT ||
>>> + priv->ah->sw_mgmt_crypto) &&
>>> key->cipher == WLAN_CIPHER_SUITE_CCMP)
>>> key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
>>> ret = 0;
>>>
>>
>>
>> Hmm.. may be we should generally do it here:
>> if ((vif->type == NL80211_IFTYPE_ADHOC ||
>> vif->type == NL80211_IFTYPE_MESH_POINT) &&
>> (key->cipher == WLAN_CIPHER_SUITE_TKIP ||
>> key->cipher == WLAN_CIPHER_SUITE_CCMP) &&
>> !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
>>
>
> Not so sure doing here is correctly. It is a pairwise key for unicast
> management frame, right?
yes.
this code is identical to ath9k, so i will move it to common. This is
the reason of my doubts.
>> or probably set "sw_mgmt_crypto = true" in ath9k_hw_init_mfp() for all
>> usb devices?
>
> All ath9k USB devices don't have MFP support?
Hmm... do you have docs?
--
Regards,
Oleksij
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
next prev parent reply other threads:[~2014-11-14 9:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 5:07 [PATCH] ath9k_htc: turn on software mgmt crypto for secured mesh Chun-Yeow Yeoh
2014-11-14 8:54 ` Oleksij Rempel
2014-11-14 9:06 ` Yeoh Chun-Yeow
2014-11-14 9:18 ` Yeoh Chun-Yeow
2014-11-14 9:51 ` Oleksij Rempel
2014-11-14 11:02 ` Yeoh Chun-Yeow
2014-11-14 9:57 ` Oleksij Rempel [this message]
2014-11-14 11:00 ` Yeoh Chun-Yeow
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=5465D217.2050107@rempel-privat.de \
--to=linux@rempel-privat.de \
--cc=adrian@freebsd.org \
--cc=ath9k-devel@lists.ath9k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=yeohchunyeow@gmail.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).