rtl8188eu: Convert typedef for _pkt into struct sk_buff

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-24 17:03:54 -05:00
parent 9c56f20d4c
commit 3e3d47445a
11 changed files with 30 additions and 46 deletions

View file

@ -2064,7 +2064,7 @@ static int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
unsigned char *pdata; unsigned char *pdata;
struct rx_pkt_attrib *pattrib; struct rx_pkt_attrib *pattrib;
unsigned char *data_ptr; unsigned char *data_ptr;
_pkt *sub_skb,*subframes[MAX_SUBFRAME_COUNT]; struct sk_buff *sub_skb,*subframes[MAX_SUBFRAME_COUNT];
struct recv_priv *precvpriv = &padapter->recvpriv; struct recv_priv *precvpriv = &padapter->recvpriv;
_queue *pfree_recv_queue = &(precvpriv->free_recv_queue); _queue *pfree_recv_queue = &(precvpriv->free_recv_queue);
int ret = _SUCCESS; int ret = _SUCCESS;

View file

@ -545,7 +545,7 @@ static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
pattrib->subtype = WIFI_QOS_DATA_TYPE; pattrib->subtype = WIFI_QOS_DATA_TYPE;
} }
static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattrib) static s32 update_attrib(_adapter *padapter, struct sk_buff *pkt, struct pkt_attrib *pattrib)
{ {
struct pkt_file pktfile; struct pkt_file pktfile;
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
@ -1156,7 +1156,7 @@ This sub-routine will perform all the following:
6. apply sw-encrypt, if necessary. 6. apply sw-encrypt, if necessary.
*/ */
s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxmitframe) s32 rtw_xmitframe_coalesce(_adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
{ {
struct pkt_file pktfile; struct pkt_file pktfile;
@ -1675,7 +1675,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
unsigned long irqL; unsigned long irqL;
_queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue; _queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue;
_adapter *padapter = pxmitpriv->adapter; _adapter *padapter = pxmitpriv->adapter;
_pkt *pndis_pkt = NULL; struct sk_buff *pndis_pkt = NULL;
_func_enter_; _func_enter_;
@ -2289,7 +2289,7 @@ static void do_queue_select(_adapter *padapter, struct pkt_attrib *pattrib)
* 0 success, hardware will handle this xmit frame(packet) * 0 success, hardware will handle this xmit frame(packet)
* <0 fail * <0 fail
*/ */
s32 rtw_xmit(_adapter *padapter, _pkt **ppkt) s32 rtw_xmit(_adapter *padapter, struct sk_buff **ppkt)
{ {
#ifdef CONFIG_AP_MODE #ifdef CONFIG_AP_MODE
unsigned long irqL0; unsigned long irqL0;

View file

@ -342,7 +342,7 @@ static s32 pre_recv_entry(union recv_frame *precvframe, struct recv_stat *prxsta
return _SUCCESS; return _SUCCESS;
} }
static int recvbuf2recvframe(_adapter *padapter, _pkt *pskb) static int recvbuf2recvframe(_adapter *padapter, struct sk_buff *pskb)
{ {
u8 *pbuf; u8 *pbuf;
u8 shift_sz = 0; u8 shift_sz = 0;
@ -351,7 +351,7 @@ static int recvbuf2recvframe(_adapter *padapter, _pkt *pskb)
s32 transfer_len; s32 transfer_len;
struct recv_stat *prxstat; struct recv_stat *prxstat;
struct phy_stat *pphy_status = NULL; struct phy_stat *pphy_status = NULL;
_pkt *pkt_copy = NULL; struct sk_buff *pkt_copy = NULL;
union recv_frame *precvframe = NULL; union recv_frame *precvframe = NULL;
struct rx_pkt_attrib *pattrib = NULL; struct rx_pkt_attrib *pattrib = NULL;
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter); struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
@ -537,7 +537,7 @@ _exit_recvbuf2recvframe:
void rtl8188eu_recv_tasklet(void *priv) void rtl8188eu_recv_tasklet(void *priv)
{ {
_pkt *pskb; struct sk_buff *pskb;
_adapter *padapter = (_adapter*)priv; _adapter *padapter = (_adapter*)priv;
struct recv_priv *precvpriv = &padapter->recvpriv; struct recv_priv *precvpriv = &padapter->recvpriv;

View file

@ -74,7 +74,6 @@
spinlock_t lock; spinlock_t lock;
}; };
typedef struct sk_buff _pkt;
typedef unsigned char _buffer; typedef unsigned char _buffer;
typedef struct __queue _queue; typedef struct __queue _queue;

View file

@ -30,7 +30,7 @@ extern void _rtw_free_recv_priv (struct recv_priv *precvpriv);
extern s32 rtw_recv_entry(union recv_frame *precv_frame); extern s32 rtw_recv_entry(union recv_frame *precv_frame);
extern int rtw_recv_indicatepkt(_adapter *adapter, union recv_frame *precv_frame); extern int rtw_recv_indicatepkt(_adapter *adapter, union recv_frame *precv_frame);
extern void rtw_recv_returnpacket(_nic_hdl cnxt, _pkt *preturnedpkt); extern void rtw_recv_returnpacket(_nic_hdl cnxt, struct sk_buff *preturnedpkt);
extern void rtw_hostapd_mlme_rx(_adapter *padapter, union recv_frame *precv_frame); extern void rtw_hostapd_mlme_rx(_adapter *padapter, union recv_frame *precv_frame);
extern void rtw_handle_tkip_mic_err(_adapter *padapter,u8 bgroup); extern void rtw_handle_tkip_mic_err(_adapter *padapter,u8 bgroup);

View file

@ -109,7 +109,7 @@ struct mp_xmit_frame
struct pkt_attrib attrib; struct pkt_attrib attrib;
_pkt *pkt; struct sk_buff *pkt;
int frame_tag; int frame_tag;

View file

@ -115,7 +115,7 @@ struct phy_info //ODM_PHY_INFO_T
u8 RxSNR[MAX_PATH_NUM_92CS];//per-path's SNR u8 RxSNR[MAX_PATH_NUM_92CS];//per-path's SNR
}; };
struct rx_pkt_attrib { struct rx_pkt_attrib {
u16 pkt_len; u16 pkt_len;
u8 physt; u8 physt;
u8 drvinfo_sz; u8 drvinfo_sz;
@ -246,19 +246,10 @@ struct sta_recv_priv {
spinlock_t lock; spinlock_t lock;
sint option; sint option;
//_queue blk_strms[MAX_RX_NUMBLKS];
_queue defrag_q; //keeping the fragment frame until defrag _queue defrag_q; //keeping the fragment frame until defrag
struct stainfo_rxcache rxcache; struct stainfo_rxcache rxcache;
//uint sta_rx_bytes;
//uint sta_rx_pkts;
//uint sta_rx_fail;
}; };
struct recv_buf struct recv_buf
{ {
_list list; _list list;
@ -283,7 +274,7 @@ struct recv_buf
u8 irp_pending; u8 irp_pending;
int transfer_len; int transfer_len;
_pkt *pskb; struct sk_buff *pskb;
u8 reuse; u8 reuse;
}; };
@ -508,7 +499,7 @@ __inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem)
} }
__inline static union recv_frame *pkt_to_recvframe(_pkt *pkt) __inline static union recv_frame *pkt_to_recvframe(struct sk_buff *pkt)
{ {
u8 * buf_star; u8 * buf_star;
@ -518,7 +509,7 @@ __inline static union recv_frame *pkt_to_recvframe(_pkt *pkt)
return precv_frame; return precv_frame;
} }
__inline static u8 *pkt_to_recvmem(_pkt *pkt) __inline static u8 *pkt_to_recvmem(struct sk_buff *pkt)
{ {
// return the rx_head // return the rx_head
@ -528,7 +519,7 @@ __inline static u8 *pkt_to_recvmem(_pkt *pkt)
} }
__inline static u8 *pkt_to_recvdata(_pkt *pkt) __inline static u8 *pkt_to_recvdata(struct sk_buff *pkt)
{ {
// return the rx_data // return the rx_data

View file

@ -233,7 +233,7 @@ struct xmit_frame
{ {
_list list; _list list;
struct pkt_attrib attrib; struct pkt_attrib attrib;
_pkt *pkt; struct sk_buff *pkt;
int frame_tag; int frame_tag;
_adapter *padapter; _adapter *padapter;
u8 *buf_addr; u8 *buf_addr;
@ -267,12 +267,6 @@ struct sta_xmit_priv
_list apsd; _list apsd;
u16 txseq_tid[16]; u16 txseq_tid[16];
//uint sta_tx_bytes;
//u64 sta_tx_pkts;
//uint sta_tx_fail;
}; };
@ -389,7 +383,7 @@ extern struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct
extern s32 rtw_xmit_classifier(_adapter *padapter, struct xmit_frame *pxmitframe); extern s32 rtw_xmit_classifier(_adapter *padapter, struct xmit_frame *pxmitframe);
extern u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib); extern u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib);
#define rtw_wlan_pkt_size(f) rtw_calculate_wlan_pkt_size_by_attribue(&f->attrib) #define rtw_wlan_pkt_size(f) rtw_calculate_wlan_pkt_size_by_attribue(&f->attrib)
extern s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxmitframe); extern s32 rtw_xmitframe_coalesce(_adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe);
s32 _rtw_init_hw_txqueue(struct hw_txqueue* phw_txqueue, u8 ac_tag); s32 _rtw_init_hw_txqueue(struct hw_txqueue* phw_txqueue, u8 ac_tag);
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv); void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv);
@ -407,7 +401,7 @@ void rtw_alloc_hwxmits(_adapter *padapter);
void rtw_free_hwxmits(_adapter *padapter); void rtw_free_hwxmits(_adapter *padapter);
s32 rtw_xmit(_adapter *padapter, _pkt **pkt); s32 rtw_xmit(_adapter *padapter, struct sk_buff **pkt);
#if defined(CONFIG_AP_MODE) #if defined(CONFIG_AP_MODE)
sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe); sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe);

