Commit 8ce54c5a authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville

ath5k: enable Power-Save Polls by setting the association ID

mac80211 has long provided us the association ID. This isn't useful except
for Power-Save polling which now gets enabled. We can now poll for our
pending frames on the AP during power save.

You can review the details of Power-Save on the wireless wiki:

http://wireless.kernel.org/en/developers/Documentation/ieee80211/power-savingsSigned-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a3f86bff
...@@ -3211,8 +3211,7 @@ static void ath5k_bss_info_changed(struct ieee80211_hw *hw, ...@@ -3211,8 +3211,7 @@ static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
if (changes & BSS_CHANGED_BSSID) { if (changes & BSS_CHANGED_BSSID) {
/* Cache for later use during resets */ /* Cache for later use during resets */
memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
/* XXX: assoc id is set to 0 for now, mac80211 doesn't have common->curaid = 0;
* a clean way of letting us retrieve this yet. */
ath5k_hw_set_associd(ah); ath5k_hw_set_associd(ah);
mmiowb(); mmiowb();
} }
...@@ -3226,6 +3225,14 @@ static void ath5k_bss_info_changed(struct ieee80211_hw *hw, ...@@ -3226,6 +3225,14 @@ static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
set_beacon_filter(hw, sc->assoc); set_beacon_filter(hw, sc->assoc);
ath5k_hw_set_ledstate(sc->ah, sc->assoc ? ath5k_hw_set_ledstate(sc->ah, sc->assoc ?
AR5K_LED_ASSOC : AR5K_LED_INIT); AR5K_LED_ASSOC : AR5K_LED_INIT);
if (bss_conf->assoc) {
ATH5K_DBG(sc, ATH5K_DEBUG_ANY,
"Bss Info ASSOC %d, bssid: %pM\n",
bss_conf->aid, common->curbssid);
common->curaid = bss_conf->aid;
ath5k_hw_set_associd(ah);
/* Once ANI is available you would start it here */
}
} }
if (changes & BSS_CHANGED_BEACON) { if (changes & BSS_CHANGED_BEACON) {
......
...@@ -1187,7 +1187,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, ...@@ -1187,7 +1187,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
*/ */
/* Restore bssid and bssid mask */ /* Restore bssid and bssid mask */
/* XXX: add ah->aid once mac80211 gives this to us */
ath5k_hw_set_associd(ah); ath5k_hw_set_associd(ah);
/* Set PCU config */ /* Set PCU config */
......
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