You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/09/17 02:59:18 UTC
[incubator-nuttx] branch master updated: bcm43xxx/Kconfig: added
SDPCM frame pool size parameter. Also I have set the parameter to 8 instead
of 4 by default because there were many "alloc failed" messages in debug
log even during initialization / automatic IP address assignment via DHCP
negotiation.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 51c185b bcm43xxx/Kconfig: added SDPCM frame pool size parameter. Also I have set the parameter to 8 instead of 4 by default because there were many "alloc failed" messages in debug log even during initialization / automatic IP address assignment via DHCP negotiation.
51c185b is described below
commit 51c185b3b588463a3383c5df2630bb779165b112
Author: Alexander Lunev <al...@mail.ru>
AuthorDate: Thu Sep 16 22:57:11 2021 +0300
bcm43xxx/Kconfig: added SDPCM frame pool size parameter.
Also I have set the parameter to 8 instead of 4 by default
because there were many "alloc failed" messages in debug log
even during initialization / automatic IP address assignment
via DHCP negotiation.
---
drivers/wireless/ieee80211/bcm43xxx/Kconfig | 7 +++++++
drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c | 9 ++++++---
drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.h | 4 ----
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/wireless/ieee80211/bcm43xxx/Kconfig b/drivers/wireless/ieee80211/bcm43xxx/Kconfig
index 5361e17..6e5dcbf 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/Kconfig
+++ b/drivers/wireless/ieee80211/bcm43xxx/Kconfig
@@ -109,4 +109,11 @@ config IEEE80211_BROADCOM_DMABUF_ALIGNMENT
This parameter should be set depending on
the used SOC DMA configuration.
+config IEEE80211_BROADCOM_FRAME_POOL_SIZE
+ int "SDPCM frame pool size"
+ default 8
+ ---help---
+ This parameter sets the size of the shared SDPCM frame pool
+ used for both RX and TX transfers.
+
endif # IEEE80211_BROADCOM_FULLMAC
diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c
index 910e33e..d46d7c1 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.c
@@ -116,7 +116,8 @@ FAR struct bcmf_dev_s *g_sdio_priv;
* This pool is shared between all driver devices
*/
-static struct bcmf_sdio_frame g_pktframes[BCMF_PKT_POOL_SIZE];
+static struct bcmf_sdio_frame
+ g_pktframes[CONFIG_IEEE80211_BROADCOM_FRAME_POOL_SIZE];
/* TODO free_queue should be static */
@@ -664,7 +665,7 @@ int bcmf_bus_sdio_initialize(FAR struct bcmf_dev_s *priv,
/* FIXME this should be static to driver */
- for (ret = 0; ret < BCMF_PKT_POOL_SIZE; ret++)
+ for (ret = 0; ret < CONFIG_IEEE80211_BROADCOM_FRAME_POOL_SIZE; ret++)
{
bcmf_dqueue_push(&sbus->free_queue, &g_pktframes[ret].list_entry);
}
@@ -931,7 +932,9 @@ struct bcmf_sdio_frame *bcmf_sdio_allocate_frame(FAR struct bcmf_dev_s *priv,
}
#if 0
- if (!tx || sbus->tx_queue_count < BCMF_PKT_POOL_SIZE - 1)
+ if (!tx ||
+ sbus->tx_queue_count <
+ CONFIG_IEEE80211_BROADCOM_FRAME_POOL_SIZE - 1)
#endif
{
if ((entry = bcmf_dqueue_pop_tail(&sbus->free_queue)) != NULL)
diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.h b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.h
index 7852e5c..33b0c74 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.h
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_sdio.h
@@ -44,10 +44,6 @@
#define HEADER_SIZE 0x12 /* Default sdpcm + bdc header size */
#define FIRST_WORD_SIZE 4
-/* TODO move to Kconfig */
-
-#define BCMF_PKT_POOL_SIZE 4 /* Frame pool size */
-
/****************************************************************************
* Public Types
****************************************************************************/