Commit 2724a74a authored by Pavel Roskin's avatar Pavel Roskin Committed by John W. Linville

ath5k: use more readable way to clear MAC address

Signed-off-by: default avatarPavel Roskin <proski@gnu.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 25380d80
...@@ -104,6 +104,7 @@ static int ath5k_hw_post(struct ath5k_hw *ah) ...@@ -104,6 +104,7 @@ static int ath5k_hw_post(struct ath5k_hw *ah)
*/ */
int ath5k_hw_init(struct ath5k_softc *sc) int ath5k_hw_init(struct ath5k_softc *sc)
{ {
static const u8 zero_mac[ETH_ALEN] = { };
struct ath5k_hw *ah = sc->ah; struct ath5k_hw *ah = sc->ah;
struct ath_common *common = ath5k_hw_common(ah); struct ath_common *common = ath5k_hw_common(ah);
struct pci_dev *pdev = sc->pdev; struct pci_dev *pdev = sc->pdev;
...@@ -334,7 +335,7 @@ int ath5k_hw_init(struct ath5k_softc *sc) ...@@ -334,7 +335,7 @@ int ath5k_hw_init(struct ath5k_softc *sc)
} }
/* MAC address is cleared until add_interface */ /* MAC address is cleared until add_interface */
ath5k_hw_set_lladdr(ah, (u8[ETH_ALEN]){}); ath5k_hw_set_lladdr(ah, zero_mac);
/* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */ /* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */
memcpy(common->curbssid, ath_bcast_mac, ETH_ALEN); memcpy(common->curbssid, ath_bcast_mac, ETH_ALEN);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment