diff options
author | Mordechay Goodstein <mordechay.goodstein@intel.com> | 2020-04-24 18:48:08 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2020-05-08 09:50:34 +0300 |
commit | ebfa7f8ae155c9a0bb2e4038d6b5d8b14881c424 (patch) | |
tree | bcab8505adbeb3583b2c132a050647513f832eb7 /drivers/net/wireless/intel/iwlwifi/fw/dbg.c | |
parent | 382d8296c5b5664a4f16653f71d3fbf64263afb3 (diff) | |
download | linux-ebfa7f8ae155c9a0bb2e4038d6b5d8b14881c424.tar.gz linux-ebfa7f8ae155c9a0bb2e4038d6b5d8b14881c424.tar.bz2 linux-ebfa7f8ae155c9a0bb2e4038d6b5d8b14881c424.zip |
iwlwifi: yoyo: add support for parsing SHARED_MEM_ALLOC version 4
The new version adds the information for RX2C FIFO addresses.
Use the new addresses to parse the FIFO info when dumping.
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200424182643.97cc25d96b53.I65fd0400d80f505bd6d7eed442f12db24b25bbe3@changeid
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/dbg.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c index 39c8332be3ac..914f0eb07d52 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c @@ -1386,13 +1386,36 @@ static void iwl_ini_get_rxf_data(struct iwl_fw_runtime *fwrt, } fifo_idx = ffs(fid2) - 1; - if (fid2 && !WARN_ON_ONCE(fifo_idx != 0)) { - data->size = fwrt->smem_cfg.rxfifo2_size; - data->offset = RXF_DIFF_FROM_PREV; + if (fid2 && !WARN_ON_ONCE(~BIT(fifo_idx) & fid2)) { + u8 max_idx; + + if (iwl_fw_lookup_notif_ver(fwrt->fw, SYSTEM_GROUP, + SHARED_MEM_CFG_CMD, 0) <= 3) + max_idx = 0; + else + max_idx = 1; + + if (WARN_ONCE(fifo_idx > max_idx, + "invalid umac fifo idx %d", fifo_idx)) + return; + /* use bit 31 to distinguish between umac and lmac rxf while * parsing the dump */ data->fifo_num = fifo_idx | IWL_RXF_UMAC_BIT; + + switch (fifo_idx) { + case 0: + data->size = fwrt->smem_cfg.rxfifo2_size; + data->offset = iwl_umac_prph(fwrt->trans, + RXF_DIFF_FROM_PREV); + break; + case 1: + data->size = fwrt->smem_cfg.rxfifo2_control_size; + data->offset = iwl_umac_prph(fwrt->trans, + RXF2C_DIFF_FROM_PREV); + break; + } return; } } |