From adfc94c17c5f608e03bda0eb4e4369a49ff990c6 Mon Sep 17 00:00:00 2001 From: Shaakir Mohamed Date: Fri, 22 Feb 2019 11:26:15 -0800 Subject: [PATCH] qcacmn: Add support of Agile DFS in umac dispatcher layer Add DFS Rx and Tx operations to support Agile DFS feature. Change-Id: Ia91c9167d5fb4d01357e57daafc3f5a09e9c827d CRs-Fixed: 2385536 --- .../lmac_if/inc/wlan_lmac_if_def.h | 14 ++++++++++++++ .../lmac_if/src/wlan_lmac_if.c | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h index ca7e713bdc00..8c2dc63fc84b 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h @@ -714,6 +714,8 @@ struct wlan_lmac_if_reg_tx_ops { * @dfs_get_phymode_info: Get phymode info. * @dfs_reg_ev_handler: Register dfs event handler. * @dfs_process_emulate_bang_radar_cmd: Process emulate bang radar test command. + * @dfs_agile_ch_cfg_cmd: Send Agile Channel Configuration command + * @dfs_ocac_abort_cmd: Send Off-Channel CAC abort command. * @dfs_is_pdev_5ghz: Check if the given pdev is 5GHz. * @dfs_set_phyerr_filter_offload: Config phyerr filter offload. * @dfs_send_offload_enable_cmd: Send dfs offload enable command to fw. @@ -752,6 +754,9 @@ struct wlan_lmac_if_dfs_tx_ops { QDF_STATUS (*dfs_process_emulate_bang_radar_cmd)( struct wlan_objmgr_pdev *pdev, struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test); + QDF_STATUS (*dfs_agile_ch_cfg_cmd)(struct wlan_objmgr_pdev *pdev, + uint8_t *ch_freq); + QDF_STATUS (*dfs_ocac_abort_cmd)(struct wlan_objmgr_pdev *pdev); QDF_STATUS (*dfs_is_pdev_5ghz)(struct wlan_objmgr_pdev *pdev, bool *is_5ghz); QDF_STATUS (*dfs_set_phyerr_filter_offload)( @@ -1229,6 +1234,9 @@ struct wlan_lmac_if_wifi_pos_rx_ops { * @dfs_set_current_channel: Set DFS current channel. * @dfs_process_radar_ind: Process radar found indication. * @dfs_dfs_cac_complete_ind: Process cac complete indication. + * @dfs_agile_precac_start: Initiate Agile PreCAC run. + * @dfs_set_agile_precac_state: Set agile precac state. + * @dfs_dfs_ocac_complete_ind: Process offchan cac complete indication. * @dfs_stop: Clear dfs timers. * @dfs_enable_stadfs: Enable/Disable STADFS capability. * @dfs_is_stadfs_enabled: Get STADFS capability value. @@ -1277,6 +1285,12 @@ struct wlan_lmac_if_dfs_rx_ops { uint32_t *phy_mode, bool *dfs_set_cfreq2, bool *set_agile); + QDF_STATUS (*dfs_agile_precac_start)(struct wlan_objmgr_pdev *pdev); + QDF_STATUS (*dfs_set_agile_precac_state)(struct wlan_objmgr_pdev *pdev, + int agile_precac_state); + QDF_STATUS + (*dfs_dfs_ocac_complete_ind)(struct wlan_objmgr_pdev *pdev, + struct vdev_adfs_complete_status *ocac_st); QDF_STATUS (*dfs_start_precac_timer)(struct wlan_objmgr_pdev *pdev); QDF_STATUS (*dfs_cancel_precac_timer)(struct wlan_objmgr_pdev *pdev); QDF_STATUS (*dfs_override_precac_timeout)( diff --git a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c index faa7e58bb0de..1fbf3e95c4b4 100644 --- a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c +++ b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c @@ -381,6 +381,10 @@ wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) tgt_dfs_is_precac_timer_running; dfs_rx_ops->dfs_find_vht80_chan_for_precac = tgt_dfs_find_vht80_chan_for_precac; + dfs_rx_ops->dfs_agile_precac_start = + tgt_dfs_agile_precac_start; + dfs_rx_ops->dfs_set_agile_precac_state = + tgt_dfs_set_agile_precac_state; dfs_rx_ops->dfs_start_precac_timer = utils_dfs_start_precac_timer; dfs_rx_ops->dfs_cancel_precac_timer = utils_dfs_cancel_precac_timer; dfs_rx_ops->dfs_override_precac_timeout = @@ -392,6 +396,7 @@ wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) dfs_rx_ops->dfs_set_current_channel = tgt_dfs_set_current_channel; dfs_rx_ops->dfs_process_radar_ind = tgt_dfs_process_radar_ind; dfs_rx_ops->dfs_dfs_cac_complete_ind = tgt_dfs_cac_complete; + dfs_rx_ops->dfs_dfs_ocac_complete_ind = tgt_dfs_ocac_complete; dfs_rx_ops->dfs_stop = tgt_dfs_stop; dfs_rx_ops->dfs_enable_stadfs = tgt_dfs_enable_stadfs; dfs_rx_ops->dfs_is_stadfs_enabled = tgt_dfs_is_stadfs_enabled;