summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-drv.c
Commit message (Collapse)AuthorAgeFilesLines
* iwlwifi: support Signed firmware image and Dual CPUsEran Harary2013-10-111-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>
* iwlwifi: return -ENOMEM instead of NULL when OOM in iwl_drv_start()Luciano Coelho2013-08-161-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>
* iwlwifi: use a macro for default probe lengthLuciano Coelho2013-08-161-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>
* Merge remote-tracking branch 'wireless-next/master' into iwlwifi-nextJohannes Berg2013-06-251-0/+2
|\
| * Merge branch 'master' of ↵John W. Linville2013-06-181-0/+2
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| | * iwlwifi: don't print module loading error if not modularJohannes Berg2013-06-041-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>
* | | iwlwifi: remove auto_agg module parameterEmmanuel Grumbach2013-06-181-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>
* | | iwlwifi: remove plcp_check module parameterEmmanuel Grumbach2013-06-181-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>
* | | iwlwifi: remove bt_ch_announce module paramEmmanuel Grumbach2013-06-181-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>
* | iwlwifi: support loading NVM data from fileEran Harary2013-05-161-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>
* iwlwifi: print warning on request_module failureJohannes Berg2013-04-081-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>
* iwlwifi: print opmode when firmware is loadedJohannes Berg2013-04-031-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>
* iwlwifi: remove 5ghz_disable optionStanislaw Gruszka2013-03-201-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>
* iwlwifi: move firmware restart debugfs hook to op_modeEmmanuel Grumbach2013-03-061-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>
* iwlwifi: export symbols only conditionallyJohannes Berg2013-03-061-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>
* iwlwifi: a few fixes in licenseEmmanuel Grumbach2013-03-061-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>
* iwlwifi: disable 8K A-MSDU by defaultEmmanuel Grumbach2013-02-281-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>
* iwlwifi: add the MVM driverJohannes Berg2013-02-011-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>
* iwlwifi: fix calibration parserJohannes Berg2013-01-301-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>
* iwlwifi: update copyrightJohannes Berg2013-01-241-2/+2
| | | | | | | Update Copyright notices to 2013. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: return real info in probe failureEmmanuel Grumbach2012-11-291-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>
* iwlwifi: load firmware in chunksJohannes Berg2012-09-101-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>
* iwlwifi: rework the iwlwifi debugfs structureMeenakshi Venkataraman2012-07-261-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>
* iwlwifi: s/iwl_ucode_callback/iwl_req_fw_callbackEmmanuel Grumbach2012-07-261-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>
* Merge branch 'for-john' of ↵John W. Linville2012-07-091-0/+1
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
| * iwlwifi: disable the watchdog for queues by defaultEmmanuel Grumbach2012-06-251-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>
* | iwlwifi: unlock on error pathDan Carpenter2012-06-141-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>
* iwlwifi: use request_module instead of _nowaitJohannes Berg2012-06-131-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>
* Merge remote-tracking branch 'wireless-next/master' into iwlwifi-nextJohannes Berg2012-06-131-1/+9
|\
| * Merge branch 'master' of ↵John W. Linville2012-06-061-1/+9
| |\ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/iwlwifi/iwl-drv.c
| | * iwlwifi: fix double free/complete in firmware loadingJohannes Berg2012-06-051-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>
* | | iwlwifi: fix dynamic loadingJohannes Berg2012-06-131-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>
* | iwlwifi: implement dynamic opmode loadingDon Fry2012-06-051-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>
* iwlwifi: fix memory leak if opmode fails to initJohannes Berg2012-05-251-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>
* iwlwifi: add option to disable 5GHz bandStanislaw Gruszka2012-05-081-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>
* iwlwifi: use IWL_* instead of dev_printk when possibleEmmanuel Grumbach2012-05-081-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>
* iwlwifi: clean up module parametersJohannes Berg2012-04-231-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>
* iwlwifi: clean up iwl-shared.h includesJohannes Berg2012-04-231-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>
* iwlwifi: remove unneeded includesEmmanuel Grumbach2012-04-181-1/+0
| | | | | Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: remove the shared areaEmmanuel Grumbach2012-04-181-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>
* iwlwifi: don't use shared for the logger any moreEmmanuel Grumbach2012-04-181-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>
* iwlwifi: driver holds its pointer to the transportEmmanuel Grumbach2012-04-181-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>
* iwlwifi: transport holds its pointer to the configEmmanuel Grumbach2012-04-181-2/+0
| | | | | | | | | Instead of using the shared area that we be killed. Remove the pointer to config from shared since it is not used any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: driver holds its pointer to the configEmmanuel Grumbach2012-04-181-12/+14
| | | | | | | Instead of using the shared area that will be killed. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: op_mode holds its pointer to the configEmmanuel Grumbach2012-04-181-1/+1
| | | | | | | 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>
* iwlwifi: kill shrd->drv, driver points to transportEmmanuel Grumbach2012-04-181-11/+11
| | | | | | | | The driver layer now holds a pointer to the transport, and shrd->drv is not needed any more, so kill it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: remove double verification of ucode sectionsDavid Spinadel2012-04-161-36/+0
| | | | | Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: set size of ucode sectionDavid Spinadel2012-04-161-0/+1
| | | | | | | Set size of firmware section in mvm bundle format. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: remove uCode alternatives mechanismJohannes Berg2012-04-161-32/+1
| | | | | | | | | | | | | | | | | We've never released firmware using the alternatives mechanism and our build process makes that difficult anyway. This means that in every file we have ever built (except maybe by hand for testing) the listed alternative was 0. Make the alternative field in the TLVs part of the TLV number (thus expanding that to 32 bits); this gives us more TLV numbers (not really needed) and more importantly protects against rogue firmware files that actually do use the alternatives mechanism -- those will now be rejected since they don't contain any valid TLVs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: Add bool mvm_ucode to iwl_fwDavid Spinadel2012-03-121-1/+8
| | | | | | | | mvm_ucode is true when mvm TLVs arive. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud