From 276c0f1969ffbbdcb7f5b5d062ddaedfcd81ac46 Mon Sep 17 00:00:00 2001 From: bings Date: Fri, 19 Jan 2018 14:35:34 +0800 Subject: [PATCH] qcacmn: Use new APIs to get and set DFS Non-Occupancy-List(NOL) Current driver is using pld_wlan_set_dfs_nol() and pld_wlan_get_dfs_nol() directly through eSAP_DFS_NOL_SET and eSAP_DFS_NOL_GET case statements respectively within HDD module. These methods are obsoleted as per new driver design. Use DFS component's utils_dfs_init_nol() and utils_dfs_save_nol() APIs instead to get and set DFS NOL respectively. Change-Id: I63e8adac3f99c2052c26e6b01d19071f098e0a4f CRs-Fixed: 2178580 --- umac/dfs/core/src/misc/dfs_nol.c | 6 +++++- umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/umac/dfs/core/src/misc/dfs_nol.c b/umac/dfs/core/src/misc/dfs_nol.c index fdce666ac683..a02c25eb6500 100644 --- a/umac/dfs/core/src/misc/dfs_nol.c +++ b/umac/dfs/core/src/misc/dfs_nol.c @@ -227,7 +227,7 @@ static os_timer_func(dfs_remove_from_nol) dfs_debug(dfs, WLAN_DEBUG_DFS_NOL, "remove channel %d from nol", chan); utils_dfs_reg_update_nol_ch(dfs->dfs_pdev_obj, - (uint8_t *)&chan, 1, DFS_NOL_RESET); + &chan, 1, DFS_NOL_RESET); utils_dfs_save_nol(dfs->dfs_pdev_obj); /* @@ -330,6 +330,7 @@ void dfs_set_nol(struct wlan_dfs *dfs, uint32_t nol_time_left_ms; struct dfs_channel chan; int i; + uint8_t chan_num; if (!dfs) { dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "dfs is NULL"); @@ -350,6 +351,9 @@ void dfs_set_nol(struct wlan_dfs *dfs, DFS_NOL_ADD_CHAN_LOCKED(dfs, chan.dfs_ch_freq, (nol_time_left_ms / TIME_IN_MS)); + chan_num = utils_dfs_freq_to_chan(chan.dfs_ch_freq); + utils_dfs_reg_update_nol_ch(dfs->dfs_pdev_obj, + &chan_num, 1, DFS_NOL_SET); } } #undef TIME_IN_MS diff --git a/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c b/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c index 1ea891ac07a9..70a3202ec87e 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c @@ -343,8 +343,6 @@ QDF_STATUS wlan_dfs_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev, dfs_destroy_object(dfs); return QDF_STATUS_E_FAILURE; } - utils_dfs_init_nol(pdev); - DFS_PRINT_NOL_LOCKED(dfs); return QDF_STATUS_SUCCESS; }