linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: me@bobcopeland.com
To: Bruno Randolf <br1@einfach.org>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	ath5k-devel@lists.ath5k.org, lrodriguez@atheros.com,
	mickflemm@gmail.com
Subject: Re: [PATCH 3/8] ath5k: Use common ath key management functions
Date: Sat, 11 Sep 2010 13:22:50 -0400	[thread overview]
Message-ID: <20100911172250.GE20385@hash.localnet> (raw)
In-Reply-To: <20100908070443.11255.13951.stgit@tt-desk>

On Wed, Sep 08, 2010 at 04:04:43PM +0900, Bruno Randolf wrote:
> Use common ath key management functions in ath5k. This fixes problems with HW
> encryption in AP mode, which was broken in the ath5k implementation.

We went from this:

> -		key->flags |= (IEEE80211_KEY_FLAG_GENERATE_IV |
> -			       IEEE80211_KEY_FLAG_GENERATE_MMIC);

to:

> +			/* push IV and Michael MIC generation to stack */
> +			key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
> +			if (key->cipher == WLAN_CIPHER_SUITE_TKIP)
> +				key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;

There's no need to special case the flags based on whether the
cipher is TKIP; mac80211 does this already.

> +			if (key->cipher == WLAN_CIPHER_SUITE_CCMP)
> +				key->flags |= IEEE80211_KEY_FLAG_SW_MGMT;

Ditto, this already only affects CCMP in mac80211 (btw, why can't we do
management frames in hardware?) so it can be more simply written as:

key->flags |= (IEEE80211_KEY_FLAG_GENERATE_IV |
               IEEE80211_KEY_FLAG_GENERATE_MMIC |
               IEEE80211_KEY_FLAG_SW_MGMT);

-- 
Bob Copeland %% www.bobcopeland.com


  reply	other threads:[~2010-09-11 17:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08  7:04 [PATCH 0/8] ath: Move key cache functions to ath common Bruno Randolf
2010-09-08  7:04 ` [PATCH 1/8] ath: Copy cryptographic capability flags into ath Bruno Randolf
2010-09-08  7:04 ` [PATCH 2/8] ath: Copy key cache management functions from ath9k to ath Bruno Randolf
2010-09-08  7:04 ` [PATCH 3/8] ath5k: Use common ath key management functions Bruno Randolf
2010-09-11 17:22   ` me [this message]
2010-09-13  1:09     ` [ath5k-devel] " Bruno Randolf
2010-09-15  2:54       ` Jouni Malinen
2010-09-08  7:04 ` [PATCH 4/8] ath5k: Remove old ath5k key handling functions Bruno Randolf
2010-09-11 17:23   ` bob
2010-09-08  7:04 ` [PATCH 5/8] ath/ath9k: Replace common->splitmic with a flag Bruno Randolf
2010-09-11 17:25   ` bob
2010-09-08  7:04 ` [PATCH 6/8] ath5k: Use common crypt capabilities flags Bruno Randolf
2010-09-11 17:27   ` bob
2010-09-13  1:17     ` Bruno Randolf
2010-09-13  2:35       ` [ath5k-devel] " Bob Copeland
2010-09-08  7:05 ` [PATCH 7/8] ath9k: Use common ath key management functions Bruno Randolf
2010-09-08  7:05 ` [PATCH 8/8] ath9k: Use common crypt capabilities flags Bruno Randolf
2010-09-11 17:31 ` [PATCH 0/8] ath: Move key cache functions to ath common bob

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=20100911172250.GE20385@hash.localnet \
    --to=me@bobcopeland.com \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=br1@einfach.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.com \
    --cc=mickflemm@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).