staging: rtl8723au: Remove ugly pktfile interface
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3e689a9ff5
commit
4c9c5700d6
|
@ -18,15 +18,6 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
|
||||
struct pkt_file {
|
||||
struct sk_buff *pkt;
|
||||
__kernel_size_t pkt_len; /* the remainder length of the open_file */
|
||||
unsigned char *cur_buffer;
|
||||
u8 *buf_start;
|
||||
u8 *cur_addr;
|
||||
__kernel_size_t buf_len;
|
||||
};
|
||||
|
||||
|
||||
#define NR_XMITFRAME 256
|
||||
|
||||
|
@ -44,9 +35,6 @@ int rtw_os_xmit_resource_alloc23a(struct rtw_adapter *padapter,
|
|||
struct xmit_buf *pxmitbuf, u32 alloc_sz);
|
||||
void rtw_os_xmit_resource_free23a(struct rtw_adapter *padapter,
|
||||
struct xmit_buf *pxmitbuf);
|
||||
void _rtw_open_pktfile23a(struct sk_buff *pkt, struct pkt_file *pfile);
|
||||
uint _rtw_pktfile_read23a(struct pkt_file *pfile, u8 *rmem, uint rlen);
|
||||
int rtw_endofpktfile23a(struct pkt_file *pfile);
|
||||
|
||||
void rtw_os_pkt_complete23a(struct rtw_adapter *padapter, struct sk_buff *pkt);
|
||||
void rtw_os_xmit_complete23a(struct rtw_adapter *padapter,
|
||||
|
|
|
@ -24,42 +24,6 @@
|
|||
#include <xmit_osdep.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
void _rtw_open_pktfile23a(struct sk_buff *pktptr, struct pkt_file *pfile)
|
||||
{
|
||||
pfile->pkt = pktptr;
|
||||
pfile->buf_start = pktptr->data;
|
||||
pfile->cur_addr = pktptr->data;
|
||||
pfile->buf_len = pktptr->len;
|
||||
pfile->pkt_len = pktptr->len;
|
||||
|
||||
pfile->cur_buffer = pfile->buf_start;
|
||||
}
|
||||
|
||||
uint _rtw_pktfile_read23a(struct pkt_file *pfile, u8 *rmem, uint rlen)
|
||||
{
|
||||
uint len = 0;
|
||||
|
||||
len = pfile->buf_len - ((unsigned long)(pfile->cur_addr) -
|
||||
(unsigned long)(pfile->buf_start));
|
||||
len = (rlen > len) ? len : rlen;
|
||||
|
||||
if (rmem)
|
||||
skb_copy_bits(pfile->pkt, pfile->buf_len-pfile->pkt_len,
|
||||
rmem, len);
|
||||
|
||||
pfile->cur_addr += len;
|
||||
pfile->pkt_len -= len;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
int rtw_endofpktfile23a(struct pkt_file *pfile)
|
||||
{
|
||||
if (pfile->pkt_len == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int rtw_os_xmit_resource_alloc23a(struct rtw_adapter *padapter,
|
||||
struct xmit_buf *pxmitbuf, u32 alloc_sz)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue