diff options
| author | Ryan Hsu <ryanhsu@codeaurora.org> | 2017-04-05 14:58:57 -0700 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-04-10 11:47:23 -0700 |
| commit | 8bafdadff971acc88b119c1e6cd074ec5b8a7422 (patch) | |
| tree | 9d9d9ff804ffe121bfaefbca939abeafe4bee860 | |
| parent | 5fa094d81befb12979da72a4b24aba007c491f7e (diff) | |
qcacld-3.0: avoiding toggling green ap state change when not in SAP mode
In the commit "qcacld-3.0: Disable GAP when concurrent sessions running"
We tried to update the green ap state, although inside the
hdd_green_ap_start_bss() it'll check if the SAP context/adapter is exist
or not, but it'll still show the message as below...
wlan: [326:E :HDD] hdd_green_ap_mc: 184: Green-AP no SAP adapter
So add sanity check before toggling the SAP related interfaces.
Change-Id: I2b6af3e3bb8001e3e34736f714334e37f7d57b2b
CRs-fixed: 2029613
| -rw-r--r-- | core/cds/src/cds_concurrency.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index 96cf9bc7e61e..2950da45af91 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -3591,7 +3591,11 @@ void cds_set_concurrency_mode(enum tQDF_ADAPTER_MODE mode) hdd_ctx->concurrency_mode, mode, hdd_ctx->no_of_open_sessions[mode]); - hdd_green_ap_start_bss(hdd_ctx); + /* + * Only toggle the green_ap update when SAP adapter exist. + */ + if (hdd_get_adapter(hdd_ctx, QDF_SAP_MODE)) + hdd_green_ap_start_bss(hdd_ctx); } /** @@ -3630,7 +3634,12 @@ void cds_clear_concurrency_mode(enum tQDF_ADAPTER_MODE mode) hdd_ctx->concurrency_mode, mode, hdd_ctx->no_of_open_sessions[mode]); - hdd_green_ap_start_bss(hdd_ctx); + /* + * Only toggle the green_ap update when SAP adapter exist or + * SAP interface removal. + */ + if (hdd_get_adapter(hdd_ctx, QDF_SAP_MODE) || (mode == QDF_SAP_MODE)) + hdd_green_ap_start_bss(hdd_ctx); } /** |
