From: <yhchuang@realtek.com>
To: <kvalo@codeaurora.org>
Cc: <linux-wireless@vger.kernel.org>, <briannorris@chromium.org>,
<sgruszka@redhat.com>
Subject: [PATCH 6/8] rtw88: move IQK/DPK into phy_calibration
Date: Wed, 7 Aug 2019 18:40:03 +0800 [thread overview]
Message-ID: <1565174405-2689-7-git-send-email-yhchuang@realtek.com> (raw)
In-Reply-To: <1565174405-2689-1-git-send-email-yhchuang@realtek.com>
From: Yan-Hsuan Chuang <yhchuang@realtek.com>
Since 8822c requires to do not only IQK, but also DPK.
Move these calibrations that need to be done once the channel
is determined, into phy_calibration.
And note that the order of the calibrations matters, 8822c
should do IQK first, then DPK.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
---
drivers/net/wireless/realtek/rtw88/mac80211.c | 2 +-
drivers/net/wireless/realtek/rtw88/main.h | 3 +--
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 6 +++---
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 9 +++++++--
4 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
index fedea28..e5e3605 100644
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
@@ -256,7 +256,7 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw,
if (conf->assoc) {
rtw_coex_connect_notify(rtwdev, COEX_ASSOCIATE_FINISH);
net_type = RTW_NET_MGD_LINKED;
- chip->ops->do_iqk(rtwdev);
+ chip->ops->phy_calibration(rtwdev);
rtwvif->aid = conf->aid;
rtw_add_rsvd_page(rtwdev, RSVD_PS_POLL, true);
diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h
index 1ed7eb0..76d9253 100644
--- a/drivers/net/wireless/realtek/rtw88/main.h
+++ b/drivers/net/wireless/realtek/rtw88/main.h
@@ -640,9 +640,8 @@ struct rtw_chip_ops {
u8 antenna_rx);
void (*cfg_ldo25)(struct rtw_dev *rtwdev, bool enable);
void (*false_alarm_statistics)(struct rtw_dev *rtwdev);
- void (*do_iqk)(struct rtw_dev *rtwdev);
+ void (*phy_calibration)(struct rtw_dev *rtwdev);
void (*dpk_track)(struct rtw_dev *rtwdev);
- void (*do_dpk)(struct rtw_dev *rtwdev);
/* for coex */
void (*coex_set_init)(struct rtw_dev *rtwdev);
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index 3679505..7056ea3 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -1001,8 +1001,9 @@ static void rtw8822b_do_iqk(struct rtw_dev *rtwdev)
counter, reload, ++do_iqk_cnt, iqk_fail_mask);
}
-static void rtw8822b_do_dpk(struct rtw_dev *rtwdev)
+static void rtw8822b_phy_calibration(struct rtw_dev *rtwdev)
{
+ rtw8822b_do_iqk(rtwdev);
}
static void rtw8822b_coex_cfg_init(struct rtw_dev *rtwdev)
@@ -1798,8 +1799,7 @@ static struct rtw_chip_ops rtw8822b_ops = {
.set_antenna = rtw8822b_set_antenna,
.cfg_ldo25 = rtw8822b_cfg_ldo25,
.false_alarm_statistics = rtw8822b_false_alarm_statistics,
- .do_iqk = rtw8822b_do_iqk,
- .do_dpk = rtw8822b_do_dpk,
+ .phy_calibration = rtw8822b_phy_calibration,
.coex_set_init = rtw8822b_coex_cfg_init,
.coex_set_ant_switch = rtw8822b_coex_cfg_ant_switch,
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
index cee12b1..5a428e0 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
@@ -3078,6 +3078,12 @@ static void rtw8822c_do_dpk(struct rtw_dev *rtwdev)
rtw8822c_dpk_restore_registers(rtwdev, DPK_BB_REG_NUM, bckp);
}
+static void rtw8822c_phy_calibration(struct rtw_dev *rtwdev)
+{
+ rtw8822c_do_iqk(rtwdev);
+ rtw8822c_do_dpk(rtwdev);
+}
+
void rtw8822c_dpk_track(struct rtw_dev *rtwdev)
{
struct rtw_dpk_info *dpk_info = &rtwdev->dm_info.dpk_info;
@@ -3487,9 +3493,8 @@ static struct rtw_chip_ops rtw8822c_ops = {
.set_tx_power_index = rtw8822c_set_tx_power_index,
.cfg_ldo25 = rtw8822c_cfg_ldo25,
.false_alarm_statistics = rtw8822c_false_alarm_statistics,
- .do_iqk = rtw8822c_do_iqk,
- .do_dpk = rtw8822c_do_dpk,
.dpk_track = rtw8822c_dpk_track,
+ .phy_calibration = rtw8822c_phy_calibration,
.coex_set_init = rtw8822c_coex_cfg_init,
.coex_set_ant_switch = NULL,
--
2.7.4
next prev parent reply other threads:[~2019-08-07 10:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 10:39 [PATCH 0/8] rtw88: enhance and stabilize T-Put performance yhchuang
2019-08-07 10:39 ` [PATCH 1/8] rtw88: 8822c: update PHY parameter to v38 yhchuang
2019-09-06 14:06 ` Kalle Valo
2019-08-07 10:39 ` [PATCH 2/8] rtw88: 8822c: update pwr_seq to v13 yhchuang
2019-08-07 10:40 ` [PATCH 3/8] rtw88: 8822c: Enable interrupt migration yhchuang
2019-08-07 10:40 ` [PATCH 4/8] rtw88: 8822c: add FW IQK support yhchuang
2019-09-03 12:53 ` Kalle Valo
2019-09-04 2:31 ` Tony Chuang
2019-09-06 14:13 ` Kalle Valo
2019-08-07 10:40 ` [PATCH 5/8] rtw88: 8822c: add SW DPK support yhchuang
2019-08-07 10:40 ` yhchuang [this message]
2019-08-07 10:40 ` [PATCH 7/8] rtw88: add dynamic cck pd mechanism yhchuang
2019-08-07 10:40 ` [PATCH 8/8] rtw88: allows to receive AMSDU in AMPDU yhchuang
2019-09-02 9:06 ` [PATCH 0/8] rtw88: enhance and stabilize T-Put performance Tony Chuang
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=1565174405-2689-7-git-send-email-yhchuang@realtek.com \
--to=yhchuang@realtek.com \
--cc=briannorris@chromium.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=sgruszka@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).