aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-04-13 12:26:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:46 -0400
commitcbfe946860ffc718c5d99a6b740e33ac95fe8b8d (patch)
treef82a08200ca9abb8c209fc5e9a8732d38403700c /drivers/net/wireless
parent379f04407c92d84f2506385b66fb9fc89ecd96c3 (diff)
ath9k: Use a consistent naming convention
This patch replaces old 'hal_' prefixes with 'ath9k_'. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/calib.c28
-rw-r--r--drivers/net/wireless/ath/ath9k/calib.h30
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h16
3 files changed, 37 insertions, 37 deletions
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index a0661bb96723..67375adf23c0 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -186,7 +186,7 @@ static bool getNoiseFloorThresh(struct ath_hw *ah,
186} 186}
187 187
188static void ath9k_hw_setup_calibration(struct ath_hw *ah, 188static void ath9k_hw_setup_calibration(struct ath_hw *ah,
189 struct hal_cal_list *currCal) 189 struct ath9k_cal_list *currCal)
190{ 190{
191 REG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4(0), 191 REG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4(0),
192 AR_PHY_TIMING_CTRL4_IQCAL_LOG_COUNT_MAX, 192 AR_PHY_TIMING_CTRL4_IQCAL_LOG_COUNT_MAX,
@@ -220,7 +220,7 @@ static void ath9k_hw_setup_calibration(struct ath_hw *ah,
220} 220}
221 221
222static void ath9k_hw_reset_calibration(struct ath_hw *ah, 222static void ath9k_hw_reset_calibration(struct ath_hw *ah,
223 struct hal_cal_list *currCal) 223 struct ath9k_cal_list *currCal)
224{ 224{
225 int i; 225 int i;
226 226
@@ -241,7 +241,7 @@ static void ath9k_hw_reset_calibration(struct ath_hw *ah,
241static bool ath9k_hw_per_calibration(struct ath_hw *ah, 241static bool ath9k_hw_per_calibration(struct ath_hw *ah,
242 struct ath9k_channel *ichan, 242 struct ath9k_channel *ichan,
243 u8 rxchainmask, 243 u8 rxchainmask,
244 struct hal_cal_list *currCal) 244 struct ath9k_cal_list *currCal)
245{ 245{
246 bool iscaldone = false; 246 bool iscaldone = false;
247 247
@@ -276,7 +276,7 @@ static bool ath9k_hw_per_calibration(struct ath_hw *ah,
276 276
277/* Assumes you are talking about the currently configured channel */ 277/* Assumes you are talking about the currently configured channel */
278static bool ath9k_hw_iscal_supported(struct ath_hw *ah, 278static bool ath9k_hw_iscal_supported(struct ath_hw *ah,
279 enum hal_cal_types calType) 279 enum ath9k_cal_types calType)
280{ 280{
281 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf; 281 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
282 282
@@ -499,7 +499,7 @@ static void ath9k_hw_adc_dccal_calibrate(struct ath_hw *ah, u8 numChains)
499{ 499{
500 u32 iOddMeasOffset, iEvenMeasOffset, val, i; 500 u32 iOddMeasOffset, iEvenMeasOffset, val, i;
501 int32_t qOddMeasOffset, qEvenMeasOffset, qDcMismatch, iDcMismatch; 501 int32_t qOddMeasOffset, qEvenMeasOffset, qDcMismatch, iDcMismatch;
502 const struct hal_percal_data *calData = 502 const struct ath9k_percal_data *calData =
503 ah->cal_list_curr->calData; 503 ah->cal_list_curr->calData;
504 u32 numSamples = 504 u32 numSamples =
505 (1 << (calData->calCountMax + 5)) * calData->calNumSamples; 505 (1 << (calData->calCountMax + 5)) * calData->calNumSamples;
@@ -556,7 +556,7 @@ static void ath9k_hw_adc_dccal_calibrate(struct ath_hw *ah, u8 numChains)
556bool ath9k_hw_reset_calvalid(struct ath_hw *ah) 556bool ath9k_hw_reset_calvalid(struct ath_hw *ah)
557{ 557{
558 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf; 558 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
559 struct hal_cal_list *currCal = ah->cal_list_curr; 559 struct ath9k_cal_list *currCal = ah->cal_list_curr;
560 560
561 if (!ah->curchan) 561 if (!ah->curchan)
562 return true; 562 return true;
@@ -845,7 +845,7 @@ bool ath9k_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
845 u8 rxchainmask, bool longcal) 845 u8 rxchainmask, bool longcal)
846{ 846{
847 bool iscaldone = true; 847 bool iscaldone = true;
848 struct hal_cal_list *currCal = ah->cal_list_curr; 848 struct ath9k_cal_list *currCal = ah->cal_list_curr;
849 849
850 if (currCal && 850 if (currCal &&
851 (currCal->calState == CAL_RUNNING || 851 (currCal->calState == CAL_RUNNING ||
@@ -1008,49 +1008,49 @@ bool ath9k_hw_init_cal(struct ath_hw *ah,
1008 return true; 1008 return true;
1009} 1009}
1010 1010
1011const struct hal_percal_data iq_cal_multi_sample = { 1011const struct ath9k_percal_data iq_cal_multi_sample = {
1012 IQ_MISMATCH_CAL, 1012 IQ_MISMATCH_CAL,
1013 MAX_CAL_SAMPLES, 1013 MAX_CAL_SAMPLES,
1014 PER_MIN_LOG_COUNT, 1014 PER_MIN_LOG_COUNT,
1015 ath9k_hw_iqcal_collect, 1015 ath9k_hw_iqcal_collect,
1016 ath9k_hw_iqcalibrate 1016 ath9k_hw_iqcalibrate
1017}; 1017};
1018const struct hal_percal_data iq_cal_single_sample = { 1018const struct ath9k_percal_data iq_cal_single_sample = {
1019 IQ_MISMATCH_CAL, 1019 IQ_MISMATCH_CAL,
1020 MIN_CAL_SAMPLES, 1020 MIN_CAL_SAMPLES,
1021 PER_MAX_LOG_COUNT, 1021 PER_MAX_LOG_COUNT,
1022 ath9k_hw_iqcal_collect, 1022 ath9k_hw_iqcal_collect,
1023 ath9k_hw_iqcalibrate 1023 ath9k_hw_iqcalibrate
1024}; 1024};
1025const struct hal_percal_data adc_gain_cal_multi_sample = { 1025const struct ath9k_percal_data adc_gain_cal_multi_sample = {
1026 ADC_GAIN_CAL, 1026 ADC_GAIN_CAL,
1027 MAX_CAL_SAMPLES, 1027 MAX_CAL_SAMPLES,
1028 PER_MIN_LOG_COUNT, 1028 PER_MIN_LOG_COUNT,
1029 ath9k_hw_adc_gaincal_collect, 1029 ath9k_hw_adc_gaincal_collect,
1030 ath9k_hw_adc_gaincal_calibrate 1030 ath9k_hw_adc_gaincal_calibrate
1031}; 1031};
1032const struct hal_percal_data adc_gain_cal_single_sample = { 1032const struct ath9k_percal_data adc_gain_cal_single_sample = {
1033 ADC_GAIN_CAL, 1033 ADC_GAIN_CAL,
1034 MIN_CAL_SAMPLES, 1034 MIN_CAL_SAMPLES,
1035 PER_MAX_LOG_COUNT, 1035 PER_MAX_LOG_COUNT,
1036 ath9k_hw_adc_gaincal_collect, 1036 ath9k_hw_adc_gaincal_collect,
1037 ath9k_hw_adc_gaincal_calibrate 1037 ath9k_hw_adc_gaincal_calibrate
1038}; 1038};
1039const struct hal_percal_data adc_dc_cal_multi_sample = { 1039const struct ath9k_percal_data adc_dc_cal_multi_sample = {
1040 ADC_DC_CAL, 1040 ADC_DC_CAL,
1041 MAX_CAL_SAMPLES, 1041 MAX_CAL_SAMPLES,
1042 PER_MIN_LOG_COUNT, 1042 PER_MIN_LOG_COUNT,
1043 ath9k_hw_adc_dccal_collect, 1043 ath9k_hw_adc_dccal_collect,
1044 ath9k_hw_adc_dccal_calibrate 1044 ath9k_hw_adc_dccal_calibrate
1045}; 1045};
1046const struct hal_percal_data adc_dc_cal_single_sample = { 1046const struct ath9k_percal_data adc_dc_cal_single_sample = {
1047 ADC_DC_CAL, 1047 ADC_DC_CAL,
1048 MIN_CAL_SAMPLES, 1048 MIN_CAL_SAMPLES,
1049 PER_MAX_LOG_COUNT, 1049 PER_MAX_LOG_COUNT,
1050 ath9k_hw_adc_dccal_collect, 1050 ath9k_hw_adc_dccal_collect,
1051 ath9k_hw_adc_dccal_calibrate 1051 ath9k_hw_adc_dccal_calibrate
1052}; 1052};
1053const struct hal_percal_data adc_init_dc_cal = { 1053const struct ath9k_percal_data adc_init_dc_cal = {
1054 ADC_DC_INIT_CAL, 1054 ADC_DC_INIT_CAL,
1055 MIN_CAL_SAMPLES, 1055 MIN_CAL_SAMPLES,
1056 INIT_LOG_COUNT, 1056 INIT_LOG_COUNT,
diff --git a/drivers/net/wireless/ath/ath9k/calib.h b/drivers/net/wireless/ath/ath9k/calib.h
index ac71ed966a1b..fe5367f14148 100644
--- a/drivers/net/wireless/ath/ath9k/calib.h
+++ b/drivers/net/wireless/ath/ath9k/calib.h
@@ -17,13 +17,13 @@
17#ifndef CALIB_H 17#ifndef CALIB_H
18#define CALIB_H 18#define CALIB_H
19 19
20extern const struct hal_percal_data iq_cal_multi_sample; 20extern const struct ath9k_percal_data iq_cal_multi_sample;
21extern const struct hal_percal_data iq_cal_single_sample; 21extern const struct ath9k_percal_data iq_cal_single_sample;
22extern const struct hal_percal_data adc_gain_cal_multi_sample; 22extern const struct ath9k_percal_data adc_gain_cal_multi_sample;
23extern const struct hal_percal_data adc_gain_cal_single_sample; 23extern const struct ath9k_percal_data adc_gain_cal_single_sample;
24extern const struct hal_percal_data adc_dc_cal_multi_sample; 24extern const struct ath9k_percal_data adc_dc_cal_multi_sample;
25extern const struct hal_percal_data adc_dc_cal_single_sample; 25extern const struct ath9k_percal_data adc_dc_cal_single_sample;
26extern const struct hal_percal_data adc_init_dc_cal; 26extern const struct ath9k_percal_data adc_init_dc_cal;
27 27
28#define AR_PHY_CCA_MAX_GOOD_VALUE -85 28#define AR_PHY_CCA_MAX_GOOD_VALUE -85
29#define AR_PHY_CCA_MAX_HIGH_VALUE -62 29#define AR_PHY_CCA_MAX_HIGH_VALUE -62
@@ -67,14 +67,14 @@ struct ar5416IniArray {
67 } \ 67 } \
68 } while (0) 68 } while (0)
69 69
70enum hal_cal_types { 70enum ath9k_cal_types {
71 ADC_DC_INIT_CAL = 0x1, 71 ADC_DC_INIT_CAL = 0x1,
72 ADC_GAIN_CAL = 0x2, 72 ADC_GAIN_CAL = 0x2,
73 ADC_DC_CAL = 0x4, 73 ADC_DC_CAL = 0x4,
74 IQ_MISMATCH_CAL = 0x8 74 IQ_MISMATCH_CAL = 0x8
75}; 75};
76 76
77enum hal_cal_state { 77enum ath9k_cal_state {
78 CAL_INACTIVE, 78 CAL_INACTIVE,
79 CAL_WAITING, 79 CAL_WAITING,
80 CAL_RUNNING, 80 CAL_RUNNING,
@@ -87,18 +87,18 @@ enum hal_cal_state {
87#define PER_MIN_LOG_COUNT 2 87#define PER_MIN_LOG_COUNT 2
88#define PER_MAX_LOG_COUNT 10 88#define PER_MAX_LOG_COUNT 10
89 89
90struct hal_percal_data { 90struct ath9k_percal_data {
91 enum hal_cal_types calType; 91 enum ath9k_cal_types calType;
92 u32 calNumSamples; 92 u32 calNumSamples;
93 u32 calCountMax; 93 u32 calCountMax;
94 void (*calCollect) (struct ath_hw *); 94 void (*calCollect) (struct ath_hw *);
95 void (*calPostProc) (struct ath_hw *, u8); 95 void (*calPostProc) (struct ath_hw *, u8);
96}; 96};
97 97
98struct hal_cal_list { 98struct ath9k_cal_list {
99 const struct hal_percal_data *calData; 99 const struct ath9k_percal_data *calData;
100 enum hal_cal_state calState; 100 enum ath9k_cal_state calState;
101 struct hal_cal_list *calNext; 101 struct ath9k_cal_list *calNext;
102}; 102};
103 103
104struct ath9k_nfcal_hist { 104struct ath9k_nfcal_hist {
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 7e37570608bc..ab3412672e36 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -436,14 +436,14 @@ struct ath_hw {
436 enum ath9k_ant_setting diversity_control; 436 enum ath9k_ant_setting diversity_control;
437 437
438 /* Calibration */ 438 /* Calibration */
439 enum hal_cal_types supp_cals; 439 enum ath9k_cal_types supp_cals;
440 struct hal_cal_list iq_caldata; 440 struct ath9k_cal_list iq_caldata;
441 struct hal_cal_list adcgain_caldata; 441 struct ath9k_cal_list adcgain_caldata;
442 struct hal_cal_list adcdc_calinitdata; 442 struct ath9k_cal_list adcdc_calinitdata;
443 struct hal_cal_list adcdc_caldata; 443 struct ath9k_cal_list adcdc_caldata;
444 struct hal_cal_list *cal_list; 444 struct ath9k_cal_list *cal_list;
445 struct hal_cal_list *cal_list_last; 445 struct ath9k_cal_list *cal_list_last;
446 struct hal_cal_list *cal_list_curr; 446 struct ath9k_cal_list *cal_list_curr;
447#define totalPowerMeasI meas0.unsign 447#define totalPowerMeasI meas0.unsign
448#define totalPowerMeasQ meas1.unsign 448#define totalPowerMeasQ meas1.unsign
449#define totalIqCorrMeas meas2.sign 449#define totalIqCorrMeas meas2.sign