All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: <tony0620emma@gmail.com>, <kvalo@codeaurora.org>
Cc: <linux-wireless@vger.kernel.org>, <ku920601@realtek.com>,
	<phhuang@realtek.com>, <shaofu@realtek.com>,
	<steventing@realtek.com>, <kevin_yang@realtek.com>
Subject: [PATCH 3/7] rtw88: fix DIG min setting
Date: Fri, 19 Mar 2021 13:42:14 +0800	[thread overview]
Message-ID: <20210319054218.3319-4-pkshih@realtek.com> (raw)
In-Reply-To: <20210319054218.3319-1-pkshih@realtek.com>

From: Zong-Zhe Yang <kevin_yang@realtek.com>

DIG min is expected to be set according to chip. And actually we assigned
it under each chip information. However, we didn't use the setting when we
did DIG process. It is unexpected, so we fix it.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw88/phy.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/phy.c b/drivers/net/wireless/realtek/rtw88/phy.c
index e114ddecac09..f96edc049718 100644
--- a/drivers/net/wireless/realtek/rtw88/phy.c
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
@@ -316,7 +316,8 @@ rtw_phy_dig_check_damping(struct rtw_dm_info *dm_info)
 	return damping;
 }
 
-static void rtw_phy_dig_get_boundary(struct rtw_dm_info *dm_info,
+static void rtw_phy_dig_get_boundary(struct rtw_dev *rtwdev,
+				     struct rtw_dm_info *dm_info,
 				     u8 *upper, u8 *lower, bool linked)
 {
 	u8 dig_max, dig_min, dig_mid;
@@ -325,8 +326,7 @@ static void rtw_phy_dig_get_boundary(struct rtw_dm_info *dm_info,
 	if (linked) {
 		dig_max = DIG_PERF_MAX;
 		dig_mid = DIG_PERF_MID;
-		/* 22B=0x1c, 22C=0x20 */
-		dig_min = 0x1c;
+		dig_min = rtwdev->chip->dig_min;
 		min_rssi = max_t(u8, dm_info->min_rssi, dig_min);
 	} else {
 		dig_max = DIG_CVRG_MAX;
@@ -437,7 +437,8 @@ static void rtw_phy_dig(struct rtw_dev *rtwdev)
 	 * the peers connected with us, meanwhile make sure the igi value does
 	 * not beyond the hardware limitation
 	 */
-	rtw_phy_dig_get_boundary(dm_info, &upper_bound, &lower_bound, linked);
+	rtw_phy_dig_get_boundary(rtwdev, dm_info, &upper_bound, &lower_bound,
+				 linked);
 	cur_igi = clamp_t(u8, cur_igi, lower_bound, upper_bound);
 
 	/* record current igi value and false alarm statistics for further
-- 
2.21.0


  parent reply	other threads:[~2021-03-19  5:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19  5:42 [PATCH 0/7] rtw88: add some fixes and 8822c features Ping-Ke Shih
2021-03-19  5:42 ` [PATCH 1/7] rtw88: add flush hci support Ping-Ke Shih
2021-04-11  9:24   ` Kalle Valo
2021-03-19  5:42 ` [PATCH 2/7] rtw88: follow the AP basic rates for tx mgmt frame Ping-Ke Shih
2021-04-11  9:21   ` Kalle Valo
2021-04-12  8:11     ` Pkshih
2021-04-12 11:46       ` Kalle Valo
2021-04-15  4:05         ` Pkshih
2021-04-22  3:27       ` Pkshih
2021-05-19  5:59         ` Pkshih
2021-03-19  5:42 ` Ping-Ke Shih [this message]
2021-03-19  5:42 ` [PATCH 4/7] rtw88: 8822c: update tx power limit table to RF v40.1 Ping-Ke Shih
2021-04-11  9:25   ` Kalle Valo
2021-03-19  5:42 ` [PATCH 5/7] rtw88: 8822c: add LC calibration for RTL8822C Ping-Ke Shih
2021-04-11  9:27   ` Kalle Valo
2021-03-19  5:42 ` [PATCH 6/7] rtw88: 8822c: add CFO tracking Ping-Ke Shih
2021-04-11  9:19   ` Kalle Valo
2021-04-12  8:11     ` Pkshih
2021-04-12 11:47       ` Kalle Valo
2021-04-15  5:02         ` Pkshih
2021-03-19  5:42 ` [PATCH 7/7] rtw88: coex: fix A2DP stutters while WL busy + WL scan Ping-Ke Shih
2021-04-11  9:28   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210319054218.3319-4-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=kevin_yang@realtek.com \
    --cc=ku920601@realtek.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=phhuang@realtek.com \
    --cc=shaofu@realtek.com \
    --cc=steventing@realtek.com \
    --cc=tony0620emma@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.