Parcourir la source

qcacld-3.0: Remove wma_get_buf_extscan_start_cmd()

The task formerly done by wma_get_buf_extscan_start_cmd() is now done
in the common WMI project and this function is no longer used, so
remove it.

Change-Id: I840c6a5f83c6cdc479e6746f36a29c2a7970c964
CRs-Fixed: 2281900
Jeff Johnson il y a 6 ans
Parent
commit
dc32f37143
2 fichiers modifiés avec 0 ajouts et 244 suppressions
  1. 0 4
      core/wma/inc/wma_internal.h
  2. 0 240
      core/wma/src/wma_scan_roam.c

+ 0 - 4
core/wma/inc/wma_internal.h

@@ -361,10 +361,6 @@ int wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len);
 
 void wma_register_extscan_event_handler(tp_wma_handle wma_handle);
 
-QDF_STATUS wma_get_buf_extscan_start_cmd(tp_wma_handle wma_handle,
-					 tSirWifiScanCmdReqParams *pstart,
-					 wmi_buf_t *buf, int *buf_len);
-
 QDF_STATUS wma_start_extscan(tp_wma_handle wma,
 			     tSirWifiScanCmdReqParams *pstart);
 

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

@@ -4433,246 +4433,6 @@ int wma_passpoint_match_event_handler(void *handle,
 	return 0;
 }
 
