aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans.h
diff options
context:
space:
mode:
authorMeenakshi Venkataraman <meenakshi.venkataraman@intel.com>2012-03-08 14:29:12 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-09 11:32:58 -0500
commitc6f600fcfe8a7e4f594fc4c80b2c7b66f248958b (patch)
treed96a59fa8cfd31fe94ff22fe2708c5bdeeadbc26 /drivers/net/wireless/iwlwifi/iwl-trans.h
parent8763848e03a9098e5b6f81428a98738dc960a436 (diff)
iwlwifi: move command queue number out of the iwl_shared struct
The command queue number is required by the transport layer, but it can be determined only by the op mode. Move this parameter to the dvm op mode, and configure the transport layer using an API. 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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index b6fd42779624..a40c2726c190 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -279,9 +279,12 @@ static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r)
279 * 279 *
280 * @op_mode: pointer to the upper layer. 280 * @op_mode: pointer to the upper layer.
281 * Must be set before any other call. 281 * Must be set before any other call.
282 * @cmd_queue: the index of the command queue.
283 * Must be set before start_fw.
282 */ 284 */
283struct iwl_trans_config { 285struct iwl_trans_config {
284 struct iwl_op_mode *op_mode; 286 struct iwl_op_mode *op_mode;
287 u8 cmd_queue;
285}; 288};
286 289
287/** 290/**
@@ -331,6 +334,8 @@ struct iwl_trans_config {
331 * @write8: write a u8 to a register at offset ofs from the BAR 334 * @write8: write a u8 to a register at offset ofs from the BAR
332 * @write32: write a u32 to a register at offset ofs from the BAR 335 * @write32: write a u32 to a register at offset ofs from the BAR
333 * @read32: read a u32 register at offset ofs from the BAR 336 * @read32: read a u32 register at offset ofs from the BAR
337 * @configure: configure parameters required by the transport layer from
338 * the op_mode.
334 */ 339 */
335struct iwl_trans_ops { 340struct iwl_trans_ops {
336 341
@@ -370,6 +375,8 @@ struct iwl_trans_ops {
370 void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val); 375 void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val);
371 void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val); 376 void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val);
372 u32 (*read32)(struct iwl_trans *trans, u32 ofs); 377 u32 (*read32)(struct iwl_trans *trans, u32 ofs);
378 void (*configure)(struct iwl_trans *trans,
379 const struct iwl_trans_config *trans_cfg);
373}; 380};
374 381
375/** 382/**
@@ -425,6 +432,8 @@ static inline void iwl_trans_configure(struct iwl_trans *trans,
425 * more 432 * more
426 */ 433 */
427 trans->op_mode = trans_cfg->op_mode; 434 trans->op_mode = trans_cfg->op_mode;
435
436 trans->ops->configure(trans, trans_cfg);
428} 437}
429 438
430static inline int iwl_trans_start_hw(struct iwl_trans *trans) 439static inline int iwl_trans_start_hw(struct iwl_trans *trans)