1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 ******************************************************************************/
15 #ifndef __RTL8723A_XMIT_H__
16 #define __RTL8723A_XMIT_H__
19 /* Queue Select Value in TxDesc */
21 #define QSLT_BK 0x2/* 0x01 */
23 #define QSLT_VI 0x5/* 0x4 */
24 #define QSLT_VO 0x7/* 0x6 */
25 #define QSLT_BEACON 0x10
26 #define QSLT_HIGH 0x11
27 #define QSLT_MGNT 0x12
31 /* defined for TX DESC Operation */
46 #define PKT_OFFSET_SZ 0
49 #define Rate_ID_SHT 16
50 #define NAVUSEHDR BIT(20)
51 #define PKT_OFFSET_SHT 26
55 #define AGG_EN BIT(29)
62 #define HW_SEQ_EN BIT(7)
63 #define USERATE BIT(8)
64 #define DISDATAFB BIT(10)
65 #define DATA_SHORT BIT(24)
66 #define DATA_BW BIT(25)
96 u32 pkt_offset:5; /* unit: 8 bytes */
148 u32 data_ratefb_lmt:5;
149 u32 rts_ratefb_lmt:4;
161 u32 mcs7_sgi_max_len:4;
163 u32 checksum:16; /* TxBuffSize(PCIe)/CheckSum(USB) */
167 u32 mcs15_sgi_max_len:4;
170 #define txdesc_set_ccx_sw_8723a(txdesc, value) \
172 ((struct txdesc_8723a *)(txdesc))->mcsg4_max_len = (((value)>>8) & 0x0f); \
173 ((struct txdesc_8723a *)(txdesc))->mcs15_sgi_max_len= (((value)>>4) & 0x0f); \
174 ((struct txdesc_8723a *)(txdesc))->mcsg6_max_len = ((value) & 0x0f); \
177 struct txrpt_ccx_8723a {
211 #define txrpt_ccx_sw_8723a(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1<<8))
212 #define txrpt_ccx_qtime_8723a(txrpt_ccx) ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8))
214 void handle_txrpt_ccx_8723a(struct rtw_adapter *adapter, void *buf);
215 void rtl8723a_fill_fake_txdesc(struct rtw_adapter *padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
217 int rtl8723au_hal_xmitframe_enqueue(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe);
218 s32 rtl8723au_xmit_buf_handler(struct rtw_adapter *padapter);
219 #define hal_xmit_handler rtl8723au_xmit_buf_handler
220 bool rtl8723au_hal_xmit(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe);
221 int rtl8723au_mgnt_xmit(struct rtw_adapter *padapter, struct xmit_frame *pmgntframe);
222 bool rtl8723au_xmitframe_complete(struct rtw_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);