summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/eeprom.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-04-13 21:56:44 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-04-14 21:35:09 +0200
commitfa9bfd61e03e8dbcf110a93b373234d17a732233 (patch)
treed2d3b0e6ac74ffba6eda683246098bb7d34016a5 /drivers/net/wireless/ath/ath5k/eeprom.c
parentath: unshare struct ath_bus_ops between ath5k and ath9k (diff)
downloadlinux-fa9bfd61e03e8dbcf110a93b373234d17a732233.tar.xz
linux-fa9bfd61e03e8dbcf110a93b373234d17a732233.zip
ath5k: add a new bus op for reading the mac address
On AHB, the calibration data usually does not contain a valid MAC address, the correct MAC address is stored in the board config. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/eeprom.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/eeprom.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c
index fb12027e0346..e9263e4c7f3e 100644
--- a/drivers/net/wireless/ath/ath5k/eeprom.c
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
@@ -1732,35 +1732,6 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah)
return ret;
}
-/*
- * Read the MAC address from eeprom
- */
-int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac)
-{
- u8 mac_d[ETH_ALEN] = {};
- u32 total, offset;
- u16 data;
- int octet;
-
- AR5K_EEPROM_READ(0x20, data);
-
- for (offset = 0x1f, octet = 0, total = 0; offset >= 0x1d; offset--) {
- AR5K_EEPROM_READ(offset, data);
-
- total += data;
- mac_d[octet + 1] = data & 0xff;
- mac_d[octet] = data >> 8;
- octet += 2;
- }
-
- if (!total || total == 3 * 0xffff)
- return -EINVAL;
-
- memcpy(mac, mac_d, ETH_ALEN);
-
- return 0;
-}
-
/***********************\
* Init/Detach functions *