#include <linux/kernel.h>
#include <linux/firmware.h>
#include <linux/delay.h>
#include <linux/usb.h>
#include <linux/skbuff.h>
#include "mt7601u.h"
#include "dma.h"
#include "mcu.h"
#include "usb.h"
#include "trace.h"
#define MCU_FW_URB_MAX_PAYLOAD …
#define MCU_FW_URB_SIZE …
#define MCU_RESP_URB_SIZE …
static inline int firmware_running(struct mt7601u_dev *dev)
{ … }
static inline void skb_put_le32(struct sk_buff *skb, u32 val)
{ … }
static inline void mt7601u_dma_skb_wrap_cmd(struct sk_buff *skb,
u8 seq, enum mcu_cmd cmd)
{ … }
static inline void trace_mt_mcu_msg_send_cs(struct mt7601u_dev *dev,
struct sk_buff *skb, bool need_resp)
{ … }
static struct sk_buff *mt7601u_mcu_msg_alloc(const void *data, int len)
{ … }
static int mt7601u_mcu_wait_resp(struct mt7601u_dev *dev, u8 seq)
{ … }
static int
mt7601u_mcu_msg_send(struct mt7601u_dev *dev, struct sk_buff *skb,
enum mcu_cmd cmd, bool wait_resp)
{ … }
static int mt7601u_mcu_function_select(struct mt7601u_dev *dev,
enum mcu_function func, u32 val)
{ … }
int mt7601u_mcu_tssi_read_kick(struct mt7601u_dev *dev, int use_hvga)
{ … }
int
mt7601u_mcu_calibrate(struct mt7601u_dev *dev, enum mcu_calibrate cal, u32 val)
{ … }
int mt7601u_write_reg_pairs(struct mt7601u_dev *dev, u32 base,
const struct mt76_reg_pair *data, int n)
{ … }
int mt7601u_burst_write_regs(struct mt7601u_dev *dev, u32 offset,
const u32 *data, int n)
{ … }
struct mt76_fw_header { … };
struct mt76_fw { … };
static int __mt7601u_dma_fw(struct mt7601u_dev *dev,
const struct mt7601u_dma_buf *dma_buf,
const void *data, u32 len, u32 dst_addr)
{ … }
static int
mt7601u_dma_fw(struct mt7601u_dev *dev, struct mt7601u_dma_buf *dma_buf,
const void *data, int len, u32 dst_addr)
{ … }
static int
mt7601u_upload_firmware(struct mt7601u_dev *dev, const struct mt76_fw *fw)
{ … }
static int mt7601u_load_firmware(struct mt7601u_dev *dev)
{ … }
int mt7601u_mcu_init(struct mt7601u_dev *dev)
{ … }
int mt7601u_mcu_cmd_init(struct mt7601u_dev *dev)
{ … }
void mt7601u_mcu_cmd_deinit(struct mt7601u_dev *dev)
{ … }