diff options
author | Bob Copeland <me@bobcopeland.com> | 2008-11-18 05:40:38 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-26 15:47:35 +0100 |
commit | 0e149cf5a1b1900484f4b808d59a5f246cd720be (patch) | |
tree | 1392d353012242c9fc313ae67b881a8dccb9040c /drivers/net/wireless/ath5k/attach.c | |
parent | ath9k: Use straightforward PCI routines to setup the TX buffer. (diff) | |
download | linux-0e149cf5a1b1900484f4b808d59a5f246cd720be.tar.xz linux-0e149cf5a1b1900484f4b808d59a5f246cd720be.zip |
ath5k: set mac address in add_interface
Configure the mac address in add_interface and clear it in
remove_interface so that users can change the mac address
to something other than the one in the eeprom. Also avoid
setting it at attach time so that we won't ack packets
until fully set up.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/attach.c')
-rw-r--r-- | drivers/net/wireless/ath5k/attach.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath5k/attach.c b/drivers/net/wireless/ath5k/attach.c index 51d569883cdd..49d82d79d3fc 100644 --- a/drivers/net/wireless/ath5k/attach.c +++ b/drivers/net/wireless/ath5k/attach.c @@ -106,7 +106,7 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version) { struct ath5k_hw *ah; struct pci_dev *pdev = sc->pdev; - u8 mac[ETH_ALEN]; + u8 mac[ETH_ALEN] = {}; int ret; u32 srev; @@ -317,15 +317,9 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version) goto err_free; } - /* Set MAC address */ - ret = ath5k_eeprom_read_mac(ah, mac); - if (ret) { - ATH5K_ERR(sc, "unable to read address from EEPROM: 0x%04x\n", - sc->pdev->device); - goto err_free; - } - + /* MAC address is cleared until add_interface */ ath5k_hw_set_lladdr(ah, mac); + /* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */ memset(ah->ah_bssid, 0xff, ETH_ALEN); ath5k_hw_set_associd(ah, ah->ah_bssid, 0); |