iwlwifi: 8000: drop a print when the address is invalid
authorEran Harary <eran.harary@intel.com>
Sun, 29 Jun 2014 08:53:06 +0000 (11:53 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 7 Jul 2014 18:41:12 +0000 (21:41 +0300)
when driver takes the MAC address from the HW section and
it isn't valid - print an error.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/iwl-nvm-parse.c

index dd76ed28884dea70d5d20189f9856324ef835bdb..018af2957d3b7b319c47222eae4d1dfe1cdc3891 100644 (file)
@@ -549,6 +549,9 @@ static void iwl_set_hw_address_family_8000(struct device *dev,
                        data->hw_addr[1] = hw_addr[2];
                        data->hw_addr[0] = hw_addr[3];
                }
+               if (!is_valid_ether_addr(data->hw_addr))
+                       IWL_ERR_DEV(dev,
+                                   "mac address from hw section is not valid\n");
 
                return;
        }