anchao commented on code in PR #6524:
URL: https://github.com/apache/incubator-nuttx/pull/6524#discussion_r906825532


##########
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);

Review Comment:
   nonblocking alloc before read sdpcm is more reasonable, driver should not 
discard the data



-- 
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

Reply via email to