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

staging: rtl8723bs: Merge conditionals with similar bodies.

Two conditionals that set 'channel' based on 'band_type' in
'phy_get_tx_pwr_lmt()' can be simplified into one single-line conditional.
Signed-off-by: default avatarQuytelda Kahja <quytelda@tamalin.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 871081d4
...@@ -1738,12 +1738,8 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, ...@@ -1738,12 +1738,8 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel,
idx_bandwidth = 1; idx_bandwidth = 1;
} }
if (band_type == BAND_ON_2_4G) if (band_type == BAND_ON_2_4G || band_type == BAND_ON_5G)
channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_2_4G, channel = phy_GetChannelIndexOfTxPowerLimit(band_type, channel);
channel);
else if (band_type == BAND_ON_5G)
channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_5G,
channel);
if (idx_band == -1 || idx_regulation == -1 || idx_bandwidth == -1 || if (idx_band == -1 || idx_regulation == -1 || idx_bandwidth == -1 ||
idx_rate_sctn == -1 || idx_channel == -1) { idx_rate_sctn == -1 || idx_channel == -1) {
......
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