diff --git a/qdf/inc/qdf_str.h b/qdf/inc/qdf_str.h index f778cf19b9..1200e62ac5 100644 --- a/qdf/inc/qdf_str.h +++ b/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 */ diff --git a/qdf/src/qdf_str.c b/qdf/src/qdf_str.c index f610397d6b..04a0010904 100644 --- a/qdf/src/qdf_str.c +++ b/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); diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index ba30b3a29e..812a9b23f4 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/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 diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index 4a31ca4f61..e8260214e3 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/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);