summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
Commit message (Collapse)AuthorAgeFilesLines
* iwlwifi: move PCIe into subdirectoryJohannes Berg2012-06-061-2178/+0
| | | | | | | | | Structure the code a bit more and move all PCIe code including the hardware configuration files into a PCIe specific subdirectory. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: add debugging to shadow registers and fix typoMeenakshi Venkataraman2012-06-051-0/+1
| | | | | | | | | | Add a debugging log when using shadow registers. Also fix a minor typo in this connection. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: clean up coding style in PCIe transportJohannes Berg2012-06-051-106/+97
| | | | | | | | | | | Mostly clean up indentation around parentheses after if, function calls, etc. and also a few unneeded line breaks and some other things. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: Move IWL_MASK macro to transport.Gregory Greenman2012-06-051-2/+0
| | | | | | | | | | | This macro is needed by other transports besides PCIe, thus moving to a common location. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: s/iwlagn_txq_free_tfd/iwl_txq_free_tfdEmmanuel Grumbach2012-06-051-1/+1
| | | | | | | Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: fix the Transmit Frame Descriptor ringsEmmanuel Grumbach2012-05-251-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic that allows to have a short TFD queue was completely wrong. We do maintain 256 Transmit Frame Descriptors, but they point to recycled buffers. We used to attach and de-attach different TFDs for the same buffer and it worked since they pointed to the same buffer. Also zero the number of BDs after unmapping a TFD. This seems not necessary since we don't reclaim the same TFD twice, but I like housekeeping. This patch solves this warning: [ 6427.079855] WARNING: at lib/dma-debug.c:866 check_unmap+0x727/0x7a0() [ 6427.079859] Hardware name: Latitude E6410 [ 6427.079865] iwlwifi 0000:02:00.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x00000000296d393c] [size=8 bytes] [ 6427.079870] Modules linked in: ... [ 6427.079950] Pid: 6613, comm: ifconfig Tainted: G O 3.3.3 #5 [ 6427.079954] Call Trace: [ 6427.079963] [<c10337a2>] warn_slowpath_common+0x72/0xa0 [ 6427.079982] [<c1033873>] warn_slowpath_fmt+0x33/0x40 [ 6427.079988] [<c12dcb77>] check_unmap+0x727/0x7a0 [ 6427.079995] [<c12dcdaa>] debug_dma_unmap_page+0x5a/0x80 [ 6427.080024] [<fe2312ac>] iwlagn_unmap_tfd+0x12c/0x180 [iwlwifi] [ 6427.080048] [<fe231349>] iwlagn_txq_free_tfd+0x49/0xb0 [iwlwifi] [ 6427.080071] [<fe228e37>] iwl_tx_queue_unmap+0x67/0x90 [iwlwifi] [ 6427.080095] [<fe22d221>] iwl_trans_pcie_stop_device+0x341/0x7b0 [iwlwifi] [ 6427.080113] [<fe204b0e>] iwl_down+0x17e/0x260 [iwlwifi] [ 6427.080132] [<fe20efec>] iwlagn_mac_stop+0x6c/0xf0 [iwlwifi] [ 6427.080168] [<fd8480ce>] ieee80211_stop_device+0x5e/0x190 [mac80211] [ 6427.080198] [<fd833208>] ieee80211_do_stop+0x288/0x620 [mac80211] [ 6427.080243] [<fd8335b7>] ieee80211_stop+0x17/0x20 [mac80211] [ 6427.080250] [<c148dac1>] __dev_close_many+0x81/0xd0 [ 6427.080270] [<c148db3d>] __dev_close+0x2d/0x50 [ 6427.080276] [<c148d152>] __dev_change_flags+0x82/0x150 [ 6427.080282] [<c148e3e3>] dev_change_flags+0x23/0x60 [ 6427.080289] [<c14f6320>] devinet_ioctl+0x6a0/0x770 [ 6427.080296] [<c14f8705>] inet_ioctl+0x95/0xb0 [ 6427.080304] [<c147a0f0>] sock_ioctl+0x70/0x270 Cc: stable@vger.kernel.org Reported-by: Antonio Quartulli <ordex@autistici.org> Tested-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: don't init trans->reg_lock from the op_modeEmmanuel Grumbach2012-05-081-0/+1
| | | | | | | 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: clean up module parametersJohannes Berg2012-04-231-1/+0
| | | | | | | | | | | 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: use direct calls for transport freeJohannes Berg2012-04-231-4/+2
| | | | | | | | | | Since the transport allocates and frees itself in the transport specific code, there's no need for virtual functions for it. Remove the free method and call the correct functions directly. 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-231-0/+1
| | | | | | | | | 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: clean up iwl-shared.h includesJohannes Berg2012-04-231-0/+3
| | | | | | | | | | 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 debugfs logspamJohannes Berg2012-04-231-6/+3
| | | | | | | | | | | | | There really is no point in printing very verbose error messages when somebody tries to access a debugfs file before it is ready. Or even worse, printing verbose messages when memory allocation fails which *already* prints a huge warning. Remove all IWL_ERR messages from debugfs. 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-231-11/+26
| | | | | | | | | 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: check RF kill register when interrupts have been disabledEmmanuel Grumbach2012-04-231-0/+10
| | | | | | | | | Since the interrupts have been disabled, we may have missed an RF kill interrupt. Check the register to be sure the op_mode is in sync. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: enable RF kill interrupt in start_hwEmmanuel Grumbach2012-04-231-0/+3
| | | | | | | The op_mode wants to know about changes in HW RF kill state. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: first enable RF kill interrupt, then check registerEmmanuel Grumbach2012-04-231-9/+7
| | | | | | | This can solve a race (very unlikely to happen though). Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: make a static inline to read the RF kill registerEmmanuel Grumbach2012-04-231-6/+3
| | | | | Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: improve TX cache footprintJohannes Berg2012-04-181-46/+19
| | | | | | | | | | | | | | | | | | Having cmd[], meta[] and skbs[] as separate arrays in the TX queue structure is cache inefficient as we need the data for a given entry together. To improve this, create an array with these three members (allocate meta as part of that struct) so we have the data we need together located together improving cache footprint. The downside is that we need to allocate a lot of memory in one chunk, about 10KiB (on 64-bit) which isn't very efficient. 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-4/+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: transport holds its pointer to the configEmmanuel Grumbach2012-04-181-17/+19
| | | | | | | | | 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: remove get_cmd_stringJohannes Berg2012-04-161-0/+6
| | | | | | | | | | 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: move status definitions from iwl-sharedDon Fry2012-04-161-3/+3
| | | | | | | | The code has been changed, move the definitions to the proper file being used by the code. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: move HCMD_ACTIVE to transDon Fry2012-04-161-0/+6
| | | | | | | 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: split force_reset debugfs fileJohannes Berg2012-04-121-0/+16
| | | | | | | | | | | | | | | | | | 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: move queue watchdog into transportJohannes Berg2012-04-121-37/+40
| | | | | | | | | | | | | | | | | | | | | | | 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-121-3/+10
| | | | | | | | | | | | | | 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>
* Merge branch 'master' of ↵John W. Linville2012-04-121-9/+3
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * simple_open: automatically convert to simple_open()Stephen Boyd2012-04-051-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many users of debugfs copy the implementation of default_open() when they want to support a custom read/write function op. This leads to a proliferation of the default_open() implementation across the entire tree. Now that the common implementation has been consolidated into libfs we can replace all the users of this function with simple_open(). This replacement was done with the following semantic patch: <smpl> @ open @ identifier open_f != simple_open; identifier i, f; @@ -int open_f(struct inode *i, struct file *f) -{ ( -if (i->i_private) -f->private_data = i->i_private; | -f->private_data = i->i_private; ) -return 0; -} @ has_open depends on open @ identifier fops; identifier open.open_f; @@ struct file_operations fops = { ... -.open = open_f, +.open = simple_open, ... }; </smpl> [akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | iwlwifi: split POWER_PMI status bitDon Fry2012-04-091-0/+11
| | | | | | | | | | | | | | | | | | | | 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 ucode error log reporting to op_modeMeenakshi Venkataraman2012-04-091-40/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: move queue mapping out of transportJohannes Berg2012-04-091-184/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The queue mapping is not only dynamic, it is also dependent on the uCode, as we can already see today with the dual-mode and non-dual-mode being different. Move the queue mapping out of the transport layer and let the higher layer manage it. Part of the transport configuration is how to set up the queues. 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: process multiple frames per RXBJohannes Berg2012-04-091-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | The flow handler (hardware) can put multiple frames into a single RX buffer. To handle this, walk the RX buffer and check if there are multiple valid packets in it. To let the upper layer handle this correctly introduce rxb_offset() which is needed when we pass pages to mac80211 -- we need to know the offset into the page there. Also change the page handling scheme to use refcounting. Anyone who needs a page will "steal" it, which marks it as having been used & refcounts it. The RX handler then has to free its own reference and must not reuse the page. Finally, do not set the bit asking the FH to give us each packet in a single buffer. This really enables the feature. 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: change struct iwl_fwDavid Spinadel2012-03-121-15/+17
| | | | | | | | | | | | | | | 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: move wait_command_queue from shared to transMeenakshi Venkataraman2012-03-121-0/+3
| | | | | | | | | | | | | | This wait queue really belongs to the transport layer, as it is used for sending synchronous commands to the HW. However, only op_mode knows about errors and exceptional conditions, so make this queue accessible by the 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: abstract out missing SEQ_RX_FRAME workaroundJohannes Berg2012-03-121-0/+7
| | | | | | | | | | | | | | | | Mohammed Shafi ran into [1] the SEQ_RX_FRAME workaround warning with a statistics notification, this means we can't just remove it as we'd hoped. Abstract it out so that the higher layer can configure this as a kind of "filter" in the transport. [1] http://mid.gmane.org/CAD2nsn1_DzbRHuSbS_1rFNzuux_9pW1-pABEasQ01_y7-ndO5w@mail.gmail.com Reported-by: Mohammed Shafi <shafi.wireless@gmail.com> 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 TX hex debugJohannes Berg2012-03-121-2/+0
| | | | | | | | | | Tracing is much better for this, so remove the hex printk debug for the TX command. 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: fix the delta for remove max_txq_num patchWey-Yi Guy2012-03-091-12/+18
| | | | | | | | BIg portion of "iwlwifi: remove max_txq_num from hw_params" was missing during merge, here is the fix for it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: fix cmd_queue number mergeWey-Yi Guy2012-03-091-3/+3
| | | | | | | | | | | | | | iwlwifi: move command queue number out of the iwl_shared struct move the cmd_queue out of iwl_shared struct, but for some reason the patch is half done and fail compile Here is the fix John, could you apply this patch to wireless-next to address the issue Thanks Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: move command queue number out of the iwl_shared structMeenakshi Venkataraman2012-03-091-10/+24
| | | | | | | | | | | The command queue number is required by the transport layer, but it can be determined only by the op mode. Move this parameter to the dvm op mode, and configure the transport layer using an API. 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: remove messages from queue wake/stopJohannes Berg2012-03-081-2/+2
| | | | | | | | | | | The only reason we ever stop/wake queues at the transport level is now that they become full (or non-full), so the messages aren't useful any more -- remove 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: more status bit factoringDon Fry2012-03-081-3/+5
| | | | | | | | | 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-2/+0
| | | | | | | | | | 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: reintroduce iwl_enable_rfkill_intStanislaw Gruszka2012-03-081-5/+8
| | | | | | | | | | | | If device is disabled by rfkill switch, do not enable all interrupts, but only CSR_INT_BIT_RF_KILL to receive rfkill state change. Unblocking other interrupts might cause problems, since driver can not be prepared for receive them. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> 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: print DMA stop timeout error only if it happenedStanislaw Gruszka2012-03-081-3/+4
| | | | | | | | | | iwl_poll_direct_bit() return negative error value on timeout, positive values do not indicate an error. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> 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: use writeb,writel,readl directlyStanislaw Gruszka2012-03-081-7/+6
| | | | | | | | | | That change will save us some CPU cycles at run time. Having port-based I/O seems to be not possible for PCIe devices. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> 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: return error if loading uCode failedJohannes Berg2012-03-081-3/+1
| | | | | | | | | | | In "iwlwifi: consolidate the start_device flow" the code flow changed and the firmware is now loaded by the transport layer, but the change unfortunately lost error checking -- restore. 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: redesign PASSIVE_NO_RX workaroundJohannes Berg2012-03-081-34/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The PASSIVE_NO_RX workaround currently crosses through the op_mode and transport layers, which is a bit odd. This also isn't necessary, if the transport simply reports when queues are full (or no longer full) the op_mode can keep track of this state, and report to mac80211 only what *it* thinks is appropriate. What is appropriate can then be based on whether queues should be stopped to wait for RX or not. This significantly simplifies the transport API, it no longer needs to expose anything to stop a queue, nor to wake "any" queue, this can all be handled in the upper layer completely. Also simplify the handling to not be dependent on the context, that makes little sense as the queues are shared and both contexts have to be on the same channel anyway. 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 nic_configJohannes Berg2012-03-071-1/+1
| | | | | | | | | The nic_config sets uCode dependent register bits, so it must be virtual in the op_mode. 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 irq to PCIeJohannes Berg2012-03-071-6/+6
| | | | | | | | | | | Even if the variable might also be used by other transports, there's no need for anything outside of the transport itself to access it, so move it into the private area. 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>
OpenPOWER on IntegriCloud