diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-06-19 06:17:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:01:47 -0400 |
commit | 293dc5dfdbcc16cde06e40a688394cc8ab083e48 (patch) | |
tree | eeb4b95fc194576302ef3b873fddb06c4206f9bc | |
parent | b7351a003ca29ac4372393040ffb06dc04309e2e (diff) |
ath9k: remove ath_rx_ps_back_to_sleep helper
This helper only clears the SC_OP_WAIT_FOR_{BEACON,CAB} flags.
Remove it and clear these flags directly in the approptiate
places instead.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 385bd4cd550b..2b2872baaa30 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -505,11 +505,6 @@ static bool ath_beacon_dtim_pending_cab(struct sk_buff *skb) | |||
505 | return false; | 505 | return false; |
506 | } | 506 | } |
507 | 507 | ||
508 | static void ath_rx_ps_back_to_sleep(struct ath_softc *sc) | ||
509 | { | ||
510 | sc->sc_flags &= ~(SC_OP_WAIT_FOR_BEACON | SC_OP_WAIT_FOR_CAB); | ||
511 | } | ||
512 | |||
513 | static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb) | 508 | static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb) |
514 | { | 509 | { |
515 | struct ieee80211_mgmt *mgmt; | 510 | struct ieee80211_mgmt *mgmt; |
@@ -521,6 +516,8 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb) | |||
521 | if (memcmp(sc->curbssid, mgmt->bssid, ETH_ALEN) != 0) | 516 | if (memcmp(sc->curbssid, mgmt->bssid, ETH_ALEN) != 0) |
522 | return; /* not from our current AP */ | 517 | return; /* not from our current AP */ |
523 | 518 | ||
519 | sc->sc_flags &= ~SC_OP_WAIT_FOR_BEACON; | ||
520 | |||
524 | if (sc->sc_flags & SC_OP_BEACON_SYNC) { | 521 | if (sc->sc_flags & SC_OP_BEACON_SYNC) { |
525 | sc->sc_flags &= ~SC_OP_BEACON_SYNC; | 522 | sc->sc_flags &= ~SC_OP_BEACON_SYNC; |
526 | DPRINTF(sc, ATH_DBG_PS, "Reconfigure Beacon timers based on " | 523 | DPRINTF(sc, ATH_DBG_PS, "Reconfigure Beacon timers based on " |
@@ -548,11 +545,9 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb) | |||
548 | * fails to send a frame indicating that all CAB frames have | 545 | * fails to send a frame indicating that all CAB frames have |
549 | * been delivered. | 546 | * been delivered. |
550 | */ | 547 | */ |
548 | sc->sc_flags &= ~SC_OP_WAIT_FOR_CAB; | ||
551 | DPRINTF(sc, ATH_DBG_PS, "PS wait for CAB frames timed out\n"); | 549 | DPRINTF(sc, ATH_DBG_PS, "PS wait for CAB frames timed out\n"); |
552 | } | 550 | } |
553 | |||
554 | /* No more broadcast/multicast frames to be received at this point. */ | ||
555 | ath_rx_ps_back_to_sleep(sc); | ||
556 | } | 551 | } |
557 | 552 | ||
558 | static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb) | 553 | static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb) |
@@ -570,13 +565,13 @@ static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb) | |||
570 | ieee80211_is_action(hdr->frame_control)) && | 565 | ieee80211_is_action(hdr->frame_control)) && |
571 | is_multicast_ether_addr(hdr->addr1) && | 566 | is_multicast_ether_addr(hdr->addr1) && |
572 | !ieee80211_has_moredata(hdr->frame_control)) { | 567 | !ieee80211_has_moredata(hdr->frame_control)) { |
573 | DPRINTF(sc, ATH_DBG_PS, "All PS CAB frames received, back to " | ||
574 | "sleep\n"); | ||
575 | /* | 568 | /* |
576 | * No more broadcast/multicast frames to be received at this | 569 | * No more broadcast/multicast frames to be received at this |
577 | * point. | 570 | * point. |
578 | */ | 571 | */ |
579 | ath_rx_ps_back_to_sleep(sc); | 572 | sc->sc_flags &= ~SC_OP_WAIT_FOR_CAB; |
573 | DPRINTF(sc, ATH_DBG_PS, "All PS CAB frames received, back to " | ||
574 | "sleep\n"); | ||
580 | } else if ((sc->sc_flags & SC_OP_WAIT_FOR_PSPOLL_DATA) && | 575 | } else if ((sc->sc_flags & SC_OP_WAIT_FOR_PSPOLL_DATA) && |
581 | !is_multicast_ether_addr(hdr->addr1) && | 576 | !is_multicast_ether_addr(hdr->addr1) && |
582 | !ieee80211_has_morefrags(hdr->frame_control)) { | 577 | !ieee80211_has_morefrags(hdr->frame_control)) { |