diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 8d5371fdc88e..61490ae34181 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -3152,7 +3152,6 @@ struct ssid_hotlist_param { /** * struct roam_scan_filter_params - Structure holding roaming scan * parameters - * @len: length * @op_bitmap: bitmap to determine reason of roaming * @session_id: vdev id * @num_bssid_black_list: The number of BSSID's that we should @@ -3182,7 +3181,6 @@ struct ssid_hotlist_param { */ struct roam_scan_filter_params { - uint32_t len; uint32_t op_bitmap; uint8_t session_id; uint32_t num_bssid_black_list; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 7800f5c28401..fa3c8a465407 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -5885,8 +5885,21 @@ static QDF_STATUS send_roam_scan_filter_cmd_tlv(wmi_unified_t wmi_handle, wmi_roam_lca_disallow_config_tlv_param *blist_param; len = sizeof(wmi_roam_filter_fixed_param); + len += WMI_TLV_HDR_SIZE; - len += roam_req->len; + if (roam_req->num_bssid_black_list) + len += roam_req->num_bssid_black_list * sizeof(wmi_mac_addr); + len += WMI_TLV_HDR_SIZE; + if (roam_req->num_ssid_white_list) + len += roam_req->num_ssid_white_list * sizeof(wmi_ssid); + len += 2 * WMI_TLV_HDR_SIZE; + if (roam_req->num_bssid_preferred_list) { + len += roam_req->num_bssid_preferred_list * sizeof(wmi_mac_addr); + len += roam_req->num_bssid_preferred_list * sizeof(A_UINT32); + } + if (roam_req->lca_disallow_config_present) + len += WMI_TLV_HDR_SIZE + + sizeof(wmi_roam_lca_disallow_config_tlv_param); buf = wmi_buf_alloc(wmi_handle, len); if (!buf) {