mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacld-3.0: add NULL check before calling rps_enable cb
Add a NULL check before calling rps_enable callback from ipa_set_rps_per_vdev and also add a check to avoid disabling rps twice. Change-Id: Ib63b2cda99aa332905df640ffa2d401c22845ad2 CRs-Fixed: 2876490
This commit is contained in:
parent
35193a6200
commit
461295296a
2 changed files with 4 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -592,7 +592,8 @@ static inline
|
|||
void ipa_set_rps_per_vdev(struct wlan_ipa_priv *ipa_ctx, uint8_t vdev_id,
|
||||
bool enable)
|
||||
{
|
||||
ipa_ctx->rps_enable(vdev_id, enable);
|
||||
if (ipa_ctx->rps_enable)
|
||||
ipa_ctx->rps_enable(vdev_id, enable);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2357,7 +2357,7 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
|
|||
if (iface_ctx)
|
||||
wlan_ipa_cleanup_iface(iface_ctx);
|
||||
|
||||
if (qdf_ipa_get_lan_rx_napi())
|
||||
if (qdf_ipa_get_lan_rx_napi() && ipa_ctx->sap_num_connected_sta)
|
||||
ipa_set_rps_per_vdev(ipa_ctx, session_id, false);
|
||||
|
||||
qdf_mutex_release(&ipa_ctx->event_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue