summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorShahar S Matityahu <shahar.s.matityahu@intel.com>2018-11-26 11:19:00 +0200
committerLuca Coelho <luciano.coelho@intel.com>2019-01-29 16:10:33 +0200
commit07a44b322397b1a5e8c96ceef8ce352fe79ac7ee (patch)
tree501b6c2046c0c5af2246a8a38b8a0ca493f472c9 /drivers/net
parent40ecdd01d46e67fddff4407f7c37554d9640d1ea (diff)
downloadlinux-07a44b322397b1a5e8c96ceef8ce352fe79ac7ee.tar.bz2
iwlwifi: dbg_ini: allocate dram buffer with proper flags
Use the same flags we use in the legacy buffer allocation. Missing __GFP_NOWARN will cause an unwanted warning incase we fail to allocate. Missing __GFP_ZERO will give a buffer initially filled with garbage which can make debug difficult in case our wrap count is zero. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Fixes: d47902f9f71d ("iwlwifi: dbg: add apply point logic") Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/dbg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index 917aafe1a9db..947f282c05a9 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -1697,8 +1697,10 @@ iwl_fw_dbg_buffer_allocation(struct iwl_fw_runtime *fwrt,
IWL_FW_INI_LOCATION_DRAM_PATH)
return;
- virtual_addr = dma_alloc_coherent(fwrt->trans->dev, size,
- &phys_addr, GFP_KERNEL);
+ virtual_addr =
+ dma_alloc_coherent(fwrt->trans->dev, size, &phys_addr,
+ GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO |
+ __GFP_COMP);
/* TODO: alloc fragments if needed */
if (!virtual_addr)