Skip to content

Commit a3a0a59

Browse files
committed
iwlwifi: dvm: drop VO packets when mac80211 tells us to
mac80211 now informs the driver when to drop the packets upon flush(). This will happen before disconnecting, or before we shut down the interface. We can now rely on this to drop all the packets including the VO queues. When mac80211 sets drop to false, wait for all the queues to be empty. Signed-off-by: Emmanuel Grumbach <[email protected]>
1 parent 4cd4b50 commit a3a0a59

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

drivers/net/wireless/iwlwifi/dvm/mac80211.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,16 +1114,17 @@ static void iwlagn_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
11141114
scd_queues &= ~(BIT(IWL_IPAN_CMD_QUEUE_NUM) |
11151115
BIT(IWL_DEFAULT_CMD_QUEUE_NUM));
11161116

1117-
if (vif)
1118-
scd_queues &= ~BIT(vif->hw_queue[IEEE80211_AC_VO]);
1119-
1120-
IWL_DEBUG_TX_QUEUES(priv, "Flushing SCD queues: 0x%x\n", scd_queues);
1121-
if (iwlagn_txfifo_flush(priv, scd_queues)) {
1122-
IWL_ERR(priv, "flush request fail\n");
1123-
goto done;
1117+
if (drop) {
1118+
IWL_DEBUG_TX_QUEUES(priv, "Flushing SCD queues: 0x%x\n",
1119+
scd_queues);
1120+
if (iwlagn_txfifo_flush(priv, scd_queues)) {
1121+
IWL_ERR(priv, "flush request fail\n");
1122+
goto done;
1123+
}
11241124
}
1125+
11251126
IWL_DEBUG_TX_QUEUES(priv, "wait transmit/flush all frames\n");
1126-
iwl_trans_wait_tx_queue_empty(priv->trans, 0xffffffff);
1127+
iwl_trans_wait_tx_queue_empty(priv->trans, scd_queues);
11271128
done:
11281129
mutex_unlock(&priv->mutex);
11291130
IWL_DEBUG_MAC80211(priv, "leave\n");

0 commit comments

Comments
 (0)