aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/hw.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-08-14 03:57:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-29 16:24:04 -0400
commitff9b662dab1fcd885fb728de3a8c13ebb5455117 (patch)
treef07e329f9a9f4f446f407318fd1694d3df84f6d9 /drivers/net/wireless/ath9k/hw.c
parentdc2222a85fd63103b9aad0d4b77c4d87b78c58a2 (diff)
ath9k: Miscellaneous fixes
This patch removes ath_vap_listen() and dma wrapper macros. Also, Inline abuse is cleaned up and a few typos are fixed. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath9k/hw.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c
index 7d8c908d69d5..47c60acac41f 100644
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
@@ -348,7 +348,7 @@ static void ath9k_hw_set_defaults(struct ath_hal *ah)
348 ah->ah_config.intr_mitigation = 0; 348 ah->ah_config.intr_mitigation = 0;
349} 349}
350 350
351static inline void ath9k_hw_override_ini(struct ath_hal *ah, 351static void ath9k_hw_override_ini(struct ath_hal *ah,
352 struct ath9k_channel *chan) 352 struct ath9k_channel *chan)
353{ 353{
354 if (!AR_SREV_5416_V20_OR_LATER(ah) 354 if (!AR_SREV_5416_V20_OR_LATER(ah)
@@ -358,8 +358,8 @@ static inline void ath9k_hw_override_ini(struct ath_hal *ah,
358 REG_WRITE(ah, 0x9800 + (651 << 2), 0x11); 358 REG_WRITE(ah, 0x9800 + (651 << 2), 0x11);
359} 359}
360 360
361static inline void ath9k_hw_init_bb(struct ath_hal *ah, 361static void ath9k_hw_init_bb(struct ath_hal *ah,
362 struct ath9k_channel *chan) 362 struct ath9k_channel *chan)
363{ 363{
364 u32 synthDelay; 364 u32 synthDelay;
365 365
@@ -374,8 +374,8 @@ static inline void ath9k_hw_init_bb(struct ath_hal *ah,
374 udelay(synthDelay + BASE_ACTIVATE_DELAY); 374 udelay(synthDelay + BASE_ACTIVATE_DELAY);
375} 375}
376 376
377static inline void ath9k_hw_init_interrupt_masks(struct ath_hal *ah, 377static void ath9k_hw_init_interrupt_masks(struct ath_hal *ah,
378 enum ath9k_opmode opmode) 378 enum ath9k_opmode opmode)
379{ 379{
380 struct ath_hal_5416 *ahp = AH5416(ah); 380 struct ath_hal_5416 *ahp = AH5416(ah);
381 381
@@ -405,7 +405,7 @@ static inline void ath9k_hw_init_interrupt_masks(struct ath_hal *ah,
405 } 405 }
406} 406}
407 407
408static inline void ath9k_hw_init_qos(struct ath_hal *ah) 408static void ath9k_hw_init_qos(struct ath_hal *ah)
409{ 409{
410 REG_WRITE(ah, AR_MIC_QOS_CONTROL, 0x100aa); 410 REG_WRITE(ah, AR_MIC_QOS_CONTROL, 0x100aa);
411 REG_WRITE(ah, AR_MIC_QOS_SELECT, 0x3210); 411 REG_WRITE(ah, AR_MIC_QOS_SELECT, 0x3210);
@@ -500,7 +500,7 @@ static inline bool ath9k_hw_nvram_read(struct ath_hal *ah,
500 return ath9k_hw_eeprom_read(ah, off, data); 500 return ath9k_hw_eeprom_read(ah, off, data);
501} 501}
502 502
503static inline bool ath9k_hw_fill_eeprom(struct ath_hal *ah) 503static bool ath9k_hw_fill_eeprom(struct ath_hal *ah)
504{ 504{
505 struct ath_hal_5416 *ahp = AH5416(ah); 505 struct ath_hal_5416 *ahp = AH5416(ah);
506 struct ar5416_eeprom *eep = &ahp->ah_eeprom; 506 struct ar5416_eeprom *eep = &ahp->ah_eeprom;
@@ -767,7 +767,7 @@ ath9k_hw_eeprom_set_board_values(struct ath_hal *ah,
767 return true; 767 return true;
768} 768}
769 769
770static inline int ath9k_hw_check_eeprom(struct ath_hal *ah) 770static int ath9k_hw_check_eeprom(struct ath_hal *ah)
771{ 771{
772 u32 sum = 0, el; 772 u32 sum = 0, el;
773 u16 *eepdata; 773 u16 *eepdata;
@@ -1272,7 +1272,7 @@ u32 ath9k_hw_get_eeprom(struct ath_hal_5416 *ahp,
1272 } 1272 }
1273} 1273}
1274 1274
1275static inline int ath9k_hw_get_radiorev(struct ath_hal *ah) 1275static int ath9k_hw_get_radiorev(struct ath_hal *ah)
1276{ 1276{
1277 u32 val; 1277 u32 val;
1278 int i; 1278 int i;
@@ -1285,7 +1285,7 @@ static inline int ath9k_hw_get_radiorev(struct ath_hal *ah)
1285 return ath9k_hw_reverse_bits(val, 8); 1285 return ath9k_hw_reverse_bits(val, 8);
1286} 1286}
1287 1287
1288static inline int ath9k_hw_init_macaddr(struct ath_hal *ah) 1288static int ath9k_hw_init_macaddr(struct ath_hal *ah)
1289{ 1289{
1290 u32 sum; 1290 u32 sum;
1291 int i; 1291 int i;
@@ -1367,7 +1367,7 @@ static u16 ath9k_hw_eeprom_get_spur_chan(struct ath_hal *ah,
1367 return spur_val; 1367 return spur_val;
1368} 1368}
1369 1369
1370static inline int ath9k_hw_rfattach(struct ath_hal *ah) 1370static int ath9k_hw_rfattach(struct ath_hal *ah)
1371{ 1371{
1372 bool rfStatus = false; 1372 bool rfStatus = false;
1373 int ecode = 0; 1373 int ecode = 0;
@@ -1412,8 +1412,8 @@ static int ath9k_hw_rf_claim(struct ath_hal *ah)
1412 return 0; 1412 return 0;
1413} 1413}
1414 1414
1415static inline void ath9k_hw_init_pll(struct ath_hal *ah, 1415static void ath9k_hw_init_pll(struct ath_hal *ah,
1416 struct ath9k_channel *chan) 1416 struct ath9k_channel *chan)
1417{ 1417{
1418 u32 pll; 1418 u32 pll;
1419 1419
@@ -1531,7 +1531,7 @@ static void ath9k_hw_set_operating_mode(struct ath_hal *ah, int opmode)
1531 } 1531 }
1532} 1532}
1533 1533
1534static inline void 1534static void
1535ath9k_hw_set_rfmode(struct ath_hal *ah, struct ath9k_channel *chan) 1535ath9k_hw_set_rfmode(struct ath_hal *ah, struct ath9k_channel *chan)
1536{ 1536{
1537 u32 rfMode = 0; 1537 u32 rfMode = 0;
@@ -1601,7 +1601,7 @@ static bool ath9k_hw_set_reset(struct ath_hal *ah, int type)
1601 return true; 1601 return true;
1602} 1602}
1603 1603
1604static inline bool ath9k_hw_set_reset_power_on(struct ath_hal *ah) 1604static bool ath9k_hw_set_reset_power_on(struct ath_hal *ah)
1605{ 1605{
1606 REG_WRITE(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN | 1606 REG_WRITE(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN |
1607 AR_RTC_FORCE_WAKE_ON_INT); 1607 AR_RTC_FORCE_WAKE_ON_INT);
@@ -1642,7 +1642,7 @@ static bool ath9k_hw_set_reset_reg(struct ath_hal *ah,
1642 } 1642 }
1643} 1643}
1644 1644
1645static inline 1645static
1646struct ath9k_channel *ath9k_hw_check_chan(struct ath_hal *ah, 1646struct ath9k_channel *ath9k_hw_check_chan(struct ath_hal *ah,
1647 struct ath9k_channel *chan) 1647 struct ath9k_channel *chan)
1648{ 1648{
@@ -2076,7 +2076,7 @@ static void ath9k_hw_ani_attach(struct ath_hal *ah)
2076 ahp->ah_procPhyErr |= HAL_PROCESS_ANI; 2076 ahp->ah_procPhyErr |= HAL_PROCESS_ANI;
2077} 2077}
2078 2078
2079static inline void ath9k_hw_ani_setup(struct ath_hal *ah) 2079static void ath9k_hw_ani_setup(struct ath_hal *ah)
2080{ 2080{
2081 struct ath_hal_5416 *ahp = AH5416(ah); 2081 struct ath_hal_5416 *ahp = AH5416(ah);
2082 int i; 2082 int i;
@@ -2861,7 +2861,7 @@ static u32 ath9k_hw_gpio_get(struct ath_hal *ah, u32 gpio)
2861 } 2861 }
2862} 2862}
2863 2863
2864static inline int ath9k_hw_post_attach(struct ath_hal *ah) 2864static int ath9k_hw_post_attach(struct ath_hal *ah)
2865{ 2865{
2866 int ecode; 2866 int ecode;
2867 2867
@@ -3573,7 +3573,7 @@ static inline bool ath9k_hw_fill_vpd_table(u8 pwrMin,
3573 return true; 3573 return true;
3574} 3574}
3575 3575
3576static inline void 3576static void
3577ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hal *ah, 3577ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hal *ah,
3578 struct ath9k_channel *chan, 3578 struct ath9k_channel *chan,
3579 struct cal_data_per_freq *pRawDataSet, 3579 struct cal_data_per_freq *pRawDataSet,
@@ -3755,7 +3755,7 @@ ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hal *ah,
3755 return; 3755 return;
3756} 3756}
3757 3757
3758static inline bool 3758static bool
3759ath9k_hw_set_power_cal_table(struct ath_hal *ah, 3759ath9k_hw_set_power_cal_table(struct ath_hal *ah,
3760 struct ar5416_eeprom *pEepData, 3760 struct ar5416_eeprom *pEepData,
3761 struct ath9k_channel *chan, 3761 struct ath9k_channel *chan,
@@ -3958,7 +3958,7 @@ void ath9k_hw_configpcipowersave(struct ath_hal *ah, int restore)
3958 } 3958 }
3959} 3959}
3960 3960
3961static inline void 3961static void
3962ath9k_hw_get_legacy_target_powers(struct ath_hal *ah, 3962ath9k_hw_get_legacy_target_powers(struct ath_hal *ah,
3963 struct ath9k_channel *chan, 3963 struct ath9k_channel *chan,
3964 struct cal_target_power_leg *powInfo, 3964 struct cal_target_power_leg *powInfo,
@@ -4024,7 +4024,7 @@ ath9k_hw_get_legacy_target_powers(struct ath_hal *ah,
4024 } 4024 }
4025} 4025}
4026 4026
4027static inline void 4027static void
4028ath9k_hw_get_target_powers(struct ath_hal *ah, 4028ath9k_hw_get_target_powers(struct ath_hal *ah,
4029 struct ath9k_channel *chan, 4029 struct ath9k_channel *chan,
4030 struct cal_target_power_ht *powInfo, 4030 struct cal_target_power_ht *powInfo,
@@ -4091,7 +4091,7 @@ ath9k_hw_get_target_powers(struct ath_hal *ah,
4091 } 4091 }
4092} 4092}
4093 4093
4094static inline u16 4094static u16
4095ath9k_hw_get_max_edge_power(u16 freq, 4095ath9k_hw_get_max_edge_power(u16 freq,
4096 struct cal_ctl_edges *pRdEdgesPower, 4096 struct cal_ctl_edges *pRdEdgesPower,
4097 bool is2GHz) 4097 bool is2GHz)
@@ -4121,7 +4121,7 @@ ath9k_hw_get_max_edge_power(u16 freq,
4121 return twiceMaxEdgePower; 4121 return twiceMaxEdgePower;
4122} 4122}
4123 4123
4124static inline bool 4124static bool
4125ath9k_hw_set_power_per_rate_table(struct ath_hal *ah, 4125ath9k_hw_set_power_per_rate_table(struct ath_hal *ah,
4126 struct ar5416_eeprom *pEepData, 4126 struct ar5416_eeprom *pEepData,
4127 struct ath9k_channel *chan, 4127 struct ath9k_channel *chan,
@@ -5100,7 +5100,7 @@ static void ath9k_hw_spur_mitigate(struct ath_hal *ah,
5100 REG_WRITE(ah, AR_PHY_MASK2_P_61_45, tmp_mask); 5100 REG_WRITE(ah, AR_PHY_MASK2_P_61_45, tmp_mask);
5101} 5101}
5102 5102
5103static inline void ath9k_hw_init_chain_masks(struct ath_hal *ah) 5103static void ath9k_hw_init_chain_masks(struct ath_hal *ah)
5104{ 5104{
5105 struct ath_hal_5416 *ahp = AH5416(ah); 5105 struct ath_hal_5416 *ahp = AH5416(ah);
5106 int rx_chainmask, tx_chainmask; 5106 int rx_chainmask, tx_chainmask;
@@ -5304,7 +5304,7 @@ bool ath9k_hw_setslottime(struct ath_hal *ah, u32 us)
5304 } 5304 }
5305} 5305}
5306 5306
5307static inline void ath9k_hw_init_user_settings(struct ath_hal *ah) 5307static void ath9k_hw_init_user_settings(struct ath_hal *ah)
5308{ 5308{
5309 struct ath_hal_5416 *ahp = AH5416(ah); 5309 struct ath_hal_5416 *ahp = AH5416(ah);
5310 5310
@@ -5323,7 +5323,7 @@ static inline void ath9k_hw_init_user_settings(struct ath_hal *ah)
5323 ath9k_hw_set_global_txtimeout(ah, ahp->ah_globaltxtimeout); 5323 ath9k_hw_set_global_txtimeout(ah, ahp->ah_globaltxtimeout);
5324} 5324}
5325 5325
5326static inline int 5326static int
5327ath9k_hw_process_ini(struct ath_hal *ah, 5327ath9k_hw_process_ini(struct ath_hal *ah,
5328 struct ath9k_channel *chan, 5328 struct ath9k_channel *chan,
5329 enum ath9k_ht_macmode macmode) 5329 enum ath9k_ht_macmode macmode)
@@ -5454,7 +5454,7 @@ ath9k_hw_process_ini(struct ath_hal *ah,
5454 return 0; 5454 return 0;
5455} 5455}
5456 5456
5457static inline void ath9k_hw_setup_calibration(struct ath_hal *ah, 5457static void ath9k_hw_setup_calibration(struct ath_hal *ah,
5458 struct hal_cal_list *currCal) 5458 struct hal_cal_list *currCal)
5459{ 5459{
5460 REG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4(0), 5460 REG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4(0),
@@ -5490,8 +5490,8 @@ static inline void ath9k_hw_setup_calibration(struct ath_hal *ah,
5490 AR_PHY_TIMING_CTRL4_DO_CAL); 5490 AR_PHY_TIMING_CTRL4_DO_CAL);
5491} 5491}
5492 5492
5493static inline void ath9k_hw_reset_calibration(struct ath_hal *ah, 5493static void ath9k_hw_reset_calibration(struct ath_hal *ah,
5494 struct hal_cal_list *currCal) 5494 struct hal_cal_list *currCal)
5495{ 5495{
5496 struct ath_hal_5416 *ahp = AH5416(ah); 5496 struct ath_hal_5416 *ahp = AH5416(ah);
5497 int i; 5497 int i;
@@ -5510,7 +5510,7 @@ static inline void ath9k_hw_reset_calibration(struct ath_hal *ah,
5510 ahp->ah_CalSamples = 0; 5510 ahp->ah_CalSamples = 0;
5511} 5511}
5512 5512
5513static inline void 5513static void
5514ath9k_hw_per_calibration(struct ath_hal *ah, 5514ath9k_hw_per_calibration(struct ath_hal *ah,
5515 struct ath9k_channel *ichan, 5515 struct ath9k_channel *ichan,
5516 u8 rxchainmask, 5516 u8 rxchainmask,
@@ -5600,7 +5600,7 @@ static inline bool ath9k_hw_run_init_cals(struct ath_hal *ah,
5600 return true; 5600 return true;
5601} 5601}
5602 5602
5603static inline bool 5603static bool
5604ath9k_hw_channel_change(struct ath_hal *ah, 5604ath9k_hw_channel_change(struct ath_hal *ah,
5605 struct ath9k_channel *chan, 5605 struct ath9k_channel *chan,
5606 enum ath9k_ht_macmode macmode) 5606 enum ath9k_ht_macmode macmode)
@@ -5777,8 +5777,8 @@ static bool ath9k_hw_iscal_supported(struct ath_hal *ah,
5777 return retval; 5777 return retval;
5778} 5778}
5779 5779
5780static inline bool ath9k_hw_init_cal(struct ath_hal *ah, 5780static bool ath9k_hw_init_cal(struct ath_hal *ah,
5781 struct ath9k_channel *chan) 5781 struct ath9k_channel *chan)
5782{ 5782{
5783 struct ath_hal_5416 *ahp = AH5416(ah); 5783 struct ath_hal_5416 *ahp = AH5416(ah);
5784 struct ath9k_channel *ichan = 5784 struct ath9k_channel *ichan =