diff options
| author | Abhishek Singh <absingh@qti.qualcomm.com> | 2016-05-17 14:09:16 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-05-19 13:09:32 +0530 |
| commit | 11279133c03cf8783ca08ecc2f876574f33dcd8e (patch) | |
| tree | ecf7888d367631bffc8e81530834c6f67a65ba22 | |
| parent | 8b48334dc21c39f4e775f6ffc3e7ae48324200c0 (diff) | |
qcacld-2.0: During unload avoid sending disconnect twice for IBSS
When leave ibss is called, disconnect ibss command is posted to
SME and leave ibss function returns without waiting for disconnect
to get complete.
Now if unload is started before ibss disconnect is completed, as
part of stop adapter again ibss disconnect command is posted to SME
as HDD state is still not disconnected.
The first disconnect sets the BSSID to zero and thus once second
disconnect calls disconnect handler, warning is seen as BSSID passed
to ipa event handler is zero.
As part of fix add wait for disconnect completion in leave ibss and
move the BSSID check after SAP device mode check.
Change-Id: I83cdac1514833d21aa19052cde9b32476348f0c4
CRs-Fixed: 1017319
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 9 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_ipa.c | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 73ebafa83395..a39c683ddbd1 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -19390,6 +19390,15 @@ static int __wlan_hdd_cfg80211_leave_ibss(struct wiphy *wiphy, FL("sme_RoamDisconnect failed hal_status(%d)"), hal_status); return -EAGAIN; } + status = wait_for_completion_timeout( + &pAdapter->disconnect_comp_var, + msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT)); + if (!status) { + hddLog(LOGE, + FL("wait on disconnect_comp_var failed")); + return -ETIMEDOUT;; + } + EXIT(); return 0; } diff --git a/CORE/HDD/src/wlan_hdd_ipa.c b/CORE/HDD/src/wlan_hdd_ipa.c index e85dbe551c1c..95c7bd78a1e2 100644 --- a/CORE/HDD/src/wlan_hdd_ipa.c +++ b/CORE/HDD/src/wlan_hdd_ipa.c @@ -4093,9 +4093,6 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, if (type >= IPA_WLAN_EVENT_MAX) return -EINVAL; - if (WARN_ON(is_zero_ether_addr(mac_addr))) - return -EINVAL; - if (!hdd_ipa || !hdd_ipa_is_enabled(hdd_ipa->hdd_ctx)) { HDD_IPA_LOG(VOS_TRACE_LEVEL_ERROR, "IPA OFFLOAD NOT ENABLED"); return -EINVAL; @@ -4110,6 +4107,9 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, return 0; } + if (WARN_ON(is_zero_ether_addr(mac_addr))) + return -EINVAL; + /* During IPA UC resource loading/unloading * new event issued. * Store event seperatly and handle later */ |
