Browse Source

qcacld-3.0: Remove unused code of sending probe req template

Remove unused code of sending probe request template to
firmware which is a legacy code where Scan was not
completely offloaded to firmware.

CRs-Fixed: 1007810
Change-Id: I8c876bdb696f70452354f5f84b504b4a6564c479
Varun Reddy Yeturu 9 years ago
parent
commit
5edadcc960

+ 0 - 11
core/hdd/src/wlan_hdd_scan.c

@@ -2243,17 +2243,6 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
 	hddLog(LOG1, FL("Number of hidden networks being Configured = %d"),
 		  request->n_ssids);
 
-	hddLog(LOG1, FL("request->ie_len = %zu"), request->ie_len);
-	if ((0 < request->ie_len) && (NULL != request->ie)) {
-		pPnoRequest->us24GProbeTemplateLen = request->ie_len;
-		memcpy(&pPnoRequest->p24GProbeTemplate, request->ie,
-		       pPnoRequest->us24GProbeTemplateLen);
-
-		pPnoRequest->us5GProbeTemplateLen = request->ie_len;
-		memcpy(&pPnoRequest->p5GProbeTemplate, request->ie,
-		       pPnoRequest->us5GProbeTemplateLen);
-	}
-
 	/*
 	 * Before Kernel 4.4
 	 *   Driver gets only one time interval which is hard coded in

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

@@ -2771,10 +2771,6 @@ typedef struct sSirPNOScanReq {
 	uint32_t        passive_min_time;
 	uint32_t        passive_max_time;
 
-	uint16_t us24GProbeTemplateLen;
-	uint8_t p24GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
-	uint16_t us5GProbeTemplateLen;
-	uint8_t p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
 #ifdef FEATURE_WLAN_SCAN_PNO
 	bool pno_channel_prediction;
 	uint8_t top_k_num_of_channels;
@@ -2920,20 +2916,6 @@ typedef struct sSirRoamOffloadScanReq {
 	uint8_t ValidChannelCount;
 	uint8_t ValidChannelList[SIR_ROAM_MAX_CHANNELS];
 	bool IsESEAssoc;
-	uint16_t us24GProbeTemplateLen;
-	uint8_t p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
-	uint16_t us5GProbeTemplateLen;
-	uint8_t p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
-	uint8_t ReservedBytes[SIR_ROAM_SCAN_RESERVED_BYTES];
-	/*ReservedBytes is to add any further params in future
-	   without changing the interface params on Host
-	   and firmware.The firmware right now checks
-	   if the size of this structure matches and then
-	   proceeds with the processing of the command.
-	   So, in future, if there is any need to add
-	   more params, pick the memory from reserved
-	   bytes and keep deducting the reserved bytes
-	   by the amount of bytes picked. */
 	uint8_t nProbes;
 	uint16_t HomeAwayTime;
 	tSirRoamNetworkType ConnectedNetwork;

+ 0 - 179
core/sme/src/common/sme_power_save.c

@@ -689,121 +689,6 @@ QDF_STATUS sme_ps_start_uapsd(tHalHandle hal_ctx, uint32_t session_id,
 }
 
 #ifdef FEATURE_WLAN_SCAN_PNO
