iwlwifi: pcie: set cmd_len in the correct place
command len is set too early in the code, since when building
AMSDU, the size changes. This causes the byte count table to
have the wrong size.
Fixes: a0ec0169b7
("iwlwifi: support new tx api")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
7969454b37
commit
956343a612
|
@ -583,18 +583,6 @@ int iwl_trans_pcie_gen2_tx(struct iwl_trans *trans, struct sk_buff *skb,
|
|||
|
||||
spin_lock(&txq->lock);
|
||||
|
||||
if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
|
||||
struct iwl_tx_cmd_gen3 *tx_cmd_gen3 =
|
||||
(void *)dev_cmd->payload;
|
||||
|
||||
cmd_len = le16_to_cpu(tx_cmd_gen3->len);
|
||||
} else {
|
||||
struct iwl_tx_cmd_gen2 *tx_cmd_gen2 =
|
||||
(void *)dev_cmd->payload;
|
||||
|
||||
cmd_len = le16_to_cpu(tx_cmd_gen2->len);
|
||||
}
|
||||
|
||||
if (iwl_queue_space(trans, txq) < txq->high_mark) {
|
||||
iwl_stop_queue(trans, txq);
|
||||
|
||||
|
@ -632,6 +620,18 @@ int iwl_trans_pcie_gen2_tx(struct iwl_trans *trans, struct sk_buff *skb,
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
|
||||
struct iwl_tx_cmd_gen3 *tx_cmd_gen3 =
|
||||
(void *)dev_cmd->payload;
|
||||
|
||||
cmd_len = le16_to_cpu(tx_cmd_gen3->len);
|
||||
} else {
|
||||
struct iwl_tx_cmd_gen2 *tx_cmd_gen2 =
|
||||
(void *)dev_cmd->payload;
|
||||
|
||||
cmd_len = le16_to_cpu(tx_cmd_gen2->len);
|
||||
}
|
||||
|
||||
/* Set up entry for this TFD in Tx byte-count array */
|
||||
iwl_pcie_gen2_update_byte_tbl(trans_pcie, txq, cmd_len,
|
||||
iwl_pcie_gen2_get_num_tbs(trans, tfd));
|
||||
|
|
Loading…
Reference in New Issue