From patchwork Fri Oct 13 14:44:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 152599 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1943320vqb; Fri, 13 Oct 2023 07:44:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnI599gHl3/4qiji7X2OrFJVNrLhAals828J2W/rINR9H6IOsaXgjELZqevamrd0y+mh7Z X-Received: by 2002:a17:902:e5d2:b0:1c4:1cd3:8062 with SMTP id u18-20020a170902e5d200b001c41cd38062mr30345948plf.2.1697208270954; Fri, 13 Oct 2023 07:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697208270; cv=none; d=google.com; s=arc-20160816; b=EElWl8bJNBpTYOEjWS43cWqYEY8EEClH+pQE08TEC4sd62B2jpZvVp8bJ6mPTlucYi m2aY42D7PdZ9S9hD6QYAqE7DfbRJ4ZLvA21M+0Y7JRZ1poxxsHzfd+M6uJKFYaPFJWmd yPbkYPxJOiDpAD+xTyIG/XwOMMiLhXIJNjWWC8GqkjueCeSWo9DuplPJZREKv5xfQOPm hZ6f+m0lp8pDK0ZietCn7SK8I0pugEYjBKQ8Yk4yROzUBk1b9GYh9Uzzeic1ZSeGpU12 liH5mzS4zxECk3JnNtHyc8mdtG6ToUKW1k6tZzfrnaPLHoqjsE47P1aGffBLCS7ftkoR tvkg== 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=2pr0IzxvU4PJX3BEoAev8yksHWUcNoh24JtDBC0yvj8=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=Eb23h98WPwuQDMukAcfLCqKVYTcytEvo78k4ndXn4UC8JrVxbffKJpHlgo6iB7nY9Q 6u81uQ0/Icq/idILSy7fPAr0e2D4na1jLW8GIEJc73bom88qpTiMu9hbPG1xjai/T48w gIMGhRc5/J7hWSvREiMG/xir22WmQqW4JCgMFxXqyjitmCjNVuYF/dB2NzBQoBs/Z9fl 9WUm8b3mtozb1326k6L+LKN7z8zfKnY63V8pfQnR3tL6CCJKfWZ6HrNpuLVxlQU/p46Q oL93j+tM0K6fO8wPUKJv1Je2B1Dxf0OywvEcfU8UiSRnWjYbGyvyzennnxiPuplj07Z4 YtMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MgD21UYq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id q18-20020a170902bd9200b001c72d694ec7si4271897pls.328.2023.10.13.07.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 07:44:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MgD21UYq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id D6411801CF19; Fri, 13 Oct 2023 07:44:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232166AbjJMOoN (ORCPT + 19 others); Fri, 13 Oct 2023 10:44:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232183AbjJMOoL (ORCPT ); Fri, 13 Oct 2023 10:44:11 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C717ACA for ; Fri, 13 Oct 2023 07:44:08 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-405e48d8e72so5561735e9.0 for ; Fri, 13 Oct 2023 07:44:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697208247; x=1697813047; 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=2pr0IzxvU4PJX3BEoAev8yksHWUcNoh24JtDBC0yvj8=; b=MgD21UYqDQ/DEUBTumtP+Q/fEX2M6J736jyUlnOg1AnIoR31DTVokUxR2JIQd3+ujJ 1nt46gYP/M4pdvDvtXZ/NVo+0XUc3v0VHf/OOCFv2zGCPtw7wpTN5CTRSj1LAJOP6Gj8 Cmb621i+8bbIt99A35j6xed46A7anqZR8gTFlaq5RQe9npehg4esjMdVjIliS08QACcj H0ruOiKBYJJpOko5mF3DvqlwQ4oNyv/hdMPm13eVqYzOvXM4+cui+UcxiOP1f4ptnAev F0oErY361jNnhESKBb5G4ZGruDhUIMUm+R8h5sMHTDzjjuGR53eUQhA17/N2eIbQd1bm ZusA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697208247; x=1697813047; 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=2pr0IzxvU4PJX3BEoAev8yksHWUcNoh24JtDBC0yvj8=; b=H6GpkmxwxaUN5UoV2HvUtzuorp6K8FbNKCo5d8oxAAKYANVmqIdp0/Dc/Ap41PuITz 1hkPxxNhW5pZYrHqY738ykXgae+KGp6cTRq/h8UKOIPPxFpizVILSlkfbHpGyR1UUp6C Qs5JkiOU+RwfMombNjiAXSXj7bYY6UpaN3JdcFy7YB6xyPq9P7K3Im+sKAv4rp1jxUx3 vh5Wu/NnvqVlLGmfp43j1QjfaaNXSxknrnW0v7miKmJj3cDDd5e1gt+eaeof7cUxQps/ tnRPpGUj+ovFYs6Y+jonDkBdY0T55Kyz85jazI1x57SbsCNA4JbWPeAac1qRoA7fWo/x y4+g== X-Gm-Message-State: AOJu0YwwBdiF5xOIkI8dXxkWUxXZJoky0SxbNrFp2irXqzM9DL2XP5Ma m/ekDBtd58PQdkKyypD9qOk= X-Received: by 2002:a05:600c:3c96:b0:403:334:fb0d with SMTP id bg22-20020a05600c3c9600b004030334fb0dmr24327640wmb.4.1697208246738; Fri, 13 Oct 2023 07:44:06 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p579356c7.dip0.t-ipconnect.de. [87.147.86.199]) by smtp.gmail.com with ESMTPSA id r15-20020a05600c35cf00b00401e32b25adsm333362wmq.4.2023.10.13.07.44.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 07:44:06 -0700 (PDT) Date: Fri, 13 Oct 2023 16:44:05 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] staging: rtl8192e: Remove _rtl92e_dm_ctrl_initgain_byrssi_false_alarm() Message-ID: <80a5a0b67d9d225a58c96781c33e2216c0ea1c6e.1697127817.git.philipp.g.hortmann@gmail.com> 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Fri, 13 Oct 2023 07:44:27 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779651860010059269 X-GMAIL-MSGID: 1779651860010059269 Remove function _rtl92e_dm_ctrl_initgain_byrssi_false_alarm() as it is unused. Remove in above function called function _rtl92e_dm_ctrl_initgain_byrssi_highpwr() as well. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 115 --------------------- 1 file changed, 115 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 2bbc6a67188c..e69c22e5d205 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -163,9 +163,7 @@ static void _rtl92e_dm_check_tx_power_tracking(struct net_device *dev); static void _rtl92e_dm_dig_init(struct net_device *dev); static void _rtl92e_dm_ctrl_initgain_byrssi(struct net_device *dev); -static void _rtl92e_dm_ctrl_initgain_byrssi_highpwr(struct net_device *dev); static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev); -static void _rtl92e_dm_ctrl_initgain_byrssi_false_alarm(struct net_device *dev); static void _rtl92e_dm_initial_gain(struct net_device *dev); static void _rtl92e_dm_pd_th(struct net_device *dev); static void _rtl92e_dm_cs_ratio(struct net_device *dev); @@ -987,119 +985,6 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev) dm_digtable.pre_sta_connect_state = dm_digtable.cur_sta_connect_state; } -static void _rtl92e_dm_ctrl_initgain_byrssi_false_alarm(struct net_device *dev) -{ - struct r8192_priv *priv = rtllib_priv(dev); - u8 i; - - if (dm_digtable.dig_algorithm_switch) { - dm_digtable.dig_state = DM_STA_DIG_MAX; - for (i = 0; i < 3; i++) - rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x1); - dm_digtable.dig_algorithm_switch = 0; - } - - if (priv->rtllib->link_state != MAC80211_LINKED) - return; - - if ((priv->undecorated_smoothed_pwdb > dm_digtable.rssi_low_thresh) && - (priv->undecorated_smoothed_pwdb < dm_digtable.rssi_high_thresh)) - return; - if (priv->undecorated_smoothed_pwdb <= dm_digtable.rssi_low_thresh) { - if (dm_digtable.dig_state == DM_STA_DIG_OFF) - return; - - dm_digtable.dig_highpwr_state = DM_STA_DIG_MAX; - dm_digtable.dig_state = DM_STA_DIG_OFF; - - rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x8); - - rtl92e_writeb(dev, rOFDM0_XAAGCCore1, 0x17); - rtl92e_writeb(dev, rOFDM0_XBAGCCore1, 0x17); - rtl92e_writeb(dev, rOFDM0_XCAGCCore1, 0x17); - rtl92e_writeb(dev, rOFDM0_XDAGCCore1, 0x17); - - if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) - rtl92e_writeb(dev, (rOFDM0_XATxAFE + 3), 0x00); - else - rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x42); - - rtl92e_writeb(dev, 0xa0a, 0x08); - - return; - } - - if (priv->undecorated_smoothed_pwdb >= dm_digtable.rssi_high_thresh) { - u8 reset_flag = 0; - - if (dm_digtable.dig_state == DM_STA_DIG_ON) { - _rtl92e_dm_ctrl_initgain_byrssi_highpwr(dev); - return; - } - - dm_digtable.dig_state = DM_STA_DIG_ON; - - if (reset_flag == 1) { - rtl92e_writeb(dev, rOFDM0_XAAGCCore1, 0x2c); - rtl92e_writeb(dev, rOFDM0_XBAGCCore1, 0x2c); - rtl92e_writeb(dev, rOFDM0_XCAGCCore1, 0x2c); - rtl92e_writeb(dev, rOFDM0_XDAGCCore1, 0x2c); - } else { - rtl92e_writeb(dev, rOFDM0_XAAGCCore1, 0x20); - rtl92e_writeb(dev, rOFDM0_XBAGCCore1, 0x20); - rtl92e_writeb(dev, rOFDM0_XCAGCCore1, 0x20); - rtl92e_writeb(dev, rOFDM0_XDAGCCore1, 0x20); - } - - if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) - rtl92e_writeb(dev, (rOFDM0_XATxAFE + 3), 0x20); - else - rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x44); - - rtl92e_writeb(dev, 0xa0a, 0xcd); - - rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x1); - } - _rtl92e_dm_ctrl_initgain_byrssi_highpwr(dev); -} - -static void _rtl92e_dm_ctrl_initgain_byrssi_highpwr(struct net_device *dev) -{ - struct r8192_priv *priv = rtllib_priv(dev); - - if ((priv->undecorated_smoothed_pwdb > - dm_digtable.rssi_high_power_lowthresh) && - (priv->undecorated_smoothed_pwdb < - dm_digtable.rssi_high_power_highthresh)) - return; - - if (priv->undecorated_smoothed_pwdb >= - dm_digtable.rssi_high_power_highthresh) { - if (dm_digtable.dig_highpwr_state == DM_STA_DIG_ON) - return; - dm_digtable.dig_highpwr_state = DM_STA_DIG_ON; - - if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) - rtl92e_writeb(dev, (rOFDM0_XATxAFE + 3), 0x10); - else - rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x43); - } else { - if (dm_digtable.dig_highpwr_state == DM_STA_DIG_OFF) - return; - dm_digtable.dig_highpwr_state = DM_STA_DIG_OFF; - - if ((priv->undecorated_smoothed_pwdb < - dm_digtable.rssi_high_power_lowthresh) && - (priv->undecorated_smoothed_pwdb >= - dm_digtable.rssi_high_thresh)) { - if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) - rtl92e_writeb(dev, (rOFDM0_XATxAFE + 3), 0x20); - else - rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x44); - } - } -} - static void _rtl92e_dm_initial_gain(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev);