mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Release reference of in_dev after fetching ipv4 list
Currently, while fetching ipv4 list in_dev is get via
in_dev_get and ref count of in_dev is incremented but
after fetching ip list in_dev_put is not used. So,
ref count will not be zero and may lead to issue while
destorying in_dev.
Fix is to use in_dev_put to maintain ref count to free
in_dev during rmmod.
Change-Id: I20a73127bb41c807315dbcd18adc1fb4278aa6d3
CRs-Fixed: 2921256
This commit is contained in:
parent
03924eab2c
commit
58b684e9fe
1 changed files with 26 additions and 6 deletions
|
|
@ -206,20 +206,30 @@ static QDF_STATUS
|
|||
hdd_send_igmp_offload_params(struct hdd_adapter *adapter,
|
||||
bool enable)
|
||||
{
|
||||
struct in_device *in_dev = in_dev_get(adapter->dev);
|
||||
struct ip_mc_list *ip_list = in_dev->mc_list;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct in_device *in_dev = adapter->dev->ip_ptr;
|
||||
struct ip_mc_list *ip_list;
|
||||
struct pmo_igmp_offload_req *igmp_req = NULL;
|
||||
int count = 0;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!ip_list) {
|
||||
hdd_debug("ip list empty");
|
||||
if (!in_dev) {
|
||||
hdd_err("in_dev is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
ip_list = in_dev->mc_list;
|
||||
if (!ip_list) {
|
||||
hdd_debug("ip list empty");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
igmp_req = qdf_mem_malloc(sizeof(*igmp_req));
|
||||
if (!igmp_req)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
if (!igmp_req) {
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
while (ip_list && ip_list->multiaddr && enable &&
|
||||
count < MAX_MC_IP_ADDR) {
|
||||
|
|
@ -233,11 +243,21 @@ hdd_send_igmp_offload_params(struct hdd_adapter *adapter,
|
|||
igmp_req->enable = enable;
|
||||
igmp_req->num_grp_ip_address = count;
|
||||
|
||||
status = ucfg_pmo_enable_igmp_offload(adapter->vdev, igmp_req);
|
||||
vdev = hdd_objmgr_get_vdev(adapter);
|
||||
if (!vdev) {
|
||||
hdd_err("vdev is NULL");
|
||||
qdf_mem_free(igmp_req);
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = ucfg_pmo_enable_igmp_offload(vdev, igmp_req);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
hdd_info("Failed to enable igmp offload");
|
||||
|
||||
hdd_objmgr_put_vdev(vdev);
|
||||
qdf_mem_free(igmp_req);
|
||||
out:
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue