You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/06/29 06:07:02 UTC

[incubator-nuttx] branch master updated (903a186304 -> bc6b3f34c8)

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


    from 903a186304 Use builtins for byteswapping
     new b5e9409880 Revert "wireless/bcm43xxx: remove unused tx_queue_count"
     new bc6b3f34c8 wireless/bcm43xxx: enable tx flow control to improve performance

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c | 21 ++++++++++++++++++---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.h |  1 +
 2 files changed, 19 insertions(+), 3 deletions(-)


[incubator-nuttx] 01/02: Revert "wireless/bcm43xxx: remove unused tx_queue_count"

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b5e9409880c662ac5ccd4a99d3960aa37f60c999
Author: chao.an <an...@xiaomi.com>
AuthorDate: Tue Jun 28 13:15:19 2022 +0800

    Revert "wireless/bcm43xxx: remove unused tx_queue_count"
    
    This reverts commit c3b84b9b3bbd38076a564264a2d73992c5379b1a.
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c | 23 ++++++++++++++++++++---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.h |  1 +
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c
index 903bb9400b..c8f6abbe1e 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c
@@ -1065,10 +1065,22 @@ 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 0
+      if (!tx ||
+          sbus->tx_queue_count <
+            CONFIG_IEEE80211_BROADCOM_FRAME_POOL_SIZE - 1)
+#endif
         {
-          nxsem_post(&sbus->queue_mutex);
-          break;
+          if ((entry = bcmf_dqueue_pop_tail(&sbus->free_queue)) != NULL)
+            {
+              if (tx)
+                {
+                  sbus->tx_queue_count++;
+                }
+
+              nxsem_post(&sbus->queue_mutex);
+              break;
+            }
         }
 
       nxsem_post(&sbus->queue_mutex);
@@ -1108,5 +1120,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--;
+    }
+
   nxsem_post(&sbus->queue_mutex);
 }
diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.h b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.h
index daed5018f2..f5a076caf9 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.h
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.h
@@ -106,6 +106,7 @@ struct bcmf_sdio_dev_s
   dq_queue_t free_queue;           /* Queue of available frames */
   dq_queue_t tx_queue;             /* Queue of frames to transmit */
   dq_queue_t rx_queue;             /* Queue of frames used to receive */
+  volatile int tx_queue_count;     /* Count of items in TX queue */
 };
 
 /* Structure used to manage SDIO frames */


[incubator-nuttx] 02/02: wireless/bcm43xxx: enable tx flow control to improve performance

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit bc6b3f34c888353fe8465bfbf568e513a19e9602
Author: chao.an <an...@xiaomi.com>
AuthorDate: Tue Jun 28 13:16:12 2022 +0800

    wireless/bcm43xxx: enable tx flow control to improve performance
    
    RX/TX shared free queue on bcmf implementation, if TX occupies the
    free queue completely, RX will trigger read abort because it cannot
    alloc buffer successfully from the shared free queue. This commit will
    limit the sending entries of tx and prevent rx triggering abort
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c
index c8f6abbe1e..6520ecf96c 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c
@@ -1065,11 +1065,9 @@ struct bcmf_sdio_frame *bcmf_sdio_allocate_frame(FAR struct bcmf_dev_s *priv,
           DEBUGPANIC();
         }
 
-#if 0
       if (!tx ||
           sbus->tx_queue_count <
-            CONFIG_IEEE80211_BROADCOM_FRAME_POOL_SIZE - 1)
-#endif
+            CONFIG_IEEE80211_BROADCOM_FRAME_POOL_SIZE / 2)
         {
           if ((entry = bcmf_dqueue_pop_tail(&sbus->free_queue)) != NULL)
             {