summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
AgeCommit message (Collapse)Author
2019-10-25iwlwifi: dbg_ini: support FW notification dumping in case of missed beaconShahar S Matityahu
Pass the FW notification packet to the dump collection flow to allow the driver to include it in the dump file if requested. 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: rename external debug configuration fileShahar S Matityahu
Rename the external configuration file to align to the debug SAS. 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: support FW response/notification region typeShahar S Matityahu
Allow the driver to collect FW response/notification region type during dump and allow triggering dump collection for a given FW response/notification. 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 periodic trigger new API supportShahar S Matityahu
Enable periodic trigger. Allows the driver to trigger dump collection in constant intervals. 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: implement monitor allocation flowShahar S Matityahu
Allow allocating fragmented buffers for several allocation IDs. 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: 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-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: maintain buffer allocations from trans instead of TLVs bufferShahar S Matityahu
Maintain DRAM debug buffer status in trans instead of keeping it as part of the TLVs buffer to avoid allocating extra space for it. Needed for future changes. 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>
2019-06-29iwlwifi: dbg: move trans debug fields to a separate structShahar S Matityahu
Unite iwl_trans debug related fields under iwl_trans_debug struct to increase readability and keep iwl_trans clean. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-06-29iwlwifi: dbg_ini: support debug info TLVShahar S Matityahu
Add support to debug info TLV. The TLV contains human readable naming of the FW image and the debug configuration. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-05-05Merge tag 'wireless-drivers-next-for-davem-2019-05-03' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 5.2 Most likely the last patchset of new feature for 5.2, and this time we have quite a lot of new features. Most obvious being rtw88 from Realtek which supports RTL8822BE and RTL8822CE 802.11ac devices. We have also new hardware support for existing drivers and improvements. There's one conflict in iwlwifi, my example conflict resolution below. Major changes: iwlwifi * bump the 20000-series FW API version * work on new hardware continues * RTT confidence indication support for Fine Timing Measurement (FTM) * an improvement in HE (802.11ax) rate-scaling * add command version parsing from the fimware TLVs * add support for a new WoWLAN patterns firmware API rsi * add support for rs9116 mwifiex * add support for SD8987 brcmfmac * add quirk for ACEPC T8 and T11 mini PCs rt2x00 * add RT3883 support qtnfmac * fix debugfs interface to support multiple cards rtw88 * new driver mt76 * share more code across drivers * add support for MT7615 chipset * rework DMA API * tx/rx performance optimizations * use NAPI for tx cleanup on mt76x02 * AP mode support for USB devices * USB stability fixes * tx power handling fixes for 76x2 * endian fixes Conflicts: There's a trivial conflict in drivers/net/wireless/intel/iwlwifi/fw/file.h, just leave IWL_UCODE_TLV_FW_FSEQ_VERSION to the file. 'git diff' output should be just empty: diff --cc drivers/net/wireless/intel/iwlwifi/fw/file.h index cd622af90077,b0671e16e1ce..000000000000 --- a/drivers/net/wireless/intel/iwlwifi/fw/file.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Three trivial overlapping conflicts. Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-19iwlwifi: dbg_ini: add debug prints to the ini flowsShahar S Matityahu
Add debug prints to the ini flow and rewrite existing prints to provide more information Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-04-18iwlwifi: dbg_ini: check debug TLV type explicitlyShahar S Matityahu
In ini debug TLVs bit 24 is set. The driver relies on it in the memory allocation for the debug configuration. This implementation is problematic in case of a new debug TLV that is not supported yet is added and uses bit 24. In such a scenario the driver allocate space without using it which causes errors in the apply point enabling flow. Solve it by explicitly checking if a given TLV is part of the list of the supported ini debug TLVs. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Fixes: f14cda6f3b31 ("iwlwifi: trans: parse and store debug ini TLVs") Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-03-22iwlwifi: dbg_ini: align to FW api version 1Shahar S Matityahu
align to ini debug struct version 1 and enforce version checking. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-02-04iwlwifi: dbg_ini: remove redundant dram buffer allocationShahar S Matityahu
There are several flows in that can cause redundant allocation. In case the driver reaches the maximum amount of blocks allowed, it allocates the buffer and only then checks if it reached the maximum amount of blocks and return without freeing the buffer, causing a memory leak. Solve this by moving the check of the amount of buffers being used before the allocation. In case there was an assert, the apply points are being reused, causing that for each assert, the driver allocates a new redundant buffer. Solve this by adding a new is_alloc field to indicate if the driver already allocated memory for the requested buffer. Also, split iwl_fw_dbg_buffer_allocation function into iwl_fw_dbg_buffer_allocation and iwl_fw_dbg_buffer_apply to increase the clearity of the flow. 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>
2018-12-20iwlwifi: dbg_ini: fix bad ini tlv parsingShahar S Matityahu
Add a break at the end of the ini tlv case. Fix both the internal and external tlv parsing. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-11-23iwlwifi: dbg: add apply point logicSara Sharon
Add a function to be called when apply point occurs. For each of the TLVs, the function will perform the apply point logic: - For HCMD - send the stored host command - For buffer allocation - allocate the memory and send the buffer allocation command - For trigger and region - update the stored configuration Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-11-23iwlwifi: dbg: disable triggers for iniSara Sharon
When ini is loaded, disable all legacy trigger configuration. Signed-off-by: Sara Sharon <sara.sharon@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>