summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/mvm/utils.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-03-30 10:55:57 +0300
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-04-02 09:29:13 +0300
commit31755207afc5d5a30e3eea9e4f2a518fc5b680c1 (patch)
tree9b3388a7026669772115471a2a466c62f748da6f /drivers/net/wireless/iwlwifi/mvm/utils.c
parent874c174eb9950a62032a7c90c4a23947a2bb863d (diff)
downloadlinux-31755207afc5d5a30e3eea9e4f2a518fc5b680c1.tar.xz
iwlwifi: mvm: capture connection loss as part of MLME trigger
The only other way to catch these would have been to monitor the Tx deauth event, but we can send a deauth when we roam. So it would have been tricky to make sure we capture the connection losses only. Define a separate trigger for the connection losses to make it easier to catch them. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/utils.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/utils.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/utils.c b/drivers/net/wireless/iwlwifi/mvm/utils.c
index 54e3556842c4..bc55a8b82db6 100644
--- a/drivers/net/wireless/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/iwlwifi/mvm/utils.c
@@ -965,3 +965,27 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm,
return mvm->cfg->base_params->wd_timeout;
}
}
+
+void iwl_mvm_connection_loss(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
+ const char *errmsg)
+{
+ struct iwl_fw_dbg_trigger_tlv *trig;
+ struct iwl_fw_dbg_trigger_mlme *trig_mlme;
+
+ if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_MLME))
+ goto out;
+
+ trig = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_MLME);
+ trig_mlme = (void *)trig->data;
+ if (!iwl_fw_dbg_trigger_check_stop(mvm, vif, trig))
+ goto out;
+
+ if (trig_mlme->stop_connection_loss &&
+ --trig_mlme->stop_connection_loss)
+ goto out;
+
+ iwl_mvm_fw_dbg_collect_trig(mvm, trig, "%s", errmsg);
+
+out:
+ ieee80211_connection_loss(vif);
+}