Wlan: p2p_discovery fails when wifi is set to 5GHz in advanced settings.

P2P search will be done social channel i.e. 1, 6, and 11.So these
channels are required even when the device is operating in 5 GHz mode.
Whenever 5 GHz configured from the UI, the driver is assigning NULL to
wiphy->bands[IEEE80211_BAND_2GHZ]. Fixed the issue by assigning
wiphy->bands[IEEE80211_BAND_2GHZ = wlan_hdd_band_p2p_2_4_GHZ, which has
the social channel information. Even though HDD was getting the social
channels from wpa_supplicant, CSR was rejecting the 2.4GHz channels. We
have a check in csrScanCopyRequest function where CSR validate the
channel received from HDD with the channels set in Cfg. As we had set
the 5GHz channels inCfg during the update band, the check in CSR for
social channels were failing. To fix this issue added one more check for
scanRequest type for discovery.

Change-Id: Icfe8b9ce3e7612bbccea75cb7b8b531b1d22ccc9
CR-Fixed: 401980
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 5b9938f..9dea1c4 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -418,7 +418,11 @@
             wiphy->bands[IEEE80211_BAND_5GHZ] = NULL;
             break;
         case eCSR_BAND_5G:
+#ifdef WLAN_FEATURE_P2P
+            wiphy->bands[IEEE80211_BAND_2GHZ] = &wlan_hdd_band_p2p_2_4_GHZ;
+#else
             wiphy->bands[IEEE80211_BAND_2GHZ] = NULL;
+#endif
             wiphy->bands[IEEE80211_BAND_5GHZ] = &wlan_hdd_band_5_GHZ;
             break;
         case eCSR_BAND_ALL: