From patchwork Sat Mar 25 13:28:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 74907 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp412112vqo; Sat, 25 Mar 2023 06:34:13 -0700 (PDT) X-Google-Smtp-Source: AKy350ZBHZEKUPZFspqz7k+BQ41bBWRYXDRcJ1Nsd9bSWxGmXj1BOgx0bM3PHq/OMl+38ukofSJ5 X-Received: by 2002:a17:907:a46:b0:93f:9ef3:945b with SMTP id be6-20020a1709070a4600b0093f9ef3945bmr1435285ejc.17.1679751252759; Sat, 25 Mar 2023 06:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679751252; cv=none; d=google.com; s=arc-20160816; b=H2aoDYMBkdO1gWbejwCPUcd32MZRnrNKDjGIdbkaNK9HVa9fmzvRE6nmUoKIIyiYOa doPmHosRIeWgBuEhkLOw8u5Sl7cWKqBGLAm684VLjFAh4WEqAjstcuCRKjgb6mIcnHKr fhcnx6IVGeTiUIq6oLhCjFqE1qH1p8Hqre4FrOHV9SAw35fb838L1hZTdTnaio8kJO8j ReT5zUbCam1TKKjm4aaxu40+gIGdDw3jY70lKX5usyhXoKE3rOLqce1K+tEl6ED1+VL3 CLlA7M5d4UTFYzsQLk9pcc9fXJeQXOqIJQehXaHOhMKKVL7gUk7zyivgCOFMUqjdWolL /WQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NB6p6J+61ZEfKF2taGIVauzNoOXReRV6sQgPw6xQeQ8=; b=vYJhZffXqBxEJzH9TCG6//xoN1hfBjebqGy7k7zKkzo1pain8n7QljyLZWl/E7cn1/ /AAb1TPtQz/P3FC4ZHB026fQF3Knm11Tqi7dUe7Qswd9aIKVTqOXHX2V7AcNXL+KBlb2 tzLBFJELP6iFy9tAQnrNvxbatGAMH98vaNbJKd8XHSmxea5nTO1tsUppGS21Pqpwdzye y3lBJ+9lftGsXfhzqJscAWIBfjZGlPNxoG6u9RAqhZB3GBRbMIHLj5twA4ifAZxoIWVD TvvHjiyMdQklFEkDs/VciZotQcvrhLokIt/NcVOsa734V4MDDwHEjun1uWbQaJnSEbOS Dx9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IRoQcHNx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h11-20020a170906584b00b008d70b974e03si21593541ejs.379.2023.03.25.06.33.49; Sat, 25 Mar 2023 06:34:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IRoQcHNx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231840AbjCYN2k (ORCPT + 99 others); Sat, 25 Mar 2023 09:28:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230062AbjCYN2h (ORCPT ); Sat, 25 Mar 2023 09:28:37 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EC97B77D for ; Sat, 25 Mar 2023 06:28:36 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id ew6so18206404edb.7 for ; Sat, 25 Mar 2023 06:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679750915; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NB6p6J+61ZEfKF2taGIVauzNoOXReRV6sQgPw6xQeQ8=; b=IRoQcHNx0zbv/J3FOdcXg2ldsaIRZ4FBlWY3Njzt6QM/1vEljPaulBm36FmTlJTvsc TCavTauqk9X6Py1MX1jsLfrRCoRQrEuYBzaDSHccPctRPwWWG4Mr8K6anRxk2uvxUXAq ZszLz3QkxZs0l3s4zdjGWV3RGqXuGqMIh6Jhq0BhzXSI8aU7qNtxm39n5LJfzNlEGnpa cmo5BDKCOIcKNeHDsEALAzXDW2UKwQvfd1QXCVYnSm7vx3TB6Mx3WaHyI8hrbHO7iFgf lRQuM22cZQMYi/EVICjuGN4FE+NVfwJMx+1ZFPZIGQaTKpvNOnEvpsgbezZYQWUDEGVr Zsmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679750915; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NB6p6J+61ZEfKF2taGIVauzNoOXReRV6sQgPw6xQeQ8=; b=VvQTLqAKPzKZ3edlxztvCwW+AYw5SsaCDUJfGLnaQTMOI52ddFoFb+0gc37rR5Zv5y jYuFhkG34GgmWn6WRLT5VbfLHYTlZT8qgJOZnAmMHFPsj5VdluU2ZQAwZj0koYXmBuWz GmsfBKDQWsdscTIzgU8NB9LugwfijLHXCy2CsyfUycF0QD/qzFB7lL4LHjG/nPb1Ih+O xT/pyWQRJwVB+eAsDIyN/yhidwtASJ6DbWGxKH+BNBwb5bqDBRDhtNIXegQWaO98kBQf ia2FkbGKhsuufKDj2KMp/QUQWssFc4Q+JSRcaYGK+Q48rdbdPwzaBuWCWgwD1/Eu77Ck Ms7Q== X-Gm-Message-State: AAQBX9fsTjTpKMM+cH51BWzRMC3YYOtZg0S9AmKtKbGW2VHmhZsE/eWO A86rFEDKDPmpwfpMMfFiiKs= X-Received: by 2002:a17:907:6d27:b0:932:cfbc:7613 with SMTP id sa39-20020a1709076d2700b00932cfbc7613mr7396832ejc.24.1679750914842; Sat, 25 Mar 2023 06:28:34 -0700 (PDT) Received: from localhost.localdomain (ip5f5abbe9.dynamic.kabel-deutschland.de. [95.90.187.233]) by smtp.gmail.com with ESMTPSA id lt11-20020a170906fa8b00b008e54ac90de1sm11727610ejb.74.2023.03.25.06.28.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 06:28:34 -0700 (PDT) From: Michael Straube To: gregkh@linuxfoundation.org Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 1/4] staging: rtl8192e: remove RTL819X_DEFAULT_RF_TYPE Date: Sat, 25 Mar 2023 14:28:20 +0100 Message-Id: <20230325132823.22872-2-straube.linux@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230325132823.22872-1-straube.linux@gmail.com> References: <20230325132823.22872-1-straube.linux@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761346849501240324?= X-GMAIL-MSGID: =?utf-8?q?1761346849501240324?= Remove RTL819X_DEFAULT_RF_TYPE and use RF_1T2R directly to make follow up patches, which will remove priv->rf_type, easier to review. Signed-off-by: Michael Straube --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index a67927f0c5e3..3027d43cb362 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -343,7 +343,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) else priv->tx_pwr_data_read_from_eeprom = false; - priv->rf_type = RTL819X_DEFAULT_RF_TYPE; + priv->rf_type = RF_1T2R; if (priv->card_8192_version > VERSION_8190_BD) { if (!priv->autoload_fail_flag) { diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 68ec0aeb2dd9..914cd28897a5 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -61,8 +61,6 @@ #define HAL_HW_PCI_REVISION_ID_8192PCIE 0x01 #define HAL_HW_PCI_REVISION_ID_8192SE 0x10 -#define RTL819X_DEFAULT_RF_TYPE RF_1T2R - #define RTLLIB_WATCH_DOG_TIME 2000 #define MAX_DEV_ADDR_SIZE 8 /*support till 64 bit bus width OS*/ From patchwork Sat Mar 25 13:28:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 74911 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp420157vqo; Sat, 25 Mar 2023 06:52:17 -0700 (PDT) X-Google-Smtp-Source: AKy350aDlrO8Hrjl3df4aEZ9BdC14+uJuZUSkQ9wHvTE8ExI1yEH087fcR3oh99iXXh7jsot1VRy X-Received: by 2002:a17:906:4f0b:b0:931:59f:d42 with SMTP id t11-20020a1709064f0b00b00931059f0d42mr6596304eju.29.1679752337580; Sat, 25 Mar 2023 06:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679752337; cv=none; d=google.com; s=arc-20160816; b=z8fJAMkB7HWaq0iDGMFg/y/cdBPhWaYL4TExfaCDwUI02TIhDfswdSZEK+oInIwRXG AjnD/OrhwD4GVk9/L0e9/X8m67JxbGnd20KPZTLCgJWIOrcDS1x+3TQM7pmz9oBEHAwu xlqEOv03nBYfer67mNzw7pUCcNcUTe69LELwEdSl4oc0BJ/hsNjKnCjGTanofECqtGox yci4yqYA8Q0iy05iUZnxJUk1JOUrxwjfytw5B/ac6fe/ck3U013K2dos7UC2oEskCfTB t1EHpZWFl9lTZhXD34rDai70Nw+7U0Su+iA4FRKReFIVqqAFahD0YIyDCW/2yd+DtoiD ToIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UyY2R9QNNXGK8lmhcVSCQDWNmU1D4Zz0mD1roX5FYPQ=; b=nv9yMovEmaCl6NkZIzcRKMXZLK7vkLHn+fn2UKRrnK5qLycaqpUemHE/NbAfxVcD15 3xUccgAUyrO31VkcB7lqO/03S3Soj+DeIxODt1eTzziNbadVa56sEX2IjJICwSQ5ApeA Oiz98uK8H6p/QPZhplW1ZPpkDif4+vfyltHSyTGJITxqIb626LeNQy2rFBmX1uGVKnQP UF1hgZfqCEznswlX6Wemz6Ua+8OpkOyZp3wj/HHJSuAc2Bp3OVKT+citCu+eccbhS84A 61J5RXFrFtnd3Lj0FdsJDrlLnZF3rippeLFgsGrzDw68xkZbGui2OEc0wcXdD2mopsj7 wi3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mzuOkHGb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020a1709064a0c00b0092be6bcd27bsi23728189eju.556.2023.03.25.06.51.54; Sat, 25 Mar 2023 06:52:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mzuOkHGb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231896AbjCYN2q (ORCPT + 99 others); Sat, 25 Mar 2023 09:28:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231737AbjCYN2j (ORCPT ); Sat, 25 Mar 2023 09:28:39 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B673EEF86 for ; Sat, 25 Mar 2023 06:28:36 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id h8so18226508ede.8 for ; Sat, 25 Mar 2023 06:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679750915; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UyY2R9QNNXGK8lmhcVSCQDWNmU1D4Zz0mD1roX5FYPQ=; b=mzuOkHGbLxSKepiU+jo5J/HKy3Y+rUjpFmiMwAAN7Yu9zbvih3jmgyDa3aYJtjqZt3 zlV4wg2aQ67i+Jyocb8c6QmJuu+2167aYgENoDJR56fyR2n9xJuhEw3h9gE/aj9Q5Npg QfOXSMe7qycC6nS5lNaCrfSTGvxR62Hd75nHlKVrrelJ9mU9Qs1TxLsOhAKFEUMiBMY3 jUguKEVDlv27jiY9wcdIiU0ToD+HDgxPjHbuA3LNcuALCOlD0EMR6CxWPgarzpLvpE+S fkR+7MjRONnSJIXAni5LDfX3aZDSFOP/sMKV1okEFtdoRwhATE5TWcfuB5vHemI6ZaYh v12A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679750915; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UyY2R9QNNXGK8lmhcVSCQDWNmU1D4Zz0mD1roX5FYPQ=; b=nBhrj1o7M3JX1gzQJVlLewxA+TODnVVF6KSIlAkc6AY9vL3cHHawTGCn0Lqm4/C23+ FPC+SqW6x7AuH64EoXR3KjniRzJXmT6rJxLGoUriZF7YQb8CbJLxlK6rjtdiNI+TRiBp ORXxSAJhDiotldkygX9aETYpTt5Yc/oQuDh5sclFiFAVyjJRez061QrdRzuulLXPMm5L Prl/kUpHcgORpyhtrYQ+73llm0VtG7+FwNNxnBDdP0jHsOAaMdh+WNU8SL/e6DLIYB7X Y0mG6Rsyd+RCHFC/dl8bRmnPe/NlF9fei0ONZJU6a6eOaPpChkCjG81ku2np0+L7WDWY cpyQ== X-Gm-Message-State: AAQBX9f4f18M82pdVMtJNyy4nm8/IDnjKi4vCUIyOB6SeUFAT8GHdNrn YlkvNrlCIpHc/Z0KVtOd/e4= X-Received: by 2002:aa7:d50e:0:b0:502:1cd3:d0fb with SMTP id y14-20020aa7d50e000000b005021cd3d0fbmr6204820edq.20.1679750915271; Sat, 25 Mar 2023 06:28:35 -0700 (PDT) Received: from localhost.localdomain (ip5f5abbe9.dynamic.kabel-deutschland.de. [95.90.187.233]) by smtp.gmail.com with ESMTPSA id lt11-20020a170906fa8b00b008e54ac90de1sm11727610ejb.74.2023.03.25.06.28.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 06:28:35 -0700 (PDT) From: Michael Straube To: gregkh@linuxfoundation.org Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 2/4] staging: rtl8192e: remove redundant setting of rf_type Date: Sat, 25 Mar 2023 14:28:21 +0100 Message-Id: <20230325132823.22872-3-straube.linux@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230325132823.22872-1-straube.linux@gmail.com> References: <20230325132823.22872-1-straube.linux@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761347987222294396?= X-GMAIL-MSGID: =?utf-8?q?1761347987222294396?= At this point the value of priv->rf_type is RF_1T2R already. Setting it again is redundant and can be removed. Signed-off-by: Michael Straube --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 3027d43cb362..0e0096ef4943 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -350,10 +350,6 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) tempval = (rtl92e_eeprom_read(dev, (EEPROM_RFInd_PowerDiff >> 1))) & 0xff; priv->eeprom_legacy_ht_tx_pwr_diff = tempval & 0xf; - - if (tempval&0x80) - priv->rf_type = RF_1T2R; - } else { priv->eeprom_legacy_ht_tx_pwr_diff = 0x04; } From patchwork Sat Mar 25 13:28:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 74909 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp419826vqo; Sat, 25 Mar 2023 06:51:30 -0700 (PDT) X-Google-Smtp-Source: AKy350bqFykqAatElGFreiJXR0EFfYGa493vQeiQgOTjdDsdqe9CScu2wB2kxPFXgugO6Vge8v1u X-Received: by 2002:a17:90b:3910:b0:23f:e653:4a5a with SMTP id ob16-20020a17090b391000b0023fe6534a5amr6916325pjb.39.1679752290558; Sat, 25 Mar 2023 06:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679752290; cv=none; d=google.com; s=arc-20160816; b=egStpHBQK7Rr69ftl0BC87F7MDwHK9q+jYZ8c+IvFVOoMUcl/LorDohvrsQEEnmO4b IFUVVQ1XkkX3yJC8Tq6ecsYAiRLssug/EystYnY0060B6chkm5s6WPFq50hBFEZvPchS SizRPpHW9shXMsX7NOCw4DyVjtanv1nosxBF8YFsGWtahPeDF68Zmw6ngoeRy5vS2bYx 4fq7Ochr37LucNMYZCnZZqabrC3VJ99yr2mnzgOipOdBlNHzqixQOG6kYk7rAqtY4m6c vzPdt5H8gPsHSUpZEmFWlKxf8ldf4H/roYI1TcA2SCNG0+87tQTcVH38aC8+Kzuv4soi +4tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/TFO6l2l530pLCBQXneBnyGloncOzwtx1xlxfsKR6Qs=; b=yQlGQumppEOiMATTXwgD285GACXrSxN0ULbT+I9O2OtqNEnP61i60056E6eTWA9Hjj ScfUh1A4YlTVheXhVAr2O/pqxcGvvRMCeQM1yFw+sHJvxQj5nGMAeuvKemsQwWGqlX7k 5qmDdkDVUmLcGDgXP5sdyzEwLrg79MYq0+EDAbs2PZl2hGy/KA6qL7fQ6KOlwFALvB7N JAMb98I6fB5ltIEqzKaYzXXQwHECfsCYpNkbogjL5G4kaQxDfLBXhLgEWvSzIG+Wavuj M/zhg6I/LmRZeJuc/sSpJNXSJgKxXwMwY6ljVMZVl8w6AybyVob3sJOZKBMSVLU95tB7 r4vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ap7OLaUz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gx20-20020a17090b125400b00233e76fe27fsi6445481pjb.183.2023.03.25.06.51.16; Sat, 25 Mar 2023 06:51:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ap7OLaUz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231871AbjCYN2n (ORCPT + 99 others); Sat, 25 Mar 2023 09:28:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231569AbjCYN2i (ORCPT ); Sat, 25 Mar 2023 09:28:38 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5247B1042E for ; Sat, 25 Mar 2023 06:28:37 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id y4so18337308edo.2 for ; Sat, 25 Mar 2023 06:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679750916; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/TFO6l2l530pLCBQXneBnyGloncOzwtx1xlxfsKR6Qs=; b=Ap7OLaUzn0jB+rlcwEkoIZ+VV3MYSpOEYDv5C2CHymZdX8TrzrEKEPjKiQtnki8q79 J1AQ9YgfTpjDkg8a5q4pE2H/liE0g3zAJE/SbE+TVR/9QIr9ba7bglj3PDaXUCe5Ip9v jKDjBcC1Wg50F+91mL5aP3rq8uiQWX+0ikRWuRklD9THtEKeBqVF2D0UqFs+hSd3Rd2D JdZLME4ZnDyNEEt+ElF835NhhAMEwADoAQDWiEX+/OKlr27jdODzzfQyMUUN4stLRf5V c8l1I9gmMFJCiAIZ0WuruLZK557VRpAkHguIEbpws0G2DQ5j8Vmz+VoROffNKMlY0R8W es7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679750916; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/TFO6l2l530pLCBQXneBnyGloncOzwtx1xlxfsKR6Qs=; b=DTBJ7FrYeZwb/cfvsd3rLj0+h+oLturAJQFmIDkWkOSMc4Ajaox6eHO0BmjtsX3iFl 4ggnJ2M7xyAr6o466F3vtYIbn9owbaqVzeAnVFR0Olvz3HQcHPoitbed2sgJn9ovemuA o2iS8FbXnPfwJTIyTAdj7pxFi+//pdEejr6YOs/YTNm5FR4giFqiOO7ttEOzhNAwOxtz 2FvTBLCyCNKqNSN1Ad7RG0Oo441+900WDJ8RRkxwBPzstsbCPTuf7NU+HUM3iDfC2zQ0 ROqvvabCowFkG8fQWt14x9n4l3kSK5lBUCpVRoE9jamKbRPMtChEM6cjeNsWxgw+yqNg bn7Q== X-Gm-Message-State: AAQBX9efXa0tErtCjAepwDwXK/3uwqVZG/95Y6U0V6w9SPBXSpVZ3dWa UR/c7D6Bc5FiFsRshFNn1/o= X-Received: by 2002:a17:906:3590:b0:8b1:75a0:e5c6 with SMTP id o16-20020a170906359000b008b175a0e5c6mr6475706ejb.18.1679750915833; Sat, 25 Mar 2023 06:28:35 -0700 (PDT) Received: from localhost.localdomain (ip5f5abbe9.dynamic.kabel-deutschland.de. [95.90.187.233]) by smtp.gmail.com with ESMTPSA id lt11-20020a170906fa8b00b008e54ac90de1sm11727610ejb.74.2023.03.25.06.28.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 06:28:35 -0700 (PDT) From: Michael Straube To: gregkh@linuxfoundation.org Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 3/4] staging: rtl8192e: priv->rf_type is always RF_1T2R Date: Sat, 25 Mar 2023 14:28:22 +0100 Message-Id: <20230325132823.22872-4-straube.linux@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230325132823.22872-1-straube.linux@gmail.com> References: <20230325132823.22872-1-straube.linux@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761347937909677564?= X-GMAIL-MSGID: =?utf-8?q?1761347937909677564?= The value of priv->rf_type is always RF_1T2R. Remove if statements that check for priv->rf_type == RF_1T2R and remove resulting dead code. Signed-off-by: Michael Straube --- .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 13 ++++------- .../staging/rtl8192e/rtl8192e/r8192E_phy.c | 7 ++---- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 23 +++++++------------ 3 files changed, 14 insertions(+), 29 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 0e0096ef4943..b237970ecf85 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -540,8 +540,7 @@ static void _rtl92e_hwconfig(struct net_device *dev) u32 ratr_value; ratr_value = regRATR; - if (priv->rf_type == RF_1T2R) - ratr_value &= ~(RATE_ALL_OFDM_2SS); + ratr_value &= ~(RATE_ALL_OFDM_2SS); rtl92e_writel(dev, RATR0, ratr_value); rtl92e_writeb(dev, UFWP, 1); } @@ -1886,14 +1885,10 @@ void rtl92e_update_ratr_table(struct net_device *dev) break; case IEEE_N_24G: case IEEE_N_5G: - if (ieee->ht_info->peer_mimo_ps == 0) { + if (ieee->ht_info->peer_mimo_ps == 0) ratr_value &= 0x0007F007; - } else { - if (priv->rf_type == RF_1T2R) - ratr_value &= 0x000FF007; - else - ratr_value &= 0x0F81F007; - } + else + ratr_value &= 0x000FF007; break; default: break; diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c index b1c297d2ae36..bd302f5cb356 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c @@ -281,14 +281,11 @@ static void _rtl92e_phy_config_bb(struct net_device *dev, u8 ConfigType) u32 *Rtl819XPHY_REGArray_Table = NULL; u32 *Rtl819XAGCTAB_Array_Table = NULL; u16 AGCTAB_ArrayLen, PHY_REGArrayLen = 0; - struct r8192_priv *priv = rtllib_priv(dev); AGCTAB_ArrayLen = RTL8192E_AGCTAB_ARR_LEN; Rtl819XAGCTAB_Array_Table = RTL8192E_AGCTAB_ARR; - if (priv->rf_type == RF_1T2R) { - PHY_REGArrayLen = RTL8192E_PHY_REG_1T2R_ARR_LEN; - Rtl819XPHY_REGArray_Table = RTL8192E_PHY_REG_1T2R_ARR; - } + PHY_REGArrayLen = RTL8192E_PHY_REG_1T2R_ARR_LEN; + Rtl819XPHY_REGArray_Table = RTL8192E_PHY_REG_1T2R_ARR; if (ConfigType == BB_CONFIG_PHY_REG) { for (i = 0; i < PHY_REGArrayLen; i += 2) { diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index b745b73eedea..46be638677d9 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -272,19 +272,14 @@ void rtl92e_init_adaptive_rate(struct net_device *dev) pra->ping_rssi_enable = 0; pra->ping_rssi_thresh_for_ra = 15; - - if (priv->rf_type == RF_1T2R) { - pra->upper_rssi_threshold_ratr = 0x000fc000; - pra->middle_rssi_threshold_ratr = 0x000ff000; - pra->low_rssi_threshold_ratr = 0x000ff001; - pra->low_rssi_threshold_ratr_40M = 0x000ff005; - pra->low_rssi_threshold_ratr_20M = 0x000ff001; - pra->ping_rssi_ratr = 0x0000000d; - } - + pra->upper_rssi_threshold_ratr = 0x000fc000; + pra->middle_rssi_threshold_ratr = 0x000ff000; + pra->low_rssi_threshold_ratr = 0x000ff001; + pra->low_rssi_threshold_ratr_40M = 0x000ff005; + pra->low_rssi_threshold_ratr_20M = 0x000ff001; + pra->ping_rssi_ratr = 0x0000000d; } - static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); @@ -383,8 +378,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev) u32 ratr_value; ratr_value = targetRATR; - if (priv->rf_type == RF_1T2R) - ratr_value &= ~(RATE_ALL_OFDM_2SS); + ratr_value &= ~(RATE_ALL_OFDM_2SS); rtl92e_writel(dev, RATR0, ratr_value); rtl92e_writeb(dev, UFWP, 1); @@ -981,8 +975,7 @@ void rtl92e_dm_restore_state(struct net_device *dev) priv->rtllib->mode == WIRELESS_MODE_N_5G)) return; ratr_value = reg_ratr; - if (priv->rf_type == RF_1T2R) - ratr_value &= ~(RATE_ALL_OFDM_2SS); + ratr_value &= ~(RATE_ALL_OFDM_2SS); rtl92e_writel(dev, RATR0, ratr_value); rtl92e_writeb(dev, UFWP, 1); if (priv->tx_pwr_tracking_init && priv->btxpower_tracking) From patchwork Sat Mar 25 13:28:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 74910 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp420109vqo; Sat, 25 Mar 2023 06:52:10 -0700 (PDT) X-Google-Smtp-Source: AKy350ZVuEzUusHuyCgyKnGrYH4tNZVEGl9btK/gt3gq8JNbu7/uyS+h5FCKKj5t/uHdFSTj+XAC X-Received: by 2002:aa7:d806:0:b0:4fc:c644:6149 with SMTP id v6-20020aa7d806000000b004fcc6446149mr6520949edq.0.1679752329781; Sat, 25 Mar 2023 06:52:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679752329; cv=none; d=google.com; s=arc-20160816; b=s06LVFM+fyUbUIpXmAwo2YHBrJ1Y4ETArYxcM567Qq6xzBGDMhcQ2hJokXmOFYolRP yCl0NeHwvOAAidHNVUlj35sXyKQAILJ+hY+8Mcd5MKbxCKq/YqHCqrjw+AFX9R6t+EDQ YK5E10h/IzAdpzXbd+TTEiwKvYKNZy95O6TjNE6QssBdMXgZalPn9wqxrQW4ixrmVoHx MqY3+leAqY8JOAPWcNT5IOOd2AHd6XYlxuwyCRieRIvBjZvjCZ2TIff/8Dh9Bk1LmqoK +Bl8KlEqEKhEm5pN780wu/XOM5FkFciW9hYKMSyIzAtdo1QgrpH/+cUcYnjBxBId/NR/ kWwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6cG1+U1VS4mH8d3SR6UASaJ11y3INr/ZiCFmx1pUYXo=; b=0BZ6Q4NQrks6KcTDm5ijw3blUjfDdiEeydI6aRiGH1UgOO0oUv5h1sfbTmjquHVMzp 2Rw5daE8e5kbBcX7wM//Xb60FMd9ybdAw1tjGRkS1/mYxKFEXL6Fa/vDxZmjcGMXrBSr ugqpiS/HltPgqVj2Q6hW30QxHsNLi5siGoYUenuisVI+yuvjv7TEn+mBTvdnEXcDB6cb 1cj36MEmKPuAGOAh4KpaTQQDpGASPuZiOhrTeCMtJ8E810sRjaOycsPyLqeGHZGuIwKQ wl68qmZ6XnnIoHRPiHhTfF52a2+Y0cd240eYOE69Fz07NBV4nth94YCcpZtLXPUSgJ4Y z1IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gq9tvb7H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wu12-20020a170906eecc00b0093a36bdabe8si15378477ejb.807.2023.03.25.06.51.46; Sat, 25 Mar 2023 06:52:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gq9tvb7H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231920AbjCYN2s (ORCPT + 99 others); Sat, 25 Mar 2023 09:28:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231801AbjCYN2j (ORCPT ); Sat, 25 Mar 2023 09:28:39 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0EBEAF31 for ; Sat, 25 Mar 2023 06:28:37 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id b20so18343151edd.1 for ; Sat, 25 Mar 2023 06:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679750916; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6cG1+U1VS4mH8d3SR6UASaJ11y3INr/ZiCFmx1pUYXo=; b=gq9tvb7Hv3OJY3O9pPIimpfkWwxyNLV3n4S1GHoza2Fp1Y5BGEuywsmyKyalgbbhOy edWYfoUbOSvJz0+cIAAFbCR/Erk4ID1ndbbXj/1/9lzPGm73dXgqGxas47ZPSZFpyhD/ xSlIg+Pm56UfMOOZFe/5L6TwCI6J2qtMnTgyeqoKO4TlBjcmoP825wt6+Y+JVfsiop79 v9JfyBhTC1iOJtaRNaC/6uslJyO5eAJu55uKBC2e18NnqNBJ5jlb6Rg4hnV3CE3DFPRG b8dyRV4bsjDlI3OAhV8IYweCCvpsZi33HdWQOmZQ8NFsaJYPQY3T1Pwo0AByaMWjfqu2 +O/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679750916; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6cG1+U1VS4mH8d3SR6UASaJ11y3INr/ZiCFmx1pUYXo=; b=4OjHEmL31LtXFhhE/9Q8Y628Uu/d8OL8AmV+vwh3dxOHTUdyGrT6tV9pkC/qqfu/yM 8lbg6HxPOj0eku5x4umwjx9YClsMkq3aynIbzqZuOliKjpcGXegDLcar/ing7r32mkaA RBbkLuiEAO5XjiEHUm4NGYoFAehv8+1S2P+A3/SwwUV2YhaqSHx7T8j2sI3/AeYdxUoq SIpQ6/zFewSVwZEj6MviZA1mcyOAR1Mp/g0s63D106sf6A74mh+aF/YyWUggzV3zKjhr lMbIzkMGvutZkjYazcuqrXXawXocAtvdN63p/7/SSmOmN13O7272F9uJMwq45UwRM+75 TS7w== X-Gm-Message-State: AAQBX9eSAKGQ28khDMQ8025tR4WdPFBTIfYBD4/3CgISQEtQ+hUwgvtD MO7pgz0wnPo1IBDhJqAtW2M= X-Received: by 2002:aa7:cd71:0:b0:4fa:c7c9:62ea with SMTP id ca17-20020aa7cd71000000b004fac7c962eamr6627224edb.11.1679750916313; Sat, 25 Mar 2023 06:28:36 -0700 (PDT) Received: from localhost.localdomain (ip5f5abbe9.dynamic.kabel-deutschland.de. [95.90.187.233]) by smtp.gmail.com with ESMTPSA id lt11-20020a170906fa8b00b008e54ac90de1sm11727610ejb.74.2023.03.25.06.28.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 06:28:36 -0700 (PDT) From: Michael Straube To: gregkh@linuxfoundation.org Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 4/4] staging: rtl8192e: remove rf_type from struct r8192_priv Date: Sat, 25 Mar 2023 14:28:23 +0100 Message-Id: <20230325132823.22872-5-straube.linux@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230325132823.22872-1-straube.linux@gmail.com> References: <20230325132823.22872-1-straube.linux@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761347979284534154?= X-GMAIL-MSGID: =?utf-8?q?1761347979284534154?= The field rf_type of struct r8192_priv is always RF_1T2R and only used in one place. Use RF_1T2R directly there and remove rf_type from struct r8192_priv. Signed-off-by: Michael Straube --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 -- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index b237970ecf85..1eb063fe660a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -343,8 +343,6 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) else priv->tx_pwr_data_read_from_eeprom = false; - priv->rf_type = RF_1T2R; - if (priv->card_8192_version > VERSION_8190_BD) { if (!priv->autoload_fail_flag) { tempval = (rtl92e_eeprom_read(dev, diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 914cd28897a5..1e99eb833405 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -289,7 +289,6 @@ struct r8192_priv { enum nic_t card_8192; u8 card_8192_version; - u8 rf_type; u8 ic_cut; char nick[IW_ESSID_MAX_SIZE + 1]; u8 check_roaming_cnt; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 46be638677d9..d45808760638 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -532,7 +532,7 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) priv->rtllib->bdynamic_txpower_enable = false; powerlevelOFDM24G = priv->pwr_track >> 24; - RF_Type = priv->rf_type; + RF_Type = RF_1T2R; Value = (RF_Type<<8) | powerlevelOFDM24G; for (j = 0; j <= 30; j++) {