summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
AgeCommit message (Collapse)Author
2017-05-14iwlwifi: mvm: writing zero bytes to debugfs causes a crashDan Carpenter
commit 251fe09f13bfb54c1ede66ee8bf8ddd0061c4f7c upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-27Merge tag 'iwlwifi-for-kalle-2015-10-25' of ↵Kalle Valo
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;
2016-10-19iwlwifi: mvm: use ssize_t for len in iwl_debugfs_mem_read()Luca Coelho
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>
2016-10-10Merge branch 'work.misc' of ↵Linus Torvalds
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() ...
2016-09-19iwlwifi: mvm: Add mem debugfs entryIdo Yariv
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>
2016-09-19iwlwifi: mvm: support packet injectionSara Sharon
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>
2016-08-08iwlwifi: use %pdAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2016-07-05iwlwifi: mvm: silence uninitialized variable warningDan Carpenter
"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>
2016-05-10iwlwifi: mvm: add a new mvm reference type for RX dataLuca Coelho
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>
2016-05-10iwlwifi: wake from runtime suspend before sending sync commandsLuca Coelho
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>
2016-03-30iwlwifi: mvm: improve RSS configurationSara Sharon
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>
2016-03-30iwlwifi: remove support for fw older than -16.ucodeSara Sharon
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>
2016-03-09iwlwifi: mvm: add ctdp operations to debugfsChaya Rachel Ivgi
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>
2016-02-27iwlwifi: mvm: allow to limit the A-MSDU from debugfsEmmanuel Grumbach
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>
2016-02-27iwlwifi: mvm: fix RSS key sizingSara Sharon
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>
2016-02-01iwlwifi: mvm: allow to disable beacon filtering for AP/GO interfaceAndrei Otcheretianski
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>
2016-02-01iwlwifi: mvm: support rss queues configuration commandSara Sharon
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>
2016-02-01iwlwifi: mvm: add support for negative temperaturesChaya Rachel Ivgi
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>
2016-02-01iwlwifi: mvm: fix debugfs signedness warningJohannes Berg
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>
2015-12-20iwlwifi: mvm: support description for user triggered fw dbg collectionGolan Ben-Ami
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>
2015-12-20iwlwifi: change the Intel Wireless email addressEmmanuel Grumbach
ilw@linux.intel.com is not available anymore. linuxwifi@intel.com should be used instead. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-13iwlwifi: avoid d0i3 commands when no/init ucode is loadedEliad Peller
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>
2015-12-01iwlwifi: mvm: Support setting continuous recording debug modeGolan Ben Ami
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>
2015-12-01iwlwifi: mvm: move fw-dbg code to separate fileGolan Ben-Ami
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>
2015-11-26iwlwifi: mvm: drop low_latency_agg_frame_cnt_limitEyal Shapira
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>
2015-11-26iwlwifi: mvm: add bt rrc and ttc to debugfsMoshe Harel
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>
2015-11-26iwlwifi: mvm: add bt settings to debugfsMoshe Harel
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>
2015-11-18iwlwifi: move under intel vendor directoryKalle Valo
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>