qcacmn: os_if: Add TWT componentization structs and skeleton code
Add TWT componentization structs and skeleton code. CRs-Fixed: 3085329 Change-Id: I3ddbe7caad9e77858a2300151c92a83bc6c4b3c7
This commit is contained in:

committed by
Madan Koyyalamudi

parent
b66eb8977a
commit
5367345cfb
100
os_if/linux/twt/inc/osif_twt_req.h
Normal file
100
os_if/linux/twt/inc/osif_twt_req.h
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
|
* above copyright notice and this permission notice appear in all
|
||||||
|
* copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||||
|
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||||
|
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||||
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DOC : osif_twt_req.h
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _OSIF_TWT_REQ_H_
|
||||||
|
#define _OSIF_TWT_REQ_H_
|
||||||
|
|
||||||
|
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
|
||||||
|
#include <wlan_objmgr_psoc_obj.h>
|
||||||
|
#include <wlan_twt_public_structs.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* osif_twt_requestor_enable() - TWT requestor enable api
|
||||||
|
* @psoc: psoc handle
|
||||||
|
* @req: TWT enable request
|
||||||
|
*
|
||||||
|
* Return: 0 on success, errno on failure
|
||||||
|
*/
|
||||||
|
int osif_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_enable_param *req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* osif_twt_responder_enable() - TWT responder enable api
|
||||||
|
* @psoc: psoc handle
|
||||||
|
* @req: TWT enable request
|
||||||
|
*
|
||||||
|
* Return: 0 on success, errno on failure
|
||||||
|
*/
|
||||||
|
int osif_twt_responder_enable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_enable_param *req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* osif_twt_requestor_disable() - TWT requestor disable api
|
||||||
|
* @psoc: psoc handle
|
||||||
|
* @req: TWT disable request
|
||||||
|
*
|
||||||
|
* Return: 0 on success, errno on failure
|
||||||
|
*/
|
||||||
|
int osif_twt_requestor_disable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_disable_param *req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* osif_twt_responder_disable() - TWT responder disable api
|
||||||
|
* @psoc: psoc handle
|
||||||
|
* @req: TWT disable request
|
||||||
|
*
|
||||||
|
* Return: 0 on success, errno on failure
|
||||||
|
*/
|
||||||
|
int osif_twt_responder_disable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_disable_param *req);
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
int osif_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_enable_param *req)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
int osif_twt_responder_enable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_enable_param *req)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
int osif_twt_requestor_disable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_disable_param *req)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
int osif_twt_responder_disable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_disable_param *req)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* _OSIF_TWT_REQ_H_ */
|
||||||
|
|
73
os_if/linux/twt/inc/osif_twt_rsp.h
Normal file
73
os_if/linux/twt/inc/osif_twt_rsp.h
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
|
* above copyright notice and this permission notice appear in all
|
||||||
|
* copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||||
|
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||||
|
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||||
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DOC : osif_twt_rsp.h
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _OSIF_TWT_RSP_H_
|
||||||
|
#define _OSIF_TWT_RSP_H_
|
||||||
|
|
||||||
|
#include <wlan_objmgr_psoc_obj.h>
|
||||||
|
#include <wlan_twt_public_structs.h>
|
||||||
|
|
||||||
|
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
|
||||||
|
/**
|
||||||
|
* osif_twt_enable_complete_cb() - callback for twt enable complete event
|
||||||
|
* @psoc: Pointer to global psoc
|
||||||
|
* @event: Pointer to TWT enable dialog complete event structure
|
||||||
|
* @context: TWT enable context set during TWT enable request
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
osif_twt_enable_complete_cb(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_enable_complete_event_param *event,
|
||||||
|
void *context);
|
||||||
|
/**
|
||||||
|
* osif_twt_disable_complete_cb() - callback for twt disable complete event
|
||||||
|
* @psoc: Pointer to global psoc
|
||||||
|
* @event: Pointer to TWT disable dialog complete event structure
|
||||||
|
* @context: TWT disable context set during TWT disable request
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
osif_twt_disable_complete_cb(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_disable_complete_event_param *event,
|
||||||
|
void *context);
|
||||||
|
#else
|
||||||
|
static inline QDF_STATUS
|
||||||
|
osif_twt_enable_complete_cb(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_enable_complete_event_param *event,
|
||||||
|
void *context)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
osif_twt_disable_complete_cb(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_disable_complete_event_param *event,
|
||||||
|
void *context)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* _OSIF_TWT_RSP_H_ */
|
||||||
|
|
54
os_if/linux/twt/inc/osif_twt_util.h
Normal file
54
os_if/linux/twt/inc/osif_twt_util.h
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
|
* above copyright notice and this permission notice appear in all
|
||||||
|
* copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||||
|
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||||
|
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||||
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DOC : osif_twt_util.h
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _OSIF_TWT_UTIL_H_
|
||||||
|
#define _OSIF_TWT_UTIL_H_
|
||||||
|
|
||||||
|
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
|
||||||
|
/**
|
||||||
|
* struct twt_en_dis_priv - twt enable/disable private context
|
||||||
|
* @vdev_id: vdev id
|
||||||
|
*/
|
||||||
|
struct twt_en_dis_priv {
|
||||||
|
uint32_t pdev_id;
|
||||||
|
uint32_t status;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* osif_twt_register_cb() - Set TWT osif callbacks
|
||||||
|
*
|
||||||
|
* API to set twt callbacks to osif
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS osif_twt_register_cb(void);
|
||||||
|
|
||||||
|
#else
|
||||||
|
static inline QDF_STATUS osif_twt_register_cb(void)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif /* _OSIF_TWT_UTIL_H_ */
|
||||||
|
|
53
os_if/linux/twt/src/osif_twt_req.c
Normal file
53
os_if/linux/twt/src/osif_twt_req.c
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DOC: osif_twt_req.c
|
||||||
|
* This file contains twt request related osif APIs
|
||||||
|
*/
|
||||||
|
#include <osif_twt_req.h>
|
||||||
|
#include <osif_twt_util.h>
|
||||||
|
#include <wlan_osif_request_manager.h>
|
||||||
|
#include <wlan_twt_ucfg_api.h>
|
||||||
|
#include <wlan_twt_ucfg_ext_api.h>
|
||||||
|
|
||||||
|
#define TWT_DISABLE_COMPLETE_TIMEOUT 1000
|
||||||
|
#define TWT_ENABLE_COMPLETE_TIMEOUT 1000
|
||||||
|
|
||||||
|
int osif_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_enable_param *req)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int osif_twt_responder_enable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_enable_param *req)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int osif_twt_requestor_disable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_disable_param *req)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int osif_twt_responder_disable(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_disable_param *req)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
57
os_if/linux/twt/src/osif_twt_rsp.c
Normal file
57
os_if/linux/twt/src/osif_twt_rsp.c
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DOC: osif_twt_rsp.c
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <qdf_status.h>
|
||||||
|
#include <osif_twt_rsp.h>
|
||||||
|
#include <osif_twt_util.h>
|
||||||
|
#include <wlan_osif_request_manager.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* osif_twt_enable_complete_cb() - callback for twt enable complete event
|
||||||
|
* @psoc: Pointer to global psoc
|
||||||
|
* @event: Pointer to TWT enable dialog complete event structure
|
||||||
|
* @context: TWT enable context set during TWT enable request
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
osif_twt_enable_complete_cb(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_enable_complete_event_param *event,
|
||||||
|
void *context)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* osif_twt_disable_complete_cb() - callback for twt disable complete event
|
||||||
|
* @psoc: Pointer to global psoc
|
||||||
|
* @event: Pointer to TWT disable dialog complete event structure
|
||||||
|
* @context: TWT disable context set during TWT disable request
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
osif_twt_disable_complete_cb(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct twt_disable_complete_event_param *event,
|
||||||
|
void *context)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user