@@ -2400,6 +2400,34 @@ static void iwl_mvm_channel_switch_beacon(struct ieee80211_hw *hw,
2400
2400
mutex_unlock (& mvm -> mutex );
2401
2401
}
2402
2402
2403
+ static void iwl_mvm_mac_flush (struct ieee80211_hw * hw ,
2404
+ struct ieee80211_vif * vif , u32 queues , bool drop )
2405
+ {
2406
+ struct iwl_mvm * mvm = IWL_MAC80211_GET_MVM (hw );
2407
+ struct iwl_mvm_vif * mvmvif ;
2408
+ struct iwl_mvm_sta * mvmsta ;
2409
+
2410
+ if (!vif || vif -> type != NL80211_IFTYPE_STATION )
2411
+ return ;
2412
+
2413
+ mutex_lock (& mvm -> mutex );
2414
+ mvmvif = iwl_mvm_vif_from_mac80211 (vif );
2415
+ mvmsta = iwl_mvm_sta_from_staid_protected (mvm , mvmvif -> ap_sta_id );
2416
+
2417
+ if (WARN_ON_ONCE (!mvmsta ))
2418
+ goto done ;
2419
+
2420
+ if (drop ) {
2421
+ if (iwl_mvm_flush_tx_path (mvm , mvmsta -> tfd_queue_msk , true))
2422
+ IWL_ERR (mvm , "flush request fail\n" );
2423
+ } else {
2424
+ iwl_trans_wait_tx_queue_empty (mvm -> trans ,
2425
+ mvmsta -> tfd_queue_msk );
2426
+ }
2427
+ done :
2428
+ mutex_unlock (& mvm -> mutex );
2429
+ }
2430
+
2403
2431
const struct ieee80211_ops iwl_mvm_hw_ops = {
2404
2432
.tx = iwl_mvm_mac_tx ,
2405
2433
.ampdu_action = iwl_mvm_mac_ampdu_action ,
@@ -2423,6 +2451,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
2423
2451
.sta_rc_update = iwl_mvm_sta_rc_update ,
2424
2452
.conf_tx = iwl_mvm_mac_conf_tx ,
2425
2453
.mgd_prepare_tx = iwl_mvm_mac_mgd_prepare_tx ,
2454
+ .flush = iwl_mvm_mac_flush ,
2426
2455
.sched_scan_start = iwl_mvm_mac_sched_scan_start ,
2427
2456
.sched_scan_stop = iwl_mvm_mac_sched_scan_stop ,
2428
2457
.set_key = iwl_mvm_mac_set_key ,
0 commit comments