Browse Source

qcacld-3.0: Fix EAP length and roam candidate info

EAP length is of 2 bytes, but currently the attribute type
used is NLA_U8. This causes the EAP packets with length
greater than 255 to print invalid length.
For roam current AP, the roamed AP info is printed.

Use NLA_U16 attribute for the EAP length and fill
correct event type for the current connected AP.

Change-Id: I9b86055a4817163db17e469ca45b4a0044d5b2d6
CRs-Fixed: 3075012
Pragaspathi Thilagaraj 3 years ago
parent
commit
a3b3e83cca

+ 1 - 1
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -4925,7 +4925,7 @@ void cm_roam_candidate_info_event(struct wmi_roam_candidate_info *ap,
 	log_record->timestamp_us = qdf_get_time_of_the_day_us();
 	log_record->fw_timestamp_us = ap->timestamp * 1000;
 
-	log_record->ap.is_current_ap = (ap->type == 2);
+	log_record->ap.is_current_ap = (ap->type == 1);
 	if (log_record->ap.is_current_ap)
 		log_record->log_subtype = WLAN_ROAM_SCORE_CURR_AP;
 	else

+ 2 - 2
core/hdd/src/wlan_hdd_connectivity_logging.c

@@ -670,7 +670,7 @@ connectivity_attr_table[QCA_WLAN_VENDOR_DIAG_EVENT_TYPE_MAX + 1]
 	 GET_ATTR_OFFSET(vdev_id)},
 	{QCA_WLAN_VENDOR_ATTR_DIAG_EAP_TYPE, NLA_U8, sizeof(uint8_t),
 	 GET_ATTR_OFFSET(pkt_info.eap_type)},
-	{QCA_WLAN_VENDOR_ATTR_DIAG_EAP_LEN,  NLA_U8, sizeof(uint8_t),
+	{QCA_WLAN_VENDOR_ATTR_DIAG_EAP_LEN,  NLA_U16, sizeof(uint16_t),
 	 GET_ATTR_OFFSET(pkt_info.eap_len)},
 	{WLAN_CONNECTIVITY_ATTR_END,   0, 0, 0},
 	},
@@ -684,7 +684,7 @@ connectivity_attr_table[QCA_WLAN_VENDOR_DIAG_EVENT_TYPE_MAX + 1]
 	 GET_ATTR_OFFSET(vdev_id)},
 	{QCA_WLAN_VENDOR_ATTR_DIAG_EAP_TYPE, NLA_U8, sizeof(uint8_t),
 	 GET_ATTR_OFFSET(pkt_info.eap_type)},
-	{QCA_WLAN_VENDOR_ATTR_DIAG_EAP_LEN,  NLA_U8, sizeof(uint8_t),
+	{QCA_WLAN_VENDOR_ATTR_DIAG_EAP_LEN,  NLA_U16, sizeof(uint16_t),
 	 GET_ATTR_OFFSET(pkt_info.eap_len)},
 	{QCA_WLAN_VENDOR_ATTR_DIAG_FRAME_TX_STATUS, NLA_U8, sizeof(uint8_t),
 	 GET_ATTR_OFFSET(pkt_info.tx_status)},