Commit bf0212fd authored by striebit's avatar striebit Committed by Johannes Berg
Browse files

wifi: iwlwifi: mvm: add beacon template version 14

parent 2848df96
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/*
 * Copyright (C) 2012-2014, 2018-2023 Intel Corporation
 * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
 * Copyright (C) 2016-2017 Intel Deutschland GmbH
 */
#ifndef __iwl_fw_api_tx_h__
@@ -793,7 +793,8 @@ enum iwl_mac_beacon_flags {
 * @reserved: reserved
 * @link_id: the firmware id of the link that will use this beacon
 * @tim_idx: the offset of the tim IE in the beacon
 * @tim_size: the length of the tim IE
 * @tim_size: the length of the tim IE (version < 14)
 * @btwt_offset: offset to the broadcast TWT IE if present (version >= 14)
 * @ecsa_offset: offset to the ECSA IE if present
 * @csa_offset: offset to the CSA IE if present
 * @frame: the template of the beacon frame
@@ -805,14 +806,18 @@ struct iwl_mac_beacon_cmd {
	__le32 reserved;
	__le32 link_id;
	__le32 tim_idx;
	union {
		__le32 tim_size;
		__le32 btwt_offset;
	};
	__le32 ecsa_offset;
	__le32 csa_offset;
	struct ieee80211_hdr frame[];
} __packed; /* BEACON_TEMPLATE_CMD_API_S_VER_10,
	     * BEACON_TEMPLATE_CMD_API_S_VER_11,
	     * BEACON_TEMPLATE_CMD_API_S_VER_12,
	     * BEACON_TEMPLATE_CMD_API_S_VER_13
	     * BEACON_TEMPLATE_CMD_API_S_VER_13,
	     * BEACON_TEMPLATE_CMD_API_S_VER_14
	     */

struct iwl_beacon_notif {
+7 −0
Original line number Diff line number Diff line
@@ -1163,6 +1163,13 @@ static int iwl_mvm_mac_ctxt_send_beacon_v9(struct iwl_mvm *mvm,
						   WLAN_EID_EXT_CHANSWITCH_ANN,
						   beacon->len));

	if (vif->type == NL80211_IFTYPE_AP &&
	    iwl_fw_lookup_cmd_ver(mvm->fw, BEACON_TEMPLATE_CMD, 0) >= 14)
		beacon_cmd.btwt_offset =
			cpu_to_le32(iwl_mvm_find_ie_offset(beacon->data,
							   WLAN_EID_S1G_TWT,
							   beacon->len));

	return iwl_mvm_mac_ctxt_send_beacon_cmd(mvm, beacon, &beacon_cmd,
						sizeof(beacon_cmd));
}