Browse Source

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
Sandeep Puligilla 8 years ago
parent
commit
62ae0a9e2f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      wmi/src/wmi_unified_tlv.c

+ 2 - 2
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));