Import rtw88 based on wireless-testing at 5d5d68bcff1f7ff27ba0b938a4df5849849b47e3 with adjustments for FreeBSD. While our version of the driver has knowledge about the incapablity of DMA above 4GB we do see errors if people have more than that often already showing when laoding firmware. The problem for that is currently believed to be outside this driver so importing it anyway for now. Given the lack of full license texts on non-local files this is imported under the draft policy for handling SPDX files (D29226). [1] Approved by: core (imp) [1] MFC after: 2 weeks
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
|