Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
0002 /* Copyright(c) 2018-2019  Realtek Corporation
0003  */
0004 
0005 #ifndef __RTW_WOW_H__
0006 #define __RTW_WOW_H__
0007 
0008 #define PNO_CHECK_BYTE 4
0009 
0010 enum rtw_wow_pattern_type {
0011     RTW_PATTERN_BROADCAST = 0,
0012     RTW_PATTERN_MULTICAST,
0013     RTW_PATTERN_UNICAST,
0014     RTW_PATTERN_VALID,
0015     RTW_PATTERN_INVALID,
0016 };
0017 
0018 enum rtw_wake_reason {
0019     RTW_WOW_RSN_RX_PTK_REKEY = 0x1,
0020     RTW_WOW_RSN_RX_GTK_REKEY = 0x2,
0021     RTW_WOW_RSN_RX_DEAUTH = 0x8,
0022     RTW_WOW_RSN_DISCONNECT = 0x10,
0023     RTW_WOW_RSN_RX_MAGIC_PKT = 0x21,
0024     RTW_WOW_RSN_RX_PATTERN_MATCH = 0x23,
0025     RTW_WOW_RSN_RX_NLO = 0x55,
0026 };
0027 
0028 struct rtw_fw_media_status_iter_data {
0029     struct rtw_dev *rtwdev;
0030     u8 connect;
0031 };
0032 
0033 struct rtw_fw_key_type_iter_data {
0034     struct rtw_dev *rtwdev;
0035     u8 group_key_type;
0036     u8 pairwise_key_type;
0037 };
0038 
0039 static inline bool rtw_wow_mgd_linked(struct rtw_dev *rtwdev)
0040 {
0041     struct ieee80211_vif *wow_vif = rtwdev->wow.wow_vif;
0042     struct rtw_vif *rtwvif = (struct rtw_vif *)wow_vif->drv_priv;
0043 
0044     return (rtwvif->net_type == RTW_NET_MGD_LINKED);
0045 }
0046 
0047 static inline bool rtw_wow_no_link(struct rtw_dev *rtwdev)
0048 {
0049     struct ieee80211_vif *wow_vif = rtwdev->wow.wow_vif;
0050     struct rtw_vif *rtwvif = (struct rtw_vif *)wow_vif->drv_priv;
0051 
0052     return (rtwvif->net_type == RTW_NET_NO_LINK);
0053 }
0054 
0055 int rtw_wow_suspend(struct rtw_dev *rtwdev, struct cfg80211_wowlan *wowlan);
0056 int rtw_wow_resume(struct rtw_dev *rtwdev);
0057 
0058 #endif