From 62ae0a9e2fdc4bf936f84750468ae78bbb066107 Mon Sep 17 00:00:00 2001 From: Sandeep Puligilla Date: Mon, 26 Sep 2016 10:07:19 -0700 Subject: [PATCH] qcacmn: Correct the peer assoc command TLV length PEER assoc command failed in the tlv validation check. Tlv length sent in the TLV header is different from the length used to fill the tlv buffer which caused failure at tlv validation. Modified code to use the aligned length while filling the tlv buffer. Change-Id: I9ad2009315dd3cf37308ef44360d566035344950 CRs-Fixed: 1069008 --- wmi/src/wmi_unified_tlv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 23646b0ae7a5..d7d91daaea06 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -1638,7 +1638,7 @@ QDF_STATUS send_peer_assoc_cmd_tlv(wmi_unified_t wmi_handle, param->peer_legacy_rates.num_rates); /* Update peer HT rate information */ - buf_ptr += param->peer_legacy_rates.num_rates; + buf_ptr += peer_legacy_rates_align; WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, peer_ht_rates_align); buf_ptr += WMI_TLV_HDR_SIZE; @@ -1647,7 +1647,7 @@ QDF_STATUS send_peer_assoc_cmd_tlv(wmi_unified_t wmi_handle, param->peer_ht_rates.num_rates); /* VHT Rates */ - buf_ptr += param->peer_ht_rates.num_rates; + buf_ptr += peer_ht_rates_align; WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_STRUC_wmi_vht_rate_set, WMITLV_GET_STRUCT_TLVLEN(wmi_vht_rate_set));