aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-drv.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-03-04Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-1/+1
Conflicts: drivers/net/wireless/ath/ath9k/recv.c drivers/net/wireless/mwifiex/pcie.c
2014-02-23iwlwifi: mvm: fix a few wd_disable commentsEliad Peller1-2/+1
Few minor comments. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-23iwlwifi: mvm: prepare infrastructure for more TLV flagsEran Harary1-0/+44
We use the TLV flags as a handshake between the firmware and the driver. These flags allow the firmware to advertise its capabilities and API version. Since we are running short of bits, we add a new infrastructure which is more scalable, yet backward compatible. We make now the difference between API changes and the capabilities. Both can have an index which allows to scale at will. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-13iwlwifi: disable TX AMPDU by default for iwldvmEmmanuel Grumbach1-1/+1
NICs supported by iwldvm don't handle well TX AMPDU. Disable it by default, still leave the possibility to the user to force enable it with a debug parameter. NICs supported by iwlmvm don't suffer from the same issue, leave TX AMPDU enabled by default for these. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-13iwlwifi: mvm: new NVM format in family 8000Eran Harary1-0/+6
Support the changes below: - Fields and sections structure were changed. - the NVM file built from DWord instead of Words. - sections header format was changed. Signed-off-by: Eran Harary <eran.harary@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-03iwlwifi: fix potential buffer overrun in fw nameLiad Kaufman1-2/+3
Fix a potential buffer overrun when creating the fw name in drv->firmware_name by setting a maximal length to the char array copied to it. The maximal length is also updated to 32 rather than 25 to keep both 32bit and 64bit alignment without requiring padding to the struct it is in. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-31iwlwifi: Update Copyright to 2014Emmanuel Grumbach1-2/+2
Happy new year! Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-17iwlwifi: mvm: add a generic cipher scheme supportMax Stepanov1-0/+39
This patch adds a cipher scheme support to extend a set of the supported ciphers. The driver reads a cipher scheme list TLV from FW image and passes it to mac80211 on hw registration. After the cipher schemes are registered the driver handles key installation and Tx/Rx calls related to the new ciphers. Signed-off-by: Max Stepanov <Max.Stepanov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-10-11iwlwifi: support Signed firmware image and Dual CPUsEran Harary1-0/+37
Support Signed firmware based on code signing system (CSS) protocol and dual CPUs download, the code recognize if there are more than one CPU and if we need to operate the signed protocol according to the ucode binary image Signed-off-by: Eran Harary <eran.harary@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-08-16iwlwifi: return -ENOMEM instead of NULL when OOM in iwl_drv_start()Luciano Coelho1-3/+5
The callers of iwl_drv_start() are probe functions. If a probe function returns 0, it means it succeeded. So if NULL was returned by iwl_drv_start(), it would be considered as a success. Fix this by returning -ENOMEM if the driver struct allocation fails in iwl_drv_start(). Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-08-16iwlwifi: use a macro for default probe lengthLuciano Coelho1-1/+1
Instead of assigning the default max probe length to 200 in the main code, create a macro for consistency and clarity. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-25Merge remote-tracking branch 'wireless-next/master' into iwlwifi-nextJohannes Berg1-0/+2
2013-06-18Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-0/+2
2013-06-18iwlwifi: remove auto_agg module parameterEmmanuel Grumbach1-6/+0
If someone wants to disable AMPDU, there is the 11n_disable module parameter. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-18iwlwifi: remove plcp_check module parameterEmmanuel Grumbach1-4/+0
Nobody will ever wants to run without this. Make it true always. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-18iwlwifi: remove bt_ch_announce module paramEmmanuel Grumbach1-6/+0
This parameter is really not useful, remove it. Leave the variable in priv in case someone wants to play with it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-06-04iwlwifi: don't print module loading error if not modularJohannes Berg1-0/+2
If the opmode modules aren't modular, there's no point in printing an error message that request_module() failed. This will happen because the probe runs during iwlwifi's init and the opmode is only added during its init. Reported-by: Jörg Otte <jrg.otte@gmail.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-05-16iwlwifi: support loading NVM data from fileEran Harary1-0/+3
Some newer devices will be integrated into the platform more deeply and will not have embedded NVM (EEPROM/OTP). To support such devices the NVM data must be provided by the platform, allow loading the data via request_firmware() and then send it to the device as needed. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08iwlwifi: print warning on request_module failureJohannes Berg1-2/+7
If request_module() failed then we didn't have the correct opmode module that the driver needs to function, so print a warning in this case to make it more obvious what could be wrong. This still won't catch the case where the module simply doesn't exist because it wasn't compiled though. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-03iwlwifi: print opmode when firmware is loadedJohannes Berg1-2/+3
Print the sub-driver (opmode, i.e. DVM or MVM) when the firmware is loaded. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-20iwlwifi: remove 5ghz_disable optionStanislaw Gruszka1-4/+0
5ghz_disable has no effect any longer, that was changed during refactoring of EEPROM reading/parsing. Remove it, wpa_supplicant allow now to specify frequencies, on which device will operate. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-06iwlwifi: move firmware restart debugfs hook to op_modeEmmanuel Grumbach1-3/+3
This allows to test fw restart flow. The hook in transport layer doesn't really make the fw assert. Moving this hook to the op_mode allows to use the fw API to actually send a host command that will make the fw assert. Change the restart_fw module parameter to be a boolean on the way. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-06iwlwifi: export symbols only conditionallyJohannes Berg1-3/+3
If all the pieces of iwlwifi are built into the kernel then there's no need for it to export its symbols to other modules, so prevent that. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-06iwlwifi: a few fixes in licenseEmmanuel Grumbach1-1/+1
7000.c was released as GPL only by mistake: it should be dual licensed - GPL / BSD. The file that contains the license in the kernel is COPYING and not LICENSE.GPL. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-28iwlwifi: disable 8K A-MSDU by defaultEmmanuel Grumbach1-2/+1
Supporting 8K A-MSDU means that we need to allocate order 1 pages for every Rx packet. Even when there is no traffic. This adds stress on the memory manager. The handling of compound pages is also less trivial for the memory manager and not using them will make the allocation code run faster although I didn't really measure. Eric also pointed out that having huge buffers with little data in them is not very nice towards the TCP stack since the truesize of the skb is huge. This doesn't allow TCP to have a big Rx window. See https://patchwork.kernel.org/patch/2167711/ for details. Note that very few vendors will actually send A-MSDU. Disable this feature by default. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-01iwlwifi: add the MVM driverJohannes Berg1-5/+10
Newer firmware revisions have a completely new firmware API. This is the new driver for this new API. I've listed the people who directly contributed code, but many others from various teams have contributed in other ways. Cc: Alexander Bondar <alexander.bondar@intel.com> Cc: Amit Beka <amit.beka@intel.com> Cc: Amnon Paz <amnonx.paz@intel.com> Cc: Assaf Krauss <assaf.krauss@intel.com> Cc: David Spinadel <david.spinadel@intel.com> Cc: Dor Shaish <dor.shaish@intel.com> Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Cc: Eytan Lifshitz <eytan.lifshitz@intel.com> Cc: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-30iwlwifi: fix calibration parserJohannes Berg1-2/+6
The firmware TLV for calibration data isn't really a u64, but two u32 values. Define a struct for that and change the parser. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-24iwlwifi: update copyrightJohannes Berg1-2/+2
Update Copyright notices to 2013. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-11-29iwlwifi: return real info in probe failureEmmanuel Grumbach1-3/+3
Don't return a hard coded -EFAULT, but rather the error that occurred in the flow. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-10iwlwifi: load firmware in chunksJohannes Berg1-12/+14
Instead of allocating one big chunk of DMA-coherent memory for the firmware and keeping it around, only vmalloc() the firmware and copy it into a single page of DMA-coherent memory for the upload. The advantage is that we don't need DMA memory for the firmware image that is stored while the driver is operating, we only need it while uploading. This will make it easier for the driver to work if the system has fragmented memory. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-07-26iwlwifi: rework the iwlwifi debugfs structureMeenakshi Venkataraman1-18/+114
The generic part of the driver now creates all debugfs directories. It creates a root directory directly in the the root of the debugfs filesystem and within that directories for each device, named after the device ID of the devices iwlwifi is attached to. In the cfg80211/mac80211 directory there's now a link to the toplevel iwlwifi debugfs directory to make it easier to find the debugfs files. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-07-26iwlwifi: s/iwl_ucode_callback/iwl_req_fw_callbackEmmanuel Grumbach1-4/+5
This name emphasizes more the role of the function: the callback called when the ASYNC call to request_firmware completes. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-07-09Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-nextJohn W. Linville1-0/+1
2012-06-25iwlwifi: disable the watchdog for queues by defaultEmmanuel Grumbach1-0/+1
I saw that when the watchdog triggers, the packets do go through if we wait enough time. So we still have an issue where packets are blocked in the Tx queue for a short while and this needs to be debugged separately. For now, don't restart the driver when it is not needed. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-14iwlwifi: unlock on error pathDan Carpenter1-1/+3
We introduced a lock here in ff1ffb850b ("iwlwifi: fix dynamic loading"). But we missed an error path which needs an unlock. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-13iwlwifi: use request_module instead of _nowaitJohannes Berg1-1/+10
Since request_module_nowait() can't be backported use request_module() instead -- we don't need the asynchronous behaviour of request_module_nowait() here since we're running in the firmware request work struct. Tested-by: Donald H Fry <donald.h.fry@intel.com> Reviewed-by: Donald H Fry <donald.h.fry@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-13Merge remote-tracking branch 'wireless-next/master' into iwlwifi-nextJohannes Berg1-1/+9
2012-06-13iwlwifi: fix dynamic loadingJohannes Berg1-0/+23
Add locking to the dynamic loading code to prevent corrupting the list if multiple device ever init at the same time (which cannot happen for multiple PCI devices, but could happen when different busses init concurrently.) Also remove a device from the list when it stops so the list isn't left corrupted, including a fix from Don to not crash when it was never added. Reviewed-by: Donald H Fry <donald.h.fry@intel.com> Tested-by: Donald H Fry <donald.h.fry@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-1/+9
Conflicts: drivers/net/wireless/iwlwifi/iwl-drv.c
2012-06-05iwlwifi: implement dynamic opmode loadingDon Fry1-4/+108
This is the next step in splitting up the driver, making the uCode API dependent pieces of it live in separate modules. Right now there's only one so it's not user-selectable, but we're actively working on more. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05iwlwifi: fix double free/complete in firmware loadingJohannes Berg1-2/+7
Linus reported that due to mac80211 failing to register the device (due to WoWLAN) his machine crashed etc. as we double-freed the vmalloc() firmware area. His patch to fix it was very similar to this one but I noticed that there's another bug in the area: we complete the completion before starting, so since we're running in a work struct context stop() could be called while in the middle of start() which will almost certainly lead to issues. Make a modification similar to his to avoid the double- free but also move the completion to another spot so it is only done after start() either finished or failed so that stop() can have a consistent state. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-25iwlwifi: fix memory leak if opmode fails to initJohannes Berg1-9/+9
If drv->op_mode is NULL after trying to init the opmode, we go to the wrong label. Fix this, and clean up the code a bit. Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Reviewed-by: Guy Cohen <guy.cohen@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-08iwlwifi: add option to disable 5GHz bandStanislaw Gruszka1-0/+4
There are various problems happened on 5GHz band not observed on 2.4 GHz (microcode errors, queue stuck, etc... ) . Also roaming between 5GHz AP and 2GHz does not work very well. To workaround the problems add option to disable 5GHz support. This will help on environments where APs are dual-band, and devices will not try to associate on band where issues happen. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08iwlwifi: use IWL_* instead of dev_printk when possibleEmmanuel Grumbach1-4/+4
Also remove a debug print when allocation error occurred. The kernel will complain anyway. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23iwlwifi: clean up module parametersJohannes Berg1-0/+88
For now at least, all module parameters should be with the core functionality, so move them there, while at it rename to iwlwifi_mod_params. Also rename iwl-shared.h to iwl-modparams.h to reflect the real contents. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23iwlwifi: clean up iwl-shared.h includesJohannes Berg1-0/+2
That file is now holding just a few defines and the module parameters, so it shouldn't include anything. Make sure the right users include the right files instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-18iwlwifi: remove unneeded includesEmmanuel Grumbach1-1/+0
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-18iwlwifi: remove the shared areaEmmanuel Grumbach1-6/+1
It is not needed any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-18iwlwifi: don't use shared for the logger any moreEmmanuel Grumbach1-0/+3
Each modules will hold a pointer to struct device instead. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-18iwlwifi: driver holds its pointer to the transportEmmanuel Grumbach1-4/+4
Instead of using the shared area that we be killed. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>