anchao commented on code in PR #6524: URL: https://github.com/apache/incubator-nuttx/pull/6524#discussion_r906824994
########## drivers/wireless/ieee80211/bcm43xxx/bcmf_sdpcm.c: ########## @@ -141,102 +141,75 @@ int bcmf_sdpcm_readframe(FAR struct bcmf_dev_s *priv) uint16_t len; uint16_t checksum; struct bcmf_sdpcm_header *header; - struct bcmf_sdpcm_header tmp_hdr; struct bcmf_sdio_frame *sframe; FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s *)priv->bus; + /* Request free frame buffer */ + + sframe = bcmf_sdio_allocate_frame(priv, false, false); + if (sframe == NULL) + { + return -ENOMEM; + } + + header = (struct bcmf_sdpcm_header *)sframe->data; + /* Read the first 4 bytes of sdpcm header * to get the length of the following data to be read */ ret = bcmf_transfer_bytes(sbus, false, 2, 0, - (uint8_t *)&tmp_hdr, + (uint8_t *)header, FIRST_WORD_SIZE); if (ret != OK) { wlinfo("Failed to read size\n"); - bcmf_sdpcm_rxfail(sbus, false); - return -EIO; + ret = -EIO; Review Comment: I do not change the error code ########## drivers/wireless/ieee80211/bcm43xxx/bcmf_sdpcm.c: ########## @@ -410,7 +381,6 @@ int bcmf_sdpcm_sendframe(FAR struct bcmf_dev_s *priv) bcmf_netdev_notify_tx(priv); } - Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org