diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-02-03 14:29:36 +0200 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-03-02 08:20:32 +0200 |
commit | 3ec50b5eec6b0e92f862ba48c837fa5437dcd4a4 (patch) | |
tree | 647c65d1339f0125b4f87a134a82582e92f3f2ff /drivers/net/wireless/iwlwifi/mvm/rx.c | |
parent | 5a756c20c44fe8b41d8adce090a2cdc95f10ab49 (diff) | |
download | lwn-3ec50b5eec6b0e92f862ba48c837fa5437dcd4a4.tar.gz lwn-3ec50b5eec6b0e92f862ba48c837fa5437dcd4a4.zip |
iwlwifi: mvm: add trigger for firmware dump upon low RSSI
Lots of issues can be caught when the RSSI drops. Add the
ability to collect the firmware data at that point.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rx.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rx.c b/drivers/net/wireless/iwlwifi/mvm/rx.c index 9b2c537b5e95..6177e24f4c01 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/iwlwifi/mvm/rx.c @@ -345,6 +345,25 @@ int iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, struct iwl_mvm_sta *mvmsta; mvmsta = iwl_mvm_sta_from_mac80211(sta); rs_update_last_rssi(mvm, &mvmsta->lq_sta, rx_status); + + if (iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_RSSI) && + ieee80211_is_beacon(hdr->frame_control)) { + struct iwl_fw_dbg_trigger_tlv *trig; + struct iwl_fw_dbg_trigger_low_rssi *rssi_trig; + bool trig_check; + s32 rssi; + + trig = iwl_fw_dbg_get_trigger(mvm->fw, + FW_DBG_TRIGGER_RSSI); + rssi_trig = (void *)trig->data; + rssi = le32_to_cpu(rssi_trig->rssi); + + trig_check = + iwl_fw_dbg_trigger_check_stop(mvm, mvmsta->vif, + trig); + if (trig_check && rx_status->signal < rssi) + iwl_mvm_fw_dbg_collect_trig(mvm, trig, NULL, 0); + } } rcu_read_unlock(); |