xiaoxiang781216 commented on code in PR #6524: URL: https://github.com/apache/incubator-nuttx/pull/6524#discussion_r906802762
########## drivers/wireless/ieee80211/bcm43xxx/bcmf_sdpcm.c: ########## @@ -317,7 +316,7 @@ int bcmf_sdpcm_readframe(FAR struct bcmf_dev_s *priv) DEBUGPANIC(); } - bcmf_dqueue_push(&sbus->rx_queue, &sframe->list_entry); + list_add_head(&sbus->rx_queue, &sframe->list_entry); Review Comment: It's more natural to append the new frame at the end of list and process the frame from head. ########## drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c: ########## @@ -1077,17 +1078,12 @@ struct bcmf_sdio_frame *bcmf_sdio_allocate_frame(FAR struct bcmf_dev_s *priv, break; } - if (block) - { - /* TODO use signaling semaphore */ + nxsig_usleep(10 * 1000); - wlinfo("alloc failed %d\n", tx); - nxsig_usleep(100 * 1000); - continue; + if (!block) Review Comment: if so, why not keep the frame allocation at line 1028 in the block mode? ########## drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c: ########## @@ -1065,14 +1063,20 @@ struct bcmf_sdio_frame *bcmf_sdio_allocate_frame(FAR struct bcmf_dev_s *priv, DEBUGPANIC(); } - if ((entry = bcmf_dqueue_pop_tail(&sbus->free_queue)) != NULL) + list_for_every_entry(&sbus->free_queue, sframe, Review Comment: but the loop still exist, let remove the loop directly -- 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