aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-10-06 20:44:31 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:50 -0400
commitbe5d6b75e0fb3f7e23ea5325109ef4195f2b282a (patch)
tree0b28a1cd730d82f4006670507138fd599af14018 /drivers/net
parent91b9eb8261acfe473c369750036df24ad071e5c1 (diff)
ath5k: simplify passed params to ath5k_hw_set_associd()
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath5k/ath5k.h2
-rw-r--r--drivers/net/wireless/ath/ath5k/attach.c2
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c2
-rw-r--r--drivers/net/wireless/ath/ath5k/pcu.c10
-rw-r--r--drivers/net/wireless/ath/ath5k/reset.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index 43585d54c270..647d826bf5fb 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -1191,7 +1191,7 @@ extern bool ath5k_eeprom_is_hb63(struct ath5k_hw *ah);
1191extern int ath5k_hw_set_opmode(struct ath5k_hw *ah); 1191extern int ath5k_hw_set_opmode(struct ath5k_hw *ah);
1192/* BSSID Functions */ 1192/* BSSID Functions */
1193extern int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac); 1193extern int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac);
1194extern void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id); 1194extern void ath5k_hw_set_associd(struct ath5k_hw *ah);
1195extern void ath5k_hw_set_bssid_mask(struct ath5k_hw *ah, const u8 *mask); 1195extern void ath5k_hw_set_bssid_mask(struct ath5k_hw *ah, const u8 *mask);
1196/* Receive start/stop functions */ 1196/* Receive start/stop functions */
1197extern void ath5k_hw_start_rx_pcu(struct ath5k_hw *ah); 1197extern void ath5k_hw_start_rx_pcu(struct ath5k_hw *ah);
diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c
index e230de8ad320..92995adeb5cd 100644
--- a/drivers/net/wireless/ath/ath5k/attach.c
+++ b/drivers/net/wireless/ath/ath5k/attach.c
@@ -326,7 +326,7 @@ int ath5k_hw_attach(struct ath5k_softc *sc)
326 326
327 /* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */ 327 /* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */
328 memcpy(common->curbssid, ath_bcast_mac, ETH_ALEN); 328 memcpy(common->curbssid, ath_bcast_mac, ETH_ALEN);
329 ath5k_hw_set_associd(ah, common->curbssid, 0); 329 ath5k_hw_set_associd(ah);
330 ath5k_hw_set_opmode(ah); 330 ath5k_hw_set_opmode(ah);
331 331
332 ath5k_hw_rfgain_opt_init(ah); 332 ath5k_hw_rfgain_opt_init(ah);
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 5aaa9bd036db..01da83d75ef4 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -3213,7 +3213,7 @@ static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
3213 memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); 3213 memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
3214 /* XXX: assoc id is set to 0 for now, mac80211 doesn't have 3214 /* XXX: assoc id is set to 0 for now, mac80211 doesn't have
3215 * a clean way of letting us retrieve this yet. */ 3215 * a clean way of letting us retrieve this yet. */
3216 ath5k_hw_set_associd(ah, common->curbssid, 0); 3216 ath5k_hw_set_associd(ah);
3217 mmiowb(); 3217 mmiowb();
3218 } 3218 }
3219 3219
diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
index 9e6e41bdd099..23e5e7e5b495 100644
--- a/drivers/net/wireless/ath/ath5k/pcu.c
+++ b/drivers/net/wireless/ath/ath5k/pcu.c
@@ -279,7 +279,7 @@ int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac)
279 * 279 *
280 * Sets the BSSID which trigers the "SME Join" operation 280 * Sets the BSSID which trigers the "SME Join" operation
281 */ 281 */
282void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id) 282void ath5k_hw_set_associd(struct ath5k_hw *ah)
283{ 283{
284 struct ath_common *common = ath5k_hw_common(ah); 284 struct ath_common *common = ath5k_hw_common(ah);
285 u32 low_id, high_id; 285 u32 low_id, high_id;
@@ -294,13 +294,13 @@ void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
294 /* 294 /*
295 * Set BSSID which triggers the "SME Join" operation 295 * Set BSSID which triggers the "SME Join" operation
296 */ 296 */
297 low_id = get_unaligned_le32(bssid); 297 low_id = get_unaligned_le32(common->curbssid);
298 high_id = get_unaligned_le16(bssid + 4); 298 high_id = get_unaligned_le16(common->curbssid + 4);
299 ath5k_hw_reg_write(ah, low_id, AR_BSSMSKL); 299 ath5k_hw_reg_write(ah, low_id, AR_BSSMSKL);
300 ath5k_hw_reg_write(ah, high_id | ((assoc_id & 0x3fff) << 300 ath5k_hw_reg_write(ah, high_id | ((common->curaid & 0x3fff) <<
301 AR5K_BSS_ID1_AID_S), AR_BSSMSKU); 301 AR5K_BSS_ID1_AID_S), AR_BSSMSKU);
302 302
303 if (assoc_id == 0) { 303 if (common->curaid == 0) {
304 ath5k_hw_disable_pspoll(ah); 304 ath5k_hw_disable_pspoll(ah);
305 return; 305 return;
306 } 306 }
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
index 39346a26ddb8..fb8981548794 100644
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -1188,7 +1188,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
1188 1188
1189 /* Restore bssid and bssid mask */ 1189 /* Restore bssid and bssid mask */
1190 /* XXX: add ah->aid once mac80211 gives this to us */ 1190 /* XXX: add ah->aid once mac80211 gives this to us */
1191 ath5k_hw_set_associd(ah, common->curbssid, 0); 1191 ath5k_hw_set_associd(ah);
1192 1192
1193 /* Set PCU config */ 1193 /* Set PCU config */
1194 ath5k_hw_set_opmode(ah); 1194 ath5k_hw_set_opmode(ah);