From 40c1783ccc3bdedbc6288c49edfe0a87ecc098c2 Mon Sep 17 00:00:00 2001 From: Amar Singhal Date: Fri, 31 Mar 2017 16:24:05 -0700 Subject: [PATCH] qcacmn: Remove 4.9 ghz channels from reg component 4.9 ghz channels would be added when we do different channel enumerations for different operating classes. Remove them now to simplify the reg component logic. Change-Id: Iceb199d5cc531a83b613101cdb61a78c9b0746c0 CRs-Fixed: 2002892 --- umac/regulatory/core/src/reg_services.c | 19 ++++++------------- umac/regulatory/core/src/reg_services.h | 14 +------------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/umac/regulatory/core/src/reg_services.c b/umac/regulatory/core/src/reg_services.c index a1db1bfe4275..248f6399474d 100644 --- a/umac/regulatory/core/src/reg_services.c +++ b/umac/regulatory/core/src/reg_services.c @@ -91,15 +91,6 @@ const struct chan_map channel_map[NUM_CHANNELS] = { [CHAN_ENUM_13] = {2472, 13}, [CHAN_ENUM_14] = {2484, 14}, - [CHAN_ENUM_183] = {4915, 183}, - [CHAN_ENUM_184] = {4920, 184}, - [CHAN_ENUM_185] = {4925, 185}, - [CHAN_ENUM_187] = {4935, 187}, - [CHAN_ENUM_188] = {4940, 188}, - [CHAN_ENUM_189] = {4945, 189}, - [CHAN_ENUM_192] = {4960, 192}, - [CHAN_ENUM_196] = {4980, 196}, - [CHAN_ENUM_36] = {5180, 36}, [CHAN_ENUM_40] = {5200, 40}, [CHAN_ENUM_44] = {5220, 44}, @@ -1247,7 +1238,7 @@ QDF_STATUS reg_process_master_chan_list(struct cur_regulatory_info reg_rule_2g, num_2g_reg_rules, min_bw_2g, mas_chan_list); - populate_band_channels(CHAN_ENUM_36, CHAN_ENUM_196, + populate_band_channels(CHAN_ENUM_36, CHAN_ENUM_165, reg_rule_5g, num_5g_reg_rules, min_bw_5g, mas_chan_list); @@ -1290,7 +1281,7 @@ QDF_STATUS wlan_regulatory_psoc_obj_created_notification( mas_chan_list = soc_reg_obj->mas_chan_list; - for (chan_enum = CHAN_ENUM_1; chan_enum <= CHAN_ENUM_196; + for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) { mas_chan_list[chan_enum].chan_num = channel_map[chan_enum].chan_num; @@ -1401,7 +1392,8 @@ modify_chan_list_for_band(struct regulatory_channel enum channel_enum chan_enum; if (BAND_2G == band_val) { - for (chan_enum = CHAN_ENUM_36; chan_enum <= CHAN_ENUM_165; + for (chan_enum = MIN_5GHZ_CHANNEL; + chan_enum <= MAX_5GHZ_CHANNEL; chan_enum++) { chan_list[chan_enum].chan_flags |= REGULATORY_CHAN_DISABLED; @@ -1411,7 +1403,8 @@ modify_chan_list_for_band(struct regulatory_channel } if (BAND_5G == band_val) { - for (chan_enum = CHAN_ENUM_1; chan_enum <= CHAN_ENUM_14; + for (chan_enum = MIN_24GHZ_CHANNEL; + chan_enum <= MAX_24GHZ_CHANNEL; chan_enum++) { chan_list[chan_enum].chan_flags |= REGULATORY_CHAN_DISABLED; diff --git a/umac/regulatory/core/src/reg_services.h b/umac/regulatory/core/src/reg_services.h index cd3722b47d1a..eaeb75a79831 100644 --- a/umac/regulatory/core/src/reg_services.h +++ b/umac/regulatory/core/src/reg_services.h @@ -286,15 +286,6 @@ enum channel_enum { CHAN_ENUM_13, CHAN_ENUM_14, - CHAN_ENUM_183, - CHAN_ENUM_184, - CHAN_ENUM_185, - CHAN_ENUM_187, - CHAN_ENUM_188, - CHAN_ENUM_189, - CHAN_ENUM_192, - CHAN_ENUM_196, - CHAN_ENUM_36, CHAN_ENUM_40, CHAN_ENUM_44, @@ -330,12 +321,9 @@ enum channel_enum { NUM_24GHZ_CHANNELS = (MAX_24GHZ_CHANNEL - MIN_24GHZ_CHANNEL + 1), MIN_5GHZ_CHANNEL = CHAN_ENUM_36, - MAX_5GHZ_CHANNEL = CHAN_ENUM_196, + MAX_5GHZ_CHANNEL = CHAN_ENUM_165, NUM_5GHZ_CHANNELS = (MAX_5GHZ_CHANNEL - MIN_5GHZ_CHANNEL + 1), - MIN_49GHZ_CHANNEL = CHAN_ENUM_183, - MAX_49GHZ_CHANNEL = CHAN_ENUM_196, - INVALID_CHANNEL = 0xBAD, };