summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c3
-rw-r--r--CORE/HDD/src/wlan_hdd_ipa.c80
2 files changed, 81 insertions, 2 deletions
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index 222ab88b0b13..73f5d2240199 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -1995,12 +1995,11 @@ VOS_STATUS hdd_wlan_shutdown(void)
}
#endif
- hdd_reset_all_adapters(pHddCtx);
-
#ifdef IPA_UC_OFFLOAD
hdd_ipa_uc_ssr_deinit();
#endif
+ hdd_reset_all_adapters(pHddCtx);
vosStatus = hddDevTmUnregisterNotifyCallback(pHddCtx);
if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
diff --git a/CORE/HDD/src/wlan_hdd_ipa.c b/CORE/HDD/src/wlan_hdd_ipa.c
index 54c840b6fb50..cfc17f2fb7e0 100644
--- a/CORE/HDD/src/wlan_hdd_ipa.c
+++ b/CORE/HDD/src/wlan_hdd_ipa.c
@@ -2165,6 +2165,83 @@ void hdd_ipa_uc_force_pipe_shutdown(hdd_context_t *hdd_ctx)
}
/**
+ * hdd_ipa_send_disconnect() - ipa send disconnect clients
+ *
+ * adapter: pointer to hdd adapter
+ * Send disconnect evnt to IPA driver during SSR
+ *
+ * Return: 0 - Success
+ */
+static int hdd_ipa_send_disconnect(hdd_adapter_t *adapter)
+{
+ struct ipa_msg_meta meta;
+ struct ipa_wlan_msg *msg;
+ int ret = 0;
+ int i;
+
+ for (i = 0; i < WLAN_MAX_STA_COUNT; i++) {
+ if (vos_is_macaddr_broadcast(&adapter->aStaInfo[i].macAddrSTA))
+ return ret;
+ if ((adapter->aStaInfo[i].isUsed) &&
+ (!adapter->aStaInfo[i].isDeauthInProgress)) {
+ meta.msg_len = sizeof(struct ipa_wlan_msg);
+ msg = adf_os_mem_alloc(NULL, meta.msg_len);
+ if (msg == NULL) {
+ HDD_IPA_LOG(VOS_TRACE_LEVEL_ERROR,
+ "msg allocation failed");
+ return -ENOMEM;
+ }
+ meta.msg_type = WLAN_CLIENT_DISCONNECT;
+ strlcpy(msg->name, adapter->dev->name,
+ IPA_RESOURCE_NAME_MAX);
+ memcpy(msg->mac_addr, adapter->aStaInfo[i].macAddrSTA.bytes,
+ ETH_ALEN);
+ HDD_IPA_LOG(VOS_TRACE_LEVEL_INFO, "%s: Evt: %d",
+ msg->name, meta.msg_type);
+ ret = ipa_send_msg(&meta, msg, hdd_ipa_msg_free_fn);
+ if (ret) {
+ HDD_IPA_LOG(VOS_TRACE_LEVEL_ERROR,
+ "%s: Evt: %d fail:%d",
+ msg->name, meta.msg_type, ret);
+ adf_os_mem_free(msg);
+ return ret;
+ }
+ }
+ }
+
+ return ret;
+}
+
+/**
+ * hdd_ipa_uc_disconnect_client() - disconnect ipa sap clients
+ *
+ * hdd_ctx: pointer to hdd context
+ * Send disconnect evnt to IPA driver during SSR
+ *
+ * Return: 0 - Success
+ */
+static int hdd_ipa_uc_disconnect_client(hdd_context_t *hdd_ctx)
+{
+ hdd_adapter_list_node_t *adapter_node = NULL, *next = NULL;
+ VOS_STATUS status;
+ hdd_adapter_t *adapter;
+ int ret = 0;
+
+
+ status = hdd_get_front_adapter (hdd_ctx, &adapter_node);
+ while (NULL != adapter_node && VOS_STATUS_SUCCESS == status) {
+ adapter = adapter_node->pAdapter;
+ if (adapter->device_mode == WLAN_HDD_SOFTAP)
+ hdd_ipa_send_disconnect(adapter);
+ status = hdd_get_next_adapter(
+ hdd_ctx, adapter_node, &next);
+ adapter_node = next;
+ }
+
+ return ret;
+}
+
+/**
* hdd_ipa_uc_ssr_deinit() - handle ipa deinit for SSR
*
* Deinit basic IPA UC host side to be in sync reloaded FW during
@@ -2181,6 +2258,9 @@ int hdd_ipa_uc_ssr_deinit()
if (!hdd_ipa_uc_is_enabled(hdd_ipa))
return 0;
+ /* send disconnect to ipa driver for connected clients */
+ hdd_ipa_uc_disconnect_client(hdd_ipa->hdd_ctx);
+
/* Clean up HDD IPA interfaces */
for (idx = 0; (hdd_ipa->num_iface > 0) &&
(idx < HDD_IPA_MAX_IFACE); idx++) {