1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /* Copyright(c) 2018-2019 Realtek Corporation
8 #define PNO_CHECK_BYTE 4
10 enum rtw_wow_pattern_type
{
11 RTW_PATTERN_BROADCAST
= 0,
12 RTW_PATTERN_MULTICAST
,
18 enum rtw_wake_reason
{
19 RTW_WOW_RSN_RX_PTK_REKEY
= 0x1,
20 RTW_WOW_RSN_RX_GTK_REKEY
= 0x2,
21 RTW_WOW_RSN_RX_DEAUTH
= 0x8,
22 RTW_WOW_RSN_DISCONNECT
= 0x10,
23 RTW_WOW_RSN_RX_MAGIC_PKT
= 0x21,
24 RTW_WOW_RSN_RX_PATTERN_MATCH
= 0x23,
25 RTW_WOW_RSN_RX_NLO
= 0x55,
28 struct rtw_fw_media_status_iter_data
{
29 struct rtw_dev
*rtwdev
;
33 struct rtw_fw_key_type_iter_data
{
34 struct rtw_dev
*rtwdev
;
39 static inline bool rtw_wow_mgd_linked(struct rtw_dev
*rtwdev
)
41 struct ieee80211_vif
*wow_vif
= rtwdev
->wow
.wow_vif
;
42 struct rtw_vif
*rtwvif
= (struct rtw_vif
*)wow_vif
->drv_priv
;
44 return (rtwvif
->net_type
== RTW_NET_MGD_LINKED
);
47 static inline bool rtw_wow_no_link(struct rtw_dev
*rtwdev
)
49 struct ieee80211_vif
*wow_vif
= rtwdev
->wow
.wow_vif
;
50 struct rtw_vif
*rtwvif
= (struct rtw_vif
*)wow_vif
->drv_priv
;
52 return (rtwvif
->net_type
== RTW_NET_NO_LINK
);
55 int rtw_wow_suspend(struct rtw_dev
*rtwdev
, struct cfg80211_wowlan
*wowlan
);
56 int rtw_wow_resume(struct rtw_dev
*rtwdev
);