summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbian <gbian@codeaurora.org>2016-11-10 11:07:42 +0800
committerqcabuildsw <qcabuildsw@localhost>2016-11-29 16:07:56 -0800
commita04ab5306b3656774164b7c34ea97ae221f4be97 (patch)
tree0b338df1bccaae2bb4305211b1bf0f4f9a099c8a
parent8393fed9be7991ca0db4e40227c02e70b5beb5ae (diff)
qcacld-3.0: reset sta_connected to 0 during SSR to avoid fw crash
qcacld-2.0 to qcacld-3.0 propagation sta_connected flag check may fail when handle WLAN_STA_CONNECT event. This will cause enable-ipa operation get skipped for the connect operation. If a disconnect operation follows, it will invoke fw to disable the ipa. Fw considers ipa to be disabled by default, so fw will consider it be double-disable and trigger the crash. Change-Id: Iaf4855eb1776e8c8c3b027d0ee2beb644063ef75 CRs-Fixed: 1079051
-rw-r--r--core/hdd/src/wlan_hdd_ipa.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 74df0508bb5a..1005d0fa9d12 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -640,6 +640,27 @@ static inline bool hdd_ipa_uc_sta_is_enabled(hdd_context_t *hdd_ctx)
}
/**
+ * hdd_ipa_uc_sta_reset_sta_connected() - Reset sta_connected flag
+ * @hdd_ipa: Global HDD IPA context
+ *
+ * Return: None
+ */
+#ifdef IPA_UC_STA_OFFLOAD
+static inline void hdd_ipa_uc_sta_reset_sta_connected(
+ struct hdd_ipa_priv *hdd_ipa)
+{
+ vos_lock_acquire(&hdd_ipa->event_lock);
+ hdd_ipa->sta_connected = 0;
+ vos_lock_release(&hdd_ipa->event_lock);
+}
+#else
+static inline void hdd_ipa_uc_sta_reset_sta_connected(
+ struct hdd_ipa_priv *hdd_ipa)
+{
+}
+#endif
+
+/**
* hdd_ipa_is_pre_filter_enabled() - Is IPA pre-filter enabled?
* @hdd_ipa: Global HDD IPA context
*
@@ -2015,6 +2036,9 @@ int hdd_ipa_uc_ssr_deinit(void)
}
qdf_mutex_release(&hdd_ipa->ipa_lock);
+ if (hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx))
+ hdd_ipa_uc_sta_reset_sta_connected(hdd_ipa);
+
/* Full IPA driver cleanup not required since wlan driver is now
* unloaded and reloaded after SSR.
*/