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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <YXmap8VIxfOpqeEY@Sauravs-MacBook-Air.local>
Date:   Thu, 28 Oct 2021 00:04:43 +0530
From:   Saurav Girepunje <saurav.girepunje@...il.com>
To:     gregkh@...uxfoundation.org, dan.carpenter@...cle.com,
        will+git@...d.me, mitaliborkar810@...il.com,
        eduard.vintila47@...il.com, saurav.girepunje@...il.com,
        zhaoxiao@...ontech.com, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Cc:     saurav.girepunje@...mail.com
Subject: [PATCH] staging: rtl8192e: remove condition with no effect

Remove the if and else code section for variable pHTInfo->bRegBW40MHz.
Just before the if condition variable is assign with value 1.
So if condition check for pHTInfo->bRegBW40MHz is always true.

Similarly for the variable pHTInfo->SelfMimoPs value '3' is assign.
So if condition check with value '2' will never be true. Remove the
if condition check for pHTInfo->SelfMimoPs.

Remove the extra blank lines from HTUpdateDefaultSetting function.

Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.com>
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 3b8efaf9b88c..6925654dbc03 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -72,34 +72,20 @@ void HTUpdateDefaultSetting(struct rtllib_device *ieee)
 	struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

 	pHTInfo->bAcceptAddbaReq = 1;
-
 	pHTInfo->bRegShortGI20MHz = 1;
 	pHTInfo->bRegShortGI40MHz = 1;
-
 	pHTInfo->bRegBW40MHz = 1;
-
-	if (pHTInfo->bRegBW40MHz)
-		pHTInfo->bRegSuppCCK = 1;
-	else
-		pHTInfo->bRegSuppCCK = true;
-
+	pHTInfo->bRegSuppCCK = 1;
 	pHTInfo->nAMSDU_MaxSize = 7935UL;
 	pHTInfo->bAMSDU_Support = 0;
-
 	pHTInfo->bAMPDUEnable = 1;
 	pHTInfo->AMPDU_Factor = 2;
 	pHTInfo->MPDU_Density = 0;
-
 	pHTInfo->SelfMimoPs = 3;
-	if (pHTInfo->SelfMimoPs == 2)
-		pHTInfo->SelfMimoPs = 3;
 	ieee->bTxDisableRateFallBack = 0;
 	ieee->bTxUseDriverAssingedRate = 0;
-
 	ieee->bTxEnableFwCalcDur = 1;
-
 	pHTInfo->bRegRT2RTAggregation = 1;
-
 	pHTInfo->bRegRxReorderEnable = 1;
 	pHTInfo->RxReorderWinSize = 64;
 	pHTInfo->RxReorderPendingTime = 30;
--
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