From 0faf628eaa38a6b0fdd740a52fd49f6da10392dc Mon Sep 17 00:00:00 2001 From: Manikandan Mohan Date: Mon, 14 Jan 2019 18:00:04 -0800 Subject: [PATCH] qcacld-3.0: Fix hdd_tsf_is_ptp_enabled function for CFG item Fix compilation error caused after TSF PTP Options INI item is moved to CFG component from HDD config. Change-Id: I0c39fb4eb546ebd236d82e684aff7010512c74f9 CRs-fixed: 2380983 --- core/hdd/src/wlan_hdd_tsf.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_tsf.c b/core/hdd/src/wlan_hdd_tsf.c index 1885b9e03c88..babaa80c0e26 100644 --- a/core/hdd/src/wlan_hdd_tsf.c +++ b/core/hdd/src/wlan_hdd_tsf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019 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 @@ -146,8 +146,13 @@ static QDF_STATUS hdd_tsf_set_gpio(struct hdd_context *hdd_ctx) bool hdd_tsf_is_ptp_enabled(struct hdd_context *hdd) { - return (hdd && (hdd->config) && - (hdd->config->tsf_ptp_options)); + uint32_t tsf_ptp_options; + + if (hdd && QDF_IS_STATUS_SUCCESS( + ucfg_fwol_get_tsf_ptp_options(hdd->psoc, &tsf_ptp_options))) + return !!tsf_ptp_options; + else + return false; } bool hdd_tsf_is_tx_set(struct hdd_context *hdd)