]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iwlwifi: dbg: run init_cfg function once per driver load
authorMordechay Goodstein <mordechay.goodstein@intel.com>
Wed, 30 Sep 2020 13:31:21 +0000 (16:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:47 +0000 (10:07 +0100)
[ Upstream commit 42f8a2735cc218b6b372134684d4cd3c1423f123 ]

Every time we call init_cfg driver appends the enabled triggers
to the active triggers while this should be done only once per
driver load.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Fixes: 14124b25780d ("iwlwifi: dbg_ini: implement monitor allocation flow")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200930161256.79bd622e604a.Ie0f79d2ea90ca5cdf363f56194ead81b0a2c6202@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c

index 641da49b1b86ef711a9df5947f5f94e14264a4bb..48269a4cf8964160808a889bc1698bc0e6b5de4d 100644 (file)
@@ -1011,6 +1011,9 @@ static void iwl_dbg_tlv_init_cfg(struct iwl_fw_runtime *fwrt)
        enum iwl_fw_ini_buffer_location *ini_dest = &fwrt->trans->dbg.ini_dest;
        int ret, i;
 
+       if (*ini_dest != IWL_FW_INI_LOCATION_INVALID)
+               return;
+
        IWL_DEBUG_FW(fwrt,
                     "WRT: Generating active triggers list, domain 0x%x\n",
                     fwrt->trans->dbg.domains_bitmap);