qcacmn: Register DFS component API in target_if

Register DFS component API in target_if and add API's to
handle radar found and cac found events from firmware.

Change-Id: I3f3d2ff5401e5c969a3df24f51e8aa57f4e17017
CRs-Fixed: 2017481
This commit is contained in:
Arif Hussain
2017-03-06 15:14:44 -08:00
committed by Sandeep Puligilla
parent 485d594ea1
commit 9fba31ea0b
3 changed files with 34 additions and 0 deletions

View File

@@ -30,6 +30,9 @@
#endif #endif
#include <target_if_reg.h> #include <target_if_reg.h>
#include <target_if_scan.h> #include <target_if_scan.h>
#ifdef DFS_COMPONENT_ENABLE
#include <target_if_dfs.h>
#endif
#ifdef CONVERGED_P2P_ENABLE #ifdef CONVERGED_P2P_ENABLE
#include "target_if_p2p.h" #include "target_if_p2p.h"
@@ -151,6 +154,19 @@ static void target_if_tdls_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops)
} }
#endif /* CONVERGED_TDLS_ENABLE */ #endif /* CONVERGED_TDLS_ENABLE */
#ifdef DFS_COMPONENT_ENABLE
static void target_if_dfs_tx_ops_register(
struct wlan_lmac_if_tx_ops *tx_ops)
{
target_if_register_dfs_tx_ops(tx_ops);
}
#else
static void target_if_dfs_tx_ops_register(
struct wlan_lmac_if_tx_ops *tx_ops)
{
}
#endif /* DFS_COMPONENT_ENABLE */
static static
QDF_STATUS target_if_register_umac_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) QDF_STATUS target_if_register_umac_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
{ {
@@ -166,6 +182,8 @@ QDF_STATUS target_if_register_umac_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
target_if_nan_tx_ops_register(tx_ops); target_if_nan_tx_ops_register(tx_ops);
target_if_dfs_tx_ops_register(tx_ops);
/* call regulatory callback to register tx ops */ /* call regulatory callback to register tx ops */
target_if_register_regulatory_tx_ops(tx_ops); target_if_register_regulatory_tx_ops(tx_ops);

View File

@@ -22,6 +22,9 @@
#include "qdf_status.h" #include "qdf_status.h"
#include "wlan_objmgr_cmn.h" #include "wlan_objmgr_cmn.h"
#ifdef DFS_COMPONENT_ENABLE
#include <wlan_dfs_public_struct.h>
#endif
#include "wlan_mgmt_txrx_utils_api.h" #include "wlan_mgmt_txrx_utils_api.h"
#include "wlan_scan_public_structs.h" #include "wlan_scan_public_structs.h"
#ifdef WLAN_ATF_ENABLE #ifdef WLAN_ATF_ENABLE
@@ -441,6 +444,7 @@ struct wlan_lmac_if_reg_tx_ops {
* @dfs_is_mode_offload: Check the radio for offload. * @dfs_is_mode_offload: Check the radio for offload.
* @dfs_get_ah_devid: Get ah devid. * @dfs_get_ah_devid: Get ah devid.
* @dfs_get_phymode_info: Get phymode info. * @dfs_get_phymode_info: Get phymode info.
* @dfs_reg_ev_handler: Register dfs event handler.
*/ */
struct wlan_lmac_if_dfs_tx_ops { struct wlan_lmac_if_dfs_tx_ops {
@@ -497,6 +501,8 @@ struct wlan_lmac_if_dfs_tx_ops {
QDF_STATUS (*dfs_get_phymode_info)(struct wlan_objmgr_pdev *pdev, QDF_STATUS (*dfs_get_phymode_info)(struct wlan_objmgr_pdev *pdev,
uint32_t chan_mode, uint32_t chan_mode,
uint32_t *mode_info); uint32_t *mode_info);
QDF_STATUS (*dfs_reg_ev_handler)(struct wlan_objmgr_pdev *pdev,
bool dfs_offload);
}; };
/** /**
@@ -758,6 +764,8 @@ struct wlan_lmac_if_nan_rx_ops {
* @dfs_get_precac_enable: Get precac enable flag. * @dfs_get_precac_enable: Get precac enable flag.
* @dfs_get_override_precac_timeout: Get precac timeout. * @dfs_get_override_precac_timeout: Get precac timeout.
* @dfs_set_current_channel: Set DFS current channel. * @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.
*/ */
struct wlan_lmac_if_dfs_rx_ops { struct wlan_lmac_if_dfs_rx_ops {
QDF_STATUS (*dfs_reset)(struct wlan_objmgr_pdev *pdev); QDF_STATUS (*dfs_reset)(struct wlan_objmgr_pdev *pdev);
@@ -811,6 +819,12 @@ struct wlan_lmac_if_dfs_rx_ops {
uint8_t ic_ieee, uint8_t ic_ieee,
uint8_t ic_vhtop_ch_freq_seg1, uint8_t ic_vhtop_ch_freq_seg1,
uint8_t ic_vhtop_ch_freq_seg2); uint8_t ic_vhtop_ch_freq_seg2);
#ifdef DFS_COMPONENT_ENABLE
QDF_STATUS (*dfs_process_radar_ind)(struct wlan_objmgr_pdev *pdev,
struct radar_found_info *radar_found);
QDF_STATUS (*dfs_dfs_cac_complete_ind)(struct wlan_objmgr_pdev *pdev,
uint32_t vdev_id);
#endif
}; };
/** /**

View File

@@ -191,6 +191,8 @@ wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
dfs_rx_ops->dfs_get_override_precac_timeout = dfs_rx_ops->dfs_get_override_precac_timeout =
ucfg_dfs_get_override_precac_timeout; ucfg_dfs_get_override_precac_timeout;
dfs_rx_ops->dfs_set_current_channel = tgt_dfs_set_current_channel; 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;
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }