linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Cc: linux-wireless@vger.kernel.org, helmut.schaa@googlemail.com,
	kvalo@qca.qualcomm.com
Subject: Re: [PATCH] rt2800usb: enable MFP if hw crypt is disabled
Date: Wed, 20 Apr 2016 18:04:42 +0200	[thread overview]
Message-ID: <20160420160442.GA6803@redhat.com> (raw)
In-Reply-To: <1461135572-7468-1-git-send-email-yeohchunyeow@gmail.com>

On Wed, Apr 20, 2016 at 02:59:32PM +0800, Chun-Yeow Yeoh wrote:
> If rt2800usb is loaded with nohwcrypt=1, mac80211 takes
> care of the crypto with software encryption/decryption
> and thus, MFP can be used.
> 
> Tested for secured mesh using ath9k_htc and ath9k.
> 
> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
> ---
>  drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
> index 4b0bb6b..84ea329 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
> @@ -48,6 +48,7 @@ MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
> 
>  static bool rt2800usb_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev)
>  {
> +	ieee80211_hw_set(rt2x00dev->hw, MFP_CAPABLE);
>  	return modparam_nohwcrypt;

You set MFP feature regardless if actually hwcrypt is disabled or not.
Beside this should not be done in function which is intended to test
if hw crypto is disabled. Please set the future in place where other
hw->flags are set.

Thanks
Stanislaw

  reply	other threads:[~2016-04-20 16:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20  6:59 [PATCH] rt2800usb: enable MFP if hw crypt is disabled Chun-Yeow Yeoh
2016-04-20 16:04 ` Stanislaw Gruszka [this message]
2016-04-20 16:42   ` 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=20160420160442.GA6803@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=helmut.schaa@googlemail.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --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).