linux/drivers/net/wireless/ath/wil6210/fw.h

/* SPDX-License-Identifier: ISC */
/*
 * Copyright (c) 2014,2016 Qualcomm Atheros, Inc.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 */
#ifndef __WIL_FW_H__
#define __WIL_FW_H__

#define WIL_FW_SIGNATURE
#define WIL_FW_FMT_VERSION

enum wil_fw_record_type {};

struct wil_fw_record_head {} __packed;

/* data block. write starting from @addr
 * data_size inferred from the @head.size. For this case,
 * data_size = @head.size - offsetof(struct wil_fw_record_data, data)
 */
struct wil_fw_record_data {} __packed;

/* fill with constant @value, @size bytes starting from @addr */
struct wil_fw_record_fill {} __packed;

/* free-form comment
 * for informational purpose, data_size is @head.size from record header
 */
struct wil_fw_record_comment {} __packed;

/* Comment header - common for all comment record types */
struct wil_fw_record_comment_hdr {};

/* FW capabilities encoded inside a comment record */
#define WIL_FW_CAPABILITIES_MAGIC
struct wil_fw_record_capabilities {} __packed;

/* FW VIF concurrency encoded inside a comment record
 * Format is similar to wiphy->iface_combinations
 */
#define WIL_FW_CONCURRENCY_MAGIC
#define WIL_FW_CONCURRENCY_REC_VER
struct wil_fw_concurrency_limit {} __packed;

struct wil_fw_concurrency_combo {} __packed;

struct wil_fw_record_concurrency {} __packed;

/* brd file info encoded inside a comment record */
#define WIL_BRD_FILE_MAGIC

struct brd_info {} __packed;

struct wil_fw_record_brd_file {} __packed;

/* perform action
 * data_size = @head.size - offsetof(struct wil_fw_record_action, data)
 */
struct wil_fw_record_action {} __packed;

/* data block for struct wil_fw_record_direct_write */
struct wil_fw_data_dwrite {} __packed;

/* write @value to the @addr,
 * preserve original bits accordingly to the @mask
 * data_size is @head.size where @head is record header
 */
struct wil_fw_record_direct_write {} __packed;

/* verify condition: [@addr] & @mask == @value
 * if condition not met, firmware download fails
 */
struct wil_fw_record_verify {} __packed;

/* file header
 * First record of every file
 */
/* the FW version prefix in the comment */
#define WIL_FW_VERSION_PREFIX
#define WIL_FW_VERSION_PREFIX_LEN
struct wil_fw_record_file_header {} __packed;

/* 1-dword gateway */
/* data block for the struct wil_fw_record_gateway_data */
struct wil_fw_data_gw {} __packed;

/* gateway write block.
 * write starting address and values from the data buffer
 * through the gateway
 * data_size inferred from the @head.size. For this case,
 * data_size = @head.size - offsetof(struct wil_fw_record_gateway_data, data)
 */
struct wil_fw_record_gateway_data {} __packed;

/* 4-dword gateway */
/* data block for the struct wil_fw_record_gateway_data4 */
struct wil_fw_data_gw4 {} __packed;

/* gateway write block.
 * write starting address and values from the data buffer
 * through the gateway
 * data_size inferred from the @head.size. For this case,
 * data_size = @head.size - offsetof(struct wil_fw_record_gateway_data4, data)
 */
struct wil_fw_record_gateway_data4 {} __packed;

#endif /* __WIL_FW_H__ */