aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-5000.c
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2008-05-04 22:22:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-14 16:29:46 -0400
commitd67f5489d8d9be09bc8e1615ec6c57c3120a731d (patch)
tree35f3734ec1707ff2d70db32227eaaa7eb50e4293 /drivers/net/wireless/iwlwifi/iwl-5000.c
parent5ec0397679f1c1606199cfd6f3e24351891c60c3 (diff)
iwlwifi: handle shared memory Rx index access
This patch splits ucode's and driver's shared memory Rx index access to match 4965 and 5000 offsets. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index feffcafe1495..d6b91f7e0b1b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -362,6 +362,8 @@ static int iwl5000_alloc_shared_mem(struct iwl_priv *priv)
362 362
363 memset(priv->shared_virt, 0, sizeof(struct iwl5000_shared)); 363 memset(priv->shared_virt, 0, sizeof(struct iwl5000_shared));
364 364
365 priv->rb_closed_offset = offsetof(struct iwl5000_shared, rb_closed);
366
365 return 0; 367 return 0;
366} 368}
367 369
@@ -374,6 +376,12 @@ static void iwl5000_free_shared_mem(struct iwl_priv *priv)
374 priv->shared_phys); 376 priv->shared_phys);
375} 377}
376 378
379static int iwl5000_shared_mem_rx_idx(struct iwl_priv *priv)
380{
381 struct iwl5000_shared *s = priv->shared_virt;
382 return le32_to_cpu(s->rb_closed) & 0xFFF;
383}
384
377/** 385/**
378 * iwl5000_txq_update_byte_cnt_tbl - Set up entry in Tx byte-count array 386 * iwl5000_txq_update_byte_cnt_tbl - Set up entry in Tx byte-count array
379 */ 387 */
@@ -466,6 +474,7 @@ static struct iwl_lib_ops iwl5000_lib = {
466 .set_hw_params = iwl5000_hw_set_hw_params, 474 .set_hw_params = iwl5000_hw_set_hw_params,
467 .alloc_shared_mem = iwl5000_alloc_shared_mem, 475 .alloc_shared_mem = iwl5000_alloc_shared_mem,
468 .free_shared_mem = iwl5000_free_shared_mem, 476 .free_shared_mem = iwl5000_free_shared_mem,
477 .shared_mem_rx_idx = iwl5000_shared_mem_rx_idx,
469 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, 478 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
470 .disable_tx_fifo = iwl5000_disable_tx_fifo, 479 .disable_tx_fifo = iwl5000_disable_tx_fifo,
471 .apm_ops = { 480 .apm_ops = {