qcacld-3.0: Wait for MC thread clean-up during IBSS leave

Ensure that wait for MC thread clean-up happens as part
of IBSS leave so that by the time upper stack calls the
change interface, we are all set to proceed further.

CRs-Fixed: 949956
Change-Id: Ib0ee79fe38cbf3c462bd8157c4e014c086f5c29f
This commit is contained in:
Chandrasekaran, Manishekar
2015-12-18 11:44:56 +05:30
committed by Akash Patel
부모 95a6dbc2a7
커밋 12a818a9a6

파일 보기

@@ -9320,6 +9320,7 @@ static int __wlan_hdd_cfg80211_leave_ibss(struct wiphy *wiphy,
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
int status; int status;
CDF_STATUS hal_status; CDF_STATUS hal_status;
unsigned long rc;
ENTER(); ENTER();
@@ -9364,6 +9365,18 @@ static int __wlan_hdd_cfg80211_leave_ibss(struct wiphy *wiphy,
hal_status); hal_status);
return -EAGAIN; return -EAGAIN;
} }
/* wait for mc thread to cleanup and then return to upper stack
* so by the time upper layer calls the change interface, we are
* all set to proceed further
*/
rc = wait_for_completion_timeout(&pAdapter->disconnect_comp_var,
msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT));
if (!rc) {
hdd_err("Failed to disconnect, timed out");
return -ETIMEDOUT;
}
EXIT(); EXIT();
return 0; return 0;
} }