Home
last modified time | relevance | path

Searched refs:ah (Results 1 – 25 of 266) sorted by relevance

1234567891011

/linux-6.1.9/drivers/net/wireless/ath/ath9k/
Dar9003_hw.c41 static void ar9003_hw_init_mode_regs(struct ath_hw *ah) in ar9003_hw_init_mode_regs() argument
43 if (AR_SREV_9330_11(ah)) { in ar9003_hw_init_mode_regs()
45 INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], in ar9003_hw_init_mode_regs()
47 INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], in ar9003_hw_init_mode_regs()
51 INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], in ar9003_hw_init_mode_regs()
53 INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], in ar9003_hw_init_mode_regs()
57 INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], in ar9003_hw_init_mode_regs()
61 INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], in ar9003_hw_init_mode_regs()
63 INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], in ar9003_hw_init_mode_regs()
67 INIT_INI_ARRAY(&ah->iniModesRxGain, in ar9003_hw_init_mode_regs()
[all …]
Dhw-ops.h24 static inline void ath9k_hw_configpcipowersave(struct ath_hw *ah, in ath9k_hw_configpcipowersave() argument
27 if (!ah->aspm_enabled) in ath9k_hw_configpcipowersave()
30 ath9k_hw_ops(ah)->config_pci_powersave(ah, power_off); in ath9k_hw_configpcipowersave()
33 static inline void ath9k_hw_rxena(struct ath_hw *ah) in ath9k_hw_rxena() argument
35 ath9k_hw_ops(ah)->rx_enable(ah); in ath9k_hw_rxena()
38 static inline void ath9k_hw_set_desc_link(struct ath_hw *ah, void *ds, in ath9k_hw_set_desc_link() argument
41 ath9k_hw_ops(ah)->set_desc_link(ds, link); in ath9k_hw_set_desc_link()
44 static inline int ath9k_hw_calibrate(struct ath_hw *ah, in ath9k_hw_calibrate() argument
48 return ath9k_hw_ops(ah)->calibrate(ah, chan, rxchainmask, longcal); in ath9k_hw_calibrate()
51 static inline bool ath9k_hw_getisr(struct ath_hw *ah, enum ath9k_int *masked, in ath9k_hw_getisr() argument
[all …]
Dhw.c33 static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type);
39 static void ath9k_hw_set_clockrate(struct ath_hw *ah) in ath9k_hw_set_clockrate() argument
41 struct ath_common *common = ath9k_hw_common(ah); in ath9k_hw_set_clockrate()
42 struct ath9k_channel *chan = ah->curchan; in ath9k_hw_set_clockrate()
46 if (AR_SREV_9287(ah) && AR_SREV_9287_13_OR_LATER(ah)) in ath9k_hw_set_clockrate()
52 else if (ah->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK) in ath9k_hw_set_clockrate()
69 static u32 ath9k_hw_mac_to_clks(struct ath_hw *ah, u32 usecs) in ath9k_hw_mac_to_clks() argument
71 struct ath_common *common = ath9k_hw_common(ah); in ath9k_hw_mac_to_clks()
76 bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout) in ath9k_hw_wait() argument
83 if ((REG_READ(ah, reg) & mask) == val) in ath9k_hw_wait()
[all …]
Dar9002_hw.c26 static int ar9002_hw_init_mode_regs(struct ath_hw *ah) in ar9002_hw_init_mode_regs() argument
28 if (AR_SREV_9271(ah)) { in ar9002_hw_init_mode_regs()
29 INIT_INI_ARRAY(&ah->iniModes, ar9271Modes_9271); in ar9002_hw_init_mode_regs()
30 INIT_INI_ARRAY(&ah->iniCommon, ar9271Common_9271); in ar9002_hw_init_mode_regs()
31 INIT_INI_ARRAY(&ah->iniModes_9271_ANI_reg, ar9271Modes_9271_ANI_reg); in ar9002_hw_init_mode_regs()
35 INIT_INI_ARRAY(&ah->iniPcieSerdes, in ar9002_hw_init_mode_regs()
38 if (AR_SREV_9287_11_OR_LATER(ah)) { in ar9002_hw_init_mode_regs()
39 INIT_INI_ARRAY(&ah->iniModes, ar9287Modes_9287_1_1); in ar9002_hw_init_mode_regs()
40 INIT_INI_ARRAY(&ah->iniCommon, ar9287Common_9287_1_1); in ar9002_hw_init_mode_regs()
41 } else if (AR_SREV_9285_12_OR_LATER(ah)) { in ar9002_hw_init_mode_regs()
[all …]
Dar9002_calib.c31 static bool ar9002_hw_is_cal_supported(struct ath_hw *ah, in ar9002_hw_is_cal_supported() argument
36 switch (ah->supp_cals & cal_type) { in ar9002_hw_is_cal_supported()
50 static void ar9002_hw_setup_calibration(struct ath_hw *ah, in ar9002_hw_setup_calibration() argument
53 struct ath_common *common = ath9k_hw_common(ah); in ar9002_hw_setup_calibration()
55 REG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4(0), in ar9002_hw_setup_calibration()
61 REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_IQ); in ar9002_hw_setup_calibration()
66 REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_ADC_GAIN); in ar9002_hw_setup_calibration()
70 REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_ADC_DC_PER); in ar9002_hw_setup_calibration()
75 REG_SET_BIT(ah, AR_PHY_TIMING_CTRL4(0), in ar9002_hw_setup_calibration()
79 static bool ar9002_hw_per_calibration(struct ath_hw *ah, in ar9002_hw_per_calibration() argument
[all …]
Dar9003_phy.c149 static int ar9003_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan) in ar9003_hw_set_channel() argument
156 ath9k_hw_get_channel_centers(ah, chan, &centers); in ar9003_hw_set_channel()
160 if (AR_SREV_9330(ah) || AR_SREV_9485(ah) || in ar9003_hw_set_channel()
161 AR_SREV_9531(ah) || AR_SREV_9550(ah) || in ar9003_hw_set_channel()
162 AR_SREV_9561(ah) || AR_SREV_9565(ah)) { in ar9003_hw_set_channel()
163 if (ah->is_clk_25mhz) in ar9003_hw_set_channel()
171 } else if (AR_SREV_9340(ah)) { in ar9003_hw_set_channel()
172 if (ah->is_clk_25mhz) { in ar9003_hw_set_channel()
185 if ((AR_SREV_9340(ah) || AR_SREV_9550(ah) || in ar9003_hw_set_channel()
186 AR_SREV_9531(ah) || AR_SREV_9561(ah)) && in ar9003_hw_set_channel()
[all …]
Dar9003_mci.c24 static void ar9003_mci_reset_req_wakeup(struct ath_hw *ah) in ar9003_mci_reset_req_wakeup() argument
26 REG_RMW_FIELD(ah, AR_MCI_COMMAND2, in ar9003_mci_reset_req_wakeup()
29 REG_RMW_FIELD(ah, AR_MCI_COMMAND2, in ar9003_mci_reset_req_wakeup()
33 static int ar9003_mci_wait_for_interrupt(struct ath_hw *ah, u32 address, in ar9003_mci_wait_for_interrupt() argument
36 struct ath_common *common = ath9k_hw_common(ah); in ar9003_mci_wait_for_interrupt()
39 if (!(REG_READ(ah, address) & bit_position)) { in ar9003_mci_wait_for_interrupt()
48 REG_WRITE(ah, address, bit_position); in ar9003_mci_wait_for_interrupt()
54 ar9003_mci_reset_req_wakeup(ah); in ar9003_mci_wait_for_interrupt()
58 REG_WRITE(ah, AR_MCI_INTERRUPT_RAW, in ar9003_mci_wait_for_interrupt()
61 REG_WRITE(ah, AR_MCI_INTERRUPT_RAW, AR_MCI_INTERRUPT_RX_MSG); in ar9003_mci_wait_for_interrupt()
[all …]
Dani.c107 static void ath9k_hw_update_mibstats(struct ath_hw *ah, in ath9k_hw_update_mibstats() argument
114 REG_READ_MULTI(ah, &addr[0], &data[0], 5); in ath9k_hw_update_mibstats()
127 static void ath9k_ani_restart(struct ath_hw *ah) in ath9k_ani_restart() argument
129 struct ar5416AniState *aniState = &ah->ani; in ath9k_ani_restart()
133 ENABLE_REGWRITE_BUFFER(ah); in ath9k_ani_restart()
135 REG_WRITE(ah, AR_PHY_ERR_1, 0); in ath9k_ani_restart()
136 REG_WRITE(ah, AR_PHY_ERR_2, 0); in ath9k_ani_restart()
137 REG_WRITE(ah, AR_PHY_ERR_MASK_1, AR_PHY_ERR_OFDM_TIMING); in ath9k_ani_restart()
138 REG_WRITE(ah, AR_PHY_ERR_MASK_2, AR_PHY_ERR_CCK_TIMING); in ath9k_ani_restart()
140 REGWRITE_BUFFER_FLUSH(ah); in ath9k_ani_restart()
[all …]
Dbtcoex.c59 void ath9k_hw_init_btcoex_hw(struct ath_hw *ah, int qnum) in ath9k_hw_init_btcoex_hw() argument
61 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw; in ath9k_hw_init_btcoex_hw()
79 if (AR_SREV_9300_20_OR_LATER(ah)) in ath9k_hw_init_btcoex_hw()
82 if (AR_SREV_SOC(ah)) { in ath9k_hw_init_btcoex_hw()
114 static void ath9k_hw_btcoex_pin_init(struct ath_hw *ah, u8 wlanactive_gpio, in ath9k_hw_btcoex_pin_init() argument
117 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw; in ath9k_hw_btcoex_pin_init()
118 struct ath9k_platform_data *pdata = ah->dev->platform_data; in ath9k_hw_btcoex_pin_init()
137 void ath9k_hw_btcoex_init_scheme(struct ath_hw *ah) in ath9k_hw_btcoex_init_scheme() argument
139 struct ath_common *common = ath9k_hw_common(ah); in ath9k_hw_btcoex_init_scheme()
140 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw; in ath9k_hw_btcoex_init_scheme()
[all …]
Dar5008_phy.c89 static void ar5008_write_bank6(struct ath_hw *ah, unsigned int *writecnt) in ar5008_write_bank6() argument
91 struct ar5416IniArray *array = &ah->iniBank6; in ar5008_write_bank6()
92 u32 *data = ah->analogBank6Data; in ar5008_write_bank6()
95 ENABLE_REGWRITE_BUFFER(ah); in ar5008_write_bank6()
98 REG_WRITE(ah, INI_RA(array, r, 0), data[r]); in ar5008_write_bank6()
102 REGWRITE_BUFFER_FLUSH(ah); in ar5008_write_bank6()
164 static void ar5008_hw_force_bias(struct ath_hw *ah, u16 synth_freq) in ar5008_hw_force_bias() argument
166 struct ath_common *common = ath9k_hw_common(ah); in ar5008_hw_force_bias()
171 if (!AR_SREV_5416(ah) || synth_freq >= 3000) in ar5008_hw_force_bias()
174 BUG_ON(AR_SREV_9280_20_OR_LATER(ah)); in ar5008_hw_force_bias()
[all …]
Dmac.c21 static void ath9k_hw_set_txq_interrupts(struct ath_hw *ah, in ath9k_hw_set_txq_interrupts() argument
24 ath_dbg(ath9k_hw_common(ah), INTERRUPT, in ath9k_hw_set_txq_interrupts()
26 ah->txok_interrupt_mask, ah->txerr_interrupt_mask, in ath9k_hw_set_txq_interrupts()
27 ah->txdesc_interrupt_mask, ah->txeol_interrupt_mask, in ath9k_hw_set_txq_interrupts()
28 ah->txurn_interrupt_mask); in ath9k_hw_set_txq_interrupts()
30 ENABLE_REGWRITE_BUFFER(ah); in ath9k_hw_set_txq_interrupts()
32 REG_WRITE(ah, AR_IMR_S0, in ath9k_hw_set_txq_interrupts()
33 SM(ah->txok_interrupt_mask, AR_IMR_S0_QCU_TXOK) in ath9k_hw_set_txq_interrupts()
34 | SM(ah->txdesc_interrupt_mask, AR_IMR_S0_QCU_TXDESC)); in ath9k_hw_set_txq_interrupts()
35 REG_WRITE(ah, AR_IMR_S1, in ath9k_hw_set_txq_interrupts()
[all …]
Dar9003_rtt.c38 void ar9003_hw_rtt_enable(struct ath_hw *ah) in ar9003_hw_rtt_enable() argument
40 REG_WRITE(ah, AR_PHY_RTT_CTRL, 1); in ar9003_hw_rtt_enable()
43 void ar9003_hw_rtt_disable(struct ath_hw *ah) in ar9003_hw_rtt_disable() argument
45 REG_WRITE(ah, AR_PHY_RTT_CTRL, 0); in ar9003_hw_rtt_disable()
48 void ar9003_hw_rtt_set_mask(struct ath_hw *ah, u32 rtt_mask) in ar9003_hw_rtt_set_mask() argument
50 REG_RMW_FIELD(ah, AR_PHY_RTT_CTRL, in ar9003_hw_rtt_set_mask()
54 bool ar9003_hw_rtt_force_restore(struct ath_hw *ah) in ar9003_hw_rtt_force_restore() argument
56 if (!ath9k_hw_wait(ah, AR_PHY_RTT_CTRL, in ar9003_hw_rtt_force_restore()
61 REG_RMW_FIELD(ah, AR_PHY_RTT_CTRL, in ar9003_hw_rtt_force_restore()
64 if (!ath9k_hw_wait(ah, AR_PHY_RTT_CTRL, in ar9003_hw_rtt_force_restore()
[all …]
Dar9003_wow.c23 static void ath9k_hw_set_sta_powersave(struct ath_hw *ah) in ath9k_hw_set_sta_powersave() argument
25 if (!ath9k_hw_mci_is_enabled(ah)) in ath9k_hw_set_sta_powersave()
31 if (ar9003_mci_state(ah, MCI_STATE_GET_WLAN_PS_STATE) != MCI_PS_DISABLE) in ath9k_hw_set_sta_powersave()
34 REG_SET_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV); in ath9k_hw_set_sta_powersave()
37 static void ath9k_hw_set_powermode_wow_sleep(struct ath_hw *ah) in ath9k_hw_set_powermode_wow_sleep() argument
39 struct ath_common *common = ath9k_hw_common(ah); in ath9k_hw_set_powermode_wow_sleep()
41 ath9k_hw_set_sta_powersave(ah); in ath9k_hw_set_powermode_wow_sleep()
44 REG_WRITE(ah, AR_CR, AR_CR_RXD); in ath9k_hw_set_powermode_wow_sleep()
46 if (!ath9k_hw_wait(ah, AR_CR, AR_CR_RXE, 0, AH_WAIT_TIMEOUT)) { in ath9k_hw_set_powermode_wow_sleep()
48 REG_READ(ah, AR_CR), REG_READ(ah, AR_DIAG_SW)); in ath9k_hw_set_powermode_wow_sleep()
[all …]
Dar9002_phy.c66 static int ar9002_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan) in ar9002_hw_set_channel() argument
73 ath9k_hw_get_channel_centers(ah, chan, &centers); in ar9002_hw_set_channel()
76 reg32 = REG_READ(ah, AR_PHY_SYNTH_CONTROL); in ar9002_hw_set_channel()
88 if (AR_SREV_9287_11_OR_LATER(ah)) { in ar9002_hw_set_channel()
91 REG_WRITE_ARRAY(&ah->iniCckfirJapan2484, in ar9002_hw_set_channel()
94 REG_WRITE_ARRAY(&ah->iniCckfirNormal, in ar9002_hw_set_channel()
98 txctl = REG_READ(ah, AR_PHY_CCK_TX_CTRL); in ar9002_hw_set_channel()
101 REG_WRITE(ah, AR_PHY_CCK_TX_CTRL, in ar9002_hw_set_channel()
104 REG_WRITE(ah, AR_PHY_CCK_TX_CTRL, in ar9002_hw_set_channel()
112 switch (ah->eep_ops->get_eeprom(ah, EEP_FRAC_N_5G)) { in ar9002_hw_set_channel()
[all …]
Dar9003_calib.c38 static void ar9003_hw_setup_calibration(struct ath_hw *ah, in ar9003_hw_setup_calibration() argument
41 struct ath_common *common = ath9k_hw_common(ah); in ar9003_hw_setup_calibration()
50 REG_RMW_FIELD(ah, AR_PHY_TIMING4, in ar9003_hw_setup_calibration()
53 REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_IQ); in ar9003_hw_setup_calibration()
59 REG_SET_BIT(ah, AR_PHY_TIMING4, AR_PHY_TIMING4_DO_CAL); in ar9003_hw_setup_calibration()
72 static bool ar9003_hw_per_calibration(struct ath_hw *ah, in ar9003_hw_per_calibration() argument
77 struct ath9k_hw_cal_data *caldata = ah->caldata; in ar9003_hw_per_calibration()
83 if (REG_READ(ah, AR_PHY_TIMING4) & AR_PHY_TIMING4_DO_CAL) in ar9003_hw_per_calibration()
89 cur_caldata->calCollect(ah); in ar9003_hw_per_calibration()
90 ah->cal_samples++; in ar9003_hw_per_calibration()
[all …]
/linux-6.1.9/drivers/net/wireless/ath/ath5k/
Dattach.c35 static int ath5k_hw_post(struct ath5k_hw *ah) in ath5k_hw_post() argument
54 init_val = ath5k_hw_reg_read(ah, cur_reg); in ath5k_hw_post()
58 ath5k_hw_reg_write(ah, var_pattern, cur_reg); in ath5k_hw_post()
59 cur_val = ath5k_hw_reg_read(ah, cur_reg); in ath5k_hw_post()
62 ATH5K_ERR(ah, "POST Failed !!!\n"); in ath5k_hw_post()
68 ath5k_hw_reg_write(ah, var_pattern, cur_reg); in ath5k_hw_post()
73 ath5k_hw_reg_write(ah, var_pattern, cur_reg); in ath5k_hw_post()
74 cur_val = ath5k_hw_reg_read(ah, cur_reg); in ath5k_hw_post()
77 ATH5K_ERR(ah, "POST Failed !!!\n"); in ath5k_hw_post()
83 ath5k_hw_reg_write(ah, var_pattern, cur_reg); in ath5k_hw_post()
[all …]
Dreset.c67 ath5k_hw_register_timeout(struct ath5k_hw *ah, u32 reg, u32 flag, u32 val, in ath5k_hw_register_timeout() argument
74 data = ath5k_hw_reg_read(ah, reg); in ath5k_hw_register_timeout()
101 ath5k_hw_htoclock(struct ath5k_hw *ah, unsigned int usec) in ath5k_hw_htoclock() argument
103 struct ath_common *common = ath5k_hw_common(ah); in ath5k_hw_htoclock()
118 ath5k_hw_clocktoh(struct ath5k_hw *ah, unsigned int clock) in ath5k_hw_clocktoh() argument
120 struct ath_common *common = ath5k_hw_common(ah); in ath5k_hw_clocktoh()
132 ath5k_hw_init_core_clock(struct ath5k_hw *ah) in ath5k_hw_init_core_clock() argument
134 struct ieee80211_channel *channel = ah->ah_current_channel; in ath5k_hw_init_core_clock()
135 struct ath_common *common = ath5k_hw_common(ah); in ath5k_hw_init_core_clock()
156 switch (ah->ah_bwmode) { in ath5k_hw_init_core_clock()
[all …]
Dani.c66 ath5k_ani_set_noise_immunity_level(struct ath5k_hw *ah, int level) in ath5k_ani_set_noise_immunity_level() argument
86 ATH5K_ERR(ah, "noise immunity level %d out of range", in ath5k_ani_set_noise_immunity_level()
91 AR5K_REG_WRITE_BITS(ah, AR5K_PHY_DESIRED_SIZE, in ath5k_ani_set_noise_immunity_level()
93 AR5K_REG_WRITE_BITS(ah, AR5K_PHY_AGCCOARSE, in ath5k_ani_set_noise_immunity_level()
95 AR5K_REG_WRITE_BITS(ah, AR5K_PHY_AGCCOARSE, in ath5k_ani_set_noise_immunity_level()
97 AR5K_REG_WRITE_BITS(ah, AR5K_PHY_SIG, in ath5k_ani_set_noise_immunity_level()
100 ah->ani_state.noise_imm_level = level; in ath5k_ani_set_noise_immunity_level()
101 ATH5K_DBG_UNLIMIT(ah, ATH5K_DEBUG_ANI, "new level %d", level); in ath5k_ani_set_noise_immunity_level()
111 ath5k_ani_set_spur_immunity_level(struct ath5k_hw *ah, int level) in ath5k_ani_set_spur_immunity_level() argument
116 level > ah->ani_state.max_spur_level) { in ath5k_ani_set_spur_immunity_level()
[all …]
Dbase.c96 static int ath5k_reset(struct ath5k_hw *ah, struct ieee80211_channel *chan,
200 static inline u64 ath5k_extend_tsf(struct ath5k_hw *ah, u32 rstamp) in ath5k_extend_tsf() argument
202 u64 tsf = ath5k_hw_get_tsf64(ah); in ath5k_extend_tsf()
233 struct ath5k_hw *ah = (struct ath5k_hw *) hw_priv; in ath5k_ioread32() local
234 return ath5k_hw_reg_read(ah, reg_offset); in ath5k_ioread32()
239 struct ath5k_hw *ah = (struct ath5k_hw *) hw_priv; in ath5k_iowrite32() local
240 ath5k_hw_reg_write(ah, val, reg_offset); in ath5k_iowrite32()
256 struct ath5k_hw *ah = hw->priv; in ath5k_reg_notifier() local
257 struct ath_regulatory *regulatory = ath5k_hw_regulatory(ah); in ath5k_reg_notifier()
295 ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels, in ath5k_setup_channels() argument
[all …]
Dpcu.c114 ath5k_hw_get_frame_duration(struct ath5k_hw *ah, enum nl80211_band band, in ath5k_hw_get_frame_duration() argument
122 if (!ah->ah_bwmode) { in ath5k_hw_get_frame_duration()
123 __le16 raw_dur = ieee80211_generic_frame_duration(ah->hw, in ath5k_hw_get_frame_duration()
139 switch (ah->ah_bwmode) { in ath5k_hw_get_frame_duration()
176 ath5k_hw_get_default_slottime(struct ath5k_hw *ah) in ath5k_hw_get_default_slottime() argument
178 struct ieee80211_channel *channel = ah->ah_current_channel; in ath5k_hw_get_default_slottime()
181 switch (ah->ah_bwmode) { in ath5k_hw_get_default_slottime()
194 if ((channel->hw_value == AR5K_MODE_11B) && !ah->ah_short_slot) in ath5k_hw_get_default_slottime()
207 ath5k_hw_get_default_sifs(struct ath5k_hw *ah) in ath5k_hw_get_default_sifs() argument
209 struct ieee80211_channel *channel = ah->ah_current_channel; in ath5k_hw_get_default_sifs()
[all …]
Dqcu.c63 ath5k_hw_num_tx_pending(struct ath5k_hw *ah, unsigned int queue) in ath5k_hw_num_tx_pending() argument
66 AR5K_ASSERT_ENTRY(queue, ah->ah_capabilities.cap_queues.q_tx_num); in ath5k_hw_num_tx_pending()
69 if (ah->ah_txq[queue].tqi_type == AR5K_TX_QUEUE_INACTIVE) in ath5k_hw_num_tx_pending()
73 if (ah->ah_version == AR5K_AR5210) in ath5k_hw_num_tx_pending()
76 pending = ath5k_hw_reg_read(ah, AR5K_QUEUE_STATUS(queue)); in ath5k_hw_num_tx_pending()
82 if (!pending && AR5K_REG_READ_Q(ah, AR5K_QCU_TXE, queue)) in ath5k_hw_num_tx_pending()
94 ath5k_hw_release_tx_queue(struct ath5k_hw *ah, unsigned int queue) in ath5k_hw_release_tx_queue() argument
96 if (WARN_ON(queue >= ah->ah_capabilities.cap_queues.q_tx_num)) in ath5k_hw_release_tx_queue()
100 ah->ah_txq[queue].tqi_type = AR5K_TX_QUEUE_INACTIVE; in ath5k_hw_release_tx_queue()
102 AR5K_Q_DISABLE_BITS(ah->ah_txq_status, queue); in ath5k_hw_release_tx_queue()
[all …]
Drfkill.c39 static inline void ath5k_rfkill_disable(struct ath5k_hw *ah) in ath5k_rfkill_disable() argument
41 ATH5K_DBG(ah, ATH5K_DEBUG_ANY, "rfkill disable (gpio:%d polarity:%d)\n", in ath5k_rfkill_disable()
42 ah->rf_kill.gpio, ah->rf_kill.polarity); in ath5k_rfkill_disable()
43 ath5k_hw_set_gpio_output(ah, ah->rf_kill.gpio); in ath5k_rfkill_disable()
44 ath5k_hw_set_gpio(ah, ah->rf_kill.gpio, !ah->rf_kill.polarity); in ath5k_rfkill_disable()
48 static inline void ath5k_rfkill_enable(struct ath5k_hw *ah) in ath5k_rfkill_enable() argument
50 ATH5K_DBG(ah, ATH5K_DEBUG_ANY, "rfkill enable (gpio:%d polarity:%d)\n", in ath5k_rfkill_enable()
51 ah->rf_kill.gpio, ah->rf_kill.polarity); in ath5k_rfkill_enable()
52 ath5k_hw_set_gpio_output(ah, ah->rf_kill.gpio); in ath5k_rfkill_enable()
53 ath5k_hw_set_gpio(ah, ah->rf_kill.gpio, ah->rf_kill.polarity); in ath5k_rfkill_enable()
[all …]
Ddma.c48 ath5k_hw_start_rx_dma(struct ath5k_hw *ah) in ath5k_hw_start_rx_dma() argument
50 ath5k_hw_reg_write(ah, AR5K_CR_RXE, AR5K_CR); in ath5k_hw_start_rx_dma()
51 ath5k_hw_reg_read(ah, AR5K_CR); in ath5k_hw_start_rx_dma()
59 ath5k_hw_stop_rx_dma(struct ath5k_hw *ah) in ath5k_hw_stop_rx_dma() argument
63 ath5k_hw_reg_write(ah, AR5K_CR_RXD, AR5K_CR); in ath5k_hw_stop_rx_dma()
69 (ath5k_hw_reg_read(ah, AR5K_CR) & AR5K_CR_RXE) != 0; in ath5k_hw_stop_rx_dma()
74 ATH5K_DBG(ah, ATH5K_DEBUG_DMA, in ath5k_hw_stop_rx_dma()
85 ath5k_hw_get_rxdp(struct ath5k_hw *ah) in ath5k_hw_get_rxdp() argument
87 return ath5k_hw_reg_read(ah, AR5K_RXDP); in ath5k_hw_get_rxdp()
98 ath5k_hw_set_rxdp(struct ath5k_hw *ah, u32 phys_addr) in ath5k_hw_set_rxdp() argument
[all …]
Dphy.c84 ath5k_hw_radio_revision(struct ath5k_hw *ah, enum nl80211_band band) in ath5k_hw_radio_revision() argument
95 ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_2GHZ, AR5K_PHY(0)); in ath5k_hw_radio_revision()
98 ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_5GHZ, AR5K_PHY(0)); in ath5k_hw_radio_revision()
107 ath5k_hw_reg_write(ah, 0x00001c16, AR5K_PHY(0x34)); in ath5k_hw_radio_revision()
110 ath5k_hw_reg_write(ah, 0x00010000, AR5K_PHY(0x20)); in ath5k_hw_radio_revision()
112 if (ah->ah_version == AR5K_AR5210) { in ath5k_hw_radio_revision()
113 srev = (ath5k_hw_reg_read(ah, AR5K_PHY(256)) >> 28) & 0xf; in ath5k_hw_radio_revision()
116 srev = (ath5k_hw_reg_read(ah, AR5K_PHY(0x100)) >> 24) & 0xff; in ath5k_hw_radio_revision()
122 ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_5GHZ, AR5K_PHY(0)); in ath5k_hw_radio_revision()
136 ath5k_channel_ok(struct ath5k_hw *ah, struct ieee80211_channel *channel) in ath5k_channel_ok() argument
[all …]
Dmac80211-ops.c61 struct ath5k_hw *ah = hw->priv; in ath5k_tx() local
64 if (WARN_ON(qnum >= ah->ah_capabilities.cap_queues.q_tx_num)) { in ath5k_tx()
69 ath5k_tx_queue(hw, skb, &ah->txqs[qnum], control); in ath5k_tx()
76 struct ath5k_hw *ah = hw->priv; in ath5k_add_interface() local
80 mutex_lock(&ah->lock); in ath5k_add_interface()
84 && (ah->num_ap_vifs + ah->num_adhoc_vifs) >= ATH_BCBUF) { in ath5k_add_interface()
94 if (ah->num_adhoc_vifs || in ath5k_add_interface()
95 (ah->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) { in ath5k_add_interface()
96 ATH5K_ERR(ah, "Only one single ad-hoc interface is allowed.\n"); in ath5k_add_interface()
113 ah->nvifs++; in ath5k_add_interface()
[all …]

1234567891011