aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-5000.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-05-29 04:35:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-03 15:00:25 -0400
commit972cf447d20df30dbd74edfc00ae179c4b822c68 (patch)
treec5daa3264a16a2fc5d44ebbdd3f1c97e9dccfcad /drivers/net/wireless/iwlwifi/iwl-5000.c
parent17b889290a184b52ee394c31dd5a52b8c1b3456d (diff)
iwlwifi: implement txq invalidate byte count table
This is required to overcome a bug in 5000 HW byte count table. Signed-off-by: Tomas Winkler <tomas.winkler@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.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index dc9f3b683795..6a10526d939b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -955,6 +955,26 @@ static void iwl5000_txq_update_byte_cnt_tbl(struct iwl_priv *priv,
955 } 955 }
956} 956}
957 957
958static void iwl5000_txq_inval_byte_cnt_tbl(struct iwl_priv *priv,
959 struct iwl_tx_queue *txq)
960{
961 int txq_id = txq->q.id;
962 struct iwl5000_shared *shared_data = priv->shared_virt;
963 u8 sta = 0;
964
965 if (txq_id != IWL_CMD_QUEUE_NUM)
966 sta = txq->cmd[txq->q.read_ptr].cmd.tx.sta_id;
967
968 shared_data->queues_byte_cnt_tbls[txq_id].tfd_offset[txq->q.read_ptr].
969 val = cpu_to_le16(1 | (sta << 12));
970
971 if (txq->q.write_ptr < IWL50_MAX_WIN_SIZE) {
972 shared_data->queues_byte_cnt_tbls[txq_id].
973 tfd_offset[IWL50_QUEUE_SIZE + txq->q.read_ptr].
974 val = cpu_to_le16(1 | (sta << 12));
975 }
976}
977
958static u16 iwl5000_build_addsta_hcmd(const struct iwl_addsta_cmd *cmd, u8 *data) 978static u16 iwl5000_build_addsta_hcmd(const struct iwl_addsta_cmd *cmd, u8 *data)
959{ 979{
960 u16 size = (u16)sizeof(struct iwl_addsta_cmd); 980 u16 size = (u16)sizeof(struct iwl_addsta_cmd);
@@ -1248,6 +1268,7 @@ static struct iwl_lib_ops iwl5000_lib = {
1248 .free_shared_mem = iwl5000_free_shared_mem, 1268 .free_shared_mem = iwl5000_free_shared_mem,
1249 .shared_mem_rx_idx = iwl5000_shared_mem_rx_idx, 1269 .shared_mem_rx_idx = iwl5000_shared_mem_rx_idx,
1250 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, 1270 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
1271 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
1251 .txq_set_sched = iwl5000_txq_set_sched, 1272 .txq_set_sched = iwl5000_txq_set_sched,
1252 .rx_handler_setup = iwl5000_rx_handler_setup, 1273 .rx_handler_setup = iwl5000_rx_handler_setup,
1253 .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr, 1274 .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,