mwl8k: Invert tx queues for set_hw_spec and set_edca_params
mac80211 and mwl8k FW tx queue priorities map inversely to each other. Fix this. Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com> Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Tested-by: Pradeep Nemavat <pnemavat@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
0bf22c3751
commit
85c9205c79
@@ -2128,8 +2128,18 @@ static int mwl8k_cmd_set_hw_spec(struct ieee80211_hw *hw)
|
|||||||
cmd->ps_cookie = cpu_to_le32(priv->cookie_dma);
|
cmd->ps_cookie = cpu_to_le32(priv->cookie_dma);
|
||||||
cmd->rx_queue_ptr = cpu_to_le32(priv->rxq[0].rxd_dma);
|
cmd->rx_queue_ptr = cpu_to_le32(priv->rxq[0].rxd_dma);
|
||||||
cmd->num_tx_queues = cpu_to_le32(MWL8K_TX_QUEUES);
|
cmd->num_tx_queues = cpu_to_le32(MWL8K_TX_QUEUES);
|
||||||
for (i = 0; i < MWL8K_TX_QUEUES; i++)
|
|
||||||
cmd->tx_queue_ptrs[i] = cpu_to_le32(priv->txq[i].txd_dma);
|
/*
|
||||||
|
* Mac80211 stack has Q0 as highest priority and Q3 as lowest in
|
||||||
|
* that order. Firmware has Q3 as highest priority and Q0 as lowest
|
||||||
|
* in that order. Map Q3 of mac80211 to Q0 of firmware so that the
|
||||||
|
* priority is interpreted the right way in firmware.
|
||||||
|
*/
|
||||||
|
for (i = 0; i < MWL8K_TX_QUEUES; i++) {
|
||||||
|
int j = MWL8K_TX_QUEUES - 1 - i;
|
||||||
|
cmd->tx_queue_ptrs[i] = cpu_to_le32(priv->txq[j].txd_dma);
|
||||||
|
}
|
||||||
|
|
||||||
cmd->flags = cpu_to_le32(MWL8K_SET_HW_SPEC_FLAG_HOST_DECR_MGMT |
|
cmd->flags = cpu_to_le32(MWL8K_SET_HW_SPEC_FLAG_HOST_DECR_MGMT |
|
||||||
MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_PROBERESP |
|
MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_PROBERESP |
|
||||||
MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_BEACON);
|
MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_BEACON);
|
||||||
@@ -4331,12 +4341,14 @@ static int mwl8k_conf_tx(struct ieee80211_hw *hw, u16 queue,
|
|||||||
if (!priv->wmm_enabled)
|
if (!priv->wmm_enabled)
|
||||||
rc = mwl8k_cmd_set_wmm_mode(hw, 1);
|
rc = mwl8k_cmd_set_wmm_mode(hw, 1);
|
||||||
|
|
||||||
if (!rc)
|
if (!rc) {
|
||||||
rc = mwl8k_cmd_set_edca_params(hw, queue,
|
int q = MWL8K_TX_QUEUES - 1 - queue;
|
||||||
|
rc = mwl8k_cmd_set_edca_params(hw, q,
|
||||||
params->cw_min,
|
params->cw_min,
|
||||||
params->cw_max,
|
params->cw_max,
|
||||||
params->aifs,
|
params->aifs,
|
||||||
params->txop);
|
params->txop);
|
||||||
|
}
|
||||||
|
|
||||||
mwl8k_fw_unlock(hw);
|
mwl8k_fw_unlock(hw);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user