Commit cba46988 authored by Liad Kaufman's avatar Liad Kaufman Committed by Luca Coelho

iwlwifi: mvm: support multi tid ba notif

When receiving a BA_NOTIF on new TX API, it can
contain BAs for several TIDs. Go over them and
reclaim TX for every TID.

Note that although the small API change, the API
version still isn't bumped forward, as this NIC
isn't still officially released.
Signed-off-by: default avatarLiad Kaufman <liad.kaufman@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent b3de3ef4
...@@ -668,13 +668,15 @@ struct iwl_mvm_ba_notif { ...@@ -668,13 +668,15 @@ struct iwl_mvm_ba_notif {
* @q_num: TFD queue number * @q_num: TFD queue number
* @tfd_index: Index of first un-acked frame in the TFD queue * @tfd_index: Index of first un-acked frame in the TFD queue
* @scd_queue: For debug only - the physical queue the TFD queue is bound to * @scd_queue: For debug only - the physical queue the TFD queue is bound to
* @tid: TID of the queue (0-7)
* @reserved: reserved for alignment * @reserved: reserved for alignment
*/ */
struct iwl_mvm_compressed_ba_tfd { struct iwl_mvm_compressed_ba_tfd {
__le16 q_num; __le16 q_num;
__le16 tfd_index; __le16 tfd_index;
u8 scd_queue; u8 scd_queue;
u8 reserved[3]; u8 tid;
u8 reserved[2];
} __packed; /* COMPRESSED_BA_TFD_API_S_VER_1 */ } __packed; /* COMPRESSED_BA_TFD_API_S_VER_1 */
/** /**
......
...@@ -1813,6 +1813,7 @@ void iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) ...@@ -1813,6 +1813,7 @@ void iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
if (iwl_mvm_has_new_tx_api(mvm)) { if (iwl_mvm_has_new_tx_api(mvm)) {
struct iwl_mvm_compressed_ba_notif *ba_res = struct iwl_mvm_compressed_ba_notif *ba_res =
(void *)pkt->data; (void *)pkt->data;
int i;
sta_id = ba_res->sta_id; sta_id = ba_res->sta_id;
ba_info.status.ampdu_ack_len = (u8)le16_to_cpu(ba_res->done); ba_info.status.ampdu_ack_len = (u8)le16_to_cpu(ba_res->done);
...@@ -1825,22 +1826,17 @@ void iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) ...@@ -1825,22 +1826,17 @@ void iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
if (!le16_to_cpu(ba_res->tfd_cnt)) if (!le16_to_cpu(ba_res->tfd_cnt))
goto out; goto out;
/* /* Free per TID */
* TODO: for (i = 0; i < le16_to_cpu(ba_res->tfd_cnt); i++) {
* When supporting multi TID aggregations - we need to move struct iwl_mvm_compressed_ba_tfd *ba_tfd =
* next_reclaimed to be per TXQ and not per TID or handle it &ba_res->tfd[i];
* in a different way.
* This will go together with SN and AddBA offload and cannot iwl_mvm_tx_reclaim(mvm, sta_id, ba_tfd->tid,
* be handled properly for now. (int)(le16_to_cpu(ba_tfd->q_num)),
*/ le16_to_cpu(ba_tfd->tfd_index),
WARN_ON(le16_to_cpu(ba_res->ra_tid_cnt) != 1); &ba_info,
tid = ba_res->ra_tid[0].tid; le32_to_cpu(ba_res->tx_rate));
if (tid == IWL_MGMT_TID) }
tid = IWL_MAX_TID_COUNT;
iwl_mvm_tx_reclaim(mvm, sta_id, tid,
(int)(le16_to_cpu(ba_res->tfd[0].q_num)),
le16_to_cpu(ba_res->tfd[0].tfd_index),
&ba_info, le32_to_cpu(ba_res->tx_rate));
out: out:
IWL_DEBUG_TX_REPLY(mvm, IWL_DEBUG_TX_REPLY(mvm,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment