summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-drv.c
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* iwlwifi: change struct iwl_fwDavid Spinadel2012-03-121-65/+76
| | | | | | | | | | | | | | | Change iwl_fw struct to hold an array of fw_img instead of three separated instances. Change fw_img to hold an array of fw_desc instead of two separate descriptors for instructions and data. Change load_given_ucode, load_section, verification functions etc. to support this structure. 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>
* iwlwifi: Add TLVs and fields for 16.0 uCodeDavid Spinadel2012-03-121-0/+84
| | | | | | | | | | | | | New TLVs for ucode sections that are not known as instruction or data. New TLVs for phy-configuration and default calibrations. Add default calib and phy config fields to iwl_fw. 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>
* iwlwifi: more modularity in fw images and sectionsDavid Spinadel2012-03-121-76/+204
| | | | | | | | | | | | | | | Changed iwl_firmware_pieces structure to support an array of separate images, and an array of sections for each image. In fw_sec and fw_desc structures, added a field for offset from the HW address, to support 16.0 uCode that provides an offset instead of any other data about the section. This field is filled with default values when parsing instruction or data section. 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>
* iwlwifi: rename ucode.h to fw-file.hJohannes Berg2012-03-071-1/+1
| | | | | | | | | | That name better reflects the contents of the file and the fact that it isn't related to iwl-ucode.c. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: remove iwl-wifi.hJohannes Berg2012-03-071-125/+147
| | | | | | | | | | | | | | | | | This file was recently introduced, but then directly abused -- it contained private data that shouldn't have been used by anything but the implementation of firmware requests and some very core code. Now that it is no longer accessed by any code but the code in iwl-drv.c, we can dissolve it. Also rename the iwl_nic struct to iwl_drv to better reflect where and how it is used. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: split out firmware storeJohannes Berg2012-03-071-20/+29
| | | | | | | | | | | | | | | | | | | | | | Through the driver, struct iwl_fw will store the firmware. Split this out into a separate file, iwl-fw.h, and make all other code use it. To do this, also move the log pointers into it, and remove the knowledge of "nic" from everything. Now the op_mode has a fw pointer, and (unfortunately) for now the shared data also needs to keep one for the transport to access dump the error log -- I think that will move later. Since I wanted to constify the firmware pointers, some more changes were needed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: move firmware completion waitJohannes Berg2012-03-061-0/+2
| | | | | | | | | This doesn't belong into the op_mode, it has to be in the drv stop flow instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: move firmware request into drvJohannes Berg2012-03-061-0/+625
| | | | | | | | | | | Firmware request is a base driver flow, it isn't related to any specific mode. Move the code related to it into the base driver file iwl-drv.c. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: move uCode deallocation to drvJohannes Berg2012-03-061-0/+2
| | | | | | | | | This shouldn't be in the op_mode, as it will later be switchable at runtime. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: make config constJohannes Berg2012-03-061-1/+1
| | | | | | | | | | Writing to the global config structures is always wrong. To protect against such mistakes in the future, mark them const. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: virtualize the op_modeEmmanuel Grumbach2012-02-271-2/+4
| | | | | | | | | | | Define the op_mode as an interface with its ops. All the functions of the op_mode are "private", but its ops is made public in iwl-op-mode.h. The drv object starts the op_mode by using the start function in the public ops. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: rename iwl_remove to iwl_op_mode_dvm_stopEmmanuel Grumbach2012-02-271-1/+1
| | | | | | | | | iwl_remove stops the wifi flows, so rename. Moreover, we can possibly stop the wifi flows even if the driver is statically compiled in the kernel, so remove the __devexit pragma. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: drv object can release its own memoryEmmanuel Grumbach2012-02-271-0/+7
| | | | | | | Move that code to the iwl-drv.c Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: introducing the drv object's flowsEmmanuel Grumbach2012-02-271-0/+94
Fetch the fw and spawn the op_mode. The op_mode that we need to fetch is determined from the fw file. Since the fw is fetched very early in the init flow, we can determine what op_mode to spawn. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
OpenPOWER on IntegriCloud