qcacld-3.0: umac: Add TWT componentization public structs and files

Add TWT componentization public structs, files and skeleton code
i.e add new dispatcher APIs, target_if callbacks.

Change-Id: I21fd6f5c3e92f8ea725771c20cd6dfdb560b2bf3
CRs-Fixed: 3085430
This commit is contained in:
Srinivas Girigowda
2021-11-30 15:19:17 -08:00
committato da Madan Koyyalamudi
parent 98937a8148
commit 38fe8b7acb
15 ha cambiato i file con 1984 aggiunte e 66 eliminazioni

Vedi File

@@ -0,0 +1,206 @@
/*
* 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: This file contains TWT config related definitions
*/
#ifndef __CFG_TWT_H_
#define __CFG_TWT_H_
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
/*
* <ini>
* twt_requestor - twt requestor.
* @Min: 0
* @Max: 1
* @Default: 1
*
* This cfg is used to store twt requestor config.
*
* Related: NA
*
* Supported Feature: 11AX
*
* Usage: Internal
*
* </ini>
*/
#define CFG_TWT_REQUESTOR CFG_INI_BOOL( \
"twt_requestor", \
1, \
"TWT requestor")
/*
* <ini>
* twt_responder - twt responder.
* @Min: 0
* @Max: 1
* @Default: 1
*
* This cfg is used to store twt responder config.
*
* Related: NA
*
* Supported Feature: 11AX
*
* Usage: Internal
*
* </ini>
*/
#define CFG_TWT_RESPONDER CFG_INI_BOOL( \
"twt_responder", \
1, \
"TWT responder")
/*
* <ini>
* enable_twt - Enable Target Wake Time support.
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable or disable TWT support.
*
* Related: NA
*
* Supported Feature: 11AX
*
* Usage: External
*
* </ini>
*/
#define CFG_ENABLE_TWT CFG_INI_BOOL( \
"enable_twt", \
1, \
"TWT support")
/*
* <ini>
* twt_congestion_timeout - Target wake time congestion timeout.
* @Min: 0
* @Max: 10000
* @Default: 100
*
* STA uses this timer to continuously monitor channel congestion levels to
* decide whether to start or stop TWT. This ini is used to configure the
* target wake time congestion timeout value in the units of milliseconds.
* A value of Zero indicates that this is a host triggered TWT and all the
* necessary configuration for TWT will be directed from the host.
*
* Related: NA
*
* Supported Feature: 11AX
*
* Usage: External
*
* </ini>
*/
#define CFG_TWT_CONGESTION_TIMEOUT CFG_INI_UINT( \
"twt_congestion_timeout", \
0, \
10000, \
100, \
CFG_VALUE_OR_DEFAULT, \
"twt congestion timeout")
/*
* <ini>
* twt_bcast_req_resp_config - To enable broadcast twt requestor and responder.
* @Min: 0 Disable the extended twt capability
* @Max: 3
* @Default: 1
*
* This cfg is used to configure the broadcast TWT requestor and responder.
* Bitmap for enabling the broadcast twt requestor and responder.
* BIT 0: Enable/Disable broadcast twt requestor.
* BIT 1: Enable/Disable broadcast twt responder.
* BIT 2-31: Reserved
*
* Related: CFG_ENABLE_TWT
* Related: CFG_TWT_RESPONDER
* Related: CFG_TWT_REQUESTOR
*
* Supported Feature: 11AX
*
* Usage: External
*
* </ini>
*/
/* defines to extract the requestor/responder capabilities from cfg */
#define TWT_BCAST_REQ_INDEX 0
#define TWT_BCAST_REQ_BITS 1
#define TWT_BCAST_RES_INDEX 1
#define TWT_BCAST_RES_BITS 1
#define CFG_BCAST_TWT_REQ_RESP CFG_INI_UINT( \
"twt_bcast_req_resp_config", \
0, \
3, \
1, \
CFG_VALUE_OR_DEFAULT, \
"BROADCAST TWT CAPABILITY")
#define CFG_TWT_GET_BCAST_REQ(_bcast_conf) \
QDF_GET_BITS(_bcast_conf, \
TWT_BCAST_REQ_INDEX, \
TWT_BCAST_REQ_BITS)
#define CFG_TWT_GET_BCAST_RES(_bcast_conf) \
QDF_GET_BITS(_bcast_conf, \
TWT_BCAST_RES_INDEX, \
TWT_BCAST_RES_BITS)
/*
* <ini>
* enable_twt_24ghz - Enable Target wake time when STA is connected on 2.4Ghz
* band.
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable/disable the host TWT when STA is connected to AP
* in 2.4Ghz band.
*
* Related: NA
*
* Supported Feature: 11AX
*
* Usage: External
*
* </ini>
*/
#define CFG_ENABLE_TWT_24GHZ CFG_INI_BOOL( \
"enable_twt_24ghz", \
true, \
"enable twt in 2.4Ghz band")
#define CFG_HE_FLEX_TWT_SCHED CFG_BOOL( \
"he_flex_twt_sched", \
0, \
"HE Flex Twt Sched")
#define CFG_TWT_ALL \
CFG(CFG_ENABLE_TWT) \
CFG(CFG_TWT_REQUESTOR) \
CFG(CFG_TWT_RESPONDER) \
CFG(CFG_TWT_CONGESTION_TIMEOUT) \
CFG(CFG_BCAST_TWT_REQ_RESP) \
CFG(CFG_ENABLE_TWT_24GHZ)
#elif !defined(WLAN_SUPPORT_TWT) && !defined(WLAN_TWT_CONV_SUPPORTED)
#define CFG_TWT_ALL
#endif
#endif /* __CFG_TWT_H_ */

