]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - drivers/net/wireless/ath/ath9k/phy.c
ath9k: clarify what hw code is and remove ath9k.h from a few files
[linux-2.6.git] / drivers / net / wireless / ath / ath9k / phy.c
index 63bf9a307c6a8ecd9911cfc4ade2ebfc377cc45f..eec4f1064a6884ce260476b744d58d55b630bab5 100644 (file)
@@ -14,7 +14,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include "ath9k.h"
+#include "hw.h"
 
 void
 ath9k_hw_write_regs(struct ath_hw *ah, u32 modesIndex, u32 freqIndex,
@@ -26,6 +26,7 @@ ath9k_hw_write_regs(struct ath_hw *ah, u32 modesIndex, u32 freqIndex,
 bool
 ath9k_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
 {
+       struct ath_common *common = ath9k_hw_common(ah);
        u32 channelSel = 0;
        u32 bModeSynth = 0;
        u32 aModeRefSel = 0;
@@ -46,8 +47,8 @@ ath9k_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
                        channelSel = ((freq - 704) * 2 - 3040) / 10;
                        bModeSynth = 1;
                } else {
-                       DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
-                               "Invalid channel %u MHz\n", freq);
+                       ath_print(common, ATH_DBG_FATAL,
+                                 "Invalid channel %u MHz\n", freq);
                        return false;
                }
 
@@ -79,8 +80,8 @@ ath9k_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
                channelSel = ath9k_hw_reverse_bits((freq - 4800) / 5, 8);
                aModeRefSel = ath9k_hw_reverse_bits(1, 2);
        } else {
-               DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
-                       "Invalid channel %u MHz\n", freq);
+               ath_print(common, ATH_DBG_FATAL,
+                         "Invalid channel %u MHz\n", freq);
                return false;
        }
 
@@ -285,6 +286,8 @@ ath9k_hw_rf_free(struct ath_hw *ah)
 
 bool ath9k_hw_init_rf(struct ath_hw *ah, int *status)
 {
+       struct ath_common *common = ath9k_hw_common(ah);
+
        if (!AR_SREV_9280_10_OR_LATER(ah)) {
                ah->analogBank0Data =
                    kzalloc((sizeof(u32) *
@@ -315,8 +318,8 @@ bool ath9k_hw_init_rf(struct ath_hw *ah, int *status)
                    || ah->analogBank6Data == NULL
                    || ah->analogBank6TPCData == NULL
                    || ah->analogBank7Data == NULL) {
-                       DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
-                               "Cannot allocate RF banks\n");
+                       ath_print(common, ATH_DBG_FATAL,
+                                 "Cannot allocate RF banks\n");
                        *status = -ENOMEM;
                        return false;
                }
@@ -326,8 +329,8 @@ bool ath9k_hw_init_rf(struct ath_hw *ah, int *status)
                             ah->iniAddac.ia_rows *
                             ah->iniAddac.ia_columns), GFP_KERNEL);
                if (ah->addac5416_21 == NULL) {
-                       DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
-                               "Cannot allocate addac5416_21\n");
+                       ath_print(common, ATH_DBG_FATAL,
+                                 "Cannot allocate addac5416_21\n");
                        *status = -ENOMEM;
                        return false;
                }
@@ -336,8 +339,8 @@ bool ath9k_hw_init_rf(struct ath_hw *ah, int *status)
                    kzalloc((sizeof(u32) *
                             ah->iniBank6.ia_rows), GFP_KERNEL);
                if (ah->bank6Temp == NULL) {
-                       DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
-                               "Cannot allocate bank6Temp\n");
+                       ath_print(common, ATH_DBG_FATAL,
+                                 "Cannot allocate bank6Temp\n");
                        *status = -ENOMEM;
                        return false;
                }