From: Kalle Valo <kvalo@codeaurora.org>
To: Amitkumar Karwar <akarwar@marvell.com>
Cc: <linux-wireless@vger.kernel.org>,
Nishant Sarmukadam <nishants@marvell.com>,
Ganapathi Bhat <gbhat@marvell.com>
Subject: Re: [PATCH v2] mwifiex: cfg80211 set_default_mgmt_key handler
Date: Wed, 14 Sep 2016 19:48:18 +0300 [thread overview]
Message-ID: <87twdictrh.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1473428038-15308-1-git-send-email-akarwar@marvell.com> (Amitkumar Karwar's message of "Fri, 9 Sep 2016 19:03:58 +0530")
Amitkumar Karwar <akarwar@marvell.com> writes:
> From: Ganapathi Bhat <gbhat@marvell.com>
>
> Previously device used to start using IGTK key as Tx key as soon as it
> gets downloaded in add_key(). This patch implements set_default_mgmt_key
> handler. We will update Tx key ID in set_default_mgmt_key().
>
> Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> ---
> Changes in v2: v1 had a dummy handler. v2 addresses a corner case problem
> pointed by Jouni in which AP may send frames encrypted with new key when some
> of the stations are still using old key.
> ---
> drivers/net/wireless/marvell/mwifiex/cfg80211.c | 25 +++++++++++++++++++++++++
> drivers/net/wireless/marvell/mwifiex/fw.h | 1 +
> drivers/net/wireless/marvell/mwifiex/ioctl.h | 1 +
> drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 5 +++++
> 4 files changed, 32 insertions(+)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> index 0a03d3f..33e7a74 100644
> --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> @@ -484,6 +484,30 @@ mwifiex_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev,
> }
>
> /*
> + * CFG802.11 operation handler to set default mgmt key.
> + */
> +static int
> +mwifiex_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
> + struct net_device *netdev,
> + u8 key_index)
> +{
> + struct mwifiex_private *priv = mwifiex_netdev_get_priv(netdev);
> + struct mwifiex_ds_encrypt_key encrypt_key;
> + const u8 bc_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
This should be static const, but...
> + wiphy_dbg(wiphy, "set default mgmt key, key index=%d\n", key_index);
> +
> + memset(&encrypt_key, 0, sizeof(struct mwifiex_ds_encrypt_key));
> + encrypt_key.key_len = WLAN_KEY_LEN_CCMP;
> + encrypt_key.key_index = key_index;
> + encrypt_key.is_igtk_def_key = true;
> + ether_addr_copy(encrypt_key.mac_addr, bc_mac);
...can't you use eth_broadcast_addr() here?
--
Kalle Valo
next prev parent reply other threads:[~2016-09-14 16:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-09 13:33 [PATCH v2] mwifiex: cfg80211 set_default_mgmt_key handler Amitkumar Karwar
2016-09-14 16:48 ` Kalle Valo [this message]
2016-09-20 13:18 ` Amitkumar Karwar
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=87twdictrh.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=akarwar@marvell.com \
--cc=gbhat@marvell.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nishants@marvell.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).