ath5k: simplify passed params to ath5k_hw_set_associd()
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 7 Oct 2009 00:44:31 +0000 (20:44 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 7 Oct 2009 20:39:50 +0000 (16:39 -0400)
We have access to common->curbssid and common->curaid so just
use those. Note that common->curaid is always 0 so this keeps
our current behaviour of always using 0 for now. Once we fix
storing the association ID passed by mac80211 this will
require no changes here.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/ath5k.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/ath5k/reset.c

index 43585d54c27086420f2d9ff2cee9465772cdfe94..647d826bf5fbb6171e2ef6e454c861255e854232 100644 (file)
@@ -1191,7 +1191,7 @@ extern bool ath5k_eeprom_is_hb63(struct ath5k_hw *ah);
 extern int ath5k_hw_set_opmode(struct ath5k_hw *ah);
 /* BSSID Functions */
 extern int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac);
-extern void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id);
+extern void ath5k_hw_set_associd(struct ath5k_hw *ah);
 extern void ath5k_hw_set_bssid_mask(struct ath5k_hw *ah, const u8 *mask);
 /* Receive start/stop functions */
 extern void ath5k_hw_start_rx_pcu(struct ath5k_hw *ah);
index e230de8ad3204544aa3c02e7b910a32d1c6732e5..92995adeb5cd20dfb254e39030983f00d8c4d514 100644 (file)
@@ -326,7 +326,7 @@ int ath5k_hw_attach(struct ath5k_softc *sc)
 
        /* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */
        memcpy(common->curbssid, ath_bcast_mac, ETH_ALEN);
-       ath5k_hw_set_associd(ah, common->curbssid, 0);
+       ath5k_hw_set_associd(ah);
        ath5k_hw_set_opmode(ah);
 
        ath5k_hw_rfgain_opt_init(ah);
index 5aaa9bd036dbcae88e8dc36e705af4c47dc9ecc1..01da83d75ef4b6d530aa5ab9483ebc401c681d66 100644 (file)
@@ -3213,7 +3213,7 @@ static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
                memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
                /* XXX: assoc id is set to 0 for now, mac80211 doesn't have
                 * a clean way of letting us retrieve this yet. */
-               ath5k_hw_set_associd(ah, common->curbssid, 0);
+               ath5k_hw_set_associd(ah);
                mmiowb();
        }
 
index 9e6e41bdd0998c3d8720a2fc9806a8f31fc82654..23e5e7e5b495f15f32dc5efa4d64e807849044c1 100644 (file)
@@ -279,7 +279,7 @@ int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac)
  *
  * Sets the BSSID which trigers the "SME Join" operation
  */
-void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
+void ath5k_hw_set_associd(struct ath5k_hw *ah)
 {
        struct ath_common *common = ath5k_hw_common(ah);
        u32 low_id, high_id;
@@ -294,13 +294,13 @@ void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
        /*
         * Set BSSID which triggers the "SME Join" operation
         */
-       low_id = get_unaligned_le32(bssid);
-       high_id = get_unaligned_le16(bssid + 4);
+       low_id = get_unaligned_le32(common->curbssid);
+       high_id = get_unaligned_le16(common->curbssid + 4);
        ath5k_hw_reg_write(ah, low_id, AR_BSSMSKL);
-       ath5k_hw_reg_write(ah, high_id | ((assoc_id & 0x3fff) <<
+       ath5k_hw_reg_write(ah, high_id | ((common->curaid & 0x3fff) <<
                                AR5K_BSS_ID1_AID_S), AR_BSSMSKU);
 
-       if (assoc_id == 0) {
+       if (common->curaid == 0) {
                ath5k_hw_disable_pspoll(ah);
                return;
        }
index 39346a26ddb81e213664ea0a479aa862bd5959c3..fb898154879446cd6ccf95f901bce18300be009a 100644 (file)
@@ -1188,7 +1188,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
 
        /* Restore bssid and bssid mask */
        /* XXX: add ah->aid once mac80211 gives this to us */
-       ath5k_hw_set_associd(ah, common->curbssid, 0);
+       ath5k_hw_set_associd(ah);
 
        /* Set PCU config */
        ath5k_hw_set_opmode(ah);