summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
Commit message (Collapse)AuthorAge
* iwlwifi: move DVM code into subdirectoryJohannes Berg2012-06-06
| | | | | | | | | | Since we're working on another mode/driver inside iwlwifi, move the current one into a subdirectory to more cleanly separate the code. While at it, rename all the files. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: make a lot of functions staticJohannes Berg2012-06-06
| | | | | | | | A lot of functions were temporarily made non-static for experimental work, make them static again now. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: handle race condition in ROC flowIlan Peer2012-06-06
| | | | | | | | | | | | | | | When a remain on channel request from mac80211 is followed by a request to tx a mgmt frame offchannel, it is possible that the remain on channel expires before the device reported the tx status for the frame. This causes a race condition in mac80211. To fix this, delay the ROC notification to mac80211 until the device reported the Tx status for all frames in the aux queue. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: implement dynamic opmode loadingDon Fry2012-06-05
| | | | | | | | | | | | | 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: support explicit monitor interfaceJohannes Berg2012-05-16
| | | | | | | | | | Support explicit monitor interface to keep injection working after the HW queue changes. This also finally enables sniffer mode. 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: modify #ifdef to avoid sparse complainWey-Yi Guy2012-05-08
| | | | Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: don't init trans->reg_lock from the op_modeEmmanuel Grumbach2012-05-08
| | | | | | | This doesn't make any sense. Init it from the transport instead. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: add option to disable 5GHz bandStanislaw Gruszka2012-05-08
| | | | | | | | | | | | 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-08
| | | | | | | | 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>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2012-05-07
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/intel/e1000e/param.c drivers/net/wireless/iwlwifi/iwl-agn-rx.c drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c drivers/net/wireless/iwlwifi/iwl-trans.h Resolved the iwlwifi conflict with mainline using 3-way diff posted by John Linville and Stephen Rothwell. In 'net' we added a bug fix to make iwlwifi report a more accurate skb->truesize but this conflicted with RX path changes that happened meanwhile in net-next. In e1000e a conflict arose in the validation code for settings of adapter->itr. 'net-next' had more sophisticated logic so that logic was used. Signed-off-by: David S. Miller <davem@davemloft.net>
| * iwlwifi: do not nulify ctx->vif on resetStanislaw Gruszka2012-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ctx->vif is dereferenced in different part of iwlwifi code, so do not nullify it. This should address at least one of the possible reasons of WARNING at iwlagn_mac_remove_interface, and perhaps some random crashes when firmware reset is performed. Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlwifi: use new mac80211 queue schemeJohannes Berg2012-04-23
| | | | | | | | | | Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: clean up module parametersJohannes Berg2012-04-23
| | | | | | | | | | | | | | | | | | | | | | 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: move driver defines to iwl-drv.hJohannes Berg2012-04-23
| | | | | | | | | | | | | | | | | | These defines will have to be shared between modules, but they seem better placed in iwl-drv.h than iwl-shared.h. 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-23
| | | | | | | | | | | | | | | | | | | | 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 traffic logJohannes Berg2012-04-23
| | | | | | | | | | | | | | This is superseded by tracing and no longer needed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: provide proper API to disable all interruptsEmmanuel Grumbach2012-04-23
| | | | | | | | | | | | | | | | | | Since the op_mode may go away, the transport needs to be able to be told not to update the op_mode at all (even for RF kill). Provide this API and use it in the proper places. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: remove unneeded includesEmmanuel Grumbach2012-04-18
| | | | | | | | | | 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-18
| | | | | | | | | | | | | | 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-18
| | | | | | | | | | | | | | 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: op_mode holds its pointer to the configEmmanuel Grumbach2012-04-18
| | | | | | | | | | | | | | 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-18
| | | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | 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: expose static methods for MVM useDavid Spinadel2012-04-16
| | | | | | | | | | | | | | | | | | | | | | To support hybrid state of MVM op_mode, most of the functioanallity will be done using DVM functions. When MVM will have independant live, the declarations will be removed and the functions will be static back. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: move HCMD_ACTIVE to transDon Fry2012-04-16
| | | | | | | | | | | | | | The HCMD_ACTIVE bit is only used in trans. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: complete STATUS_READY refactoringDon Fry2012-04-16
| | | | | | | | | | | | | | When WiMax takes over the RF, inform the op_mode. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: remove uCode alternatives mechanismJohannes Berg2012-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: change the default P2P support to "Yes"Wey-Yi Guy2012-04-12
| | | | | | | | Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: move iwl_send_statistics_request to iwl-agn.cMeenakshi Venkataraman2012-04-12
| | | | | | | | | | | | | | Move this as part of iwl-core.c cleanup. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: move iwl_send_bt_config and mark it staticMeenakshi Venkataraman2012-04-12
| | | | | | | | | | | | | | Move this as part of iwl-core.c cleanup. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: move iwlagn_fw_error to iwl-agn.cMeenakshi Venkataraman2012-04-12
| | | | | | | | | | | | | | Move this as part of iwl-core.c cleanup. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: move iwl_set_hw_rfkill_state and mark it staticMeenakshi Venkataraman2012-04-12
| | | | | | | | | | | | | | | | iwl_set_hw_rfkill_state is used only in iwl-agn.c. Move it there and mark it static. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: move iwl_free_skb and mark it staticMeenakshi Venkataraman2012-04-12
| | | | | | | | | | | | | | | | iwl_free_skb is used only in iwl-agn.c, move it there and mark it static. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: calculate active legacy rates per stationJohannes Berg2012-04-12
| | | | | | | | | | | | | | | | | | | | | | Not all stations are guaranteed to have the same active (available) legacy rates, so calculate them on rate control init instead of hard-coding them based on our own available rates. I have no idea why that was done here before. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: dynamically determine lib_opsJohannes Berg2012-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having the pointer to lib_ops in the config makes it impossible to split the driver into different modules. Determine the ops based on the device family enumeration to get rid of the direct pointer. Also move all the opmode specific code from the iwl-[1256]000.c files into a new file iwl-agn-devices.c so that the former only have configuration data now. 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 eeprom into privJohannes Berg2012-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: split force_reset debugfs fileJohannes Berg2012-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the force_reset debugfs file into two different files: * "rf_reset" triggers a reset of the RF when written to and exposes statistics on RF resets when read * fw_restart triggers a firmware restart when written to and lives in the transport This cleans up all sources of firmware restart to originate within the transport layer and allows us to simplify some code. 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 ack_check module parameterJohannes Berg2012-04-12
| | | | | | | | | | | | | | | | | | This defaults to false, and we don't recommend to use it anywhere, so just 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 hw_params into privJohannes Berg2012-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: move queue watchdog into transportJohannes Berg2012-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes one of the two sources of device restarts in the upper layer -- those are a bit inconvenient because normal restarts originate in the transport. By moving the watchdog down it can be treated the same. Also rewrite the watchdog logic. Timers are much more efficient when they never fire, so instead firing a timer every 500ms set up a timer for each TX queue and fire it only when the queue is really stuck. This avoids the CPU waking up when everything is working well. While at it, remove the wd_disable config item and replace it by simply setting wd_timeout to IWL_WATCHHDOG_DISABLED (0). 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 rx_page_order into transportJohannes Berg2012-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | That way it isn't needed in hw_params, which is shared data. It also isn't really what we should configure in the transport, that is better just 4k/8k, so configure a bool and derive the page order in the transport. This also means the transport doesn't need access to the module parameter any more. 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 pr_fmtJoe Perches2012-04-10
| | | | | | | | | | | | | | | | Prefix dmesg output with "iwlwifi: " by adding #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlwifi: move FW_ERROR to privDon Fry2012-04-09
| | | | | | | | | | | | | | | | | | 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: remove firmware info from iwl_sharedMeenakshi Venkataraman2012-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With error logging now completely handled in the op_mode, the transport layer does not need to know information about the loaded firmware. Remove this state information from the iwl_shared data structure. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@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 iwl_init_geos to iwl-agn.cMeenakshi Venkataraman2012-04-09
| | | | | | | | | | | | | | | | | | This is used only in one file, move it there and make it static. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@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_type from shared to op_modeMeenakshi Venkataraman2012-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | This variable holds the ucode currently running on the device; which is determined by op_mode, so move this parameter there. Also, the name of the variable is a bit misleading, so rename it to cur_ucode. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@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 error log reporting to op_modeMeenakshi Venkataraman2012-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error log reporting does not belong to the transport layer, but to the op_mode loading the ucode, as it is the entity which knows about the ucode loaded, and what the error information means. Move device logging pointers from the transport layer to op_mode. With this change, transport layer only reports an error to the op_mode, which will figure out what to do with the error. This causes the driver to now dump out error logs when the command queue is stuck as well. Also, move the debugfs entry for event logs out of the transport layer and into op_mode. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@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 iwl_nic_error staticMeenakshi Venkataraman2012-04-09
| | | | | | | | | | | | | | | | | | iwl_nic_error is used in iwl-agn.c only, move it there and make it static. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlwifi: use iwlagn_fw_error instead of iwl_nic_errorMeenakshi Venkataraman2012-04-09
| | | | | | | | | | | | | | | | | | | | In the process, make iwlagn_fw_error a non-static function, as it is used by more than one file. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>