diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2010-01-08 00:06:05 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-12 14:02:05 -0500 |
commit | 1b04b9308ebc7f6accb319cf51c9b8ec29f79707 (patch) | |
tree | e2a5e76aed1f208299ffac3bd0cf33cc92e65bf7 /drivers/net/wireless/ath/ath9k/main.c | |
parent | 556242049cc3992d0ee625e9f15c4b00ea4baac8 (diff) |
ath9k: Cleanup Powersave flags
sc_flags has slowly become a kitchen sink over time.
Move powersave related flags to a separate variable.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 48bd5d50f4d6..974de2056b4a 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -144,10 +144,10 @@ void ath9k_ps_restore(struct ath_softc *sc) | |||
144 | goto unlock; | 144 | goto unlock; |
145 | 145 | ||
146 | if (sc->ps_enabled && | 146 | if (sc->ps_enabled && |
147 | !(sc->sc_flags & (SC_OP_WAIT_FOR_BEACON | | 147 | !(sc->ps_flags & (PS_WAIT_FOR_BEACON | |
148 | SC_OP_WAIT_FOR_CAB | | 148 | PS_WAIT_FOR_CAB | |
149 | SC_OP_WAIT_FOR_PSPOLL_DATA | | 149 | PS_WAIT_FOR_PSPOLL_DATA | |
150 | SC_OP_WAIT_FOR_TX_ACK))) | 150 | PS_WAIT_FOR_TX_ACK))) |
151 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP); | 151 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP); |
152 | 152 | ||
153 | unlock: | 153 | unlock: |
@@ -424,7 +424,7 @@ void ath9k_tasklet(unsigned long data) | |||
424 | */ | 424 | */ |
425 | ath_print(common, ATH_DBG_PS, | 425 | ath_print(common, ATH_DBG_PS, |
426 | "TSFOOR - Sync with next Beacon\n"); | 426 | "TSFOOR - Sync with next Beacon\n"); |
427 | sc->sc_flags |= SC_OP_WAIT_FOR_BEACON | SC_OP_BEACON_SYNC; | 427 | sc->ps_flags |= PS_WAIT_FOR_BEACON | PS_BEACON_SYNC; |
428 | } | 428 | } |
429 | 429 | ||
430 | if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE) | 430 | if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE) |
@@ -525,7 +525,7 @@ irqreturn_t ath_isr(int irq, void *dev) | |||
525 | * receive frames */ | 525 | * receive frames */ |
526 | ath9k_setpower(sc, ATH9K_PM_AWAKE); | 526 | ath9k_setpower(sc, ATH9K_PM_AWAKE); |
527 | ath9k_hw_setrxabort(sc->sc_ah, 0); | 527 | ath9k_hw_setrxabort(sc->sc_ah, 0); |
528 | sc->sc_flags |= SC_OP_WAIT_FOR_BEACON; | 528 | sc->ps_flags |= PS_WAIT_FOR_BEACON; |
529 | } | 529 | } |
530 | 530 | ||
531 | chip_reset: | 531 | chip_reset: |
@@ -833,7 +833,7 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc, | |||
833 | * on the receipt of the first Beacon frame (i.e., | 833 | * on the receipt of the first Beacon frame (i.e., |
834 | * after time sync with the AP). | 834 | * after time sync with the AP). |
835 | */ | 835 | */ |
836 | sc->sc_flags |= SC_OP_BEACON_SYNC; | 836 | sc->ps_flags |= PS_BEACON_SYNC; |
837 | 837 | ||
838 | /* Configure the beacon */ | 838 | /* Configure the beacon */ |
839 | ath_beacon_config(sc, vif); | 839 | ath_beacon_config(sc, vif); |
@@ -1238,11 +1238,11 @@ static int ath9k_tx(struct ieee80211_hw *hw, | |||
1238 | if (ieee80211_is_pspoll(hdr->frame_control)) { | 1238 | if (ieee80211_is_pspoll(hdr->frame_control)) { |
1239 | ath_print(common, ATH_DBG_PS, | 1239 | ath_print(common, ATH_DBG_PS, |
1240 | "Sending PS-Poll to pick a buffered frame\n"); | 1240 | "Sending PS-Poll to pick a buffered frame\n"); |
1241 | sc->sc_flags |= SC_OP_WAIT_FOR_PSPOLL_DATA; | 1241 | sc->ps_flags |= PS_WAIT_FOR_PSPOLL_DATA; |
1242 | } else { | 1242 | } else { |
1243 | ath_print(common, ATH_DBG_PS, | 1243 | ath_print(common, ATH_DBG_PS, |
1244 | "Wake up to complete TX\n"); | 1244 | "Wake up to complete TX\n"); |
1245 | sc->sc_flags |= SC_OP_WAIT_FOR_TX_ACK; | 1245 | sc->ps_flags |= PS_WAIT_FOR_TX_ACK; |
1246 | } | 1246 | } |
1247 | /* | 1247 | /* |
1248 | * The actual restore operation will happen only after | 1248 | * The actual restore operation will happen only after |
@@ -1538,7 +1538,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
1538 | */ | 1538 | */ |
1539 | if (changed & IEEE80211_CONF_CHANGE_PS) { | 1539 | if (changed & IEEE80211_CONF_CHANGE_PS) { |
1540 | if (conf->flags & IEEE80211_CONF_PS) { | 1540 | if (conf->flags & IEEE80211_CONF_PS) { |
1541 | sc->sc_flags |= SC_OP_PS_ENABLED; | 1541 | sc->ps_flags |= PS_ENABLED; |
1542 | if (!(ah->caps.hw_caps & | 1542 | if (!(ah->caps.hw_caps & |
1543 | ATH9K_HW_CAP_AUTOSLEEP)) { | 1543 | ATH9K_HW_CAP_AUTOSLEEP)) { |
1544 | if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) { | 1544 | if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) { |
@@ -1551,23 +1551,23 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
1551 | * At this point we know hardware has received an ACK | 1551 | * At this point we know hardware has received an ACK |
1552 | * of a previously sent null data frame. | 1552 | * of a previously sent null data frame. |
1553 | */ | 1553 | */ |
1554 | if ((sc->sc_flags & SC_OP_NULLFUNC_COMPLETED)) { | 1554 | if ((sc->ps_flags & PS_NULLFUNC_COMPLETED)) { |
1555 | sc->sc_flags &= ~SC_OP_NULLFUNC_COMPLETED; | 1555 | sc->ps_flags &= ~PS_NULLFUNC_COMPLETED; |
1556 | sc->ps_enabled = true; | 1556 | sc->ps_enabled = true; |
1557 | ath9k_hw_setrxabort(sc->sc_ah, 1); | 1557 | ath9k_hw_setrxabort(sc->sc_ah, 1); |
1558 | } | 1558 | } |
1559 | } else { | 1559 | } else { |
1560 | sc->ps_enabled = false; | 1560 | sc->ps_enabled = false; |
1561 | sc->sc_flags &= ~(SC_OP_PS_ENABLED | | 1561 | sc->ps_flags &= ~(PS_ENABLED | |
1562 | SC_OP_NULLFUNC_COMPLETED); | 1562 | PS_NULLFUNC_COMPLETED); |
1563 | ath9k_setpower(sc, ATH9K_PM_AWAKE); | 1563 | ath9k_setpower(sc, ATH9K_PM_AWAKE); |
1564 | if (!(ah->caps.hw_caps & | 1564 | if (!(ah->caps.hw_caps & |
1565 | ATH9K_HW_CAP_AUTOSLEEP)) { | 1565 | ATH9K_HW_CAP_AUTOSLEEP)) { |
1566 | ath9k_hw_setrxabort(sc->sc_ah, 0); | 1566 | ath9k_hw_setrxabort(sc->sc_ah, 0); |
1567 | sc->sc_flags &= ~(SC_OP_WAIT_FOR_BEACON | | 1567 | sc->ps_flags &= ~(PS_WAIT_FOR_BEACON | |
1568 | SC_OP_WAIT_FOR_CAB | | 1568 | PS_WAIT_FOR_CAB | |
1569 | SC_OP_WAIT_FOR_PSPOLL_DATA | | 1569 | PS_WAIT_FOR_PSPOLL_DATA | |
1570 | SC_OP_WAIT_FOR_TX_ACK); | 1570 | PS_WAIT_FOR_TX_ACK); |
1571 | if (sc->imask & ATH9K_INT_TIM_TIMER) { | 1571 | if (sc->imask & ATH9K_INT_TIM_TIMER) { |
1572 | sc->imask &= ~ATH9K_INT_TIM_TIMER; | 1572 | sc->imask &= ~ATH9K_INT_TIM_TIMER; |
1573 | ath9k_hw_set_interrupts(sc->sc_ah, | 1573 | ath9k_hw_set_interrupts(sc->sc_ah, |