qcacmn: Free outstanding skbs on Spectral detach

While detach if there are any outstanding skbs free them.

CRs-Fixed: 2470780
Change-Id: Ic9ee568a1af96b2535cc2a30747ac8e5190e1be6
This commit is contained in:
Edayilliam Jayadev
2019-06-13 11:56:07 +05:30
committed by nshrivas
parent 543c9b4909
commit 7c72252ec8
2 changed files with 15 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2017-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2011, 2017-2019 The Linux Foundation. All rights reserved.
* *
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
@@ -364,6 +364,9 @@ os_if_spectral_nl_unicast_msg(struct wlan_objmgr_pdev *pdev)
ps->skb, ps->skb,
ps->spectral_pid, MSG_DONTWAIT); ps->spectral_pid, MSG_DONTWAIT);
/* clear the local copy */
ps->skb = NULL;
return status; return status;
} }
#else #else
@@ -399,6 +402,9 @@ os_if_spectral_nl_unicast_msg(struct wlan_objmgr_pdev *pdev)
if (status < 0) if (status < 0)
spectral_err("failed to send to spectral scan app"); spectral_err("failed to send to spectral scan app");
/* clear the local copy */
ps->skb = NULL;
return status; return status;
} }
@@ -451,6 +457,9 @@ os_if_spectral_nl_bcast_msg(struct wlan_objmgr_pdev *pdev)
ps->skb, ps->skb,
0, 1, GFP_ATOMIC); 0, 1, GFP_ATOMIC);
/* clear the local copy */
ps->skb = NULL;
return status; return status;
} }
@@ -539,6 +548,8 @@ void os_if_spectral_netlink_deinit(struct wlan_objmgr_pdev *pdev)
return; return;
} }
os_if_spectral_free_skb(pdev);
if (sptrl_ctx->sptrlc_deregister_netlink_cb) if (sptrl_ctx->sptrlc_deregister_netlink_cb)
sptrl_ctx->sptrlc_deregister_netlink_cb(pdev); sptrl_ctx->sptrlc_deregister_netlink_cb(pdev);

View File

@@ -1463,9 +1463,10 @@ init_160mhz_delivery_state_machine(struct target_if_spectral *spectral) {
*/ */
static inline void static inline void
deinit_160mhz_delivery_state_machine(struct target_if_spectral *spectral) { deinit_160mhz_delivery_state_machine(struct target_if_spectral *spectral) {
if (spectral->spectral_report_cache) if (spectral->spectral_report_cache && spectral->nl_cb.free_nbuff) {
spectral->nl_cb.free_nbuff(spectral->pdev_obj); spectral->nl_cb.free_nbuff(spectral->pdev_obj);
spectral->spectral_report_cache = NULL; spectral->spectral_report_cache = NULL;
}
} }
/** /**