summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/pcie/trans.c
diff options
context:
space:
mode:
authorLiad Kaufman <liad.kaufman@intel.com>2014-12-02 14:28:45 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-12-14 10:20:30 +0200
commitbaa21e834941ee5fbe4bd421c871f7c0c5f9a086 (patch)
treea9f71094dd0063b73a946aabe2b081492692d75e /drivers/net/wireless/iwlwifi/pcie/trans.c
parent55fd1ce820f461b77919a1997ba8285652219024 (diff)
downloadop-kernel-dev-baa21e834941ee5fbe4bd421c871f7c0c5f9a086.zip
op-kernel-dev-baa21e834941ee5fbe4bd421c871f7c0c5f9a086.tar.gz
iwlwifi: pcie: limit fw chunk sizes given to fh
New FW has chunks that are larger than the size limit of the FH's DMA. To make sure we don't crash it - actively limit the max size of each chunk. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie/trans.c')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/trans.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index d151af3..523fe0c 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -614,7 +614,7 @@ static int iwl_pcie_load_section(struct iwl_trans *trans, u8 section_num,
{
u8 *v_addr;
dma_addr_t p_addr;
- u32 offset, chunk_sz = section->len;
+ u32 offset, chunk_sz = min_t(u32, FH_MEM_TB_MAX_LENGTH, section->len);
int ret = 0;
IWL_DEBUG_FW(trans, "[%d] uCode section being loaded...\n",
OpenPOWER on IntegriCloud