Lines Matching refs:op_mode
25 * The operational mode (a.k.a. op_mode) is the layer that implements
27 * the transport API to access the HW. The op_mode doesn't need to know how the
30 * There can be several op_mode: i.e. different fw APIs will require two
31 * different op_modes. This is why the op_mode is virtualized.
39 * 1) The driver layer (iwl-drv.c) chooses the op_mode based on the
41 * 2) The driver layer starts the op_mode (ops->start)
42 * 3) The op_mode registers mac80211
43 * 4) The op_mode is governed by mac80211
44 * 5) The driver layer stops the op_mode
48 * struct iwl_op_mode_ops - op_mode specific operations
50 * The op_mode exports its ops so that external components can start it and
57 * @start: start the op_mode. The transport layer is already allocated.
59 * @stop: stop the op_mode. Must free all the memory allocated.
61 * @rx: Rx notification to the op_mode. rxb is the Rx buffer itself. Cmd is the
63 * @rx_rss: data queue RX notification to the op_mode, for (data) notifications
77 * reclaimed by the op_mode. This can happen when the driver is freed and
98 void (*stop)(struct iwl_op_mode *op_mode);
99 void (*rx)(struct iwl_op_mode *op_mode, struct napi_struct *napi,
101 void (*rx_rss)(struct iwl_op_mode *op_mode, struct napi_struct *napi,
103 void (*queue_full)(struct iwl_op_mode *op_mode, int queue);
104 void (*queue_not_full)(struct iwl_op_mode *op_mode, int queue);
105 bool (*hw_rf_kill)(struct iwl_op_mode *op_mode, bool state);
106 void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb);
107 void (*nic_error)(struct iwl_op_mode *op_mode, bool sync);
108 void (*cmd_queue_full)(struct iwl_op_mode *op_mode);
109 void (*nic_config)(struct iwl_op_mode *op_mode);
110 void (*wimax_active)(struct iwl_op_mode *op_mode);
111 void (*time_point)(struct iwl_op_mode *op_mode,
114 void (*device_powered_off)(struct iwl_op_mode *op_mode);
132 static inline void iwl_op_mode_stop(struct iwl_op_mode *op_mode)
135 op_mode->ops->stop(op_mode);
138 static inline void iwl_op_mode_rx(struct iwl_op_mode *op_mode,
142 return op_mode->ops->rx(op_mode, napi, rxb);
145 static inline void iwl_op_mode_rx_rss(struct iwl_op_mode *op_mode,
150 op_mode->ops->rx_rss(op_mode, napi, rxb, queue);
153 static inline void iwl_op_mode_queue_full(struct iwl_op_mode *op_mode,
156 op_mode->ops->queue_full(op_mode, queue);
159 static inline void iwl_op_mode_queue_not_full(struct iwl_op_mode *op_mode,
162 op_mode->ops->queue_not_full(op_mode, queue);
166 iwl_op_mode_hw_rf_kill(struct iwl_op_mode *op_mode, bool state)
169 return op_mode->ops->hw_rf_kill(op_mode, state);
172 static inline void iwl_op_mode_free_skb(struct iwl_op_mode *op_mode,
175 if (WARN_ON_ONCE(!op_mode))
177 op_mode->ops->free_skb(op_mode, skb);
180 static inline void iwl_op_mode_nic_error(struct iwl_op_mode *op_mode, bool sync)
182 op_mode->ops->nic_error(op_mode, sync);
185 static inline void iwl_op_mode_cmd_queue_full(struct iwl_op_mode *op_mode)
187 op_mode->ops->cmd_queue_full(op_mode);
190 static inline void iwl_op_mode_nic_config(struct iwl_op_mode *op_mode)
193 if (op_mode->ops->nic_config)
194 op_mode->ops->nic_config(op_mode);
197 static inline void iwl_op_mode_wimax_active(struct iwl_op_mode *op_mode)
200 op_mode->ops->wimax_active(op_mode);
203 static inline void iwl_op_mode_time_point(struct iwl_op_mode *op_mode,
207 if (!op_mode || !op_mode->ops || !op_mode->ops->time_point)
209 op_mode->ops->time_point(op_mode, tp_id, tp_data);
212 static inline void iwl_op_mode_device_powered_off(struct iwl_op_mode *op_mode)
214 if (!op_mode || !op_mode->ops || !op_mode->ops->device_powered_off)
216 op_mode->ops->device_powered_off(op_mode);