qcacmn: Fix memory leaks in scan start and stop requests
-Fix memory leaks in scan start and stop request by freeing the request if posting to scheduler fails. -Populate scan event id based on target. Change-Id: I169c4f3c141dc1af48954788dc74d235afd59c9e CRs-Fixed: 1095299
This commit is contained in:

committed by
qcabuildsw

parent
54c28ccd14
commit
d14a189194
@@ -29,6 +29,18 @@
|
||||
#include <wlan_scan_tgt_api.h>
|
||||
#include <target_if.h>
|
||||
|
||||
#ifdef CONFIG_MCL
|
||||
inline uint32_t get_scan_event_id(void)
|
||||
{
|
||||
return WMI_SCAN_EVENTID;
|
||||
}
|
||||
#else
|
||||
inline uint32_t get_scan_event_id(void)
|
||||
{
|
||||
return wmi_scan_event_id;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline struct wlan_lmac_if_scan_rx_ops *
|
||||
target_if_scan_get_rx_ops(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
@@ -85,8 +97,11 @@ target_if_scan_event_handler(ol_scn_t scn, uint8_t *data, uint32_t datalen)
|
||||
QDF_STATUS
|
||||
target_if_scan_register_event_handler(struct wlan_objmgr_psoc *psoc, void *arg)
|
||||
{
|
||||
uint32_t scan_event_id;
|
||||
|
||||
scan_event_id = get_scan_event_id();
|
||||
return wmi_unified_register_event_handler(psoc->tgt_if_handle,
|
||||
wmi_scan_event_id, target_if_scan_event_handler,
|
||||
scan_event_id, target_if_scan_event_handler,
|
||||
WMI_RX_UMAC_CTX);
|
||||
}
|
||||
|
||||
@@ -94,8 +109,11 @@ QDF_STATUS
|
||||
target_if_scan_unregister_event_handler(struct wlan_objmgr_psoc *psoc,
|
||||
void *arg)
|
||||
{
|
||||
uint32_t scan_event_id;
|
||||
|
||||
scan_event_id = get_scan_event_id();
|
||||
return wmi_unified_unregister_event_handler(psoc->tgt_if_handle,
|
||||
wmi_scan_event_id);
|
||||
scan_event_id);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
|
Reference in New Issue
Block a user