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++) {