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
This commit is contained in:
tinlin 2019-06-03 16:13:20 +08:00 • committed by nshrivas
commit 5d3721d68f

View file

@ -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;