qcacmn: Add interface with LMAC for NAN Component

Add interface with LMAC for NAN Component.

Change-Id: Idbcdaa19a7a2b83d5a2d125419a7bc6cbe72033d
CRs-Fixed: 2014795
This commit is contained in:
Naveen Rawat
2017-03-22 16:19:57 -07:00
committed by Sandeep Puligilla
parent 2b4f9310f8
commit cdb624f81d
2 changed files with 125 additions and 0 deletions

View File

@@ -23,4 +23,75 @@
#ifndef _WLAN_NAN_TGT_IF_H_
#define _WLAN_NAN_TGT_IF_H_
#include "qdf_types.h"
#include <qdf_mem.h>
#include <qdf_status.h>
#include <wmi_unified_api.h>
#include <wmi_unified_priv.h>
#include <wmi_unified_param.h>
#include <wlan_objmgr_psoc_obj.h>
#include <wlan_scan_tgt_api.h>
#include <target_if.h>
#include <target_if_scan.h>
struct wlan_objmgr_psoc;
struct wlan_lmac_if_rx_ops;
struct wlan_lmac_if_tx_ops;
struct wlan_lmac_if_nan_rx_ops;
/**
* target_if_nan_get_tx_ops() - retrieve the nan tx_ops
* @psoc: psoc context
*
* API to retrieve the nan tx_ops from the psoc context
*
* Return: nan tx_ops pointer
*/
struct wlan_lmac_if_nan_tx_ops *target_if_nan_get_tx_ops(
struct wlan_objmgr_psoc *psoc);
/**
* target_if_nan_get_rx_ops() - retrieve the nan rx_ops
* @psoc: psoc context
*
* API to retrieve the nan rx_ops from the psoc context
*
* Return: nan rx_ops pointer
*/
struct wlan_lmac_if_nan_rx_ops *target_if_nan_get_rx_ops(
struct wlan_objmgr_psoc *psoc);
/**
* target_if_nan_register_tx_ops() - registers nan tx ops
* @tx_ops: tx ops
*
* Return: none
*/
void target_if_nan_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops);
/**
* target_if_nan_register_rx_ops() - registers nan rx ops
* @tx_ops: rx ops
*
* Return: none
*/
void target_if_nan_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops);
/**
* target_if_nan_register_events() - registers with NDP events
* @psoc: pointer to psoc object
*
* Return: status of operation
*/
QDF_STATUS target_if_nan_register_events(struct wlan_objmgr_psoc *psoc);
/**
* target_if_nan_deregister_events() - registers nan rx ops
* @psoc: pointer to psoc object
*
* Return: status of operation
*/
QDF_STATUS target_if_nan_deregister_events(struct wlan_objmgr_psoc *psoc);
#endif /* _WIFI_POS_TGT_IF_H_ */

View File

@@ -19,3 +19,57 @@
/**
* DOC: contains nan target if functions
*/
#include "wlan_nan_api.h"
#include "nan_public_structs.h"
#include "target_if_nan.h"
static QDF_STATUS target_if_nan_req(void *in_req, uint32_t req_type)
{
return QDF_STATUS_SUCCESS;
}
void target_if_nan_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
{
tx_ops->nan_tx_ops.nan_req_tx = target_if_nan_req;
}
void target_if_nan_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
{
/* TBD */
rx_ops->nan_rx_ops.nan_event_rx = NULL;
}
inline struct wlan_lmac_if_nan_tx_ops *target_if_nan_get_tx_ops(
struct wlan_objmgr_psoc *psoc)
{
if (!psoc) {
target_if_err("psoc is null");
return NULL;
}
return &psoc->soc_cb.tx_ops.nan_tx_ops;
}
inline struct wlan_lmac_if_nan_rx_ops *target_if_nan_get_rx_ops(
struct wlan_objmgr_psoc *psoc)
{
if (!psoc) {
target_if_err("psoc is null");
return NULL;
}
return &psoc->soc_cb.rx_ops.nan_rx_ops;
}
QDF_STATUS target_if_nan_register_events(struct wlan_objmgr_psoc *psoc)
{
/* TBD */
return QDF_STATUS_SUCCESS;
}
QDF_STATUS target_if_nan_deregister_events(struct wlan_objmgr_psoc *psoc)
{
/* TBD */
return QDF_STATUS_SUCCESS;
}