brintos

brintos / linux-shallow public Read only

0
0
Text · 2.0 KiB · 8c3d246 Raw
61 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/* Copyright(c) 2024  Realtek Corporation.*/3 4#ifndef __RTL92DU_TRX_H__5#define __RTL92DU_TRX_H__6 7#define TX_SELE_HQ				BIT(0)	/* High Queue */8#define TX_SELE_LQ				BIT(1)	/* Low Queue */9#define TX_SELE_NQ				BIT(2)	/* Normal Queue */10 11#define TX_TOTAL_PAGE_NUMBER_92DU			0xF812#define TEST_PAGE_NUM_PUBQ_92DU				0x8913#define TX_TOTAL_PAGE_NUMBER_92D_DUAL_MAC		0x7A14#define NORMAL_PAGE_NUM_PUBQ_92D_DUAL_MAC		0x5A15#define NORMAL_PAGE_NUM_HPQ_92D_DUAL_MAC		0x1016#define NORMAL_PAGE_NUM_LPQ_92D_DUAL_MAC		0x1017#define NORMAL_PAGE_NUM_NORMALQ_92D_DUAL_MAC		018 19#define WMM_NORMAL_TX_TOTAL_PAGE_NUMBER			0xF520 21#define WMM_NORMAL_PAGE_NUM_PUBQ_92D			0x6522#define WMM_NORMAL_PAGE_NUM_HPQ_92D			0x3023#define WMM_NORMAL_PAGE_NUM_LPQ_92D			0x3024#define WMM_NORMAL_PAGE_NUM_NPQ_92D			0x3025 26#define WMM_NORMAL_PAGE_NUM_PUBQ_92D_DUAL_MAC		0x3227#define WMM_NORMAL_PAGE_NUM_HPQ_92D_DUAL_MAC		0x1828#define WMM_NORMAL_PAGE_NUM_LPQ_92D_DUAL_MAC		0x1829#define WMM_NORMAL_PAGE_NUM_NPQ_92D_DUAL_MAC		0x1830 31static inline void set_tx_desc_bmc(__le32 *__txdesc, u32 __value)32{33	le32p_replace_bits(__txdesc, __value, BIT(24));34}35 36static inline void set_tx_desc_agg_break(__le32 *__txdesc, u32 __value)37{38	le32p_replace_bits((__txdesc + 1), __value, BIT(6));39}40 41static inline void set_tx_desc_tx_desc_checksum(__le32 *__txdesc, u32 __value)42{43	le32p_replace_bits((__txdesc + 7), __value, GENMASK(15, 0));44}45 46void rtl92du_tx_fill_desc(struct ieee80211_hw *hw,47			  struct ieee80211_hdr *hdr, u8 *pdesc,48			  u8 *pbd_desc_tx, struct ieee80211_tx_info *info,49			  struct ieee80211_sta *sta,50			  struct sk_buff *skb, u8 hw_queue,51			  struct rtl_tcb_desc *ptcb_desc);52int rtl92du_endpoint_mapping(struct ieee80211_hw *hw);53u16 rtl92du_mq_to_hwq(__le16 fc, u16 mac80211_queue_index);54struct sk_buff *rtl92du_tx_aggregate_hdl(struct ieee80211_hw *hw,55					 struct sk_buff_head *list);56void rtl92du_tx_cleanup(struct ieee80211_hw *hw, struct sk_buff  *skb);57int rtl92du_tx_post_hdl(struct ieee80211_hw *hw, struct urb *urb,58			struct sk_buff *skb);59 60#endif61