summaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/407-ath9k-uninline-ath9k_ps_-wakeup-restore-functions.patch
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-06-25 19:45:51 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-06-25 19:45:51 +0000
commit2bfe8f251839cdf00a68b3b52d4aae4848db95b5 (patch)
tree8504db9b7eeab55800ed8b7152dff49810a40d26 /package/mac80211/patches/407-ath9k-uninline-ath9k_ps_-wakeup-restore-functions.patch
parent3eb59941fdab99670641e4ff7537aa8fc1578447 (diff)
[packages] mac80211: add more ath9k patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16562 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/407-ath9k-uninline-ath9k_ps_-wakeup-restore-functions.patch')
-rw-r--r--package/mac80211/patches/407-ath9k-uninline-ath9k_ps_-wakeup-restore-functions.patch76
1 files changed, 76 insertions, 0 deletions
diff --git a/package/mac80211/patches/407-ath9k-uninline-ath9k_ps_-wakeup-restore-functions.patch b/package/mac80211/patches/407-ath9k-uninline-ath9k_ps_-wakeup-restore-functions.patch
new file mode 100644
index 000000000..c97d94a9a
--- /dev/null
+++ b/package/mac80211/patches/407-ath9k-uninline-ath9k_ps_-wakeup-restore-functions.patch
@@ -0,0 +1,76 @@
+From 900d70802f15e835b3dbbe8750313824aa30a118 Mon Sep 17 00:00:00 2001
+From: Gabor Juhos <juhosg@openwrt.org>
+Date: Sun, 21 Jun 2009 16:59:53 +0200
+Subject: [PATCH 2/3] ath9k: uninline ath9k_ps_{wakeup,restore} functions
+
+Uninline these functions before we add functional changes to them.
+
+Changes-licensed-under: ISC
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+---
+ drivers/net/wireless/ath/ath9k/ath9k.h | 23 ++---------------------
+ drivers/net/wireless/ath/ath9k/hw.c | 21 +++++++++++++++++++++
+ 2 files changed, 23 insertions(+), 21 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath9k/ath9k.h
++++ b/drivers/net/wireless/ath/ath9k/ath9k.h
+@@ -658,27 +658,8 @@ static inline int ath_ahb_init(void) { r
+ static inline void ath_ahb_exit(void) {};
+ #endif
+
+-static inline void ath9k_ps_wakeup(struct ath_softc *sc)
+-{
+- if (atomic_inc_return(&sc->ps_usecount) == 1)
+- if (sc->sc_ah->power_mode != ATH9K_PM_AWAKE) {
+- sc->sc_ah->restore_mode = sc->sc_ah->power_mode;
+- ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE);
+- }
+-}
+-
+-static inline void ath9k_ps_restore(struct ath_softc *sc)
+-{
+- if (atomic_dec_and_test(&sc->ps_usecount))
+- if ((sc->hw->conf.flags & IEEE80211_CONF_PS) &&
+- !(sc->sc_flags & (SC_OP_WAIT_FOR_BEACON |
+- SC_OP_WAIT_FOR_CAB |
+- SC_OP_WAIT_FOR_PSPOLL_DATA |
+- SC_OP_WAIT_FOR_TX_ACK)))
+- ath9k_hw_setpower(sc->sc_ah,
+- sc->sc_ah->restore_mode);
+-}
+-
++void ath9k_ps_wakeup(struct ath_softc *sc);
++void ath9k_ps_restore(struct ath_softc *sc);
+
+ void ath9k_set_bssid_mask(struct ieee80211_hw *hw);
+ int ath9k_wiphy_add(struct ath_softc *sc);
+--- a/drivers/net/wireless/ath/ath9k/hw.c
++++ b/drivers/net/wireless/ath/ath9k/hw.c
+@@ -2785,6 +2785,27 @@ bool ath9k_hw_setpower(struct ath_hw *ah
+ return ret;
+ }
+
++void ath9k_ps_wakeup(struct ath_softc *sc)
++{
++ if (atomic_inc_return(&sc->ps_usecount) == 1)
++ if (sc->sc_ah->power_mode != ATH9K_PM_AWAKE) {
++ sc->sc_ah->restore_mode = sc->sc_ah->power_mode;
++ ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE);
++ }
++}
++
++void ath9k_ps_restore(struct ath_softc *sc)
++{
++ if (atomic_dec_and_test(&sc->ps_usecount))
++ if ((sc->hw->conf.flags & IEEE80211_CONF_PS) &&
++ !(sc->sc_flags & (SC_OP_WAIT_FOR_BEACON |
++ SC_OP_WAIT_FOR_CAB |
++ SC_OP_WAIT_FOR_PSPOLL_DATA |
++ SC_OP_WAIT_FOR_TX_ACK)))
++ ath9k_hw_setpower(sc->sc_ah,
++ sc->sc_ah->restore_mode);
++}
++
+ /*
+ * Helper for ASPM support.
+ *