mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-02 03:52:33 +00:00
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>
This commit is contained in:
parent
b7351a003c
commit
293dc5dfdb
1 changed files with 6 additions and 11 deletions
|
@ -505,11 +505,6 @@ static bool ath_beacon_dtim_pending_cab(struct sk_buff *skb)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ath_rx_ps_back_to_sleep(struct ath_softc *sc)
|
|
||||||
{
|
|
||||||
sc->sc_flags &= ~(SC_OP_WAIT_FOR_BEACON | SC_OP_WAIT_FOR_CAB);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb)
|
static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
struct ieee80211_mgmt *mgmt;
|
struct ieee80211_mgmt *mgmt;
|
||||||
|
@ -521,6 +516,8 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb)
|
||||||
if (memcmp(sc->curbssid, mgmt->bssid, ETH_ALEN) != 0)
|
if (memcmp(sc->curbssid, mgmt->bssid, ETH_ALEN) != 0)
|
||||||
return; /* not from our current AP */
|
return; /* not from our current AP */
|
||||||
|
|
||||||
|
sc->sc_flags &= ~SC_OP_WAIT_FOR_BEACON;
|
||||||
|
|
||||||
if (sc->sc_flags & SC_OP_BEACON_SYNC) {
|
if (sc->sc_flags & SC_OP_BEACON_SYNC) {
|
||||||
sc->sc_flags &= ~SC_OP_BEACON_SYNC;
|
sc->sc_flags &= ~SC_OP_BEACON_SYNC;
|
||||||
DPRINTF(sc, ATH_DBG_PS, "Reconfigure Beacon timers based on "
|
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)
|
||||||
* fails to send a frame indicating that all CAB frames have
|
* fails to send a frame indicating that all CAB frames have
|
||||||
* been delivered.
|
* been delivered.
|
||||||
*/
|
*/
|
||||||
|
sc->sc_flags &= ~SC_OP_WAIT_FOR_CAB;
|
||||||
DPRINTF(sc, ATH_DBG_PS, "PS wait for CAB frames timed out\n");
|
DPRINTF(sc, ATH_DBG_PS, "PS wait for CAB frames timed out\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No more broadcast/multicast frames to be received at this point. */
|
|
||||||
ath_rx_ps_back_to_sleep(sc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb)
|
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)
|
||||||
ieee80211_is_action(hdr->frame_control)) &&
|
ieee80211_is_action(hdr->frame_control)) &&
|
||||||
is_multicast_ether_addr(hdr->addr1) &&
|
is_multicast_ether_addr(hdr->addr1) &&
|
||||||
!ieee80211_has_moredata(hdr->frame_control)) {
|
!ieee80211_has_moredata(hdr->frame_control)) {
|
||||||
DPRINTF(sc, ATH_DBG_PS, "All PS CAB frames received, back to "
|
|
||||||
"sleep\n");
|
|
||||||
/*
|
/*
|
||||||
* No more broadcast/multicast frames to be received at this
|
* No more broadcast/multicast frames to be received at this
|
||||||
* point.
|
* point.
|
||||||
*/
|
*/
|
||||||
ath_rx_ps_back_to_sleep(sc);
|
sc->sc_flags &= ~SC_OP_WAIT_FOR_CAB;
|
||||||
|
DPRINTF(sc, ATH_DBG_PS, "All PS CAB frames received, back to "
|
||||||
|
"sleep\n");
|
||||||
} else if ((sc->sc_flags & SC_OP_WAIT_FOR_PSPOLL_DATA) &&
|
} else if ((sc->sc_flags & SC_OP_WAIT_FOR_PSPOLL_DATA) &&
|
||||||
!is_multicast_ether_addr(hdr->addr1) &&
|
!is_multicast_ether_addr(hdr->addr1) &&
|
||||||
!ieee80211_has_morefrags(hdr->frame_control)) {
|
!ieee80211_has_morefrags(hdr->frame_control)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue