Преглед на файлове

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
yeshwanth sriram guntuka преди 8 години
родител
ревизия
27e4ffcd83
променени са 5 файла, в които са добавени 139 реда и са изтрити 0 реда
  1. 29 0
      core/mac/inc/sir_api.h
  2. 16 0
      core/mac/src/include/parser_api.h
  3. 34 0
      core/mac/src/sys/legacy/src/utils/src/parser_api.c
  4. 50 0
      core/sme/src/csr/csr_api_roam.c
  5. 10 0
      core/sme/src/qos/sme_qos.c

+ 29 - 0
core/mac/inc/sir_api.h

@@ -950,6 +950,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;

+ 16 - 0
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,

+ 34 - 0
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,

+ 50 - 0
core/sme/src/csr/csr_api_roam.c

@@ -17615,6 +17615,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
@@ -17680,6 +17728,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);
+
 }
 
 /**

+ 10 - 0
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;
 }