summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_cmd.c
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2012-08-09 04:01:52 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-08-10 21:27:03 +0200
commit641c869d40c7ec6a34930843f41e95bf1f53f29f (patch)
tree3a948bd96d52b79e4d498ef806bdfafba29ebfde /drivers/net/wireless/mwifiex/sta_cmd.c
parentssb: check for flash presentence (diff)
downloadlinux-641c869d40c7ec6a34930843f41e95bf1f53f29f.tar.xz
linux-641c869d40c7ec6a34930843f41e95bf1f53f29f.zip
mwifiex: fix 'smatch' warning in preparing key_material cmd
The key length can be 32 bytes for TKIP and 16 bytes for AES_CMAC. 'smatch' warns on memcpy using key_len variable to copy data to a 16 bytes buffer. Use fixed length to avoid the warning. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/sta_cmd.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifiex/sta_cmd.c
index 9af96926093e..0cc3406050dc 100644
--- a/drivers/net/wireless/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/mwifiex/sta_cmd.c
@@ -690,7 +690,7 @@ mwifiex_cmd_802_11_key_material(struct mwifiex_private *priv,
memcpy(param->ipn, enc_key->pn, IGTK_PN_LEN);
memcpy(param->key, enc_key->key_material,
- enc_key->key_len);
+ WLAN_KEY_LEN_AES_CMAC);
key_param_len = sizeof(struct mwifiex_cmac_param);
key_material->key_param_set.key_len =