Vedi File

@@ -0,0 +1,58 @@
/*
* 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.
*/
#ifndef _WLAN_TWT_CFG_EXT_API_H
#define _WLAN_TWT_CFG_EXT_API_H
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
#include <wlan_objmgr_psoc_obj.h>
#include <wlan_twt_public_structs.h>
/**
* wlan_twt_cfg_get_req_flag() - Get TWT requestor flag
* @psoc: Pointer to global psoc object
* @val: pointer to output variable
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS
wlan_twt_cfg_get_req_flag(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* wlan_twt_cfg_get_res_flag() - Get TWT responder flag
* @psoc: Pointer to global psoc object
* @val: pointer to output variable
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS
wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc *psoc, bool *val);
#else
static inline
wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc *psoc, bool *val)
{
return QDF_STATUS_SUCCESS;
}
static inline
wlan_twt_cfg_get_req_flag(struct wlan_objmgr_psoc *psoc, bool *val)
{
return QDF_STATUS_SUCCESS;
}
#endif
#endif

Vedi 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: wlan_twt_ext_defs.h
*
* This file provide definition for structure/enums/defines related to
* twt component
*/
#ifndef __WLAN_TWT_EXT_DEFS_H__
#define __WLAN_TWT_EXT_DEFS_H__
/*
* struct twt_mc_cfg_params - All twt related cfg items
* @enable_twt: global twt configuration
* @twt_responder: twt responder enable/disable
* @twt_requestor: twt requestor enable/disable
* @twt_congestion_timeout: congestion timeout value
* @bcast_requestor_enabled: bcast requestor enable/disable
* @bcast_responder_enabled: bcast responder enable/disable
* @enable_twt_24ghz: Enable/disable host TWT when STA is connected in
* 2.4Ghz
* @flex_twt_sched: flex twt scheduling enable/disable
* @req_flag: requestor flag enable/disable
* @res_flag: responder flag enable/disable
*/
struct twt_mc_cfg_params {
bool enable_twt;
bool twt_responder;
bool twt_requestor;
uint32_t twt_congestion_timeout;
bool bcast_requestor_enabled;
bool bcast_responder_enabled;
bool enable_twt_24ghz;
bool flex_twt_sched;
bool req_flag;
bool res_flag;
};
#endif /* __WLAN_TWT_EXT_DEFS_H__ */

Vedi File

