iwlwifi: pcie: change 12k A-MSDU config to use 16k buffers
If 12k A-MSDU size is requested, we will actually allocate 16k due to page allocation. Thus, change it to actually mean 16k, which is useful for certain sniffer use cases. 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.20201209231352.84ae405829d4.I31184f4be31f7c3feb9a29aef3a111e70d15c64a@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
cf5b462768
commit
3fa965c2dd
|
@ -98,6 +98,7 @@ enum iwl_prph_scratch_mtr_format {
|
||||||
* appropriately; use the below values for this.
|
* appropriately; use the below values for this.
|
||||||
* @IWL_PRPH_SCRATCH_RB_SIZE_EXT_8K: 8kB RB size
|
* @IWL_PRPH_SCRATCH_RB_SIZE_EXT_8K: 8kB RB size
|
||||||
* @IWL_PRPH_SCRATCH_RB_SIZE_EXT_12K: 12kB RB size
|
* @IWL_PRPH_SCRATCH_RB_SIZE_EXT_12K: 12kB RB size
|
||||||
|
* @IWL_PRPH_SCRATCH_RB_SIZE_EXT_16K: 16kB RB size
|
||||||
*/
|
*/
|
||||||
enum iwl_prph_scratch_flags {
|
enum iwl_prph_scratch_flags {
|
||||||
IWL_PRPH_SCRATCH_EARLY_DEBUG_EN = BIT(4),
|
IWL_PRPH_SCRATCH_EARLY_DEBUG_EN = BIT(4),
|
||||||
|
@ -111,6 +112,7 @@ enum iwl_prph_scratch_flags {
|
||||||
IWL_PRPH_SCRATCH_RB_SIZE_EXT_MASK = 0xf << 20,
|
IWL_PRPH_SCRATCH_RB_SIZE_EXT_MASK = 0xf << 20,
|
||||||
IWL_PRPH_SCRATCH_RB_SIZE_EXT_8K = 8 << 20,
|
IWL_PRPH_SCRATCH_RB_SIZE_EXT_8K = 8 << 20,
|
||||||
IWL_PRPH_SCRATCH_RB_SIZE_EXT_12K = 9 << 20,
|
IWL_PRPH_SCRATCH_RB_SIZE_EXT_12K = 9 << 20,
|
||||||
|
IWL_PRPH_SCRATCH_RB_SIZE_EXT_16K = 10 << 20,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1835,7 +1835,7 @@ MODULE_PARM_DESC(11n_disable,
|
||||||
module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size, int, 0444);
|
module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size, int, 0444);
|
||||||
MODULE_PARM_DESC(amsdu_size,
|
MODULE_PARM_DESC(amsdu_size,
|
||||||
"amsdu size 0: 12K for multi Rx queue devices, 2K for AX210 devices, "
|
"amsdu size 0: 12K for multi Rx queue devices, 2K for AX210 devices, "
|
||||||
"4K for other devices 1:4K 2:8K 3:12K 4: 2K (default 0)");
|
"4K for other devices 1:4K 2:8K 3:12K (16K buffers) 4: 2K (default 0)");
|
||||||
module_param_named(fw_restart, iwlwifi_mod_params.fw_restart, bool, 0444);
|
module_param_named(fw_restart, iwlwifi_mod_params.fw_restart, bool, 0444);
|
||||||
MODULE_PARM_DESC(fw_restart, "restart firmware in case of error (default true)");
|
MODULE_PARM_DESC(fw_restart, "restart firmware in case of error (default true)");
|
||||||
|
|
||||||
|
|
|
@ -373,7 +373,7 @@ iwl_trans_get_rb_size_order(enum iwl_amsdu_size rb_size)
|
||||||
case IWL_AMSDU_8K:
|
case IWL_AMSDU_8K:
|
||||||
return get_order(8 * 1024);
|
return get_order(8 * 1024);
|
||||||
case IWL_AMSDU_12K:
|
case IWL_AMSDU_12K:
|
||||||
return get_order(12 * 1024);
|
return get_order(16 * 1024);
|
||||||
default:
|
default:
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -391,7 +391,7 @@ iwl_trans_get_rb_size(enum iwl_amsdu_size rb_size)
|
||||||
case IWL_AMSDU_8K:
|
case IWL_AMSDU_8K:
|
||||||
return 8 * 1024;
|
return 8 * 1024;
|
||||||
case IWL_AMSDU_12K:
|
case IWL_AMSDU_12K:
|
||||||
return 12 * 1024;
|
return 16 * 1024;
|
||||||
default:
|
default:
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -148,7 +148,7 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,
|
||||||
case IWL_AMSDU_12K:
|
case IWL_AMSDU_12K:
|
||||||
control_flags |= IWL_PRPH_SCRATCH_RB_SIZE_4K;
|
control_flags |= IWL_PRPH_SCRATCH_RB_SIZE_4K;
|
||||||
/* if firmware supports the ext size, tell it */
|
/* if firmware supports the ext size, tell it */
|
||||||
control_flags |= IWL_PRPH_SCRATCH_RB_SIZE_EXT_12K;
|
control_flags |= IWL_PRPH_SCRATCH_RB_SIZE_EXT_16K;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -243,7 +243,7 @@ int iwl_pcie_ctxt_info_init(struct iwl_trans *trans,
|
||||||
rb_size = IWL_CTXT_INFO_RB_SIZE_8K;
|
rb_size = IWL_CTXT_INFO_RB_SIZE_8K;
|
||||||
break;
|
break;
|
||||||
case IWL_AMSDU_12K:
|
case IWL_AMSDU_12K:
|
||||||
rb_size = IWL_CTXT_INFO_RB_SIZE_12K;
|
rb_size = IWL_CTXT_INFO_RB_SIZE_16K;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
|
|
Loading…
Reference in New Issue