ath: move ath_bcast_mac to common header
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Thu, 10 Sep 2009 05:19:26 +0000 (22:19 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 7 Oct 2009 20:39:24 +0000 (16:39 -0400)
This is used by both ath5k and ath9k to set the first bssid mask.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath.h
drivers/net/wireless/ath/ath5k/attach.c
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/pcu.c
drivers/net/wireless/ath/ath9k/ath9k.h

index a63e90cbf9e50087845e2857c47107a360b2a2d7..59072e3820d05cb3f2bdf27596d65fd533ec5d05 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <linux/skbuff.h>
 
+static const u8 ath_bcast_mac[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+
 struct reg_dmn_pair_mapping {
        u16 regDmnEnum;
        u16 reg_5ghz_ctl;
index 71a1bd254517c610257e384b0bc65e01800a2782..9a009a78a046a9cd2372918b3d260207acb2b091 100644 (file)
@@ -336,7 +336,7 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc)
        ath5k_hw_set_lladdr(ah, (u8[ETH_ALEN]){});
 
        /* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */
-       memset(ah->ah_bssid, 0xff, ETH_ALEN);
+       memcpy(ah->ah_bssid, ath_bcast_mac, ETH_ALEN);
        ath5k_hw_set_associd(ah, ah->ah_bssid, 0);
        ath5k_hw_set_opmode(ah);
 
index 9c6ab5378f6e1a5ab693b88cb67bfd447e294581..a28d79555dfc24114f68dcd714ef2dc127241c2c 100644 (file)
@@ -815,7 +815,7 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
 
        SET_IEEE80211_PERM_ADDR(hw, mac);
        /* All MAC address bits matter for ACKs */
-       memset(sc->bssidmask, 0xff, ETH_ALEN);
+       memcpy(sc->bssidmask, ath_bcast_mac, ETH_ALEN);
        ath5k_hw_set_bssid_mask(sc->ah, sc->bssidmask);
 
        regulatory->current_rd = ah->ah_capabilities.cap_eeprom.ee_regdomain;
index 2942f13c9c4ae286841e83fbd8eb325d95200241..43aa35806618eae5ad4d2160b8bbc1de6fd2ac1d 100644 (file)
@@ -365,7 +365,7 @@ void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
  * assuming only 4 bits for a mac address and for BSSIDs you can then have:
  *
  *                  \
- * MAC:                0001 |
+ * MAC:        0001 |
  * BSSID-01:   0100 | --> Belongs to us
  * BSSID-02:   1001 |
  *                  /
index d99c92d7b94916c7175a64cd63f3c21285a221c5..e54fac322bd2f277f7ea2fece1027923628a889c 100644 (file)
@@ -60,8 +60,6 @@ struct ath_node;
 
 #define        ATH_TXQ_SETUP(sc, i)        ((sc)->tx.txqsetup & (1<<i))
 
-static const u8 ath_bcast_mac[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-
 struct ath_config {
        u32 ath_aggr_prot;
        u16 txpowlimit;