@@ -0,0 +1,37 @@
/*
* 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: wlan_twt_ext_type.h
*
* This header file is included by the converged twt
* component to map legacy structures to the external
* (ext)typedefs used by the converged code.
*/
#ifndef __WLAN_TWT_EXT_TYPE_H__
#define __WLAN_TWT_EXT_TYPE_H__
/**
* typedef psoc_twt_ext_cfg_params_t - Definition of psoc twt cfg params
* Define twt cfg params from external umac/twt component point to this type
*/
typedef struct twt_mc_cfg_params psoc_twt_ext_cfg_params_t;
#endif /* __WLAN_TWT_EXT_TYPE_H__ */

Vedi File

@@ -0,0 +1,81 @@
/*
* 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: wlan_twt_tgt_if_ext_tx_api.h
*
* API declarations to send WMI command using Tx Ops
*/
#ifndef _WLAN_TWT_TGT_IF_EXT_TX_API_H_
#define _WLAN_TWT_TGT_IF_EXT_TX_API_H_
/**
* tgt_twt_setup_req_send() - Send twt setup request
* @psoc: Pointer to psoc object
* @req: TWT setup request
*
* Return: QDF_STATUS
*/
QDF_STATUS
tgt_twt_setup_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_param *req);
/**
* tgt_twt_teardown_req_send() - Send twt teardown request
* @psoc: Pointer to psoc object
* @req: TWT setup request
*
* Return: QDF_STATUS
*/
QDF_STATUS
tgt_twt_teardown_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_param *req);
/**
* tgt_twt_pause_req_send() - Send twt pause request
* @psoc: Pointer to psoc object
* @req: TWT pause request
*
* Return: QDF_STATUS
*/
QDF_STATUS
tgt_twt_pause_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_pause_dialog_cmd_param *req);
/**
* tgt_twt_resume_req_send() - Send twt resume request
* @psoc: Pointer to psoc object
* @req: TWT resume request
*
* Return: QDF_STATUS
*/
QDF_STATUS
tgt_twt_resume_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_resume_dialog_cmd_param *req);
/**
* tgt_twt_nudge_req_send() - Send twt nudge request
* @psoc: Pointer to psoc object
* @req: TWT nudge request
*
* Return: QDF_STATUS
*/
QDF_STATUS
tgt_twt_nudge_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_nudge_dialog_cmd_param *req);
#endif

Vedi File

