Ravi Joshi | a063dd9 | 2016-05-25 16:43:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * Permission to use, copy, modify, and/or distribute this software for |
| 7 | * any purpose with or without fee is hereby granted, provided that the |
| 8 | * above copyright notice and this permission notice appear in all |
| 9 | * copies. |
| 10 | * |
| 11 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 12 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 13 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 14 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 15 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 16 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 17 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 18 | * PERFORMANCE OF THIS SOFTWARE. |
| 19 | */ |
| 20 | |
| 21 | /** |
| 22 | * DOC: wlan_hdd_nan_datapath.c |
| 23 | * |
| 24 | * WLAN Host Device Driver nan datapath API implementation |
| 25 | */ |
Deepak Dhamdhere | 13230d3 | 2016-05-26 00:46:53 -0700 | [diff] [blame^] | 26 | #include <wlan_hdd_includes.h> |
Ravi Joshi | a063dd9 | 2016-05-25 16:43:13 -0700 | [diff] [blame] | 27 | #include "wlan_hdd_nan_datapath.h" |
Deepak Dhamdhere | 3385d75 | 2016-05-25 20:36:47 -0700 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * hdd_ndp_print_ini_config()- Print nan datapath specific INI configuration |
| 31 | * @hdd_ctx: handle to hdd context |
| 32 | * |
| 33 | * Return: None |
| 34 | */ |
| 35 | void hdd_ndp_print_ini_config(hdd_context_t *hdd_ctx) |
| 36 | { |
| 37 | hddLog(LOG2, "Name = [%s] Value = [%u]", |
| 38 | CFG_ENABLE_NAN_DATAPATH_NAME, |
| 39 | hdd_ctx->config->enable_nan_datapath); |
| 40 | hddLog(LOG2, "Name = [%s] Value = [%u]", |
| 41 | CFG_ENABLE_NAN_NDI_CHANNEL_NAME, |
| 42 | hdd_ctx->config->nan_datapath_ndi_channel); |
| 43 | } |
Deepak Dhamdhere | 13230d3 | 2016-05-26 00:46:53 -0700 | [diff] [blame^] | 44 | |
| 45 | /** |
| 46 | * hdd_nan_datapath_target_config() - Configure NAN datapath features |
| 47 | * @hdd_ctx: Pointer to HDD context |
| 48 | * @cfg: Pointer to target device capability information |
| 49 | * |
| 50 | * NaN datapath functionality is enabled if it is enabled in |
| 51 | * .ini file and also supported in target device. |
| 52 | * |
| 53 | * Return: None |
| 54 | */ |
| 55 | |
| 56 | void hdd_nan_datapath_target_config(hdd_context_t *hdd_ctx, |
| 57 | struct wma_tgt_cfg *cfg) |
| 58 | { |
| 59 | hdd_ctx->config->enable_nan_datapath &= cfg->nan_datapath_enabled; |
| 60 | hddLog(LOG1, FL("enable_nan_datapath: %d"), |
| 61 | hdd_ctx->config->enable_nan_datapath); |
| 62 | } |