summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajeev Kumar <quic_rajekuma@quicinc.com>2020-06-26 12:08:59 +0530
committerPaul Chen <chenpaul@google.com>2020-06-30 05:50:58 +0000
commit6e0025c17f580c528d9165413d89807232a31b2f (patch)
treebbdc4aec95dafc35ce007f66efbc2c02f8fe0ff2
parentfc4ec5fed3f0f9cfbbf638020e4e97c113e3a9d7 (diff)
downloadqcacld-android-msm-sunfish-4.14-r-beta-3.tar.gz
TDLS Sta not initiating Add BA request or responding to Add BA request from peer. While forming TDLS connection legacy rate is set to zero even though the peer capabilities supports OFDM rates. The set of available rates from supplicant was compared with config and rates is populated, causing the issue. Fix, to apply the correct rates provided from supplicant Change-Id: I5246ecd4b32039b8d318614fc418450bf5a11a14 change-ID: I66ce1b0ee4e5f96f9bb755a40ff7d8c46176087c CRs-Fixed: 2719391 Bug: 159368202 Signed-off-by: Rajeev Kumar <quic_rajekuma@quicinc.com>
-rw-r--r--core/mac/src/pe/lim/lim_process_tdls.c99
1 files changed, 16 insertions, 83 deletions
diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c
index 745e1ff80e..e6ecf8a40e 100644
--- a/core/mac/src/pe/lim/lim_process_tdls.c
+++ b/core/mac/src/pe/lim/lim_process_tdls.c
@@ -2258,8 +2258,7 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
tDot11fIEVHTCaps *vht_caps)
{
tSirMacRateSet temp_rate_set;
- uint32_t i, j, val, min, is_a_rate;
- tSirMacRateSet temp_rate_set2;
+ uint32_t i, j, val, is_a_rate;
uint32_t phymode;
uint8_t mcsSet[SIZE_OF_SUPPORTED_MCS_SET];
tpSirSupportedRates rates;
@@ -2268,70 +2267,9 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
uint8_t nss;
is_a_rate = 0;
- temp_rate_set2.numRates = 0;
lim_get_phy_mode(mac_ctx, &phymode, NULL);
- /* get own rate set */
- val = WNI_CFG_OPERATIONAL_RATE_SET_LEN;
- if (wlan_cfg_get_str(mac_ctx, WNI_CFG_OPERATIONAL_RATE_SET,
- (uint8_t *) &temp_rate_set.rate,
- &val) != QDF_STATUS_SUCCESS) {
- /* Could not get rateset from CFG. Log error. */
- pe_err("could not retrieve rateset");
- val = 0;
- }
- temp_rate_set.numRates = val;
-
- if (phymode == WNI_CFG_PHY_MODE_11G) {
- /* get own extended rate set */
- val = WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET_LEN;
- if (wlan_cfg_get_str(mac_ctx,
- WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET,
- (uint8_t *) &temp_rate_set2.rate,
- &val) != QDF_STATUS_SUCCESS)
- temp_rate_set2.numRates = val;
- }
-
- if ((temp_rate_set.numRates + temp_rate_set2.numRates) > 12) {
- pe_err("more than 12 rates in CFG");
- return QDF_STATUS_E_FAILURE;
- }
-
- /**
- * Handling of the rate set IEs is the following:
- * - keep only rates that we support and that the station supports
- * - sort and the rates into the pSta->rate array
- */
-
- /* Copy all rates in temp_rate_set, there are 12 rates max */
- for (i = 0; i < temp_rate_set2.numRates; i++)
- temp_rate_set.rate[i + temp_rate_set.numRates] =
- temp_rate_set2.rate[i];
-
- temp_rate_set.numRates += temp_rate_set2.numRates;
-
- /**
- * Sort rates in temp_rate_set (they are likely to be already sorted)
- * put the result in temp_rate_set2
- */
- temp_rate_set2.numRates = 0;
-
- for (i = 0; i < temp_rate_set.numRates; i++) {
- min = 0;
- val = 0xff;
-
- for (j = 0; j < temp_rate_set.numRates; j++)
- if ((uint32_t) (temp_rate_set.rate[j] & 0x7f) < val) {
- val = temp_rate_set.rate[j] & 0x7f;
- min = j;
- }
-
- temp_rate_set2.rate[temp_rate_set2.numRates++] =
- temp_rate_set.rate[min];
- temp_rate_set.rate[min] = 0xff;
- }
-
/**
* Copy received rates in temp_rate_set, the parser has ensured
* unicity of the rates so there cannot be more than 12 .
@@ -2350,27 +2288,22 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
rates = &stads->supportedRates;
qdf_mem_zero((uint8_t *) rates, sizeof(tSirSupportedRates));
- for (i = 0; i < temp_rate_set2.numRates; i++) {
- for (j = 0; j < temp_rate_set.numRates; j++) {
- if ((temp_rate_set2.rate[i] & 0x7F) !=
- (temp_rate_set.rate[j] & 0x7F))
- continue;
-
- if ((b_rateindex > SIR_NUM_11B_RATES) ||
- (a_rateindex > SIR_NUM_11A_RATES)) {
- pe_warn("Invalid number of rates (11b->%d, 11a->%d)",
+ for (j = 0; j < temp_rate_set.numRates; j++) {
+ if ((b_rateindex > SIR_NUM_11B_RATES) ||
+ (a_rateindex > SIR_NUM_11A_RATES)) {
+ pe_warn("Invalid number of rates (11b->%d, 11a->%d)",
b_rateindex, a_rateindex);
- return QDF_STATUS_E_FAILURE;
- }
- if (sirIsArate(temp_rate_set2.rate[i] & 0x7f)) {
- is_a_rate = 1;
- if (a_rateindex < SIR_NUM_11A_RATES)
- rates->llaRates[a_rateindex++] = temp_rate_set2.rate[i];
- } else {
- if (b_rateindex < SIR_NUM_11B_RATES)
- rates->llbRates[b_rateindex++] = temp_rate_set2.rate[i];
- }
- break;
+ return QDF_STATUS_E_FAILURE;
+ }
+ if (sirIsArate(temp_rate_set.rate[j] & 0x7f)) {
+ is_a_rate = 1;
+ if (a_rateindex < SIR_NUM_11A_RATES)
+ rates->llaRates[a_rateindex++] =
+ temp_rate_set.rate[j];
+ } else {
+ if (b_rateindex < SIR_NUM_11B_RATES)
+ rates->llbRates[b_rateindex++] =
+ temp_rate_set.rate[j];
}
}