Lines Matching defs:channel

63  * - TX power control per channel/rate/packet type
128 * ath5k_channel_ok() - Check if a channel is supported by the hw
130 * @channel: The &struct ieee80211_channel
136 ath5k_channel_ok(struct ath5k_hw *ah, struct ieee80211_channel *channel)
138 u16 freq = channel->center_freq;
140 /* Check if the channel is in our supported range */
141 if (channel->band == NL80211_BAND_2GHZ) {
145 } else if (channel->band == NL80211_BAND_5GHZ)
154 * ath5k_hw_chan_has_spur_noise() - Check if channel is sensitive to spur noise
156 * @channel: The &struct ieee80211_channel
160 struct ieee80211_channel *channel)
172 if ((channel->center_freq % refclk_freq != 0) &&
173 ((channel->center_freq % refclk_freq < 10) ||
174 (channel->center_freq % refclk_freq > 22)))
273 * @channel: the currently set channel upon reset
286 struct ieee80211_channel *channel)
293 (channel->hw_value == AR5K_MODE_11B));
313 coef_scaled = ((5 * (clock << 24)) / 2) / channel->center_freq;
360 * @channel: The &struct ieee80211_channel
364 struct ieee80211_channel *channel)
374 delay = (channel->hw_value == AR5K_MODE_11B) ?
803 * @channel: The &struct ieee80211_channel
811 struct ieee80211_channel *channel,
916 if (channel->band == NL80211_BAND_2GHZ) {
918 if (channel->hw_value == AR5K_MODE_11B)
943 } else if ((channel->band == NL80211_BAND_5GHZ) ||
949 obdb = channel->center_freq >= 5725 ? 3 :
950 (channel->center_freq >= 5500 ? 2 :
951 (channel->center_freq >= 5260 ? 1 :
952 (channel->center_freq > 4000 ? 0 : -1)));
975 if (channel->hw_value != AR5K_MODE_11B) {
1032 if (channel->hw_value != AR5K_MODE_11B) {
1144 channel->band == NL80211_BAND_2GHZ) {
1168 PHY/RF channel functions
1172 * ath5k_hw_rf5110_chan2athchan() - Convert channel freq on RF5110
1173 * @channel: The &struct ieee80211_channel
1175 * Map channel frequency to IEEE channel number and convert it
1176 * to an internal channel value used by the RF5110 chipset.
1179 ath5k_hw_rf5110_chan2athchan(struct ieee80211_channel *channel)
1185 channel->center_freq) - 24) / 2, 5)
1191 * ath5k_hw_rf5110_channel() - Set channel frequency on RF5110
1193 * @channel: The &struct ieee80211_channel
1197 struct ieee80211_channel *channel)
1202 * Set the channel and wait
1204 data = ath5k_hw_rf5110_chan2athchan(channel);
1214 * @ieee: IEEE channel number
1219 * on to the PHY. So for every 2GHz channel this function gets called
1226 int channel;
1228 /* Cast this value to catch negative channel numbers (>= -19) */
1229 channel = (int)ieee;
1232 * Map 2GHz IEEE channel to 5GHz Atheros channel
1234 if (channel <= 13) {
1235 athchan->a2_athchan = 115 + channel;
1237 } else if (channel == 14) {
1240 } else if (channel >= 15 && channel <= 26) {
1241 athchan->a2_athchan = ((channel - 14) * 4) + 132;
1250 * ath5k_hw_rf5111_channel() - Set channel frequency on RF5111/2111
1252 * @channel: The &struct ieee80211_channel
1256 struct ieee80211_channel *channel)
1260 ieee80211_frequency_to_channel(channel->center_freq);
1265 * Set the channel on the RF5111 radio
1269 if (channel->band == NL80211_BAND_2GHZ) {
1270 /* Map 2GHz channel to 5GHz Atheros channel ID */
1272 ieee80211_frequency_to_channel(channel->center_freq),
1301 * ath5k_hw_rf5112_channel() - Set channel frequency on 5112 and newer
1303 * @channel: The &struct ieee80211_channel
1309 * NOTE: Make sure channel frequency given is within our range or else
1314 struct ieee80211_channel *channel)
1320 c = channel->center_freq;
1335 * below/above (standard channels without channel 14) */
1379 * ath5k_hw_rf2425_channel() - Set channel frequency on RF2425
1381 * @channel: The &struct ieee80211_channel
1388 struct ieee80211_channel *channel)
1394 c = channel->center_freq;
1424 * ath5k_hw_channel() - Set a channel on the radio chip
1426 * @channel: The &struct ieee80211_channel
1428 * This is the main function called to set a channel on the
1433 struct ieee80211_channel *channel)
1440 if (!ath5k_channel_ok(ah, channel)) {
1442 "channel frequency (%u MHz) out of supported "
1444 channel->center_freq);
1449 * Set the channel and wait
1453 ret = ath5k_hw_rf5110_channel(ah, channel);
1456 ret = ath5k_hw_rf5111_channel(ah, channel);
1460 ret = ath5k_hw_rf2425_channel(ah, channel);
1463 ret = ath5k_hw_rf5112_channel(ah, channel);
1470 /* Set JAPAN setting for channel 14 */
1471 if (channel->center_freq == 2484) {
1479 ah->ah_current_channel = channel;
1664 * @channel: The &struct ieee80211_channel
1670 struct ieee80211_channel *channel)
1689 * Set the channel (with AGC turned off)
1693 ret = ath5k_hw_channel(ah, channel);
1753 channel->center_freq);
1846 * @channel: The &struct ieee80211_channel
1850 * and current channel
1854 struct ieee80211_channel *channel)
1859 return ath5k_hw_rf5110_calibrate(ah, channel);
1865 channel->center_freq);
1877 channel->hw_value != AR5K_MODE_11B)
1895 * @channel: The &struct ieee80211_channel
1898 * configure the spur filter for the given channel. Spur is noise
1904 struct ieee80211_channel *channel)
1918 if (channel->band == NL80211_BAND_2GHZ) {
1919 chan_fbin = (channel->center_freq - 2300) * 10;
1922 chan_fbin = (channel->center_freq - 4900) * 10;
1927 * within our current channel's spur detection range */
1953 /* We need to enable spur filter for this channel */
1982 if (channel->band == NL80211_BAND_5GHZ) {
2296 struct ieee80211_channel *channel = ah->ah_current_channel;
2303 /* if channel is not initialized yet we can't set the antennas
2305 if (channel == NULL) {
2312 ee_mode = ath5k_eeprom_mode_from_channel(ah, channel);
2568 * for a given channel.
2570 * @channel: The &struct ieee80211_channel
2574 * Get the surrounding per-channel power calibration piers
2577 * channel.
2581 struct ieee80211_channel *channel,
2589 u32 target = channel->center_freq;
2594 switch (channel->hw_value) {
2628 * channel range. Pick the surrounding
2660 * @channel: The &struct ieee80211_channel
2670 struct ieee80211_channel *channel,
2677 u32 target = channel->center_freq;
2682 switch (channel->hw_value) {
2757 * @channel: The &struct ieee80211_channel
2759 * Get the max edge power for this channel if
2765 struct ieee80211_channel *channel)
2776 u32 target = channel->center_freq;
2778 ctl_mode = ath_regd_get_band_ctl(regulatory, channel->band);
2780 switch (channel->hw_value) {
2842 * for each calibrated channel. Each curve has 0,5dB Power steps
2848 * for each calibrated channel on 0, -6, -12 and -18dBm but we only
2856 * For a given channel we get the calibrated points (piers) for it or
2857 * -if we don't have calibration data for this specific channel- from the
2860 * for this channel, we do again a linear interpolation between them to get the
3051 * calibrated channel. Each curve has power on x axis in 0.5 db steps and
3257 * ath5k_setup_channel_powertable() - Set up power table for this channel
3259 * @channel: The &struct ieee80211_channel
3264 * to set PCDAC/PDADC table on hw for the current channel.
3271 struct ieee80211_channel *channel,
3283 u32 target = channel->center_freq;
3286 /* Get surrounding freq piers for this channel */
3287 ath5k_get_chan_pcal_surrounding_piers(ah, channel,
3323 * curve for this gain on this channel */
3398 * channel on tmpL (x range is table_max - table_min
3406 * channel by interpolating the values on
3461 * ath5k_write_channel_powertable() - Set power table for current channel on hw
3559 /* Save min/max and current tx power for this channel
3589 * ath5k_hw_txpower() - Set transmission power limit for a given channel
3591 * @channel: The &struct ieee80211_channel
3598 ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel,
3612 ee_mode = ath5k_eeprom_mode_from_channel(ah, channel);
3637 * If we don't change channel/mode skip tx powertable calculation
3641 (channel->hw_value != curr_channel->hw_value) ||
3642 (channel->center_freq != curr_channel->center_freq)) {
3655 ret = ath5k_setup_channel_powertable(ah, channel,
3665 ath5k_get_max_ctl_power(ah, channel);
3675 ath5k_get_rate_pcal_data(ah, channel, &rate_info);
3716 * ath5k_hw_set_txpower_limit() - Set txpower limit for the current channel
3740 * @channel: The @struct ieee80211_channel
3742 * @fast: Try a fast channel switch instead
3745 * or do a fast channel change if possible.
3751 ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel,
3761 * Don't try fast channel change when changing modulation
3766 if (fast && (channel->hw_value != curr_channel->hw_value))
3770 * On fast channel change we only set the synth parameters
3785 /* Set channel and wait for synth */
3786 ret = ath5k_hw_channel(ah, channel);
3790 ath5k_hw_wait_for_synth(ah, channel);
3800 ret = ath5k_hw_txpower(ah, channel, ah->ah_txpower.txp_requested ?
3808 channel->hw_value != AR5K_MODE_11B) {
3810 ret = ath5k_hw_write_ofdm_timings(ah, channel);
3819 channel);
3822 /* If we used fast channel switching
3827 * channel change, not AGC calibration
3858 ret = ath5k_hw_rfgain_init(ah, channel->band);
3867 ret = ath5k_hw_rfregs_init(ah, channel, mode);
3889 /* Set channel on PHY */
3890 ret = ath5k_hw_channel(ah, channel);
3901 ath5k_hw_wait_for_synth(ah, channel);
3954 channel->center_freq);