iwlwifi: configure transport layer from dvm op mode
Introduce the iwl_trans_config struct which contains state variables that only the op mode can determine, but which the transport layer needs to know. 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>
This commit is contained in:
parent
3251715dc5
commit
92d743ae10
|
@ -1185,6 +1185,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
|
||||||
struct iwl_op_mode *op_mode;
|
struct iwl_op_mode *op_mode;
|
||||||
u16 num_mac;
|
u16 num_mac;
|
||||||
u32 ucode_flags;
|
u32 ucode_flags;
|
||||||
|
struct iwl_trans_config trans_cfg;
|
||||||
|
|
||||||
/************************
|
/************************
|
||||||
* 1. Allocating HW data
|
* 1. Allocating HW data
|
||||||
|
@ -1205,7 +1206,14 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
|
||||||
/* TODO: remove fw from shared data later */
|
/* TODO: remove fw from shared data later */
|
||||||
priv->shrd->fw = fw;
|
priv->shrd->fw = fw;
|
||||||
|
|
||||||
iwl_trans_configure(trans(priv), op_mode);
|
/*
|
||||||
|
* Populate the state variables that the transport layer needs
|
||||||
|
* to know about.
|
||||||
|
*/
|
||||||
|
trans_cfg.op_mode = op_mode;
|
||||||
|
|
||||||
|
/* Configure transport layer */
|
||||||
|
iwl_trans_configure(trans(priv), &trans_cfg);
|
||||||
|
|
||||||
/* At this point both hw and priv are allocated. */
|
/* At this point both hw and priv are allocated. */
|
||||||
|
|
||||||
|
|
|
@ -274,6 +274,16 @@ static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct iwl_trans_config - transport configuration
|
||||||
|
*
|
||||||
|
* @op_mode: pointer to the upper layer.
|
||||||
|
* Must be set before any other call.
|
||||||
|
*/
|
||||||
|
struct iwl_trans_config {
|
||||||
|
struct iwl_op_mode *op_mode;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct iwl_trans_ops - transport specific operations
|
* struct iwl_trans_ops - transport specific operations
|
||||||
*
|
*
|
||||||
|
@ -408,13 +418,13 @@ struct iwl_trans {
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void iwl_trans_configure(struct iwl_trans *trans,
|
static inline void iwl_trans_configure(struct iwl_trans *trans,
|
||||||
struct iwl_op_mode *op_mode)
|
const struct iwl_trans_config *trans_cfg)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* only set the op_mode for the moment. Later on, this function will do
|
* only set the op_mode for the moment. Later on, this function will do
|
||||||
* more
|
* more
|
||||||
*/
|
*/
|
||||||
trans->op_mode = op_mode;
|
trans->op_mode = trans_cfg->op_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int iwl_trans_start_hw(struct iwl_trans *trans)
|
static inline int iwl_trans_start_hw(struct iwl_trans *trans)
|
||||||
|
|
Loading…
Reference in a new issue