Переглянути джерело

qcacmn: Add support for connection manager rso mode command

Add changes to support new definition of
send_roam_scan_offload_mode_cmd() in connection manager.

Change-Id: Iea10907756ea785b0b0de72d01375f50ac3dbd6a
CRs-Fixed: 2758318
Pragaspathi Thilagaraj 4 роки тому
батько
коміт
bc2f1d2a72
4 змінених файлів з 41 додано та 6 видалено
  1. 14 0
      qdf/inc/qdf_str.h
  2. 19 1
      qdf/src/qdf_str.c
  3. 2 5
      wmi/inc/wmi_unified_param.h
  4. 6 0
      wmi/inc/wmi_unified_priv.h

+ 14 - 0
qdf/inc/qdf_str.h

@@ -182,4 +182,18 @@ static inline char *qdf_str_sep(char **str, char *delim)
 	return __qdf_str_sep(str, delim);
 }
 
+/**
+ * qdf_str_copy_all_before_char() - API to copy all character before a
+ * particular char provided
+ * @str: Source string
+ * @str_len: Source string legnth
+ * @dst: Destination string
+ * @dst_len: Destination string legnth
+ * @c: Character before which all characters need to be copied
+ *
+ * Return: length of the copied string, if success. zero otherwise.
+ */
+uint32_t
+qdf_str_copy_all_before_char(char *str, uint32_t str_len,
+			     char *dst, uint32_t dst_len, char c);
 #endif /* __QDF_STR_H */

+ 19 - 1
qdf/src/qdf_str.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018, 2020 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -56,3 +56,21 @@ void qdf_str_right_trim(char *str)
 }
 qdf_export_symbol(qdf_str_right_trim);
 
+uint32_t
+qdf_str_copy_all_before_char(char *str, uint32_t str_len,
+			     char *dst, uint32_t dst_len, char c)
+{
+	uint32_t len = 0;
+
+	if (!str)
+		return len;
+
+	while ((len < str_len) && (len < dst_len) &&
+	       (*str != '\0') && (*str != c)) {
+		*dst++ = *str++;
+		len++;
+	}
+
+	return len;
+}
+qdf_export_symbol(qdf_str_copy_all_before_char);

+ 2 - 5
wmi/inc/wmi_unified_param.h

@@ -1589,16 +1589,12 @@ struct mobility_domain_info {
 	uint16_t mobility_domain;
 };
 
+#ifndef ROAM_OFFLOAD_V1
 #define WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET     (16)
 
 /* This TLV will be filled only in case roam offload
  * for wpa2-psk/pmkid/ese/11r is enabled */
 typedef struct {
-	/*
-	 * TLV tag and len; tag equals
-	 * WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param
-	 */
-	uint32_t tlv_header;
 	uint32_t rssi_cat_gap;          /* gap for every category bucket */
 	uint32_t prefer_5g;             /* prefer select 5G candidate */
 	uint32_t select_5g_margin;
@@ -1743,6 +1739,7 @@ struct roam_offload_scan_params {
 	struct roam_fils_params roam_fils_params;
 #endif
 };
+#endif
 
 /**
  * struct wifi_epno_network - enhanced pno network block

+ 6 - 0
wmi/inc/wmi_unified_priv.h

@@ -647,9 +647,15 @@ QDF_STATUS (*send_roam_mawc_params_cmd)(
 QDF_STATUS (*send_roam_scan_filter_cmd)(wmi_unified_t wmi_handle,
 				struct roam_scan_filter_params *roam_req);
 
+#ifdef ROAM_OFFLOAD_V1
+QDF_STATUS (*send_roam_scan_offload_mode_cmd)(
+		wmi_unified_t wmi_handle,
+		struct wlan_roam_scan_offload_params *rso_cfg);
+#else
 QDF_STATUS (*send_roam_scan_offload_mode_cmd)(wmi_unified_t wmi_handle,
 				wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
 				struct roam_offload_scan_params *roam_req);
+#endif
 
 QDF_STATUS (*send_roam_scan_offload_ap_profile_cmd)(wmi_unified_t wmi_handle,
 				    struct ap_profile_params *ap_profile);