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: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
idx_bandwidth = 1;
}
- if (band_type == BAND_ON_2_4G)
- channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_2_4G,
- channel);
- else if (band_type == BAND_ON_5G)
- channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_5G,
- channel);
+ if (band_type == BAND_ON_2_4G || band_type == BAND_ON_5G)
+ channel = phy_GetChannelIndexOfTxPowerLimit(band_type, channel);
if (idx_band == -1 || idx_regulation == -1 || idx_bandwidth == -1 ||
idx_rate_sctn == -1 || idx_channel == -1) {