Commit 6752ee90 authored by Bob Copeland's avatar Bob Copeland Committed by John W. Linville

ath5k: use ctl settings based on current regdomain

Update ath5k to use the ctl settings for tx power based on current
regulatory domain.
Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
Acked-by: default avatarNick Kossifidis <mickflemm@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 57e6c56d
...@@ -2158,8 +2158,6 @@ done: ...@@ -2158,8 +2158,6 @@ done:
* Get the max edge power for this channel if * Get the max edge power for this channel if
* we have such data from EEPROM's Conformance Test * we have such data from EEPROM's Conformance Test
* Limits (CTL), and limit max power if needed. * Limits (CTL), and limit max power if needed.
*
* FIXME: Only works for world regulatory domains
*/ */
static void static void
ath5k_get_max_ctl_power(struct ath5k_hw *ah, ath5k_get_max_ctl_power(struct ath5k_hw *ah,
...@@ -2175,26 +2173,23 @@ ath5k_get_max_ctl_power(struct ath5k_hw *ah, ...@@ -2175,26 +2173,23 @@ ath5k_get_max_ctl_power(struct ath5k_hw *ah,
u8 ctl_idx = 0xFF; u8 ctl_idx = 0xFF;
u32 target = channel->center_freq; u32 target = channel->center_freq;
/* Find out a CTL for our mode that's not mapped ctl_mode = ath_regd_get_band_ctl(&ah->ah_regulatory, channel->band);
* on a specific reg domain.
*
* TODO: Map our current reg domain to one of the 3 available
* reg domain ids so that we can support more CTLs. */
switch (channel->hw_value & CHANNEL_MODES) { switch (channel->hw_value & CHANNEL_MODES) {
case CHANNEL_A: case CHANNEL_A:
ctl_mode = AR5K_CTL_11A | AR5K_CTL_NO_REGDOMAIN; ctl_mode |= AR5K_CTL_11A;
break; break;
case CHANNEL_G: case CHANNEL_G:
ctl_mode = AR5K_CTL_11G | AR5K_CTL_NO_REGDOMAIN; ctl_mode |= AR5K_CTL_11G;
break; break;
case CHANNEL_B: case CHANNEL_B:
ctl_mode = AR5K_CTL_11B | AR5K_CTL_NO_REGDOMAIN; ctl_mode |= AR5K_CTL_11B;
break; break;
case CHANNEL_T: case CHANNEL_T:
ctl_mode = AR5K_CTL_TURBO | AR5K_CTL_NO_REGDOMAIN; ctl_mode |= AR5K_CTL_TURBO;
break; break;
case CHANNEL_TG: case CHANNEL_TG:
ctl_mode = AR5K_CTL_TURBOG | AR5K_CTL_NO_REGDOMAIN; ctl_mode |= AR5K_CTL_TURBOG;
break; break;
case CHANNEL_XR: case CHANNEL_XR:
/* Fall through */ /* Fall through */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment