linux/drivers/net/ethernet/meta/fbnic/fbnic_fw.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) Meta Platforms, Inc. and affiliates. */

#ifndef _FBNIC_FW_H_
#define _FBNIC_FW_H_

#include <linux/if_ether.h>
#include <linux/types.h>

struct fbnic_dev;
struct fbnic_tlv_msg;

struct fbnic_fw_mbx {};

// FW_VER_MAX_SIZE must match ETHTOOL_FWVERS_LEN
#define FBNIC_FW_VER_MAX_SIZE
// Formatted version is in the format XX.YY.ZZ_RRR_COMMIT
#define FBNIC_FW_CAP_RESP_COMMIT_MAX_SIZE
#define FBNIC_FW_LOG_MAX_SIZE

struct fbnic_fw_ver {};

struct fbnic_fw_cap {};

void fbnic_mbx_init(struct fbnic_dev *fbd);
void fbnic_mbx_clean(struct fbnic_dev *fbd);
void fbnic_mbx_poll(struct fbnic_dev *fbd);
int fbnic_mbx_poll_tx_ready(struct fbnic_dev *fbd);
void fbnic_mbx_flush_tx(struct fbnic_dev *fbd);
int fbnic_fw_xmit_ownership_msg(struct fbnic_dev *fbd, bool take_ownership);
int fbnic_fw_init_heartbeat(struct fbnic_dev *fbd, bool poll);
void fbnic_fw_check_heartbeat(struct fbnic_dev *fbd);

#define fbnic_mk_full_fw_ver_str(_rev_id, _delim, _commit, _str, _str_sz)

#define fbnic_mk_fw_ver_str(_rev_id, _str)

#define FW_HEARTBEAT_PERIOD

enum {};

#define FBNIC_FW_CAP_RESP_VERSION_MAJOR
#define FBNIC_FW_CAP_RESP_VERSION_MINOR
#define FBNIC_FW_CAP_RESP_VERSION_PATCH
#define FBNIC_FW_CAP_RESP_VERSION_BUILD
enum {};

enum {};

enum {};

enum {};
#endif /* _FBNIC_FW_H_ */