summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
Commit message (Collapse)AuthorAgeFilesLines
* iwlwifi: avoid collecting firmware dump if not loadedShaul Triebitz2018-05-301-3/+2
| | | | | | | | | | | | | | | | | | | [ Upstream commit 8745f12a6600dd9d31122588621d4c8ddb332cd7 ] Trying to collect firmware debug data while firmware is not loaded causes various errors (e.g. failing NIC access). This causes even a bigger issue if at that time the HW radio is off. In that case, when later turning the radio on, the Driver fails to read the HW (registers contain garbage values). (It may be that the CSR_GP_CNTRL_REG_FLAG_RFKILL_WAKE_L1A_EN bit is cleared on faulty NIC access - since the same behavior was seen in HW RFKILL toggling before setting that bit.) Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* iwlwifi: move BT_MBOX_PRINT macro to common headerLuca Coelho2017-08-181-12/+0
| | | | | | | | Move the BT_MBOX_PRINT() macro from mvm/debugfs.c to fw/api/coex.h so it can be reused and remove duplicate definition of BT_MBOX_MSG(), keeping only the one already in coex.h. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: support new Coex firmware APIEmmanuel Grumbach2017-08-181-3/+10
| | | | | | | | | | The firmware now adds more information about time sharing with the Bluetooth core. Adapt the API structures and add the new fields in the debugfs hooks. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: remove the corunning supportEmmanuel Grumbach2017-08-181-5/+0
| | | | | | | | | | | | The corunning block was supposed to help in coex scenarios. It required the driver to configure the firmware based on the coupling between the two antennas of the devices. This was never in use and the configuration sent by the driver has always been blank. Remove all that code. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: fix the coex firmware APIEmmanuel Grumbach2017-08-091-2/+2
| | | | | | | | | | | The firmware API defined in the header files didn't match the structure that are actually passed by the firmware. The impact could be a decision for MIMO in Tx or Rx in coex scenarios. Fixes: 430a3bbafdc7 ("iwlwifi: mvm: BT Coex - new API") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: don't send CTDP commands via debugfs if not supportedMatt Chen2017-08-091-0/+6
| | | | | | | | Fix this issue if it is not supported by the firmware. Fixes: 00f481bd895a ("iwlwifi: mvm: add ctdp operations to debugfs") Signed-off-by: Matt Chen <matt.chen@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: add debugfs to force CT-killChaya Rachel Ivgi2017-08-091-0/+14
| | | | | | | | | | | | CT-kill is a thermal-based "RF-kill", which disables the NIC completely if the temperature gets too high, in order to avoid damage. Add a debugfs entry to simulate high temperatures, in order to test CT-kill flows in the driver without having to physically heat the device up. Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: refactor firmware debug codeJohannes Berg2017-08-011-5/+4
| | | | | | | | Split out the firmware debug code to be more general, so that it can be used by different subdrivers. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: track current firmware image in common codeJohannes Berg2017-08-011-6/+6
| | | | | | | | | Track the current firmware image in the common code instead of in the opmode so that later patches can access it there in a common way. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: update rx statistics cmd apiLiad Kaufman2017-06-291-87/+148
| | | | | | | The API has changed - update the code. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: create new subdirectory for FW interactionJohannes Berg2017-06-291-1/+1
| | | | | | | | | | There's a lot of mvm code that really should be more generic and part of the iwlwifi module. Start by making a place to keep such code - in the new "fw" subdirectory - and already move the firmware related header files there. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: unify external & internal modparam namesJohannes Berg2017-06-291-2/+2
| | | | | | | | | Where possible (all except for "11n_disable", which isn't valid in C) rename the internal names for module parameters to be the same as the externally visible names, to aid finding their use etc. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: change when the BT_COEX is sentEmmanuel Grumbach2017-06-291-1/+1
| | | | | | | | | | | | | The BT_COEX command should not be sent to the INIT firmware image starting from 8000 family. The firmware team also requested to send the BT_COEX command after the PHY_DB_CMD and the PHY_CFG_CMD. While at it: s/iwl_send_bt_init_conf/iwl_mvm_send_bt_init_conf/ Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: Add debugfs entry to retrieve SAR geographic profileHaim Dreyfuss2017-06-291-0/+50
| | | | | | | | Add a debugfs entry to get a verbose description of the power settings used in each band with the currently selected SAR geographic profile. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: support new flush APIMordechai Goodstein2017-06-231-4/+15
| | | | | | | | | | This new API allows flushing queues based on station ID and TID in A000 devices. One reason for using this is that tfd_queue_mask is only good for 32 queues, which is not enough for A000 devices. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Mordechai Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: add and use iwl_mvm_device_running()Johannes Berg2017-06-051-10/+15
| | | | | | | This will help refactor this later. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: check firmware is up in debugfsJohannes Berg2017-06-051-6/+49
| | | | | | | | | | | Protect various debugfs files that need to communicate with the firmware from being used when the firmware isn't running. Some will just reject getting written to, while others that store some state will simply store it and not apply it immediately. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: add 9000 and A000 device familiesSara Sharon2017-06-051-1/+1
| | | | | | | Add two new device families to differentiate them from 8000. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: prepare for station count changeSara Sharon2017-04-191-1/+1
| | | | | | | | | | | | | In a000 devices we will support up to 32 stations. The max station define is used also for invalid station marking which makes finding usages of actual maximum station pretty hard to sort through - change it to be a different define in order to make future changes easier. Use also ARRAY_SIZE intead of define when possible. Do not move yet to 32 stations until firmware do it though. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: writing zero bytes to debugfs causes a crashDan Carpenter2017-03-241-0/+2
| | | | | | | | | | | | | | This is a static analysis fix. The warning is: drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c:912 iwl_mvm_fw_dbg_collect() warn: integer overflows 'sizeof(*desc) + len' I guess this code is supposed to take a NUL character, but if we write zero bytes then it tries to write -1 characters and crashes. Fixes: c91b865cb14d ("iwlwifi: mvm: support description for user triggered fw dbg collection") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: mark ret as maybe_unused in iwl_dbgfs_fw_restart_write()Luca Coelho2017-01-261-1/+1
| | | | | | | | | | | | | | The value returned from iwl_mvm_send_cmd_pdu() in this function is not used and always returns an error (which is the whole point of the call). Tag the ret variable with __maybe_unused to avoid this compile warning when W=1 is used: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c: In function ‘iwl_dbgfs_fw_restart_write’: /home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:875:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret; ^ Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* Merge tag 'iwlwifi-for-kalle-2015-10-25' of ↵Kalle Valo2016-10-271-2/+2
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes * some fixes for suspend/resume with unified FW images; * a fix for a false-positive lockdep report; * a fix for multi-queue that caused an unnecessary 1 second latency; * a fix for an ACPI parsing bug that caused a misleading error message;
| * iwlwifi: mvm: use ssize_t for len in iwl_debugfs_mem_read()Luca Coelho2016-10-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In iwl_dbgfs_mem_read(), the len variable may become negative and is compared to < 0 (an error case). Comparing size_t (which is unsigned) to < 0 causes a warning on certain platforms (like i386): drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561:5-8: WARNING: Unsigned expression compared with zero: len < 0 To prevent that, use ssize_t for len instead. Fixes: commit 2b55f43f8e47 ("iwlwifi: mvm: Add mem debugfs entry") Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* | Merge branch 'work.misc' of ↵Linus Torvalds2016-10-101-3/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "Assorted misc bits and pieces. There are several single-topic branches left after this (rename2 series from Miklos, current_time series from Deepa Dinamani, xattr series from Andreas, uaccess stuff from from me) and I'd prefer to send those separately" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (39 commits) proc: switch auxv to use of __mem_open() hpfs: support FIEMAP cifs: get rid of unused arguments of CIFSSMBWrite() posix_acl: uapi header split posix_acl: xattr representation cleanups fs/aio.c: eliminate redundant loads in put_aio_ring_file fs/internal.h: add const to ns_dentry_operations declaration compat: remove compat_printk() fs/buffer.c: make __getblk_slow() static proc: unsigned file descriptors fs/file: more unsigned file descriptors fs: compat: remove redundant check of nr_segs cachefiles: Fix attempt to read i_blocks after deleting file [ver #2] cifs: don't use memcpy() to copy struct iov_iter get rid of separate multipage fault-in primitives fs: Avoid premature clearing of capabilities fs: Give dentry to inode_change_ok() instead of inode fuse: Propagate dentry down to inode_change_ok() ceph: Propagate dentry down to inode_change_ok() xfs: Propagate dentry down to inode_change_ok() ...
| * iwlwifi: use %pdAl Viro2016-08-071-3/+1
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | iwlwifi: mvm: Add mem debugfs entryIdo Yariv2016-09-191-0/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to access cached/paged memory, there are a couple of firmware commands (one for UMAC and one for LMAC) that let the host access memory and registers indirectly. Since this is done by the firmware on behalf of the host, even if memory is paged out or cached, the host will retrieve the memory as the firmware sees it (paged out memory will get paged in). Export this mechanism via a debugfs entry for both read and write access. WARNING: This mechanism has no protections at all. Invalid addresses may crash or hang the firmware. Writing to arbitrary memory also comes with no guarantees. Signed-off-by: Ido Yariv <idox.yariv@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* | iwlwifi: mvm: support packet injectionSara Sharon2016-09-191-0/+55
|/ | | | | | | | For automatic testing packet injection can be useful. Support injection through debugfs. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: silence uninitialized variable warningDan Carpenter2016-07-061-0/+2
| | | | | | | "max_amsdu_len" isn't set if kstrtouint() fails. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: add a new mvm reference type for RX dataLuca Coelho2016-05-101-0/+1
| | | | | | | | | | | | When a data packet is received, we need to make sure that we stay awake until it can be processed and wait a while before trying to enter runtime_suspend os system_suspend again. To do so, add a new reference type for RX data and take the reference when sending the packet to mac80211. We only do this for data packets, all the other RX packets sent by the firmware (e.g. notifications) are not a reason to prevent suspend. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: wake from runtime suspend before sending sync commandsLuca Coelho2016-05-101-0/+1
| | | | | | | | | | | | If a host command was queued while in runtime suspend, it would go out before the D0I3_END_CMD was sent. Sometimes it works, but sometimes it fails, and it is obviously the wrong thing to do. To fix this, have the opmode take a reference before sending a SYNC command and make the pcie trans wait for the runtime state to become active before actually queueing the command. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: improve RSS configurationSara Sharon2016-03-301-1/+4
| | | | | | | | | | Improve current RSS configuration: * Use netdev_rss_key instead of keeping a local copy. * Configure also UDP hashing to have UDP traffic spread across queues. * Do not direct RSS traffic to our fallback queue. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: remove support for fw older than -16.ucodeSara Sharon2016-03-301-137/+27
| | | | | | | | | API version lower than 16 is not supported anymore - don't load older ucode. Remove code handling older versions. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: add ctdp operations to debugfsChaya Rachel Ivgi2016-03-091-0/+42
| | | | | | | | Add debugfs entries to get the ctdp budget average and to stop ctdp. Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: allow to limit the A-MSDU from debugfsEmmanuel Grumbach2016-02-271-0/+19
| | | | | | | | in order to be able to tune the size of the desired A-MSDU based on link condition, add a knob to modify the length of the A-MSDU. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: fix RSS key sizingSara Sharon2016-02-271-2/+3
| | | | | | | | | | | | The initialization and copying of the RSS secret key should not use ARRAY_SIZE as we need to initialize a dword array, and not a byte array. Fix also the hook maximum write size to allow writing a longer table - up to full indirection table size. Fixes: 43413a975d06("iwlwifi: mvm: support rss queues configuration command") Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: allow to disable beacon filtering for AP/GO interfaceAndrei Otcheretianski2016-02-011-0/+3
| | | | | | | | | | | | When in AP mode we need to filter in beacons from other APs to update HT operation mode. As a power optimization the beacons are filtered out when there are no associated stations. As a result, when there are no associated stations, we will not update the HT operation mode until a station connects. Add a debugfs parameter that allows to disable this optimization. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: support rss queues configuration commandSara Sharon2016-02-011-0/+44
| | | | | | | | | | | | | | | 9000 series supports multi-queue rx. The hardware needs to be configured with the hash functions to perform and indirection table that maps hash results to the relevant CPUs\queues. Support this configuration. Add debugfs hook to configure the indirection table in order to enable performance analysis. The configuration is stateless, receives a partial or full pattern and sends the command to the firmware. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: add support for negative temperaturesChaya Rachel Ivgi2016-02-011-4/+5
| | | | | | | | | | The driver should support also negative temperatures. So there is a need to separate between the return value and temperature in order to be able to distinguish between a negative temperature and error value. Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: fix debugfs signedness warningJohannes Berg2016-02-011-1/+1
| | | | | | | | Using kstrtouint() with a signed int isn't really right, use kstrotoint() instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: support description for user triggered fw dbg collectionGolan Ben-Ami2015-12-201-2/+3
| | | | | | | | | | Add to the user triggered fw debug collection support for describing the reason of the trigger. This could be useful for identifying a dump by a unique id, passed as a description. Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: change the Intel Wireless email addressEmmanuel Grumbach2015-12-201-1/+1
| | | | | | | ilw@linux.intel.com is not available anymore. linuxwifi@intel.com should be used instead. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: avoid d0i3 commands when no/init ucode is loadedEliad Peller2015-12-131-0/+1
| | | | | | | | | | | | | | d0i3 commands are not supported in the init image, so take a reference to ensure we don't enter d0i3 during init image, and additional checks to prevent d0i3 commands when no fw image is loaded. Add a few WARN_ON_ONCE to the d0i3 enter/exit commands to ensure we send d0i3 commands only when the normal ucode is loaded. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: Support setting continuous recording debug modeGolan Ben Ami2015-12-011-0/+40
| | | | | | | | | | | | Add ability to set the continuous recording mode of the FW, while the FW debug data is configured to be stored on the NIC. This could be useful for storing large segments of FW usniffer debug data on the host, while having small store space on the NIC. The host receives the usniffer data through the regular RX path, and the data can get extracted using trace-cmd. Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: move fw-dbg code to separate fileGolan Ben-Ami2015-12-011-0/+1
| | | | | | | | The fw debug functionality is big enough to warrant a separate file. Move existing related functions to the new file. Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: drop low_latency_agg_frame_cnt_limitEyal Shapira2015-11-261-4/+0
| | | | | | | | | | This was an old workaround for solving latency issues with certain Miracast adapters like ActionTec. However this isn't needed anymore and furthermore it hurts throughput in other use cases. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: add bt rrc and ttc to debugfsMoshe Harel2015-11-261-0/+8
| | | | | | | | As part of the bt_notif file add fields that are currently not represented Signed-off-by: Moshe Harel <moshe.harel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: add bt settings to debugfsMoshe Harel2015-11-261-0/+7
| | | | | | | Add mplut and sync2sco and corunning to debugfs. Signed-off-by: Moshe Harel <moshe.harel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: move under intel vendor directoryKalle Valo2015-11-181-0/+1516
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>