c97d94a9a320779cfe1791fceda4b9bf0862dba2
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 407-ath9k-uninline-ath9k_ps_-wakeup-restore-functions.patch
1 From 900d70802f15e835b3dbbe8750313824aa30a118 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Sun, 21 Jun 2009 16:59:53 +0200
4 Subject: [PATCH 2/3] ath9k: uninline ath9k_ps_{wakeup,restore} functions
5
6 Uninline these functions before we add functional changes to them.
7
8 Changes-licensed-under: ISC
9 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
10 ---
11 drivers/net/wireless/ath/ath9k/ath9k.h | 23 ++---------------------
12 drivers/net/wireless/ath/ath9k/hw.c | 21 +++++++++++++++++++++
13 2 files changed, 23 insertions(+), 21 deletions(-)
14
15 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
16 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
17 @@ -658,27 +658,8 @@ static inline int ath_ahb_init(void) { r
18 static inline void ath_ahb_exit(void) {};
19 #endif
20
21 -static inline void ath9k_ps_wakeup(struct ath_softc *sc)
22 -{
23 - if (atomic_inc_return(&sc->ps_usecount) == 1)
24 - if (sc->sc_ah->power_mode != ATH9K_PM_AWAKE) {
25 - sc->sc_ah->restore_mode = sc->sc_ah->power_mode;
26 - ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE);
27 - }
28 -}
29 -
30 -static inline void ath9k_ps_restore(struct ath_softc *sc)
31 -{
32 - if (atomic_dec_and_test(&sc->ps_usecount))
33 - if ((sc->hw->conf.flags & IEEE80211_CONF_PS) &&
34 - !(sc->sc_flags & (SC_OP_WAIT_FOR_BEACON |
35 - SC_OP_WAIT_FOR_CAB |
36 - SC_OP_WAIT_FOR_PSPOLL_DATA |
37 - SC_OP_WAIT_FOR_TX_ACK)))
38 - ath9k_hw_setpower(sc->sc_ah,
39 - sc->sc_ah->restore_mode);
40 -}
41 -
42 +void ath9k_ps_wakeup(struct ath_softc *sc);
43 +void ath9k_ps_restore(struct ath_softc *sc);
44
45 void ath9k_set_bssid_mask(struct ieee80211_hw *hw);
46 int ath9k_wiphy_add(struct ath_softc *sc);
47 --- a/drivers/net/wireless/ath/ath9k/hw.c
48 +++ b/drivers/net/wireless/ath/ath9k/hw.c
49 @@ -2785,6 +2785,27 @@ bool ath9k_hw_setpower(struct ath_hw *ah
50 return ret;
51 }
52
53 +void ath9k_ps_wakeup(struct ath_softc *sc)
54 +{
55 + if (atomic_inc_return(&sc->ps_usecount) == 1)
56 + if (sc->sc_ah->power_mode != ATH9K_PM_AWAKE) {
57 + sc->sc_ah->restore_mode = sc->sc_ah->power_mode;
58 + ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE);
59 + }
60 +}
61 +
62 +void ath9k_ps_restore(struct ath_softc *sc)
63 +{
64 + if (atomic_dec_and_test(&sc->ps_usecount))
65 + if ((sc->hw->conf.flags & IEEE80211_CONF_PS) &&
66 + !(sc->sc_flags & (SC_OP_WAIT_FOR_BEACON |
67 + SC_OP_WAIT_FOR_CAB |
68 + SC_OP_WAIT_FOR_PSPOLL_DATA |
69 + SC_OP_WAIT_FOR_TX_ACK)))
70 + ath9k_hw_setpower(sc->sc_ah,
71 + sc->sc_ah->restore_mode);
72 +}
73 +
74 /*
75 * Helper for ASPM support.
76 *