Skip to content

Commit

Permalink
iwlagn: Fix a bug introduced by the HUGE command removal
Browse files Browse the repository at this point in the history
Since we don't have HUGE command any more, there is no point in adding 1
to the num of slots in the command queue. Doing so is buggy and might corrupt
memory.

Bug introduced by 4ce7cc2
iwlagn: support multiple TBs per command

Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
  • Loading branch information
Emmanuel Grumbach authored and Wey-Yi Guy committed Jun 24, 2011
1 parent 3373b28 commit 77e569e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/net/wireless/iwlwifi/iwl-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,7 @@ int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
void iwl_tx_queue_reset(struct iwl_priv *priv, struct iwl_tx_queue *txq,
int slots_num, u32 txq_id)
{
int actual_slots = slots_num;

if (txq_id == priv->cmd_queue)
actual_slots++;

memset(txq->meta, 0, sizeof(struct iwl_cmd_meta) * actual_slots);
memset(txq->meta, 0, sizeof(struct iwl_cmd_meta) * slots_num);

txq->need_update = 0;

Expand Down

0 comments on commit 77e569e

Please sign in to comment.