iwlwifi: mvm: always use 4K RB size by default
authorJohannes Berg <johannes.berg@intel.com>
Sat, 4 Dec 2021 15:49:35 +0000 (17:49 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 7 Dec 2021 18:06:46 +0000 (20:06 +0200)
When we use 2K RBs, we cannot receive all valid 802.11 frames,
including e.g. long beacons, since up to 2304 bytes are valid
(plus metadata and also encryption overhead etc.). Increase
the RB size to be always 4K to avoid that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211204174545.675781ab0da5.I5c653f4c7dd726f8ad40077e4a109b85e7c0cdb1@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/ops.c

index 8056018..9c0872b 100644 (file)
@@ -1055,7 +1055,6 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
        };
        int scan_size;
        u32 min_backoff;
-       enum iwl_amsdu_size rb_size_default;
        struct iwl_mvm_csme_conn_info *csme_conn_info __maybe_unused;
 
        /*
@@ -1198,14 +1197,9 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
        trans_cfg.no_reclaim_cmds = no_reclaim_cmds;
        trans_cfg.n_no_reclaim_cmds = ARRAY_SIZE(no_reclaim_cmds);
 
-       if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
-               rb_size_default = IWL_AMSDU_2K;
-       else
-               rb_size_default = IWL_AMSDU_4K;
-
        switch (iwlwifi_mod_params.amsdu_size) {
        case IWL_AMSDU_DEF:
-               trans_cfg.rx_buf_size = rb_size_default;
+               trans_cfg.rx_buf_size = IWL_AMSDU_4K;
                break;
        case IWL_AMSDU_4K:
                trans_cfg.rx_buf_size = IWL_AMSDU_4K;
@@ -1219,7 +1213,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
        default:
                pr_err("%s: Unsupported amsdu_size: %d\n", KBUILD_MODNAME,
                       iwlwifi_mod_params.amsdu_size);
-               trans_cfg.rx_buf_size = rb_size_default;
+               trans_cfg.rx_buf_size = IWL_AMSDU_4K;
        }
 
        trans->wide_cmd_header = true;