1 --- a/drivers/net/wireless/ath9k/hw.c
2 +++ b/drivers/net/wireless/ath9k/hw.c
3 @@ -499,11 +499,18 @@ static int ath9k_hw_init_macaddr(struct
4 ahp->ah_macaddr[2 * i] = eeval >> 8;
5 ahp->ah_macaddr[2 * i + 1] = eeval & 0xff;
7 - if (sum == 0 || sum == 0xffff * 3) {
9 + if (!is_valid_ether_addr(ahp->ah_macaddr)) {
10 + DECLARE_MAC_BUF(macbuf);
12 + DPRINTF(ah->ah_sc, ATH_DBG_EEPROM,
13 + "eeprom contains invalid mac address: %s\n",
14 + print_mac(macbuf, ahp->ah_macaddr));
16 + random_ether_addr(ahp->ah_macaddr);
17 DPRINTF(ah->ah_sc, ATH_DBG_EEPROM,
18 - "mac address read failed: %pM\n",
20 - return -EADDRNOTAVAIL;
21 + "random mac address will be used: %s\n",
22 + print_mac(macbuf, ahp->ah_macaddr));