#ifndef __MT76_CONNAC_H
#define __MT76_CONNAC_H
#include "mt76.h"
enum rx_pkt_type { … };
#define MT76_CONNAC_SCAN_IE_LEN …
#define MT76_CONNAC_MAX_NUM_SCHED_SCAN_INTERVAL …
#define MT76_CONNAC_MAX_TIME_SCHED_SCAN_INTERVAL …
#define MT76_CONNAC_MAX_SCHED_SCAN_SSID …
#define MT76_CONNAC_MAX_SCAN_MATCH …
#define MT76_CONNAC_MAX_WMM_SETS …
#define MT76_CONNAC_COREDUMP_TIMEOUT …
#define MT76_CONNAC_COREDUMP_SZ …
#define MT_TXD_SIZE …
#define MT_USB_TXD_SIZE …
#define MT_USB_HDR_SIZE …
#define MT_USB_TAIL_SIZE …
#define MT_SDIO_TXD_SIZE …
#define MT_SDIO_TAIL_SIZE …
#define MT_SDIO_HDR_SIZE …
#define MT_MSDU_ID_VALID …
#define MT_TXD_LEN_LAST …
#define MT_TXD_LEN_MASK …
#define MT_TXD_LEN_MSDU_LAST …
#define MT_TXD_LEN_AMSDU_LAST …
enum { … };
enum { … };
struct mt76_connac_reg_map { … };
struct mt76_connac_pm { … };
struct mt76_connac_coredump { … };
struct mt76_connac_sta_key_conf { … };
#define MT_TXP_MAX_BUF_NUM …
struct mt76_connac_fw_txp { … } __packed __aligned(…);
#define MT_HW_TXP_MAX_MSDU_NUM …
#define MT_HW_TXP_MAX_BUF_NUM …
struct mt76_connac_txp_ptr { … } __packed __aligned(…);
struct mt76_connac_hw_txp { … } __packed __aligned(…);
struct mt76_connac_txp_common { … };
struct mt76_connac_tx_free { … } __packed __aligned(…);
extern const struct wiphy_wowlan_support mt76_connac_wowlan_support;
static inline bool is_mt7925(struct mt76_dev *dev)
{ … }
static inline bool is_mt7920(struct mt76_dev *dev)
{ … }
static inline bool is_mt7922(struct mt76_dev *dev)
{ … }
static inline bool is_mt7921(struct mt76_dev *dev)
{ … }
static inline bool is_mt7663(struct mt76_dev *dev)
{ … }
static inline bool is_mt7915(struct mt76_dev *dev)
{ … }
static inline bool is_mt7916(struct mt76_dev *dev)
{ … }
static inline bool is_mt7981(struct mt76_dev *dev)
{ … }
static inline bool is_mt7986(struct mt76_dev *dev)
{ … }
static inline bool is_mt798x(struct mt76_dev *dev)
{ … }
static inline bool is_mt7996(struct mt76_dev *dev)
{ … }
static inline bool is_mt7992(struct mt76_dev *dev)
{ … }
static inline bool is_mt799x(struct mt76_dev *dev)
{ … }
static inline bool is_mt7622(struct mt76_dev *dev)
{ … }
static inline bool is_mt7615(struct mt76_dev *dev)
{ … }
static inline bool is_mt7611(struct mt76_dev *dev)
{ … }
static inline bool is_connac_v1(struct mt76_dev *dev)
{ … }
static inline bool is_mt76_fw_txp(struct mt76_dev *dev)
{ … }
static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def *chandef)
{ … }
static inline u8 mt76_connac_lmac_mapping(u8 ac)
{ … }
static inline void *
mt76_connac_txwi_to_txp(struct mt76_dev *dev, struct mt76_txwi_cache *t)
{ … }
static inline u8 mt76_connac_spe_idx(u8 antenna_mask)
{ … }
static inline void mt76_connac_irq_enable(struct mt76_dev *dev, u32 mask)
{ … }
int mt76_connac_pm_wake(struct mt76_phy *phy, struct mt76_connac_pm *pm);
void mt76_connac_power_save_sched(struct mt76_phy *phy,
struct mt76_connac_pm *pm);
void mt76_connac_free_pending_tx_skbs(struct mt76_connac_pm *pm,
struct mt76_wcid *wcid);
static inline void mt76_connac_tx_cleanup(struct mt76_dev *dev)
{ … }
static inline bool
mt76_connac_pm_ref(struct mt76_phy *phy, struct mt76_connac_pm *pm)
{ … }
static inline void
mt76_connac_pm_unref(struct mt76_phy *phy, struct mt76_connac_pm *pm)
{ … }
static inline bool
mt76_connac_skip_fw_pmctrl(struct mt76_phy *phy, struct mt76_connac_pm *pm)
{ … }
static inline void
mt76_connac_mutex_acquire(struct mt76_dev *dev, struct mt76_connac_pm *pm)
__acquires(&dev->mutex)
{ … }
static inline void
mt76_connac_mutex_release(struct mt76_dev *dev, struct mt76_connac_pm *pm)
__releases(&dev->mutex)
{ … }
void mt76_connac_gen_ppe_thresh(u8 *he_ppet, int nss);
int mt76_connac_init_tx_queues(struct mt76_phy *phy, int idx, int n_desc,
int ring_base, void *wed, u32 flags);
void mt76_connac_write_hw_txp(struct mt76_dev *dev,
struct mt76_tx_info *tx_info,
void *txp_ptr, u32 id);
void mt76_connac_txp_skb_unmap(struct mt76_dev *dev,
struct mt76_txwi_cache *txwi);
void mt76_connac_tx_complete_skb(struct mt76_dev *mdev,
struct mt76_queue_entry *e);
void mt76_connac_pm_queue_skb(struct ieee80211_hw *hw,
struct mt76_connac_pm *pm,
struct mt76_wcid *wcid,
struct sk_buff *skb);
void mt76_connac_pm_dequeue_skbs(struct mt76_phy *phy,
struct mt76_connac_pm *pm);
void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
struct sk_buff *skb, struct mt76_wcid *wcid,
struct ieee80211_key_conf *key, int pid,
enum mt76_txq_id qid, u32 changed);
u16 mt76_connac2_mac_tx_rate_val(struct mt76_phy *mphy,
struct ieee80211_vif *vif,
bool beacon, bool mcast);
bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid,
__le32 *txs_data);
bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
int pid, __le32 *txs_data);
void mt76_connac2_mac_decode_he_radiotap(struct mt76_dev *dev,
struct sk_buff *skb,
__le32 *rxv, u32 mode);
int mt76_connac2_reverse_frag0_hdr_trans(struct ieee80211_vif *vif,
struct sk_buff *skb, u16 hdr_offset);
int mt76_connac2_mac_fill_rx_rate(struct mt76_dev *dev,
struct mt76_rx_status *status,
struct ieee80211_supported_band *sband,
__le32 *rxv, u8 *mode);
void mt76_connac2_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi);
void mt76_connac2_txwi_free(struct mt76_dev *dev, struct mt76_txwi_cache *t,
struct ieee80211_sta *sta,
struct list_head *free_list);
void mt76_connac2_tx_token_put(struct mt76_dev *dev);
void mt76_connac3_mac_decode_he_radiotap(struct sk_buff *skb, __le32 *rxv,
u8 mode);
void mt76_connac3_mac_decode_eht_radiotap(struct sk_buff *skb, __le32 *rxv,
u8 mode);
#endif