|
@@ -1757,7 +1757,6 @@ out:
|
|
void ath9k_update_p2p_ps(struct ath_softc *sc, struct ieee80211_vif *vif)
|
|
void ath9k_update_p2p_ps(struct ath_softc *sc, struct ieee80211_vif *vif)
|
|
{
|
|
{
|
|
struct ath_vif *avp = (void *)vif->drv_priv;
|
|
struct ath_vif *avp = (void *)vif->drv_priv;
|
|
- unsigned long flags;
|
|
|
|
u32 tsf;
|
|
u32 tsf;
|
|
|
|
|
|
if (!sc->p2p_ps_timer)
|
|
if (!sc->p2p_ps_timer)
|
|
@@ -1767,14 +1766,9 @@ void ath9k_update_p2p_ps(struct ath_softc *sc, struct ieee80211_vif *vif)
|
|
return;
|
|
return;
|
|
|
|
|
|
sc->p2p_ps_vif = avp;
|
|
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,
|
|
static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
|
|
@@ -1791,6 +1785,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
|
|
struct ath_hw *ah = sc->sc_ah;
|
|
struct ath_hw *ah = sc->sc_ah;
|
|
struct ath_common *common = ath9k_hw_common(ah);
|
|
struct ath_common *common = ath9k_hw_common(ah);
|
|
struct ath_vif *avp = (void *)vif->drv_priv;
|
|
struct ath_vif *avp = (void *)vif->drv_priv;
|
|
|
|
+ unsigned long flags;
|
|
int slottime;
|
|
int slottime;
|
|
|
|
|
|
ath9k_ps_wakeup(sc);
|
|
ath9k_ps_wakeup(sc);
|
|
@@ -1853,7 +1848,10 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
|
|
|
|
|
|
if (changed & BSS_CHANGED_P2P_PS) {
|
|
if (changed & BSS_CHANGED_P2P_PS) {
|
|
spin_lock_bh(&sc->sc_pcu_lock);
|
|
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);
|
|
spin_unlock_bh(&sc->sc_pcu_lock);
|
|
}
|
|
}
|
|
|
|
|