Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
iwl_op_mode_ops Struct Reference

#include <iwl-op-mode.h>

Data Fields

struct iwl_op_mode *(* start )(struct iwl_trans *trans, const struct iwl_cfg *cfg, const struct iwl_fw *fw, struct dentry *dbgfs_dir)
 
void(* stop )(struct iwl_op_mode *op_mode)
 
int(* rx )(struct iwl_op_mode *op_mode, struct iwl_rx_cmd_buffer *rxb, struct iwl_device_cmd *cmd)
 
void(* queue_full )(struct iwl_op_mode *op_mode, int queue)
 
void(* queue_not_full )(struct iwl_op_mode *op_mode, int queue)
 
void(* hw_rf_kill )(struct iwl_op_mode *op_mode, bool state)
 
void(* free_skb )(struct iwl_op_mode *op_mode, struct sk_buff *skb)
 
void(* nic_error )(struct iwl_op_mode *op_mode)
 
void(* cmd_queue_full )(struct iwl_op_mode *op_mode)
 
void(* nic_config )(struct iwl_op_mode *op_mode)
 
void(* wimax_active )(struct iwl_op_mode *op_mode)
 

Detailed Description

DOC: Operational mode - what is it ?

The operational mode (a.k.a. op_mode) is the layer that implements mac80211's handlers. It knows two APIs: mac80211's and the fw's. It uses the transport API to access the HW. The op_mode doesn't need to know how the underlying HW works, since the transport layer takes care of that.

There can be several op_mode: i.e. different fw APIs will require two different op_modes. This is why the op_mode is virtualized. DOC: Life cycle of the Operational mode

The operational mode has a very simple life cycle.

1) The driver layer (iwl-drv.c) chooses the op_mode based on the capabilities advertized by the fw file (in TLV format). 2) The driver layer starts the op_mode (ops->start) 3) The op_mode registers registers mac80211 4) The op_mode is governed by mac80211 5) The driver layer stops the op_mode struct iwl_op_mode_ops - op_mode specific operations

The op_mode exports its ops so that external components can start it and interact with it. The driver layer typically calls the start and stop handlers, the transport layer calls the others.

All the handlers MUST be implemented

: start the op_mode. The transport layer is already allocated. May sleep : stop the op_mode. Must free all the memory allocated. May sleep : Rx notification to the op_mode. rxb is the Rx buffer itself. Cmd is the HCMD the this Rx responds to. Must be atomic and called with BH disabled. : notifies that a HW queue is full. Must be atomic and called with BH disabled. : notifies that a HW queue is not full any more. Must be atomic and called with BH disabled. :notifies of a change in the HW rf kill switch. True means that the radio is killed. Must be atomic. : allows the transport layer to free skbs that haven't been reclaimed by the op_mode. This can happen when the driver is freed and there are Tx packets pending in the transport layer. Must be atomic : error notification. Must be atomic and must be called with BH disabled. : Called when the command queue gets full. Must be atomic and called with BH disabled. : configure NIC, called before firmware is started. May sleep : invoked when WiMax becomes active. Must be atomic and called with BH disabled.

Definition at line 134 of file iwl-op-mode.h.

Field Documentation

void(* cmd_queue_full)(struct iwl_op_mode *op_mode)

Definition at line 147 of file iwl-op-mode.h.

void(* free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb)

Definition at line 145 of file iwl-op-mode.h.

void(* hw_rf_kill)(struct iwl_op_mode *op_mode, bool state)

Definition at line 144 of file iwl-op-mode.h.

void(* nic_config)(struct iwl_op_mode *op_mode)

Definition at line 148 of file iwl-op-mode.h.

void(* nic_error)(struct iwl_op_mode *op_mode)

Definition at line 146 of file iwl-op-mode.h.

void(* queue_full)(struct iwl_op_mode *op_mode, int queue)

Definition at line 142 of file iwl-op-mode.h.

void(* queue_not_full)(struct iwl_op_mode *op_mode, int queue)

Definition at line 143 of file iwl-op-mode.h.

Definition at line 140 of file iwl-op-mode.h.

Definition at line 135 of file iwl-op-mode.h.

void(* stop)(struct iwl_op_mode *op_mode)

Definition at line 139 of file iwl-op-mode.h.

void(* wimax_active)(struct iwl_op_mode *op_mode)

Definition at line 149 of file iwl-op-mode.h.


The documentation for this struct was generated from the following file: