2020-12-10 00:06:03 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2012-2014 Intel Corporation
|
|
|
|
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
|
|
|
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
2024-03-11 08:28:03 +02:00
|
|
|
* Copyright (C) 2021-2024 Intel Corporation
|
2020-12-10 00:06:03 +02:00
|
|
|
*/
|
2017-06-02 15:15:53 +02:00
|
|
|
#ifndef __iwl_fw_api_offload_h__
|
|
|
|
#define __iwl_fw_api_offload_h__
|
|
|
|
|
|
|
|
/**
|
|
|
|
* enum iwl_prot_offload_subcmd_ids - protocol offload commands
|
|
|
|
*/
|
|
|
|
enum iwl_prot_offload_subcmd_ids {
|
2022-09-06 16:42:13 +03:00
|
|
|
/**
|
|
|
|
* @WOWLAN_WAKE_PKT_NOTIFICATION: Notification in &struct iwl_wowlan_wake_pkt_notif
|
|
|
|
*/
|
|
|
|
WOWLAN_WAKE_PKT_NOTIFICATION = 0xFC,
|
|
|
|
|
wifi: iwlwifi: mvm: Add support for wowlan info notification
IMR (Isolated Memory Regions) is a mechanism to protect memory regions
from unwarranted access by agents in the system that should not have access
to that memory.
When IMR is enabled, pages in the DRAM will be located within the IMR
memory space, accessible only by the device.
As a side effect, during S4 (a.k.a hibernate) the IMR memory space
is not retained.
While the DRAM is saved to the disk and restored by the OS upon resume,
the IMR, which is hidden from the OS neither saved upon suspend nor
restored upon resume.
As a consequence of the above, it turned out that commands cannot
be sent as part of the resume flow, and so after ending
d3 the FW needs to use notifications instead of cmd-resp.
The resume flow becomes asynchronous, with a series
of notifications, starting with wowlan_info_notif, through
wowlan_pkt_notif and complete the resume flow by d3_end_notif.
This patch adds the support for wowlan info notification.
The wake packet has been removed from the wowlan info struct
and will be handled in a dedicated notification.
Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com>
Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20220906161827.3ce8deefd929.Ieba8610e8bb4bec788076371ae38becb4a3d20d5@changeid
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
2022-09-06 16:42:12 +03:00
|
|
|
/**
|
2023-09-21 11:58:04 +03:00
|
|
|
* @WOWLAN_INFO_NOTIFICATION: Notification in
|
|
|
|
* &struct iwl_wowlan_info_notif_v1, &struct iwl_wowlan_info_notif_v2,
|
2024-03-11 08:28:03 +02:00
|
|
|
* or &struct iwl_wowlan_info_notif
|
wifi: iwlwifi: mvm: Add support for wowlan info notification
IMR (Isolated Memory Regions) is a mechanism to protect memory regions
from unwarranted access by agents in the system that should not have access
to that memory.
When IMR is enabled, pages in the DRAM will be located within the IMR
memory space, accessible only by the device.
As a side effect, during S4 (a.k.a hibernate) the IMR memory space
is not retained.
While the DRAM is saved to the disk and restored by the OS upon resume,
the IMR, which is hidden from the OS neither saved upon suspend nor
restored upon resume.
As a consequence of the above, it turned out that commands cannot
be sent as part of the resume flow, and so after ending
d3 the FW needs to use notifications instead of cmd-resp.
The resume flow becomes asynchronous, with a series
of notifications, starting with wowlan_info_notif, through
wowlan_pkt_notif and complete the resume flow by d3_end_notif.
This patch adds the support for wowlan info notification.
The wake packet has been removed from the wowlan info struct
and will be handled in a dedicated notification.
Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com>
Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20220906161827.3ce8deefd929.Ieba8610e8bb4bec788076371ae38becb4a3d20d5@changeid
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
2022-09-06 16:42:12 +03:00
|
|
|
*/
|
|
|
|
WOWLAN_INFO_NOTIFICATION = 0xFD,
|
|
|
|
|
2022-09-06 16:42:14 +03:00
|
|
|
/**
|
|
|
|
* @D3_END_NOTIFICATION: End D3 state notification
|
|
|
|
*/
|
|
|
|
D3_END_NOTIFICATION = 0xFE,
|
|
|
|
|
2017-06-02 15:15:53 +02:00
|
|
|
/**
|
2023-06-01 17:20:06 +03:00
|
|
|
* @STORED_BEACON_NTF: &struct iwl_stored_beacon_notif_v2 or
|
|
|
|
* &struct iwl_stored_beacon_notif_v3
|
2017-06-02 15:15:53 +02:00
|
|
|
*/
|
|
|
|
STORED_BEACON_NTF = 0xFF,
|
|
|
|
};
|
|
|
|
|
|
|
|
#define MAX_STORED_BEACON_SIZE 600
|
|
|
|
|
|
|
|
/**
|
2021-08-26 22:47:40 +03:00
|
|
|
* struct iwl_stored_beacon_notif_common - Stored beacon notif common fields
|
2017-06-02 15:15:53 +02:00
|
|
|
*
|
|
|
|
* @system_time: system time on air rise
|
|
|
|
* @tsf: TSF on air rise
|
|
|
|
* @beacon_timestamp: beacon on air rise
|
|
|
|
* @band: band, matches &RX_RES_PHY_FLAGS_BAND_24 definition
|
|
|
|
* @channel: channel this beacon was received on
|
|
|
|
* @rates: rate in ucode internal format
|
|
|
|
* @byte_count: frame's byte count
|
|
|
|
*/
|
2021-08-26 22:47:40 +03:00
|
|
|
struct iwl_stored_beacon_notif_common {
|
2017-06-02 15:15:53 +02:00
|
|
|
__le32 system_time;
|
|
|
|
__le64 tsf;
|
|
|
|
__le32 beacon_timestamp;
|
|
|
|
__le16 band;
|
|
|
|
__le16 channel;
|
|
|
|
__le32 rates;
|
|
|
|
__le32 byte_count;
|
2021-08-26 22:47:40 +03:00
|
|
|
} __packed;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct iwl_stored_beacon_notif - Stored beacon notification
|
|
|
|
*
|
|
|
|
* @common: fields common for all versions
|
|
|
|
* @data: beacon data, length in @byte_count
|
|
|
|
*/
|
|
|
|
struct iwl_stored_beacon_notif_v2 {
|
|
|
|
struct iwl_stored_beacon_notif_common common;
|
2017-06-02 15:15:53 +02:00
|
|
|
u8 data[MAX_STORED_BEACON_SIZE];
|
|
|
|
} __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_2 */
|
|
|
|
|
2021-08-26 22:47:40 +03:00
|
|
|
/**
|
|
|
|
* struct iwl_stored_beacon_notif_v3 - Stored beacon notification
|
|
|
|
*
|
|
|
|
* @common: fields common for all versions
|
|
|
|
* @sta_id: station for which the beacon was received
|
|
|
|
* @reserved: reserved for alignment
|
|
|
|
* @data: beacon data, length in @byte_count
|
|
|
|
*/
|
|
|
|
struct iwl_stored_beacon_notif_v3 {
|
|
|
|
struct iwl_stored_beacon_notif_common common;
|
|
|
|
u8 sta_id;
|
|
|
|
u8 reserved[3];
|
|
|
|
u8 data[MAX_STORED_BEACON_SIZE];
|
|
|
|
} __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_3 */
|
|
|
|
|
2017-06-02 15:15:53 +02:00
|
|
|
#endif /* __iwl_fw_api_offload_h__ */
|