Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp1168825pxt; Sat, 7 Aug 2021 02:49:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/Bs40rl3rXx5zL0MF6AY6ZJoH65HUgqDsUbL4bT3B4p/dAHgpRPw7K7a1e8osdrDmzW4s X-Received: by 2002:a05:6e02:2162:: with SMTP id s2mr774731ilv.99.1628329776525; Sat, 07 Aug 2021 02:49:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628329776; cv=none; d=google.com; s=arc-20160816; b=uk8y3aUE4ZV7cgkQwweNPUGP0J4h2ghx6N4chslQOD6vob5ypTD/kRz75jkP9O5LJK CUmihZvY1F4h4yB9Azl9NhCk6SME+3h3vBsEr4kMh69LgM15keSY2cLJD6oW7cv9QJzw IPdqy782JTXi8z4nPtlogRO/26eVo6ajE5C4iPZ9mx82u9kkxjmWhqYlJmgntlHwTJFg gQM472z5JKyFQlJTMOLf5eQg5vutLzmUNRcrFPpcuLsDwPHfPwtxgy94VzAiYONLkVWC 4Vv/BxaEtgIbu/GEfI1rHhEH9AX0iaBH9AfmB2aUDM9Iy1e70n65akiWkwOKPXNIoru8 Hn7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=d0Nbs2vmcFJXEerAnkAy24smDLy8w+T8wOrXCoqMSqg=; b=DeU4L2pGZ0rs5zbnUbffNsthGbDOqcVZb8i1SITPAqO6Op6LRtLiOcqozvpD5p6qKn F5ipAUwL+Tm0Gj+3xa3Dla+eRVxERCC2BfuPRlUHnH5AyZKJgRAVF5GzhbOltN9FAIKx ZAxgor4tayWQZRpiV7u5VrG818LdB1uwFNIZ23sQm11LdvRxw1H7teXWU4RT1ymNqd6m fLVgW+cagz/A6UnawI/86u7qZYUrzqkhuA2ySOJawsQ42v3wlg0wVrNC23lZQsEGDX19 Rf+4OBSiVigBZnS+vsNFkPvw5Nio1s5/lhbC2XcdxD7Zbtx4ON2lvsYtM4uD2C3bYSL+ 5Ypw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aPCtI+PJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si11598485jao.24.2021.08.07.02.49.25; Sat, 07 Aug 2021 02:49:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aPCtI+PJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231811AbhHGJsp (ORCPT + 99 others); Sat, 7 Aug 2021 05:48:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbhHGJsj (ORCPT ); Sat, 7 Aug 2021 05:48:39 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE4AAC0613D3 for ; Sat, 7 Aug 2021 02:48:21 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id b13so14336950wrs.3 for ; Sat, 07 Aug 2021 02:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d0Nbs2vmcFJXEerAnkAy24smDLy8w+T8wOrXCoqMSqg=; b=aPCtI+PJMs9bboSSaIICklzFdl0NMWKMIEZxYA1C37D9PSSEuaF9Wa8LgkysgONaQi 2gKghmzxsWB6MLVfT+bnVqhzyiWUboGlyVcSwm3SeUyJ5RxHKTh6/ad2vwzL68CRJzx/ d08UHFPGYdtPLaltqGQdswKCeLaXW4VAvgNsSKEqOE3r7tvu+qSdqQT4cbZ8uchXIf+c JAF+DZhlF5FCmGKzfQXVMHNqcerQtPhY7grmXq82ayG+/Vt4z037/xSflSBllhbu961V KgzFrATffUm/3b5ACAR3zZYuMoq3i1Vw/9Vq57+jj7iwKdw+1pDPUBY5Dtx+Gr1rpOvG X3cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d0Nbs2vmcFJXEerAnkAy24smDLy8w+T8wOrXCoqMSqg=; b=aszOrlOQJjONTNUqHRUwe1YyRPQq7fcUoFzbknOIYxo+bhMLibzURgkipKTBLhucWJ eCCsYaCDfHd47+24565QM+sElqeyZZIlHyqH2Niv9wrBOf8PQbpBA5a8kw79AALW4GE5 46WGcdZKdjwjHTjgpMS8uXH7bUpeFVlNGq2ovFPbquYFnHey4U9MmcqeUfKxaRwVArFu hNzTwS4f77kNe434vHyDf7eNgx9IPV18FJ9NbYV/OVOUyg4bTyoDOglJoLLMIJ/QNPDy jpX1wKJORZc8+FVMaU/cxeqr8MY2FmSORphiFV3m5pO/PtBOda/nTxH+mOOI0K/+AsgQ A4KQ== X-Gm-Message-State: AOAM531z/bTUF+T7GpW79wdJ++jHdj4dai3G/OQvSRkVXu5phWPdZi7C XRTdog1DKTc7gNL9q/vrfWZ/qn//yTU= X-Received: by 2002:adf:f889:: with SMTP id u9mr2623307wrp.3.1628329700514; Sat, 07 Aug 2021 02:48:20 -0700 (PDT) Received: from agape ([5.171.80.112]) by smtp.gmail.com with ESMTPSA id 140sm11706543wmb.43.2021.08.07.02.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Aug 2021 02:48:20 -0700 (PDT) From: Fabio Aiuto To: gregkh@linuxfoundation.org Cc: hdegoede@redhat.com, Larry.Finger@lwfinger.net, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 04/21] staging: rtl8723bs: move function to file hal/odm_HWConfig.c Date: Sat, 7 Aug 2021 11:47:56 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org move function odm_cck_rssi() to hal/odm_HWConfig.c. As it is used only in this file turn it to static. Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 27 +++++++++++++++++++ drivers/staging/rtl8723bs/hal/odm_RTL8723B.c | 28 -------------------- drivers/staging/rtl8723bs/hal/odm_RTL8723B.h | 2 -- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c index 6d7b34fd595e..2d4d8d57ceeb 100644 --- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c +++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c @@ -71,6 +71,33 @@ static u8 odm_evm_db_to_percentage(s8 value) return ret_val; } +static s8 odm_cck_rssi(u8 lna_idx, u8 vga_idx) +{ + s8 rx_pwr_all = 0x00; + + switch (lna_idx) { + /* 46 53 73 95 201301231630 */ + /* 46 53 77 99 201301241630 */ + + case 6: + rx_pwr_all = -34 - (2 * vga_idx); + break; + case 4: + rx_pwr_all = -14 - (2 * vga_idx); + break; + case 1: + rx_pwr_all = 6 - (2 * vga_idx); + break; + case 0: + rx_pwr_all = 16 - (2 * vga_idx); + break; + default: + /* rx_pwr_all = -53+(2*(31-VGA_idx)); */ + break; + } + return rx_pwr_all; +} + static void odm_rx_phy_status_parsing(struct dm_odm_t *dm_odm, struct odm_phy_info *phy_info, u8 *phy_status, diff --git a/drivers/staging/rtl8723bs/hal/odm_RTL8723B.c b/drivers/staging/rtl8723bs/hal/odm_RTL8723B.c index 325f2a7ae337..66bda505c01e 100644 --- a/drivers/staging/rtl8723bs/hal/odm_RTL8723B.c +++ b/drivers/staging/rtl8723bs/hal/odm_RTL8723B.c @@ -6,31 +6,3 @@ ******************************************************************************/ #include "odm_precomp.h" - -s8 odm_cck_rssi(u8 lna_idx, u8 vga_idx) -{ - s8 rx_pwr_all = 0x00; - - switch (lna_idx) { - /* 46 53 73 95 201301231630 */ - /* 46 53 77 99 201301241630 */ - - case 6: - rx_pwr_all = -34 - (2 * vga_idx); - break; - case 4: - rx_pwr_all = -14 - (2 * vga_idx); - break; - case 1: - rx_pwr_all = 6 - (2 * vga_idx); - break; - case 0: - rx_pwr_all = 16 - (2 * vga_idx); - break; - default: - /* rx_pwr_all = -53+(2*(31-VGA_idx)); */ - break; - - } - return rx_pwr_all; -} diff --git a/drivers/staging/rtl8723bs/hal/odm_RTL8723B.h b/drivers/staging/rtl8723bs/hal/odm_RTL8723B.h index 752f180ebd46..12b3ca90a43d 100644 --- a/drivers/staging/rtl8723bs/hal/odm_RTL8723B.h +++ b/drivers/staging/rtl8723bs/hal/odm_RTL8723B.h @@ -9,6 +9,4 @@ #define DM_DIG_MIN_NIC_8723 0x1C -s8 odm_cck_rssi(u8 LNA_idx, u8 VGA_idx); - #endif -- 2.20.1