Skip to content

Commit

Permalink
ath9k: use ath9k_hw_update_regulatory_maxpower in ath9k_hw_def_set_tx…
Browse files Browse the repository at this point in the history
…power

We have a helper function for updating the max_power_level
value. Use that and remove the duplicated code.

Signed-off-by: Gabor Juhos <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
juhosg authored and linvjw committed Apr 16, 2012
1 parent 5b0a3b7 commit d9e9145
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions drivers/net/wireless/ath/ath9k/eeprom_def.c
Original file line number Diff line number Diff line change
Expand Up @@ -1263,20 +1263,7 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah,
regulatory->max_power_level = ratesArray[i];
}

switch(ar5416_get_ntxchains(ah->txchainmask)) {
case 1:
break;
case 2:
regulatory->max_power_level += INCREASE_MAXPOW_BY_TWO_CHAIN;
break;
case 3:
regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN;
break;
default:
ath_dbg(ath9k_hw_common(ah), EEPROM,
"Invalid chainmask configuration\n");
break;
}
ath9k_hw_update_regulatory_maxpower(ah);

if (test)
return;
Expand Down

0 comments on commit d9e9145

Please sign in to comment.