From 06cfea0405002b6719ea31d0ce483d625432d57d Mon Sep 17 00:00:00 2001 From: Lin Bai Date: Thu, 1 Feb 2018 18:08:37 +0800 Subject: [PATCH] qcacld-3.0: Fix compiler warning from FTM convergence With FTM modification, compiler is throwing 'implicit declaration of function' warning, and treated as error. Change-Id: I2341685ff6e25fcef25a6ae7bed365481e9d529c CRs-Fixed: 2182458 --- core/hdd/src/wlan_hdd_ftm.c | 53 +++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/core/hdd/src/wlan_hdd_ftm.c b/core/hdd/src/wlan_hdd_ftm.c index e61241c8d49b..34d85c128373 100644 --- a/core/hdd/src/wlan_hdd_ftm.c +++ b/core/hdd/src/wlan_hdd_ftm.c @@ -92,6 +92,33 @@ int hdd_update_cds_config_ftm(struct hdd_context *hdd_ctx) } #ifdef LINUX_QCMBR + +/** + * wlan_hdd_qcmbr_command() - QCMBR command handler + * @adapter: adapter upon which the command was received + * @pqcmbr_data: QCMBR command + * + * Return: 0 on success, non-zero on error + */ +static int wlan_hdd_qcmbr_command(struct hdd_adapter *adapter, + struct qcmbr_data *pqcmbr_data) +{ + int ret = 0; + struct hdd_context *hdd_ctx; + + hdd_ctx = WLAN_HDD_GET_CTX(adapter); + ret = wlan_hdd_validate_context(hdd_ctx); + if (ret) + return ret; + + ret = wlan_ioctl_ftm_testmode_cmd(hdd_ctx->hdd_pdev, + pqcmbr_data->cmd, + pqcmbr_data->buf, + pqcmbr_data->length); + + return ret; +} + #ifdef CONFIG_COMPAT /** @@ -134,32 +161,6 @@ static int wlan_hdd_qcmbr_compat_ioctl(struct hdd_adapter *adapter, } #endif /* CONFIG_COMPAT */ -/** - * wlan_hdd_qcmbr_command() - QCMBR command handler - * @adapter: adapter upon which the command was received - * @pqcmbr_data: QCMBR command - * - * Return: 0 on success, non-zero on error - */ -static int wlan_hdd_qcmbr_command(struct hdd_adapter *adapter, - struct qcmbr_data *pqcmbr_data) -{ - int ret = 0; - struct hdd_context *hdd_ctx; - - hdd_ctx = WLAN_HDD_GET_CTX(adapter); - ret = wlan_hdd_validate_context(hdd_ctx); - if (ret) - return ret; - - ret = wlan_ioctl_ftm_testmode_cmd(hdd_ctx->hdd_pdev, - pqcmbr_data->cmd, - pqcmbr_data->buf, - pqcmbr_data->length); - - return ret; -} - /** * wlan_hdd_qcmbr_ioctl() - Standard QCMBR ioctl handler * @adapter: adapter upon which the ioctl was received