From 5d3721d68fae710b560f1fdcb295c26a94b7dbe9 Mon Sep 17 00:00:00 2001 From: tinlin Date: Mon, 3 Jun 2019 16:13:20 +0800 Subject: [PATCH] qcacld-3.0: Not update wiphy band if registered Wiphy updates band in insmod time. When wiphy is registered, updating wiphy band a second time sets chan_flags of wiphy to all zeros. That results wrong wiphy chan_flags in hdd_send_wiphy_regd_sync_event. Add wiphy registered judgement in wlan_hdd_update_wiphy_supported_band. Change-Id: Iac094eea5ac2abcf068de7a35f00bdbf892e55a4 CRs-Fixed: 2452965 --- core/hdd/src/wlan_hdd_cfg80211.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 740538a635c2..8cb9d238700f 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -13857,6 +13857,9 @@ QDF_STATUS wlan_hdd_update_wiphy_supported_band(struct hdd_context *hdd_ctx) struct hdd_config *cfg = hdd_ctx->config; struct wiphy *wiphy = hdd_ctx->wiphy; + if (wiphy->registered) + return QDF_STATUS_SUCCESS; + if (!hdd_ctx->channels_2ghz) return QDF_STATUS_E_NOMEM; wiphy->bands[HDD_NL80211_BAND_2GHZ] = &wlan_hdd_band_2_4_ghz;