@@ -0,0 +1,187 @@
/*
* 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.
*/
#ifndef _WLAN_TWT_UCFG_EXT_API_H
#define _WLAN_TWT_UCFG_EXT_API_H
#include <wlan_objmgr_psoc_obj.h>
#include <wlan_twt_public_structs.h>
#include <include/wlan_mlme_cmn.h>
/* dialog_id used to get all peer's twt session parameters */
#define TWT_GET_ALL_PEER_PARAMS_DIALOG_ID (0xFF)
/* Valid dialog_id 0 to (0xFF - 1) */
#define TWT_MAX_DIALOG_ID (TWT_GET_ALL_PEER_PARAMS_DIALOG_ID - 1)
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
/**
* ucfg_twt_psoc_open() - TWT psoc open
* @psoc: Pointer to global PSOC object
*
* Upon psoc open, this function initializes the twt config params
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS ucfg_twt_psoc_open(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_twt_psoc_close() - TWT psoc close
* @psoc: Pointer to global PSOC object
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS ucfg_twt_psoc_close(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_twt_update_psoc_config() - TWT update config
* @psoc: Pointer to global PSOC object
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS ucfg_twt_update_psoc_config(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_twt_setup_req() - TWT setup
* @psoc: Pointer to global PSOC object
* @params: add dialog params
* @context: twt context
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS ucfg_twt_setup_req(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_param *params,
void *context);
/**
* ucfg_twt_teardown_req() - TWT teardown
* @psoc: Pointer to global PSOC object
* @params: delete dialog params
* @context: twt context
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS ucfg_twt_teardown_req(struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_param *params,
void *context);
/**
* ucfg_twt_is_max_sessions_reached() - Check if the maximum number of
* TWT sessions reached or not excluding the given dialog_id
* @psoc: Pointer to global PSOC object
* @peer_mac: Global peer mac address
* @dialog_id: dialog id
*
* Check if the number of active TWT sessions is equal to the maximum number
* of TWT sessions supported. Only count the TWT session slot if it not
* TWT_ALL_SESSIONS_DIALOG_ID and dialog id is different from input dialog_id,
* because if same dialog_id already exists in the TWT sessions, we should
* return false since re-negotiation is supported on existing dialog_id.
*
* Return: True if slot is available for dialog_id, false otherwise
*/
bool ucfg_twt_is_max_sessions_reached(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *peer_mac,
uint8_t dialog_id);
/**
* ucfg_twt_is_setup_in_progress() - Get if TWT setup command is in progress
* for given dialog id
* @psoc: Pointer to global psoc object
* @peer_mac: Global peer mac address
* @dialog_id: Dialog ID
*
* Return: True if Setup is in progress
*/
bool ucfg_twt_is_setup_in_progress(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *peer_mac,
uint8_t dialog_id);
/**
* ucfg_twt_init_context() - Initialize TWT context
* @psoc: Pointer to global psoc object
* @peer_mac: Global peer mac address
* @dialog_id: Dialog ID
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS
ucfg_twt_init_context(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *peer_mac,
uint8_t dialog_id);
/**
* ucfg_twt_set_osif_cb() - Set TWT osif callbacks
* @osif_twt_ops: pointer to global osif ops
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS
ucfg_twt_set_osif_cb(osif_twt_get_global_ops_cb osif_twt_ops);
#else
static inline
QDF_STATUS ucfg_twt_psoc_open(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_twt_psoc_close(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_twt_update_psoc_config(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_twt_setup_req(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_param *params,
void *context)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_twt_teardown_req(struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_param *params,
void *context)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
ucfg_twt_init_context(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *peer_mac,
uint8_t dialog_id)
{
return QDF_STATUS_E_NOSUPPORT;
}
static inline QDF_STATUS
ucfg_twt_set_osif_cb(osif_twt_get_global_ops_cb osif_twt_ops)
{
return QDF_STATUS_E_NOSUPPORT;
}
#endif
#endif

Vedi File

@@ -0,0 +1,31 @@
/*
* 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.
*/
#include <wlan_twt_cfg_ext_api.h>
#include "twt/core/src/wlan_twt_cfg.h"
QDF_STATUS
wlan_twt_cfg_get_req_flag(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_cfg_get_requestor_flag(psoc, val);
}
QDF_STATUS
wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_cfg_get_responder_flag(psoc, val);
}

Vedi File

