提交 378c8931 编写于 作者: S Shahar S Matityahu 提交者: Luca Coelho

iwlwifi: wrt: add fw force restart via triggers

We can set triggers that cause a debug data collection when something
of interest happens (e.g. when too many probes are lost conscutively).
Normally, this triggers don't cause the FW to be restarted, but in
some cases that may be desired, so we recover from the problem.  To
support this, add a flag that indicates that the FW should be
restarted when the trigger fires.
Signed-off-by: NShahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
上级 9b137866
...@@ -1008,6 +1008,12 @@ int iwl_fw_dbg_collect(struct iwl_fw_runtime *fwrt, ...@@ -1008,6 +1008,12 @@ int iwl_fw_dbg_collect(struct iwl_fw_runtime *fwrt,
{ {
struct iwl_fw_dump_desc *desc; struct iwl_fw_dump_desc *desc;
if (trigger && trigger->flags & IWL_FW_DBG_FORCE_RESTART) {
IWL_WARN(fwrt, "Force restart: trigger %d fired.\n", trig);
iwl_force_nmi(fwrt->trans);
return 0;
}
desc = kzalloc(sizeof(*desc) + len, GFP_ATOMIC); desc = kzalloc(sizeof(*desc) + len, GFP_ATOMIC);
if (!desc) if (!desc)
return -ENOMEM; return -ENOMEM;
......
...@@ -620,6 +620,14 @@ enum iwl_fw_dbg_trigger_mode { ...@@ -620,6 +620,14 @@ enum iwl_fw_dbg_trigger_mode {
IWL_FW_DBG_TRIGGER_MONITOR_ONLY = BIT(2), IWL_FW_DBG_TRIGGER_MONITOR_ONLY = BIT(2),
}; };
/**
* enum iwl_fw_dbg_trigger_flags - the flags supported by wrt triggers
* @IWL_FW_DBG_FORCE_RESTART: force a firmware restart
*/
enum iwl_fw_dbg_trigger_flags {
IWL_FW_DBG_FORCE_RESTART = BIT(0),
};
/** /**
* enum iwl_fw_dbg_trigger_vif_type - define the VIF type for a trigger * enum iwl_fw_dbg_trigger_vif_type - define the VIF type for a trigger
* @IWL_FW_DBG_CONF_VIF_ANY: any vif type * @IWL_FW_DBG_CONF_VIF_ANY: any vif type
...@@ -656,6 +664,7 @@ enum iwl_fw_dbg_trigger_vif_type { ...@@ -656,6 +664,7 @@ enum iwl_fw_dbg_trigger_vif_type {
* @occurrences: number of occurrences. 0 means the trigger will never fire. * @occurrences: number of occurrences. 0 means the trigger will never fire.
* @trig_dis_ms: the time, in milliseconds, after an occurrence of this * @trig_dis_ms: the time, in milliseconds, after an occurrence of this
* trigger in which another occurrence should be ignored. * trigger in which another occurrence should be ignored.
* @flags: &enum iwl_fw_dbg_trigger_flags
*/ */
struct iwl_fw_dbg_trigger_tlv { struct iwl_fw_dbg_trigger_tlv {
__le32 id; __le32 id;
...@@ -666,7 +675,8 @@ struct iwl_fw_dbg_trigger_tlv { ...@@ -666,7 +675,8 @@ struct iwl_fw_dbg_trigger_tlv {
u8 start_conf_id; u8 start_conf_id;
__le16 occurrences; __le16 occurrences;
__le16 trig_dis_ms; __le16 trig_dis_ms;
__le16 reserved[3]; u8 flags;
u8 reserved[5];
u8 data[0]; u8 data[0];
} __packed; } __packed;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册