7
7
*
8
8
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
9
9
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
10
- * Copyright(c) 2016 Intel Deutschland GmbH
10
+ * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
11
11
*
12
12
* This program is free software; you can redistribute it and/or modify
13
13
* it under the terms of version 2 of the GNU General Public License as
34
34
*
35
35
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
36
36
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
37
+ * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
37
38
* All rights reserved.
38
39
*
39
40
* Redistribution and use in source and binary forms, with or without
@@ -628,8 +629,10 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
628
629
* values.
629
630
* Note that we don't need to make sure it isn't agg'd, since we're
630
631
* TXing non-sta
632
+ * For DQA mode - we shouldn't increase it though
631
633
*/
632
- atomic_inc (& mvm -> pending_frames [sta_id ]);
634
+ if (!iwl_mvm_is_dqa_supported (mvm ))
635
+ atomic_inc (& mvm -> pending_frames [sta_id ]);
633
636
634
637
return 0 ;
635
638
}
@@ -1005,11 +1008,8 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
1005
1008
1006
1009
spin_unlock (& mvmsta -> lock );
1007
1010
1008
- /* Increase pending frames count if this isn't AMPDU */
1009
- if ((iwl_mvm_is_dqa_supported (mvm ) &&
1010
- mvmsta -> tid_data [tx_cmd -> tid_tspec ].state != IWL_AGG_ON &&
1011
- mvmsta -> tid_data [tx_cmd -> tid_tspec ].state != IWL_AGG_STARTING ) ||
1012
- (!iwl_mvm_is_dqa_supported (mvm ) && !is_ampdu ))
1011
+ /* Increase pending frames count if this isn't AMPDU or DQA queue */
1012
+ if (!iwl_mvm_is_dqa_supported (mvm ) && !is_ampdu )
1013
1013
atomic_inc (& mvm -> pending_frames [mvmsta -> sta_id ]);
1014
1014
1015
1015
return 0 ;
@@ -1079,12 +1079,13 @@ static void iwl_mvm_check_ratid_empty(struct iwl_mvm *mvm,
1079
1079
lockdep_assert_held (& mvmsta -> lock );
1080
1080
1081
1081
if ((tid_data -> state == IWL_AGG_ON ||
1082
- tid_data -> state == IWL_EMPTYING_HW_QUEUE_DELBA ) &&
1082
+ tid_data -> state == IWL_EMPTYING_HW_QUEUE_DELBA ||
1083
+ iwl_mvm_is_dqa_supported (mvm )) &&
1083
1084
iwl_mvm_tid_queued (tid_data ) == 0 ) {
1084
1085
/*
1085
- * Now that this aggregation queue is empty tell mac80211 so it
1086
- * knows we no longer have frames buffered for the station on
1087
- * this TID (for the TIM bitmap calculation.)
1086
+ * Now that this aggregation or DQA queue is empty tell
1087
+ * mac80211 so it knows we no longer have frames buffered for
1088
+ * the station on this TID (for the TIM bitmap calculation.)
1088
1089
*/
1089
1090
ieee80211_sta_set_buffered (sta , tid , false);
1090
1091
}
@@ -1257,7 +1258,6 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
1257
1258
u8 skb_freed = 0 ;
1258
1259
u16 next_reclaimed , seq_ctl ;
1259
1260
bool is_ndp = false;
1260
- bool txq_agg = false; /* Is this TXQ aggregated */
1261
1261
1262
1262
__skb_queue_head_init (& skbs );
1263
1263
@@ -1283,6 +1283,10 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
1283
1283
info -> flags |= IEEE80211_TX_STAT_ACK ;
1284
1284
break ;
1285
1285
case TX_STATUS_FAIL_DEST_PS :
1286
+ /* In DQA, the FW should have stopped the queue and not
1287
+ * return this status
1288
+ */
1289
+ WARN_ON (iwl_mvm_is_dqa_supported (mvm ));
1286
1290
info -> flags |= IEEE80211_TX_STAT_TX_FILTERED ;
1287
1291
break ;
1288
1292
default :
@@ -1387,15 +1391,6 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
1387
1391
bool send_eosp_ndp = false;
1388
1392
1389
1393
spin_lock_bh (& mvmsta -> lock );
1390
- if (iwl_mvm_is_dqa_supported (mvm )) {
1391
- enum iwl_mvm_agg_state state ;
1392
-
1393
- state = mvmsta -> tid_data [tid ].state ;
1394
- txq_agg = (state == IWL_AGG_ON ||
1395
- state == IWL_EMPTYING_HW_QUEUE_DELBA );
1396
- } else {
1397
- txq_agg = txq_id >= mvm -> first_agg_queue ;
1398
- }
1399
1394
1400
1395
if (!is_ndp ) {
1401
1396
tid_data -> next_reclaimed = next_reclaimed ;
@@ -1452,11 +1447,11 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
1452
1447
* If the txq is not an AMPDU queue, there is no chance we freed
1453
1448
* several skbs. Check that out...
1454
1449
*/
1455
- if (txq_agg )
1450
+ if (iwl_mvm_is_dqa_supported ( mvm ) || txq_id >= mvm -> first_agg_queue )
1456
1451
goto out ;
1457
1452
1458
1453
/* We can't free more than one frame at once on a shared queue */
1459
- WARN_ON (! iwl_mvm_is_dqa_supported ( mvm ) && ( skb_freed > 1 ) );
1454
+ WARN_ON (skb_freed > 1 );
1460
1455
1461
1456
/* If we have still frames for this STA nothing to do here */
1462
1457
if (!atomic_sub_and_test (skb_freed , & mvm -> pending_frames [sta_id ]))
0 commit comments