summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtw89/rtw8851b.c
diff options
context:
space:
mode:
authorChih-Kang Chang <gary.chang@realtek.com>2023-04-21 05:45:50 +0300
committerKalle Valo <kvalo@kernel.org>2023-05-05 15:00:15 +0300
commit2273dd724a6c6083e126828e56ff9a0a78913449 (patch)
tree14a7d00d08b9f5f48fb0e7eb6d7dbaa353c13f86 /drivers/net/wireless/realtek/rtw89/rtw8851b.c
parentb6335d91607d6297d3f586e8a4dc6ce8f90652e7 (diff)
downloadlinux-2273dd724a6c6083e126828e56ff9a0a78913449.tar.xz
wifi: rtw89: 8851b: add support WoWLAN to 8851B
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> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230421024551.29994-8-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw89/rtw8851b.c')
-rw-r--r--drivers/net/wireless/realtek/rtw89/rtw8851b.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b.c b/drivers/net/wireless/realtek/rtw89/rtw8851b.c
index 5ed699ab75a4..ce5c7a8644c3 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);