1 /****************************************************************************** 2 * 3 * This file is provided under a dual BSD/GPLv2 license. When using or 4 * redistributing this file, you may do so under either license. 5 * 6 * GPL LICENSE SUMMARY 7 * 8 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. 9 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH 10 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH 11 * Copyright(c) 2018 Intel Corporation 12 * 13 * This program is free software; you can redistribute it and/or modify 14 * it under the terms of version 2 of the GNU General Public License as 15 * published by the Free Software Foundation. 16 * 17 * This program is distributed in the hope that it will be useful, but 18 * WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 * General Public License for more details. 21 * 22 * The full GNU General Public License is included in this distribution 23 * in the file called COPYING. 24 * 25 * Contact Information: 26 * Intel Linux Wireless <linuxwifi@intel.com> 27 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 28 * 29 * BSD LICENSE 30 * 31 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. 32 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH 33 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH 34 * Copyright(c) 2018 Intel Corporation 35 * All rights reserved. 36 * 37 * Redistribution and use in source and binary forms, with or without 38 * modification, are permitted provided that the following conditions 39 * are met: 40 * 41 * * Redistributions of source code must retain the above copyright 42 * notice, this list of conditions and the following disclaimer. 43 * * Redistributions in binary form must reproduce the above copyright 44 * notice, this list of conditions and the following disclaimer in 45 * the documentation and/or other materials provided with the 46 * distribution. 47 * * Neither the name Intel Corporation nor the names of its 48 * contributors may be used to endorse or promote products derived 49 * from this software without specific prior written permission. 50 * 51 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 52 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 53 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 54 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 55 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 56 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 57 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 58 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 59 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 60 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 61 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 62 * 63 *****************************************************************************/ 64 65 #ifndef __iwl_fw_api_mac_cfg_h__ 66 #define __iwl_fw_api_mac_cfg_h__ 67 68 /** 69 * enum iwl_mac_conf_subcmd_ids - mac configuration command IDs 70 */ 71 enum iwl_mac_conf_subcmd_ids { 72 /** 73 * @LOW_LATENCY_CMD: &struct iwl_mac_low_latency_cmd 74 */ 75 LOW_LATENCY_CMD = 0x3, 76 /** 77 * @CHANNEL_SWITCH_TIME_EVENT_CMD: &struct iwl_chan_switch_te_cmd 78 */ 79 CHANNEL_SWITCH_TIME_EVENT_CMD = 0x4, 80 /** 81 * @PROBE_RESPONSE_DATA_NOTIF: &struct iwl_probe_resp_data_notif 82 */ 83 PROBE_RESPONSE_DATA_NOTIF = 0xFC, 84 85 /** 86 * @CHANNEL_SWITCH_NOA_NOTIF: &struct iwl_channel_switch_noa_notif 87 */ 88 CHANNEL_SWITCH_NOA_NOTIF = 0xFF, 89 }; 90 91 #define IWL_P2P_NOA_DESC_COUNT (2) 92 93 /** 94 * struct iwl_p2p_noa_attr - NOA attr contained in probe resp FW notification 95 * 96 * @id: attribute id 97 * @len_low: length low half 98 * @len_high: length high half 99 * @idx: instance of NoA timing 100 * @ctwin: GO's ct window and pwer save capability 101 * @desc: NoA descriptor 102 * @reserved: reserved for alignment purposes 103 */ 104 struct iwl_p2p_noa_attr { 105 u8 id; 106 u8 len_low; 107 u8 len_high; 108 u8 idx; 109 u8 ctwin; 110 struct ieee80211_p2p_noa_desc desc[IWL_P2P_NOA_DESC_COUNT]; 111 u8 reserved; 112 } __packed; 113 114 #define IWL_PROBE_RESP_DATA_NO_CSA (0xff) 115 116 /** 117 * struct iwl_probe_resp_data_notif - notification with NOA and CSA counter 118 * 119 * @mac_id: the mac which should send the probe response 120 * @noa_active: notifies if the noa attribute should be handled 121 * @noa_attr: P2P NOA attribute 122 * @csa_counter: current csa counter 123 * @reserved: reserved for alignment purposes 124 */ 125 struct iwl_probe_resp_data_notif { 126 __le32 mac_id; 127 __le32 noa_active; 128 struct iwl_p2p_noa_attr noa_attr; 129 u8 csa_counter; 130 u8 reserved[3]; 131 } __packed; /* PROBE_RESPONSE_DATA_NTFY_API_S_VER_1 */ 132 133 /** 134 * struct iwl_channel_switch_noa_notif - Channel switch NOA notification 135 * 136 * @id_and_color: ID and color of the MAC 137 */ 138 struct iwl_channel_switch_noa_notif { 139 __le32 id_and_color; 140 } __packed; /* CHANNEL_SWITCH_START_NTFY_API_S_VER_1 */ 141 142 /** 143 * struct iwl_chan_switch_te_cmd - Channel Switch Time Event command 144 * 145 * @mac_id: MAC ID for channel switch 146 * @action: action to perform, one of FW_CTXT_ACTION_* 147 * @tsf: beacon tsf 148 * @cs_count: channel switch count from CSA/eCSA IE 149 * @cs_delayed_bcn_count: if set to N (!= 0) GO/AP can delay N beacon intervals 150 * at the new channel after the channel switch, otherwise (N == 0) expect 151 * beacon right after the channel switch. 152 * @cs_mode: 1 - quiet, 0 - otherwise 153 * @reserved: reserved for alignment purposes 154 */ 155 struct iwl_chan_switch_te_cmd { 156 __le32 mac_id; 157 __le32 action; 158 __le32 tsf; 159 u8 cs_count; 160 u8 cs_delayed_bcn_count; 161 u8 cs_mode; 162 u8 reserved; 163 } __packed; /* MAC_CHANNEL_SWITCH_TIME_EVENT_S_VER_2 */ 164 165 /** 166 * struct iwl_mac_low_latency_cmd - set/clear mac to 'low-latency mode' 167 * 168 * @mac_id: MAC ID to whom to apply the low-latency configurations 169 * @low_latency_rx: 1/0 to set/clear Rx low latency direction 170 * @low_latency_tx: 1/0 to set/clear Tx low latency direction 171 * @reserved: reserved for alignment purposes 172 */ 173 struct iwl_mac_low_latency_cmd { 174 __le32 mac_id; 175 u8 low_latency_rx; 176 u8 low_latency_tx; 177 __le16 reserved; 178 } __packed; /* MAC_LOW_LATENCY_API_S_VER_1 */ 179 180 #endif /* __iwl_fw_api_mac_cfg_h__ */ 181