Message ID | e2db309dea3208560337376fec26fa5cfba93848.1679732276.git.philipp.g.hortmann@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp297269vqo; Sat, 25 Mar 2023 02:21:21 -0700 (PDT) X-Google-Smtp-Source: AKy350ZnN+/RsjitPzq8QicR3KWhqrZRKDMjb4C8Y+Xa0XlmO8NjvyW7TVozkwNb+oaoVaTO4o8g X-Received: by 2002:aa7:da12:0:b0:4ff:7116:189e with SMTP id r18-20020aa7da12000000b004ff7116189emr7083213eds.31.1679736081045; Sat, 25 Mar 2023 02:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679736081; cv=none; d=google.com; s=arc-20160816; b=wEi13vzg3/WM3AnHDR+cp6uzyedYHZhalEtBp6hekisQG1R6kpks9B1nFOTJO9vJBV Vkb43ih1yw/I2YMLEh3T1kbT01VVPTwtl5uHNFb+qcYzMXo15SjW+gZGokMMUya6H6oR XZ4GqE9X7PjQnOVUfCavRSFr92a6H2Fs1iaGHHhkTmzfylvxJhB5234XXCJBHFYUsrwD R8HcA03AyLkSDFonNeMhlaGn8iM9ulk+00jdqK6HPRb7XuW/tEIU8pDYByTKIuwgc2j8 KoE+E6Qm77O02eY7x9DvR6Zj+S/2R4l1+BxV/uReqiKptpshX/X4NmIgxswNh3kL2if6 YNZw== 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=TxvwzNHlMhQxqbhDKY/vp8koWCnsLAxNykHAaCh4kRg=; b=byfg1fffk7rxfp4PDL+WsI5ycKvcq70cqe8VIlJUj/98ZQ6I1QmOiWovMZvsgIXJS6 HcO00TjcdilnR4pLBhQcJkGUQeQS0hW8r94qFAELzz4Ml6ECtBsrtrboq+jBjeRHN4Xh kpVkVid3qECCpjqhr2avWjwL4531w4acNUQ7KQEFwTofPDRdmOIGd0e2YtnPDM8xrf5V 65Idfd5sJnsC1KZiOrLjcmmiGRNitDgAue+4q6//NnDBjf6JLSZAhw/pBpJR5/+JGoxn ZjDketbTgFOxJR7lwCRZRlF1G1USPpJOWv4+QsgjGgq8vuZ9rEKS6/S4EfhNJnEhFNuq tHqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="X/uzSL9E"; 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 r7-20020a056402034700b004acdca46ec2si24140844edw.440.2023.03.25.02.20.57; Sat, 25 Mar 2023 02:21:21 -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="X/uzSL9E"; 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 S232356AbjCYIho (ORCPT <rfc822;makky5685@gmail.com> + 99 others); Sat, 25 Mar 2023 04:37:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232317AbjCYIhK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 25 Mar 2023 04:37:10 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC83C19133 for <linux-kernel@vger.kernel.org>; Sat, 25 Mar 2023 01:36:57 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id er18so5298990edb.9 for <linux-kernel@vger.kernel.org>; Sat, 25 Mar 2023 01:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679733416; 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=TxvwzNHlMhQxqbhDKY/vp8koWCnsLAxNykHAaCh4kRg=; b=X/uzSL9Eb0S+87/KxZ9kB9/5y1GkDhCeHTfCE9i/WhoE4SiX0y0Z85UbK3XRpZeF8V AH5Nrvm1dJa/yqzWOjEsdVRZaCuuRf4t4/OkNP3VVE+dn0wywLLrBIMhEXMhv8fx3Chl Q/H9owBF18aJlv7SuA+dmhP31nyzj+YiaRRSDZc8QXZPWAJYO+yviUVsOQpGOHzA4f7F rAlcv1dMw6b3MAD/1ILwUXif59PJ2Pw0UaIaZWwbxTTx0g0B3BjJagOxIA4LZbsXwGzj aqluWNZ3HsnrqaeBm2WQ71d32zdD0LZ64R1g6NlHfndddk5VvGh3ObM+G+Z7Fko0jRds cV+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679733416; 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=TxvwzNHlMhQxqbhDKY/vp8koWCnsLAxNykHAaCh4kRg=; b=kpzoI5Ve5k5Hx5FbghQcGjl3UZoZltvmgPPYoLpaOsDs/s0j3gIqIt5Bp9fcpjOMuV VWdzwy/wdxRQsLPk6yBwhHISoEhrzil4/CLsWczFzLi/r4VrDYLmLNZAITTr0GnRA68B yG8hngBGnjOO/sXKRN0LNcL5gUdga2w5NMHw7KwBsydQ+22Q2m3xhSkd8nbwxvut8OU4 H8foKgnvhbloMTs5Ci31k6OtkBDLpGkB94vpax6B1DxPlhI2b4qsYmaaydSpdnSzSvmC L2xJlKlZ3qTw7+/YhvPmU8YVZCOYpLkHJnTgLLFEl6hTvS9JR/t1AHU4hufX1bfeBEth Ncfw== X-Gm-Message-State: AAQBX9fiqQ2MVd/U+bGj3gEBSBNBD9pJRbyDZHLSJEuzEw8p/xT/wkTo 6VptodjBJyXtW0ivWDIExHo= X-Received: by 2002:a17:906:74ca:b0:8b1:2614:dea6 with SMTP id z10-20020a17090674ca00b008b12614dea6mr5108823ejl.1.1679733416406; Sat, 25 Mar 2023 01:36:56 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id n15-20020a170906118f00b0092421bf4927sm11642321eja.95.2023.03.25.01.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 01:36:56 -0700 (PDT) Date: Sat, 25 Mar 2023 09:36:54 +0100 From: Philipp Hortmann <philipp.g.hortmann@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 09/11] staging: rtl8192e: Remove rf_chip in _rtl92e_get_supported_wireless_mode Message-ID: <e2db309dea3208560337376fec26fa5cfba93848.1679732276.git.philipp.g.hortmann@gmail.com> References: <cover.1679732276.git.philipp.g.hortmann@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <cover.1679732276.git.philipp.g.hortmann@gmail.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761330940963698537?= X-GMAIL-MSGID: =?utf-8?q?1761330940963698537?= |
Series |
staging: rtl8192e: Remove variable priv->rf_chip from driver
|
|
Commit Message
Philipp Hortmann
March 25, 2023, 8:36 a.m. UTC
priv->rf_chip is initialized to RF_8256 and never changed. Remove
condition in function _rtl92e_get_supported_wireless_mode as it is dead
code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 3244aef12c05..8e4e939d7617 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -595,23 +595,9 @@ static void _rtl92e_refresh_support_rate(struct r8192_priv *priv) static u8 _rtl92e_get_supported_wireless_mode(struct net_device *dev) { - struct r8192_priv *priv = rtllib_priv(dev); u8 ret = 0; - switch (priv->rf_chip) { - case RF_8225: - case RF_8256: - case RF_6052: - case RF_PSEUDO_11N: - ret = (WIRELESS_MODE_N_24G | WIRELESS_MODE_G | WIRELESS_MODE_B); - break; - case RF_8258: - ret = (WIRELESS_MODE_A | WIRELESS_MODE_N_5G); - break; - default: - ret = WIRELESS_MODE_B; - break; - } + ret = (WIRELESS_MODE_N_24G | WIRELESS_MODE_G | WIRELESS_MODE_B); return ret; }