summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_cmd.c
diff options
context:
space:
mode:
authorWei Yongjun2012-08-24 07:25:30 +0200
committerJohn W. Linville2012-09-07 21:03:38 +0200
commita71bf90facfdbb7322acd84c1299d68755ba5dfe (patch)
tree61e21f8193ec408acdba501af2900f1d38ef7023 /drivers/net/wireless/mwifiex/sta_cmd.c
parentairo: use is_zero_ether_addr() and is_broadcast_ether_addr() (diff)
downloadkernel-qcow2-linux-a71bf90facfdbb7322acd84c1299d68755ba5dfe.tar.gz
kernel-qcow2-linux-a71bf90facfdbb7322acd84c1299d68755ba5dfe.tar.xz
kernel-qcow2-linux-a71bf90facfdbb7322acd84c1299d68755ba5dfe.zip
mwifiex: use is_broadcast_ether_addr() instead of memcmp()
Using is_broadcast_ether_addr() instead of directly use memcmp() to determine if the ethernet address is broadcast address. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifiex/sta_cmd.c
index 0cc3406050dc..3a4161cfeed7 100644
--- a/drivers/net/wireless/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/mwifiex/sta_cmd.c
@@ -551,7 +551,6 @@ mwifiex_cmd_802_11_key_material(struct mwifiex_private *priv,
struct host_cmd_tlv_mac_addr *tlv_mac;
u16 key_param_len = 0, cmd_size;
int ret = 0;
- const u8 bc_mac[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
cmd->command = cpu_to_le16(HostCmd_CMD_802_11_KEY_MATERIAL);
key_material->action = cpu_to_le16(cmd_action);
@@ -593,7 +592,7 @@ mwifiex_cmd_802_11_key_material(struct mwifiex_private *priv,
/* set 0 when re-key */
key_material->key_param_set.key[1] = 0;
- if (0 != memcmp(enc_key->mac_addr, bc_mac, sizeof(bc_mac))) {
+ if (!is_broadcast_ether_addr(enc_key->mac_addr)) {
/* WAPI pairwise key: unicast */
key_material->key_param_set.key_info |=
cpu_to_le16(KEY_UNICAST);