diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-02-09 02:57:10 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-13 13:45:03 -0500 |
commit | ba52da58be0acf3b7775972b2b5234ce64388c79 (patch) | |
tree | 7663eb81791f4b85f56a6fa4c9119c954de7bc54 /drivers/net/wireless/ath9k/main.c | |
parent | d6bad496c6fbe3adb3323915a8b0430fa2955199 (diff) |
ath9k: Remove duplicate variables
A few variables (bssid, bssidmask, curaid) were duplicated in
struct ath_softc and in ath_hal, remove them.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index a1c76ec09b3a..bafefbed8382 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -905,8 +905,7 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc, | |||
905 | /* New association, store aid */ | 905 | /* New association, store aid */ |
906 | if (avp->av_opmode == NL80211_IFTYPE_STATION) { | 906 | if (avp->av_opmode == NL80211_IFTYPE_STATION) { |
907 | sc->curaid = bss_conf->aid; | 907 | sc->curaid = bss_conf->aid; |
908 | ath9k_hw_write_associd(sc->sc_ah, sc->curbssid, | 908 | ath9k_hw_write_associd(sc); |
909 | sc->curaid); | ||
910 | } | 909 | } |
911 | 910 | ||
912 | /* Configure the beacon */ | 911 | /* Configure the beacon */ |
@@ -1514,11 +1513,10 @@ static int ath_init(u16 devid, struct ath_softc *sc) | |||
1514 | ath9k_hw_setcapability(ah, ATH9K_CAP_DIVERSITY, 1, true, NULL); | 1513 | ath9k_hw_setcapability(ah, ATH9K_CAP_DIVERSITY, 1, true, NULL); |
1515 | sc->rx.defant = ath9k_hw_getdefantenna(ah); | 1514 | sc->rx.defant = ath9k_hw_getdefantenna(ah); |
1516 | 1515 | ||
1517 | ath9k_hw_getmac(ah, sc->macaddr); | ||
1518 | if (ah->ah_caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK) { | 1516 | if (ah->ah_caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK) { |
1519 | ath9k_hw_getbssidmask(ah, sc->bssidmask); | 1517 | memcpy(sc->bssidmask, ath_bcast_mac, ETH_ALEN); |
1520 | ATH_SET_VIF_BSSID_MASK(sc->bssidmask); | 1518 | ATH_SET_VIF_BSSID_MASK(sc->bssidmask); |
1521 | ath9k_hw_setbssidmask(ah, sc->bssidmask); | 1519 | ath9k_hw_setbssidmask(sc); |
1522 | } | 1520 | } |
1523 | 1521 | ||
1524 | sc->beacon.slottime = ATH9K_SLOT_TIME_9; /* default to short slot time */ | 1522 | sc->beacon.slottime = ATH9K_SLOT_TIME_9; /* default to short slot time */ |
@@ -1577,7 +1575,7 @@ int ath_attach(u16 devid, struct ath_softc *sc) | |||
1577 | 1575 | ||
1578 | /* get mac address from hardware and set in mac80211 */ | 1576 | /* get mac address from hardware and set in mac80211 */ |
1579 | 1577 | ||
1580 | SET_IEEE80211_PERM_ADDR(hw, sc->macaddr); | 1578 | SET_IEEE80211_PERM_ADDR(hw, sc->sc_ah->macaddr); |
1581 | 1579 | ||
1582 | hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | | 1580 | hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | |
1583 | IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | | 1581 | IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | |
@@ -2285,7 +2283,9 @@ static int ath9k_config_interface(struct ieee80211_hw *hw, | |||
2285 | ah->ah_opmode != NL80211_IFTYPE_AP) { | 2283 | ah->ah_opmode != NL80211_IFTYPE_AP) { |
2286 | ah->ah_opmode = NL80211_IFTYPE_STATION; | 2284 | ah->ah_opmode = NL80211_IFTYPE_STATION; |
2287 | ath9k_hw_setopmode(ah); | 2285 | ath9k_hw_setopmode(ah); |
2288 | ath9k_hw_write_associd(ah, sc->macaddr, 0); | 2286 | memcpy(sc->curbssid, sc->sc_ah->macaddr, ETH_ALEN); |
2287 | sc->curaid = 0; | ||
2288 | ath9k_hw_write_associd(sc); | ||
2289 | /* Request full reset to get hw opmode changed properly */ | 2289 | /* Request full reset to get hw opmode changed properly */ |
2290 | sc->sc_flags |= SC_OP_FULL_RESET; | 2290 | sc->sc_flags |= SC_OP_FULL_RESET; |
2291 | } | 2291 | } |
@@ -2298,8 +2298,7 @@ static int ath9k_config_interface(struct ieee80211_hw *hw, | |||
2298 | /* Set BSSID */ | 2298 | /* Set BSSID */ |
2299 | memcpy(sc->curbssid, conf->bssid, ETH_ALEN); | 2299 | memcpy(sc->curbssid, conf->bssid, ETH_ALEN); |
2300 | sc->curaid = 0; | 2300 | sc->curaid = 0; |
2301 | ath9k_hw_write_associd(sc->sc_ah, sc->curbssid, | 2301 | ath9k_hw_write_associd(sc); |
2302 | sc->curaid); | ||
2303 | 2302 | ||
2304 | /* Set aggregation protection mode parameters */ | 2303 | /* Set aggregation protection mode parameters */ |
2305 | sc->config.ath_aggr_prot = 0; | 2304 | sc->config.ath_aggr_prot = 0; |
@@ -2382,8 +2381,11 @@ static void ath9k_configure_filter(struct ieee80211_hw *hw, | |||
2382 | ath9k_hw_setrxfilter(sc->sc_ah, rfilt); | 2381 | ath9k_hw_setrxfilter(sc->sc_ah, rfilt); |
2383 | 2382 | ||
2384 | if (changed_flags & FIF_BCN_PRBRESP_PROMISC) { | 2383 | if (changed_flags & FIF_BCN_PRBRESP_PROMISC) { |
2385 | if (*total_flags & FIF_BCN_PRBRESP_PROMISC) | 2384 | if (*total_flags & FIF_BCN_PRBRESP_PROMISC) { |
2386 | ath9k_hw_write_associd(sc->sc_ah, ath_bcast_mac, 0); | 2385 | memcpy(sc->curbssid, ath_bcast_mac, ETH_ALEN); |
2386 | sc->curaid = 0; | ||
2387 | ath9k_hw_write_associd(sc); | ||
2388 | } | ||
2387 | } | 2389 | } |
2388 | 2390 | ||
2389 | DPRINTF(sc, ATH_DBG_CONFIG, "Set HW RX filter: 0x%x\n", sc->rx.rxfilter); | 2391 | DPRINTF(sc, ATH_DBG_CONFIG, "Set HW RX filter: 0x%x\n", sc->rx.rxfilter); |