@@ -0,0 +1,90 @@
/*
* 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: wlan_twt_tgt_if_ext_rx_api.c
*
* This file provide definition for APIs registered for LMAC TWT Rx Ops
*/
#include <qdf_types.h>
#include <wlan_objmgr_psoc_obj.h>
#include <wlan_twt_public_structs.h>
#include <wlan_twt_tgt_if_ext_rx_ops.h>
static QDF_STATUS
tgt_twt_setup_complete_resp_handler(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_complete_event *event)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS
tgt_twt_teardown_complete_resp_handler(struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS
tgt_twt_pause_complete_resp_handler(struct wlan_objmgr_psoc *psoc,
struct twt_pause_dialog_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS
tgt_twt_resume_complete_resp_handler(struct wlan_objmgr_psoc *psoc,
struct twt_resume_dialog_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS
tgt_twt_nudge_complete_resp_handler(struct wlan_objmgr_psoc *psoc,
struct twt_nudge_dialog_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS
tgt_twt_notify_complete_resp_handler(struct wlan_objmgr_psoc *psoc,
struct twt_notify_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS
tgt_twt_ack_complete_resp_handler(struct wlan_objmgr_psoc *psoc,
struct twt_ack_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
void tgt_twt_register_ext_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
{
struct wlan_lmac_if_twt_rx_ops *twt_rx_ops = &rx_ops->twt_rx_ops;
twt_rx_ops->twt_setup_comp_cb = tgt_twt_setup_complete_resp_handler;
twt_rx_ops->twt_teardown_comp_cb =
tgt_twt_teardown_complete_resp_handler;
twt_rx_ops->twt_pause_comp_cb = tgt_twt_pause_complete_resp_handler;
twt_rx_ops->twt_resume_comp_cb = tgt_twt_resume_complete_resp_handler;
twt_rx_ops->twt_nudge_comp_cb = tgt_twt_nudge_complete_resp_handler;
twt_rx_ops->twt_notify_comp_cb = tgt_twt_notify_complete_resp_handler;
twt_rx_ops->twt_ack_comp_cb = tgt_twt_ack_complete_resp_handler;
}

Vedi File

@@ -0,0 +1,65 @@
/*
* 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: wlan_twt_tgt_if_ext_tx_api.c
*
* This file provides definitions for twt tgt_if APIs, which will
* further call target_if component using LMAC TWT txops
*/
#include <qdf_types.h>
#include <wlan_objmgr_psoc_obj.h>
#include <wlan_twt_public_structs.h>
#include <wlan_twt_api.h>
#include <wlan_twt_tgt_if_ext_tx_api.h>
#include <wlan_lmac_if_def.h>
QDF_STATUS
tgt_twt_setup_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_param *req)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
tgt_twt_teardown_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_param *req)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
tgt_twt_pause_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_pause_dialog_cmd_param *req)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
tgt_twt_resume_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_resume_dialog_cmd_param *req)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
tgt_twt_nudge_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_nudge_dialog_cmd_param *req)
{
return QDF_STATUS_SUCCESS;
}

Vedi File

@@ -0,0 +1,118 @@
/*
* 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.
*/
#include <wlan_twt_ucfg_ext_api.h>
#include <wlan_twt_ucfg_ext_cfg.h>
#include "twt/core/src/wlan_twt_cfg.h"
#include "twt/core/src/wlan_twt_main.h"
QDF_STATUS ucfg_twt_psoc_open(struct wlan_objmgr_psoc *psoc)
{
return wlan_twt_cfg_init(psoc);
}
QDF_STATUS ucfg_twt_update_psoc_config(struct wlan_objmgr_psoc *psoc)
{
return wlan_twt_cfg_update(psoc);
}
QDF_STATUS
ucfg_twt_cfg_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_cfg_get_requestor(psoc, val);
}
QDF_STATUS
ucfg_twt_cfg_get_responder(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_cfg_get_responder(psoc, val);
}
QDF_STATUS
ucfg_twt_setup_req(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_param *params,
void *context)
{
return wlan_twt_setup_req(psoc, params, context);
}
QDF_STATUS ucfg_twt_teardown_req(struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_param *params,
void *context)
{
return wlan_twt_teardown_req(psoc, params, context);
}
bool ucfg_twt_is_max_sessions_reached(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *peer_mac,
uint8_t dialog_id)
{
return wlan_twt_is_max_sessions_reached(psoc, peer_mac, dialog_id);
}
bool ucfg_twt_is_setup_in_progress(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *peer_mac,
uint8_t dialog_id)
{
return wlan_twt_is_setup_in_progress(psoc, peer_mac, dialog_id);
}
QDF_STATUS
ucfg_twt_cfg_get_congestion_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t *val)
{
return wlan_twt_cfg_get_congestion_timeout(psoc, val);
}
QDF_STATUS
ucfg_twt_cfg_set_congestion_timeout(struct wlan_objmgr_psoc *psoc, uint32_t val)
{
return wlan_twt_cfg_set_congestion_timeout(psoc, val);
}
QDF_STATUS
ucfg_twt_cfg_get_24ghz_enabled(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_cfg_get_24ghz_enabled(psoc, val);
}
QDF_STATUS
ucfg_twt_cfg_get_bcast_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_cfg_get_bcast_requestor(psoc, val);
}
QDF_STATUS
ucfg_twt_cfg_get_flex_sched(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_cfg_get_flex_sched(psoc, val);
}
QDF_STATUS
ucfg_twt_init_context(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *peer_mac,
uint8_t dialog_id)
{
return wlan_twt_init_context(psoc, peer_mac, dialog_id);
}
QDF_STATUS
ucfg_twt_set_osif_cb(osif_twt_get_global_ops_cb osif_twt_ops)
{
mlme_set_osif_twt_cb(osif_twt_ops);
return QDF_STATUS_SUCCESS;
}