|
@@ -1375,10 +1375,18 @@ static void iwl_mvm_beacon_loss_iterator(void *_data, u8 *mac,
|
|
{
|
|
{
|
|
struct iwl_missed_beacons_notif *missed_beacons = _data;
|
|
struct iwl_missed_beacons_notif *missed_beacons = _data;
|
|
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
|
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
|
|
|
+ struct iwl_mvm *mvm = mvmvif->mvm;
|
|
|
|
+ struct iwl_fw_dbg_trigger_missed_bcon *bcon_trig;
|
|
|
|
+ struct iwl_fw_dbg_trigger_tlv *trigger;
|
|
|
|
+ u32 stop_trig_missed_bcon, stop_trig_missed_bcon_since_rx;
|
|
|
|
+ u32 rx_missed_bcon, rx_missed_bcon_since_rx;
|
|
|
|
|
|
if (mvmvif->id != (u16)le32_to_cpu(missed_beacons->mac_id))
|
|
if (mvmvif->id != (u16)le32_to_cpu(missed_beacons->mac_id))
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
+ rx_missed_bcon = le32_to_cpu(missed_beacons->consec_missed_beacons);
|
|
|
|
+ rx_missed_bcon_since_rx =
|
|
|
|
+ le32_to_cpu(missed_beacons->consec_missed_beacons_since_last_rx);
|
|
/*
|
|
/*
|
|
* TODO: the threshold should be adjusted based on latency conditions,
|
|
* TODO: the threshold should be adjusted based on latency conditions,
|
|
* and/or in case of a CS flow on one of the other AP vifs.
|
|
* and/or in case of a CS flow on one of the other AP vifs.
|
|
@@ -1386,6 +1394,26 @@ static void iwl_mvm_beacon_loss_iterator(void *_data, u8 *mac,
|
|
if (le32_to_cpu(missed_beacons->consec_missed_beacons_since_last_rx) >
|
|
if (le32_to_cpu(missed_beacons->consec_missed_beacons_since_last_rx) >
|
|
IWL_MVM_MISSED_BEACONS_THRESHOLD)
|
|
IWL_MVM_MISSED_BEACONS_THRESHOLD)
|
|
ieee80211_beacon_loss(vif);
|
|
ieee80211_beacon_loss(vif);
|
|
|
|
+
|
|
|
|
+ if (!iwl_fw_dbg_trigger_enabled(mvm->fw,
|
|
|
|
+ FW_DBG_TRIGGER_MISSED_BEACONS))
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ trigger = iwl_fw_dbg_get_trigger(mvm->fw,
|
|
|
|
+ FW_DBG_TRIGGER_MISSED_BEACONS);
|
|
|
|
+ bcon_trig = (void *)trigger->data;
|
|
|
|
+ stop_trig_missed_bcon = le32_to_cpu(bcon_trig->stop_consec_missed_bcon);
|
|
|
|
+ stop_trig_missed_bcon_since_rx =
|
|
|
|
+ le32_to_cpu(bcon_trig->stop_consec_missed_bcon_since_rx);
|
|
|
|
+
|
|
|
|
+ /* TODO: implement start trigger */
|
|
|
|
+
|
|
|
|
+ if (!iwl_fw_dbg_trigger_check_stop(mvm, vif, trigger))
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if (rx_missed_bcon_since_rx >= stop_trig_missed_bcon_since_rx ||
|
|
|
|
+ rx_missed_bcon >= stop_trig_missed_bcon)
|
|
|
|
+ iwl_mvm_fw_dbg_collect_trig(mvm, trigger, NULL, 0);
|
|
}
|
|
}
|
|
|
|
|
|
int iwl_mvm_rx_missed_beacons_notif(struct iwl_mvm *mvm,
|
|
int iwl_mvm_rx_missed_beacons_notif(struct iwl_mvm *mvm,
|