Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3481815rdb; Sun, 10 Dec 2023 07:26:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcKy6XUo/MfYqCdQ6Rgp1ETv39fI41/4F2E9HX/f0XV4U6Yp4HvZnG7HXbeiPCNbWbe4xU X-Received: by 2002:a05:6a21:78a4:b0:18f:97c:4f4d with SMTP id bf36-20020a056a2178a400b0018f097c4f4dmr1406843pzc.89.1702222011807; Sun, 10 Dec 2023 07:26:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702222011; cv=none; d=google.com; s=arc-20160816; b=wA+ZM0RMXPAWIGKVALbmijxAeAdSsxOlrmGak8xqWyLXNOrzRKOWTl0fiKbHL4w+WK nAkhPqa0Yz1i5tLjJ1qLtF+dskjxYFwyBJGn64mZgnQ5namB6Lzt8Og+/gWvZOvVxq20 syQj/CXH08VoL6uqLyCphVsjiQWX/AdZYrGZnotoiP2Z0cUyw8qDhVVLoIwCklsV7B0w HcBEiefGOOv4Cwf252wcTg23I7XqFeUakOt5IJ5XiPsosAYk6pjZihVH6iGnDB9f9aXL 6UTMHheBNTshmWSuNESAot92QR4myn8rGeXnWru5HMiFCCHFB6usTMChFmXi2u/lkIl8 2alw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=IXZChcAWYyXJ3xwEo34Bj3n8r/lOSA4PWuJHfRPgZ7U=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=g1Jqw4D95dbkGpPkXFQk5VHnfxxIV80ZVMaNeP/0XYG8////ZOyAa1B8jRr0vn+5ZN 4RK6whQw/tTXD6Br07hmaUkhavwntNqibzsymrYqvry20rfECsDWTq/ucClrInIXxkbb RiTChJXpgOE06V4gUr6Eaooilxp2ARRU35LlwOlpWByckOEpsXc9UQBXJLNt7uBRyh+1 TZBptZl21P/aY/UCAhQSlbT0qk9Gdy338WxG5Tj3+1876KTznml62Wa815Qxq/1cu8mF gcOEugodfKg48MT9eg8aAel3H106yX+dwORjvS/wBV4LBB7ji7V4PRFiDi+ZkzYMVuhT cydw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="B2Lfq/Ri"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id g4-20020a17090a9b8400b00286b48a6226si6040584pjp.89.2023.12.10.07.26.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 07:26:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="B2Lfq/Ri"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2DEFD8087DC8; Sun, 10 Dec 2023 07:26:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232631AbjLJP0L (ORCPT + 99 others); Sun, 10 Dec 2023 10:26:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232816AbjLJP0I (ORCPT ); Sun, 10 Dec 2023 10:26:08 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8599C4 for ; Sun, 10 Dec 2023 07:26:13 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40c2655da63so5702935e9.1 for ; Sun, 10 Dec 2023 07:26:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702221972; x=1702826772; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=IXZChcAWYyXJ3xwEo34Bj3n8r/lOSA4PWuJHfRPgZ7U=; b=B2Lfq/RiuXh36LmwWl+Xvk9UMq1OIFpOnW4LB4Rn6qLzLTgmdY8TOTtbHn9AFb865T p9IELjOhMO1TILYEKfOnkxjVC0Z2OPJba/H997X69tZvVGsngB0PEF8MwPCY0Le0Ylhz EsmItVlxB/ZGxrsC99ElurTQ9aXIqRLnpbenEC/5HprAIPKElc3j0kYKq6eYrfDq4XDh JxkEotB3J/Jp/E0lxy7w9LUmH5MkekkMADlgWOuN9HHOSIg9IjnF9Gt4KDfCSchakgeX qF2jPgqTXWALigBL+1lJcyZGiKGwZk3OLAEHG6UEHdrnA2tkeQd9E5/22TaaSdAcqjzj tNSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702221972; x=1702826772; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IXZChcAWYyXJ3xwEo34Bj3n8r/lOSA4PWuJHfRPgZ7U=; b=SqMglXy/rzspOlszVhehrVjXOWqk2eRC3YVZQcHbTtph2Az8VH41oODWKL2ER4BF32 IruUyhqUicm3qoXYJj6JDSj6HH+k1xfgBoP8k4gm24dqvIQIvgBOBmTXugXPRnLN0Gk0 30kG9arRfUnZQP0UgcEZE27cvDsFpyeIdiueu1JoGR2x1ZEz0B3/wHFPqJA3slcKMMYA hcJKVmriZ75obfdquWRVLvL9X7mXVxj4LU0VWgKbNKfRlUZ1cPI6UNlI8AmCcaIrOYrR dwqz++k4EXPfiRg92zdFTWYHAJcqTnuKH8B81tFOjghV+sTzxz8dB/FyXg3JCg4tPKbk eVaw== X-Gm-Message-State: AOJu0Yw2nPOecG9zdz9KfmZEm/XtQ7ARn2/ed51kLsn2sVehTIhyLtwD hZKhsnyeHQjedd9tkIEi3Yw= X-Received: by 2002:a05:600c:35d6:b0:405:358c:ba75 with SMTP id r22-20020a05600c35d600b00405358cba75mr4025647wmq.0.1702221971674; Sun, 10 Dec 2023 07:26:11 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p54a07fa0.dip0.t-ipconnect.de. [84.160.127.160]) by smtp.gmail.com with ESMTPSA id k40-20020a05600c1ca800b0040b45356b72sm12132495wms.33.2023.12.10.07.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 07:26:11 -0800 (PST) Date: Sun, 10 Dec 2023 16:26:10 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 02/10] staging: rtl8192e: Remove variable ht_info->reg_bw_40mhz Message-ID: <4ff7afdc2ada8095c95f053381834cea9f5796bf.1702212003.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sun, 10 Dec 2023 07:26:49 -0800 (PST) ht_info->reg_bw_40mhz is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->reg_bw_40mhz can be removed. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl819x_HT.h | 1 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 14 +++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h index c004020099e3..bbfdfb79c6f2 100644 --- a/drivers/staging/rtl8192e/rtl819x_HT.h +++ b/drivers/staging/rtl8192e/rtl819x_HT.h @@ -94,7 +94,6 @@ enum ht_aggre_mode { struct rt_hi_throughput { u8 enable_ht; u8 current_ht_support; - u8 reg_bw_40mhz; u8 cur_bw_40mhz; u8 reg_short_gi_40mhz; u8 cur_short_gi_40mhz; diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index 99626be899fd..f81d9ba9c9f5 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -74,12 +74,7 @@ void ht_update_default_setting(struct rtllib_device *ieee) ht_info->reg_short_gi_20mhz = 1; ht_info->reg_short_gi_40mhz = 1; - ht_info->reg_bw_40mhz = 1; - - if (ht_info->reg_bw_40mhz) - ht_info->reg_supp_cck = 1; - else - ht_info->reg_supp_cck = true; + ht_info->reg_supp_cck = 1; ht_info->amsdu_max_size = 7935UL; ht_info->amsdu_support = 0; @@ -275,7 +270,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap, if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) pCapELE->ChlWidth = 0; else - pCapELE->ChlWidth = (pHT->reg_bw_40mhz ? 1 : 0); + pCapELE->ChlWidth = 1; pCapELE->MimoPwrSave = pHT->self_mimo_ps; pCapELE->GreenField = 0; @@ -286,7 +281,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap, pCapELE->RxSTBC = 0; pCapELE->DelayBA = 0; pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0; - pCapELE->DssCCk = ((pHT->reg_bw_40mhz) ? (pHT->reg_supp_cck ? 1 : 0) : 0); + pCapELE->DssCCk = (pHT->reg_supp_cck ? 1 : 0); pCapELE->PSMP = 0; pCapELE->LSigTxopProtect = 0; @@ -734,9 +729,6 @@ void HTSetConnectBwMode(struct rtllib_device *ieee, { struct rt_hi_throughput *ht_info = ieee->ht_info; - if (!ht_info->reg_bw_40mhz) - return; - if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) bandwidth = HT_CHANNEL_WIDTH_20; -- 2.43.0