wlan: FTM second start crash fix.

New WIPHY API, with FTM mode, WIPHY registration does not happen.
So, cfg80211 does not have WIPHY instance.
But when unload driver, try to un-register WIPHY.
As a result, cfg80211 will crash with NULL pointer access.
If FTM mode, do not try to un-register WIPHY.

Change-Id: I598bab112c0dc351e36270252b55ca3747047302
CRs-fixed: 546549
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index a718fac..4b99383 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -5090,7 +5090,12 @@
    }
 
 free_hdd_ctx:
-   wiphy_unregister(wiphy) ;
+   /* FTM mode, WIPHY did not registered
+      If un-register here, system crash will happen */
+   if (VOS_FTM_MODE != hdd_get_conparam())
+   {
+      wiphy_unregister(wiphy) ;
+   }
    wiphy_free(wiphy) ;
    if (hdd_is_ssr_required())
    {