ath9k_hw: rename ath9k_hw_rf_free() to ath9k_hw_rf_free_ext_banks()
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 19 Oct 2009 06:33:39 +0000 (02:33 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 30 Oct 2009 20:50:37 +0000 (16:50 -0400)
This clarifies this is only required for external radios.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/ath9k/phy.c
drivers/net/wireless/ath/ath9k/phy.h

index 2e2516e1cd4a17fee791b5bcafadbfed59dc2ef5..4c3ff2e429e7149baed772e940ebc2314dda5546 100644 (file)
@@ -1282,7 +1282,8 @@ void ath9k_hw_detach(struct ath_hw *ah)
        ath9k_hw_setpower(ah, ATH9K_PM_FULL_SLEEP);
 
 free_hw:
-       ath9k_hw_rf_free(ah);
+       if (!AR_SREV_9280_10_OR_LATER(ah))
+               ath9k_hw_rf_free_ext_banks(ah);
        kfree(ah);
        ah = NULL;
 }
index 007b41426b270b86bb9329fa7be0a2d53a7c805c..7f2b5d21f2f13f553218e74c5e12d0ce3a7779e1 100644 (file)
@@ -628,7 +628,6 @@ static inline struct ath_regulatory *ath9k_hw_regulatory(struct ath_hw *ah)
 const char *ath9k_hw_probe(u16 vendorid, u16 devid);
 void ath9k_hw_detach(struct ath_hw *ah);
 int ath9k_hw_init(struct ath_hw *ah);
-void ath9k_hw_rf_free(struct ath_hw *ah);
 int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
                   bool bChannelChange);
 void ath9k_hw_fill_cap_info(struct ath_hw *ah);
index 923ea0b45174e0b12a1ec65944c66489ccc597c7..d50b5ff28b380043e1c14ee114aaa79c202db1e4 100644 (file)
@@ -384,18 +384,20 @@ ath9k_hw_set_rf_regs(struct ath_hw *ah, struct ath9k_channel *chan,
 }
 
 /**
- * ath9k_hw_rf_free - Free memory for analog bank scratch buffers
+ * ath9k_hw_rf_free_ext_banks - Free memory for analog bank scratch buffers
  * @ah: atheros hardware struture
- * For the external AR2133/AR5133 radios.
+ * For the external AR2133/AR5133 radios banks.
  */
 void
-ath9k_hw_rf_free(struct ath_hw *ah)
+ath9k_hw_rf_free_ext_banks(struct ath_hw *ah)
 {
 #define ATH_FREE_BANK(bank) do { \
                kfree(bank); \
                bank = NULL; \
        } while (0);
 
+       BUG_ON(AR_SREV_9280_10_OR_LATER(ah));
+
        ATH_FREE_BANK(ah->analogBank0Data);
        ATH_FREE_BANK(ah->analogBank1Data);
        ATH_FREE_BANK(ah->analogBank2Data);
@@ -405,6 +407,7 @@ ath9k_hw_rf_free(struct ath_hw *ah)
        ATH_FREE_BANK(ah->analogBank7Data);
        ATH_FREE_BANK(ah->addac5416_21);
        ATH_FREE_BANK(ah->bank6Temp);
+
 #undef ATH_FREE_BANK
 }
 
index 0bbbfbcfe3f45b3d632775afe37df70047611db5..477b606d09fdb1f01b38648f78e3f9a9c58c5a59 100644 (file)
@@ -29,6 +29,8 @@ bool ath9k_hw_set_rf_regs(struct ath_hw *ah,
                          u16 modesIndex);
 void ath9k_hw_decrease_chain_power(struct ath_hw *ah,
                                   struct ath9k_channel *chan);
+
+void ath9k_hw_rf_free_ext_banks(struct ath_hw *ah);
 int ath9k_hw_rf_alloc_ext_banks(struct ath_hw *ah);
 
 #define AR_PHY_BASE     0x9800