wireless/bcm43xxx: merge frame send to once to improve the performance

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2022-06-19 18:41:47 +08:00 committed by Xiang Xiao
parent fa6ea23101
commit 47ebec34e3

View File

@ -391,25 +391,11 @@ int bcmf_sdpcm_sendframe(FAR struct bcmf_dev_s *priv)
(unsigned long)sframe->header.base);
#endif
/* Write the first 4 bytes of sdpcm header */
/* Write the frame data (the buffer is DMA aligned here) */
ret = bcmf_transfer_bytes(sbus, true, 2, 0,
sframe->header.base,
FIRST_WORD_SIZE);
if (ret != OK)
{
/* TODO handle retry count and remove frame from queue + abort TX */
wlinfo("fail send frame %d\n", ret);
ret = -EIO;
goto exit_abort;
}
/* Write the remaining frame data (the buffer is DMA aligned here) */
ret = bcmf_transfer_bytes(sbus, true, 2, 0,
sframe->header.base + FIRST_WORD_SIZE,
sframe->header.len - FIRST_WORD_SIZE);
sframe->header.len);
if (ret != OK)
{
/* TODO handle retry count and remove frame from queue + abort TX */