18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: ISC */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (C) 2018 Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#ifndef __MT76x2U_H
78c2ecf20Sopenharmony_ci#define __MT76x2U_H
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#include <linux/device.h>
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include "mt76x2.h"
128c2ecf20Sopenharmony_ci#include "mcu.h"
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#define MT7612U_EEPROM_SIZE		512
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#define MT_USB_AGGR_SIZE_LIMIT		21 /* 1024B unit */
178c2ecf20Sopenharmony_ci#define MT_USB_AGGR_TIMEOUT		0x80 /* 33ns unit */
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciextern const struct ieee80211_ops mt76x2u_ops;
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciint mt76x2u_register_device(struct mt76x02_dev *dev);
228c2ecf20Sopenharmony_ciint mt76x2u_init_hardware(struct mt76x02_dev *dev);
238c2ecf20Sopenharmony_civoid mt76x2u_cleanup(struct mt76x02_dev *dev);
248c2ecf20Sopenharmony_civoid mt76x2u_stop_hw(struct mt76x02_dev *dev);
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciint mt76x2u_mac_reset(struct mt76x02_dev *dev);
278c2ecf20Sopenharmony_ciint mt76x2u_mac_stop(struct mt76x02_dev *dev);
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciint mt76x2u_phy_set_channel(struct mt76x02_dev *dev,
308c2ecf20Sopenharmony_ci			    struct cfg80211_chan_def *chandef);
318c2ecf20Sopenharmony_civoid mt76x2u_phy_calibrate(struct work_struct *work);
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_civoid mt76x2u_mcu_complete_urb(struct urb *urb);
348c2ecf20Sopenharmony_ciint mt76x2u_mcu_init(struct mt76x02_dev *dev);
358c2ecf20Sopenharmony_ciint mt76x2u_mcu_fw_init(struct mt76x02_dev *dev);
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciint mt76x2u_alloc_queues(struct mt76x02_dev *dev);
388c2ecf20Sopenharmony_civoid mt76x2u_queues_deinit(struct mt76x02_dev *dev);
398c2ecf20Sopenharmony_civoid mt76x2u_stop_queues(struct mt76x02_dev *dev);
408c2ecf20Sopenharmony_ciint mt76x2u_skb_dma_info(struct sk_buff *skb, enum dma_msg_port port,
418c2ecf20Sopenharmony_ci			 u32 flags);
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci#endif /* __MT76x2U_H */
44