Преглед изворни кода

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
Amar Singhal пре 8 година
родитељ
комит
b2cb300cff
1 измењених фајлова са 6 додато и 2 уклоњено
  1. 6 2
      core/hdd/src/wlan_hdd_regulatory.c

+ 6 - 2
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);