Просмотр исходного кода

qcacmn: Host changes to enable Scan Offset time

Pass offset value to the Firmware to support split scanning
of total dwell time in smaller chunks. Offset passed is
calculated from TBTT.

Change-Id: I8114acd1147d468aa6471f672307d8ea0ec8611d
CRs-Fixed: 2134748
Abhiram Jogadenu 7 лет назад
Родитель
Сommit
c7f6224588
2 измененных файлов с 16 добавлено и 1 удалено
  1. 3 0
      umac/scan/dispatcher/inc/wlan_scan_public_structs.h
  2. 13 1
      wmi/src/wmi_unified_non_tlv.c

+ 3 - 0
umac/scan/dispatcher/inc/wlan_scan_public_structs.h

@@ -787,6 +787,8 @@ enum p2p_scan_type {
  * @idle_time: idle time
  * @max_scan_time: max scan time
  * @probe_delay: probe delay
+ * @scan_offset_time: Support split scanning on the
+ *                    same channel for CBS feature.
  * @scan_f_passive: passively scan all channels including active channels
  * @scan_f_bcast_probe: add wild card ssid prbreq even if ssid_list is specified
  * @scan_f_cck_rates: add cck rates to rates/xrates ie in prb req
@@ -863,6 +865,7 @@ struct scan_req_params {
 	uint32_t idle_time;
 	uint32_t max_scan_time;
 	uint32_t probe_delay;
+	uint32_t scan_offset_time;
 	union {
 		struct {
 			uint32_t scan_f_passive:1,

+ 13 - 1
wmi/src/wmi_unified_non_tlv.c

@@ -1905,8 +1905,9 @@ static QDF_STATUS send_scan_start_cmd_non_tlv(wmi_unified_t wmi_handle,
 	wmi_bssid_list *bssid_list;
 	wmi_ssid_list *ssid_list;
 	wmi_ie_data *ie_data;
+	wmi_scan_start_offset *scan_start_offset;
 	uint32_t *tmp_ptr;
-	int i, len = sizeof(wmi_start_scan_cmd);
+	int i, len = sizeof(wmi_start_scan_cmd), offset = 0;
 
 #ifdef TEST_CODE
 	len += sizeof(wmi_chan_list) + 3 * sizeof(uint32_t);
@@ -2070,6 +2071,17 @@ static QDF_STATUS send_scan_start_cmd_non_tlv(wmi_unified_t wmi_handle,
 		tmp_ptr +=  (2 + (sizeof(wmi_mac_addr) *
 			    param->num_bssid)/sizeof(uint32_t));
 	}
+	if (param->scan_offset_time) {
+		offset = sizeof(param->scan_offset_time) / sizeof(A_UINT32);
+		scan_start_offset = (wmi_scan_start_offset *)tmp_ptr;
+		scan_start_offset->tag = WMI_SCAN_START_OFFSET_TAG;
+		scan_start_offset->num_offset = offset;
+		WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(
+				&scan_start_offset->start_tsf_offset,
+				&param->scan_offset_time,
+				sizeof(param->scan_offset_time));
+		tmp_ptr += (2 + offset);
+	}
 	if (param->extraie.len) {
 		ie_data  = (wmi_ie_data *) tmp_ptr;
 		ie_data->tag = WMI_IE_TAG;