Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291318
b: refs/heads/master
c: 92d743a
h: refs/heads/master
v: v3
  • Loading branch information
Meenakshi Venkataraman authored and John W. Linville committed Mar 8, 2012
1 parent 542d102 commit 9fcc486
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3251715dc51a8cbd2cd030ff94fe36f37b4b9e74
refs/heads/master: 92d743ae105314a865b3fca9128da11525d22203
10 changes: 9 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
struct iwl_op_mode *op_mode;
u16 num_mac;
u32 ucode_flags;
struct iwl_trans_config trans_cfg;

/************************
* 1. Allocating HW data
Expand All @@ -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 */
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. */

Expand Down
14 changes: 12 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,16 @@ static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r)
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
*
Expand Down Expand Up @@ -408,13 +418,13 @@ struct iwl_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
* more
*/
trans->op_mode = op_mode;
trans->op_mode = trans_cfg->op_mode;
}

static inline int iwl_trans_start_hw(struct iwl_trans *trans)
Expand Down

0 comments on commit 9fcc486

Please sign in to comment.