Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1052749rdb; Sat, 18 Nov 2023 00:52:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnu/O0UWZexIBcAesd85/HVDLYG3iU298i7wilrEUh1cnCjWSLFIt3SEiBAL9sMd58GITn X-Received: by 2002:a05:6a20:5483:b0:187:fa62:bb2d with SMTP id i3-20020a056a20548300b00187fa62bb2dmr1421782pzk.36.1700297545779; Sat, 18 Nov 2023 00:52:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700297545; cv=none; d=google.com; s=arc-20160816; b=h/0STwAylVOumaEh9jjZPOhnbDdH/Fa+VY4S6iF5eYRh3FJ00t8mTA//L2o8fsVLrj muQKfhQJxIkj0qXOvNlgAxGQulP+Tb37PBCUGDCpQGPFAnWALiR1RjdAZOLxTvBIBJMT PydEumazhAYxeOJF34hmYDOIw45T7LUIiqdXvvfzCI4HUcrS1XQqBUvMR3LYWi/2uo2c HsjhP/pEyKBzMX2Hdgk1VbEWbPNAjijPVOyWdR52ehNVJmn5JouENuLkRAWgPyj6VfLj lxZD+w+MN7KnuUSxgAGqvtz0me8wupWpshOvcyM+NfOUru38ujpdQT8WZs8CUIkZwn4e qa4w== 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 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id x13-20020a170902ea8d00b001c9ad2bc71esi3787675plb.251.2023.11.18.00.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 00:52:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; 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 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 80464820BCA7; Sat, 18 Nov 2023 00:52:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232920AbjKRIv5 (ORCPT + 99 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-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 agentk.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 (agentk.vger.email [0.0.0.0]); Sat, 18 Nov 2023 00:52:19 -0800 (PST) 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; -- 2.42.0