Commit 90460439 authored by Quytelda Kahja's avatar Quytelda Kahja Committed by Greg Kroah-Hartman

staging: rtl8723bs: Merge workaround conditionals into single else-if.

The if conditionals used to work around wrong TX power limit indices
can be condensed into a single if/else-if statement for more concise
expression.
Signed-off-by: default avatarQuytelda Kahja <quytelda@tamalin.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f5746848
...@@ -1728,15 +1728,12 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, ...@@ -1728,15 +1728,12 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel,
/* workaround for wrong index combination to obtain tx power limit, */ /* workaround for wrong index combination to obtain tx power limit, */
/* OFDM only exists in BW 20M */ /* OFDM only exists in BW 20M */
/* CCK table will only be given in BW 20M */ /* CCK table will only be given in BW 20M */
/* HT on 80M will reference to HT on 40M */
if (idx_rate_sctn == 0 || idx_rate_sctn == 1) if (idx_rate_sctn == 0 || idx_rate_sctn == 1)
idx_bandwidth = 0; idx_bandwidth = 0;
else if ((idx_rate_sctn == 2 || idx_rate_sctn == 3) &&
/* workaround for wrong index combination to obtain tx power limit, */ (band_type == BAND_ON_5G) && (idx_bandwidth == 2))
/* HT on 80M will reference to HT on 40M */
if ((idx_rate_sctn == 2 || idx_rate_sctn == 3) &&
band_type == BAND_ON_5G && idx_bandwidth == 2) {
idx_bandwidth = 1; idx_bandwidth = 1;
}
if (band_type == BAND_ON_2_4G || band_type == BAND_ON_5G) if (band_type == BAND_ON_2_4G || band_type == BAND_ON_5G)
channel = phy_GetChannelIndexOfTxPowerLimit(band_type, channel); channel = phy_GetChannelIndexOfTxPowerLimit(band_type, channel);
......
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