summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
Commit message (Collapse)AuthorAgeFilesLines
* iwlwifi: add loose coex lutWey-Yi Guy2012-05-081-2/+21
| | | | | | Add the Loose coex LUT and will use later for better bt coex tpt Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: change kill mask based on reduce power stateWey-Yi Guy2012-05-081-9/+13
| | | | | | In bt coex, consider reduce tx power as part of ack/cts kill mask Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: send reduce tx power info in commandWey-Yi Guy2012-05-081-0/+1
| | | | | | Add the reduce tx power information in bt coex host command Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: add checking for the condition to reduce tx powerWey-Yi Guy2012-05-081-4/+38
| | | | | | | | When bluetooth coex is active and certain condition matched, driver need to decide should the tx power been reduce or not. Adding the logic to manage it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: remove unused macrosWey-Yi Guy2012-05-081-69/+0
| | | | Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: clean up module parametersJohannes Berg2012-04-231-13/+3
| | | | | | | | | | | 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-9/+9
| | | | | | | 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-3/+3
| | | | | | | 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 get_cmd_stringJohannes Berg2012-04-161-1/+1
| | | | | | | | | | The command strings are needed through the layers for debug and error messages, but can differ with opmode. As a result, we need to give the command names to the transport layer as configuration. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: remove uCode alternatives mechanismJohannes Berg2012-04-161-1/+0
| | | | | | | | | | | | | | | | | 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: remove no_sleep_autoadjustJohannes Berg2012-04-161-1/+0
| | | | | | | | | | | | | | 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: more generic name for bluetooth commandWey-Yi Guy2012-04-121-12/+18
| | | | | | Instead of hardcode 6000 and 2000, use more generic name Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: move eeprom into privJohannes Berg2012-04-121-62/+0
| | | | | | | | | | | | | | | | | | | | | | The whole code around eeprom is distributed across whole bunch of different files, most of which belong to the to-be-DVM code. As a result, it is currently very hard to split out the EEPROM code to be generic. However, it is also quite unlikely that the current EEPROM code will be needed by the MVM code as that has different mechanisms to query the EEPROM (it does so through the uCode.) So, at least temporarily, move everything into priv. If it becomes necessary to use the code from MVM, we will have to split it out, but then it's also easier since we'll know what pieces we need. 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 hw_params into privJohannes Berg2012-04-121-2/+2
| | | | | | | | | | | | | The hw_params are mostly values that are derived from the actual hardware config. As such, while it is possible that MVM will require similar ones, it makes more sense -- at least for now -- to put them into the DVM struct. 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 POWER_PMI status bitDon Fry2012-04-091-1/+1
| | | | | | | | | | 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: move FW_ERROR to privDon Fry2012-04-091-0/+6
| | | | | | | | | The op_mode should check for FW_ERROR before calling send_cmd. This removes the need to test for FW_ERROR in the trans layer. 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: move valid_contexts to privJohannes Berg2012-04-091-1/+1
| | | | | | | | | No other component is accessing it any more, so it can move to the correct place in 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 trailing newline to various messagesJohannes Berg2012-04-091-7/+7
| | | | | | | | | A whole bunch of messages, even some recent ones, didn't include a trailing newline so add it. 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>
* Merge branch 'master' of ↵John W. Linville2012-03-161-0/+1
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/ath/ath9k/hw.c
| * iwlwifi: avoid some operations if no uCode loadedDavid Spinadel2012-03-121-0/+1
| | | | | | | | | | | | | | | | | | | | Printing the SRAM and similar testmode operations could be triggered when no uCode is loaded; prevent those invalid operations by tracking whether uCode is loaded. 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>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2012-03-091-1/+1
|\ \ | |/ |/|
| * iwlwifi: fix wowlan suspendJohannes Berg2012-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was broken by the commit 023ca58f1 "iwlwifi: Move the core suspend function to iwl-agn-lib" where for some reason the code changed while moving, from .len[0] = sizeof(*key_data.rsc_tsc), to .len[0] = sizeof(key_data.rsc_tsc), Cc: stable@kernel.org 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: more status bit factoringDon Fry2012-03-081-4/+4
| | | | | | | | | | | | | | | | | | 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: separate status to priv and transDon Fry2012-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | The shared status bits are a mixture of transport and op mode bits. Some are used just by one or the other, some are shared. Begin the de-tangling of these bits. 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 unused argument from iwlagn_suspendJohannes Berg2012-03-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | There's not much point in passing priv and hw pointers since they can be derived from each other, and the function doesn't use the hw pointer anyway. Remove it. 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 packet to transportJohannes Berg2012-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The base packet structure will (hopefully) be the same for all transports, but what is in it differs. Remove the union of all the possible contents and move the packet itself into the transport header file. This requires changing all users of the union to just use pkt->data. 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_owner to privJohannes Berg2012-03-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | The transport doesn't really need to know as we can enforce it in the command wrapper. Move the ucode_owner variable into priv and do all enforcing there. 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-10/+10
| | | | | | | | | | | | | | | | | | 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: move lockdep assertion into DVMJohannes Berg2012-03-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fact that the mutex must be held is an implementation detail of DVM, but something has to ensure that no two synchronous cmds are submitted concurrently. Move the lockdep assertion into the DVM-specific code, but also make the transport abort if there are two concurrently commands. The assertion is much more useful though as the transport check can only catch it when it actually happens, while the assertion makes sure it can't possibly happen. 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 RF/CT kill check to command wrapperJohannes Berg2012-03-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we cannot send any commands when the uCode is in RF or CT kill, but that will not be true for all new uCode versions, so we need to move the check into the uCode specific code. Also remove the duplicate rfkill check. 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-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: remove iwl-wifi.hJohannes Berg2012-03-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ucode loading to op_modeJohannes Berg2012-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | uCode loading belongs to the op_mode, as it is dependent on various things there and the commands sent during it are specific to it. Move the prototypes to iwl-agn.h to indicate this. To make this possible, also move all the calibration handling (which is op_mode dependent after all). 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: don't pass iwl_rx_mem_buffer to upper layersJohannes Berg2012-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct iwl_rx_mem_buffer implementation details (DMA address, list pointers) that the upper layers don't need. Introduce iwl_rx_cmd_buffer that is passed upstream and only contains the needed data (the page). Additionally, access this data only via accessor functions, allowing us to change the implementation in the future. These accessors are rxb_addr() (as before) and rxb_steal_page() to take ownership of the data. 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: remove SKU from configJohannes Berg2012-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | There's no SKU override, we always just use it from EEPROM. As such, we can remove it from the config and use it in hw_param only. Since iwl_eeprom_check_sku() really needs to fill it in also rename that to iwl_eeprom_init_hw_params(). 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 shared lockJohannes Berg2012-03-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Some data doesn't need protection, some of the lock places are simply useless, and some data can be protected with the mutex instead. Thus the shared lock can be removed by making those changes. 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: introduce statistics lockJohannes Berg2012-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | The statistics are currently only half-heartedly locked against concurrent reading & modification so introduce a lock to really protect them. 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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: move ucode_ver to iwl_nicDon Fry2012-02-171-1/+1
| | | | | | | | | | | | | | Delete ucode_ver from iwl_priv and use iwl_nic instead. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: move workqueue to privJohannes Berg2012-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | In order to separate the different parts of the driver better, we are reducing the shared data. This moves the workqueue to "priv", and removes it from the transport. To do this, simply use schedule_work() in the transport. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: update CopyrightWey-Yi Guy2012-01-241-1/+1
|/ | | | | | | Update Copyright to 2012 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: remove most of the iwl_priv references from iwl-ucode.cDon Fry2011-12-161-1/+2
| | | | | | | | Remove all but the last few references to iwl_priv from the lower level iwl-ucode.c, with resulting code changes. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: tid_data moves to iwl_privEmmanuel Grumbach2011-12-161-1/+1
| | | | | | The transport doesn't need to access it any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: move iwl_cfg from iwl_priv to iwl_sharedDon Fry2011-12-161-11/+11
| | | | | | | | 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: use IWL_MAX_TID_COUNT for WoWLANJohannes Berg2011-12-081-1/+1
| | | | | | | | Now that I corrected IWL_MAX_TID_COUNT to be 8 instead of 9, we can use it in WoWLAN suspend. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: move eeprom pointer from iwl_priv to iwl_sharedDon Fry2011-12-081-16/+16
| | | | | | | | The eeprom image is a device level component, move from iwl_priv to iwl_shared, with associated code changes. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
OpenPOWER on IntegriCloud