2013-05-08 21:45:39 +00:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of version 2 of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
|
|
*
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
#ifndef _RTW_XMIT_H_
|
|
|
|
#define _RTW_XMIT_H_
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
#include <drv_conf.h>
|
2013-05-08 21:45:39 +00:00
|
|
|
#include <osdep_service.h>
|
|
|
|
#include <drv_types.h>
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
#define MAX_XMITBUF_SZ (20480) /* 20k */
|
2015-02-26 20:19:01 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
#ifdef CONFIG_SINGLE_XMIT_BUF
|
|
|
|
#define NR_XMITBUFF (1)
|
|
|
|
#else
|
|
|
|
#define NR_XMITBUFF (4)
|
2015-03-16 14:43:53 +00:00
|
|
|
#endif /* CONFIG_SINGLE_XMIT_BUF */
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
#define XMITBUF_ALIGN_SZ 512
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* xmit extension buff defination */
|
2013-05-08 21:45:39 +00:00
|
|
|
#define MAX_XMIT_EXTBUF_SZ (1536)
|
2014-12-11 21:15:04 +00:00
|
|
|
#define NR_XMIT_EXTBUFF (32)
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
#define MAX_NUMBLKS (1)
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
#define XMIT_VO_QUEUE (0)
|
|
|
|
#define XMIT_VI_QUEUE (1)
|
|
|
|
#define XMIT_BE_QUEUE (2)
|
|
|
|
#define XMIT_BK_QUEUE (3)
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
#define VO_QUEUE_INX 0
|
|
|
|
#define VI_QUEUE_INX 1
|
|
|
|
#define BE_QUEUE_INX 2
|
|
|
|
#define BK_QUEUE_INX 3
|
|
|
|
#define BCN_QUEUE_INX 4
|
|
|
|
#define MGT_QUEUE_INX 5
|
|
|
|
#define HIGH_QUEUE_INX 6
|
2014-12-11 21:15:04 +00:00
|
|
|
#define TXCMD_QUEUE_INX 7
|
|
|
|
|
|
|
|
#define HW_QUEUE_ENTRY 8
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
#define WEP_IV(pattrib_iv, dot11txpn, keyidx)\
|
2014-12-11 21:15:04 +00:00
|
|
|
do{\
|
2013-05-08 21:45:39 +00:00
|
|
|
pattrib_iv[0] = dot11txpn._byte_.TSC0;\
|
|
|
|
pattrib_iv[1] = dot11txpn._byte_.TSC1;\
|
|
|
|
pattrib_iv[2] = dot11txpn._byte_.TSC2;\
|
|
|
|
pattrib_iv[3] = ((keyidx & 0x3)<<6);\
|
2014-12-11 21:15:04 +00:00
|
|
|
dot11txpn.val = (dot11txpn.val == 0xffffff) ? 0: (dot11txpn.val+1);\
|
|
|
|
}while(0)
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
#define TKIP_IV(pattrib_iv, dot11txpn, keyidx)\
|
2014-12-11 21:15:04 +00:00
|
|
|
do{\
|
2013-05-08 21:45:39 +00:00
|
|
|
pattrib_iv[0] = dot11txpn._byte_.TSC1;\
|
|
|
|
pattrib_iv[1] = (dot11txpn._byte_.TSC1 | 0x20) & 0x7f;\
|
|
|
|
pattrib_iv[2] = dot11txpn._byte_.TSC0;\
|
|
|
|
pattrib_iv[3] = BIT(5) | ((keyidx & 0x3)<<6);\
|
|
|
|
pattrib_iv[4] = dot11txpn._byte_.TSC2;\
|
|
|
|
pattrib_iv[5] = dot11txpn._byte_.TSC3;\
|
|
|
|
pattrib_iv[6] = dot11txpn._byte_.TSC4;\
|
|
|
|
pattrib_iv[7] = dot11txpn._byte_.TSC5;\
|
2014-12-11 21:15:04 +00:00
|
|
|
dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\
|
|
|
|
}while(0)
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
#define AES_IV(pattrib_iv, dot11txpn, keyidx)\
|
2014-12-11 21:15:04 +00:00
|
|
|
do{\
|
|
|
|
pattrib_iv[0] = dot11txpn._byte_.TSC0;\
|
|
|
|
pattrib_iv[1] = dot11txpn._byte_.TSC1;\
|
|
|
|
pattrib_iv[2] = 0;\
|
|
|
|
pattrib_iv[3] = BIT(5) | ((keyidx & 0x3)<<6);\
|
|
|
|
pattrib_iv[4] = dot11txpn._byte_.TSC2;\
|
|
|
|
pattrib_iv[5] = dot11txpn._byte_.TSC3;\
|
|
|
|
pattrib_iv[6] = dot11txpn._byte_.TSC4;\
|
|
|
|
pattrib_iv[7] = dot11txpn._byte_.TSC5;\
|
|
|
|
dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\
|
|
|
|
}while(0)
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
#define HWXMIT_ENTRY 4
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
#define TXDESC_SIZE 32
|
|
|
|
|
|
|
|
#define PACKET_OFFSET_SZ (8)
|
|
|
|
#define TXDESC_OFFSET (TXDESC_SIZE + PACKET_OFFSET_SZ)
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
struct tx_desc{
|
2014-12-15 05:08:37 +00:00
|
|
|
/* DWORD 0 */
|
|
|
|
__le32 txdw0;
|
|
|
|
__le32 txdw1;
|
|
|
|
__le32 txdw2;
|
|
|
|
__le32 txdw3;
|
|
|
|
__le32 txdw4;
|
|
|
|
__le32 txdw5;
|
|
|
|
__le32 txdw6;
|
|
|
|
__le32 txdw7;
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
union txdesc {
|
|
|
|
struct tx_desc txdesc;
|
|
|
|
unsigned int value[TXDESC_SIZE>>2];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct hw_xmit {
|
2015-03-16 13:54:18 +00:00
|
|
|
struct __queue *sta_queue;
|
2013-05-08 21:45:39 +00:00
|
|
|
int accnt;
|
|
|
|
};
|
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* reduce size */
|
2014-12-11 21:15:04 +00:00
|
|
|
struct pkt_attrib
|
|
|
|
{
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 type;
|
|
|
|
u8 subtype;
|
|
|
|
u8 bswenc;
|
|
|
|
u8 dhcp_pkt;
|
|
|
|
u16 ether_type;
|
|
|
|
u16 seqnum;
|
2015-03-16 14:43:53 +00:00
|
|
|
u16 pkt_hdrlen; /* the original 802.3 pkt header len */
|
|
|
|
u16 hdrlen; /* the WLAN Header Len */
|
|
|
|
u32 pktlen; /* the original 802.3 pkt raw_data len (not include ether_hdr data) */
|
2013-05-08 21:45:39 +00:00
|
|
|
u32 last_txcmdsz;
|
|
|
|
u8 nr_frags;
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 encrypt; /* when 0 indicate no encrypt. when non-zero, indicate the encrypt algorith */
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 iv_len;
|
|
|
|
u8 icv_len;
|
|
|
|
u8 iv[18];
|
|
|
|
u8 icv[16];
|
|
|
|
u8 priority;
|
|
|
|
u8 ack_policy;
|
|
|
|
u8 mac_id;
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 vcs_mode; /* virtual carrier sense method */
|
2014-12-19 06:59:46 +00:00
|
|
|
u8 dst[ETH_ALEN];
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 src[ETH_ALEN];
|
|
|
|
u8 ta[ETH_ALEN];
|
2014-12-19 06:59:46 +00:00
|
|
|
u8 ra[ETH_ALEN];
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 key_idx;
|
|
|
|
u8 qos_en;
|
|
|
|
u8 ht_en;
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 raid;/* rate adpative id */
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 bwmode;
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 ch_offset;/* PRIME_CHNL_OFFSET */
|
|
|
|
u8 sgi;/* short GI */
|
|
|
|
u8 ampdu_en;/* tx ampdu enable */
|
|
|
|
u8 mdata;/* more data bit */
|
|
|
|
u8 pctrl;/* per packet txdesc control enable */
|
|
|
|
u8 triggered;/* for ap mode handling Power Saving sta */
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 qsel;
|
|
|
|
u8 eosp;
|
|
|
|
u8 rate;
|
|
|
|
u8 intel_proxim;
|
2014-12-19 06:59:46 +00:00
|
|
|
u8 retry_ctrl;
|
2014-12-11 21:15:04 +00:00
|
|
|
struct sta_info * psta;
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
#define WLANHDR_OFFSET 64
|
|
|
|
|
|
|
|
#define NULL_FRAMETAG (0x0)
|
|
|
|
#define DATA_FRAMETAG 0x01
|
|
|
|
#define L2_FRAMETAG 0x02
|
|
|
|
#define MGNT_FRAMETAG 0x03
|
|
|
|
#define AMSDU_FRAMETAG 0x04
|
|
|
|
|
|
|
|
#define EII_FRAMETAG 0x05
|
|
|
|
#define IEEE8023_FRAMETAG 0x06
|
|
|
|
|
|
|
|
#define MP_FRAMETAG 0x07
|
|
|
|
|
2014-12-19 06:59:46 +00:00
|
|
|
#define TXAGG_FRAMETAG 0x08
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
struct submit_ctx{
|
2013-05-08 21:45:39 +00:00
|
|
|
u32 submit_time; /* */
|
|
|
|
u32 timeout_ms; /* <0: not synchronous, 0: wait forever, >0: up to ms waiting */
|
|
|
|
int status; /* status for operation */
|
|
|
|
struct completion done;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
RTW_SCTX_SUBMITTED = -1,
|
|
|
|
RTW_SCTX_DONE_SUCCESS = 0,
|
|
|
|
RTW_SCTX_DONE_UNKNOWN,
|
|
|
|
RTW_SCTX_DONE_TIMEOUT,
|
|
|
|
RTW_SCTX_DONE_BUF_ALLOC,
|
|
|
|
RTW_SCTX_DONE_BUF_FREE,
|
|
|
|
RTW_SCTX_DONE_WRITE_PORT_ERR,
|
|
|
|
RTW_SCTX_DONE_TX_DESC_NA,
|
|
|
|
RTW_SCTX_DONE_TX_DENY,
|
|
|
|
RTW_SCTX_DONE_CCX_PKT_FAIL,
|
|
|
|
RTW_SCTX_DONE_DRV_STOP,
|
|
|
|
RTW_SCTX_DONE_DEV_REMOVE,
|
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms);
|
|
|
|
int rtw_sctx_wait(struct submit_ctx *sctx);
|
|
|
|
void rtw_sctx_done_err(struct submit_ctx **sctx, int status);
|
|
|
|
void rtw_sctx_done(struct submit_ctx **sctx);
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
struct xmit_buf
|
|
|
|
{
|
2015-03-16 13:54:18 +00:00
|
|
|
struct list_head list;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2014-12-17 23:13:53 +00:00
|
|
|
struct adapter *padapter;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 *pallocated_buf;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 *pbuf;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
void *priv_data;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
u16 ext_tag; /* 0: Normal xmitbuf, 1: extension xmitbuf. */
|
2013-05-08 21:45:39 +00:00
|
|
|
u16 flags;
|
|
|
|
u32 alloc_sz;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
u32 len;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
struct submit_ctx *sctx;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
u32 ff_hwaddr;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 13:54:18 +00:00
|
|
|
struct urb *pxmit_urb[8];
|
2013-05-08 21:45:39 +00:00
|
|
|
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
|
|
|
u8 bpending[8];
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
sint last[8];
|
|
|
|
|
|
|
|
#if defined(DBG_XMIT_BUF )|| defined(DBG_XMIT_BUF_EXT)
|
|
|
|
u8 no;
|
|
|
|
#endif
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 13:54:18 +00:00
|
|
|
struct xmit_frame {
|
|
|
|
struct list_head list;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
struct pkt_attrib attrib;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 13:54:18 +00:00
|
|
|
struct sk_buff *pkt;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
int frame_tag;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2014-12-17 23:13:53 +00:00
|
|
|
struct adapter *padapter;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 *buf_addr;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
struct xmit_buf *pxmitbuf;
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
u8 agg_num;
|
2013-05-08 21:45:39 +00:00
|
|
|
s8 pkt_offset;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 ack_report;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
u8 *alloc_addr; /* the actual address this xmitframe allocated */
|
|
|
|
u8 ext_tag; /* 0:data, 1:mgmt */
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct tx_servq {
|
2015-03-16 13:54:18 +00:00
|
|
|
struct list_head tx_pending;
|
|
|
|
struct __queue sta_pending;
|
2013-05-08 21:45:39 +00:00
|
|
|
int qcnt;
|
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
struct sta_xmit_priv
|
|
|
|
{
|
2015-03-16 13:54:18 +00:00
|
|
|
spinlock_t lock;
|
2014-12-11 21:15:04 +00:00
|
|
|
sint option;
|
2015-03-16 14:43:53 +00:00
|
|
|
sint apsd_setting; /* When bit mask is on, the associated edca queue supports APSD. */
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
struct tx_servq be_q; /* priority == 0,3 */
|
|
|
|
struct tx_servq bk_q; /* priority == 1,2 */
|
|
|
|
struct tx_servq vi_q; /* priority == 4,5 */
|
|
|
|
struct tx_servq vo_q; /* priority == 6,7 */
|
2015-03-16 13:54:18 +00:00
|
|
|
struct list_head legacy_dz;
|
|
|
|
struct list_head apsd;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
u16 txseq_tid[16];
|
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
struct hw_txqueue {
|
|
|
|
volatile sint head;
|
|
|
|
volatile sint tail;
|
2015-03-16 14:43:53 +00:00
|
|
|
volatile sint free_sz; /* in units of 64 bytes */
|
2014-12-11 21:15:04 +00:00
|
|
|
volatile sint free_cmdsz;
|
|
|
|
volatile sint txsz[8];
|
2013-05-08 21:45:39 +00:00
|
|
|
uint ff_hwaddr;
|
|
|
|
uint cmd_hwaddr;
|
2014-12-11 21:15:04 +00:00
|
|
|
sint ac_tag;
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
struct agg_pkt_info{
|
2013-05-08 21:45:39 +00:00
|
|
|
u16 offset;
|
|
|
|
u16 pkt_len;
|
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
struct xmit_priv {
|
|
|
|
|
2015-03-16 13:54:18 +00:00
|
|
|
spinlock_t lock;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 13:54:18 +00:00
|
|
|
struct semaphore xmit_sema;
|
|
|
|
struct semaphore terminate_xmitthread_sema;
|
|
|
|
struct __queue be_pending;
|
|
|
|
struct __queue bk_pending;
|
|
|
|
struct __queue vi_pending;
|
|
|
|
struct __queue vo_pending;
|
|
|
|
struct __queue bm_pending;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 *pallocated_frame_buf;
|
|
|
|
u8 *pxmit_frame_buf;
|
|
|
|
uint free_xmitframe_cnt;
|
2015-03-16 13:54:18 +00:00
|
|
|
struct __queue free_xmit_queue;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
u8 *xframe_ext_alloc_addr;
|
|
|
|
u8 *xframe_ext;
|
|
|
|
uint free_xframe_ext_cnt;
|
2015-03-16 13:54:18 +00:00
|
|
|
struct __queue free_xframe_ext_queue;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
uint frag_len;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2014-12-17 23:13:53 +00:00
|
|
|
struct adapter *adapter;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 vcs_setting;
|
|
|
|
u8 vcs;
|
|
|
|
u8 vcs_type;
|
2015-03-16 14:43:53 +00:00
|
|
|
/* u16 rts_thresh; */
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
u64 tx_bytes;
|
|
|
|
u64 tx_pkts;
|
|
|
|
u64 tx_drop;
|
|
|
|
u64 last_tx_bytes;
|
|
|
|
u64 last_tx_pkts;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
struct hw_xmit *hwxmits;
|
|
|
|
u8 hwxmit_entry;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 wmm_para_seq[4];/* sequence for wmm ac parameter strength from large to small. it's value is 0->vo, 1->vi, 2->be, 3->bk. */
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
struct semaphore tx_retevt;/* all tx return event; */
|
|
|
|
u8 txirp_cnt;/* */
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
struct tasklet_struct xmit_tasklet;
|
2015-03-16 14:43:53 +00:00
|
|
|
/* per AC pending irp */
|
2013-05-08 21:45:39 +00:00
|
|
|
int beq_cnt;
|
|
|
|
int bkq_cnt;
|
|
|
|
int viq_cnt;
|
|
|
|
int voq_cnt;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 13:54:18 +00:00
|
|
|
struct __queue free_xmitbuf_queue;
|
|
|
|
struct __queue pending_xmitbuf_queue;
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 *pallocated_xmitbuf;
|
|
|
|
u8 *pxmitbuf;
|
|
|
|
uint free_xmitbuf_cnt;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 13:54:18 +00:00
|
|
|
struct __queue free_xmit_extbuf_queue;
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 *pallocated_xmit_extbuf;
|
|
|
|
u8 *pxmit_extbuf;
|
|
|
|
uint free_xmit_extbuf_cnt;
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
u16 nqos_ssn;
|
|
|
|
int ack_tx;
|
2014-12-11 21:15:04 +00:00
|
|
|
_mutex ack_tx_mutex;
|
2013-05-08 21:45:39 +00:00
|
|
|
struct submit_ctx ack_tx_ops;
|
2015-03-16 13:54:18 +00:00
|
|
|
spinlock_t lock_sctx;
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
extern struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv);
|
|
|
|
extern s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
|
|
|
|
|
|
|
|
extern struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv);
|
|
|
|
extern s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
|
|
|
|
|
2014-12-17 23:13:53 +00:00
|
|
|
void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe, int sz);
|
|
|
|
extern void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len);
|
|
|
|
extern s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattrib);
|
2014-12-11 21:15:04 +00:00
|
|
|
extern s32 rtw_put_snap(u8 *data, u16 h_proto);
|
|
|
|
|
|
|
|
extern struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv);
|
|
|
|
struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv);
|
|
|
|
struct xmit_frame *rtw_alloc_xmitframe_once(struct xmit_priv *pxmitpriv);
|
|
|
|
extern s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe);
|
2015-03-16 13:54:18 +00:00
|
|
|
extern void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pframequeue);
|
2014-12-17 23:13:53 +00:00
|
|
|
struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_info *psta, sint up, u8 *ac);
|
|
|
|
extern s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
2014-12-11 21:15:04 +00:00
|
|
|
extern struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i, sint entry);
|
|
|
|
|
2014-12-17 23:13:53 +00:00
|
|
|
extern s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
2014-12-11 21:15:04 +00:00
|
|
|
extern u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib);
|
2013-05-08 21:45:39 +00:00
|
|
|
#define rtw_wlan_pkt_size(f) rtw_calculate_wlan_pkt_size_by_attribue(&f->attrib)
|
2015-03-16 13:54:18 +00:00
|
|
|
extern s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe);
|
2014-12-11 21:15:04 +00:00
|
|
|
#ifdef CONFIG_IEEE80211W
|
2015-03-16 13:54:18 +00:00
|
|
|
extern s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe);
|
2015-03-16 14:43:53 +00:00
|
|
|
#endif /* CONFIG_IEEE80211W */
|
2014-12-11 21:15:04 +00:00
|
|
|
s32 _rtw_init_hw_txqueue(struct hw_txqueue* phw_txqueue, u8 ac_tag);
|
2013-05-08 21:45:39 +00:00
|
|
|
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv);
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
|
2014-12-17 23:13:53 +00:00
|
|
|
s32 rtw_txframes_pending(struct adapter *padapter);
|
|
|
|
s32 rtw_txframes_sta_ac_pending(struct adapter *padapter, struct pkt_attrib *pattrib);
|
2014-12-11 21:15:04 +00:00
|
|
|
void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry);
|
|
|
|
|
|
|
|
|
2014-12-17 23:13:53 +00:00
|
|
|
s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter);
|
2014-12-11 21:15:04 +00:00
|
|
|
void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv);
|
|
|
|
|
|
|
|
|
2014-12-17 23:13:53 +00:00
|
|
|
void rtw_alloc_hwxmits(struct adapter *padapter);
|
|
|
|
void rtw_free_hwxmits(struct adapter *padapter);
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
|
2015-03-16 13:54:18 +00:00
|
|
|
s32 rtw_xmit(struct adapter *padapter, struct sk_buff **pkt);
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-04 21:31:57 +00:00
|
|
|
#if defined(CONFIG_AP_MODE)
|
2014-12-17 23:13:53 +00:00
|
|
|
sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
|
|
|
void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta);
|
|
|
|
void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta);
|
|
|
|
void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *psta);
|
2013-05-08 21:45:39 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
u8 qos_acm(u8 acm_mask, u8 priority);
|
2014-12-11 21:15:04 +00:00
|
|
|
u32 rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe);
|
2013-05-08 21:45:39 +00:00
|
|
|
int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms);
|
|
|
|
void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int status);
|
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* include after declaring struct xmit_buf, in order to avoid warning */
|
2013-05-08 21:45:39 +00:00
|
|
|
#include <xmit_osdep.h>
|
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
#endif /* _RTL871X_XMIT_H_ */
|