Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp892715pxb; Wed, 27 Oct 2021 14:36:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFozdjzD+rbuIBN1XvCjqd6qvw+WZdzmIacgjxYtyJqtrSVcgQ26c4dY5VvonCD2sUz7Eu X-Received: by 2002:a17:906:2bd5:: with SMTP id n21mr89430ejg.337.1635370438939; Wed, 27 Oct 2021 14:33:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370438; cv=none; d=google.com; s=arc-20160816; b=UwfMYGe5jCyL3ziLKKDYfFazxOEc+PRBvr223sc+VLf1Sw2r7ATIOEkx71/sxYf5D5 RWTXn0f1dLvLsx1JwjpQ72FE/Q9VRGuQfz+4lS88AmV+Zc9eeMF/iyE45qfVCRdrHOVG ikPgi/UvqGp4JiqssOccn0kZSWmnJy5I4hOaSn6RcOEJpGr9ICNxfkdAcTEF7y2450VB vdPvdxGbWr0p4TD46FpMI+aSxurhzmjAR6XY9aun1D7UUZiLNTJVitBJ7GdS45oR58Gq pct5T/iOS5VpZOrd7GtJQO4nOoMHWisSQbqMtRMKEMfquZ+d9dmFriqy1+A2efYO+InF Vc3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=rZ1FB3CWtcfDgjKcIVRiQbXOzmz1nIz649iaBjymSHo=; b=zTh5KobWrZ0n06PbqxWAvjQRRnvdnk/bPw4AYSOH9YBpfpAe2/CMBBaPJ00cQu7A6Y BCSkLOmS1YGCsG4dclphPu+BXm8kYQw0inCxOx6N71PiDC47xUdXViett3U9YEZmjrvd gCaswN4O2QfgtRZ/dMJzRx47uIU3dFh+MGu24ZADl++Ag85Q3vybj5cYbRlARKXW2f2N AHDWFv31dRD/5C3qxHDyymRjPHDXx4Sv2hpKUSo6JLiju5BKyRSNYn/lIGbL4pom1I8a fUTNfJAI5vyXemxKEZBKsZ5bktUZKL9DY9UQLc38QLYQDuE/xm3KVc7sqLDjsiLnjnZR x4NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mrbbF+vg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nc8si1641657ejc.776.2021.10.27.14.33.35; Wed, 27 Oct 2021 14:33:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mrbbF+vg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243579AbhJ0Sh1 (ORCPT + 97 others); Wed, 27 Oct 2021 14:37:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243575AbhJ0ShT (ORCPT ); Wed, 27 Oct 2021 14:37:19 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F4D2C061570 for ; Wed, 27 Oct 2021 11:34:53 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id g184so3782104pgc.6 for ; Wed, 27 Oct 2021 11:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=rZ1FB3CWtcfDgjKcIVRiQbXOzmz1nIz649iaBjymSHo=; b=mrbbF+vgf43ds9NpeoL/+XuV3Xfrdr6jd3L521mLardiqMytamE3RyxWtCFwhN/0Ft wHgvxePuJ/275+kqYouKBlRHPAApF9e6vLWbVAGo26/rB+YWRlHJvoF9tg8mPSc997O1 fJiDIHm7ytyi+X+p6ScerhojaTKizMdoKurHDzHAUDpiLJkqHk9DF+MmlOguCUSGSEgy 4NtDDd5NWoBZHCJZv6Oou0GMlYh/Hb5nX4FYCZb4Q+AmcYgVeJl/rGbB6y5JqAT2n4fP ML/q1PkhKWOQ2aVt6E5gwLzysXU7j+JUBVqPaXw7EVN+zd/Je4g5qP31PVnt6b8ehaZ3 zVGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=rZ1FB3CWtcfDgjKcIVRiQbXOzmz1nIz649iaBjymSHo=; b=U/yNE+wX2Z9OqI2f3mrq9uzXKOilVOUsl84/92KfbVoKvFbKnAVN4996pdjj+UGmbW 3JVs6ovhj8ORpNi7bHu5fQKBBCylRNHPuMJCOrtdPa0qTa3AkpkVoYqyJYJimuvcGBJ9 oVWGlet8unReTlKcybSyYpTu6tGqSFst7fyEZbG+5EkGehTASUG2qOi85gZweRvfD8zJ kFPdisURv5veFJ7rQ7ytxODwGXo+I98JHudCGxwKM2gknqTkNzrj0H6Wu8VeuWKPjoFO 9MATE5kJ7wi61w0EgUO4VzaHdCBmPAZ8X0wqACCgw4kps2T/aasaiNrWX5Yhgg+PdKoB XdIQ== X-Gm-Message-State: AOAM5332qn9qPsKpEuJQBAEPhberbedtlDDQzsx9UzsWQTTOIlhTEY5H qAMaBlae0r/E7qAGJI5HKac= X-Received: by 2002:a63:2cd8:: with SMTP id s207mr25375160pgs.312.1635359692896; Wed, 27 Oct 2021 11:34:52 -0700 (PDT) Received: from Sauravs-MacBook-Air.local ([59.95.83.133]) by smtp.gmail.com with ESMTPSA id k14sm419556pji.45.2021.10.27.11.34.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 11:34:51 -0700 (PDT) Date: Thu, 28 Oct 2021 00:04:43 +0530 From: Saurav Girepunje To: gregkh@linuxfoundation.org, dan.carpenter@oracle.com, will+git@drnd.me, mitaliborkar810@gmail.com, eduard.vintila47@gmail.com, saurav.girepunje@gmail.com, zhaoxiao@uniontech.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com Subject: [PATCH] staging: rtl8192e: remove condition with no effect Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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