You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/06/28 09:47:32 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6533: wireless/bcm43xxx: enable tx flow control to improve performance

pkarashchenko commented on code in PR #6533:
URL: https://github.com/apache/incubator-nuttx/pull/6533#discussion_r908270303


##########
drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c:
##########
@@ -1108,5 +1118,10 @@ void bcmf_sdio_free_frame(FAR struct bcmf_dev_s *priv,
 
   bcmf_dqueue_push(&sbus->free_queue, &sframe->list_entry);
 
+  if (sframe->tx)
+    {
+      sbus->tx_queue_count -= 1;

Review Comment:
   ```suggestion
         sbus->tx_queue_count--;
   ```



##########
drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c:
##########
@@ -1065,10 +1065,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)
+      if (!tx ||
+          sbus->tx_queue_count <
+            CONFIG_IEEE80211_BROADCOM_FRAME_POOL_SIZE / 2)
         {
-          nxsem_post(&sbus->queue_mutex);
-          break;
+          if ((entry = bcmf_dqueue_pop_tail(&sbus->free_queue)) != NULL)
+            {
+              if (tx)
+                {
+                  sbus->tx_queue_count += 1;

Review Comment:
   ```suggestion
                     sbus->tx_queue_count++;
   ```



##########
drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c:
##########
@@ -1065,10 +1065,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)
+      if (!tx ||
+          sbus->tx_queue_count <

Review Comment:
   do we need set to zero `tx_queue_count` during init, or `struct bcmf_sdio_dev_s` use `zalloc` / static allocation?



-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org