wifi: iwlwifi: increase number of RX buffers for EHT devices
authorJohannes Berg <johannes.berg@intel.com>
Wed, 30 Aug 2023 08:31:04 +0000 (11:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:59:02 +0000 (11:59 +0100)
[ Upstream commit 2cf254c1e24fa8f01f42f5a8c77617e56bf50b86 ]

EHT devices can support 512 MPDUs in an A-MPDU, each of
which might be an A-MSDU and thus further contain multiple
MSDUs, which need their own buffer each. Increase the number
of buffers to avoid running out in high-throughput scenarios.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230830112059.824e522927f1.Ie5b4a2d3953072b9d76054ae67e2e45900d6bba4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Stable-dep-of: 08365d3b9140 ("wifi: iwlwifi: mvm: fix netif csum flags")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/cfg/bz.c
drivers/net/wireless/intel/iwlwifi/cfg/sc.c

index b9893b2..3d22301 100644 (file)
@@ -134,12 +134,10 @@ static const struct iwl_base_params iwl_bz_base_params = {
        .ht_params = &iwl_gl_a_ht_params
 
 /*
- * If the device doesn't support HE, no need to have that many buffers.
- * These sizes were picked according to 8 MSDUs inside 256 A-MSDUs in an
+ * This size was picked according to 8 MSDUs inside 512 A-MSDUs in an
  * A-MPDU, with additional overhead to account for processing time.
  */
-#define IWL_NUM_RBDS_NON_HE            512
-#define IWL_NUM_RBDS_BZ_HE             4096
+#define IWL_NUM_RBDS_BZ_EHT            (512 * 16)
 
 const struct iwl_cfg_trans_params iwl_bz_trans_cfg = {
        .device_family = IWL_DEVICE_FAMILY_BZ,
@@ -161,7 +159,7 @@ const struct iwl_cfg iwl_cfg_bz = {
        .uhb_supported = true,
        IWL_DEVICE_BZ,
        .features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
-       .num_rbds = IWL_NUM_RBDS_BZ_HE,
+       .num_rbds = IWL_NUM_RBDS_BZ_EHT,
 };
 
 const struct iwl_cfg iwl_cfg_gl = {
@@ -169,7 +167,7 @@ const struct iwl_cfg iwl_cfg_gl = {
        .uhb_supported = true,
        IWL_DEVICE_BZ,
        .features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
-       .num_rbds = IWL_NUM_RBDS_BZ_HE,
+       .num_rbds = IWL_NUM_RBDS_BZ_EHT,
 };
 
 
index ad283fd..d624302 100644 (file)
@@ -127,12 +127,10 @@ static const struct iwl_base_params iwl_sc_base_params = {
        .ht_params = &iwl_22000_ht_params
 
 /*
- * If the device doesn't support HE, no need to have that many buffers.
- * These sizes were picked according to 8 MSDUs inside 256 A-MSDUs in an
+ * This size was picked according to 8 MSDUs inside 512 A-MSDUs in an
  * A-MPDU, with additional overhead to account for processing time.
  */
-#define IWL_NUM_RBDS_NON_HE            512
-#define IWL_NUM_RBDS_SC_HE             4096
+#define IWL_NUM_RBDS_SC_EHT            (512 * 16)
 
 const struct iwl_cfg_trans_params iwl_sc_trans_cfg = {
        .device_family = IWL_DEVICE_FAMILY_SC,
@@ -154,7 +152,7 @@ const struct iwl_cfg iwl_cfg_sc = {
        .uhb_supported = true,
        IWL_DEVICE_SC,
        .features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
-       .num_rbds = IWL_NUM_RBDS_SC_HE,
+       .num_rbds = IWL_NUM_RBDS_SC_EHT,
 };
 
 MODULE_FIRMWARE(IWL_SC_A_FM_B_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));