iwlwifi: mvm: support MGMT frames in compressed BA
authorLiad Kaufman <liad.kaufman@intel.com>
Mon, 23 Oct 2017 12:02:42 +0000 (15:02 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Sat, 25 Nov 2017 15:46:11 +0000 (17:46 +0200)
In A000 family, compressed BA notifs can include MGMT
frames, so don't fail RXs in such a case.

While at it, since in A000 the TID for MGMT frames is
15, treat it in the RX flow as if received TID 8. This
way we won't require special handling of this TID.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/tx.c

index d88c3685a6ddc61e13cfa14c58d66919abed4f55..0407ea30bb820b2b68c375e738f0dee3270bde7f 100644 (file)
@@ -1623,7 +1623,7 @@ static void iwl_mvm_tx_reclaim(struct iwl_mvm *mvm, int sta_id, int tid,
        int freed;
 
        if (WARN_ONCE(sta_id >= IWL_MVM_STATION_COUNT ||
-                     tid >= IWL_MAX_TID_COUNT,
+                     tid > IWL_MAX_TID_COUNT,
                      "sta_id %d tid %d", sta_id, tid))
                return;
 
@@ -1678,7 +1678,7 @@ static void iwl_mvm_tx_reclaim(struct iwl_mvm *mvm, int sta_id, int tid,
                if (ieee80211_is_data_qos(hdr->frame_control))
                        freed++;
                else
-                       WARN_ON_ONCE(1);
+                       WARN_ON_ONCE(tid != IWL_MAX_TID_COUNT);
 
                iwl_trans_free_tx_cmd(mvm->trans, info->driver_data[1]);
 
@@ -1770,8 +1770,12 @@ void iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
                        struct iwl_mvm_compressed_ba_tfd *ba_tfd =
                                &ba_res->tfd[i];
 
+                       tid = ba_tfd->tid;
+                       if (tid == IWL_MGMT_TID)
+                               tid = IWL_MAX_TID_COUNT;
+
                        mvmsta->tid_data[i].lq_color = lq_color;
-                       iwl_mvm_tx_reclaim(mvm, sta_id, ba_tfd->tid,
+                       iwl_mvm_tx_reclaim(mvm, sta_id, tid,
                                           (int)(le16_to_cpu(ba_tfd->q_num)),
                                           le16_to_cpu(ba_tfd->tfd_index),
                                           &ba_info,