qcacld-3.0: Fix set-band operation

Currently, in regulatory callback, we do not update channels
that are out-of-band. For example, if the current band is set
to 2.4 GHz, we do not update channels of 5 GHZ band. Now, if the
band gets changed, the channel list goes wrong. Fix this issue by
updating all the channels and then calling
wlan_hdd_cfg80211_update_band to update wiphy for the current
in-band channels.

Change-Id: If6d6fee01c7a7d6b2aa0f7d3acb862decce0819e
CRs-Fixed: 978660
diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c
index 5ddb11b..67ecde1 100644
--- a/core/hdd/src/wlan_hdd_regulatory.c
+++ b/core/hdd/src/wlan_hdd_regulatory.c
@@ -360,14 +360,6 @@
 
 	for (band_num = 0; band_num < IEEE80211_NUM_BANDS; band_num++) {
 
-		if (band_num == IEEE80211_BAND_2GHZ &&
-		    band_capability == eCSR_BAND_5G)
-			continue;
-
-		else if (band_num == IEEE80211_BAND_5GHZ &&
-			 band_capability == eCSR_BAND_24)
-			continue;
-
 		if (wiphy->bands[band_num] == NULL)
 			continue;
 
@@ -415,6 +407,8 @@
 		cds_chan = &(reg_channels[CHAN_ENUM_144]);
 		cds_chan->state = CHANNEL_STATE_DISABLE;
 	}
+
+	wlan_hdd_cfg80211_update_band(wiphy, band_capability);
 }
 
 
@@ -589,7 +583,6 @@
 		      struct regulatory_request *request)
 {
 	hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
-	eCsrBand band_capability = eCSR_BAND_ALL;
 	bool vht80_allowed;
 	bool reset = false;
 	uint8_t dfs_reg;
@@ -611,8 +604,6 @@
 		return;
 	}
 
-	sme_get_freq_band(hdd_ctx->hHal, &band_capability);
-
 	/* first check if this callback is in response to the driver callback */
 
 	switch (request->initiator) {