mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
qcacld-3.0: Skip DSRC channels in TDLS operation
qcacld-2.0 to qcacld-3.0 propagation We do not support TDLS on DSRC AND DFS channels so skip these channels in the TDLS frames. Change-Id: I3ad523ab21d1383df189d3856f6e0759b1a2bb6a CRs-Fixed: 975657
This commit is contained in:
parent
7ba24ffc9e
commit
63f64ddbaf
3 changed files with 23 additions and 57 deletions
|
|
@ -645,39 +645,6 @@ bool cds_is_dsrc_channel(uint16_t center_freq)
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* cds_skip_dfs_and_2g() - skip dfs and 2g band channels
|
||||
* @rf_channel: input channel enum to know, whether to skip or add the channel
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
uint8_t cds_skip_dfs_and_2g(uint32_t rf_channel)
|
||||
{
|
||||
uint32_t channel_loop;
|
||||
enum channel_enum channel = INVALID_CHANNEL;
|
||||
uint8_t ret = false;
|
||||
|
||||
for (channel_loop = CHAN_ENUM_36;
|
||||
channel_loop <= CHAN_ENUM_184; channel_loop++) {
|
||||
if (CDS_CHANNEL_NUM(channel_loop) == rf_channel) {
|
||||
channel = (enum channel_enum)channel_loop;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (INVALID_CHANNEL == channel) {
|
||||
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
||||
"Invalid channel %d", rf_channel);
|
||||
ret = true;
|
||||
goto exit_ok;
|
||||
}
|
||||
|
||||
if (CHANNEL_STATE_DFS == CDS_CHANNEL_STATE(channel))
|
||||
ret = true;
|
||||
exit_ok:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* cds_set_reg_domain() - set regulatory domain
|
||||
* @client_ctxt: client context
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@
|
|||
#include "dph_hash_table.h"
|
||||
#include "wma_types.h"
|
||||
#include "cds_regdomain.h"
|
||||
#include "cds_utils.h"
|
||||
|
||||
/* define NO_PAD_TDLS_MIN_8023_SIZE to NOT padding: See CR#447630
|
||||
There was IOT issue with cisco 1252 open mode, where it pads
|
||||
|
|
@ -2674,21 +2675,22 @@ void populate_dot11f_tdls_offchannel_params(tpAniSirGlobal pMac,
|
|||
|
||||
/* validating the channel list for DFS and 2G channels */
|
||||
for (i = 0U; i < numChans; i++) {
|
||||
if (band == eCSR_BAND_24) {
|
||||
if (CHANNEL_STATE_DFS ==
|
||||
cds_get_channel_state(validChan[i])) {
|
||||
lim_log(pMac, LOG1,
|
||||
FL("skipping DFS channel %d from the valid channel list"),
|
||||
validChan[i]);
|
||||
continue;
|
||||
}
|
||||
} else if ((NSS_2x2_MODE == nss_5g) &&
|
||||
(NSS_1x1_MODE == nss_2g) &&
|
||||
(true == cds_skip_dfs_and_2g(validChan[i]))) {
|
||||
if ((band == eCSR_BAND_5G) &&
|
||||
(NSS_2x2_MODE == nss_5g) &&
|
||||
(NSS_1x1_MODE == nss_2g) &&
|
||||
(true == CDS_IS_DFS_CH(validChan[i]))) {
|
||||
lim_log(pMac, LOG1,
|
||||
FL("skipping channel %d, nss_5g: %d, nss_2g: %d"),
|
||||
validChan[i], nss_5g, nss_2g);
|
||||
continue;
|
||||
} else {
|
||||
if (true == cds_is_dsrc_channel(
|
||||
cds_chan_to_freq(validChan[i]))) {
|
||||
lim_log(pMac, LOG1,
|
||||
FL("skipping channel %d from the valid channel list"),
|
||||
validChan[i]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (valid_count >= ARRAY_SIZE(suppChannels->bands))
|
||||
|
|
|
|||
|
|
@ -10126,19 +10126,16 @@ QDF_STATUS sme_update_tdls_peer_state(tHalHandle hHal,
|
|||
num = 0;
|
||||
for (i = 0; i < peerStateParams->peerCap.peerChanLen; i++) {
|
||||
chanId = peerStateParams->peerCap.peerChan[i];
|
||||
if (!csr_roam_is_channel_valid(pMac, chanId))
|
||||
continue;
|
||||
peer_cap->peerChan[num].chanId = chanId;
|
||||
peer_cap->peerChan[num].pwr =
|
||||
csr_get_cfg_max_tx_power(pMac, chanId);
|
||||
|
||||
if (cds_get_channel_state(chanId) == CHANNEL_STATE_DFS)
|
||||
peer_cap->peerChan[num].dfsSet =
|
||||
true;
|
||||
else
|
||||
peer_cap->peerChan[num].dfsSet =
|
||||
false;
|
||||
num++;
|
||||
if (csr_roam_is_channel_valid(pMac, chanId) &&
|
||||
!(cds_get_channel_state(chanId) ==
|
||||
CHANNEL_STATE_DFS) &&
|
||||
!cds_is_dsrc_channel(cds_chan_to_freq(chanId))) {
|
||||
peer_cap->peerChan[num].chanId = chanId;
|
||||
peer_cap->peerChan[num].pwr =
|
||||
csr_get_cfg_max_tx_power(pMac, chanId);
|
||||
peer_cap->peerChan[num].dfsSet = false;
|
||||
num++;
|
||||
}
|
||||
}
|
||||
peer_cap->peerChanLen = num;
|
||||
peer_cap->peerOperClassLen =
|
||||
|
|
|
|||
Loading…
Reference in a new issue