summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiran Kumar Lokere <klokere@codeaurora.org>2016-05-02 19:36:19 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-06-27 18:18:26 -0700
commit6671abdf19ccf4ee6e0c0b44f1104cebe66d4e4d (patch)
treef76f0500318912ca39976587177d4f20b6995ae5
parent53981334dac85c71c40da12598e87cd7d1181c68 (diff)
qcacld-3.0: Fix the Nss config issues in IBSS and TDLS mode
qcacld-2.0 to qcacld-3.0 propagation Advertise the HT and VHT MCS in TDLS setup action frames based on TDLS per band Nss configuration. Populate the VHT and HT MCS based on vdev Nss value of that session and send the correct Nss values to FW to use appropriate rates in Tx. Change-Id: I94991df3af575f1ffa61a7adabfe0e7586e95cef CRs-Fixed: 886415
-rw-r--r--core/mac/src/pe/lim/lim_assoc_utils.c32
-rw-r--r--core/mac/src/pe/lim/lim_process_tdls.c46
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/parser_api.c25
3 files changed, 79 insertions, 24 deletions
diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c
index 2a1dfec655e9..c900e700894f 100644
--- a/core/mac/src/pe/lim/lim_assoc_utils.c
+++ b/core/mac/src/pe/lim/lim_assoc_utils.c
@@ -1355,7 +1355,8 @@ lim_decide_short_slot(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds,
tSirRetStatus lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
tpSirSupportedRates rates,
tDot11fIEVHTCaps *peer_vht_caps,
- tpPESession session_entry)
+ tpPESession session_entry,
+ uint8_t nss)
{
uint32_t val;
uint32_t self_sta_dot11mode = 0;
@@ -1399,6 +1400,15 @@ tSirRetStatus lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
}
rates->vhtTxHighestDataRate = (uint16_t) val;
+ if (NSS_1x1_MODE == nss) {
+ rates->vhtRxMCSMap |= VHT_MCS_1x1;
+ rates->vhtTxMCSMap |= VHT_MCS_1x1;
+ rates->vhtTxHighestDataRate =
+ VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
+ rates->vhtRxHighestDataRate =
+ VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
+ }
+
if ((peer_vht_caps == NULL) || (!peer_vht_caps->present))
return eSIR_SUCCESS;
@@ -1409,7 +1419,7 @@ tSirRetStatus lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
QDF_MIN(rates->vhtRxHighestDataRate,
peer_vht_caps->rxHighSupDataRate);
- if (session_entry && session_entry->vdev_nss == 2) {
+ if (session_entry && session_entry->vdev_nss == NSS_2x2_MODE) {
if (mac_ctx->lteCoexAntShare &&
IS_24G_CH(session_entry->currentOperChannel)) {
if (IS_2X2_CHAIN(session_entry->chainMask))
@@ -1465,8 +1475,8 @@ tSirRetStatus lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
}
lim_log(mac_ctx, LOG1,
- FL("enable2x2 - %d vhtRxMCSMap - %x vhtTxMCSMap - %x\n"),
- mac_ctx->roam.configParam.enable2x2,
+ FL("enable2x2 - %d nss %d vhtRxMCSMap - %x vhtTxMCSMap - %x"),
+ mac_ctx->roam.configParam.enable2x2, nss,
rates->vhtRxMCSMap, rates->vhtTxMCSMap);
if (NULL != session_entry) {
@@ -1627,7 +1637,7 @@ lim_populate_own_rate_set(tpAniSirGlobal mac_ctx,
return eSIR_FAILURE;
}
- if (session_entry->vdev_nss == 1)
+ if (session_entry->vdev_nss == NSS_1x1_MODE)
rates->supportedMCSSet[1] = 0;
/*
* if supported MCS Set of the peer is passed in,
@@ -1646,7 +1656,8 @@ lim_populate_own_rate_set(tpAniSirGlobal mac_ctx,
PELOG2(lim_log(mac_ctx, LOG2, FL("%x "),
rates->supportedMCSSet[i]);)
}
- lim_populate_vht_mcs_set(mac_ctx, rates, vht_caps, session_entry);
+ lim_populate_vht_mcs_set(mac_ctx, rates, vht_caps,
+ session_entry, session_entry->vdev_nss);
return eSIR_SUCCESS;
}
@@ -1768,7 +1779,7 @@ lim_populate_peer_rate_set(tpAniSirGlobal pMac,
)
return eSIR_FAILURE;
}
- if (psessionEntry->vdev_nss == 1)
+ if (psessionEntry->vdev_nss == NSS_1x1_MODE)
pRates->supportedMCSSet[1] = 0;
/* if supported MCS Set of the peer is passed in, then do the
@@ -1791,7 +1802,8 @@ lim_populate_peer_rate_set(tpAniSirGlobal pMac,
lim_log(pMac, LOG1, FL("HT supported nss 1x1: %d"),
psessionEntry->supported_nss_1x1);
}
- lim_populate_vht_mcs_set(pMac, pRates, pVHTCaps, psessionEntry);
+ lim_populate_vht_mcs_set(pMac, pRates, pVHTCaps,
+ psessionEntry, psessionEntry->vdev_nss);
return eSIR_SUCCESS;
} /*** lim_populate_peer_rate_set() ***/
@@ -1997,7 +2009,7 @@ tSirRetStatus lim_populate_matching_rate_set(tpAniSirGlobal mac_ctx,
return eSIR_FAILURE;
}
- if (session_entry->vdev_nss == 1)
+ if (session_entry->vdev_nss == NSS_1x1_MODE)
mcs_set[1] = 0;
for (i = 0; i < val; i++)
@@ -2013,7 +2025,7 @@ tSirRetStatus lim_populate_matching_rate_set(tpAniSirGlobal mac_ctx,
}
}
lim_populate_vht_mcs_set(mac_ctx, &sta_ds->supportedRates, vht_caps,
- session_entry);
+ session_entry, session_entry->vdev_nss);
/*
* Set the erpEnabled bit if the phy is in G mode and at least
* one A rate is supported
diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c
index 53ec5b0ab084..95651285d9f1 100644
--- a/core/mac/src/pe/lim/lim_process_tdls.c
+++ b/core/mac/src/pe/lim/lim_process_tdls.c
@@ -106,7 +106,8 @@ void lim_log_vht_cap(tpAniSirGlobal pMac, tDot11fIEVHTCaps *pDot11f);
tSirRetStatus lim_populate_vht_mcs_set(tpAniSirGlobal pMac,
tpSirSupportedRates pRates,
tDot11fIEVHTCaps *pPeerVHTCaps,
- tpPESession psessionEntry);
+ tpPESession psessionEntry,
+ uint8_t nss);
ePhyChanBondState lim_get_htcb_state(ePhyChanBondState aniCBMode);
/*
@@ -539,9 +540,22 @@ static void populate_dot11f_tdls_ht_vht_cap(tpAniSirGlobal pMac,
tDot11fIEVHTCaps *vhtCap,
tpPESession psessionEntry)
{
+ uint8_t nss;
+ uint32_t val;
+
+ if (IS_5G_CH(psessionEntry->currentOperChannel))
+ nss = pMac->vdev_type_nss_5g.tdls;
+ else
+ nss = pMac->vdev_type_nss_2g.tdls;
+
if (IS_DOT11_MODE_HT(selfDot11Mode)) {
/* Include HT Capability IE */
populate_dot11f_ht_caps(pMac, NULL, htCap);
+ val = SIZE_OF_SUPPORTED_MCS_SET;
+ wlan_cfg_get_str(pMac, WNI_CFG_SUPPORTED_MCS_SET,
+ &htCap->supportedMCSSet[0], &val);
+ if (NSS_1x1_MODE == nss)
+ htCap->supportedMCSSet[1] = 0;
/*
* Advertise ht capability and max supported channel bandwidth
* when populating HT IE in TDLS Setup Request/Setup Response/
@@ -575,6 +589,27 @@ static void populate_dot11f_tdls_ht_vht_cap(tpAniSirGlobal pMac,
vhtCap->suBeamFormerCap = 0;
vhtCap->muBeamformeeCap = 0;
vhtCap->muBeamformerCap = 0;
+
+ wlan_cfg_get_int(pMac, WNI_CFG_VHT_RX_MCS_MAP, &val);
+ vhtCap->rxMCSMap = val;
+ wlan_cfg_get_int(pMac,
+ WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
+ &val);
+ vhtCap->rxHighSupDataRate = val;
+ wlan_cfg_get_int(pMac, WNI_CFG_VHT_TX_MCS_MAP, &val);
+ vhtCap->txMCSMap = val;
+ wlan_cfg_get_int(pMac,
+ WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
+ &val);
+ vhtCap->txSupDataRate = val;
+ if (nss == NSS_1x1_MODE) {
+ vhtCap->txMCSMap |= DISABLE_NSS2_MCS;
+ vhtCap->rxMCSMap |= DISABLE_NSS2_MCS;
+ vhtCap->txSupDataRate =
+ VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
+ vhtCap->rxHighSupDataRate =
+ VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
+ }
} else {
vhtCap->present = 0;
}
@@ -2115,6 +2150,7 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
tpSirSupportedRates rates;
uint8_t a_rateindex = 0;
uint8_t b_rateindex = 0;
+ uint8_t nss;
is_a_rate = 0;
temp_rate_set2.numRates = 0;
@@ -2226,6 +2262,10 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
}
}
+ if (IS_5G_CH(session_entry->currentOperChannel))
+ nss = mac_ctx->vdev_type_nss_5g.tdls;
+ else
+ nss = mac_ctx->vdev_type_nss_2g.tdls;
/* compute the matching MCS rate set, if peer is 11n capable and self mode is 11n */
#ifdef FEATURE_WLAN_TDLS
if (stads->mlmStaContext.htCapability)
@@ -2243,6 +2283,8 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
return eSIR_FAILURE;
}
+ if (NSS_1x1_MODE == nss)
+ mcsSet[1] = 0;
for (i = 0; i < val; i++)
stads->supportedRates.supportedMCSSet[i] =
mcsSet[i] & supp_mcs_set[i];
@@ -2255,7 +2297,7 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
}
}
lim_populate_vht_mcs_set(mac_ctx, &stads->supportedRates, vht_caps,
- session_entry);
+ session_entry, nss);
/**
* Set the erpEnabled bit if the phy is in G mode and at least
* one A rate is supported
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index 49c3ab9d3678..dae1f80424bc 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -771,7 +771,7 @@ populate_dot11f_ht_caps(tpAniSirGlobal pMac,
}
}
}
- if (psessionEntry->nss == 1)
+ if (psessionEntry->vdev_nss == NSS_1x1_MODE)
pDot11f->supportedMCSSet[1] = 0;
}
@@ -1105,6 +1105,13 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac,
nCfgValue = 0;
CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_TX_MCS_MAP, nCfgValue);
pDot11f->txMCSMap = (nCfgValue & 0x0000FFFF);
+
+ nCfgValue = 0;
+ CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
+ nCfgValue);
+ pDot11f->txSupDataRate = (nCfgValue & 0x00001FFF);
+
+ pDot11f->reserved3 = 0;
if (psessionEntry) {
if (pMac->lteCoexAntShare
&& (IS_24G_CH(psessionEntry->currentOperChannel))) {
@@ -1113,23 +1120,17 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac,
pDot11f->rxMCSMap |= DISABLE_NSS2_MCS;
}
}
- if (psessionEntry->nss == 1) {
+ if (psessionEntry->vdev_nss == NSS_1x1_MODE) {
pDot11f->txMCSMap |= DISABLE_NSS2_MCS;
pDot11f->rxMCSMap |= DISABLE_NSS2_MCS;
+ pDot11f->txSupDataRate =
+ VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
+ pDot11f->rxHighSupDataRate =
+ VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
}
}
-
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
- nCfgValue);
- pDot11f->txSupDataRate = (nCfgValue & 0x00001FFF);
-
- pDot11f->reserved3 = 0;
-
lim_log_vht_cap(pMac, pDot11f);
-
return eSIR_SUCCESS;
-
}
tSirRetStatus