lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180617053040.5903-10-quytelda@tamalin.org>
Date:   Sat, 16 Jun 2018 22:30:39 -0700
From:   Quytelda Kahja <quytelda@...alin.org>
To:     gregkh@...uxfoundation.org, hadess@...ess.net, hdegoede@...hat.com,
        Larry.Finger@...inger.net
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Quytelda Kahja <quytelda@...alin.org>
Subject: [PATCH 10/11] 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: Quytelda Kahja <quytelda@...alin.org>
---
 drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index 9e6dc238c028..0e49f0973c12 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
@@ -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, */
 	/*  OFDM only exists 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)
 		idx_bandwidth = 0;
-
-	/*  workaround for wrong index combination to obtain tx power limit, */
-	/*  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) {
+	else if ((idx_rate_sctn == 2 || idx_rate_sctn == 3) &&
+		 (band_type == BAND_ON_5G) && (idx_bandwidth == 2))
 		idx_bandwidth = 1;
-	}
 
 	if (band_type == BAND_ON_2_4G || band_type == BAND_ON_5G)
 		channel = phy_GetChannelIndexOfTxPowerLimit(band_type, channel);
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