linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/4] ath10k: fix multiple key static wep with ibss
Date: Fri, 10 Apr 2015 10:17:26 -0700	[thread overview]
Message-ID: <552805A6.6030108@candelatech.com> (raw)
In-Reply-To: <1428672203-8604-3-git-send-email-michal.kazior@tieto.com>

On 04/10/2015 06:23 AM, Michal Kazior wrote:
> Apparently firmware requires both pairwise and
> groupwise keys to be installed per-peer for static
> WEP in IBSS. This wasn't necessary for AP mode
> (and installing both doesn't seem to break AP
> mode thus there's no special handling).
> 
> Also there seems to be some kind of issue with
> mapping tx/rx keys in firmware properly which
> resulted in wrong keys being used and broken
> communication between devices.
> 
> It can be argued the vdev param part is more of a
> workaround than a real fix. However I couldn't
> figure out how to fix this differently. It works
> and isn't super ugly.
> 
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
> ---
>  drivers/net/wireless/ath/ath10k/mac.c | 31 ++++++++++++++++++++++++++++---
>  1 file changed, 28 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> index 6664bcc9ba88..93f753cb839a 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -230,9 +230,13 @@ static int ath10k_install_peer_wep_keys(struct ath10k_vif *arvif,
>  		flags = 0;
>  		flags |= WMI_KEY_PAIRWISE;
>  
> -		/* set TX_USAGE flag for default key id */
> -		if (arvif->def_wep_key_idx == i)
> -			flags |= WMI_KEY_TX_USAGE;
> +		ret = ath10k_install_key(arvif, arvif->wep_keys[i], SET_KEY,
> +					 addr, flags);
> +		if (ret)
> +			return ret;
> +
> +		flags = 0;
> +		flags |= WMI_KEY_GROUP;

That could be a single assigment to WMI_KEY_GROUP?

Also, this does not merge cleanly with my 4.0 tree,
but I'm not using WEP anyway, so no big deal...

Thanks,
Ben



-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  reply	other threads:[~2015-04-10 17:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 13:23 [PATCH 0/4] ath10k: ibss crypto fixes Michal Kazior
2015-04-10 13:23 ` [PATCH 1/4] ath10k: don't use reassoc flag Michal Kazior
2015-04-10 13:23 ` [PATCH 2/4] ath10k: fix multiple key static wep with ibss Michal Kazior
2015-04-10 17:17   ` Ben Greear [this message]
2015-04-10 13:23 ` [PATCH 3/4] ath10k: set def key idx for ibss Michal Kazior
2015-04-10 13:23 ` [PATCH 4/4] ath10k: enable ibss-rsn Michal Kazior
2015-04-10 21:57   ` Ben Greear
2015-04-13  8:41   ` Michal Kazior
2015-04-15 13:02 ` [PATCH 0/4] ath10k: ibss crypto fixes Kalle Valo
2015-04-17  6:37 ` Kalle Valo

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=552805A6.6030108@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.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).