summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryeshwanth sriram guntuka <ysriramg@codeaurora.org>2016-12-01 18:00:17 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-12-15 03:49:29 -0800
commit9d38e38738df98ed89ae64ee471f07cd03198664 (patch)
treebca414028156bc6b029773ec7b9d5ad0c8fe80d1
parente50fb5a96a142652e859a70b0fa5a64edb3ea969 (diff)
qcacld-3.0: Add TSPEC IE in reassoc request for LFR3
In LFR3, for ccx scenario TSPEC IE are missing in reassociation request frames initiated by FW. Assoc IE are sent to FW via CSR Roam Scan Offload as soon as connection is successful. Add the TSPEC IE while sending assoc IE to FW via RSO command. Change-Id: Ifa6145bfa209cca428321db9056c01c3a4b140de CRs-Fixed: 1096199
-rw-r--r--core/mac/inc/sir_api.h29
-rw-r--r--core/mac/src/include/parser_api.h16
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/parser_api.c34
-rw-r--r--core/sme/src/csr/csr_api_roam.c50
-rw-r--r--core/sme/src/qos/sme_qos.c10
5 files changed, 139 insertions, 0 deletions
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index 1f5c0e08fe0c..cf53ee6aaa53 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -952,6 +952,35 @@ struct oem_data_rsp {
#endif /* FEATURE_OEM_DATA_SUPPORT */
#ifdef FEATURE_WLAN_ESE
+typedef struct ese_wmm_tspec_ie {
+ uint16_t traffic_type:1;
+ uint16_t tsid:4;
+ uint16_t direction:2;
+ uint16_t access_policy:2;
+ uint16_t aggregation:1;
+ uint16_t psb:1;
+ uint16_t user_priority:3;
+ uint16_t tsinfo_ack_pol:2;
+ uint8_t tsinfo_rsvd:7;
+ uint8_t burst_size_defn:1;
+ uint16_t size:15;
+ uint16_t fixed:1;
+ uint16_t max_msdu_size;
+ uint32_t min_service_int;
+ uint32_t max_service_int;
+ uint32_t inactivity_int;
+ uint32_t suspension_int;
+ uint32_t service_start_time;
+ uint32_t min_data_rate;
+ uint32_t mean_data_rate;
+ uint32_t peak_data_rate;
+ uint32_t burst_size;
+ uint32_t delay_bound;
+ uint32_t min_phy_rate;
+ uint16_t surplus_bw_allowance;
+ uint16_t medium_time;
+} qdf_packed ese_wmm_tspec_ie;
+
typedef struct sTspecInfo {
uint8_t valid;
tSirMacTspecIE tspec;
diff --git a/core/mac/src/include/parser_api.h b/core/mac/src/include/parser_api.h
index 9e14af5e7745..514e30bb10ac 100644
--- a/core/mac/src/include/parser_api.h
+++ b/core/mac/src/include/parser_api.h
@@ -66,6 +66,9 @@
#define RSNIE_CAPABILITY_LEN 2
#define DEFAULT_RSNIE_CAP_VAL 0x00
+#define SIZE_MASK 0x7FFF
+#define FIXED_MASK 0x8000
+
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
#define QCOM_VENDOR_IE_MCC_AVOID_CH 0x01
@@ -804,6 +807,19 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac,
uint8_t *pPayload, const uint32_t payloadLength,
uint8_t **outIeBuf, uint32_t *pOutIeLen);
+/**
+ * ese_populate_wmm_tspec() - Populates TSPEC info for
+ * reassoc
+ * @source: source structure
+ * @dest: destination structure
+ *
+ * This function copies TSPEC parameters from source
+ * structure to destination structure.
+ *
+ * Return: None
+ */
+void ese_populate_wmm_tspec(tSirMacTspecIE *source, ese_wmm_tspec_ie *dest);
+
#endif
void populate_dot11f_wmm_info_ap(tpAniSirGlobal pMac,
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 007b46feced2..13bc578342cd 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
@@ -1955,6 +1955,40 @@ void populate_dot11f_re_assoc_tspec(tpAniSirGlobal pMac,
}
}
}
+
+void ese_populate_wmm_tspec(tSirMacTspecIE *source,
+ ese_wmm_tspec_ie *dest)
+{
+ dest->traffic_type = source->tsinfo.traffic.trafficType;
+ dest->tsid = source->tsinfo.traffic.tsid;
+ dest->direction = source->tsinfo.traffic.direction;
+ dest->access_policy = source->tsinfo.traffic.accessPolicy;
+ dest->aggregation = source->tsinfo.traffic.aggregation;
+ dest->psb = source->tsinfo.traffic.psb;
+ dest->user_priority = source->tsinfo.traffic.userPrio;
+ dest->tsinfo_ack_pol = source->tsinfo.traffic.ackPolicy;
+ dest->burst_size_defn = source->tsinfo.traffic.burstSizeDefn;
+ /* As defined in IEEE 802.11-2007, section 7.3.2.30
+ * Nominal MSDU size: Bit[0:14]=Size, Bit[15]=Fixed
+ */
+ dest->size = (source->nomMsduSz & SIZE_MASK);
+ dest->fixed = (source->nomMsduSz & FIXED_MASK) ? 1 : 0;
+ dest->max_msdu_size = source->maxMsduSz;
+ dest->min_service_int = source->minSvcInterval;
+ dest->max_service_int = source->maxSvcInterval;
+ dest->inactivity_int = source->inactInterval;
+ dest->suspension_int = source->suspendInterval;
+ dest->service_start_time = source->svcStartTime;
+ dest->min_data_rate = source->minDataRate;
+ dest->mean_data_rate = source->meanDataRate;
+ dest->peak_data_rate = source->peakDataRate;
+ dest->burst_size = source->maxBurstSz;
+ dest->delay_bound = source->delayBound;
+ dest->min_phy_rate = source->minPhyRate;
+ dest->surplus_bw_allowance = source->surplusBw;
+ dest->medium_time = source->mediumTime;
+}
+
#endif
void populate_dot11f_wmm_info_ap(tpAniSirGlobal pMac, tDot11fIEWMMInfoAp *pInfo,
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 6390b39d9cd1..064ec9b0423e 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -17572,6 +17572,54 @@ static void csr_append_assoc_ies(tpAniSirGlobal mac_ctx,
assoc_ie->length += (ie_len + 2);
}
+#ifdef FEATURE_WLAN_ESE
+/**
+ * ese_populate_addtional_ies() - add IEs to reassoc frame
+ * @mac_ctx: Pointer to global mac structure
+ * @session: pointer to CSR session
+ * @req_buf: Pointer to Roam offload scan request
+ *
+ * This function populates the TSPEC ie and appends the info
+ * to assoc buffer.
+ *
+ * Return: None
+ */
+static void ese_populate_addtional_ies(tpAniSirGlobal mac_ctx,
+ tCsrRoamSession *session,
+ tSirRoamOffloadScanReq *req_buf) {
+
+ uint8_t tspec_ie_hdr[SIR_MAC_OUI_WME_HDR_MIN]
+ = { 0x00, 0x50, 0xf2, 0x02, 0x02, 0x01 };
+ uint8_t tspec_ie_buf[DOT11F_IE_WMMTSPEC_MAX_LEN], j;
+ ese_wmm_tspec_ie *tspec_ie;
+ tESETspecInfo ese_tspec;
+
+ tspec_ie = (ese_wmm_tspec_ie *)(tspec_ie_buf + SIR_MAC_OUI_WME_HDR_MIN);
+ if (csr_is_wmm_supported(mac_ctx) &&
+ mac_ctx->roam.configParam.isEseIniFeatureEnabled &&
+ csr_roam_is_ese_assoc(mac_ctx, session->sessionId)) {
+ ese_tspec.numTspecs = sme_qos_ese_retrieve_tspec_info(mac_ctx,
+ session->sessionId,
+ (tTspecInfo *) &ese_tspec.tspec[0]);
+ qdf_mem_copy(tspec_ie_buf, tspec_ie_hdr,
+ SIR_MAC_OUI_WME_HDR_MIN);
+ for (j = 0; j < ese_tspec.numTspecs; j++) {
+ /* Populate the tspec_ie */
+ ese_populate_wmm_tspec(&ese_tspec.tspec[j].tspec,
+ tspec_ie);
+ csr_append_assoc_ies(mac_ctx, req_buf,
+ IEEE80211_ELEMID_VENDOR,
+ DOT11F_IE_WMMTSPEC_MAX_LEN,
+ tspec_ie_buf);
+ }
+ }
+
+}
+#else
+static inline void ese_populate_addtional_ies(tpAniSirGlobal mac_ctx,
+ tCsrRoamSession *session, tSirRoamOffloadScanReq *req_buf) {
+}
+#endif
/**
* csr_update_driver_assoc_ies() - Append driver built IE's to assoc IE's
* @mac_ctx: Pointer to global mac structure
@@ -17637,6 +17685,8 @@ static void csr_update_driver_assoc_ies(tpAniSirGlobal mac_ctx,
DOT11F_IE_POWERCAPS_MAX_LEN,
power_cap_ie_data);
}
+ ese_populate_addtional_ies(mac_ctx, session, req_buf);
+
}
/**
diff --git a/core/sme/src/qos/sme_qos.c b/core/sme/src/qos/sme_qos.c
index 1bb72caf9667..dc40f989d2ae 100644
--- a/core/sme/src/qos/sme_qos.c
+++ b/core/sme/src/qos/sme_qos.c
@@ -5402,6 +5402,7 @@ QDF_STATUS sme_qos_process_add_ts_success_rsp(tpAniSirGlobal pMac,
sme_QosEdcaAcType ac, ac_index;
sme_QosSearchInfo search_key;
sme_QosSearchInfo search_key1;
+ tCsrRoamSession *csr_session;
uint8_t tspec_pending;
tListElem *pEntry = NULL;
sme_QosFlowInfoEntry *flow_info = NULL;
@@ -5622,6 +5623,15 @@ QDF_STATUS sme_qos_process_add_ts_success_rsp(tpAniSirGlobal pMac,
sme_qos_state_transition(sessionId, ac, SME_QOS_QOS_ON);
+ /* Inform this TSPEC IE change to FW */
+ csr_session = CSR_GET_SESSION(pMac, sessionId);
+ if (csr_session != NULL &&
+ csr_session->pCurRoamProfile->csrPersona == QDF_STA_MODE) {
+ csr_roam_offload_scan(pMac, sessionId,
+ ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_CONNECT_IES_CHANGED);
+ }
+
(void)sme_qos_process_buffered_cmd(sessionId);
return QDF_STATUS_SUCCESS;
}