qcacmn: Have same rows orders for the channel enums and channel maps

In many functions, in the regulatory component
(e.g reg_modify_chan_list_for_freq_range), the channel enum iterations
assumes the channel enums and channel maps have the same order so that
there is a one-to-one mapping.

The change I5fe2c7a5db44f1cf8d6cb6317396c4527482137c removed
(compile-conditionally) a few channels. The removal violated the one-to-one
mapping principle. This led to 2Ghz channels being added to 5Ghz only
radio, which in turn caused many auto-channel selection issues and test
failures.

Instead of removing the channels, add (compile-conditionally) invalid
channels to maintain the one-to-one mapping.

Change-Id: I023de9732e02d52e544199b77680e9f7706d5210
CRs-Fixed: 2612990
This commit is contained in:
Vignesh U 2020-02-02 23:05:46 +05:30 • committed by nshrivas
commit d2c03e6a74

View file

@ -259,10 +259,16 @@ const struct chan_map channel_map_us[NUM_CHANNELS] = {
[CHAN_ENUM_5850] = {5850, 170, 2, 160},
[CHAN_ENUM_5855] = {5855, 171, 2, 160},
[CHAN_ENUM_5860] = {5860, 172, 2, 160},
#else
[CHAN_ENUM_5850] = {5850, INVALID_CHANNEL_NUM, 2, 160},
[CHAN_ENUM_5855] = {5855, INVALID_CHANNEL_NUM, 2, 160},
[CHAN_ENUM_5860] = {5860, INVALID_CHANNEL_NUM, 2, 160},
#endif
[CHAN_ENUM_5865] = {5865, 173, 2, 160},
#ifdef WLAN_FEATURE_DSRC
[CHAN_ENUM_5870] = {5870, 174, 2, 160},
#else
[CHAN_ENUM_5870] = {5870, INVALID_CHANNEL_NUM, 2, 160},
#endif
[CHAN_ENUM_5875] = {5875, 175, 2, 160},
[CHAN_ENUM_5880] = {5880, 176, 2, 160},