-/**
- * wma_get_buf_extscan_start_cmd() - Fill extscan start request
- * @handle: wma handle
- * @pstart: scan command request params
- * @buf: event buffer
- * @buf_len: length of buffer
- *
- * This function fills individual elements of extscan request and
- * TLV for buckets, channel list.
- *
- * Return: QDF Status.
- */
-QDF_STATUS wma_get_buf_extscan_start_cmd(tp_wma_handle wma_handle,
-					 tSirWifiScanCmdReqParams *pstart,
-					 wmi_buf_t *buf, int *buf_len)
-{
-	wmi_extscan_start_cmd_fixed_param *cmd;
-	wmi_extscan_bucket *dest_blist;
-	wmi_extscan_bucket_channel *dest_clist;
-	tSirWifiScanBucketSpec *src_bucket = pstart->buckets;
-	tSirWifiScanChannelSpec *src_channel = src_bucket->channels;
-	tSirWifiScanChannelSpec save_channel[WLAN_EXTSCAN_MAX_CHANNELS];
-
-	uint8_t *buf_ptr;
-	int i, k, count = 0;
-	int len = sizeof(*cmd);
-	int nbuckets = pstart->numBuckets;
-	int nchannels = 0;
-
-	/* These TLV's are are NULL by default */
-	uint32_t ie_len_with_pad = 0;
-	int num_ssid = 0;
-	int num_bssid = 0;
-	int ie_len = 0;
-
-	uint32_t base_period = pstart->basePeriod;
-
-	/* TLV placeholder for ssid_list (NULL) */
-	len += WMI_TLV_HDR_SIZE;
-	len += num_ssid * sizeof(wmi_ssid);
-
-	/* TLV placeholder for bssid_list (NULL) */
-	len += WMI_TLV_HDR_SIZE;
-	len += num_bssid * sizeof(wmi_mac_addr);
-
-	/* TLV placeholder for ie_data (NULL) */
-	len += WMI_TLV_HDR_SIZE;
-	len += ie_len * sizeof(uint32_t);
-
-	/* TLV placeholder for bucket */
-	len += WMI_TLV_HDR_SIZE;
-	len += nbuckets * sizeof(wmi_extscan_bucket);
-
-	/* TLV channel placeholder */
-	len += WMI_TLV_HDR_SIZE;
-	for (i = 0; i < nbuckets; i++) {
-		nchannels += src_bucket->numChannels;
-		src_bucket++;
-	}
-
-	len += nchannels * sizeof(wmi_extscan_bucket_channel);
-	/* Allocate the memory */
-	*buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
-	if (!*buf) {
-		WMA_LOGP("%s: failed to allocate memory for start extscan cmd",
-			__func__);
-		return QDF_STATUS_E_NOMEM;
-	}
-	buf_ptr = (uint8_t *) wmi_buf_data(*buf);
-	cmd = (wmi_extscan_start_cmd_fixed_param *) buf_ptr;
-	WMITLV_SET_HDR(&cmd->tlv_header,
-		       WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param,
-		       WMITLV_GET_STRUCT_TLVLEN
-			       (wmi_extscan_start_cmd_fixed_param));
-
-	cmd->request_id = pstart->requestId;
-	cmd->vdev_id = pstart->sessionId;
-	cmd->base_period = pstart->basePeriod;
-	cmd->num_buckets = nbuckets;
-	cmd->configuration_flags = 0;
-	if (pstart->configuration_flags & EXTSCAN_LP_EXTENDED_BATCHING)
-		cmd->configuration_flags |= WMI_EXTSCAN_EXTENDED_BATCHING_EN;
-	WMA_LOGI("%s: Total buckets: %d total #of channels is %d cfgn_flags: 0x%x",
-			 __func__, nbuckets, nchannels,
-			cmd->configuration_flags);
-
-	cmd->min_rest_time = WMA_EXTSCAN_REST_TIME;
-	cmd->max_rest_time = WMA_EXTSCAN_REST_TIME;
-	cmd->max_bssids_per_scan_cycle = pstart->maxAPperScan;
-
-	/* The max dwell time is retrieved from the first channel
-	 * of the first bucket and kept common for all channels.
-	 */
-	cmd->min_dwell_time_active = pstart->min_dwell_time_active;
-	cmd->max_dwell_time_active = pstart->max_dwell_time_active;
-	cmd->min_dwell_time_passive = pstart->min_dwell_time_passive;
-	cmd->max_dwell_time_passive = pstart->max_dwell_time_passive;
-	cmd->max_bssids_per_scan_cycle = pstart->maxAPperScan;
-	cmd->max_table_usage = pstart->report_threshold_percent;
-	cmd->report_threshold_num_scans = pstart->report_threshold_num_scans;
-
-	cmd->repeat_probe_time = cmd->max_dwell_time_active /
-					WMA_SCAN_NPROBES_DEFAULT;
-	cmd->max_scan_time = WMA_EXTSCAN_MAX_SCAN_TIME;
-	cmd->probe_delay = 0;
-	cmd->probe_spacing_time = 0;
-	cmd->idle_time = 0;
-	cmd->burst_duration = WMA_EXTSCAN_BURST_DURATION;
-	cmd->scan_ctrl_flags = WMI_SCAN_ADD_BCAST_PROBE_REQ |
-			       WMI_SCAN_ADD_CCK_RATES |
-			       WMI_SCAN_ADD_OFDM_RATES |
-			       WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ |
-			       WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ;
-
-	cmd->scan_priority = WMI_SCAN_PRIORITY_HIGH;
-	cmd->num_ssids = 0;
-	cmd->num_bssid = 0;
-	cmd->ie_len = 0;
-	cmd->n_probes = (cmd->repeat_probe_time > 0) ?
-			cmd->max_dwell_time_active / cmd->repeat_probe_time : 0;
-
-	buf_ptr += sizeof(*cmd);
-	WMITLV_SET_HDR(buf_ptr,
-		       WMITLV_TAG_ARRAY_FIXED_STRUC,
-		       num_ssid * sizeof(wmi_ssid));
-	buf_ptr += WMI_TLV_HDR_SIZE + (num_ssid * sizeof(wmi_ssid));
-
-	WMITLV_SET_HDR(buf_ptr,
-		       WMITLV_TAG_ARRAY_FIXED_STRUC,
-		       num_bssid * sizeof(wmi_mac_addr));
-	buf_ptr += WMI_TLV_HDR_SIZE + (num_bssid * sizeof(wmi_mac_addr));
-
-	ie_len_with_pad = 0;
-	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, ie_len_with_pad);
-	buf_ptr += WMI_TLV_HDR_SIZE + ie_len_with_pad;
-
-	WMITLV_SET_HDR(buf_ptr,
-		       WMITLV_TAG_ARRAY_STRUC,
-		       nbuckets * sizeof(wmi_extscan_bucket));
-	dest_blist = (wmi_extscan_bucket *)
-		     (buf_ptr + WMI_TLV_HDR_SIZE);
-	src_bucket = pstart->buckets;
-
-	/* Retrieve scanning information from each bucket and
-	 * channels and send it to the target
-	 */
-	for (i = 0; i < nbuckets; i++) {
-		WMITLV_SET_HDR(dest_blist,
-			       WMITLV_TAG_STRUC_wmi_extscan_bucket_cmd_fixed_param,
-			       WMITLV_GET_STRUCT_TLVLEN(wmi_extscan_bucket));
-
-		dest_blist->bucket_id = src_bucket->bucket;
-		dest_blist->base_period_multiplier =
-			src_bucket->period / base_period;
-		dest_blist->min_period = src_bucket->period;
-		dest_blist->max_period = src_bucket->max_period;
-		dest_blist->exp_backoff = src_bucket->exponent;
-		dest_blist->exp_max_step_count = src_bucket->step_count;
-		dest_blist->channel_band = src_bucket->band;
-		dest_blist->num_channels = src_bucket->numChannels;
-		dest_blist->notify_extscan_events = 0;
-
-		if (src_bucket->reportEvents & EXTSCAN_REPORT_EVENTS_EACH_SCAN)
-			dest_blist->notify_extscan_events =
-					WMI_EXTSCAN_BUCKET_COMPLETED_EVENT;
-
-		if (src_bucket->reportEvents &
-				EXTSCAN_REPORT_EVENTS_FULL_RESULTS) {
-			dest_blist->forwarding_flags =
-				WMI_EXTSCAN_FORWARD_FRAME_TO_HOST;
-			dest_blist->notify_extscan_events |=
-				WMI_EXTSCAN_BUCKET_COMPLETED_EVENT |
-				WMI_EXTSCAN_CYCLE_STARTED_EVENT |
-				WMI_EXTSCAN_CYCLE_COMPLETED_EVENT;
-		} else {
-			dest_blist->forwarding_flags =
-				WMI_EXTSCAN_NO_FORWARDING;
-		}
-
-		if (src_bucket->reportEvents & EXTSCAN_REPORT_EVENTS_NO_BATCH)
-			dest_blist->configuration_flags = 0;
-		else
-			dest_blist->configuration_flags =
-				WMI_EXTSCAN_BUCKET_CACHE_RESULTS;
-
-		if (src_bucket->reportEvents &
-			EXTSCAN_REPORT_EVENTS_CONTEXT_HUB)
-			dest_blist->configuration_flags |=
-				WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB;
-
-		WMA_LOGI("%s: ntfy_extscan_events:%u cfg_flags:%u fwd_flags:%u",
-			__func__, dest_blist->notify_extscan_events,
-			dest_blist->configuration_flags,
-			dest_blist->forwarding_flags);
-
-		dest_blist->min_dwell_time_active =
-					src_bucket->min_dwell_time_active;
-		dest_blist->max_dwell_time_active =
-					 src_bucket->max_dwell_time_active;
-		dest_blist->min_dwell_time_passive =
-					src_bucket->min_dwell_time_passive;
-		dest_blist->max_dwell_time_passive =
-					src_bucket->max_dwell_time_passive;
-		src_channel = src_bucket->channels;
-
-		/* save the channel info to later populate
-		 * the  channel TLV
-		 */
-		for (k = 0; k < src_bucket->numChannels; k++) {
-			save_channel[count++].channel = src_channel->channel;
-			src_channel++;
-		}
-		dest_blist++;
-		src_bucket++;
-	}
-	buf_ptr += WMI_TLV_HDR_SIZE + (nbuckets * sizeof(wmi_extscan_bucket));
-	WMITLV_SET_HDR(buf_ptr,
-		       WMITLV_TAG_ARRAY_STRUC,
-		       nchannels * sizeof(wmi_extscan_bucket_channel));
-	dest_clist = (wmi_extscan_bucket_channel *)
-		     (buf_ptr + WMI_TLV_HDR_SIZE);
-
-	/* Active or passive scan is based on the bucket dwell time
-	 * and channel specific active,passive scans are not
-	 * supported yet
-	 */
-	for (i = 0; i < nchannels; i++) {
-		WMITLV_SET_HDR(dest_clist,
-			       WMITLV_TAG_STRUC_wmi_extscan_bucket_channel_event_fixed_param,
-			       WMITLV_GET_STRUCT_TLVLEN
-				       (wmi_extscan_bucket_channel));
-		dest_clist->channel = save_channel[i].channel;
-		dest_clist++;
-	}
-	buf_ptr += WMI_TLV_HDR_SIZE +
-		   (nchannels * sizeof(wmi_extscan_bucket_channel));
-	*buf_len = len;
-	return QDF_STATUS_SUCCESS;
-}
-
 /**
  * wma_start_extscan() - start extscan command to fw.
  * @handle: wma handle