diff options
| -rw-r--r-- | core/bmi/src/ol_fw.c | 2 | ||||
| -rw-r--r-- | core/cds/inc/cds_api.h | 2 | ||||
| -rw-r--r-- | core/cds/src/cds_api.c | 11 | ||||
| -rw-r--r-- | core/hdd/inc/wlan_hdd_main.h | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 1 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_power.c | 24 | ||||
| -rw-r--r-- | core/utils/nlink/inc/wlan_nlink_common.h | 1 |
7 files changed, 41 insertions, 2 deletions
diff --git a/core/bmi/src/ol_fw.c b/core/bmi/src/ol_fw.c index 429ae5f848d1..e6178a43d3ee 100644 --- a/core/bmi/src/ol_fw.c +++ b/core/bmi/src/ol_fw.c @@ -593,6 +593,7 @@ void ol_target_failure(void *instance, QDF_STATUS status) struct hif_opaque_softc *scn = ol_ctx->scn; tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA); struct ol_config_info *ini_cfg = ol_get_ini_handle(ol_ctx); + qdf_device_t qdf_dev = ol_ctx->qdf_dev; int ret; enum hif_target_status target_status = hif_get_target_status(scn); @@ -640,6 +641,7 @@ void ol_target_failure(void *instance, QDF_STATUS status) BMI_ERR("XXX TARGET ASSERTED XXX"); + cds_svc_fw_shutdown_ind(qdf_dev->dev); /* Collect the RAM dump through a workqueue */ if (ini_cfg->enable_ramdump_collection) qdf_sched_work(0, &ol_ctx->ramdump_work); diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h index 8bfddf882dc7..5f5487711488 100644 --- a/core/cds/inc/cds_api.h +++ b/core/cds/inc/cds_api.h @@ -264,7 +264,7 @@ QDF_STATUS cds_flush_logs(uint32_t is_fatal, bool dump_mac_trace, bool recovery_needed); void cds_logging_set_fw_flush_complete(void); - +void cds_svc_fw_shutdown_ind(struct device *dev); #ifdef FEATURE_WLAN_DIAG_SUPPORT void cds_tdls_tx_rx_mgmt_event(uint8_t event_id, uint8_t tx_rx, uint8_t type, uint8_t sub_type, uint8_t *peer_mac); diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index ffbdefa50134..e37e9c729f25 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -2323,3 +2323,14 @@ bool cds_is_sub_20_mhz_enabled(void) return false; } +/** + * cds_svc_fw_shutdown_ind() - API to send userspace about FW crash + * + * @dev: Device Pointer + * + * Return: None + */ +void cds_svc_fw_shutdown_ind(struct device *dev) +{ + hdd_svc_fw_shutdown_ind(dev); +} diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index b8d1524e1c96..e0dfae71a240 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1819,7 +1819,7 @@ QDF_STATUS hdd_sme_close_session_callback(void *pContext); int hdd_reassoc(hdd_adapter_t *adapter, const uint8_t *bssid, const uint8_t channel, const handoff_src src); - +void hdd_svc_fw_shutdown_ind(struct device *dev); int hdd_register_cb(hdd_context_t *hdd_ctx); void hdd_deregister_cb(hdd_context_t *hdd_ctx); int hdd_start_station_adapter(hdd_adapter_t *adapter); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 6375349c36ab..211603a66366 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -8168,6 +8168,7 @@ void wlan_hdd_send_svc_nlink_msg(int radio, int type, void *data, int len) switch (type) { case WLAN_SVC_FW_CRASHED_IND: + case WLAN_SVC_FW_SHUTDOWN_IND: case WLAN_SVC_LTE_COEX_IND: case WLAN_SVC_WLAN_AUTO_SHUTDOWN_IND: case WLAN_SVC_WLAN_AUTO_SHUTDOWN_CANCEL_IND: diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 975ab449d96a..9e5826085f7b 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1385,6 +1385,30 @@ static void hdd_ssr_timer_start(int msec) } /** + * hdd_svc_fw_shutdown_ind() - API to send FW SHUTDOWN IND to Userspace + * + * @dev: Device Pointer + * + * Return: None + */ +void hdd_svc_fw_shutdown_ind(struct device *dev) +{ + hdd_context_t *hdd_ctx; + v_CONTEXT_t g_context; + + g_context = cds_get_global_context(); + + if (!g_context) + return; + + hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + + hdd_ctx ? wlan_hdd_send_svc_nlink_msg(hdd_ctx->radio_index, + WLAN_SVC_FW_SHUTDOWN_IND, + NULL, 0) : 0; +} + +/** * hdd_wlan_shutdown() - HDD SSR shutdown function * * This function is called by the HIF to shutdown the driver during SSR. diff --git a/core/utils/nlink/inc/wlan_nlink_common.h b/core/utils/nlink/inc/wlan_nlink_common.h index a23456dedb6e..7259990b0e21 100644 --- a/core/utils/nlink/inc/wlan_nlink_common.h +++ b/core/utils/nlink/inc/wlan_nlink_common.h @@ -85,6 +85,7 @@ #define WLAN_SVC_WLAN_TP_TX_IND 0x10B #define WLAN_SVC_WLAN_AUTO_SHUTDOWN_CANCEL_IND 0x10C #define WLAN_SVC_WLAN_RADIO_INDEX 0x10D +#define WLAN_SVC_FW_SHUTDOWN_IND 0x10E #define WLAN_SVC_MAX_SSID_LEN 32 #define WLAN_SVC_MAX_BSSID_LEN 6 #define WLAN_SVC_MAX_STR_LEN 16 |