View file

@ -24,7 +24,7 @@
#include <drv_types.h> #include <drv_types.h>
struct pkt_file { struct pkt_file {
_pkt *pkt; struct sk_buff *pkt;
size_t pkt_len; //the remainder length of the open_file size_t pkt_len; //the remainder length of the open_file
_buffer *cur_buffer; _buffer *cur_buffer;
u8 *buf_start; u8 *buf_start;
@ -46,21 +46,21 @@ struct sta_xmit_priv;
struct xmit_frame; struct xmit_frame;
struct xmit_buf; struct xmit_buf;
extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); extern int rtw_xmit_entry(struct sk_buff *pkt, _nic_hdl pnetdev);
void rtw_os_xmit_schedule(_adapter *padapter); void rtw_os_xmit_schedule(_adapter *padapter);
int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz); int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz);
void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 free_sz); void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 free_sz);
extern void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib); extern void rtw_set_tx_chksum_offload(struct sk_buff *pkt, struct pkt_attrib *pattrib);
extern uint rtw_remainder_len(struct pkt_file *pfile); extern uint rtw_remainder_len(struct pkt_file *pfile);
extern void _rtw_open_pktfile(_pkt *pkt, struct pkt_file *pfile); extern void _rtw_open_pktfile(struct sk_buff *pkt, struct pkt_file *pfile);
extern uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen); extern uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen);
extern sint rtw_endofpktfile (struct pkt_file *pfile); extern sint rtw_endofpktfile (struct pkt_file *pfile);
extern void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt); extern void rtw_os_pkt_complete(_adapter *padapter, struct sk_buff *pkt);
extern void rtw_os_xmit_complete(_adapter *padapter, struct xmit_frame *pxframe); extern void rtw_os_xmit_complete(_adapter *padapter, struct xmit_frame *pxframe);
#endif //__XMIT_OSDEP_H_ #endif //__XMIT_OSDEP_H_

