ath9k: clean up some patches
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 8 Sep 2013 09:38:38 +0000 (09:38 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 8 Sep 2013 09:38:38 +0000 (09:38 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37919 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch
package/kernel/mac80211/patches/521-ath9k_cur_txpower.patch
package/kernel/mac80211/patches/523-mac80211_configure_antenna_gain.patch
package/kernel/mac80211/patches/524-ath9k_use_configured_antenna_gain.patch
package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch

index a0bea05..6992324 100644 (file)
@@ -8,14 +8,6 @@
        struct survey_info *cur_survey;
        struct survey_info survey[ATH9K_NUM_CHANNELS];
  
-@@ -905,6 +906,7 @@ struct fft_sample_ht20 {
-       u8 data[SPECTRAL_HT20_NUM_BINS];
- } __packed;
-+int ath9k_config(struct ieee80211_hw *hw, u32 changed);
- void ath9k_tasklet(unsigned long data);
- int ath_cabq_update(struct ath_softc *);
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
 @@ -1918,6 +1918,50 @@ static const struct file_operations fops
@@ -52,7 +44,7 @@
 +
 +      sc->chan_bw = chan_bw;
 +      if (!test_bit(SC_OP_INVALID, &sc->sc_flags))
-+              ath9k_config(sc->hw, IEEE80211_CONF_CHANGE_CHANNEL);
++              ath9k_ops.config(sc->hw, IEEE80211_CONF_CHANGE_CHANNEL);
 +
 +      return count;
 +}
        debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1146,7 +1146,7 @@ int ath9k_spectral_scan_config(struct ie
-       return 0;
- }
--static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
-+int ath9k_config(struct ieee80211_hw *hw, u32 changed)
- {
-       struct ath_softc *sc = hw->priv;
-       struct ath_hw *ah = sc->sc_ah;
 @@ -1200,8 +1200,10 @@ static int ath9k_config(struct ieee80211
  
        if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) {
index 2aaee2f..2269191 100644 (file)
@@ -1,15 +1,20 @@
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1263,6 +1263,8 @@ int ath9k_config(struct ieee80211_hw *hw
-                       return -EINVAL;
-               }
+@@ -286,8 +286,12 @@ static int ath_reset_internal(struct ath
+           (sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL))
+               ath9k_mci_set_txpower(sc, true, false);
  
-+              hw->cur_power_level = sc->curtxpow / 2;
+-      if (!ath_complete_reset(sc, true))
++      if (!ath_complete_reset(sc, true)) {
+               r = -EIO;
++              goto out;
++      }
 +
-               /*
-                * The most recent snapshot of channel->noisefloor for the old
-                * channel is only available after the hardware reset. Copy it to
-@@ -1299,6 +1301,7 @@ int ath9k_config(struct ieee80211_hw *hw
++      sc->hw->cur_power_level = sc->curtxpow / 2;
+ out:
+       spin_unlock_bh(&sc->sc_pcu_lock);
+@@ -1299,6 +1303,7 @@ static int ath9k_config(struct ieee80211
                sc->config.txpowlimit = 2 * conf->power_level;
                ath9k_cmn_update_txpow(ah, sc->curtxpow,
                                       sc->config.txpowlimit, &sc->curtxpow);
index 0e2baf9..54da9f6 100644 (file)
  
 --- a/include/uapi/linux/nl80211.h
 +++ b/include/uapi/linux/nl80211.h
-@@ -1766,6 +1766,8 @@ enum nl80211_attrs {
+@@ -1460,6 +1460,9 @@ enum nl80211_commands {
+  * @NL80211_ATTR_CSA_C_OFF_PRESP: Offset of the channel switch counter
+  *    field in the probe response (%NL80211_ATTR_PROBE_RESP).
+  *
++ * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
++ *    transmit power to stay within regulatory limits.
++ *
+  * @NL80211_ATTR_MAX: highest attribute number currently defined
+  * @__NL80211_ATTR_AFTER_LAST: internal use
+  */
+@@ -1766,6 +1769,8 @@ enum nl80211_attrs {
        NL80211_ATTR_CSA_C_OFF_BEACON,
        NL80211_ATTR_CSA_C_OFF_PRESP,
  
index dd1fec7..48b5f31 100644 (file)
@@ -21,7 +21,7 @@
        if (ant_gain > max_gain)
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1297,7 +1297,10 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1299,7 +1299,10 @@ static int ath9k_config(struct ieee80211
        }
  
        if (changed & IEEE80211_CONF_CHANGE_POWER) {
index 3409b69..521f031 100644 (file)
                REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
 --- a/drivers/net/wireless/ath/ath9k/main.c
 +++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -458,6 +458,11 @@ irqreturn_t ath_isr(int irq, void *dev)
+@@ -462,6 +462,11 @@ irqreturn_t ath_isr(int irq, void *dev)
        ath9k_hw_getisr(ah, &status);   /* NB: clears ISR too */
        status &= ah->imask;    /* discard unasked-for bits */