In other than the FTM modes the memory allocated for the ftm
object is not used. Optimize the memory allocations by checking
for the device mode before allocating.
Change-Id: I5e8e454ae43b480e9d55cadb89c0757a1267b029
CRs-Fixed: 2809963
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within ftm replace any such comparisons with logical
operations performed on the pointer itself.
Change-Id: I0b089f46e99ab72a9ae494267a32e8b342a08ae3
CRs-Fixed: 2418259
The function wlan_ftm_process_utf_event, is invoked upon the
reception of the WMI event WMI_PDEV_UTF_EVENTID. The event_buf
argument to it is fully FW controlled. There are two issues
here:
1. event.datalen of type uint32_t is assigned to utf_datalen of
type uint16_t which can lead to a possible integer underflow.
2. utf_datalen is calculated as the difference of event.datalen
and sizeof(seghdr_info), without validating if datalen is not
less than sizeof(seghdr_info). This could cause a potential OOB
write as utf_datalen is used as the size to copy utf_data to
ftm_pdev_obj->data.
Add fix to change the type of utf_datalen to uint32_t.
Change-Id: Ibd61b4ef8cd514d43f212174e745b1c76af1047d
CRs-Fixed: 2305477
Add FTM flags to enable/disable FTM and enable NL80211 only, enable TX99
only or both.
Change-Id: I18bbbadd65d23221dc4d739e05235f4d81c12043
CRs-Fixed: 2240572
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.
Change-Id: I34ba6f6485f9b506264daf4e116052d2858bed40
CRs-Fixed: 2278876
Map all module level log APIs to per-level log APIs
to compile out specific log level if required.
Change-Id: I4072b6740cb43200fd95c40943b66e1d5f8f1847
CRs-Fixed: 2266719