qcacmn: Introduce QCA_NL80211_VENDOR_SUBCMD_HANG
Event indicating to the user space that the driver has detected an internal failure. The driver is expected to recover from such a failure automatically, e.g., by resetting the device. This event carries the information indicating the reason that triggered this detection. Change-Id: Ia13e6f102e5e18ec4864ed258728369d51a77ff4 CRs-fixed: 2120886
This commit is contained in:
@@ -228,6 +228,11 @@
|
|||||||
* These scan parameters shall be reset by the driver/firmware once
|
* These scan parameters shall be reset by the driver/firmware once
|
||||||
* disconnected. The attributes used with this command are defined in
|
* disconnected. The attributes used with this command are defined in
|
||||||
* enum qca_wlan_vendor_attr_active_tos.
|
* enum qca_wlan_vendor_attr_active_tos.
|
||||||
|
* @QCA_NL80211_VENDOR_SUBCMD_HANG: Event indicating to the user space that the
|
||||||
|
* driver has detected an internal failure. This event carries the
|
||||||
|
* information indicating the reason that triggered this detection. The
|
||||||
|
* attributes for this command are defined in
|
||||||
|
* enum qca_wlan_vendor_attr_hang.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum qca_nl80211_vendor_subcmds {
|
enum qca_nl80211_vendor_subcmds {
|
||||||
@@ -422,6 +427,7 @@ enum qca_nl80211_vendor_subcmds {
|
|||||||
QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_START = 154,
|
QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_START = 154,
|
||||||
QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_STOP = 155,
|
QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_STOP = 155,
|
||||||
QCA_NL80211_VENDOR_SUBCMD_ACTIVE_TOS = 156,
|
QCA_NL80211_VENDOR_SUBCMD_ACTIVE_TOS = 156,
|
||||||
|
QCA_NL80211_VENDOR_SUBCMD_HANG = 157,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum qca_wlan_vendor_tos {
|
enum qca_wlan_vendor_tos {
|
||||||
@@ -446,6 +452,54 @@ enum qca_wlan_vendor_attr_active_tos {
|
|||||||
QCA_WLAN_VENDOR_ATTR_ACTIVE_TOS_MAX = 3,
|
QCA_WLAN_VENDOR_ATTR_ACTIVE_TOS_MAX = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum qca_wlan_vendor_hang_reason {
|
||||||
|
/* Unspecified reason */
|
||||||
|
QCA_WLAN_HANG_REASON_UNSPECIFIED = 0,
|
||||||
|
/* No Map for the MAC entry for the received frame */
|
||||||
|
QCA_WLAN_HANG_RX_HASH_NO_ENTRY_FOUND = 1,
|
||||||
|
/* peer deletion timeout happened */
|
||||||
|
QCA_WLAN_HANG_PEER_DELETION_TIMEDOUT = 2,
|
||||||
|
/* peer unmap timeout */
|
||||||
|
QCA_WLAN_HANG_PEER_UNMAP_TIMEDOUT = 3,
|
||||||
|
/* Scan request timed out */
|
||||||
|
QCA_WLAN_HANG_SCAN_REQ_EXPIRED = 4,
|
||||||
|
/* Consecutive Scan attempt failures */
|
||||||
|
QCA_WLAN_HANG_SCAN_ATTEMPT_FAILURES = 5,
|
||||||
|
/* Unable to get the message buffer */
|
||||||
|
QCA_WLAN_HANG_GET_MSG_BUFF_FAILURE = 6,
|
||||||
|
/* Current command processing is timedout */
|
||||||
|
QCA_WLAN_HANG_ACTIVE_LIST_TIMEOUT = 7,
|
||||||
|
/* Timeout for an ACK from FW for suspend request */
|
||||||
|
QCA_WLAN_HANG_SUSPEND_TIMEOUT = 8,
|
||||||
|
/* Timeout for an ACK from FW for resume request */
|
||||||
|
QCA_WLAN_HANG_RESUME_TIMEOUT = 9,
|
||||||
|
/* Transmission timeout for consecutive data frames */
|
||||||
|
QCA_WLAN_HANG_TRANSMISSIONS_TIMEOUT = 10,
|
||||||
|
/* Timeout for the TX completion status of data frame */
|
||||||
|
QCA_WLAN_HANG_TX_COMPLETE_TIMEOUT = 11,
|
||||||
|
/* DXE failure for tx/Rx, DXE resource unavailability */
|
||||||
|
QCA_WLAN_HANG_DXE_FAILURE = 12,
|
||||||
|
/* WMI pending commands exceed the maximum count */
|
||||||
|
QCA_WLAN_HANG_WMI_EXCEED_MAX_PENDING_CMDS = 13,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum qca_wlan_vendor_attr_hang - Used by the vendor command
|
||||||
|
* QCA_NL80211_VENDOR_SUBCMD_HANG.
|
||||||
|
*/
|
||||||
|
enum qca_wlan_vendor_attr_hang {
|
||||||
|
QCA_WLAN_VENDOR_ATTR_HANG_INVALID = 0,
|
||||||
|
/*
|
||||||
|
* Reason for the Hang - Represented by enum
|
||||||
|
* qca_wlan_vendor_hang_reason.
|
||||||
|
*/
|
||||||
|
QCA_WLAN_VENDOR_ATTR_HANG_REASON = 1,
|
||||||
|
|
||||||
|
QCA_WLAN_VENDOR_ATTR_HANG_AFTER_LAST,
|
||||||
|
QCA_WLAN_VENDOR_ATTR_HANG_MAX =
|
||||||
|
QCA_WLAN_VENDOR_ATTR_HANG_AFTER_LAST - 1,
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum qca_vendor_attr_set_trace_level - Config params for QDF set trace level
|
* enum qca_vendor_attr_set_trace_level - Config params for QDF set trace level
|
||||||
* @QCA_WLAN_VENDOR_ATTR_SET_TRACE_LEVEL_INVALID: Invalid trace level
|
* @QCA_WLAN_VENDOR_ATTR_SET_TRACE_LEVEL_INVALID: Invalid trace level
|
||||||
@@ -711,6 +765,7 @@ enum qca_wlan_vendor_attr_get_station_info {
|
|||||||
* @QCA_NL80211_VENDOR_SUBCMD_SAP_CONDITIONAL_CHAN_SWITCH_INDEX: SAP
|
* @QCA_NL80211_VENDOR_SUBCMD_SAP_CONDITIONAL_CHAN_SWITCH_INDEX: SAP
|
||||||
* conditional channel switch index
|
* conditional channel switch index
|
||||||
* @QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_GET_INDEX: NUD DEBUG Stats index
|
* @QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_GET_INDEX: NUD DEBUG Stats index
|
||||||
|
* @QCA_NL80211_VENDOR_SUBCMD_HANG_REASON_INDEX: hang event reason index
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum qca_nl80211_vendor_subcmds_index {
|
enum qca_nl80211_vendor_subcmds_index {
|
||||||
@@ -790,6 +845,7 @@ enum qca_nl80211_vendor_subcmds_index {
|
|||||||
QCA_NL80211_VENDOR_SUBCMD_UPDATE_EXTERNAL_ACS_CONFIG,
|
QCA_NL80211_VENDOR_SUBCMD_UPDATE_EXTERNAL_ACS_CONFIG,
|
||||||
QCA_NL80211_VENDOR_SUBCMD_PWR_SAVE_FAIL_DETECTED_INDEX,
|
QCA_NL80211_VENDOR_SUBCMD_PWR_SAVE_FAIL_DETECTED_INDEX,
|
||||||
QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_GET_INDEX,
|
QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_GET_INDEX,
|
||||||
|
QCA_NL80211_VENDOR_SUBCMD_HANG_REASON_INDEX,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -48,7 +48,7 @@ typedef __qdf_event_t qdf_event_t;
|
|||||||
/* Function declarations and documenation */
|
/* Function declarations and documenation */
|
||||||
|
|
||||||
#ifdef CONFIG_MCL
|
#ifdef CONFIG_MCL
|
||||||
typedef void (*qdf_self_recovery_callback)(void);
|
typedef void (*qdf_self_recovery_callback)(enum qdf_hang_reason);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QDF_STATUS qdf_event_create(qdf_event_t *event);
|
QDF_STATUS qdf_event_create(qdf_event_t *event);
|
||||||
|
@@ -827,4 +827,30 @@ enum qdf_suspend_type {
|
|||||||
QDF_RUNTIME_SUSPEND
|
QDF_RUNTIME_SUSPEND
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum qdf_hang_reason - host hang/ssr reason
|
||||||
|
* @CDS_REASON_UNSPECIFIED: Unspecified reason
|
||||||
|
* @CDS_RX_HASH_NO_ENTRY_FOUND: No Map for the MAC entry for the received frame
|
||||||
|
* @CDS_PEER_DELETION_TIMEDOUT: peer deletion timeout happened
|
||||||
|
* @CDS_PEER_UNMAP_TIMEDOUT: peer unmap timeout
|
||||||
|
* @CDS_SCAN_REQ_EXPIRED: Scan request timed out
|
||||||
|
* @CDS_SCAN_ATTEMPT_FAILURES: Consecutive Scan attempt failures
|
||||||
|
* @CDS_GET_MSG_BUFF_FAILURE: Unable to get the message buffer
|
||||||
|
* @CDS_ACTIVE_LIST_TIMEOUT: Current command processing is timedout
|
||||||
|
* @CDS_SUSPEND_TIMEOUT: Timeout for an ACK from FW for suspend request
|
||||||
|
* @CDS_RESUME_TIMEOUT: Timeout for an ACK from FW for resume request
|
||||||
|
*/
|
||||||
|
enum qdf_hang_reason {
|
||||||
|
QDF_REASON_UNSPECIFIED = 0,
|
||||||
|
QDF_RX_HASH_NO_ENTRY_FOUND = 1,
|
||||||
|
QDF_PEER_DELETION_TIMEDOUT = 2,
|
||||||
|
QDF_PEER_UNMAP_TIMEDOUT = 3,
|
||||||
|
QDF_SCAN_REQ_EXPIRED = 4,
|
||||||
|
QDF_SCAN_ATTEMPT_FAILURES = 5,
|
||||||
|
QDF_GET_MSG_BUFF_FAILURE = 6,
|
||||||
|
QDF_ACTIVE_LIST_TIMEOUT = 7,
|
||||||
|
QDF_SUSPEND_TIMEOUT = 8,
|
||||||
|
QDF_RESUME_TIMEOUT = 9,
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* __QDF_TYPES_H */
|
#endif /* __QDF_TYPES_H */
|
||||||
|
@@ -291,6 +291,6 @@ void qdf_trigger_self_recovery(void)
|
|||||||
"No self recovery callback registered %s", __func__);
|
"No self recovery callback registered %s", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self_recovery_cb();
|
self_recovery_cb(QDF_REASON_UNSPECIFIED);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -730,7 +730,7 @@ static void send_flush_completion_to_user(uint8_t ring_id)
|
|||||||
wlan_report_log_completion(is_fatal, indicator, reason_code, ring_id);
|
wlan_report_log_completion(is_fatal, indicator, reason_code, ring_id);
|
||||||
|
|
||||||
if (recovery_needed)
|
if (recovery_needed)
|
||||||
cds_trigger_recovery();
|
cds_trigger_recovery(QDF_REASON_UNSPECIFIED);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user