mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-22 13:24:36 +00:00
Add xmit alloc retry
This commit is contained in:
parent
4a6960b2ad
commit
2d29bdded9
@ -4415,6 +4415,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
|
||||
u8 dummybuf[32];
|
||||
int len = skb->len, rtap_len, consume;
|
||||
|
||||
int alloc_tries, alloc_delay;
|
||||
|
||||
rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, skb->truesize);
|
||||
|
||||
@ -4442,11 +4443,16 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
|
||||
}
|
||||
#endif
|
||||
|
||||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||
if (pmgntframe == NULL) {
|
||||
rtw_udelay_os(500);
|
||||
goto fail;
|
||||
alloc_delay = 100;
|
||||
for (alloc_tries=3; alloc_tries > 0; alloc_tries--) {
|
||||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||
if (pmgntframe != NULL)
|
||||
break;
|
||||
rtw_udelay_os(alloc_delay);
|
||||
alloc_delay += alloc_delay/2;
|
||||
}
|
||||
if (pmgntframe == NULL)
|
||||
goto fail;
|
||||
|
||||
_rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||
|
Loading…
Reference in New Issue
Block a user