mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
b6c12908a3
Net-detect is an option of wowlan to allow the device to be woken up from suspend mode when configured network is detected. When user enables net-detect and lets the device enter suspend state, wowlan firmware will periodically scan until beacon or probe response of configured networks are received. Between two scans, wowlan firmware keeps wifi chip in idle mode to reduce power consumption. If configured networks are detected, wowlan firmware will trigger resume process. Signed-off-by: Chin-Yen Lee <timlee@realtek.com> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
59 lines
1.3 KiB
C
59 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
|
/* Copyright(c) 2018-2019 Realtek Corporation
|
|
*/
|
|
|
|
#ifndef __RTW_WOW_H__
|
|
#define __RTW_WOW_H__
|
|
|
|
#define PNO_CHECK_BYTE 4
|
|
|
|
enum rtw_wow_pattern_type {
|
|
RTW_PATTERN_BROADCAST = 0,
|
|
RTW_PATTERN_MULTICAST,
|
|
RTW_PATTERN_UNICAST,
|
|
RTW_PATTERN_VALID,
|
|
RTW_PATTERN_INVALID,
|
|
};
|
|
|
|
enum rtw_wake_reason {
|
|
RTW_WOW_RSN_RX_PTK_REKEY = 0x1,
|
|
RTW_WOW_RSN_RX_GTK_REKEY = 0x2,
|
|
RTW_WOW_RSN_RX_DEAUTH = 0x8,
|
|
RTW_WOW_RSN_DISCONNECT = 0x10,
|
|
RTW_WOW_RSN_RX_MAGIC_PKT = 0x21,
|
|
RTW_WOW_RSN_RX_PATTERN_MATCH = 0x23,
|
|
RTW_WOW_RSN_RX_NLO = 0x55,
|
|
};
|
|
|
|
struct rtw_fw_media_status_iter_data {
|
|
struct rtw_dev *rtwdev;
|
|
u8 connect;
|
|
};
|
|
|
|
struct rtw_fw_key_type_iter_data {
|
|
struct rtw_dev *rtwdev;
|
|
u8 group_key_type;
|
|
u8 pairwise_key_type;
|
|
};
|
|
|
|
static inline bool rtw_wow_mgd_linked(struct rtw_dev *rtwdev)
|
|
{
|
|
struct ieee80211_vif *wow_vif = rtwdev->wow.wow_vif;
|
|
struct rtw_vif *rtwvif = (struct rtw_vif *)wow_vif->drv_priv;
|
|
|
|
return (rtwvif->net_type == RTW_NET_MGD_LINKED);
|
|
}
|
|
|
|
static inline bool rtw_wow_no_link(struct rtw_dev *rtwdev)
|
|
{
|
|
struct ieee80211_vif *wow_vif = rtwdev->wow.wow_vif;
|
|
struct rtw_vif *rtwvif = (struct rtw_vif *)wow_vif->drv_priv;
|
|
|
|
return (rtwvif->net_type == RTW_NET_NO_LINK);
|
|
}
|
|
|
|
int rtw_wow_suspend(struct rtw_dev *rtwdev, struct cfg80211_wowlan *wowlan);
|
|
int rtw_wow_resume(struct rtw_dev *rtwdev);
|
|
|
|
#endif
|