summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.h
AgeCommit message (Collapse)Author
2023-12-12wifi: iwlwifi: mvm: add a debugfs hook to clear the monitor dataEmmanuel Grumbach
This can be used by the user space when it wants to clear the data we collected so far for privacy reasons. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231207044813.d5e97d5ec0d9.I7a5e836e6109e1fce7e6301dba8d1f28e60a5440@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-09-11wifi: iwlwifi: honor the enable_ini valueEmmanuel Grumbach
In case the user sets the enable_ini to some preset, we want to honor the value. Remove the ops to set the value of the module parameter is runtime, we don't want to allow to modify the value in runtime since we configure the firmware once at the beginning on its life. Fixes: b49c2b252b58 ("iwlwifi: Configure FW debug preset via module param.") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230830112059.5734e0f374bb.I6698eda8ed2112378dd47ac5d62866ebe7a94f77@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-03-10iwlwifi: Configure FW debug preset via module param.Ayala Barazani
The module param "enable_ini" is currently used to be enable/disable ini. Add the option to configure the FW debug preset via this module param, by change it type from boolean to an integer. Signed-off-by: Ayala Barazani <ayala.barazani@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20220304131517.4929e4b14956.I1bdffa4c37d4ee349aa0001978b716b96e38b090@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-10-22iwlwifi: yoyo: fw debug config from context info and presetMukesh Sisodiya
Add new TLV for debug config set to read preset based on TLV is set in context info. This is needed to set the preset based on ucode in early trigger point. Add DRAM frag allocation info in first fragment of DBGC1 with all details. New capability from FW for DBGC frag debug support is added and BUFFER_ALLOCATION_CMD is disabled in capability is supported. Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20211017123741.cacf0babc521.If3704b5fda09b344e3e438252360898a3f2e90fa@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: prepare for synchronous error dumpsJohannes Berg
In some cases it may be necessary to synchronously create a firmware error report, add the necessary infrastructure for this. 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.20210802170640.481b6642f0fc.I7c9c958408a285e3d19aceed2a5a3341cfc08382@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-10iwlwifi: dbg: add op_mode callback for collecting debug data.Mordechay Goodstein
The first use is collecting debug data when transport stops the device. 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.20210210142629.d282d0a9ee7b.I9a0ad29f80daba8956a6aa077ba865e19b2150be@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-02-10iwlwifi: dbg: Mark ucode tlv data as constTakashi Iwai
The ucode TLV data may be read-only and should be treated as const pointers, but currently a few code forcibly cast to the writable pointer unnecessarily. This gave developers a wrong impression as if it can be modified, resulting in crashing regressions already a couple of times. This patch adds the const prefix to those cast pointers, so that such attempt can be caught more easily in future. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/20210112132449.22243-3-tiwai@suse.de Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2020-12-10iwlwifi: use SPDX tagsJohannes Berg
Use SPDX tags instead of the long copyright notices. Also cleanup some duplicate copyright notices and combine the years where possible. 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.20201210000603.481bcb512a6f.I8146abe5a637079e7336209f23cb26af98b12b31@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2020-01-04iwlwifi: yoyo: don't allow changing the domain via debugfsLuca Coelho
We don't want to allow changing the domain via debugfs so that we can apply the domain to all TLV types more easily (doing some at runtime is difficult due to buffer allocations etc.). Change the fw_dbg_domain debugfs file to be read-only and remove the write function. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: implement time point handlingShahar S Matityahu
Calculate active triggers list and implement time points handling. Also allow to override the debug domain via iwl-dbg-cfg.ini by setting FW_DBG_DOMAIN field. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: add TLV allocation new API supportShahar S Matityahu
Add new debug TLVs API preprocessing. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: use new API in dump infoShahar S Matityahu
Make dump info region use new API. debug_info_tlv_list list will be initialize in a future patch once the driver will start using it. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06iwlwifi: dbg_ini: remove periodic triggerShahar S Matityahu
Remove periodic trigger functionality. After moving to the new API we will add periodic trigger functionality that matches the new API. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06iwlwifi: dbg_ini: remove apply point, switch to time point APIShahar S Matityahu
Remove the "apply points" mechanism as preparation for the changed debug API where this is now a "time point" instead. Use a new API across the code at the trigger points ("time points"), but don't yet implement it since that requires some more preparation. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06iwlwifi: dbg_ini: separate cfg and dump flows to different modulesShahar S Matityahu
separate configuration flows and dump collection flows. make ini configuration flows be in iwl-dbg-tlv.c and dump related flows in dbg.c to better reflect their logical difference. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06iwlwifi: dbg_ini: verify debug TLVs at allocation phaseShahar S Matityahu
Reimplement debug TLV allocation flow. The driver will check the validity of the debug TLVs prior allocating space for them. Any malformed or unsupported TLV will be skipped. The TLV specific checks will be added in later patches. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06iwlwifi: dbg_ini: use linked list to store debug TLVsShahar S Matityahu
Use a linked list to maintain the debug TLVs instead of a single buffer. This way, the driver does not need to iterate over the binary file twice and allocates smaller chunks of memory. Also, in case one allocation fails the driver will work with the partial configuration instead of aborting the entire debug configuration. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-09-06iwlwifi: dbg_ini: align dbg tlv functions names to a single formatShahar S Matityahu
align the naming to iwl_dbg_tlv_* Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-11-23iwlwifi: trans: support loading ini TLVs from external fileSara Sharon
Support loading and storing ini TLVs from external file. Those TLVs are appended to the default TLVs, so store them separately. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-11-23iwlwifi: trans: parse and store debug ini TLVsSara Sharon
The new debug ini TLVs can be either packed into firmware binary or written in external file. Support loading them from both. Store the data per apply point. Apply point is a point during driver runtime, where the TLV becomes active. For example, a trigger of hardware error may be configured to collect a subset of data pre-alive, as a opposed to HW error that occurs after alive. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>