From patchwork Sat Nov 18 08:51:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 166477 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp1065134vqn; Sat, 18 Nov 2023 00:53:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIsN9w+dmmGszorxWyOy2R/m+fVV+y9kWjFWqmQpwfC8lnjdQrGMqeI+ByhfAd3LoE/K9J X-Received: by 2002:a05:6a20:d907:b0:187:703a:8658 with SMTP id jd7-20020a056a20d90700b00187703a8658mr1808076pzb.59.1700297602948; Sat, 18 Nov 2023 00:53:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700297602; cv=none; d=google.com; s=arc-20160816; b=Qsj1uIjL/ztFm2LKXwZFaHsB+Jujzxn6h5i+aUUUD+ymXn5hufIRCCGdGLFixb7xA3 Ey75mNU4fRBXs//EkPHaoSZnCUTTHTylqOFmLlDkUjiMI41Swy6ugp2adVr/3do57BBt mocaPKzCVACYiJ6EsXuC/TcL0dSRQAyqVdHdOK4ubDfTqmUtYhd2Z2LLtj5XYcdj9oqB wDIiouNPbP9ABTpF/azvH5ykvLlmHA1kYpTM2eJVkno4lmaTNEuKIAN69DRaqh5+QHh+ ko09VVctabmRsHoddRHSkCrqm9AAgp0kPuq2EY17LKw8pWRvyJ8v3F9kkeOr6KiAfVlq QMfw== 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=fFLHsxGK7k/8eykGJrZMJGzqZ9wJ0aqJSpq01GUYpM8=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=aGp+O3J22Ca2gP1E054BAwD/Cb4YozJTIhTaNI/luh7GOvS/u6+svg/WJ1CBs0QQ5F s4nYHiiDkcTmuKtr9Sj/rRt9A/v50nWeUfA2mzHnYpgD3W7r5whPmX3MIbtMghjQyp5+ ZMI7DlvXyY+kVHOstyOg30GqgQuzt5xeC+yPuRxvmjKI3nPo4W9AOznoQSrWwakoaxDM Y0kH9oGxZE7lEiS1vevy7qVDR+o6Kns67moQnowjF9pVwL9WPkq9v/bpsawBP/2wfQAg B+uofOpZVYYBvSyqX5HtK2PvrZpJFAiMrK9+e/pqnzBTqKtYHbSVv+5lFtjsawBvATMe P0oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LGr98wLg; 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id n14-20020a170903110e00b001c9d690baa4si3948426plh.532.2023.11.18.00.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 00:53:22 -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=LGr98wLg; 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 89DAE809B777; Sat, 18 Nov 2023 00:52:14 -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 S233204AbjKRIv5 (ORCPT + 29 others); Sat, 18 Nov 2023 03:51:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232869AbjKRIvo (ORCPT ); Sat, 18 Nov 2023 03:51:44 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BEDCD79 for ; Sat, 18 Nov 2023 00:51:37 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9e3eaf098f1so76682966b.0 for ; Sat, 18 Nov 2023 00:51:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700297496; x=1700902296; 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=fFLHsxGK7k/8eykGJrZMJGzqZ9wJ0aqJSpq01GUYpM8=; b=LGr98wLgCyrn/CP4yhiyJ8KiFXJNPcWRY3B9lj0LMh77PcmwVQN1x8K0emcRhHzKvA N5Q+hnN0f/Mlqtu/NVPZiygwVqmkzpfu+wwNFA++EICSHFLv1tTPFnWPQbLjfeQvlJ+2 VILLJr8AX/7QqJje+3R3mfUqC4Xu9/V+Hy5EcweXhjgJ/FxLuFWEthBlJKAVcDVDE/Y9 LVaouIkYzF0H2Av1nqAVbdwcolQLS0MsP3zwV45jVimsxJxk02AKfQSTGHHd6n/IHxTu fd1H9zyFfyusyUd3cf3F3bwEvJ6r6KI6YcfcnLzEvGr7EMeTe8bBNb/QXWMLL131OMro Sa2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700297496; x=1700902296; 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=fFLHsxGK7k/8eykGJrZMJGzqZ9wJ0aqJSpq01GUYpM8=; b=oDCyaUfKVvEpnKnDZQ9j7L+XJa76hs8JajQHLPzXe1KLaPRRKNgFVZ6EEwouCBZ+qo Z8TTdEIlUnMJivYnUWNqXqTOZdMPLE1Ciz7Tx8r3MZ+D8w72vzJ96F4Fec/CProwuCnm 7FFnIsqPNYNX2EoM/NpwzrA+b9gWIhDq9m2KJZLBLyFT6qY/GHDIfq5QPF64RKB43eCD v/nGRcIQ6v7DwxvLb0M0Lz4P63dXEk0XkXQ2Ca3KcN/E8lhxHz5+J6nyvNYsWe/6Q2VN ACoILM76qv4EG/GwJtTGG+9a+PYWUp8jW8QhLqbhimpZ7MW5e+BLpJAm27hXLtw95J2o eicQ== X-Gm-Message-State: AOJu0Yz2/5UY4CV5KMLDf2IHdbGhrVS4ncU31ORBR1wuhOX1eqvs3sCo Y5waynji+dbTfiz0JoEMl9Q= X-Received: by 2002:a17:906:1da:b0:9cf:7d6e:2c3e with SMTP id 26-20020a17090601da00b009cf7d6e2c3emr1133601ejj.7.1700297495823; Sat, 18 Nov 2023 00:51:35 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p57ba2f20.dip0.t-ipconnect.de. [87.186.47.32]) by smtp.gmail.com with ESMTPSA id l2-20020a170906230200b009fb1fc8c405sm214001eja.179.2023.11.18.00.51.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 00:51:35 -0800 (PST) Date: Sat, 18 Nov 2023 09:51:34 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 05/10] staging: rtl8192e: Remove constant variable chnl_plan Message-ID: References: MIME-Version: 1.0 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]); Sat, 18 Nov 2023 00:52:14 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782891259021913555 X-GMAIL-MSGID: 1782891259021913555 Remove constant variable chnl_plan and replace it with its constant. Remove equation that limits maximum value of chnl_plan as it is always false. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 -- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 7 +------ drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 44898e0be21c..9b51deba149b 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -396,8 +396,6 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) break; } - priv->chnl_plan = COUNTRY_CODE_WORLD_WIDE_13; - if (priv->eeprom_vid == 0x1186 && priv->eeprom_did == 0x3304) priv->rtllib->bSupportRemoteWakeUp = true; else diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 2789f428e4f9..68bd03500267 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -795,13 +795,8 @@ static short _rtl92e_get_channel_map(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); - if (priv->chnl_plan >= COUNTRY_CODE_MAX) { - netdev_info(dev, - "rtl819x_init:Error channel plan! Set to default.\n"); - priv->chnl_plan = COUNTRY_CODE_FCC; - } dot11d_init(priv->rtllib); - dot11d_channel_map(priv->chnl_plan, priv->rtllib); + dot11d_channel_map(COUNTRY_CODE_WORLD_WIDE_13, priv->rtllib); for (i = 1; i <= 11; i++) (priv->rtllib->active_channel_map)[i] = 1; (priv->rtllib->active_channel_map)[12] = 2; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 348df71e122e..addaa1eb39ee 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -310,7 +310,6 @@ struct r8192_priv { bool tx_pwr_data_read_from_eeprom; - u16 chnl_plan; u8 hw_rf_off_action; bool rf_change_in_progress;