summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-power.c
Commit message (Collapse)AuthorAgeFilesLines
* iwlwifi: clean up module parametersJohannes Berg2012-04-231-3/+4
| | | | | | | | | | | 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: remove TX/RX frame statisticsJohannes Berg2012-04-231-1/+0
| | | | | | | | | | Keeping statistics per frame type really isn't very useful, and needs a huge amount of code so remove it. Since that is the only thing in iwl-core.{c,h} now, those files can be killed. 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: op_mode holds its pointer to the configEmmanuel 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: op_mode holds its pointer to the transportEmmanuel 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: remove no_sleep_autoadjustJohannes Berg2012-04-161-60/+2
| | | | | | | | | | | | | | My original idea with this was to adjust the sleep pattern of the uCode based on the maximum network latency userspace asked for. Due to nobody wanting to test it, this logic was disabled by default. It seems the time has come to remove it, since it's not only always disabled but there also don't seem to be any applications that actually request a max network latency. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: split POWER_PMI status bitDon Fry2012-04-091-2/+2
| | | | | | | | | | Move the POWER_PMI to the op_mode where it is changed. The trans needs to check it frequently, so shadow the status in the trans and update it in trans when it infrequently changes. Signed-off-by: Don Fry <donald.h.fry@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 status bit factoringDon Fry2012-03-081-2/+2
| | | | | | | | | Continue splitting the status bits between transport and op_mode. All but a few are separated. Signed-off-by: Don Fry <donald.h.fry@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 shadow_reg_enable from hw_paramsJohannes Berg2012-03-071-2/+2
| | | | | | | | | | | There's no need to copy shadow_reg_enable into hw_params since it is a pure hardware parameter that will never change, we can access it from the config directly. 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 mutex out of sharedJohannes Berg2012-03-071-1/+1
| | | | | | | | | Now the mutex no longer needs to be shared, so move it into iwl_priv. 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: add wrappers for command sendingJohannes Berg2012-03-071-1/+1
| | | | | | | | | | | | | | | Add wrappers to send commands from the DVM op-mode (which essentially consists of the current driver). This will allow us to move specific sanity checks there. Also, this removes iwl_trans_send_cmd_pdu() since that can now be taken care of in the DVM-specific wrapper. 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 wowlan bool into privJohannes Berg2012-03-061-1/+1
| | | | | | | | | | With the new WoWLAN flow into the transport there no longer is a need for this to be shared, so move it into priv. 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: kill bus_is_pm_supportedEmmanuel Grumbach2012-02-021-1/+1
| | | | | | | | Get this information from the transport layer which is now in charge of the APM too. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: update CopyrightWey-Yi Guy2012-01-061-1/+1
| | | | | | Update Copyright to 2012 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: move iwl_cfg from iwl_priv to iwl_sharedDon Fry2011-12-161-4/+4
| | | | | | | | Move the configuration pointer from the upper level iwl_priv to the lower level iwl_shared structure, with associated code fixes. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: eliminate bus pointer from iwl_priv structureDon Fry2011-10-141-1/+1
| | | | | | | | | A pointer to the bus structure is still in iwl_priv. Finish cleanup and remove it. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: remove dereferences of priv from transportEmmanuel Grumbach2011-08-291-2/+2
| | | | | | | | | | | | | | There are still quite a few, but much less. A few fields have been moved /copied to hw_params which sits in the shared area: * priv->cfg->base_params->num_of_ampdu_queues * priv->cfg->base_params->shadow_reg_enable * priv->cfg->sku * priv->ucode_owner Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: move all iwl_is_XXX helpers to iwl-shared.hEmmanuel Grumbach2011-08-291-1/+1
| | | | | | | | Logic move after all priv->status moved to struct iwl_shared Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: move iwl_suspend / iwl_resume to the transport layerEmmanuel Grumbach2011-08-291-1/+1
| | | | | | | | | These flows needs to access the APM and a few other registers that can differ between different transports. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: bus layer chooses its transport layerEmmanuel Grumbach2011-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Remove iwl_transport_register which was a W/A. The bus layer knows what transport to use. So now, the bus layer gives the upper layer a pointer to the iwl_trans_ops struct that it wants to use. The upper layer then, allocates the desired transport layer using iwl_trans_ops->alloc function. As a result of this, priv->trans, no longer exists, priv holds a pointer to iwl_shared, which holds a pointer to iwl_trans. This required to change all the calls to the transport layer from upper layer. While we were at it, trans_X inlines have been renamed to iwl_trans_X to avoid confusions, which of course required to rename the functions inside the transport layer because of conflicts in names. So the static API functions inside the transport layer implementation have been renamed to iwl_trans_pcie_X. Until now, the IRQ / Tasklet were initialized in iwl_transport_layer. This is confusing since the registration doesn't mean to request IRQ, so I added a handler for that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: priv->mutex moves to iwl_sharedEmmanuel Grumbach2011-08-291-1/+1
| | | | | | | | Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: priv->status moves to iwl_sharedEmmanuel Grumbach2011-08-291-3/+3
| | | | | | | | Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: introduce iwl-shared.hEmmanuel Grumbach2011-08-291-0/+1
| | | | | | | | | | | | | | | | | | | | It will hold declaration of functions and forward declaration of struct that are used by several layers. This will allow modules not to include iwl_priv. iwl_bus and iwl_trans are still visible to all. All the layers share the module parameters, move the struct to iwl-shared.h. Also add all module parameters to iwl_mod_params instead of having them as global static. This includes * debug_level * ant_coupling * bt_ch_announce * wanted_ucode_alternative Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: 5000 do not support idle modeWey-Yi Guy2011-08-021-1/+2
| | | | | | | | | | | | | | | | | | | | 5000 series has issue supporting power save idle mode: commit 9dc2153315650eae220898668b6aa56a25c130be iwlwifi: always support idle mode for agn devices For agn devices, always support idle mode which help power consumption in idle unassociated state. the above changes cause 5000 become not stable when power management is "on" http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2312 Cc: stable@kernel.org #2.6.39, #3.0.0 Reported-by: Devin J Pohly <djpohly+iwl@gmail.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: implement WoWLANJohannes Berg2011-07-211-1/+3
| | | | | | | | | | | | Implement WoWLAN support in iwlagn. The device supports a number of wakeup triggers and can do GTK rekeying when asleep (if HW crypto is used). Unfortunately, we need to disconnect from the AP after resume since we can't yet get all the info out of the wowlan uCode to stay connected safely. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: simplify the bus architectureEmmanuel Grumbach2011-07-211-1/+1
| | | | | | | | | | | | | | | | | | | Call iwl_probe with a ready iwl_bus struct. This means that the bus layer assigns the irq, dev and iwl_bus_ops pointers to iwl_bus before giving it to iwl_probe. The device specific struct is allocated together with the common iwl_bus struct by the bus specific layer. The pointer to the aggregate struct is passed to the upper layer that holds a pointer to iwl_bus instead of an embedded iw_bus. The private data given to the PCI subsystem is now iwl_bus and not iwl_priv. Provide bus_* inliners on the way in order to simplify the syntax. Rename iwl-pci.h -> iwl-bus.h since it is bus agnostic and represent the external of the bus layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: transport layer receives struct iwl_trans*Emmanuel Grumbach2011-07-211-1/+1
| | | | | | | | | It still holds a pointer to iwl_priv. But hopefully this will disappear at some point. Also add the multiple inclusion protection to iwl-trans.h that was forgotten. Move iwl-trans structures to iwl-trans.h Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: remove the indirection for update_chain_flagsFry, Donald H2011-07-111-3/+3
| | | | | | | | Not needed since the driver split. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: provide heplers to access the transport opsEmmanuel Grumbach2011-07-111-1/+2
| | | | | | | | This removes the for priv->trans.ops->... Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: consolidate the API that sends host commands and move to transportEmmanuel Grumbach2011-07-111-1/+1
| | | | | | | | | | | | | | | Now, there are only two functions to send a host command: * send_cmd that receives a iwl_host_cmd * send_cmd_pdu that builds the iwl_host_cmd itself and received flags The flags CMD_ASYNC / CMD_SYNC / CMD_WANT_SKB are not changed by the API functions. Kill the unused flags CMD_SIZE_NORMAL / CMD_NO_SKB on the way. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: Add power_level module parameterWey-Yi Guy2011-06-181-3/+9
| | | | | | | Add power_level module parameter to set the default power save level. Power save level has range from 1 - 5, default power save level is 1. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: move PCI power related functions to the PCI layerWey-Yi Guy2011-06-181-6/+4
| | | | | | | | Continue to popule the PCI layer and the iwl_bus_ops with the power related stuff. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: move no_sleep_autoadjust as part of iwlagn_mod_paramsWey-Yi Guy2011-06-111-11/+2
| | | | | | | Move no_sleep_autoadjust module parameter into iwlagn_mod_params structure along with all the other iwlagn module parameters Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: temperature should be measure for all _agn devicesWey-Yi Guy2011-04-181-4/+2
| | | | | | | Thermal throttling functions are available for all _agn devices, call the functions directly. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: remove most BUG_ON instancesJohannes Berg2011-04-181-3/+4
| | | | | | | | | | | | | | | There are a number of things in the driver that may result in a BUG(), which is suboptimal since it's hard to get debugging information out of the driver in that case and the user experience is also not good :-) Almost all BUG_ON instances can be converted to WARN_ON with a few lines of appropriate error handling, so do that instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: all _agn devices support power save modeWey-Yi Guy2011-04-081-3/+1
| | | | | | Remove broken_power_save checking Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: change Copyright to 2011Wey-Yi Guy2011-04-071-1/+1
| | | | | Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: split the drivers for agn and legacy devices 3945/4965Wey-Yi Guy2011-02-211-3/+0
| | | | | | | | | | | | | | | | | | Intel WiFi devices 3945 and 4965 now have their own driver in the folder drivers/net/wireless/iwlegacy Add support to build these drivers independently of the driver for AGN devices. Selecting the 3945 builds iwl3945.ko and iwl_legacy.ko, and selecting the 4965 builds iwl4965.ko and iwl_legacy.ko. iwl-legacy.ko contains code shared between both devices. The 3945 is an ABG/BG device, with no support for 802.11n. The 4965 is a 2x3 ABGN device. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Acked-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* Revert "iwlwifi: split the drivers for agn and legacy devices 3945/4965"Wey-Yi Guy2011-02-211-0/+3
| | | | This reverts commit aa833c4b1a928b8d3c4fcc2faaa0d6b81ea02b56.
* iwlwifi: split the drivers for agn and legacy devices 3945/4965Wey-Yi Guy2011-02-211-3/+0
| | | | | | | | | | | | | | | | | | Intel WiFi devices 3945 and 4965 now have their own driver in the folder drivers/net/wireless/iwlegacy Add support to build these drivers independently of the driver for AGN devices. Selecting the 3945 builds iwl3945.ko and iwl_legacy.ko, and selecting the 4965 builds iwl4965.ko and iwl_legacy.ko. iwl-legacy.ko contains code shared between both devices. The 3945 is an ABG/BG device, with no support for 802.11n. The 4965 is a 2x3 ABGN device. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Acked-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: always support idle mode for agn devicesWey-Yi Guy2011-01-311-2/+1
| | | | | | | For agn devices, always support idle mode which help power consumption in idle unassociated state. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: introduce iwl_advanced_bt_coexist()Stanislaw Gruszka2011-01-281-4/+2
| | | | | | | | | We use priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist conditional in few places, merge it into one function. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: advance power management supportWey-Yi Guy2010-11-241-5/+63
| | | | | | | | For 6000g2b and up, adding advance power management support for better power consumption Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: power management checking for shadow registerWey-Yi Guy2010-11-241-0/+10
| | | | | | | | If shadow register is enable, modify the power management command to inform uCode Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: consider BT for power managementWey-Yi Guy2010-11-241-0/+17
| | | | | | | Check the BT PSPoll flag when fill PM command to uCode Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: defer update power mode while scanStanislaw Gruszka2010-11-151-35/+60
| | | | | | | | | Do not set power mode when scanning, and defer that when scan finish. We still set power mode in force case i.e. when device is overheated. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: reduce redundant parameter definitionsWey-Yi Guy2010-10-061-2/+2
| | | | | | | | | | | | | move paramater definitions to a device paramater structure only leaving the device name, which antennas are used and what firmware file to use in the iwl_cfg structure. this will not completely remove the redundancies but greatly reduce them for devices that only vary by name or antennas. the parameters that are more likely to change within a given device family are left in iwl_cfg. also separate bt param structure added to help reduce more. Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: fix thermal throttling related power management operationWey-Yi Guy2010-08-241-7/+5
| | | | | | | | | | The current approach is very broken because it adds an often-used code path that will not initialise "cmd" at all. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Shanyu Zhao <shanyu.zhao.intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: separate thermal throttling functionWey-Yi Guy2010-08-241-631/+9
| | | | | | | | | "Thermal Throttling" is an advance feature which only available for newer _agn devices. Move from iwl-core to iwl-agn for better code organization. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2010-05-171-4/+1
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
OpenPOWER on IntegriCloud