WIP FPC-III support
[linux/fpc-iii.git] / drivers / net / wireless / intel / iwlwifi / fw / api / mac-cfg.h
blob6610d1234f74df0b841a3349a27eb197ab46b05d
1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /*
3 * Copyright (C) 2012-2014, 2018-2019 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
6 */
7 #ifndef __iwl_fw_api_mac_cfg_h__
8 #define __iwl_fw_api_mac_cfg_h__
10 /**
11 * enum iwl_mac_conf_subcmd_ids - mac configuration command IDs
13 enum iwl_mac_conf_subcmd_ids {
14 /**
15 * @LOW_LATENCY_CMD: &struct iwl_mac_low_latency_cmd
17 LOW_LATENCY_CMD = 0x3,
18 /**
19 * @CHANNEL_SWITCH_TIME_EVENT_CMD: &struct iwl_chan_switch_te_cmd
21 CHANNEL_SWITCH_TIME_EVENT_CMD = 0x4,
22 /**
23 * @MISSED_VAP_NOTIF: &struct iwl_missed_vap_notif
25 MISSED_VAP_NOTIF = 0xFA,
26 /**
27 * @SESSION_PROTECTION_CMD: &struct iwl_mvm_session_prot_cmd
29 SESSION_PROTECTION_CMD = 0x5,
31 /**
32 * @SESSION_PROTECTION_NOTIF: &struct iwl_mvm_session_prot_notif
34 SESSION_PROTECTION_NOTIF = 0xFB,
36 /**
37 * @PROBE_RESPONSE_DATA_NOTIF: &struct iwl_probe_resp_data_notif
39 PROBE_RESPONSE_DATA_NOTIF = 0xFC,
41 /**
42 * @CHANNEL_SWITCH_NOA_NOTIF: &struct iwl_channel_switch_noa_notif
44 CHANNEL_SWITCH_NOA_NOTIF = 0xFF,
47 #define IWL_P2P_NOA_DESC_COUNT (2)
49 /**
50 * struct iwl_p2p_noa_attr - NOA attr contained in probe resp FW notification
52 * @id: attribute id
53 * @len_low: length low half
54 * @len_high: length high half
55 * @idx: instance of NoA timing
56 * @ctwin: GO's ct window and pwer save capability
57 * @desc: NoA descriptor
58 * @reserved: reserved for alignment purposes
60 struct iwl_p2p_noa_attr {
61 u8 id;
62 u8 len_low;
63 u8 len_high;
64 u8 idx;
65 u8 ctwin;
66 struct ieee80211_p2p_noa_desc desc[IWL_P2P_NOA_DESC_COUNT];
67 u8 reserved;
68 } __packed;
70 #define IWL_PROBE_RESP_DATA_NO_CSA (0xff)
72 /**
73 * struct iwl_probe_resp_data_notif - notification with NOA and CSA counter
75 * @mac_id: the mac which should send the probe response
76 * @noa_active: notifies if the noa attribute should be handled
77 * @noa_attr: P2P NOA attribute
78 * @csa_counter: current csa counter
79 * @reserved: reserved for alignment purposes
81 struct iwl_probe_resp_data_notif {
82 __le32 mac_id;
83 __le32 noa_active;
84 struct iwl_p2p_noa_attr noa_attr;
85 u8 csa_counter;
86 u8 reserved[3];
87 } __packed; /* PROBE_RESPONSE_DATA_NTFY_API_S_VER_1 */
89 /**
90 * struct iwl_missed_vap_notif - notification of missing vap detection
92 * @mac_id: the mac for which the ucode sends the notification for
93 * @num_beacon_intervals_elapsed: beacons elpased with no vap profile inside
94 * @profile_periodicity: beacons period to have our profile inside
95 * @reserved: reserved for alignment purposes
97 struct iwl_missed_vap_notif {
98 __le32 mac_id;
99 u8 num_beacon_intervals_elapsed;
100 u8 profile_periodicity;
101 u8 reserved[2];
102 } __packed; /* MISSED_VAP_NTFY_API_S_VER_1 */
105 * struct iwl_channel_switch_noa_notif - Channel switch NOA notification
107 * @id_and_color: ID and color of the MAC
109 struct iwl_channel_switch_noa_notif {
110 __le32 id_and_color;
111 } __packed; /* CHANNEL_SWITCH_START_NTFY_API_S_VER_1 */
114 * struct iwl_chan_switch_te_cmd - Channel Switch Time Event command
116 * @mac_id: MAC ID for channel switch
117 * @action: action to perform, one of FW_CTXT_ACTION_*
118 * @tsf: beacon tsf
119 * @cs_count: channel switch count from CSA/eCSA IE
120 * @cs_delayed_bcn_count: if set to N (!= 0) GO/AP can delay N beacon intervals
121 * at the new channel after the channel switch, otherwise (N == 0) expect
122 * beacon right after the channel switch.
123 * @cs_mode: 1 - quiet, 0 - otherwise
124 * @reserved: reserved for alignment purposes
126 struct iwl_chan_switch_te_cmd {
127 __le32 mac_id;
128 __le32 action;
129 __le32 tsf;
130 u8 cs_count;
131 u8 cs_delayed_bcn_count;
132 u8 cs_mode;
133 u8 reserved;
134 } __packed; /* MAC_CHANNEL_SWITCH_TIME_EVENT_S_VER_2 */
137 * struct iwl_mac_low_latency_cmd - set/clear mac to 'low-latency mode'
139 * @mac_id: MAC ID to whom to apply the low-latency configurations
140 * @low_latency_rx: 1/0 to set/clear Rx low latency direction
141 * @low_latency_tx: 1/0 to set/clear Tx low latency direction
142 * @reserved: reserved for alignment purposes
144 struct iwl_mac_low_latency_cmd {
145 __le32 mac_id;
146 u8 low_latency_rx;
147 u8 low_latency_tx;
148 __le16 reserved;
149 } __packed; /* MAC_LOW_LATENCY_API_S_VER_1 */
151 #endif /* __iwl_fw_api_mac_cfg_h__ */