View file

@ -146,7 +146,7 @@ int rtw_recv_indicatepkt(_adapter *padapter, union recv_frame *precv_frame)
{ {
struct recv_priv *precvpriv; struct recv_priv *precvpriv;
_queue *pfree_recv_queue; _queue *pfree_recv_queue;
_pkt *skb; struct sk_buff *skb;
struct mlme_priv*pmlmepriv = &padapter->mlmepriv; struct mlme_priv*pmlmepriv = &padapter->mlmepriv;
void *br_port = NULL; void *br_port = NULL;
@ -176,7 +176,7 @@ _func_enter_;
skb->head, skb->data, skb_tail_pointer(skb), skb_end_pointer(skb), skb->len)); skb->head, skb->data, skb_tail_pointer(skb), skb_end_pointer(skb), skb->len));
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
_pkt *pskb2=NULL; struct sk_buff *pskb2=NULL;
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib; struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;

View file

@ -36,7 +36,7 @@ uint rtw_remainder_len(struct pkt_file *pfile)
return (pfile->buf_len - ((size_t)(pfile->cur_addr) - (size_t)(pfile->buf_start))); return (pfile->buf_len - ((size_t)(pfile->cur_addr) - (size_t)(pfile->buf_start)));
} }
void _rtw_open_pktfile (_pkt *pktptr, struct pkt_file *pfile) void _rtw_open_pktfile (struct sk_buff *pktptr, struct pkt_file *pfile)
{ {
_func_enter_; _func_enter_;
@ -83,7 +83,7 @@ _func_exit_;
return false; return false;
} }
void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib) void rtw_set_tx_chksum_offload(struct sk_buff *pkt, struct pkt_attrib *pattrib)
{ {
} }
@ -134,7 +134,7 @@ void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf,u32
#define WMM_XMIT_THRESHOLD (NR_XMITFRAME*2/5) #define WMM_XMIT_THRESHOLD (NR_XMITFRAME*2/5)
void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt) void rtw_os_pkt_complete(_adapter *padapter, struct sk_buff *pkt)
{ {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
u16 queue; u16 queue;
@ -193,7 +193,7 @@ void rtw_os_xmit_schedule(_adapter *padapter)
_exit_critical_bh(&pxmitpriv->lock, &irqL); _exit_critical_bh(&pxmitpriv->lock, &irqL);
} }
static void rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt) static void rtw_check_xmit_resource(_adapter *padapter, struct sk_buff *pkt)
{ {
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35)) #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35))
@ -273,7 +273,7 @@ static int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
} }
int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev) int rtw_xmit_entry(struct sk_buff *pkt, _nic_hdl pnetdev)
{ {
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev); _adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;