ath9k: improve ANI debugfs file
[openwrt.git] / package / kernel / mac80211 / patches / 512-ath9k_channelbw_debugfs.patch
index dce5860..8f3cc03 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1918,6 +1918,52 @@ static const struct file_operations fops
+@@ -1528,6 +1528,52 @@ static const struct file_operations fops
        .owner = THIS_MODULE
  };
  
@@ -53,7 +53,7 @@
  int ath9k_init_debug(struct ath_hw *ah)
  {
        struct ath_common *common = ath9k_hw_common(ah);
-@@ -1937,6 +1983,8 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1549,6 +1595,8 @@ int ath9k_init_debug(struct ath_hw *ah)
  
        debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
                            &fops_eeprom);
@@ -64,7 +64,7 @@
        debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
 --- a/drivers/net/wireless/ath/ath.h
 +++ b/drivers/net/wireless/ath/ath.h
-@@ -129,6 +129,7 @@ struct ath_common {
+@@ -130,6 +130,7 @@ struct ath_common {
        struct ieee80211_hw *hw;
        int debug_mask;
        enum ath_device_state state;
        case NL80211_CHAN_WIDTH_5:
                flags |= CHANNEL_QUARTER;
                break;
-@@ -97,12 +111,13 @@ struct ath9k_channel *ath9k_cmn_get_chan
+@@ -97,10 +111,11 @@ struct ath9k_channel *ath9k_cmn_get_chan
                                            struct cfg80211_chan_def *chandef)
  {
        struct ieee80211_channel *curchan = chandef->chan;
 +      struct ath_common *common = ath9k_hw_common(ah);
        struct ath9k_channel *channel;
-       u8 chan_idx;
  
-       chan_idx = curchan->hw_value;
-       channel = &ah->channels[chan_idx];
+       channel = &ah->channels[curchan->hw_value];
 -      ath9k_cmn_update_ichannel(channel, chandef);
 +      ath9k_cmn_update_ichannel(common, channel, chandef);