mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-28 23:23:40 +00:00
rtl8188eu: Remove CONFIG_USE_USB_BUFFER_ALLOC_TX
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
7df5fff724
commit
09bf126f02
3 changed files with 11 additions and 45 deletions
|
@ -214,16 +214,12 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
|
|||
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
if (padapter->registrypriv.mp_mode == 0)
|
||||
{
|
||||
if ((!bagg_pkt) &&(urb_zero_packet_chk(padapter, sz)==0))/* sz %512) != 0 */
|
||||
{
|
||||
ptxdesc = (struct tx_desc *)(pmem+PACKET_OFFSET_SZ);
|
||||
pull = 1;
|
||||
if (padapter->registrypriv.mp_mode == 0) {
|
||||
if ((!bagg_pkt) &&(urb_zero_packet_chk(padapter, sz)==0))/* sz %512) != 0 */ {
|
||||
ptxdesc = (struct tx_desc *)(pmem+PACKET_OFFSET_SZ);
|
||||
pull = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_USE_USB_BUFFER_ALLOC_TX */
|
||||
|
||||
_rtw_memset(ptxdesc, 0, sizeof(struct tx_desc));
|
||||
|
||||
|
@ -242,16 +238,12 @@ if (padapter->registrypriv.mp_mode == 0)
|
|||
|
||||
if (bmcst) ptxdesc->txdw0 |= cpu_to_le32(BMC);
|
||||
|
||||
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
if (padapter->registrypriv.mp_mode == 0)
|
||||
{
|
||||
if (!bagg_pkt){
|
||||
if ((pull) && (pxmitframe->pkt_offset>0)) {
|
||||
pxmitframe->pkt_offset = pxmitframe->pkt_offset -1;
|
||||
if (padapter->registrypriv.mp_mode == 0) {
|
||||
if (!bagg_pkt){
|
||||
if ((pull) && (pxmitframe->pkt_offset>0))
|
||||
pxmitframe->pkt_offset = pxmitframe->pkt_offset -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* pkt_offset, unit:8 bytes padding */
|
||||
if (pxmitframe->pkt_offset > 0)
|
||||
|
@ -873,7 +865,6 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
rtw_issue_addbareq_cmd(padapter, pfirstframe);
|
||||
}
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
/* 3 3. update first frame txdesc */
|
||||
if ((pbuf_tail % bulkSize) == 0) {
|
||||
/* remove pkt_offset */
|
||||
|
@ -881,7 +872,6 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
pfirstframe->buf_addr += PACKET_OFFSET_SZ;
|
||||
pfirstframe->pkt_offset--;
|
||||
}
|
||||
#endif /* CONFIG_USE_USB_BUFFER_ALLOC_TX */
|
||||
|
||||
update_txdesc(pfirstframe, pfirstframe->buf_addr, pfirstframe->attrib.last_txcmdsz,true);
|
||||
|
||||
|
|
|
@ -525,12 +525,6 @@ _func_enter_;
|
|||
usb_write_port_complete,
|
||||
pxmitbuf);//context is pxmitbuf
|
||||
|
||||
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
purb->transfer_dma = pxmitbuf->dma_transfer_addr;
|
||||
purb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
|
||||
purb->transfer_flags |= URB_ZERO_PACKET;
|
||||
#endif // CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
|
||||
status = usb_submit_urb(purb, GFP_ATOMIC);
|
||||
if (!status) {
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT
|
||||
|
|
|
@ -129,13 +129,6 @@ int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf,u32
|
|||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
struct usb_device *pusbd = pdvobjpriv->pusbdev;
|
||||
|
||||
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
pxmitbuf->pallocated_buf = rtw_usb_buffer_alloc(pusbd, (size_t)alloc_sz, &pxmitbuf->dma_transfer_addr);
|
||||
pxmitbuf->pbuf = pxmitbuf->pallocated_buf;
|
||||
if (pxmitbuf->pallocated_buf == NULL)
|
||||
return _FAIL;
|
||||
#else // CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
|
||||
pxmitbuf->pallocated_buf = rtw_zmalloc(alloc_sz);
|
||||
if (pxmitbuf->pallocated_buf == NULL)
|
||||
{
|
||||
|
@ -145,17 +138,12 @@ int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf,u32
|
|||
pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), XMITBUF_ALIGN_SZ);
|
||||
pxmitbuf->dma_transfer_addr = 0;
|
||||
|
||||
#endif // CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
{
|
||||
for (i=0; i<8; i++) {
|
||||
pxmitbuf->pxmit_urb[i] = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if (pxmitbuf->pxmit_urb[i] == NULL)
|
||||
{
|
||||
if (pxmitbuf->pxmit_urb[i] == NULL) {
|
||||
DBG_88E("pxmitbuf->pxmit_urb[i]==NULL");
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -176,14 +164,8 @@ void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf,u32
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
rtw_usb_buffer_free(pusbd, (size_t)free_sz, pxmitbuf->pallocated_buf, pxmitbuf->dma_transfer_addr);
|
||||
pxmitbuf->pallocated_buf = NULL;
|
||||
pxmitbuf->dma_transfer_addr = 0;
|
||||
#else // CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
if (pxmitbuf->pallocated_buf)
|
||||
rtw_mfree(pxmitbuf->pallocated_buf, free_sz);
|
||||
#endif // CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
}
|
||||
|
||||
#define WMM_XMIT_THRESHOLD (NR_XMITFRAME*2/5)
|
||||
|
|
Loading…
Reference in a new issue