wlan: Reset CounrtyCode11d if CountryCodePriority is set.

If gCountryCodePriotity is set to 1 and last given country is through
11d, countryCode11d needs to reset to 00 so that when next time driver
is being reloaded driver knows about correct county code.
Instead 00 countrycode if driver pass xx, kernel won't be able to
find XX in db.txt and it will take 3 sec to set countrycode as 00.

CRs-Fixed: 676496
Change-Id: Iad5a1d999652fd2ba1357a8d8da399328d59b430
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 7c281e6..c766bc7 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -9348,6 +9348,7 @@
 {
    hdd_context_t *pHddCtx = NULL;
    v_CONTEXT_t pVosContext = NULL;
+   v_REGDOMAIN_t regId;
    unsigned long rc = 0;
 
    pr_info("%s: unloading driver v%s\n", WLAN_MODULE_NAME, QWLAN_VERSIONSTR);
@@ -9389,6 +9390,12 @@
       pHddCtx->isLoadUnloadInProgress = WLAN_HDD_UNLOAD_IN_PROGRESS;
       vos_set_load_unload_in_progress(VOS_MODULE_ID_VOSS, TRUE);
 
+      if (eANI_BOOLEAN_TRUE == sme_Is11dCountrycode(pHddCtx->hHal) &&
+              pHddCtx->cfg_ini->fSupplicantCountryCodeHasPriority )
+      {
+          vos_nv_getRegDomainFromCountryCode(&regId , "00", COUNTRY_USER);
+      }
+
       //Do all the cleanup before deregistering the driver
       hdd_wlan_exit(pHddCtx);
    }