-static tSirRetStatus
-sme_populate_mac_header(tpAniSirGlobal mac_ctx,
-			uint8_t *bd,
-			uint8_t type,
-			uint8_t sub_type,
-			tSirMacAddr peer_addr, tSirMacAddr self_mac_addr)
-{
-	tSirRetStatus status_code = eSIR_SUCCESS;
-	tpSirMacMgmtHdr mac_hdr;
-
-	/* / Prepare MAC management header */
-	mac_hdr = (tpSirMacMgmtHdr) (bd);
-
-	/* Prepare FC */
-	mac_hdr->fc.protVer = SIR_MAC_PROTOCOL_VERSION;
-	mac_hdr->fc.type = type;
-	mac_hdr->fc.subType = sub_type;
-
-	/* Prepare Address 1 */
-	qdf_mem_copy((uint8_t *) mac_hdr->da, (uint8_t *) peer_addr,
-		     sizeof(tSirMacAddr));
-
-	sir_copy_mac_addr(mac_hdr->sa, self_mac_addr);
-
-	/* Prepare Address 3 */
-	qdf_mem_copy((uint8_t *) mac_hdr->bssId, (uint8_t *) peer_addr,
-		     sizeof(tSirMacAddr));
-	return status_code;
-} /*** sme_populate_mac_header() ***/
-
-static tSirRetStatus
-sme_prepare_probe_req_template(tpAniSirGlobal mac_ctx,
-			       uint8_t channel_num,
-			       uint32_t dot11mode,
-			       tSirMacAddr self_mac_addr,
-			       uint8_t *frame,
-			       uint16_t *pus_len, tCsrRoamSession *psession)
-{
-	tDot11fProbeRequest pr;
-	uint32_t status, bytes, payload;
-	tSirRetStatus sir_status;
-	/*Bcast tx */
-	tSirMacAddr bss_id = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
-	/**
-	 * The scheme here is to fill out a 'tDot11fProbeRequest' structure
-	 * and then hand it off to 'dot11f_pack_probe_request' (for
-	 * serialization).  We start by zero-initializing the structure:
-	 */
-	qdf_mem_set((uint8_t *) &pr, sizeof(pr), 0);
-
-	populate_dot11f_supp_rates(mac_ctx, channel_num, &pr.SuppRates, NULL);
-
-	if (WNI_CFG_DOT11_MODE_11B != dot11mode) {
-		populate_dot11f_ext_supp_rates1(mac_ctx, channel_num,
-						&pr.ExtSuppRates);
-	}
-
-	if (IS_DOT11_MODE_HT(dot11mode)) {
-		populate_dot11f_ht_caps(mac_ctx, NULL, &pr.HTCaps);
-		pr.HTCaps.advCodingCap = psession->htConfig.ht_rx_ldpc;
-		pr.HTCaps.txSTBC = psession->htConfig.ht_tx_stbc;
-		pr.HTCaps.rxSTBC = psession->htConfig.ht_rx_stbc;
-		if (!psession->htConfig.ht_sgi)
-			pr.HTCaps.shortGI20MHz = pr.HTCaps.shortGI40MHz = 0;
-	}
-	/**
-	 * That's it-- now we pack it.  First, how much space are we going to
-	 * need?
-	 */
-	status = dot11f_get_packed_probe_request_size(mac_ctx, &pr, &payload);
-	if (DOT11F_FAILED(status)) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			  FL("Failed to calculate the packed size for a Probe Request (0x%08x)."),
-				  status);
-
-		/* We'll fall back on the worst case scenario: */
-		payload = sizeof(tDot11fProbeRequest);
-	} else if (DOT11F_WARNED(status)) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			  FL("There were warnings while calculating the packed size for a Probe Request (0x%08x)."),
-			  status);
-	}
-
-	bytes = payload + sizeof(tSirMacMgmtHdr);
-
-	/* Prepare outgoing frame */
-	qdf_mem_set(frame, bytes, 0);
-
-	/* Next, we fill out the buffer descriptor: */
-	sir_status = sme_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME,
-					     SIR_MAC_MGMT_PROBE_REQ, bss_id,
-					     self_mac_addr);
-
-	if (eSIR_SUCCESS != sir_status) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-		FL("Failed to populate the buffer descriptor for a Probe Request (%d)."),
-			sir_status);
-		return sir_status;      /* allocated! */
-	}
-	/* That done, pack the Probe Request: */
-	status = dot11f_pack_probe_request(mac_ctx, &pr, frame +
-					    sizeof(tSirMacMgmtHdr),
-					    payload, &payload);
-	if (DOT11F_FAILED(status)) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			  "Failed to pack a Probe Request (0x%08x).", status);
-		return eSIR_FAILURE;    /* allocated! */
-	} else if (DOT11F_WARNED(status)) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			  "There were warnings while packing a Probe Request");
-	}
-
-	*pus_len = payload + sizeof(tSirMacMgmtHdr);
-	return eSIR_SUCCESS;
-} /* End sme_prepare_probe_req_template. */
 /**
  * sme_set_pno_channel_prediction() - Prepare PNO buffer
  * @request_buf:        Buffer to be filled up to send to WMA
@@ -893,70 +778,6 @@ QDF_STATUS sme_set_ps_preferred_network_list(tHalHandle hal_ctx,
 			 configParam.
 			 phyMode));
 
-	/*Prepare a probe request for 2.4GHz band and one for 5GHz band */
-	if (eSIR_SUCCESS ==
-			sme_prepare_probe_req_template(mac_ctx,
-				SIR_PNO_24G_DEFAULT_CH,
-				uc_dot11_mode, session->selfMacAddr.bytes,
-				request_buf->p24GProbeTemplate,
-				&request_buf->us24GProbeTemplateLen,
-				session)) {
-		/* Append IE passed by supplicant(if any)
-		 * to probe request
-		 */
-		if ((0 < request->us24GProbeTemplateLen) &&
-				((request_buf->us24GProbeTemplateLen +
-				  request->us24GProbeTemplateLen) <
-				 SIR_PNO_MAX_PB_REQ_SIZE)) {
-			qdf_mem_copy((uint8_t *) &request_buf->
-					p24GProbeTemplate +
-					request_buf->us24GProbeTemplateLen,
-					(uint8_t *) &request->p24GProbeTemplate,
-					request->us24GProbeTemplateLen);
-			request_buf->us24GProbeTemplateLen +=
-				request->us24GProbeTemplateLen;
-			QDF_TRACE(QDF_MODULE_ID_SME,
-				QDF_TRACE_LEVEL_INFO,
-				FL("request->us24GProbeTemplateLen = %d"),
-				request->us24GProbeTemplateLen);
-		} else {
-			QDF_TRACE(QDF_MODULE_ID_SME,
-				QDF_TRACE_LEVEL_INFO,
-				FL("Extra ie discarded on 2.4G, IE len = %d"),
-				request->us24GProbeTemplateLen);
-		}
-	}
-
-	if (eSIR_SUCCESS ==
-			sme_prepare_probe_req_template(mac_ctx,
-				SIR_PNO_5G_DEFAULT_CH, uc_dot11_mode,
-				session->selfMacAddr.bytes,
-				request_buf->p5GProbeTemplate,
-				&request_buf->us5GProbeTemplateLen,
-				session)) {
-		/* Append IE passed by supplicant(if any)
-		 * to probe request
-		 */
-		if ((0 < request->us5GProbeTemplateLen) &&
-				((request_buf->us5GProbeTemplateLen +
-				  request->us5GProbeTemplateLen) <
-				 SIR_PNO_MAX_PB_REQ_SIZE)) {
-			qdf_mem_copy((uint8_t *) &request_buf->
-					p5GProbeTemplate +
-					request_buf->us5GProbeTemplateLen,
-					(uint8_t *) &request->p5GProbeTemplate,
-					request->us5GProbeTemplateLen);
-			request_buf->us5GProbeTemplateLen +=
-				request->us5GProbeTemplateLen;
-			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
-				FL("request_buf->us5GProbeTemplateLen = %d"),
-				request->us5GProbeTemplateLen);
-		} else {
-			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
-				FL("Extra IE discarded on 5G, IE length = %d"),
-				request->us5GProbeTemplateLen);
-		}
-	}
 
 	if (mac_ctx->pnoOffload) {
 		if (request_buf->enable)

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

@@ -16227,122 +16227,6 @@ csr_update_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
 
 #if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
-static tSirRetStatus
-csr_roam_scan_offload_populate_mac_header(tpAniSirGlobal pMac,
-					  uint8_t *pBD,
-					  uint8_t type,
-					  uint8_t subType,
-					  tSirMacAddr peerAddr,
-					  tSirMacAddr selfMacAddr)
-{
-	tSirRetStatus statusCode = eSIR_SUCCESS;
-	tpSirMacMgmtHdr pMacHdr;
-
-	/* Prepare MAC management header */
-	pMacHdr = (tpSirMacMgmtHdr) (pBD);
-
-	/* Prepare FC */
-	pMacHdr->fc.protVer = SIR_MAC_PROTOCOL_VERSION;
-	pMacHdr->fc.type = type;
-	pMacHdr->fc.subType = subType;
-
-	/* Prepare Address 1 */
-	qdf_mem_copy((uint8_t *) pMacHdr->da, (uint8_t *) peerAddr,
-		     sizeof(tSirMacAddr));
-
-	sir_copy_mac_addr(pMacHdr->sa, selfMacAddr);
-
-	/* Prepare Address 3 */
-	qdf_mem_copy((uint8_t *) pMacHdr->bssId, (uint8_t *) peerAddr,
-		     sizeof(tSirMacAddr));
-	return statusCode;
-} /*** csr_roam_scan_offload_populate_mac_header() ***/
-
-static tSirRetStatus
-csr_roam_scan_offload_prepare_probe_req_template(tpAniSirGlobal pMac,
-						 uint8_t nChannelNum,
-						 uint32_t dot11mode,
-						 tSirMacAddr selfMacAddr,
-						 uint8_t *pFrame,
-						 uint16_t *pusLen,
-						 tCsrRoamSession *psession)
-{
-	tDot11fProbeRequest pr;
-	uint32_t nStatus, nBytes, nPayload;
-	tSirRetStatus nSirStatus;
-	/*Bcast tx */
-	tSirMacAddr bssId = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
-	/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-
-	qdf_mem_set((uint8_t *) &pr, sizeof(pr), 0);
-
-	populate_dot11f_supp_rates(pMac, nChannelNum, &pr.SuppRates, NULL);
-
-	if (WNI_CFG_DOT11_MODE_11B != dot11mode) {
-		populate_dot11f_ext_supp_rates1(pMac, nChannelNum,
-						&pr.ExtSuppRates);
-	}
-
-	if (IS_DOT11_MODE_HT(dot11mode)) {
-		populate_dot11f_ht_caps(pMac, NULL, &pr.HTCaps);
-		pr.HTCaps.advCodingCap = psession->htConfig.ht_rx_ldpc;
-		pr.HTCaps.txSTBC = psession->htConfig.ht_tx_stbc;
-		pr.HTCaps.rxSTBC = psession->htConfig.ht_rx_stbc;
-		if (!psession->htConfig.ht_sgi) {
-			pr.HTCaps.shortGI20MHz = pr.HTCaps.shortGI40MHz = 0;
-		}
-	}
-
-	nStatus = dot11f_get_packed_probe_request_size(pMac, &pr, &nPayload);
-	if (DOT11F_FAILED(nStatus)) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			  "Failed to calculate the packed size f"
-			  "or a Probe Request (0x%08x).\n", nStatus);
-
-		nPayload = sizeof(tDot11fProbeRequest);
-	} else if (DOT11F_WARNED(nStatus)) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			  "There were warnings while calculating"
-			  "the packed size for a Probe Request ("
-			  "0x%08x).\n", nStatus);
-	}
-
-	nBytes = nPayload + sizeof(tSirMacMgmtHdr);
-
-	/* Prepare outgoing frame */
-	qdf_mem_set(pFrame, nBytes, 0);
-
-	nSirStatus =
-		csr_roam_scan_offload_populate_mac_header(pMac, pFrame,
-							  SIR_MAC_MGMT_FRAME,
-							  SIR_MAC_MGMT_PROBE_REQ, bssId,
-							  selfMacAddr);
-
-	if (eSIR_SUCCESS != nSirStatus) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			  "Failed to populate the buffer descriptor for a Probe Request (%d).\n",
-			  nSirStatus);
-		return nSirStatus;
-	}
-
-	nStatus = dot11f_pack_probe_request(pMac, &pr, pFrame +
-					    sizeof(tSirMacMgmtHdr),
-					    nPayload, &nPayload);
-	if (DOT11F_FAILED(nStatus)) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			  "Failed to pack a Probe Request (0x%08x).\n",
-			  nStatus);
-		return eSIR_FAILURE;
-	} else if (DOT11F_WARNED(nStatus)) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			  "There were warnings while packing a Probe Request (0x%08x).\n",
-			  nStatus);
-	}
-
-	*pusLen = nPayload + sizeof(tSirMacMgmtHdr);
-	return eSIR_SUCCESS;
-}
-
 /**
  * csr_check_band_channel_match() - check if passed band and channel match
  * paramters
@@ -16722,16 +16606,6 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
 	dot11_mode = (uint8_t) csr_translate_to_wni_cfg_dot11_mode(mac_ctx,
 				csr_find_best_phy_mode(mac_ctx,
 					mac_ctx->roam.configParam.phyMode));
-	csr_roam_scan_offload_prepare_probe_req_template(mac_ctx,
-		SIR_ROAM_SCAN_24G_DEFAULT_CH, dot11_mode,
-		session->selfMacAddr.bytes, req_buf->p24GProbeTemplate,
-		&req_buf->us24GProbeTemplateLen, session);
-
-	csr_roam_scan_offload_prepare_probe_req_template(mac_ctx,
-		SIR_ROAM_SCAN_5G_DEFAULT_CH, dot11_mode,
-		session->selfMacAddr.bytes,
-		req_buf->p5GProbeTemplate, &req_buf->us5GProbeTemplateLen,
-		session);
 	req_buf->allowDFSChannelRoam =
 	mac_ctx->roam.configParam.allowDFSChannelRoam;
 	req_buf->early_stop_scan_enable =

+ 0 - 6
core/wma/src/wma_scan_roam.c

@@ -2744,12 +2744,6 @@ QDF_STATUS wma_pno_start(tp_wma_handle wma, tpSirPNOScanReq pno)
 	params->active_max_time = pno->active_max_time;
 	params->passive_min_time = pno->passive_min_time;
 	params->passive_max_time = pno->passive_max_time;
-	params->us24GProbeTemplateLen = pno->us24GProbeTemplateLen;
-	qdf_mem_copy(params->p24GProbeTemplate, pno->p24GProbeTemplate,
-				WMI_PNO_MAX_PB_REQ_SIZE);
-	params->us5GProbeTemplateLen = pno->us5GProbeTemplateLen;
-	qdf_mem_copy(params->p5GProbeTemplate, pno->p5GProbeTemplate,
-				WMI_PNO_MAX_PB_REQ_SIZE);
 #ifdef FEATURE_WLAN_SCAN_PNO
 	params->pno_channel_prediction = pno->pno_channel_prediction;
 	params->top_k_num_of_channels = pno->top_k_num_of_channels;