aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-06-05 14:55:03 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-06-05 14:55:03 +0000
commit97dbd21bf8dbce81a374c5416be45a17064f3af6 (patch)
tree86ccbc41fbafcd9e878a6bafb9770c96452de5dc /package
parent68d634718350ababee9c3cf16c073eaba9efa4d6 (diff)
downloadupstream-97dbd21bf8dbce81a374c5416be45a17064f3af6.tar.gz
upstream-97dbd21bf8dbce81a374c5416be45a17064f3af6.tar.bz2
upstream-97dbd21bf8dbce81a374c5416be45a17064f3af6.zip
ath9k: merge a p2p powersave handling fix
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41017 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/kernel/mac80211/patches/300-pending_work.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/300-pending_work.patch b/package/kernel/mac80211/patches/300-pending_work.patch
index a1750e6e30..df492bb812 100644
--- a/package/kernel/mac80211/patches/300-pending_work.patch
+++ b/package/kernel/mac80211/patches/300-pending_work.patch
@@ -1,3 +1,16 @@
+commit 60ccc107c9b9fb732fdee1f76bb2dad44f0e1798
+Author: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
+Date: Tue May 27 16:58:02 2014 +0530
+
+ ath9k: Fix deadlock while updating p2p beacon timer
+
+ pm_lock is taken twice while syncing HW TSF of p2p vif.
+ Fix this by taking the lock at caller side.
+
+ Cc: Felix Fietkau <nbd@openwrt.org>
+ Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
+ Signed-off-by: John W. Linville <linville@tuxdriver.com>
+
commit f3831a4e3903dbc1a57d5df56deb6a143fd001bc
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Thu Jun 5 13:52:27 2014 +0200
@@ -684,3 +697,51 @@ Date: Mon May 19 21:20:49 2014 +0200
ENTRY_OWNER_DEVICE_DATA,
ENTRY_DATA_PENDING,
ENTRY_DATA_IO_FAILED,
+--- a/drivers/net/wireless/ath/ath9k/main.c
++++ b/drivers/net/wireless/ath/ath9k/main.c
+@@ -1757,7 +1757,6 @@ out:
+ void ath9k_update_p2p_ps(struct ath_softc *sc, struct ieee80211_vif *vif)
+ {
+ struct ath_vif *avp = (void *)vif->drv_priv;
+- unsigned long flags;
+ u32 tsf;
+
+ if (!sc->p2p_ps_timer)
+@@ -1767,14 +1766,9 @@ void ath9k_update_p2p_ps(struct ath_soft
+ return;
+
+ sc->p2p_ps_vif = avp;
+-
+- spin_lock_irqsave(&sc->sc_pm_lock, flags);
+- if (!(sc->ps_flags & PS_BEACON_SYNC)) {
+- tsf = ath9k_hw_gettsf32(sc->sc_ah);
+- ieee80211_parse_p2p_noa(&vif->bss_conf.p2p_noa_attr, &avp->noa, tsf);
+- ath9k_update_p2p_ps_timer(sc, avp);
+- }
+- spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
++ tsf = ath9k_hw_gettsf32(sc->sc_ah);
++ ieee80211_parse_p2p_noa(&vif->bss_conf.p2p_noa_attr, &avp->noa, tsf);
++ ath9k_update_p2p_ps_timer(sc, avp);
+ }
+
+ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
+@@ -1791,6 +1785,7 @@ static void ath9k_bss_info_changed(struc
+ struct ath_hw *ah = sc->sc_ah;
+ struct ath_common *common = ath9k_hw_common(ah);
+ struct ath_vif *avp = (void *)vif->drv_priv;
++ unsigned long flags;
+ int slottime;
+
+ ath9k_ps_wakeup(sc);
+@@ -1853,7 +1848,10 @@ static void ath9k_bss_info_changed(struc
+
+ if (changed & BSS_CHANGED_P2P_PS) {
+ spin_lock_bh(&sc->sc_pcu_lock);
+- ath9k_update_p2p_ps(sc, vif);
++ spin_lock_irqsave(&sc->sc_pm_lock, flags);
++ if (!(sc->ps_flags & PS_BEACON_SYNC))
++ ath9k_update_p2p_ps(sc, vif);
++ spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
+ spin_unlock_bh(&sc->sc_pcu_lock);
+ }
+