ath9k: merge a fix for hardware full sleep
authorFelix Fietkau <nbd@openwrt.org>
Sat, 10 Mar 2012 12:59:28 +0000 (12:59 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 10 Mar 2012 12:59:28 +0000 (12:59 +0000)
SVN-Revision: 30864

package/mac80211/patches/300-pending_work.patch
package/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch
package/mac80211/patches/513-ath9k_channelbw_debugfs.patch
package/mac80211/patches/531-ath9k_cur_txpower.patch

index b96e154884fdaab6bbe3fb5299cc199054c10dc3..70c823a1772dd6e0856fd7e09e2fb2de96478909 100644 (file)
  EXPORT_SYMBOL(ath9k_hw_beaconq_setup);
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -2300,6 +2300,7 @@ static int ath9k_tx_last_beacon(struct i
+@@ -118,13 +118,15 @@ void ath9k_ps_restore(struct ath_softc *
+       if (--sc->ps_usecount != 0)
+               goto unlock;
+-      if (sc->ps_idle && (sc->ps_flags & PS_WAIT_FOR_TX_ACK))
++      if (sc->ps_flags & PS_WAIT_FOR_TX_ACK)
++              goto unlock;
++
++      if (sc->ps_idle)
+               mode = ATH9K_PM_FULL_SLEEP;
+       else if (sc->ps_enabled &&
+                !(sc->ps_flags & (PS_WAIT_FOR_BEACON |
+                             PS_WAIT_FOR_CAB |
+-                            PS_WAIT_FOR_PSPOLL_DATA |
+-                            PS_WAIT_FOR_TX_ACK)))
++                            PS_WAIT_FOR_PSPOLL_DATA)))
+               mode = ATH9K_PM_NETWORK_SLEEP;
+       else
+               goto unlock;
+@@ -2300,6 +2302,7 @@ static int ath9k_tx_last_beacon(struct i
        struct ath_vif *avp;
        struct ath_buf *bf;
        struct ath_tx_status ts;
        int status;
  
        vif = sc->beacon.bslot[0];
-@@ -2310,7 +2311,7 @@ static int ath9k_tx_last_beacon(struct i
+@@ -2310,7 +2313,7 @@ static int ath9k_tx_last_beacon(struct i
        if (!avp->is_bslot_active)
                return 0;
  
index 6a39995703b93d8b6e744953c4ffdecf414ab989..0962406bcd285e3d8f451af889edff0cdd566686 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1430,15 +1430,6 @@ static int ath9k_add_interface(struct ie
+@@ -1432,15 +1432,6 @@ static int ath9k_add_interface(struct ie
                }
        }
  
@@ -16,7 +16,7 @@
        ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type);
  
        sc->nvifs++;
-@@ -1463,15 +1454,6 @@ static int ath9k_change_interface(struct
+@@ -1465,15 +1456,6 @@ static int ath9k_change_interface(struct
        mutex_lock(&sc->mutex);
        ath9k_ps_wakeup(sc);
  
index 34e5ea16018c69a180ab977afcc878eef0322dee..2645d5bdf417b386e0d2f475f835b91066ea8893 100644 (file)
@@ -80,7 +80,7 @@
  }
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1535,7 +1535,7 @@ static void ath9k_disable_ps(struct ath_
+@@ -1537,7 +1537,7 @@ static void ath9k_disable_ps(struct ath_
  
  }
  
@@ -89,7 +89,7 @@
  {
        struct ath_softc *sc = hw->priv;
        struct ath_hw *ah = sc->sc_ah;
-@@ -1579,9 +1579,11 @@ static int ath9k_config(struct ieee80211
+@@ -1581,9 +1581,11 @@ static int ath9k_config(struct ieee80211
  
        if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
                struct ieee80211_channel *curchan = hw->conf.channel;
  
                if (ah->curchan)
                        old_pos = ah->curchan - &ah->channels[0];
-@@ -1629,7 +1631,23 @@ static int ath9k_config(struct ieee80211
+@@ -1631,7 +1633,23 @@ static int ath9k_config(struct ieee80211
                        memset(&sc->survey[pos], 0, sizeof(struct survey_info));
                }
  
index 46f2004ae43ab2d6c059e48575c28b91545f5370..af246a788ccd4077411b427170c3b661c0779a13 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1653,6 +1653,8 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1655,6 +1655,8 @@ int ath9k_config(struct ieee80211_hw *hw
                        return -EINVAL;
                }
  
@@ -9,7 +9,7 @@
                /*
                 * The most recent snapshot of channel->noisefloor for the old
                 * channel is only available after the hardware reset. Copy it to
-@@ -1667,6 +1669,7 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1669,6 +1671,7 @@ int ath9k_config(struct ieee80211_hw *hw
                sc->config.txpowlimit = 2 * conf->power_level;
                ath9k_cmn_update_txpow(ah, sc->curtxpow,
                                       sc->config.txpowlimit, &sc->curtxpow);