aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-op-mode.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-11-18iwlwifi: move under intel vendor directoryKalle Valo1-271/+0
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-10-05iwlwifi: op-mode API: add rx_rss methodJohannes Berg1-1/+18
Upcoming hardware will have the ability to do L3 hashing for RSS, directing data packets (and perhaps some associated metadata and management notifications) to different MSI-X vectors. In this case, it makes no sense to go through the full RX dispatch since it's already known that only a subset of the possibilities can come in, requiring a new receive method. In addition this must know which queue the packet was received on. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-08-16iwlwifi: pass NAPI struct from transport layerJohannes Berg1-22/+4
The mac80211 patch to pass the NAPI struct only changed iwlwifi to store the NAPI struct, but we can do better: pass it directly from the lower transport layer to the opmode during RX, and then on to mac80211 from there. When we add multiple RX queues, we can then pass the appropriate NAPI struct properly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-04iwlwifi: remove command and return value from opmode RXJohannes Berg1-6/+4
With the previous patch series, no opmode continues using the command or handler_status (i.e. the return value from the RX) so it can be removed now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-02iwlwifi: fix spelling errorsSara Sharon1-2/+2
Fix spelling error across the driver. Modified only comments and prints. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-11iwlwifi: mvm/trans: abort d0i3_enter in case of held refEliad Peller1-1/+2
Other contexts might call iwl_mvm_ref_sync() right before we set IWL_MVM_STATUS_IN_D0I3, and then assume the fw/bus is not in d0i3 state. However, since we currently don't check for held references in the d0i3_enter flow, we might enter d0i3 although there is an active reference. Solve it by aborting the d0i3 enter flow if there is an active reference. Since users are assumed to use iwl_mvm_ref_sync, which takes a ref before checking the flag, we don't need further locking. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03iwlwifi: add Intel Mobile Communications copyrightJohannes Berg1-0/+2
Our legal structure changed at some point (see wikipedia), but we forgot to immediately switch over to the new copyright notice. For files that we have modified in the time since the change, add the proper copyright notice now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13iwlwifi: pcie: implement GRO without NAPIJohannes Berg1-3/+22
Use the new NAPI infrastructure added to mac80211 to get GRO. We don't really implement NAPI since we don't have a real poll function and we never schedule a NAPI poll. Instead of this, we collect all the packets we got from a single interrupt and then call napi_gro_flush(). This allows us to benefit from GRO. In half duplex medium like WiFi, its main advantage is that it reduces the number of TCP Acks, hence improving the TCP Rx performance. Since we call the Rx path with a spinlock held, remove the might_sleep mention from the op_mode's API. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Ido Yariv <ido@wizery.com> [Squash different patches and rewrite the commit message] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-03-09iwlwifi: return whether to stop from rfkill methodJohannes Berg1-5/+6
When indicating RF-kill toggle to the higher layer, that may in turn call back to the transport (for MVM at least) to turn off the device quickly. Instead of that, allow it to return whether or not the device should be turned off, this gets rid of the call indirection and will help make the API more consistent when we go back to non-threaded interrupts again for PCIe. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-03iwlwifi: fix kerneldoc formatEmmanuel Grumbach1-1/+1
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-03iwlwifi: add enter/exit D0i3 opsEliad Peller1-0/+22
Add new enter_d0i3 and exit_d0i3 ops that will be called by the transport on D0i3 enter/exit. Each one of these ops will include the host commands mentionned in the previous patch. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-31iwlwifi: Update Copyright to 2014Emmanuel Grumbach1-2/+2
Happy new year! Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-17iwlwifi: remove pointer to transport from op_modeEmmanuel Grumbach1-3/+1
This pointer was not used anywhere. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-08-06iwlwifi: fix some documentation typosEliad Peller1-2/+2
Fix some typos. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-06iwlwifi: a few fixes in licenseEmmanuel Grumbach1-1/+1
7000.c was released as GPL only by mistake: it should be dual licensed - GPL / BSD. The file that contains the license in the kernel is COPYING and not LICENSE.GPL. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-05iwlwifi: use threaded interrupt handlerJohannes Berg1-4/+6
With new transports coming up, move to threaded interrupt handling now. This has the advantage that we can use the same locking scheme with all different transports we may need to implement. Note that the TX path obviously still runs in a tasklet, so some spin_lock() calls need to change to spin_lock_bh() calls to properly lock out the TX path. In my test on a Calpella platform this has no impact on throughput or latency. Also add lockdep annotations to avoid lockups due to catch sending synchronous commands or using locks that connect with them from the irq thread. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-24iwlwifi: include debugfs.hJohannes Berg1-0/+2
The iwl-op-mode.h file uses a struct dentry for debugfs so should include debugfs.h. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-24iwlwifi: update copyrightJohannes Berg1-2/+2
Update Copyright notices to 2013. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-07-26iwlwifi: rework the iwlwifi debugfs structureMeenakshi Venkataraman1-1/+2
The generic part of the driver now creates all debugfs directories. It creates a root directory directly in the the root of the debugfs filesystem and within that directories for each device, named after the device ID of the devices iwlwifi is attached to. In the cfg80211/mac80211 directory there's now a link to the toplevel iwlwifi debugfs directory to make it easier to find the debugfs files. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-18iwlwifi: comment context requirements of the op_modeEmmanuel Grumbach1-7/+9
A few op_mode of the op_mode API functions have requirements on the running context of the caller. Document that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06iwlwifi: remove extern opmode ops declarationsJohannes Berg1-5/+0
There's no need to declare the opmode ops as extern since they're now dynamically registered. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-05iwlwifi: implement dynamic opmode loadingDon Fry1-0/+3
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>
2012-04-18iwlwifi: Added foreward declaration for iwl_cfg in op_modeDavid Spinadel1-0/+1
Please merge this with "iwlwifi: op_mode holds its pointer to the config" Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-18iwlwifi: op_mode holds its pointer to the configEmmanuel Grumbach1-0/+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>
2012-04-16iwlwifi: complete STATUS_READY refactoringDon Fry1-0/+7
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>
2012-04-09iwlwifi: move queue mapping out of transportJohannes Berg1-8/+9
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>
2012-03-07iwlwifi: virtualize nic_configJohannes Berg1-0/+9
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>
2012-03-07iwlwifi: virtualize command queue full behaviourJohannes Berg1-0/+7
When the command queue is full, the transport will return -ENOSPC, but the reaction to that depends on the op_mode. Virtualize that, the DVM op_mode checks for CT-kill and restarts the hardware otherwise. We may be able to get rid of this callback by putting the behaviour check into the wrapper but that needs more careful evaluation. 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>
2012-03-07iwlwifi: split out firmware storeJohannes Berg1-1/+3
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>
2012-03-06iwlwifi: don't pass iwl_rx_mem_buffer to upper layersJohannes Berg1-3/+3
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>
2012-02-27iwlwifi: document the operational modeEmmanuel Grumbach1-2/+34
Also add a might_sleep to enforce the context requirements. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-27iwlwifi: virtualize op_mode's fw_errorEmmanuel Grumbach1-0/+7
Export it as "nic_error" notification, the error handling will be in the op_mode. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-27iwlwifi: virtualize op_mode's set_hw_rf_killEmmanuel Grumbach1-0/+9
Export it as "hw_rf_kill" notification. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-27iwlwifi: virtualize op_mode's stop/start queueEmmanuel Grumbach1-0/+17
Export them as "queue_full" and "queue_not_full" notification. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-27iwlwifi: virtualize op_mode's rxEmmanuel Grumbach1-0/+13
This is the op_mode's Rx handler. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-27iwlwifi: virtualize op_mode's free skbEmmanuel Grumbach1-0/+12
This handler allows the transport layer to free an skb from the op_mode. This can happen when the driver is stopped while Tx packets are pending in the transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-27iwlwifi: virtualize the op_modeEmmanuel Grumbach1-0/+108
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>