summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
AgeCommit message (Collapse)AuthorFilesLines
2017-11-03iwlwifi: remove dead code for internal devices onlyEmmanuel Grumbach1-6/+0
We had a bunch of code that was relevant for internal devices only. Those devices are now being depreceated. Kill all the now unneeded code. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-10-06iwlwifi: fix minor code style issuesChristoph Böhmwalder1-3/+4
Fixes three trivial issues as reported by checkpatch.pl, namely two switch/case indentation issues and one alignment issue in a multiline comment. Signed-off-by: Christoph Böhmwalder <christoph@boehmwalder.at> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-08-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo1-2/+3
Stephen Rothwell reported quite a few conflicts in iwlwifi between wireless-drivers and wireless-drivers-next. To avoid any problems later in other trees merge w-d to w-d-next to fix those conflicts early.
2017-08-18iwlwifi: Demote messages about fw flags size to infoJoão Paulo Rechi Vita1-6/+6
These messages are not reporting a real error, just the fact that the firmware knows about more flags than the driver. Currently these messages are presented to the user during boot if there is no bootsplash covering the console, even when booting the kernel with "quiet". Demoting it to the warn level helps having a clean boot process. Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-08-09iwlwifi: change functions that can only return 0 to voidSharon Dvir1-16/+8
Change iwl_set_ucode_api_flags(), iwl_set_ucode_capabilities() to be void. No need to check returned values. Found by Klocwork. Signed-off-by: Sharon Dvir <sharon.dvir@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-08-01iwlwifi: fix fw_pre_next_step to apply also for C stepHaim Dreyfuss1-2/+3
C step NICs should use the latest FW (currently B step). Correct the condition to make C step NICs advanced its default FW name to the latest one. Also rename _next_ to b_or_c to avoid confusion. Fixes: 5da083d1922c ("iwlwifi: add support for 9000 HW B-step NICs") Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-06-29iwlwifi: create new subdirectory for FW interactionJohannes Berg1-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>
2017-06-29iwlwifi: unify external & internal modparam namesJohannes Berg1-6/+6
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>
2017-06-05iwlwifi: add 9000 and A000 device familiesSara Sharon1-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>
2017-06-02iwlwifi: Add fw_name_pre_rf_next_step to support different rf stepsHaim Dreyfuss1-0/+4
Integrated chip may have different HW and RF steps. Currently, the driver supports only different HW steps. Add logic to support different RF steps enables combining different HW and RF steps. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-04-25iwlwifi: remove module loading failure messageJohannes Berg1-1/+1
When CONFIG_DEBUG_TEST_DRIVER_REMOVE is set, iwlwifi crashes when the opmode module cannot be loaded, due to completing the completion before using drv->dev, which can then already be freed. Fix this by removing the (fairly useless) message. Moving the completion later causes a deadlock instead, so that's not an option. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-04-25iwlwifi: don't leak memory on allocation failureJohannes Berg1-6/+7
If we fail to allocate the small chunk of memory for the pieces of the firmware file, we leak the whole firmware image instead... Since the allocation failure is really unlikely, just bail out at that point instead. Remove the error message at the label since we now (and actually have been) use it for various reasons. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-04-11iwlwifi: add support for 9000 HW B-step NICsLiad Kaufman1-6/+13
Once we remove support for A-step, we'll be able to clean the code back again. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-04-11iwlwifi: be more verbose about needed firmwareLuca Coelho1-4/+19
If the supported firmware versions are not found, we currently only print "no suitable firmware found". This is not very informative for the user trying to find the correct version to use. Improve this by printing the exact firmware name(s) the driver supports and pointing to the git repository where they can be found. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-02-28lib/vsprintf.c: remove %Z supportAlexey Dobriyan1-8/+8
Now that %z is standartised in C99 there is no reason to support %Z. Unlike %L it doesn't even make format strings smaller. Use BUILD_BUG_ON in a couple ATM drivers. In case anyone didn't notice lib/vsprintf.o is about half of SLUB which is in my opinion is quite an achievement. Hopefully this patch inspires someone else to trim vsprintf.c more. Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-06iwlwifi: remove unnecessary cfg element in iwl_drvLuca Coelho1-12/+10
The iwl_drv structure contains trans which already contains cfg, so storing cfg separately in iwl_drv is redundant. Remove it and access trans->cfg instead. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-02-06iwlwifi: remove unnecessary argument to iwl_drv_start()Luca Coelho1-3/+2
When iwl_drv_start() is called, trans->cfg must already be set, so there's no need to pass cfg separately, since it can be accessed directly from trans->cfg. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-01-31iwlwifi: alloc memory dynamically also for DVMSara Sharon1-0/+26
For old firmwares the memory wasn't allocated, resulting in panic. Make it dynamically allocated as well. Allow any order of functions call. Fixes: eef187a7b8a1 ("iwlwifi: enlarge number of ucode sections") Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Tested-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-01-26iwlwifi: enlarge number of ucode sectionsSara Sharon1-7/+24
The maximum number of firmware sections is now 32 instead of 16 for a000 devices. Set the appropriate define. Avoid out of bounds access in case there are more sections than the maximum set by driver. Make the driver extensible to FW size changes by allocating the section memory dynamically. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-01-26iwlwifi: allow memory debug TLV to specify the memory typeJohannes Berg1-0/+12
Due to some new features and changes, the firmware file will now specify what type of memory to dump, in upper 8 bits of the type field of the TLV. Parse it (types we don't understand are errors) and teach the code to dump periphery memory. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-01-24iwlwifi: mvm: accept arbitrary memory dump TLVsJohannes Berg1-35/+22
There's no reason to be validating the memory dump types, or checking them for duplication, or anything, since we really just pass them through from the TLV to the dump. Thus, change the way we handle memory dump TLVs to let the driver just blindly use anything specified there, dumping it into the memory dump output file. This makes the system extensible without driver changes. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-08Merge tag 'iwlwifi-next-for-kalle-2016-07-06' of ↵Kalle Valo1-26/+20
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * work on DQA continued * SAR BIOS implementation * some work on debugging capabilities * added support for GCMP encryption * data path rework in preparation for new HW * some cleanup to remove transport dependency on mac80211 * support for MSIx in preparation for new HW * lots of work in preparation for HW support (9000 and a000 series) * general cleanups * general bugfixes
2016-07-06iwlwifi: store cipher scheme independent of mac80211Johannes Berg1-14/+2
In order to reduce reliance on mac80211 structs in the core iwlwifi code, store the cipher schemes in the format given by the firmware and convert it later, rather than storing it in the mac80211 format. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: change fw.mvm_fw to fw.typeJohannes Berg1-10/+16
Instead of explicitly indicating the difference between just DVM and MVM with an mvm_fw boolean change this to fw.type to be more extensible and easier to understand. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06iwlwifi: remove useless enum valuesJohannes Berg1-2/+2
Since the values of this enum are used only internally, we can let the compiler number them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-05Merge tag 'iwlwifi-next-for-kalle-2016-07-01' of ↵Kalle Valo1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * More work on the RX path for the 9000 device series * Some more dynamic queue allocation work * A few bugfixes and other improvements
2016-07-01iwlwifi: advertise maximal MPDU length when Rx MQ is supportedEmmanuel Grumbach1-1/+2
The new hardware that supports multiple queue also de-aggregates A-MSDUs. This means that we can advertise the maximal size of A-MSDUs regardless of the receive buffer's size. In order to be able to forcefully use a lower A-MSDU size, add a default value for the module parameter. Pre-9000 will have a default of 4K, and 9000 will have 12K. Setting the amsdu_size module parameter to 4K will limit the A-MSDU on 9000 as well. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-05-11Merge tag 'iwlwifi-next-for-kalle-2016-05-10' of ↵Kalle Valo1-41/+11
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * work for RX multiqueue continues (Sara); * dynamic queue allocation work continues (Liad); * add Luca as maintainer; * a bunch of fixes and improvements all over;
2016-05-10iwlwifi: add default value to disable_11ac mod param descriptionEmmanuel Grumbach1-1/+1
Small change to make it clear that the default value is false. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-05-10iwlwifi: remove IWLWIFI_DEBUG_EXPERIMENTAL_UCODEEmmanuel Grumbach1-26/+9
This Kconfig option allows to load a firmware for debugging with a different name. This mechanism has not been used for a few years now and replacing the firmware file works as well. Kill this Kconfig option and all the code that goes with it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-05-10iwlwifi: Fix firmware name maximum length definitionHaim Dreyfuss1-1/+1
Previous patch had changed firmware name convention for new generation product. The firmware name is now longer than the former convention. Adapt max firmware name length to the new convention. Fixes: e1ba684f762b ("iwlwifi: 8000: fix MODULE_FIRMWARE input") Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-05-10Merge tag 'iwlwifi-for-kalle-2016-05-04' of ↵Luca Coelho1-13/+0
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes * fix P2P rates (and possibly other issues) Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-04-26iwlwifi: fix fw version reading for DVM devicesLuca Coelho1-1/+4
In commit 97f95c93c8ed ("iwlwifi: remove support for fw older than -16.ucode") we accidentally changed the fw version reading code for DVM devices. The code intended to remove the old fw version API, because all MVM firmwares version 16 and above that we support don't use it anymore. But DVM devices still use the old FW API. Fix that by bringing the code back in. Reported-by: Pat Erley <pat-lkml@erley.org> Tested-by: Kalle Valo <kvalo@codeaurora.org> Fixes: 97f95c93c8ed ("iwlwifi: remove support for fw older than-16.ucode") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-12iwlwifi: 8000: fix MODULE_FIRMWARE inputSara Sharon1-13/+0
The firwmare name for 8000 is iwlwifi-8000C. The C is appended based on a value read from a register. This allows to load different firwmare versions based on the hardware step during development. Now that the hardware development is completed, we can hard code the 'C' and along the way, fix the input to MODULE_FIRMWARE. This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=116041 Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-04-12iwlwifi: mvm: avoid to WARN about gscan capabilitiesAyala Beker1-3/+10
Gscan capabilities were updated with new capabilities supported by the device. Update GSCAN capabilities TLV and avoid to WARN if the firmware does not have the new capabilities. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30iwlwifi: store fw memory segments length and addresses in run-timeGolan Ben-Ami1-0/+45
Currently reading the fw memory segments is done according to addresses and data length that are hard-coded. Lately a new tlv was appended to the ucode, that contains the data type, length and address. Parse this tlv, and in run-time store the memory segments length and addresses that would be dumped upon a fw error. Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30iwlwifi: remove IWL_*_UCODE_API_OKEmmanuel Grumbach1-23/+1
_UCODE_API_OK was a intermediate version between MIN and MAX. If a user had a firmware below _OK but above _MIN, the driver would work but the user would get a warning in the kernel log telling him to update his firmware. This is not needed since most users won't look for these messages in the kernel log if their wifi is working. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30iwlwifi: remove support for fw older than -16.ucodeSara Sharon1-4/+1
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-30iwlwifi: mvm: update GSCAN capabilitiesAyala Beker1-3/+10
Gscan capabilities were updated with new capabilities supported by the device. Update GSCAN capabilities TLV. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30iwlwifi: remove IWLWIFI_UAPSD KconfigEmmanuel Grumbach1-7/+0
We have a module parameter, this is enough. per platform customizations will be done through the init script of the platform. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30iwlwifi: make uapsd_disable module param a bitmapEmmanuel Grumbach1-4/+6
This allows to disable uapsd for BSS only, or P2P client separately. Remove the now unneeded IWL_MVM_P2P_UAPSD_STANDALONE constant. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-09iwlwifi: mvm: update GSCAN capabilitiesAyala Beker1-14/+24
Gscan capabilities were updated with new capabilities supported by the device. While at it, simplify the firmware support conditional and move both conditions into the WARN() to make it easier to undertand and use the unlikely() for both. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-02iwlwifi: add disable_11ac module paramAndrei Otcheretianski1-0/+4
Add module parameter that disables VHT capabilities. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-02-28iwlwifi: support ucode with d0 unified image - regular and usnifferGolan Ben-Ami1-1/+2
Till today, the ucode consisted of two d0 images - regular, in which the usniffer wasn't enabled, and usniffer, in which the usniffer logs were enabled. Lately, the two images were unified, so there is only one d0 image, in which the usniffer logs are enabled. Add new TLV capability for supporting the consolidated images (set 2, bit 13). Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-01-31iwlwifi: fix name of ucode loaded for 8265 seriesOren Givon1-2/+4
Fix the name of the ucode being loaded for 8265 series to be: iwlwifi-8265-XX.ucode Signed-off-by: Oren Givon <oren.givon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-20iwlwifi: change the Intel Wireless email addressEmmanuel Grumbach1-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>
2015-12-16iwlwifi: expose fw usniffer mode to more utilitiesGolan Ben-Ami1-5/+6
Today, in order to configure fw in usniffer mode, the ucode must have the corresponding tlv, which is revealed to the driver while parsing the ucode. Expose the mode of the usniffer to other utilities in the driver (other than the ucode parser) by passing back a pointer to the value. This can be very useful for allowing configuring the fw dbg data using an external configuration file, because this configuration depends on the fw usniffer mode. Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-12-01iwlwifi: print index in api/capa flags parsing messageJohannes Berg1-2/+6
If the API or capabilities index is bigger than the driver expects, an error message is printed. Make that message print the index and distinguish between API and capabilities. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-11-26iwlwifi: mvm: add trigger for firmware dump upon TDLS eventsGolan Ben-Ami1-0/+2
This will allow to catch different TDLS events and get the firmware data when they occur. Add empty TX_LATENCY trigger on the way to avoid mismatch with trees in which this trigger is implemented. Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-11-26iwlwifi: generalize d0i3_entry_timeout module parameterLuca Coelho1-0/+5
The PCIe transport will also need a d0i3_entry_timeout_ms parameter, so move the existing one from the slave transports to iwlwifi, so it can be reused. While at it, rename the parameter to something shorter, namely d0i3_entry_delay. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>