diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-05-05 10:22:49 +0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-14 16:29:46 -0400 |
commit | d67f5489d8d9be09bc8e1615ec6c57c3120a731d (patch) | |
tree | 35f3734ec1707ff2d70db32227eaaa7eb50e4293 /drivers/net/wireless/iwlwifi/iwl-5000.c | |
parent | 5ec0397679f1c1606199cfd6f3e24351891c60c3 (diff) | |
download | blackbird-op-linux-d67f5489d8d9be09bc8e1615ec6c57c3120a731d.tar.gz blackbird-op-linux-d67f5489d8d9be09bc8e1615ec6c57c3120a731d.zip |
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.c | 9 |
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) memset(priv->shared_virt, 0, sizeof(struct iwl5000_shared)); + priv->rb_closed_offset = offsetof(struct iwl5000_shared, rb_closed); + return 0; } @@ -374,6 +376,12 @@ static void iwl5000_free_shared_mem(struct iwl_priv *priv) priv->shared_phys); } +static int iwl5000_shared_mem_rx_idx(struct iwl_priv *priv) +{ + struct iwl5000_shared *s = priv->shared_virt; + return le32_to_cpu(s->rb_closed) & 0xFFF; +} + /** * iwl5000_txq_update_byte_cnt_tbl - Set up entry in Tx byte-count array */ @@ -466,6 +474,7 @@ static struct iwl_lib_ops iwl5000_lib = { .set_hw_params = iwl5000_hw_set_hw_params, .alloc_shared_mem = iwl5000_alloc_shared_mem, .free_shared_mem = iwl5000_free_shared_mem, + .shared_mem_rx_idx = iwl5000_shared_mem_rx_idx, .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, .disable_tx_fifo = iwl5000_disable_tx_fifo, .apm_ops = { |