wlan: Correcting timeout value for event driver_crda_req.
The driver is waiting on event 'driver_crda_req' for 3 seconds
instead of 300ms. The function is expecting the the time in
jiffies, so passing the time value in jiffies.
Adding debug logs in case of timeout happens.
CRs-Fixed: 524133
Change-Id: Iad7a01bd2537d3bb15c73116c222f067378bafef
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 45a5875..936b47a 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -789,13 +789,22 @@
int wlan_hdd_get_crda_regd_entry(struct wiphy *wiphy, hdd_config_t *pCfg)
{
hdd_context_t *pHddCtx = wiphy_priv(wiphy);
+ int status;
+
if (memcmp(pCfg->crdaDefaultCountryCode,
CFG_CRDA_DEFAULT_COUNTRY_CODE_DEFAULT , 2) != 0)
{
- init_completion(&pHddCtx->driver_crda_req);
+ INIT_COMPLETION(pHddCtx->driver_crda_req);
regulatory_hint(wiphy, pCfg->crdaDefaultCountryCode);
- wait_for_completion_interruptible_timeout(&pHddCtx->driver_crda_req,
- CRDA_WAIT_TIME);
+ status = wait_for_completion_interruptible_timeout(
+ &pHddCtx->driver_crda_req,
+ msecs_to_jiffies(CRDA_WAIT_TIME));
+ if (!status)
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR,"%s: timeout waiting for CRDA REQ",
+ __func__);
+ }
+
/* if the country is not found from current regulatory.bin,
fall back to world domain */
if (is_crda_regulatory_entry_valid() == VOS_FALSE)