From patchwork Tue Feb 7 18:17:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 54028 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2388:b0:96:219d:e725 with SMTP id i8csp4222473dyf; Tue, 7 Feb 2023 10:20:53 -0800 (PST) X-Google-Smtp-Source: AK7set+FnPQO+2Pk9FiGFKZBem2EguCmSCRE1JiijaV7tKnSWlzwbYbX8TpvMmzHvpw0PvBBuYYO X-Received: by 2002:a17:903:110e:b0:192:ac33:7f91 with SMTP id n14-20020a170903110e00b00192ac337f91mr4598354plh.69.1675794053167; Tue, 07 Feb 2023 10:20:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675794053; cv=none; d=google.com; s=arc-20160816; b=fKviHW1noJhVoZNx2ovoOgevmtcUQur6g2r1d4DDvlmWl+Yz4m2RsPjdjsWYac+pTM sP+7GgAfcUCgoNr/CZHo8qS8MmYC+csZjyb+zEVD54BxvEvPdKWf7F6WQq2EmO97jkLM zRfGH+cA4KXXSCEXzISVBCXRntN+Mz4ykX2Nj7gNibxQ4cjADyMfZm4/bqz/N6BqtSdC 9aL80ltK9bia6VY9un2umGBE7WSwbbfJSaHRyLi/dkTaNQJhGgGeKAVr2QVLLrn3SewP xiIbQ0SxgGmJovi2eU4ja20UJh5VesYsyt+Kv3jMog4rA3BXbstntLC4z1AAoHhqNchZ HVFA== 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=HTiF0YIa3PdrY6tKdiAmvkQYvcKnR6W7qr1uTcPoR/g=; b=EKpS0yozEkwHURSf4Y/w6REKfIJiL7TBCuDkG+NnqaZZDU60Q0TCOlTCGWF600q1YZ DnfxGNM5EnkYtBZ4fP2lLtwfQGDfxtOXISo1IFMpApe+HzDjJ7aQ0/lZZYGQxs6JndHj 6xZDs/7KYAWlzI/w2Z3CTalIzQprEphPrl1BZ3IfmPpAzAcqPCVniZ+Phz3EQHYnbRfi 4XRPyHv+yN6ETkYF1XLmUpkBTvh6vsCgV8LFnVFn4XipjvMfFn9pETQUGkYTgMbE3n5f w71O14M/lS2pJ4agaYOrpuO2y0Ajt0uA9ju51JP9QqwqpwgrybzdFv5JJJxx6j3fmY90 pymw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E28KMjB6; 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 h9-20020a170902f54900b0019930b3ed3fsi2640067plf.160.2023.02.07.10.20.38; Tue, 07 Feb 2023 10:20:53 -0800 (PST) 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=E28KMjB6; 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 S231586AbjBGSSc (ORCPT + 99 others); Tue, 7 Feb 2023 13:18:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232185AbjBGSRw (ORCPT ); Tue, 7 Feb 2023 13:17:52 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C25383C2A3 for ; Tue, 7 Feb 2023 10:17:26 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id bg5-20020a05600c3c8500b003e00c739ce4so3526685wmb.5 for ; Tue, 07 Feb 2023 10:17:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=HTiF0YIa3PdrY6tKdiAmvkQYvcKnR6W7qr1uTcPoR/g=; b=E28KMjB6gPE5bfO5zuiBwwhmm3qDhLnvhlfgqmaoOvtQ3CqIBV4visKND1+YBY3jgY 5jF82T5SFlKukUcRjsJj0dsHFO7LUyvljttMlNbOCsKb4eNeM8Jn7Etfo8lDP97VPgBQ rSd/w+DXXAnZatMok8RKFMebVe97pDWSGg3uNOMyezOfHlJezJY+Jo7/1mUxhrJZmOJw bXO+JgiZw0OUZn9G43vbaHpO+R9zpg9v2Bf1LOhkGcbZVB71P3LPbOCYHU05ZLQ6ZDjd zCsyejOu3xa5TiQgY7uj1BWyuFblqyCg/I/5Om77JOmKo3FAc9t2vX7AngWDo/2OtSJU KuKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=HTiF0YIa3PdrY6tKdiAmvkQYvcKnR6W7qr1uTcPoR/g=; b=Eqgbcqd+UlTJSthOKYka4ZeBJrc0kg9TFUqxHulef66fkyD9ViCgAf/DxLADMFHx54 XywtKYfR/pbVKGeBWx2Ta2bLmFKe2HPfWGddE00i4Trvy0QB12+s9UHFMcyXSgrsQToB cjGiXV4vwt7/rB8o5WnLSfoKbm02Sq72xn4aRmYiKn1iHH/U2SeRKWYJoDvU8LdJSXd5 CeGFA6DDQ2DGhCLivgHRX1xucMBNPUGj2VS/4QzRxRzA0oLx2+n4uBVT8LFWDkMqIzjp iWl81LwaRb1Djn7uoiB2tTcNSNk04JMMS9jg1NKX+sZYytERKAP4nOYxs+y2inkqbVIm hk2w== X-Gm-Message-State: AO0yUKUal8SKdByV8oZIWP0K+d/kW13PFiMmTu8ggQnFsf11ryIltvQG dFvj5KY26UGYTK9D4+5qmIE= X-Received: by 2002:a05:600c:3ca3:b0:3dc:5ae4:c13d with SMTP id bg35-20020a05600c3ca300b003dc5ae4c13dmr5182028wmb.4.1675793845136; Tue, 07 Feb 2023 10:17:25 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id 14-20020a05600c228e00b003dd9232f036sm16252810wmf.23.2023.02.07.10.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 10:17:24 -0800 (PST) Date: Tue, 7 Feb 2023 19:17:22 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 10/10] staging: rtl8192e: Rename DM_RxPathSelTable Message-ID: <8846ad13a4ee4b534d2410c9bca0c2943500c858.1675792435.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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?1757197425050759410?= X-GMAIL-MSGID: =?utf-8?q?1757197425050759410?= Rename variable DM_RxPathSelTable to dm_rx_path_sel_table to avoid CamelCase which is not accepted by checkpatch. Remove "extern struct drx_path_sel DM_RxPathSelTable;" in rtl_dm.h as it is dead code. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 60 +++++++++++----------- drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 1 - 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 911cfecd50cb..d8455b23e555 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -144,7 +144,7 @@ const u8 dm_cck_tx_bb_gain_ch14[CCK_TX_BB_GAIN_TABLE_LEN][8] = { /*------------------------Define global variable-----------------------------*/ struct dig_t dm_digtable; -struct drx_path_sel DM_RxPathSelTable; +struct drx_path_sel dm_rx_path_sel_table; /*------------------------Define global variable-----------------------------*/ @@ -1720,7 +1720,7 @@ void rtl92e_dm_rf_pathcheck_wq(void *data) else priv->brfpath_rxenable[i] = false; } - if (!DM_RxPathSelTable.enable) + if (!dm_rx_path_sel_table.enable) return; _rtl92e_dm_rx_path_sel_byrssi(dev); @@ -1731,18 +1731,18 @@ static void _rtl92e_dm_init_rx_path_selection(struct net_device *dev) u8 i; struct r8192_priv *priv = rtllib_priv(dev); - DM_RxPathSelTable.enable = 1; - DM_RxPathSelTable.ss_th_low = RX_PATH_SEL_SS_TH_LOW; - DM_RxPathSelTable.diff_th = RX_PATH_SEL_DIFF_TH; + dm_rx_path_sel_table.enable = 1; + dm_rx_path_sel_table.ss_th_low = RX_PATH_SEL_SS_TH_LOW; + dm_rx_path_sel_table.diff_th = RX_PATH_SEL_DIFF_TH; if (priv->customer_id == RT_CID_819X_NETCORE) - DM_RxPathSelTable.cck_method = CCK_Rx_Version_2; + dm_rx_path_sel_table.cck_method = CCK_Rx_Version_2; else - DM_RxPathSelTable.cck_method = CCK_Rx_Version_1; - DM_RxPathSelTable.disabled_rf = 0; + dm_rx_path_sel_table.cck_method = CCK_Rx_Version_1; + dm_rx_path_sel_table.disabled_rf = 0; for (i = 0; i < 4; i++) { - DM_RxPathSelTable.rf_rssi[i] = 50; - DM_RxPathSelTable.cck_pwdb_sta[i] = -64; - DM_RxPathSelTable.rf_enable_rssi_th[i] = 100; + dm_rx_path_sel_table.rf_rssi[i] = 50; + dm_rx_path_sel_table.cck_pwdb_sta[i] = -64; + dm_rx_path_sel_table.rf_enable_rssi_th[i] = 100; } } @@ -1769,22 +1769,22 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev) return; if (!cck_Rx_Path_initialized) { - DM_RxPathSelTable.cck_rx_path = (rtl92e_readb(dev, 0xa07)&0xf); + dm_rx_path_sel_table.cck_rx_path = (rtl92e_readb(dev, 0xa07)&0xf); cck_Rx_Path_initialized = 1; } - DM_RxPathSelTable.disabled_rf = 0xf; - DM_RxPathSelTable.disabled_rf &= ~(rtl92e_readb(dev, 0xc04)); + dm_rx_path_sel_table.disabled_rf = 0xf; + dm_rx_path_sel_table.disabled_rf &= ~(rtl92e_readb(dev, 0xc04)); if (priv->rtllib->mode == WIRELESS_MODE_B) - DM_RxPathSelTable.cck_method = CCK_Rx_Version_2; + dm_rx_path_sel_table.cck_method = CCK_Rx_Version_2; for (i = 0; i < RF90_PATH_MAX; i++) { - DM_RxPathSelTable.rf_rssi[i] = priv->stats.rx_rssi_percentage[i]; + dm_rx_path_sel_table.rf_rssi[i] = priv->stats.rx_rssi_percentage[i]; if (priv->brfpath_rxenable[i]) { rf_num++; - cur_rf_rssi = DM_RxPathSelTable.rf_rssi[i]; + cur_rf_rssi = dm_rx_path_sel_table.rf_rssi[i]; if (rf_num == 1) { max_rssi_index = min_rssi_index = sec_rssi_index = i; @@ -1832,12 +1832,12 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev) } rf_num = 0; - if (DM_RxPathSelTable.cck_method == CCK_Rx_Version_2) { + if (dm_rx_path_sel_table.cck_method == CCK_Rx_Version_2) { for (i = 0; i < RF90_PATH_MAX; i++) { if (priv->brfpath_rxenable[i]) { rf_num++; cur_cck_pwdb = - DM_RxPathSelTable.cck_pwdb_sta[i]; + dm_rx_path_sel_table.cck_pwdb_sta[i]; if (rf_num == 1) { cck_rx_ver2_max_index = i; @@ -1894,17 +1894,17 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev) } update_cck_rx_path = 0; - if (DM_RxPathSelTable.cck_method == CCK_Rx_Version_2) { + if (dm_rx_path_sel_table.cck_method == CCK_Rx_Version_2) { cck_default_Rx = cck_rx_ver2_max_index; cck_optional_Rx = cck_rx_ver2_sec_index; if (tmp_cck_max_pwdb != -64) update_cck_rx_path = 1; } - if (tmp_min_rssi < DM_RxPathSelTable.ss_th_low && disabled_rf_cnt < 2) { + if (tmp_min_rssi < dm_rx_path_sel_table.ss_th_low && disabled_rf_cnt < 2) { if ((tmp_max_rssi - tmp_min_rssi) >= - DM_RxPathSelTable.diff_th) { - DM_RxPathSelTable.rf_enable_rssi_th[min_rssi_index] = + dm_rx_path_sel_table.diff_th) { + dm_rx_path_sel_table.rf_enable_rssi_th[min_rssi_index] = tmp_max_rssi+5; rtl92e_set_bb_reg(dev, rOFDM0_TRxPathEnable, 0x1<> i) & 0x1) { + if ((dm_rx_path_sel_table.disabled_rf >> i) & 0x1) { if (tmp_max_rssi >= - DM_RxPathSelTable.rf_enable_rssi_th[i]) { + dm_rx_path_sel_table.rf_enable_rssi_th[i]) { rtl92e_set_bb_reg(dev, rOFDM0_TRxPathEnable, 0x1 << i, 0x1); rtl92e_set_bb_reg(dev, rOFDM1_TRxPathEnable, 0x1 << i, 0x1); - DM_RxPathSelTable.rf_enable_rssi_th[i] + dm_rx_path_sel_table.rf_enable_rssi_th[i] = 100; disabled_rf_cnt--; } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h index 1c2eb7ac52ce..01587e2fec65 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h @@ -155,7 +155,6 @@ struct dcmd_txcmd { /*------------------------Export global variable----------------------------*/ extern struct dig_t dm_digtable; -extern struct drx_path_sel DM_RxPathSelTable; /* Pre-calculated gain tables */ extern const u32 dm_tx_bb_gain[TX_BB_GAIN_TABLE_LEN];