From: Ping-Ke Shih <pkshih@realtek.com>
To: <kvalo@kernel.org>
Cc: <leo.li@realtek.com>, <gary.chang@realtek.com>,
<linux-wireless@vger.kernel.org>
Subject: [PATCH 7/8] wifi: rtw89: 8851b: add support WoWLAN to 8851B
Date: Fri, 21 Apr 2023 10:45:50 +0800 [thread overview]
Message-ID: <20230421024551.29994-8-pkshih@realtek.com> (raw)
In-Reply-To: <20230421024551.29994-1-pkshih@realtek.com>
From: Chih-Kang Chang <gary.chang@realtek.com>
Add WoWLAN stub to 8851B, and decalre this chip can support magic packet
and disconnect wakeup.
Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/rtw8851b.c | 12 ++++++++++++
drivers/net/wireless/realtek/rtw89/wow.c | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b.c b/drivers/net/wireless/realtek/rtw89/rtw8851b.c
index 5ed699ab75a40..ce5c7a8644c39 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851b.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851b.c
@@ -31,6 +31,15 @@ static const struct rtw89_chip_ops rtw8851b_chip_ops = {
.h2c_dctl_sec_cam = NULL,
};
+#ifdef CONFIG_PM
+static const struct wiphy_wowlan_support rtw_wowlan_stub_8851b = {
+ .flags = WIPHY_WOWLAN_MAGIC_PKT | WIPHY_WOWLAN_DISCONNECT,
+ .n_patterns = RTW89_MAX_PATTERN_NUM,
+ .pattern_max_len = RTW89_MAX_PATTERN_SIZE,
+ .pattern_min_len = 1,
+};
+#endif
+
const struct rtw89_chip_info rtw8851b_chip_info = {
.chip_id = RTL8851B,
.ops = &rtw8851b_chip_ops,
@@ -101,6 +110,9 @@ const struct rtw89_chip_info rtw8851b_chip_info = {
BIT(RTW89_DMA_ACH6) | BIT(RTW89_DMA_ACH7) |
BIT(RTW89_DMA_B1MG) | BIT(RTW89_DMA_B1HI),
.edcca_lvl_reg = R_SEG0R_EDCCA_LVL_V1,
+#ifdef CONFIG_PM
+ .wowlan_stub = &rtw_wowlan_stub_8851b,
+#endif
.xtal_info = &rtw8851b_xtal_info,
};
EXPORT_SYMBOL(rtw8851b_chip_info);
diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c
index 2ca8abb70f110..364e546221500 100644
--- a/drivers/net/wireless/realtek/rtw89/wow.c
+++ b/drivers/net/wireless/realtek/rtw89/wow.c
@@ -91,7 +91,7 @@ static void rtw89_wow_show_wakeup_reason(struct rtw89_dev *rtwdev)
u32 wow_reason_reg;
u8 reason;
- if (chip_id == RTL8852A || chip_id == RTL8852B)
+ if (chip_id == RTL8852A || chip_id == RTL8852B || chip_id == RTL8851B)
wow_reason_reg = R_AX_C2HREG_DATA3 + 3;
else
wow_reason_reg = R_AX_C2HREG_DATA3_V1 + 3;
--
2.25.1
next prev parent reply other threads:[~2023-04-21 2:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 2:45 [PATCH 0/8] wifi: rtw89: 8851b: add basic chip information of 8851B Ping-Ke Shih
2023-04-21 2:45 ` [PATCH 1/8] wifi: rtw89: 8851b: add 8851B basic chip_info Ping-Ke Shih
2023-05-05 12:00 ` Kalle Valo
2023-04-21 2:45 ` [PATCH 2/8] wifi: rtw89: 8851be: add 8851BE PCI entry and fill PCI capabilities Ping-Ke Shih
2023-04-21 2:45 ` [PATCH 3/8] wifi: rtw89: 8851b: add NCTL post table Ping-Ke Shih
2023-04-21 2:45 ` [PATCH 4/8] wifi: rtw89: add CFO XTAL registers field to support 8851B Ping-Ke Shih
2023-04-21 2:45 ` [PATCH 5/8] wifi: rtw89: use chip_info::small_fifo_size to choose debug_mask Ping-Ke Shih
2023-04-21 2:45 ` [PATCH 6/8] wifi: rtw89: change naming of BA CAM from V1 to V0_EXT Ping-Ke Shih
2023-04-21 2:45 ` Ping-Ke Shih [this message]
2023-04-21 2:45 ` [PATCH 8/8] wifi: rtw89: 8851b: add DLE mem and HFC quota Ping-Ke Shih
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=20230421024551.29994-8-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=gary.chang@realtek.com \
--cc=kvalo@kernel.org \
--cc=leo.li@realtek.com \
--cc=linux-wireless@vger.kernel.org \
/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).