From 28b46bd381b38fc76a683e0d2edbc60479c75988 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Tue, 14 Jun 2022 18:40:53 +0800 Subject: [PATCH] wirless/sdio: frame length should with guard bound some SDIO device will return the larger frames out of bound error log: bcmf_sdpcm_readframe: Frame is too large, cancel 1544 1536 bcmf_sdpcm_readframe: Frame is too large, cancel 1544 1536 bcmf_sdpcm_readframe: Frame is too large, cancel 1544 1536 Signed-off-by: chao.an --- drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c index e4a6023387..ec11996c44 100644 --- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c +++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c @@ -1016,7 +1016,8 @@ struct bcmf_sdio_frame *bcmf_sdio_allocate_frame(FAR struct bcmf_dev_s *priv, sframe = container_of(entry, struct bcmf_sdio_frame, list_entry); - sframe->header.len = HEADER_SIZE + MAX_NETDEV_PKTSIZE; + sframe->header.len = HEADER_SIZE + MAX_NETDEV_PKTSIZE + + CONFIG_NET_GUARDSIZE; sframe->header.base = sframe->data; sframe->header.data = sframe->data; sframe->tx = tx;