diff options
| author | CNSS_WLAN Service <cnssbldsw@qualcomm.com> | 2018-06-29 01:17:45 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-06-29 01:17:45 -0700 |
| commit | 2fc97a371c2d4d82e7e78ea0bc9d66772820966b (patch) | |
| tree | 3decc77c5504b5b430baf70d8691b241a4026e3d | |
| parent | 5ebce7a2a0b036c7f46ba737d028417d59d4f2f8 (diff) | |
| parent | f0d676510649ca68eab5bc707012b8366c762f93 (diff) | |
Merge "qcacld-2.0: Enable 802.11p channel configuration from ini" into wlan-cld2.driver.lnx.1.0
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 113 | ||||
| -rw-r--r-- | CORE/MAC/inc/wni_cfg.h | 4 | ||||
| -rw-r--r-- | CORE/VOSS/src/vos_nvitem.c | 4 | ||||
| -rw-r--r-- | wcnss/inc/wlan_nv.h | 3 |
4 files changed, 85 insertions, 39 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 3129e95197dd..1ad52a2cd927 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -311,23 +311,29 @@ const static struct ieee80211_channel hdd_channels_5_GHZ[] = HDD5GHZCHAN(5785,157, 0) , HDD5GHZCHAN(5805,161, 0) , HDD5GHZCHAN(5825,165, 0) , -#ifndef FEATURE_STATICALLY_ADD_11P_CHANNELS - HDD5GHZCHAN(5852,170, 0) , - HDD5GHZCHAN(5855,171, 0) , - HDD5GHZCHAN(5860,172, 0) , - HDD5GHZCHAN(5865,173, 0) , - HDD5GHZCHAN(5870,174, 0) , - HDD5GHZCHAN(5875,175, 0) , - HDD5GHZCHAN(5880,176, 0) , - HDD5GHZCHAN(5885,177, 0) , - HDD5GHZCHAN(5890,178, 0) , - HDD5GHZCHAN(5895,179, 0) , - HDD5GHZCHAN(5900,180, 0) , - HDD5GHZCHAN(5905,181, 0) , - HDD5GHZCHAN(5910,182, 0) , - HDD5GHZCHAN(5915,183, 0) , - HDD5GHZCHAN(5920,184, 0) , -#endif +}; + +static const struct ieee80211_channel hdd_etsi_srd_chan[] = { + HDD5GHZCHAN(5845, 169, 0), + HDD5GHZCHAN(5865, 173, 0), +}; + +static const struct ieee80211_channel hdd_channels_dot11p[] = { + HDD5GHZCHAN(5852, 170, 0), + HDD5GHZCHAN(5855, 171, 0), + HDD5GHZCHAN(5860, 172, 0), + HDD5GHZCHAN(5865, 173, 0), + HDD5GHZCHAN(5870, 174, 0), + HDD5GHZCHAN(5875, 175, 0), + HDD5GHZCHAN(5880, 176, 0), + HDD5GHZCHAN(5885, 177, 0), + HDD5GHZCHAN(5890, 178, 0), + HDD5GHZCHAN(5895, 179, 0), + HDD5GHZCHAN(5900, 180, 0), + HDD5GHZCHAN(5905, 181, 0), + HDD5GHZCHAN(5910, 182, 0), + HDD5GHZCHAN(5915, 183, 0), + HDD5GHZCHAN(5920, 184, 0), }; static struct ieee80211_rate g_mode_rates[] = @@ -15976,26 +15982,63 @@ int wlan_hdd_cfg80211_init(struct device *dev, vos_mem_copy(wiphy->bands[IEEE80211_BAND_2GHZ]->channels, &hdd_channels_2_4_GHZ[0], sizeof(hdd_channels_2_4_GHZ)); - if (hdd_is_5g_supported(pHddCtx) && - ((eHDD_DOT11_MODE_11b != pCfg->dot11Mode) && - (eHDD_DOT11_MODE_11g != pCfg->dot11Mode) && - (eHDD_DOT11_MODE_11b_ONLY != pCfg->dot11Mode) && - (eHDD_DOT11_MODE_11g_ONLY != pCfg->dot11Mode))) - { + if (hdd_is_5g_supported(pHddCtx) && + ((eHDD_DOT11_MODE_11b != pCfg->dot11Mode) && + (eHDD_DOT11_MODE_11g != pCfg->dot11Mode) && + (eHDD_DOT11_MODE_11b_ONLY != pCfg->dot11Mode) && + (eHDD_DOT11_MODE_11g_ONLY != pCfg->dot11Mode))) + { wiphy->bands[IEEE80211_BAND_5GHZ] = &wlan_hdd_band_5_GHZ; - wiphy->bands[IEEE80211_BAND_5GHZ]->channels = - vos_mem_malloc(sizeof(hdd_channels_5_GHZ)); - if (wiphy->bands[IEEE80211_BAND_5GHZ]->channels == NULL) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("Not enough memory to allocate channels")); - vos_mem_free(wiphy->bands[IEEE80211_BAND_2GHZ]->channels); - wiphy->bands[IEEE80211_BAND_2GHZ]->channels = NULL; - return -ENOMEM; + + if (pCfg->dot11p_mode) { + wiphy->bands[IEEE80211_BAND_5GHZ]->channels = + vos_mem_malloc(sizeof(hdd_channels_5_GHZ) + + sizeof(hdd_channels_dot11p)); + if (wiphy->bands[IEEE80211_BAND_5GHZ]->channels == NULL) { + hddLog(VOS_TRACE_LEVEL_ERROR, + FL("Not enough memory to allocate channels")); + vos_mem_free(wiphy->bands[IEEE80211_BAND_2GHZ]->channels); + wiphy->bands[IEEE80211_BAND_2GHZ]->channels = NULL; + return -ENOMEM; + } + wiphy->bands[IEEE80211_BAND_5GHZ]->n_channels = + ARRAY_SIZE(hdd_channels_5_GHZ) + + ARRAY_SIZE(hdd_channels_dot11p); + + vos_mem_copy(wiphy->bands[IEEE80211_BAND_5GHZ]->channels, + &hdd_channels_5_GHZ[0], + sizeof(hdd_channels_5_GHZ)); + + vos_mem_copy((char *)wiphy->bands[IEEE80211_BAND_5GHZ]->channels + + sizeof(hdd_channels_5_GHZ), + &hdd_channels_dot11p[0], + sizeof(hdd_channels_dot11p)); + } else { + + wiphy->bands[IEEE80211_BAND_5GHZ]->channels = + vos_mem_malloc(sizeof(hdd_channels_5_GHZ) + + sizeof(hdd_etsi_srd_chan)); + if (wiphy->bands[IEEE80211_BAND_5GHZ]->channels == NULL) { + hddLog(VOS_TRACE_LEVEL_ERROR, + FL("Not enough memory to allocate channels")); + vos_mem_free(wiphy->bands[IEEE80211_BAND_2GHZ]->channels); + wiphy->bands[IEEE80211_BAND_2GHZ]->channels = NULL; + return -ENOMEM; + } + wiphy->bands[IEEE80211_BAND_5GHZ]->n_channels = + ARRAY_SIZE(hdd_channels_5_GHZ) + + ARRAY_SIZE(hdd_etsi_srd_chan); + + vos_mem_copy(wiphy->bands[IEEE80211_BAND_5GHZ]->channels, + &hdd_channels_5_GHZ[0], + sizeof(hdd_channels_5_GHZ)); + + vos_mem_copy((char *)wiphy->bands[IEEE80211_BAND_5GHZ]->channels + + sizeof(hdd_channels_5_GHZ), + &hdd_etsi_srd_chan[0], + sizeof(hdd_etsi_srd_chan)); } - vos_mem_copy(wiphy->bands[IEEE80211_BAND_5GHZ]->channels, - &hdd_channels_5_GHZ[0], - sizeof(hdd_channels_5_GHZ)); - } + } for (i = 0; i < IEEE80211_NUM_BANDS; i++) { diff --git a/CORE/MAC/inc/wni_cfg.h b/CORE/MAC/inc/wni_cfg.h index 146312f9466d..806f1a6b6586 100644 --- a/CORE/MAC/inc/wni_cfg.h +++ b/CORE/MAC/inc/wni_cfg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -563,7 +563,7 @@ enum { #define WNI_CFG_LISTEN_INTERVAL_STADEF 1 #define WNI_CFG_CURRENT_CHANNEL_STAMIN 0 -#define WNI_CFG_CURRENT_CHANNEL_STAMAX 165 +#define WNI_CFG_CURRENT_CHANNEL_STAMAX 173 #define WNI_CFG_CURRENT_CHANNEL_STADEF 1 #define WNI_CFG_DEFAULT_RATE_INDEX_5GHZ_STAMIN 0 diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c index d5d00d18edfb..e4e2a73c6697 100644 --- a/CORE/VOSS/src/vos_nvitem.c +++ b/CORE/VOSS/src/vos_nvitem.c @@ -143,7 +143,8 @@ static const struct bonded_chan bonded_chan_40mhz_array[] = { {132, 136}, {140, 144}, {149, 153}, - {157, 161} + {157, 161}, + {165, 169} }; static const struct bonded_chan bonded_chan_80mhz_array[] = { @@ -532,6 +533,7 @@ const tRfChannelProps rfChannels[NUM_RF_CHANNELS] = { 5785, 157, RF_SUBBAND_5_HIGH_GHZ}, //RF_CHAN_157, { 5805, 161, RF_SUBBAND_5_HIGH_GHZ}, //RF_CHAN_161, { 5825, 165, RF_SUBBAND_5_HIGH_GHZ}, //RF_CHAN_165, + { 5845, 169, RF_SUBBAND_5_HIGH_GHZ}, //RF_CHAN_169, /* 5.9GHz 10 MHz bandwidth (802.11p) */ { 5852, 170, RF_SUBBAND_5_HIGH_GHZ}, //RF_CHAN_170, diff --git a/wcnss/inc/wlan_nv.h b/wcnss/inc/wlan_nv.h index 01d0460920f0..16f11f685dd6 100644 --- a/wcnss/inc/wlan_nv.h +++ b/wcnss/inc/wlan_nv.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012, 2016, 2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -276,6 +276,7 @@ typedef enum RF_CHAN_157, RF_CHAN_161, RF_CHAN_165, + RF_CHAN_169, // 802.11p RF_CHAN_170, |
