aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-op-mode.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-27 15:43:48 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-05 08:39:12 -0500
commit2bfb50924c7e92362ac937aef2ab56bc7bd3ca52 (patch)
tree26518070c19eb9cfb38ab48cda31fe16c1235433 /drivers/net/wireless/iwlwifi/iwl-op-mode.h
parentc9f7a8ab7792b48259af6e94706a5d02dd74caef (diff)
iwlwifi: use threaded interrupt handler
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-op-mode.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-op-mode.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/iwlwifi/iwl-op-mode.h
index dc792584f401..4a680019e117 100644
--- a/drivers/net/wireless/iwlwifi/iwl-op-mode.h
+++ b/drivers/net/wireless/iwlwifi/iwl-op-mode.h
@@ -113,13 +113,13 @@ struct iwl_cfg;
113 * May sleep 113 * May sleep
114 * @rx: Rx notification to the op_mode. rxb is the Rx buffer itself. Cmd is the 114 * @rx: Rx notification to the op_mode. rxb is the Rx buffer itself. Cmd is the
115 * HCMD the this Rx responds to. 115 * HCMD the this Rx responds to.
116 * Must be atomic and called with BH disabled. 116 * This callback may sleep, it is called from a threaded IRQ handler.
117 * @queue_full: notifies that a HW queue is full. 117 * @queue_full: notifies that a HW queue is full.
118 * Must be atomic and called with BH disabled. 118 * Must be atomic and called with BH disabled.
119 * @queue_not_full: notifies that a HW queue is not full any more. 119 * @queue_not_full: notifies that a HW queue is not full any more.
120 * Must be atomic and called with BH disabled. 120 * Must be atomic and called with BH disabled.
121 * @hw_rf_kill:notifies of a change in the HW rf kill switch. True means that 121 * @hw_rf_kill:notifies of a change in the HW rf kill switch. True means that
122 * the radio is killed. Must be atomic. 122 * the radio is killed. May sleep.
123 * @free_skb: allows the transport layer to free skbs that haven't been 123 * @free_skb: allows the transport layer to free skbs that haven't been
124 * reclaimed by the op_mode. This can happen when the driver is freed and 124 * reclaimed by the op_mode. This can happen when the driver is freed and
125 * there are Tx packets pending in the transport layer. 125 * there are Tx packets pending in the transport layer.
@@ -130,8 +130,7 @@ struct iwl_cfg;
130 * called with BH disabled. 130 * called with BH disabled.
131 * @nic_config: configure NIC, called before firmware is started. 131 * @nic_config: configure NIC, called before firmware is started.
132 * May sleep 132 * May sleep
133 * @wimax_active: invoked when WiMax becomes active. Must be atomic and called 133 * @wimax_active: invoked when WiMax becomes active. May sleep
134 * with BH disabled.
135 */ 134 */
136struct iwl_op_mode_ops { 135struct iwl_op_mode_ops {
137 struct iwl_op_mode *(*start)(struct iwl_trans *trans, 136 struct iwl_op_mode *(*start)(struct iwl_trans *trans,
@@ -178,6 +177,7 @@ static inline int iwl_op_mode_rx(struct iwl_op_mode *op_mode,
178 struct iwl_rx_cmd_buffer *rxb, 177 struct iwl_rx_cmd_buffer *rxb,
179 struct iwl_device_cmd *cmd) 178 struct iwl_device_cmd *cmd)
180{ 179{
180 might_sleep();
181 return op_mode->ops->rx(op_mode, rxb, cmd); 181 return op_mode->ops->rx(op_mode, rxb, cmd);
182} 182}
183 183
@@ -196,6 +196,7 @@ static inline void iwl_op_mode_queue_not_full(struct iwl_op_mode *op_mode,
196static inline void iwl_op_mode_hw_rf_kill(struct iwl_op_mode *op_mode, 196static inline void iwl_op_mode_hw_rf_kill(struct iwl_op_mode *op_mode,
197 bool state) 197 bool state)
198{ 198{
199 might_sleep();
199 op_mode->ops->hw_rf_kill(op_mode, state); 200 op_mode->ops->hw_rf_kill(op_mode, state);
200} 201}
201 202
@@ -223,6 +224,7 @@ static inline void iwl_op_mode_nic_config(struct iwl_op_mode *op_mode)
223 224
224static inline void iwl_op_mode_wimax_active(struct iwl_op_mode *op_mode) 225static inline void iwl_op_mode_wimax_active(struct iwl_op_mode *op_mode)
225{ 226{
227 might_sleep();
226 op_mode->ops->wimax_active(op_mode); 228 op_mode->ops->wimax_active(op_mode);
227} 229}
228 230