gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / drivers / net / wireless / realtek / rtw88 / wow.h
blob289368a2cba440b7528817b96aa989b51c25dc62
1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /* Copyright(c) 2018-2019 Realtek Corporation
3 */
5 #ifndef __RTW_WOW_H__
6 #define __RTW_WOW_H__
8 #define PNO_CHECK_BYTE 4
10 enum rtw_wow_pattern_type {
11 RTW_PATTERN_BROADCAST = 0,
12 RTW_PATTERN_MULTICAST,
13 RTW_PATTERN_UNICAST,
14 RTW_PATTERN_VALID,
15 RTW_PATTERN_INVALID,
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;
30 u8 connect;
33 struct rtw_fw_key_type_iter_data {
34 struct rtw_dev *rtwdev;
35 u8 group_key_type;
36 u8 pairwise_key_type;
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);
58 #endif