mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 12:14:01 +08:00
ath9k_hw: Fix calculation of PAPRD training power at 5Ghz
higher the chainmask, lesser the power_delta to be added to the paprd_training_power Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
9720bb3ab0
commit
7952ca5b20
@ -83,7 +83,23 @@ static int ar9003_get_training_power_5g(struct ath_hw *ah)
|
||||
if (delta > scale)
|
||||
return -1;
|
||||
|
||||
power += 2 * get_streams(common->tx_chainmask);
|
||||
switch (get_streams(common->tx_chainmask)) {
|
||||
case 1:
|
||||
delta = 6;
|
||||
break;
|
||||
case 2:
|
||||
delta = 4;
|
||||
break;
|
||||
case 3:
|
||||
delta = 2;
|
||||
break;
|
||||
default:
|
||||
delta = 0;
|
||||
ath_dbg(common, ATH_DBG_CALIBRATE,
|
||||
"Invalid tx-chainmask: %u\n", common->tx_chainmask);
|
||||
}
|
||||
|
||||
power += delta;
|
||||
return power;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user