提交 8ce1ef4a 编写于 作者: W Wey-Yi Guy 提交者: John W. Linville

iwlwifi: fix bug in tx byte count table

When setting invalid byte count in txq byte count table, read pointer
should be used instead of write pointer.
Reported-by: NGuo, Chaohong <chaohong.guo@intel.com>
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: NZhu Yi <yi.zhu@intel.com>
Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 c15867f1
...@@ -781,7 +781,7 @@ void iwl5000_txq_update_byte_cnt_tbl(struct iwl_priv *priv, ...@@ -781,7 +781,7 @@ void iwl5000_txq_update_byte_cnt_tbl(struct iwl_priv *priv,
scd_bc_tbl[txq_id].tfd_offset[write_ptr] = bc_ent; scd_bc_tbl[txq_id].tfd_offset[write_ptr] = bc_ent;
if (txq->q.write_ptr < TFD_QUEUE_SIZE_BC_DUP) if (write_ptr < TFD_QUEUE_SIZE_BC_DUP)
scd_bc_tbl[txq_id]. scd_bc_tbl[txq_id].
tfd_offset[TFD_QUEUE_SIZE_MAX + write_ptr] = bc_ent; tfd_offset[TFD_QUEUE_SIZE_MAX + write_ptr] = bc_ent;
} }
...@@ -803,7 +803,7 @@ void iwl5000_txq_inval_byte_cnt_tbl(struct iwl_priv *priv, ...@@ -803,7 +803,7 @@ void iwl5000_txq_inval_byte_cnt_tbl(struct iwl_priv *priv,
bc_ent = cpu_to_le16(1 | (sta_id << 12)); bc_ent = cpu_to_le16(1 | (sta_id << 12));
scd_bc_tbl[txq_id].tfd_offset[read_ptr] = bc_ent; scd_bc_tbl[txq_id].tfd_offset[read_ptr] = bc_ent;
if (txq->q.write_ptr < TFD_QUEUE_SIZE_BC_DUP) if (read_ptr < TFD_QUEUE_SIZE_BC_DUP)
scd_bc_tbl[txq_id]. scd_bc_tbl[txq_id].
tfd_offset[TFD_QUEUE_SIZE_MAX + read_ptr] = bc_ent; tfd_offset[TFD_QUEUE_SIZE_MAX + read_ptr] = bc_ent;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册