From b2cb300cff7399d6a9b0d4371f58c3532b04e94b Mon Sep 17 00:00:00 2001 From: Amar Singhal Date: Thu, 11 Aug 2016 16:10:36 -0700 Subject: [PATCH] qcacld-3.0: Conditionally disable channel 144 in wiphy If channel 144 is disabled in service ready event, host is only disabling the channel in corestack. Fix that by also disabling the channel in wiphy, which is used by kernel and user-space. Change-Id: I4222aef646ede78d97b554faaf7f0c5b627feec0 CRs-Fixed: 1054102 --- core/hdd/src/wlan_hdd_regulatory.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index c96f8ef38ecf..69218fba8a9e 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -365,8 +365,8 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx, { int band_num; int chan_num; - int chan_enum = 0; - struct ieee80211_channel *wiphy_chan; + enum channel_enum chan_enum = CHAN_ENUM_1; + struct ieee80211_channel *wiphy_chan, *wiphy_chan_144 = NULL; struct regulatory_channel *cds_chan; uint8_t band_capability; @@ -385,6 +385,8 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx, wiphy_chan = &(wiphy->bands[band_num]->channels[chan_num]); cds_chan = &(reg_channels[chan_enum]); + if (CHAN_ENUM_144 == chan_enum) + wiphy_chan_144 = wiphy_chan; chan_enum++; @@ -426,6 +428,8 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx, (1 << WHAL_REG_EXT_FCC_CH_144))) { cds_chan = &(reg_channels[CHAN_ENUM_144]); cds_chan->state = CHANNEL_STATE_DISABLE; + if (NULL != wiphy_chan_144) + wiphy_chan_144->flags |= IEEE80211_CHAN_DISABLED; } wlan_hdd_cfg80211_update_band(wiphy, band_capability);