mwifiex: key_material_v2 remove superfluous condition
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 31 Jul 2016 12:11:21 +0000 (14:11 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 3 Sep 2016 10:00:36 +0000 (13:00 +0300)
We are using mac as source address in a memcpy.
In the lines below we can assume mac is not NULL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/sta_cmd.c

index d1f8011080bc1afd4fb700418feb4b541bba3e90..1d8f2844a8785a5862d9b59a893b41d037c5167a 100644 (file)
@@ -706,15 +706,10 @@ mwifiex_cmd_802_11_key_material_v2(struct mwifiex_private *priv,
                                    (priv->wep_key_curr_index & KEY_INDEX_MASK))
                                        key_info |= KEY_DEFAULT;
                        } else {
-                               if (mac) {
-                                       if (is_broadcast_ether_addr(mac))
-                                               key_info |= KEY_MCAST;
-                                       else
-                                               key_info |= KEY_UNICAST |
-                                                           KEY_DEFAULT;
-                               } else {
+                               if (is_broadcast_ether_addr(mac))
                                        key_info |= KEY_MCAST;
-                               }
+                               else
+                                       key_info |= KEY_UNICAST | KEY_DEFAULT;
                        }
                }
                km->key_param_set.key_info = cpu_to_le16(key_info);