qcacmn: umac: Add TWT componentization structs and skeleton code

Add TWT componentization structs and skeleton code.

Change-Id: I1c99c15b94cc39c6e5c7a32eea0d8095cf72555c
CRs-Fixed: 3085344
Цей коміт міститься в:
Srinivas Girigowda
2021-11-30 13:35:53 -08:00
зафіксовано Madan Koyyalamudi
джерело 5367345cfb
коміт b6ef4fe306
22 змінених файлів з 3098 додано та 6 видалено

Переглянути файл

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* 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
@@ -386,6 +386,7 @@ typedef enum {
WLAN_MBSS_ID = 91,
WLAN_MGMT_RX_REO_ID = 92,
WLAN_MGMT_RX_REO_SIM_ID = 93,
WLAN_TWT_ID = 94,
WLAN_REF_ID_MAX,
} wlan_objmgr_ref_dbgid;

Переглянути файл

@@ -90,6 +90,9 @@ struct dbr_module_config;
#ifdef WLAN_FEATURE_11BE_MLO
#include "wlan_mlo_mgr_public_structs.h"
#endif
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
#include "wlan_twt_public_structs.h"
#endif
#ifdef QCA_SUPPORT_CP_STATS
#include <wlan_cp_stats_public_structs.h>
@@ -1309,6 +1312,75 @@ struct wlan_lmac_if_mlo_rx_ops {
};
#endif
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
/**
* struct wlan_lmac_if_twt_tx_ops - defines southbound tx callbacks for
* TWT (Target Wake Time) component
* @enable_req: function pointer to send TWT enable command to FW
* @disable_req: function pointer to send TWT disable command to FW
* @setup_req: function pointer to send TWT add dialog command to FW
* @teardown_req: function pointer to send TWT delete dialog command to FW
* @pause_req: function pointer to send TWT pause dialog command to FW
* @resume_req: function pointer to send TWT resume dialog command to FW
* @nudge_req: function pointer to send TWT nudge dialog command to FW
* @register_events: function pointer to register events from FW
* @deregister_events: function pointer to deregister events from FW
*/
struct wlan_lmac_if_twt_tx_ops {
QDF_STATUS (*enable_req)(struct wlan_objmgr_psoc *psoc,
struct twt_enable_param *params);
QDF_STATUS (*disable_req)(struct wlan_objmgr_psoc *psoc,
struct twt_disable_param *params);
QDF_STATUS (*setup_req)(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_param *params);
QDF_STATUS (*teardown_req)(struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_param *params);
QDF_STATUS (*pause_req)(struct wlan_objmgr_psoc *psoc,
struct twt_pause_dialog_cmd_param *params);
QDF_STATUS (*resume_req)(struct wlan_objmgr_psoc *psoc,
struct twt_resume_dialog_cmd_param *params);
QDF_STATUS (*nudge_req)(struct wlan_objmgr_psoc *psoc,
struct twt_nudge_dialog_cmd_param *params);
QDF_STATUS (*register_events)(struct wlan_objmgr_psoc *psoc);
QDF_STATUS (*deregister_events)(struct wlan_objmgr_psoc *psoc);
};
/**
* struct wlan_lmac_if_twt_rx_ops - defines southbound xx callbacks for
* TWT (Target Wake Time) component
* @twt_enable_comp_cb: function pointer to process TWT enable event
* @twt_disable_comp_cb: function pointer to process TWT disable event
* @twt_setup_comp_cb: function pointer to process TWT add dialog event
* @twt_teardown_comp_cb: function pointer to process TWT del dialog event
* @twt_pause_comp_cb: function pointer to process TWT pause dialog event
* @twt_resume_comp_cb: function pointer to process TWT resume dialog
* event
* @twt_nudge_comp_cb: function pointer to process TWT nudge dialog event
* @twt_notify_comp_cb: function pointer to process TWT notify event
* @twt_ack_comp_cb: function pointer to process TWT ack event
*/
struct wlan_lmac_if_twt_rx_ops {
QDF_STATUS (*twt_enable_comp_cb)(struct wlan_objmgr_psoc *psoc,
struct twt_enable_complete_event_param *event);
QDF_STATUS (*twt_disable_comp_cb)(struct wlan_objmgr_psoc *psoc,
struct twt_disable_complete_event_param *event);
QDF_STATUS (*twt_setup_comp_cb)(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_complete_event *event);
QDF_STATUS (*twt_teardown_comp_cb)(struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_complete_event_param *event);
QDF_STATUS (*twt_pause_comp_cb)(struct wlan_objmgr_psoc *psoc,
struct twt_pause_dialog_complete_event_param *event);
QDF_STATUS (*twt_resume_comp_cb)(struct wlan_objmgr_psoc *psoc,
struct twt_resume_dialog_complete_event_param *event);
QDF_STATUS (*twt_nudge_comp_cb)(struct wlan_objmgr_psoc *psoc,
struct twt_nudge_dialog_complete_event_param *event);
QDF_STATUS (*twt_notify_comp_cb)(struct wlan_objmgr_psoc *psoc,
struct twt_notify_event_param *event);
QDF_STATUS (*twt_ack_comp_cb)(struct wlan_objmgr_psoc *psoc,
struct twt_ack_complete_event_param *params);
};
#endif
/**
* struct wlan_lmac_if_tx_ops - south bound tx function pointers
* @mgmt_txrx_tx_ops: mgmt txrx tx ops
@@ -1408,6 +1480,10 @@ struct wlan_lmac_if_tx_ops {
#ifdef IPA_OFFLOAD
struct wlan_lmac_if_ipa_tx_ops ipa_ops;
#endif
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
struct wlan_lmac_if_twt_tx_ops twt_tx_ops;
#endif
};
/**
@@ -2136,6 +2212,9 @@ struct wlan_lmac_if_rx_ops {
#ifdef WLAN_FEATURE_11BE_MLO
struct wlan_lmac_if_mlo_rx_ops mlo_rx_ops;
#endif
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
struct wlan_lmac_if_twt_rx_ops twt_rx_ops;
#endif
};
/* Function pointer to call legacy tx_ops registration in OL/WMA.

Переглянути файл

@@ -81,6 +81,8 @@
#include "wlan_mlo_mgr_cmn.h"
#endif
#include <wlan_twt_tgt_if_rx_api.h>
/* Function pointer for OL/WMA specific UMAC tx_ops
* registration.
*/
@@ -827,6 +829,19 @@ wlan_lmac_if_mlo_mgr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
}
#endif /* WLAN_FEATURE_11BE_MLO */
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
static
void wlan_lmac_if_twt_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
{
tgt_twt_register_rx_ops(rx_ops);
}
#else
static
void wlan_lmac_if_twt_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
{
}
#endif /* WLAN_SUPPORT_TWT && WLAN_TWT_CONV_SUPPORTED */
/**
* wlan_lmac_if_umac_rx_ops_register() - UMAC rx handler register
* @rx_ops: Pointer to rx_ops structure to be populated
@@ -892,6 +907,8 @@ wlan_lmac_if_umac_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
wlan_lmac_if_mlo_mgr_rx_ops_register(rx_ops);
wlan_lmac_if_twt_rx_ops_register(rx_ops);
return QDF_STATUS_SUCCESS;
}

Переглянути файл

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-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
@@ -25,6 +25,7 @@
#include <include/wlan_pdev_mlme.h>
#include <include/wlan_vdev_mlme.h>
#include "wlan_cm_public_struct.h"
#include "wlan_twt_public_structs.h"
/**
* mlme_cm_ops: connection manager osif callbacks
@@ -127,6 +128,90 @@ struct mlme_vdev_mgr_ops {
#endif
};
/**
* struct mlme_twt_ops: twt component osif callbacks
* @mlme_twt_enable_complete_cb: TWT enable complete callback
* @psoc: psoc pointer
* @event: response
* @context: context
*
* @mlme_twt_disable_complete_cb: TWT disable complete callback
* @psoc: psoc pointer
* @event: response
* @context: context
*
* @mlme_twt_ack_complete_cb: TWT ack complete callback
* @psoc: psoc pointer
* @event: response
* @context: context
*
* @mlme_twt_setup_complete_cb: TWT setup complete callback
* @psoc: psoc pointer
* @event: response
* @renego_fail: flag to indicate if renegotiation failure case
*
* @mlme_twt_teardown_complete_cb: TWT teardown complete callback
* @psoc: psoc pointer
* @event: response
*
* @mlme_twt_pause_complete_cb: TWT pause complete callback
* @psoc: psoc pointer
* @event: response
*
* @mlme_twt_resume_complete_cb: TWT resume complete callback
* @psoc: psoc pointer
* @event: response
*
* @mlme_twt_nudge_complete_cb: TWT nudge complete callback
* @psoc: psoc pointer
* @event: response
*
* @mlme_twt_notify_complete_cb: TWT notify complete callback
* @psoc: psoc pointer
* @event: response
*/
struct mlme_twt_ops {
QDF_STATUS (*mlme_twt_enable_complete_cb)(
struct wlan_objmgr_psoc *psoc,
struct twt_enable_complete_event_param *event,
void *context);
QDF_STATUS (*mlme_twt_disable_complete_cb)(
struct wlan_objmgr_psoc *psoc,
struct twt_disable_complete_event_param *event,
void *context);
QDF_STATUS (*mlme_twt_ack_complete_cb)(
struct wlan_objmgr_psoc *psoc,
struct twt_ack_complete_event_param *event,
void *context);
QDF_STATUS (*mlme_twt_setup_complete_cb)(
struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_complete_event *event,
bool renego_fail);
QDF_STATUS (*mlme_twt_teardown_complete_cb)(
struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_complete_event_param *event);
QDF_STATUS (*mlme_twt_pause_complete_cb)(
struct wlan_objmgr_psoc *psoc,
struct twt_pause_dialog_complete_event_param *event);
QDF_STATUS (*mlme_twt_resume_complete_cb)(
struct wlan_objmgr_psoc *psoc,
struct twt_resume_dialog_complete_event_param *event);
QDF_STATUS (*mlme_twt_nudge_complete_cb)(
struct wlan_objmgr_psoc *psoc,
struct twt_nudge_dialog_complete_event_param *event);
QDF_STATUS (*mlme_twt_notify_complete_cb)(
struct wlan_objmgr_psoc *psoc,
struct twt_notify_event_param *event);
};
/**
* struct vdev_mlme_ext_ops - VDEV MLME legacy callbacks structure
* @mlme_psoc_ext_hdl_create: callback to invoke creation of
@@ -754,6 +839,11 @@ mlme_cm_osif_cckm_preauth_complete(struct wlan_objmgr_vdev *vdev,
*/
typedef struct mlme_cm_ops *(*osif_cm_get_global_ops_cb)(void);
/**
* typedef osif_twt_get_global_ops_cb() - Callback to get twt global ops
*/
typedef struct mlme_twt_ops *(*osif_twt_get_global_ops_cb)(void);
/**
* mlme_set_osif_cm_cb() - Sets ops registration callback
* @cm_osif_ops: Function pointer
@@ -781,6 +871,16 @@ typedef struct mlme_vdev_mgr_ops *(*osif_vdev_mgr_get_global_ops_cb)(void);
void mlme_set_osif_vdev_mgr_cb(
osif_vdev_mgr_get_global_ops_cb mlme_vdev_mgr_osif_ops);
/**
* mlme_set_osif_twt_cb() - Sets twt ops registration callback
* @twt_osif_ops: Function pointer
*
* API to set twt ops registration call back
*
* Return: void
*/
void mlme_set_osif_twt_cb(osif_twt_get_global_ops_cb twt_osif_ops);
/**
* mlme_max_chan_switch_is_set() - Get if max chan switch IE is enabled
* @vdev: Object manager vdev pointer
@@ -817,4 +917,180 @@ QDF_STATUS mlme_vdev_ops_send_set_mac_address(struct qdf_mac_addr mac_addr,
void mlme_vdev_mgr_notify_set_mac_addr_response(uint8_t vdev_id,
uint8_t resp_status);
#endif
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
/**
* mlme_twt_osif_enable_complete_ind() - enable complete resp to osif
* @psoc: psoc pointer
* @event: enable complete response
*
* Return: QDF_STATUS
*/
QDF_STATUS
mlme_twt_osif_enable_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_enable_complete_event_param *event,
void *context);
/**
* mlme_twt_osif_disable_complete_ind() - disable complete resp to osif
* @psoc: psoc pointer
* @event: disable complete response
*
* Return: QDF_STATUS
*/
QDF_STATUS
mlme_twt_osif_disable_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_disable_complete_event_param *event,
void *context);
/**
* mlme_twt_osif_ack_complete_ind() - ack complete resp to osif
* @psoc: psoc pointer
* @event: ack complete response
*
* Return: QDF_STATUS
*/
QDF_STATUS
mlme_twt_osif_ack_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_ack_complete_event_param *event,
void *context);
/**
* mlme_twt_osif_setup_complete_ind() - setup complete resp to osif
* @psoc: psoc pointer
* @event: setup complete response
* @renego_fail: flag to indicate if renegotiation failure case
*
* Return: QDF_STATUS
*/
QDF_STATUS
mlme_twt_osif_setup_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_complete_event *event,
bool renego_fail);
/**
* mlme_twt_osif_teardown_complete_ind() - teardown complete resp to osif
* @psoc: psoc pointer
* @event: teardown complete response
*
* Return: QDF_STATUS
*/
QDF_STATUS
mlme_twt_osif_teardown_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_complete_event_param *event);
/**
* mlme_twt_osif_pause_complete_ind() - pause complete resp to osif
* @psoc: psoc pointer
* @event: pause complete response
*
* Return: QDF_STATUS
*/
QDF_STATUS
mlme_twt_osif_pause_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_pause_dialog_complete_event_param *event);
/**
* mlme_twt_osif_resume_complete_ind() - resume complete resp to osif
* @psoc: psoc pointer
* @event: resume complete response
*
* Return: QDF_STATUS
*/
QDF_STATUS
mlme_twt_osif_resume_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_resume_dialog_complete_event_param *event);
/**
* mlme_twt_osif_nudge_complete_ind() - nudge complete resp to osif
* @psoc: psoc pointer
* @event: nudge complete response
*
* Return: QDF_STATUS
*/
QDF_STATUS
mlme_twt_osif_nudge_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_nudge_dialog_complete_event_param *event);
/**
* mlme_twt_osif_notify_complete_ind() - notify complete resp to osif
* @psoc: psoc pointer
* @event: notify complete response
*
* Return: QDF_STATUS
*/
QDF_STATUS
mlme_twt_osif_notify_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_notify_event_param *event);
#else
static inline QDF_STATUS
mlme_twt_osif_enable_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_enable_complete_event_param *event,
void *context)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
mlme_twt_osif_disable_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_disable_complete_event_param *event,
void *context)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
mlme_twt_osif_ack_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_ack_complete_event_param *event,
void *context)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
mlme_twt_osif_setup_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_complete_event *event,
bool renego_fail)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
mlme_twt_osif_teardown_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
mlme_twt_osif_pause_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_pause_dialog_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
mlme_twt_osif_resume_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_resume_dialog_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
mlme_twt_osif_nudge_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_nudge_dialog_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
mlme_twt_osif_notify_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_notify_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
#endif /* WLAN_SUPPORT_TWT && WLAN_TWT_CONV_SUPPORTED */
#endif

Переглянути файл

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-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
@@ -35,6 +35,9 @@ mlme_get_global_ops_cb glbl_ops_cb;
struct mlme_cm_ops *glbl_cm_ops;
osif_cm_get_global_ops_cb glbl_cm_ops_cb;
struct mlme_twt_ops *glbl_twt_ops;
osif_twt_get_global_ops_cb glbl_twt_ops_cb;
static void mlme_cm_ops_init(void)
{
if (glbl_cm_ops_cb)
@@ -62,6 +65,18 @@ static void mlme_vdev_mgr_ops_deinit(void)
glbl_vdev_mgr_ops = NULL;
}
static void mlme_twt_ops_init(void)
{
if (glbl_twt_ops_cb)
glbl_twt_ops = glbl_twt_ops_cb();
}
static void mlme_twt_ops_deinit(void)
{
if (glbl_twt_ops_cb)
glbl_twt_ops = NULL;
}
QDF_STATUS wlan_cmn_mlme_init(void)
{
QDF_STATUS status;
@@ -85,6 +100,8 @@ QDF_STATUS wlan_cmn_mlme_init(void)
mlme_vdev_mgr_ops_init();
mlme_twt_ops_init();
return QDF_STATUS_SUCCESS;
}
@@ -92,7 +109,12 @@ QDF_STATUS wlan_cmn_mlme_deinit(void)
{
QDF_STATUS status;
mlme_twt_ops_deinit();
mlme_vdev_mgr_ops_deinit();
mlme_cm_ops_deinit();
status = wlan_vdev_mlme_deinit();
if (status != QDF_STATUS_SUCCESS)
return status;
@@ -105,8 +127,6 @@ QDF_STATUS wlan_cmn_mlme_deinit(void)
if (status != QDF_STATUS_SUCCESS)
return status;
mlme_cm_ops_deinit();
return QDF_STATUS_SUCCESS;
}
@@ -570,6 +590,11 @@ void mlme_set_osif_cm_cb(osif_cm_get_global_ops_cb osif_cm_ops)
glbl_cm_ops_cb = osif_cm_ops;
}
void mlme_set_osif_twt_cb(osif_twt_get_global_ops_cb osif_twt_ops)
{
glbl_twt_ops_cb = osif_twt_ops;
}
void mlme_set_ops_register_cb(mlme_get_global_ops_cb ops_cb)
{
glbl_ops_cb = ops_cb;
@@ -621,3 +646,123 @@ void mlme_vdev_mgr_notify_set_mac_addr_response(uint8_t vdev_id,
vdev_id, resp_status);
}
#endif
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
QDF_STATUS
mlme_twt_osif_enable_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_enable_complete_event_param *event,
void *context)
{
QDF_STATUS ret = QDF_STATUS_SUCCESS;
if (glbl_twt_ops && glbl_twt_ops->mlme_twt_enable_complete_cb)
ret = glbl_twt_ops->mlme_twt_enable_complete_cb(psoc,
event, context);
return ret;
}
QDF_STATUS
mlme_twt_osif_disable_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_disable_complete_event_param *event,
void *context)
{
QDF_STATUS ret = QDF_STATUS_SUCCESS;
if (glbl_twt_ops && glbl_twt_ops->mlme_twt_disable_complete_cb)
ret = glbl_twt_ops->mlme_twt_disable_complete_cb(psoc,
event, context);
return ret;
}
QDF_STATUS
mlme_twt_osif_ack_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_ack_complete_event_param *event,
void *context)
{
QDF_STATUS ret = QDF_STATUS_SUCCESS;
if (glbl_twt_ops && glbl_twt_ops->mlme_twt_ack_complete_cb)
ret = glbl_twt_ops->mlme_twt_ack_complete_cb(psoc,
event, context);
return ret;
}
QDF_STATUS
mlme_twt_osif_setup_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_complete_event *event,
bool renego)
{
QDF_STATUS ret = QDF_STATUS_SUCCESS;
if (glbl_twt_ops && glbl_twt_ops->mlme_twt_setup_complete_cb)
ret = glbl_twt_ops->mlme_twt_setup_complete_cb(psoc, event,
renego);
return ret;
}
QDF_STATUS
mlme_twt_osif_teardown_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_del_dialog_complete_event_param *event)
{
QDF_STATUS ret = QDF_STATUS_SUCCESS;
if (glbl_twt_ops && glbl_twt_ops->mlme_twt_teardown_complete_cb)
ret = glbl_twt_ops->mlme_twt_teardown_complete_cb(psoc, event);
return ret;
}
QDF_STATUS
mlme_twt_osif_pause_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_pause_dialog_complete_event_param *event)
{
QDF_STATUS ret = QDF_STATUS_SUCCESS;
if (glbl_twt_ops && glbl_twt_ops->mlme_twt_pause_complete_cb)
ret = glbl_twt_ops->mlme_twt_pause_complete_cb(psoc, event);
return ret;
}
QDF_STATUS
mlme_twt_osif_resume_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_resume_dialog_complete_event_param *event)
{
QDF_STATUS ret = QDF_STATUS_SUCCESS;
if (glbl_twt_ops && glbl_twt_ops->mlme_twt_resume_complete_cb)
ret = glbl_twt_ops->mlme_twt_resume_complete_cb(psoc, event);
return ret;
}
QDF_STATUS
mlme_twt_osif_nudge_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_nudge_dialog_complete_event_param *event)
{
QDF_STATUS ret = QDF_STATUS_SUCCESS;
if (glbl_twt_ops && glbl_twt_ops->mlme_twt_nudge_complete_cb)
ret = glbl_twt_ops->mlme_twt_nudge_complete_cb(psoc, event);
return ret;
}
QDF_STATUS
mlme_twt_osif_notify_complete_ind(struct wlan_objmgr_psoc *psoc,
struct twt_notify_event_param *event)
{
QDF_STATUS ret = QDF_STATUS_SUCCESS;
if (glbl_twt_ops && glbl_twt_ops->mlme_twt_notify_complete_cb)
ret = glbl_twt_ops->mlme_twt_notify_complete_cb(psoc, event);
return ret;
}
#endif

132
umac/twt/core/src/wlan_twt_common.c Звичайний файл
Переглянути файл

@@ -0,0 +1,132 @@
/*
* 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_common.c
*/
#include "wlan_twt_common.h"
#include "wlan_twt_priv.h"
#include <wlan_twt_public_structs.h>
#include <wlan_objmgr_peer_obj.h>
#include <wlan_twt_tgt_if_tx_api.h>
QDF_STATUS
wlan_twt_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_get_responder(struct wlan_objmgr_psoc *psoc, bool *val)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_get_legacy_bcast_twt_support(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_get_twt_bcast_req_support(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_get_twt_bcast_res_support(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_get_twt_nudge_enabled(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_get_all_twt_enabled(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_get_twt_stats_enabled(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_get_twt_ack_supported(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_requestor_disable(struct wlan_objmgr_psoc *psoc,
struct twt_disable_param *req,
void *context)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_responder_disable(struct wlan_objmgr_psoc *psoc,
struct twt_disable_param *req,
void *context)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
struct twt_enable_param *req,
void *context)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_responder_enable(struct wlan_objmgr_psoc *psoc,
struct twt_enable_param *req,
void *context)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_enable_event_handler(struct wlan_objmgr_psoc *psoc,
struct twt_enable_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_disable_event_handler(struct wlan_objmgr_psoc *psoc,
struct twt_disable_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}

167
umac/twt/core/src/wlan_twt_common.h Звичайний файл
Переглянути файл

@@ -0,0 +1,167 @@
/*
* 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_common.h
*/
#include <wlan_twt_api.h>
#include <wlan_objmgr_psoc_obj.h>
#include <wlan_twt_public_structs.h>
/**
* wlan_twt_get_requestor() - twt get requestor
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* wlan_twt_get_responder() - twt get responder
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_get_responder(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* wlan_twt_get_legacy_bcast_twt_support() - get legacy bcast support
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_get_legacy_bcast_twt_support(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* wlan_twt_get_twt_bcast_req_support() - get bcast requestor support
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_get_twt_bcast_req_support(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* wlan_twt_get_twt_bcast_res_support() - get bcast responder support
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_get_twt_bcast_res_support(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* wlan_twt_get_twt_nudge_enabled() - get nudge enabled
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_get_twt_nudge_enabled(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* wlan_twt_get_all_twt_enabled() - get all twt enabled
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_get_all_twt_enabled(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* wlan_twt_get_twt_stats_enabled() - get twt stats enabled
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_get_twt_stats_enabled(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* wlan_twt_get_twt_ack_supported() - get twt ack supported
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_get_twt_ack_supported(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* wlan_twt_disable() - twt disable
* @psoc: psoc handle
* @req: twt disable request structure
* @context: context
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_disable(struct wlan_objmgr_psoc *psoc,
struct twt_disable_param *req,
void *context);
/**
* wlan_twt_enable() - twt enable
* @psoc: psoc handle
* @req: twt enable request structure
* @context: context
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_enable(struct wlan_objmgr_psoc *psoc,
struct twt_enable_param *req,
void *context);
/**
* wlan_twt_enable_event_handler() - twt enable handler
* @psoc: psoc handle
* @event: twt enable event structure
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_enable_event_handler(struct wlan_objmgr_psoc *psoc,
struct twt_enable_complete_event_param *event);
/**
* wlan_twt_disable_event_handler() - twt disable handler
* @psoc: psoc handle
* @event: twt disable event structure
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_disable_event_handler(struct wlan_objmgr_psoc *psoc,
struct twt_disable_complete_event_param *event);

62
umac/twt/core/src/wlan_twt_objmgr.c Звичайний файл
Переглянути файл

@@ -0,0 +1,62 @@
/*
* 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_objmgr.c
* This file defines the APIs of TWT component.
*/
#include "wlan_twt_common.h"
#include "wlan_twt_priv.h"
#include "wlan_twt_objmgr_handler.h"
#include "wlan_objmgr_peer_obj.h"
QDF_STATUS
wlan_twt_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc, void *arg)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_psoc_obj_destroy_handler(struct wlan_objmgr_psoc *psoc, void *arg)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_vdev_obj_create_handler(struct wlan_objmgr_vdev *vdev, void *arg)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_vdev_obj_destroy_handler(struct wlan_objmgr_vdev *vdev, void *arg)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_peer_obj_create_handler(struct wlan_objmgr_peer *peer, void *arg)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_twt_peer_obj_destroy_handler(struct wlan_objmgr_peer *peer, void *arg)
{
return QDF_STATUS_SUCCESS;
}

82
umac/twt/core/src/wlan_twt_objmgr_handler.h Звичайний файл
Переглянути файл

@@ -0,0 +1,82 @@
/*
* 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_objmgr_handler.h
* This file defines the APIs of TWT component.
*/
/**
* wlan_twt_psoc_obj_create_handler() - twt psoc create handler
* @psoc: psoc handle
* @arg: argument
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc, void *arg);
/**
* wlan_twt_psoc_obj_destroy_handler() - twt psoc destroy handler
* @psoc: psoc handle
* @arg: argument
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_psoc_obj_destroy_handler(struct wlan_objmgr_psoc *psoc, void *arg);
/**
* wlan_twt_vdev_obj_create_handler() - twt vdev create handler
* @psoc: psoc handle
* @arg: argument
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_vdev_obj_create_handler(struct wlan_objmgr_vdev *vdev, void *arg);
/**
* wlan_twt_vdev_obj_destroy_handler() - twt vdev destroy handler
* @psoc: psoc handle
* @arg: argument
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_vdev_obj_destroy_handler(struct wlan_objmgr_vdev *vdev, void *arg);
/**
* wlan_twt_peer_obj_create_handler() - twt peer create handler
* @psoc: psoc handle
* @arg: argument
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_peer_obj_create_handler(struct wlan_objmgr_peer *peer, void *arg);
/**
* wlan_twt_peer_obj_destroy_handler() - twt peer destroy handler
* @psoc: psoc handle
* @arg: argument
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_peer_obj_destroy_handler(struct wlan_objmgr_peer *peer, void *arg);

111
umac/twt/core/src/wlan_twt_priv.h Звичайний файл
Переглянути файл

@@ -0,0 +1,111 @@
/*
* 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: Declare private data structures and APIs which shall be used
* internally only in twt component.
*
* Note: This API should be never accessed out of twt component.
*/
#ifndef _WLAN_TWT_PRIV_H_
#define _WLAN_TWT_PRIV_H_
#include <wlan_twt_public_structs.h>
#include <wlan_twt_ext_defs.h>
#include <wlan_twt_ext_type.h>
/**
* struct twt_tgt_caps -
* @twt_requestor: twt requestor
* @twt_responder: twt responder
* @legacy_bcast_twt_support: legacy bcast twt support
* @twt_bcast_req_support: bcast requestor support
* @twt_bcast_res_support: bcast responder support
* @twt_nudge_enabled: twt nudge enabled
* @all_twt_enabled: all twt enabled
* @twt_stats_enabled: twt stats enabled
* @twt_ack_supported: twt ack supported
*/
struct twt_tgt_caps {
bool twt_requestor;
bool twt_responder;
bool legacy_bcast_twt_support;
bool twt_bcast_req_support;
bool twt_bcast_res_support;
bool twt_nudge_enabled;
bool all_twt_enabled;
bool twt_stats_enabled;
bool twt_ack_supported;
};
/**
* struct twt_psoc_priv_obj -
* @cfg_params: cfg params
* @twt_caps: twt caps
* @enable_context: enable context
* @disable_context: disable context
*/
struct twt_psoc_priv_obj {
psoc_twt_ext_cfg_params_t cfg_params;
struct twt_tgt_caps twt_caps;
struct twt_en_dis_context enable_context;
struct twt_en_dis_context disable_context;
};
/**
* struct twt_vdev_priv_obj -
* @twt_wait_for_notify: wait for notify
*/
struct twt_vdev_priv_obj {
bool twt_wait_for_notify;
};
/**
* struct twt_session -
* @dialog_id: dialog id
* @state: state
* @setup_done: setup done
* @active_cmd: active command
* @twt_ack_ctx: twt ack context
*/
struct twt_session {
uint8_t dialog_id;
uint8_t state;
bool setup_done;
enum wlan_twt_commands active_cmd;
void *twt_ack_ctx;
};
/**
* struct twt_peer_priv_obj -
* @twt_peer_lock: peer lock
* @peer_capability: peer capability
* @num_twt_sessions: number of twt sessions
* @session_info: session info
*/
struct twt_peer_priv_obj {
qdf_mutex_t twt_peer_lock;
uint8_t peer_capability;
uint8_t num_twt_sessions;
struct twt_session session_info
[WLAN_MAX_TWT_SESSIONS_PER_PEER];
};
#endif /* End of _WLAN_TWT_PRIV_H_ */

134
umac/twt/dispatcher/inc/wlan_twt_api.h Звичайний файл
Переглянути файл

@@ -0,0 +1,134 @@
/*
* 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_api.h
*/
#ifndef _WLAN_TWT_API_H_
#define _WLAN_TWT_API_H_
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
#include <wlan_objmgr_psoc_obj.h>
#include <wlan_objmgr_global_obj.h>
#include <wlan_lmac_if_def.h>
#define twt_alert(params...) \
QDF_TRACE_FATAL(QDF_MODULE_ID_TWT, params)
#define twt_err(params...) \
QDF_TRACE_ERROR(QDF_MODULE_ID_TWT, params)
#define twt_warn(params...) \
QDF_TRACE_WARN(QDF_MODULE_ID_TWT, params)
#define twt_notice(params...) \
QDF_TRACE_INFO(QDF_MODULE_ID_TWT, params)
#define twt_debug(params...) \
QDF_TRACE_DEBUG(QDF_MODULE_ID_TWT, params)
#define twt_nofl_alert(params...) \
QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_TWT, params)
#define twt_nofl_err(params...) \
QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_TWT, params)
#define twt_nofl_warn(params...) \
QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_TWT, params)
#define twt_nofl_notice(params...) \
QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_TWT, params)
#define twt_nofl_debug(params...) \
QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_TWT, params)
/**
* twt_psoc_enable() - twt psoc enable
* @psoc: psoc handle
*
* return: QDF_STATUS
*/
QDF_STATUS twt_psoc_enable(struct wlan_objmgr_psoc *psoc);
/**
* twt_psoc_disable() - twt psoc disable
* @psoc: psoc handle
*
* return: QDF_STATUS
*/
QDF_STATUS twt_psoc_disable(struct wlan_objmgr_psoc *psoc);
/**
* wlan_twt_init() - twt init
* @psoc: psoc handle
*
* return: QDF_STATUS
*/
QDF_STATUS wlan_twt_init(void);
/**
* wlan_twt_deinit() - twt de-init
* @psoc: psoc handle
*
* return: QDF_STATUS
*/
QDF_STATUS wlan_twt_deinit(void);
/**
* wlan_twt_get_tx_ops() - get tx ops
* @psoc: psoc handle
*
* return: QDF_STATUS
*/
struct wlan_lmac_if_twt_tx_ops *
wlan_twt_get_tx_ops(struct wlan_objmgr_psoc *psoc);
/**
* wlan_twt_get_rx_ops() - get rx ops
* @psoc: psoc handle
*
* return: QDF_STATUS
*/
struct wlan_lmac_if_twt_rx_ops *
wlan_twt_get_rx_ops(struct wlan_objmgr_psoc *psoc);
/**
* wlan_twt_psoc_get_comp_private_obj() - get twt priv obj
* @psoc: psoc handle
*
* return: QDF_STATUS
*/
struct twt_psoc_priv_obj*
wlan_twt_psoc_get_comp_private_obj(struct wlan_objmgr_psoc *psoc);
#else
static inline
QDF_STATUS twt_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS twt_psoc_disable(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS wlan_twt_init(void)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS wlan_twt_deinit(void)
{
return QDF_STATUS_SUCCESS;
}
#endif
#endif /* _WLAN_TWT_API_H_ */

963
umac/twt/dispatcher/inc/wlan_twt_public_structs.h Звичайний файл
Переглянути файл

@@ -0,0 +1,963 @@
/*
* 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 various structures, macros used by the TWT
* component and other components interfacing with TWT component.
*/
#ifndef _WLAN_TWT_PUBLIC_STRUCTS_H_
#define _WLAN_TWT_PUBLIC_STRUCTS_H_
#include <qdf_types.h>
#define WLAN_MAX_TWT_SESSIONS_PER_PEER 1
#define TWT_ALL_SESSIONS_DIALOG_ID 255
/**
* enum wlan_twt_commands - TWT commands
* @WLAN_TWT_NONE: Indicates none of the TWT commands are active.
* @WLAN_TWT_SETUP: TWT setup
* @WLAN_TWT_TERMINATE: TWT terminate
* @WLAN_TWT_SUSPEND: TWT suspend
* @WLAN_TWT_RESUME: TWT resume
* @WLAN_TWT_NUDGE: TWT nudge
* @WLAN_TWT_STATISTICS: TWT statistics
* @WLAN_TWT_CLEAR_STATISTICS: TWT clear statistics
* @WLAN_TWT_ANY: Indicates one of the commands is in progress.
*/
enum wlan_twt_commands {
WLAN_TWT_NONE = 0,
WLAN_TWT_SETUP = BIT(0),
WLAN_TWT_TERMINATE = BIT(1),
WLAN_TWT_SUSPEND = BIT(2),
WLAN_TWT_RESUME = BIT(3),
WLAN_TWT_NUDGE = BIT(4),
WLAN_TWT_STATISTICS = BIT(5),
WLAN_TWT_CLEAR_STATISTICS = BIT(6),
WLAN_TWT_ANY = 0xFF,
};
/**
* enum wlan_twt_capabilities - Represents the Bitmap of TWT capabilities
* supported by device and peer.
* @WLAN_TWT_CAPA_REQUESTOR: TWT requestor support is advertised by TWT
* non-scheduling STA.
* @WLAN_TWT_CAPA_RESPONDER: TWT responder support is advertised by TWT
* AP.
* @WLAN_TWT_CAPA_BROADCAST: This indicates support for the role of broadcast
* TWT scheduling/receiving functionality.
* @WLAN_TWT_CAPA_FLEXIBLE: Device supports flexible TWT schedule.
* @WLAN_TWT_CAPA_REQUIRED: The TWT Required is advertised by AP to indicate
* that it mandates the associated HE STAs to support TWT.
*/
enum wlan_twt_capabilities {
WLAN_TWT_CAPA_REQUESTOR = BIT(0),
WLAN_TWT_CAPA_RESPONDER = BIT(1),
WLAN_TWT_CAPA_BROADCAST = BIT(2),
WLAN_TWT_CAPA_FLEXIBLE = BIT(3),
WLAN_TWT_CAPA_REQUIRED = BIT(4),
};
/**
* enum wlan_twt_session_state - TWT session state for a dialog id
* @WLAN_TWT_SETUP_STATE_NOT_ESTABLISHED: Session doesn't exist
* @WLAN_TWT_SETUP_STATE_ACTIVE: TWT session is active
* @WLAN_TWT_SETUP_STATE_SUSPEND: TWT session is suspended
*/
enum wlan_twt_session_state {
WLAN_TWT_SETUP_STATE_NOT_ESTABLISHED = 0,
WLAN_TWT_SETUP_STATE_ACTIVE = 1,
WLAN_TWT_SETUP_STATE_SUSPEND = 2,
};
/* enum TWT_ROLE - role specified in ext conf in wmi_twt_enable/disable_cmd
* TWT_ROLE_REQUESTOR: TWT role is requestor
* TWT_ROLE_RESPONDER: TWT role is responder
*/
enum TWT_ROLE {
TWT_ROLE_REQUESTOR,
TWT_ROLE_RESPONDER,
};
/* enum TWT_OPERATION - specified in ext conf in wmi_twt_enable/disable_cmd
* TWT_OPERATION_INDIVIDUAL: Individual TWT operation
* TWT_OPERATION_BROADCAST: Broadcast TWT operation
*/
enum TWT_OPERATION {
TWT_OPERATION_INDIVIDUAL,
TWT_OPERATION_BROADCAST,
};
/**
* struct twt_enable_param:
* @pdev_id: pdev_id for identifying the MAC.
* @sta_cong_timer_ms: STA TWT congestion timer TO value in terms of ms
* @mbss_support: Flag indicating if AP TWT feature supported in
* MBSS mode or not.
* @default_slot_size: This is the default value for the TWT slot setup
* by AP (units = microseconds)
* @congestion_thresh_setup: Minimum congestion required to start setting
* up TWT sessions
* @congestion_thresh_teardown: Minimum congestion below which TWT will be
* torn down (in percent of occupied airtime)
* @congestion_thresh_critical: Threshold above which TWT will not be active
* (in percent of occupied airtime)
* @interference_thresh_teardown: Minimum interference above that TWT
* will not be active. The interference parameters use an
* abstract method of evaluating interference.
* The parameters are in percent, ranging from 0 for no
* interference, to 100 for interference extreme enough
* to completely block the signal of interest.
* @interference_thresh_setup: Minimum interference below that TWT session
* can be setup. The interference parameters use an
* abstract method of evaluating interference.
* The parameters are in percent, ranging from 0 for no
* interference, to 100 for interference extreme enough
* to completely block the signal of interest.
* @min_no_sta_setup: Minimum no of STA required to start TWT setup
* @min_no_sta_teardown: Minimum no of STA below which TWT will be torn down
* @no_of_bcast_mcast_slots: Number of default slot sizes reserved for
* BCAST/MCAST delivery
* @min_no_twt_slots: Minimum no of available slots for TWT to be operational
* @max_no_sta_twt: Max no of STA with which TWT is possible
* (must be <= the wmi_resource_config's twt_ap_sta_count value)
* * The below interval parameters have units of milliseconds.
* @mode_check_interval: Interval between two successive check to decide the
* mode of TWT. (units = milliseconds)
* @add_sta_slot_interval: Interval between decisions making to create
* TWT slots for STAs. (units = milliseconds)
* @remove_sta_slot_interval: Inrerval between decisions making to remove TWT
* slot of STAs. (units = milliseconds)
* @twt_role: values from enum TWT_ROLE.
* @twt_oper: values from enum TWT_OPERATION.
* @ext_conf_present: If requestor/responder extend config is present.
* @b_twt_enable: Enable or disable broadcast TWT.
* @b_twt_legacy_mbss_enable: Enable or disable legacy MBSSID TWT.
* @b_twt_ax_mbss_enable: Enable or disable 11AX MBSSID TWT.
*/
struct twt_enable_param {
uint32_t pdev_id;
uint32_t sta_cong_timer_ms;
uint32_t mbss_support;
uint32_t default_slot_size;
uint32_t congestion_thresh_setup;
uint32_t congestion_thresh_teardown;
uint32_t congestion_thresh_critical;
uint32_t interference_thresh_teardown;
uint32_t interference_thresh_setup;
uint32_t min_no_sta_setup;
uint32_t min_no_sta_teardown;
uint32_t no_of_bcast_mcast_slots;
uint32_t min_no_twt_slots;
uint32_t max_no_sta_twt;
uint32_t mode_check_interval;
uint32_t add_sta_slot_interval;
uint32_t remove_sta_slot_interval;
enum TWT_ROLE twt_role;
enum TWT_OPERATION twt_oper;
bool ext_conf_present;
uint32_t b_twt_enable:1,
b_twt_legacy_mbss_enable:1,
b_twt_ax_mbss_enable:1;
};
/**
* struct twt_disable_param:
* @pdev_id: pdev_id for identifying the MAC.
* @ext_conf_present: If requestor/responder extend config is present.
* @twt_role: values from enum TWT_ROLE.
* @twt_oper: values from enum TWT_OPERATION.
*/
struct twt_disable_param {
uint32_t pdev_id;
bool ext_conf_present;
enum TWT_ROLE twt_role;
enum TWT_OPERATION twt_oper;
};
/* status code of enabling TWT
* HOST_TWT_ENABLE_STATUS_OK: enabling TWT successfully completed
* HOST_TWT_ENABLE_STATUS_ALREADY_ENABLED: TWT already enabled
* HOST_TWT_ENABLE_STATUS_NOT_READY: FW not ready for enabling TWT
* HOST_TWT_ENABLE_INVALID_PARAM: invalid parameters
* HOST_TWT_ENABLE_STATUS_UNKNOWN_ERROR: enabling TWT failed with an
* unknown reason
* HOST_TWT_ENABLE_STATUS_INVALID_COMMAND: If the host has sent TWT enable
* command and received TWT disable event or any other event
* then host sets this status internally.
*/
enum HOST_TWT_ENABLE_STATUS {
HOST_TWT_ENABLE_STATUS_OK,
HOST_TWT_ENABLE_STATUS_ALREADY_ENABLED,
HOST_TWT_ENABLE_STATUS_NOT_READY,
HOST_TWT_ENABLE_INVALID_PARAM,
HOST_TWT_ENABLE_STATUS_UNKNOWN_ERROR,
};
/* enum - status code of adding TWT dialog
* @HOST_ADD_TWT_STATUS_OK: adding TWT dialog successfully completed
* @HOST_ADD_TWT_STATUS_TWT_NOT_ENABLED: TWT not enabled
* @HOST_ADD_TWT_STATUS_USED_DIALOG_ID: TWT dialog ID is already used
* @HOST_ADD_TWT_STATUS_INVALID_PARAM: invalid parameters
* @HOST_ADD_TWT_STATUS_NOT_READY: FW not ready
* @HOST_ADD_TWT_STATUS_NO_RESOURCE: FW resource exhausted
* @HOST_ADD_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the
* request/response frame
* @HOST_ADD_TWT_STATUS_NO_RESPONSE: peer AP did not send the response frame
* @HOST_ADD_TWT_STATUS_DENIED: AP did not accept the request
* @HOST_ADD_TWT_STATUS_UNKNOWN_ERROR: adding TWT dialog failed with
* an unknown reason
* @HOST_ADD_TWT_STATUS_AP_PARAMS_NOT_IN_RANGE: peer AP wake interval,
* duration not in range
* @HOST_ADD_TWT_STATUS_AP_IE_VALIDATION_FAILED: peer AP IE Validation
* Failed
* @HOST_ADD_TWT_STATUS_ROAM_IN_PROGRESS: Roaming in progress
* @HOST_ADD_TWT_STATUS_CHAN_SW_IN_PROGRESS: Channel switch in progress
* @HOST_ADD_TWT_STATUS_SCAN_IN_PROGRESS: Scan is in progress
*/
enum HOST_ADD_TWT_STATUS {
HOST_ADD_TWT_STATUS_OK,
HOST_ADD_TWT_STATUS_TWT_NOT_ENABLED,
HOST_ADD_TWT_STATUS_USED_DIALOG_ID,
HOST_ADD_TWT_STATUS_INVALID_PARAM,
HOST_ADD_TWT_STATUS_NOT_READY,
HOST_ADD_TWT_STATUS_NO_RESOURCE,
HOST_ADD_TWT_STATUS_NO_ACK,
HOST_ADD_TWT_STATUS_NO_RESPONSE,
HOST_ADD_TWT_STATUS_DENIED,
HOST_ADD_TWT_STATUS_UNKNOWN_ERROR,
HOST_ADD_TWT_STATUS_AP_PARAMS_NOT_IN_RANGE,
HOST_ADD_TWT_STATUS_AP_IE_VALIDATION_FAILED,
HOST_ADD_TWT_STATUS_ROAM_IN_PROGRESS,
HOST_ADD_TWT_STATUS_CHAN_SW_IN_PROGRESS,
HOST_ADD_TWT_STATUS_SCAN_IN_PROGRESS,
};
/**
* struct twt_enable_complete_event_param:
* @pdev_id: pdev_id for identifying the MAC.
* @status: From enum TWT_ENABLE_STATUS
*/
struct twt_enable_complete_event_param {
uint32_t pdev_id;
uint32_t status;
};
/* enum HOST_TWT_DISABLE_STATUS - status code of disable TWT
* @HOST_TWT_DISABLE_STATUS_OK: TWT disable is successfully completed
* @HOST_TWT_DISABLE_STATUS_ROAM_IN_PROGRESS: roaming in progress
* @HOST_TWT_DISABLE_STATUS_CHAN_SW_IN_PROGRESS: channel switch in progress
* @HOST_TWT_DISABLE_STATUS_SCAN_IN_PROGRESS: scan in progress
* @HOST_TWT_DISABLE_STATUS_UNKNOWN_ERROR: unknown error
*/
enum HOST_TWT_DISABLE_STATUS {
HOST_TWT_DISABLE_STATUS_OK,
HOST_TWT_DISABLE_STATUS_ROAM_IN_PROGRESS,
HOST_TWT_DISABLE_STATUS_CHAN_SW_IN_PROGRESS,
HOST_TWT_DISABLE_STATUS_SCAN_IN_PROGRESS,
HOST_TWT_DISABLE_STATUS_UNKNOWN_ERROR,
};
/**
* struct twt_disable_complete_event:
* @pdev_id: pdev_id for identifying the MAC.
* @status: From enum HOST_TWT_DISABLE_STATUS
*/
struct twt_disable_complete_event_param {
uint32_t pdev_id;
uint32_t status;
};
/**
* twt_ack_context - twt ack private context
* @vdev_id: vdev id
* @peer_macaddr: peer mac address
* @dialog_id: dialog id
* @twt_cmd_ack: twt ack command
* @status: twt command status
*/
struct twt_ack_context {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
uint32_t twt_cmd_ack;
uint32_t status;
};
/**
* twt_en_dis_context - twt enable/disable private context
* @twt_role: twt role. When the upper layer is invoking requestor/responder
* enable/disable command via the TWT component API, Firmare WMI event
* doesn't have the info in the event params to distinguish if this enable or
* disable is for requestor or responder, hence TWT component stores this role
* before the request is sent to the firmware.
* @context: cookie. This is the cookie information passed back to the upper
* layer to help identify the request structure
*/
struct twt_en_dis_context {
enum TWT_ROLE twt_role;
void *context;
};
/**
* struct twt_ack_complete_event_param:
* @vdev_id: vdev id
* @peer_macaddr: peer mac address
* @dialog_id: dialog id
* @twt_cmd_ack: ack event to the corresponding twt command
* @status: twt command status
*/
struct twt_ack_complete_event_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
uint32_t twt_cmd_ack;
uint32_t status;
};
/**
* struct twt_session_stats_info:
* @vdev_id: id of VDEV for twt session
* @peer_mac: MAC address of node
* @event_type: Indicates TWT session type (SETUP/TEARDOWN/UPDATE)
* @flow_id: TWT flow identifier established with TWT peer
* @bcast: If this is a broacast TWT session
* @trig: If the TWT session is trigger enabled
* @announ: If the flow type is announced/unannounced
* @protection: If the TWT protection field is set
* @info_frame_disabled: If the TWT Information frame is disabled
* @dialog_id: Dialog_id of current session
* @wake_dura_us: wake duration in us
* @wake_intvl_us: wake time interval in us
* @sp_offset_us: Time until initial TWT SP occurs
* @sp_tsf_us_lo: TWT wake time TSF in usecs lower bits - 31:0
* @sp_tsf_us_hi: TWT wake time TSF in usecs higher bits - 63:32
*/
struct twt_session_stats_info {
uint32_t vdev_id;
struct qdf_mac_addr peer_mac;
uint32_t event_type;
uint32_t flow_id:16,
bcast:1,
trig:1,
announ:1,
protection:1,
info_frame_disabled:1,
pm_responder_bit_valid:1,
pm_responder_bit:1;
uint32_t dialog_id;
uint32_t wake_dura_us;
uint32_t wake_intvl_us;
uint32_t sp_offset_us;
uint32_t sp_tsf_us_lo;
uint32_t sp_tsf_us_hi;
};
/**
* struct twt_session_stats_event_param:
* @pdev_id: pdev_id for identifying the MAC.
* @num_sessions: number of TWT sessions
* @twt_sessions: received TWT sessions
*/
struct twt_session_stats_event_param {
uint32_t pdev_id;
uint32_t num_sessions;
};
/* from IEEE 802.11ah section 9.4.2.200 */
enum HOST_TWT_COMMAND {
HOST_TWT_COMMAND_REQUEST_TWT = 0,
HOST_TWT_COMMAND_SUGGEST_TWT = 1,
HOST_TWT_COMMAND_DEMAND_TWT = 2,
HOST_TWT_COMMAND_TWT_GROUPING = 3,
HOST_TWT_COMMAND_ACCEPT_TWT = 4,
HOST_TWT_COMMAND_ALTERNATE_TWT = 5,
HOST_TWT_COMMAND_DICTATE_TWT = 6,
HOST_TWT_COMMAND_REJECT_TWT = 7,
};
/**
* struct twt_add_dialog_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: peer MAC address when vdev is AP VDEV
* @dialog_id: diaglog_id (TWT dialog ID)
* This dialog ID must be unique within its vdev.
* @wake_intvl_us: TWT Wake Interval in units of us
* @wake_intvl_mantis: TWT Wake Interval Mantissa
* - wake_intvl_mantis must be <= 0xFFFF
* - wake_intvl_us must be divided evenly by wake_intvl_mantis,
* i.e., wake_intvl_us % wake_intvl_mantis == 0
* - the quotient of wake_intvl_us/wake_intvl_mantis must be
* 2 to N-th(0<=N<=31) power,
* i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
* @min_wake_intvl_us: Min tolerance limit of TWT wake interval
* @max_wake_intvl_us: Max tolerance limit of TWT wake interval
* @wake_dura_us: TWT Wake Duration in units of us, must be <= 0xFFFF
* wake_dura_us must be divided evenly by 256,
* i.e., wake_dura_us % 256 == 0
* @min_wake_dura_us: Min tolerance limit of TWT wake duration.
* @max_wake_dura_us: Max tolerance limit of TWT wake duration.
* @sp_offset_us: this long time after TWT setup the 1st SP will start.
* @twt_cmd: cmd from enum HOST_TWT_COMMAND
* @flag_bcast: 0 means Individual TWT,
* 1 means Broadcast TWT
* @flag_trigger: 0 means non-Trigger-enabled TWT,
* 1 means means Trigger-enabled TWT
* @flag_flow_type: 0 means announced TWT,
* 1 means un-announced TWT
* @flag_protection: 0 means TWT protection is required,
* 1 means TWT protection is not required
* @b_twt_id0: 0 means BTWT recommendation will not be used
* 1 means BTWT recommendation will be used
* @flag_reserved: unused bits
* @b_twt_recommendation: defines types of frames tx during bTWT SP
* @b_twt_persistence: Countdown VAL frames to param update/teardown
* @wake_time_tsf: Absolute TSF value to start first TWT service period
* @annouce_timeout_us: Timeout value before sending QoS NULL frame.
*/
struct twt_add_dialog_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
uint32_t wake_intvl_us;
uint32_t wake_intvl_mantis;
uint32_t min_wake_intvl_us;
uint32_t max_wake_intvl_us;
uint32_t wake_dura_us;
uint32_t min_wake_dura_us;
uint32_t max_wake_dura_us;
uint32_t sp_offset_us;
enum HOST_TWT_COMMAND twt_cmd;
uint32_t
flag_bcast:1,
flag_trigger:1,
flag_flow_type:1,
flag_protection:1,
flag_b_twt_id0:1,
flag_reserved:11,
b_twt_persistence:8,
b_twt_recommendation:3;
uint64_t wake_time_tsf;
uint32_t announce_timeout_us;
};
/* enum HOST_TWT_GET_STATS_STATUS - status code of TWT Get stats dialog id
* @HOST_TWT_GET_STATS_STATUS_OK: Get status TWT dialog successfully completed
* @HOST_TWT_GET_STATS_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID does not exist
* @HOST_TWT_GET_STATS_STATUS_INVALID_PARAM: Invalid parameters
* @HOST_TWT_GET_STATS_STATUS_UNKNOWN_ERROR: Unknown error
*/
enum HOST_TWT_GET_STATS_STATUS {
HOST_TWT_GET_STATS_STATUS_OK,
HOST_TWT_GET_STATS_STATUS_DIALOG_ID_NOT_EXIST,
HOST_TWT_GET_STATS_STATUS_INVALID_PARAM,
HOST_TWT_GET_STATS_STATUS_UNKNOWN_ERROR,
};
/* enum HOST_TWT_ADD_STATUS - status code of TWT add dialog
* @HOST_TWT_ADD_STATUS_OK: add TWT dialog successfully completed
* @HOST_TWT_ADD_STATUS_TWT_NOT_ENABLED: TWT not enabled
* @HOST_TWT_ADD_STATUS_USED_DIALOG_ID: TWT dialog ID is already used
* @HOST_TWT_ADD_STATUS_INVALID_PARAM: invalid parameters
* @HOST_TWT_ADD_STATUS_NOT_READY: FW not ready
* @HOST_TWT_ADD_STATUS_NO_RESOURCE: FW resource exhausted
* @HOST_TWT_ADD_STATUS_NO_ACK: peer AP/STA did not ACK the
* request/response frame
* @HOST_TWT_ADD_STATUS_NO_RESPONSE: peer AP did not send the response frame
* @HOST_TWT_ADD_STATUS_DENIED: AP did not accept the request
* @HOST_TWT_ADD_STATUS_UNKNOWN_ERROR: adding TWT dialog failed with
* an unknown reason
* @HOST_TWT_ADD_STATUS_AP_PARAMS_NOT_IN_RANGE: peer AP wake interval,
* duration not in range
* @HOST_TWT_ADD_STATUS_AP_IE_VALIDATION_FAILED: peer AP IE Validation
* Failed
* @HOST_TWT_ADD_STATUS_ROAM_IN_PROGRESS: Roaming in progress
* @HOST_TWT_ADD_STATUS_CHAN_SW_IN_PROGRESS: Channel switch in progress
* @HOST_TWT_ADD_STATUS_SCAN_IN_PROGRESS: Scan is in progress
*/
enum HOST_TWT_ADD_STATUS {
HOST_TWT_ADD_STATUS_OK,
HOST_TWT_ADD_STATUS_TWT_NOT_ENABLED,
HOST_TWT_ADD_STATUS_USED_DIALOG_ID,
HOST_TWT_ADD_STATUS_INVALID_PARAM,
HOST_TWT_ADD_STATUS_NOT_READY,
HOST_TWT_ADD_STATUS_NO_RESOURCE,
HOST_TWT_ADD_STATUS_NO_ACK,
HOST_TWT_ADD_STATUS_NO_RESPONSE,
HOST_TWT_ADD_STATUS_DENIED,
HOST_TWT_ADD_STATUS_UNKNOWN_ERROR,
HOST_TWT_ADD_STATUS_AP_PARAMS_NOT_IN_RANGE,
HOST_TWT_ADD_STATUS_AP_IE_VALIDATION_FAILED,
HOST_TWT_ADD_STATUS_ROAM_IN_PROGRESS,
HOST_TWT_ADD_STATUS_CHAN_SW_IN_PROGRESS,
HOST_TWT_ADD_STATUS_SCAN_IN_PROGRESS,
};
/**
* struct twt_add_dialog_additional_params -
* @twt_cmd: TWT command
* @bcast: 0 means Individual TWT
* 1 means Broadcast TWT
* @trig_en: 0 means non-Trigger-enabled TWT
* 1 means Trigger-enabled TWT
* @announce: 0 means announced TWT
* 1 means un-announced TWT
* @protection: 0 means TWT protection is required
* 1 means TWT protection is not required
* @b_twt_id0: 0 means non-0 B-TWT ID or I-TWT
* 1 means B-TWT ID 0
* @info_frame_disabled: 0 means TWT Information frame is enabled
* 1 means TWT Information frame is disabled
* @pm_responder_bit_valid: 1 means responder pm mode field is valid
* 0 means responder pm mode field is not valid
* @pm_responder_bit: 1 means that responder set responder pm mode to 1
* 0 means that responder set responder pm mode to 0
* @wake_dura_us: wake duration in us
* @wake_intvl_us: wake time interval in us
* @sp_offset_us: Time until initial TWT SP occurs
* @sp_tsf_us_lo: TWT service period tsf in usecs lower bits - 31:0
* @sp_tsf_us_hi: TWT service period tsf in usecs higher bits - 63:32
*/
struct twt_add_dialog_additional_params {
uint32_t twt_cmd:8,
bcast:1,
trig_en:1,
announce:1,
protection:1,
b_twt_id0:1,
info_frame_disabled:1,
pm_responder_bit_valid:1,
pm_responder_bit:1;
uint32_t wake_dur_us;
uint32_t wake_intvl_us;
uint32_t sp_offset_us;
uint32_t sp_tsf_us_lo;
uint32_t sp_tsf_us_hi;
};
/**
* struct twt_add_dialog_complete_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: TWT dialog ID
* @status: refer to HOST_TWT_ADD_STATUS enum
* @num_additional_twt_params: no of additional_twt_params available
*/
struct twt_add_dialog_complete_event_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
uint32_t status;
uint32_t num_additional_twt_params;
};
/**
* struct twt_add_dialog_complete_event - TWT add dialog complete event
* @params: Fixed parameters for TWT add dialog complete event
* @additional_params: additional parameters for TWT add dialog complete event
*
* Holds the fixed and additional parameters from add dialog
* complete event
*/
struct twt_add_dialog_complete_event {
struct twt_add_dialog_complete_event_param params;
struct twt_add_dialog_additional_params additional_params;
};
/**
* struct twt_del_dialog_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: TWT dialog ID
* @b_twt_persistence: persistence val for b-twt
*/
struct twt_del_dialog_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
#ifdef WLAN_SUPPORT_BCAST_TWT
uint32_t b_twt_persistence;
#endif
};
/**
* enum HOST_TWT_DEL_STATUS - status code of delete TWT dialog
* @HOST_TWT_DEL_STATUS_OK: deleting TWT dialog successfully completed
* @HOST_TWT_DEL_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
* @HOST_TWT_DEL_STATUS_INVALID_PARAM: invalid parameters
* @HOST_TWT_DEL_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
* this dialog
* @HOST_TWT_DEL_STATUS_NO_RESOURCE: FW resource exhausted
* @HOST_TWT_DEL_STATUS_NO_ACK: peer AP/STA did not ACK the request/response
* frame
* @HOST_TWT_DEL_STATUS_UNKNOWN_ERROR: deleting TWT dialog failed with an
* unknown reason
* @HOST_TWT_DEL_STATUS_PEER_INIT_TEARDOWN: Peer initiated TWT teardown
* @HOST_TWT_DEL_STATUS_ROAMING: TWT teardown due to roaming.
* @HOST_TWT_DEL_STATUS_CONCURRENCY: TWT session teardown due to
* concurrent session coming up.
* @HOST_TWT_DEL_STATUS_CHAN_SW_IN_PROGRESS: Channel switch in progress
* @HOST_TWT_DEL_STATUS_SCAN_IN_PROGRESS: Scan is in progress
* @HOST_TWT_DEL_STATUS_PS_DISABLE_TEARDOWN: PS disable TWT teardown
*/
enum HOST_TWT_DEL_STATUS {
HOST_TWT_DEL_STATUS_OK,
HOST_TWT_DEL_STATUS_DIALOG_ID_NOT_EXIST,
HOST_TWT_DEL_STATUS_INVALID_PARAM,
HOST_TWT_DEL_STATUS_DIALOG_ID_BUSY,
HOST_TWT_DEL_STATUS_NO_RESOURCE,
HOST_TWT_DEL_STATUS_NO_ACK,
HOST_TWT_DEL_STATUS_UNKNOWN_ERROR,
HOST_TWT_DEL_STATUS_PEER_INIT_TEARDOWN,
HOST_TWT_DEL_STATUS_ROAMING,
HOST_TWT_DEL_STATUS_CONCURRENCY,
HOST_TWT_DEL_STATUS_CHAN_SW_IN_PROGRESS,
HOST_TWT_DEL_STATUS_SCAN_IN_PROGRESS,
HOST_TWT_DEL_STATUS_PS_DISABLE_TEARDOWN,
};
/**
* struct twt_del_dialog_complete_event_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: TWT dialog ID
* @b_twt_persistence: persistence val for b-twt
* @status: refer to HOST_TWT_DEL_STATUS enum
*/
struct twt_del_dialog_complete_event_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
#ifdef WLAN_SUPPORT_BCAST_TWT
uint32_t b_twt_persistence;
#endif
uint32_t status;
};
/**
* struct twt_pause_dialog_cmd_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: TWT dialog ID
*/
struct twt_pause_dialog_cmd_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
};
/**
* struct twt_nudge_dialog_cmd_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: TWT dialog ID
* @suspend_duration: TWT suspend duration in microseconds
* @next_twt_size: next TWT size
*/
struct twt_nudge_dialog_cmd_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
uint32_t suspend_duration;
uint32_t next_twt_size;
};
/* enum HOST_TWT_PAUSE_STATUS - status code of pause TWT dialog
* @HOST_TWT_PAUSE_STATUS_OK: pausing TWT dialog successfully completed
* @HOST_TWT_PAUSE_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
* @HOST_TWT_PAUSE_STATUS_INVALID_PARAM: invalid parameters
* @HOST_TWT_PAUSE_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
* this dialog
* @HOST_TWT_PAUSE_STATUS_NO_RESOURCE: FW resource exhausted
* @HOST_TWT_PAUSE_STATUS_NO_ACK: peer AP/STA did not ACK the
* request/response frame
* @HOST_TWT_PAUSE_STATUS_UNKNOWN_ERROR: pausing TWT dialog failed with an
* unknown reason
* @HOST_TWT_PAUSE_STATUS_ALREADY_PAUSED: TWT dialog already in paused state
* @HOST_TWT_PAUSE_STATUS_CHAN_SW_IN_PROGRESS: Channel switch in progress
* @HOST_TWT_PAUSE_STATUS_ROAM_IN_PROGRESS: Roaming is in progress
* @HOST_TWT_PAUSE_STATUS_SCAN_IN_PROGRESS: Scan is in progress
*/
enum HOST_TWT_PAUSE_STATUS {
HOST_TWT_PAUSE_STATUS_OK,
HOST_TWT_PAUSE_STATUS_DIALOG_ID_NOT_EXIST,
HOST_TWT_PAUSE_STATUS_INVALID_PARAM,
HOST_TWT_PAUSE_STATUS_DIALOG_ID_BUSY,
HOST_TWT_PAUSE_STATUS_NO_RESOURCE,
HOST_TWT_PAUSE_STATUS_NO_ACK,
HOST_TWT_PAUSE_STATUS_UNKNOWN_ERROR,
HOST_TWT_PAUSE_STATUS_ALREADY_PAUSED,
HOST_TWT_PAUSE_STATUS_CHAN_SW_IN_PROGRESS,
HOST_TWT_PAUSE_STATUS_ROAM_IN_PROGRESS,
HOST_TWT_PAUSE_STATUS_SCAN_IN_PROGRESS,
};
/**
* struct twt_pause_dialog_complete_event_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: TWT dialog ID
* @status: refer to HOST_TWT_PAUSE_STATUS
*/
struct twt_pause_dialog_complete_event_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
enum HOST_TWT_PAUSE_STATUS status;
};
/* enum HOST_TWT_NUDGE_STATUS - status code of nudge TWT dialog
* @HOST_TWT_NUDGE_STATUS_OK: nudge TWT dialog successfully completed
* @HOST_TWT_NUDGE_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
* @HOST_TWT_NUDGE_STATUS_INVALID_PARAM: invalid parameters
* @HOST_TWT_NUDGE_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
* this dialog
* @HOST_TWT_NUDGE_STATUS_NO_RESOURCE: FW resource exhausted
* @HOST_TWT_NUDGE_STATUS_NO_ACK: peer AP/STA did not ACK the
* request/response frame
* @HOST_TWT_NUDGE_STATUS_UNKNOWN_ERROR: nudge TWT dialog failed with an
* unknown reason
* @HOST_TWT_NUDGE_STATUS_CHAN_SW_IN_PROGRESS: Channel switch in progress
* @HOST_TWT_NUDGE_STATUS_ROAM_IN_PROGRESS: Roaming in progress
* @HOST_TWT_NUDGE_STATUS_SCAN_IN_PROGRESS: Scan is in progress
*/
enum HOST_TWT_NUDGE_STATUS {
HOST_TWT_NUDGE_STATUS_OK,
HOST_TWT_NUDGE_STATUS_DIALOG_ID_NOT_EXIST,
HOST_TWT_NUDGE_STATUS_INVALID_PARAM,
HOST_TWT_NUDGE_STATUS_DIALOG_ID_BUSY,
HOST_TWT_NUDGE_STATUS_NO_RESOURCE,
HOST_TWT_NUDGE_STATUS_NO_ACK,
HOST_TWT_NUDGE_STATUS_UNKNOWN_ERROR,
HOST_TWT_NUDGE_STATUS_CHAN_SW_IN_PROGRESS,
HOST_TWT_NUDGE_STATUS_ROAM_IN_PROGRESS,
HOST_TWT_NUDGE_STATUS_SCAN_IN_PROGRESS,
};
/**
* struct twt_nudge_dialog_complete_event_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: TWT dialog ID
* @status: refer to HOST_TWT_PAUSE_STATUS
* @next_twt_tsf_us_lo: TSF lower bits (31:0) of next wake time
* @next_twt_tsf_us_hi: TSF higher bits (32:63) of next wake time
*/
struct twt_nudge_dialog_complete_event_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
enum HOST_TWT_NUDGE_STATUS status;
uint32_t next_twt_tsf_us_lo;
uint32_t next_twt_tsf_us_hi;
};
/**
* struct twt_resume_dialog_cmd_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: TWT dialog ID
* @sp_offset_us: this long time after TWT resumed the 1st SP will start
* @next_twt_size: Next TWT subfield Size.
* Refer IEEE 802.11ax section "9.4.1.60 TWT Information field"
*/
struct twt_resume_dialog_cmd_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
uint32_t sp_offset_us;
uint32_t next_twt_size;
};
/* enum HOST_TWT_RESUME_STATUS - status code of resume TWT dialog
* @HOST_TWT_RESUME_STATUS_OK: resuming TWT dialog successfully completed
* @HOST_TWT_RESUME_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
* @HOST_TWT_RESUME_STATUS_INVALID_PARAM: invalid parameters
* @HOST_TWT_RESUME_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
* this dialog
* @HOST_TWT_RESUME_STATUS_NOT_PAUSED: dialog not paused currently
* @HOST_TWT_RESUME_STATUS_NO_RESOURCE: FW resource exhausted
* @HOST_TWT_RESUME_STATUS_NO_ACK: peer AP/STA did not ACK the
* request/response frame
* @HOST_TWT_RESUME_STATUS_UNKNOWN_ERROR: resuming TWT dialog failed with an
* unknown reason
* @HOST_TWT_RESUME_STATUS_CHAN_SW_IN_PROGRESS: Channel switch in progress
* @HOST_TWT_RESUME_STATUS_ROAM_IN_PROGRESS: Roaming in progress
* @HOST_TWT_RESUME_STATUS_SCAN_IN_PROGRESS: Scan is in progress
*/
enum HOST_TWT_RESUME_STATUS {
HOST_TWT_RESUME_STATUS_OK,
HOST_TWT_RESUME_STATUS_DIALOG_ID_NOT_EXIST,
HOST_TWT_RESUME_STATUS_INVALID_PARAM,
HOST_TWT_RESUME_STATUS_DIALOG_ID_BUSY,
HOST_TWT_RESUME_STATUS_NOT_PAUSED,
HOST_TWT_RESUME_STATUS_NO_RESOURCE,
HOST_TWT_RESUME_STATUS_NO_ACK,
HOST_TWT_RESUME_STATUS_UNKNOWN_ERROR,
HOST_TWT_RESUME_STATUS_CHAN_SW_IN_PROGRESS,
HOST_TWT_RESUME_STATUS_ROAM_IN_PROGRESS,
HOST_TWT_RESUME_STATUS_SCAN_IN_PROGRESS,
};
/**
* struct twt_resume_dialog_complete_event_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: TWT dialog ID
* @status: refer to HOST_TWT_RESUME_STATUS
*/
struct twt_resume_dialog_complete_event_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
uint32_t status;
};
/**
* struct twt_notify_event_param -
* @vdev_id: VDEV identifier
*/
struct twt_notify_event_param {
uint32_t vdev_id;
};
#ifdef WLAN_SUPPORT_BCAST_TWT
/**
* struct twt_btwt_invite_sta_cmd_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: TWT dialog ID
*/
struct twt_btwt_invite_sta_cmd_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
};
/* enum HOST_TWT_INVITATION_BTWT_STATUS - status code of TWT Invitation
* dialog
* HOST_TWT_INVITATION_BTWT_STATUS_OK: BTWT invitation successfully
* completed
* HOST_TWT_INVITATION_TWT_STATUS_DIALOG_ID_NOT_EXIST: BTWT dialog ID not
* exists
* HOST_TWT_INVITATION_BTWT_STATUS_INVALID_PARAM: invalid parameters
* HOST_TWT_INVITATION_BTWT_STATUS_DIALOG_ID_BUSY: FW is in the process of
* handling this dialog
* HOST_TWT_INVITATION_BTWT_STATUS_NO_RESOURCE: FW resource exhausted
* HOST_TWT_INVITATION_BTWT_STATUS_NO_ACK: peer AP/STA did not ACK the
* request/response frame
* HOST_TWT_INVITATION_BTWT_STATUS_UNKNOWN_ERROR: BTWT invitation failed
* with an unknown reason
*/
enum HOST_TWT_INVITATION_BTWT_STATUS {
HOST_TWT_INVITATION_BTWT_STATUS_OK,
HOST_TWT_INVITATION_BTWT_STATUS_DIALOG_ID_NOT_EXIST,
HOST_TWT_INVITATION_BTWT_STATUS_INVALID_PARAM,
HOST_TWT_INVITATION_BTWT_STATUS_DIALOG_ID_BUSY,
HOST_TWT_INVITATION_BTWT_STATUS_NO_RESOURCE,
HOST_TWT_INVITATION_BTWT_STATUS_NO_ACK,
HOST_TWT_INVITATION_BTWT_STATUS_UNKNOWN_ERROR,
};
/**
* struct twt_btwt_invite_sta_complete_event_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: BTWT dialog ID
* @status: refer to HOST_TWT_INVITATION_BTWT_STATUS
*/
struct twt_btwt_invite_sta_complete_event_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
uint32_t status;
};
/**
* struct twt_btwt_remove_sta_cmd_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: BTWT dialog ID
*/
struct twt_btwt_remove_sta_cmd_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
};
/* enum HOST_TWT_KICKOFF_BTWT_STATUS - status code of kickoff BTWT dialog
* HOST_TWT_KICKOFF_BTWT_STATUS_OK: TWT kickoff successfully completed
* HOST_TWT_KICKOFF_BTWT_STATUS_DIALOG_ID_NOT_EXIST: BTWT dialog ID not
* exists
* HOST_TWT_KICKOFF_BTWT_STATUS_INVALID_PARAM: invalid parameters
* HOST_TWT_KICKOFF_BTWT_STATUS_DIALOG_ID_BUSY: FW is in the process of
* handling this dialog
* HOST_TWT_KICKOFF_BTWT_STATUS_NOT_PAUSED: Dialog not currently paused
* HOST_TWT_KICKOFF_BTWT_STATUS_NO_RESOURCE: FW resource exhausted
* HOST_TWT_KICKOFF_BTWT_STATUS_NO_ACK: peer AP/STA did not ACK the
* request/response frame
* HOST_TWT_KICKOFF_BTWT_STATUS_UNKNOWN_ERROR: BTWT kickoff failed with an
* unknown reason
*/
enum HOST_TWT_KICKOFF_BTWT_STATUS {
HOST_TWT_KICKOFF_BTWT_STATUS_OK,
HOST_TWT_KICKOFF_BTWT_STATUS_DIALOG_ID_NOT_EXIST,
HOST_TWT_KICKOFF_BTWT_STATUS_INVALID_PARAM,
HOST_TWT_KICKOFF_BTWT_STATUS_DIALOG_ID_BUSY,
HOST_TWT_KICKOFF_BTWT_STATUS_NOT_PAUSED,
HOST_TWT_KICKOFF_BTWT_STATUS_NO_RESOURCE,
HOST_TWT_KICKOFF_BTWT_STATUS_NO_ACK,
HOST_TWT_KICKOFF_BTWT_STATUS_UNKNOWN_ERROR,
};
/**
* struct twt_btwt_remove_sta_complete_event_param -
* @vdev_id: VDEV identifier
* @peer_macaddr: Peer mac address
* @dialog_id: BTWT dialog ID
* @status: refer to HOST_TWT_KICKOFF_BTWT_STATUS
*/
struct twt_btwt_remove_sta_complete_event_param {
uint32_t vdev_id;
struct qdf_mac_addr peer_macaddr;
uint32_t dialog_id;
uint32_t status;
};
#endif
/**
* enum HOST_TWT_CMD_FOR_ACK_EVENT - Ack event for different TWT command
* HOST_TWT_ADD_DIALOG_CMDID: Ack event for add dialog command
* HOST_TWT_DEL_DIALOG_CMDID: Ack event for delete dialog command
* HOST_TWT_PAUSE_DIALOG_CMDID: Ack event for pause command
* HOST_TWT_RESUME_DIALOG_CMDID: Ack event for resume command
* HOST_TWT_NUDGE_DIALOG_CMDID: Ack event for nudge command
* HOST_TWT_UNKNOWN_CMDID: Ack event for unknown TWT command
*/
enum HOST_TWT_CMD_FOR_ACK_EVENT {
HOST_TWT_ADD_DIALOG_CMDID = 0,
HOST_TWT_DEL_DIALOG_CMDID,
HOST_TWT_PAUSE_DIALOG_CMDID,
HOST_TWT_RESUME_DIALOG_CMDID,
HOST_TWT_NUDGE_DIALOG_CMDID,
HOST_TWT_UNKNOWN_CMDID,
};
#endif /* _WLAN_TWT_PUBLIC_STRUCTS_H_ */

Переглянути файл

@@ -0,0 +1,41 @@
/*
* 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_ops.h
*/
#ifndef _WLAN_TWT_TGT_IF_EXT_RX_OPS_H_
#define _WLAN_TWT_TGT_IF_EXT_RX_OPS_H_
#include <wlan_lmac_if_def.h>
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
/**
* tgt_twt_register_ext_rx_ops() - API to register rx ops with lmac
* @rx_ops: rx ops struct
*
* Return: none
*/
void tgt_twt_register_ext_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops);
#else
static inline
void tgt_twt_register_ext_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
{
}
#endif
#endif

36
umac/twt/dispatcher/inc/wlan_twt_tgt_if_rx_api.h Звичайний файл
Переглянути файл

@@ -0,0 +1,36 @@
/*
* 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_rx_api.h
*
* API declarations to handle WMI response event corresponding to twt component
*/
#ifndef _WLAN_TWT_TGT_IF_RX_API_H_
#define _WLAN_TWT_TGT_IF_RX_API_H_
#include <wlan_lmac_if_def.h>
/**
* tgt_twt_register_rx_ops() - API to register rx ops with lmac
* @rx_ops: rx ops struct
*
* Return: none
*/
void tgt_twt_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops);
#endif

47
umac/twt/dispatcher/inc/wlan_twt_tgt_if_tx_api.h Звичайний файл
Переглянути файл

@@ -0,0 +1,47 @@
/*
* 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_tx_api.h
*
* API declarations to send WMI command using Tx Ops
*/
#ifndef _WLAN_TWT_TGT_IF_TX_API_H_
#define _WLAN_TWT_TGT_IF_TX_API_H_
/**
* tgt_twt_enable_req_send() - API to send TWT enable request command
* @psoc: pointer to global psoc object
* @req: pointer to twt_enable_param
*
* Return: QDF_STATUS - Success or Failure
*/
QDF_STATUS
tgt_twt_enable_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_enable_param *req);
/**
* tgt_twt_disable_req_send() - API to send TWT disable request command
* @psoc: pointer to global psoc object
* @req: pointer to twt_disable_param
*
* Return: QDF_STATUS - Success or Failure
*/
QDF_STATUS
tgt_twt_disable_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_disable_param *req);
#endif

297
umac/twt/dispatcher/inc/wlan_twt_ucfg_api.h Звичайний файл
Переглянути файл

@@ -0,0 +1,297 @@
/*
* 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_ucfg_api.h
* This file provides TWT ucfg apis.
*/
#ifndef _WLAN_TWT_UCFG_API_H_
#define _WLAN_TWT_UCFG_API_H_
#include <wlan_objmgr_psoc_obj.h>
#include <wlan_twt_public_structs.h>
/**
* ucfg_twt_get_requestor() - twt get requestor
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* ucfg_twt_get_responder() - twt get responder
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_get_responder(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* ucfg_twt_get_legacy_bcast_twt_support() - get legacy bcast support
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_get_legacy_bcast_twt_support(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* ucfg_twt_get_twt_bcast_req_support() - get bcast requestor support
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_get_twt_bcast_req_support(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* ucfg_twt_get_twt_bcast_res_support() - get bcast responder support
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_get_twt_bcast_res_support(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* ucfg_twt_get_twt_nudge_enabled() - get twt nudge enabled
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_get_twt_nudge_enabled(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* ucfg_twt_get_all_twt_enabled() - get all twt enabled
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_get_all_twt_enabled(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* ucfg_twt_get_twt_stats_enabled() - get twt stats enabled
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_get_twt_stats_enabled(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* ucfg_twt_get_twt_ack_supported() - get twt ack supported
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_get_twt_ack_supported(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* ucfg_twt_requestor_disable() - twt requestor disable
* @psoc: psoc handle
* @req: twt disable request structure
* @context: context
*
* Following fields in request structure @twt_enable_param shall be
* filled by the user space/upper layer. if any field is not applicable
* then set it to 0.
* pdev_id;
* mbss_support;
* default_slot_size;
* congestion_thresh_setup;
* congestion_thresh_teardown;
* congestion_thresh_critical;
* interference_thresh_teardown;
* interference_thresh_setup;
* min_no_sta_setup;
* min_no_sta_teardown;
* no_of_bcast_mcast_slots;
* min_no_twt_slots;
* max_no_sta_twt;
* mode_check_interval;
* add_sta_slot_interval;
* remove_sta_slot_interval;
* ext_conf_present;
* b_twt_legacy_mbss_enable:1,
* b_twt_ax_mbss_enable:1;
*
* Following fields in request structure @twt_enable_param shall be
* filled by the UMAC TWT Component itself
* sta_cong_timer_ms;
* twt_role;
* twt_oper;
* b_twt_enable;
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_requestor_disable(struct wlan_objmgr_psoc *psoc,
struct twt_disable_param *req,
void *context);
/**
* ucfg_twt_responder_disable() - twt responder disable
* @psoc: psoc handle
* @req: twt disable request structure
* @context: context
*
* Following fields in request structure @twt_enable_param shall be
* filled by the user space/upper layer. if any field is not applicable
* then set it to 0.
* pdev_id;
* mbss_support;
* default_slot_size;
* congestion_thresh_setup;
* congestion_thresh_teardown;
* congestion_thresh_critical;
* interference_thresh_teardown;
* interference_thresh_setup;
* min_no_sta_setup;
* min_no_sta_teardown;
* no_of_bcast_mcast_slots;
* min_no_twt_slots;
* max_no_sta_twt;
* mode_check_interval;
* add_sta_slot_interval;
* remove_sta_slot_interval;
* ext_conf_present;
* b_twt_legacy_mbss_enable:1,
* b_twt_ax_mbss_enable:1;
*
* Following fields in request structure @twt_enable_param shall be
* filled by the UMAC TWT Component itself
* sta_cong_timer_ms;
* twt_role;
* twt_oper;
* b_twt_enable;
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_responder_disable(struct wlan_objmgr_psoc *psoc,
struct twt_disable_param *req,
void *context);
/**
* ucfg_twt_requestor_enable() - twt requestor enable
* @psoc: psoc handle
* @req: twt enable request structure
* @context: context
*
* Following fields in request structure @twt_enable_param shall be
* filled by the user space/upper layer. if any field is not applicable
* then set it to 0.
* pdev_id;
* mbss_support;
* default_slot_size;
* congestion_thresh_setup;
* congestion_thresh_teardown;
* congestion_thresh_critical;
* interference_thresh_teardown;
* interference_thresh_setup;
* min_no_sta_setup;
* min_no_sta_teardown;
* no_of_bcast_mcast_slots;
* min_no_twt_slots;
* max_no_sta_twt;
* mode_check_interval;
* add_sta_slot_interval;
* remove_sta_slot_interval;
* ext_conf_present;
* b_twt_legacy_mbss_enable:1,
* b_twt_ax_mbss_enable:1;
*
* Following fields in request structure @twt_enable_param shall be
* filled by the UMAC TWT Component itself
* sta_cong_timer_ms;
* twt_role;
* twt_oper;
* b_twt_enable;
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
struct twt_enable_param *req,
void *context);
/**
* ucfg_twt_responder_enable() - twt responder enable
* @psoc: psoc handle
* @req: twt enable request structure
* @context: context
*
* Following fields in request structure @twt_enable_param shall be
* filled by the user space/upper layer. if any field is not applicable
* then set it to 0.
* pdev_id;
* mbss_support;
* default_slot_size;
* congestion_thresh_setup;
* congestion_thresh_teardown;
* congestion_thresh_critical;
* interference_thresh_teardown;
* interference_thresh_setup;
* min_no_sta_setup;
* min_no_sta_teardown;
* no_of_bcast_mcast_slots;
* min_no_twt_slots;
* max_no_sta_twt;
* mode_check_interval;
* add_sta_slot_interval;
* remove_sta_slot_interval;
* ext_conf_present;
* b_twt_legacy_mbss_enable:1,
* b_twt_ax_mbss_enable:1;
*
* Following fields in request structure @twt_enable_param shall be
* filled by the UMAC TWT Component itself
* sta_cong_timer_ms;
* twt_role;
* twt_oper;
* b_twt_enable;
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_twt_responder_enable(struct wlan_objmgr_psoc *psoc,
struct twt_enable_param *req,
void *context);
#endif /* _WLAN_TWT_UCFG_API_H_ */

149
umac/twt/dispatcher/inc/wlan_twt_ucfg_ext_cfg.h Звичайний файл
Переглянути файл

@@ -0,0 +1,149 @@
/*
* 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_ucfg_ext_cfg.h
* This file provides TWT ucfg cfg param related apis.
*/
#ifndef _WLAN_TWT_UCFG_EXT_CFG_H_
#define _WLAN_TWT_UCFG_EXT_CFG_H_
#include <wlan_objmgr_psoc_obj.h>
#include <wlan_twt_public_structs.h>
/**
* ucfg_twt_cfg_get_requestor() - get TWT requestor
* @psoc: Pointer to global PSOC object
* @val: pointer to output variable
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS ucfg_twt_cfg_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* ucfg_twt_cfg_get_responder() - get TWT responder
* @psoc: Pointer to global PSOC object
* @val: pointer to output variable
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS ucfg_twt_cfg_get_responder(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* ucfg_twt_cfg_get_congestion_timeout() - Get TWT congestion timeout
* @psoc: Pointer to global psoc object
* @val: pointer to output variable
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS
ucfg_twt_cfg_get_congestion_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t *val);
/**
* ucfg_twt_cfg_set_congestion_timeout() - Set TWT congestion timeout
* @psoc: Pointer to global psoc object
* @val: congestion timeout
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS
ucfg_twt_cfg_set_congestion_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t val);
/**
* ucfg_twt_cfg_get_24ghz_enabled() - Get TWT 24ghz enabled
* @psoc: Pointer to global psoc object
* @val: pointer to output variable
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS
ucfg_twt_cfg_get_24ghz_enabled(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* ucfg_twt_cfg_get_bcast_requestor() - Get TWT broadcast requestor
* @psoc: Pointer to global psoc object
* @val: pointer to output variable
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS
ucfg_twt_cfg_get_bcast_requestor(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* ucfg_twt_cfg_get_flex_sched() - Get TWT flex scheduling
* @psoc: Pointer to global psoc object
* @val: pointer to output variable
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS
ucfg_twt_cfg_get_flex_sched(struct wlan_objmgr_psoc *psoc, bool *val);
#else
static inline
QDF_STATUS ucfg_twt_cfg_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
{
*val = false;
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_twt_cfg_get_responder(struct wlan_objmgr_psoc *psoc, bool *val)
{
*val = false;
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_twt_cfg_get_congestion_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t *val)
{
*val = 0;
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS ucfg_twt_cfg_set_congestion_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t val)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
ucfg_twt_cfg_get_24ghz_enabled(struct wlan_objmgr_psoc *psoc, bool *val)
{
*val = false;
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
ucfg_twt_cfg_get_bcast_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
{
*val = false;
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
ucfg_twt_cfg_get_flex_sched(struct wlan_objmgr_psoc *psoc, bool *val)
{
*val = false;
return QDF_STATUS_SUCCESS;
}
#endif /* _WLAN_TWT_UCFG_EXT_CFG_H_ */

97
umac/twt/dispatcher/src/wlan_twt_api.c Звичайний файл
Переглянути файл

@@ -0,0 +1,97 @@
/*
* 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_api.c
* This file defines the APIs of TWT component.
*/
#include <wlan_twt_api.h>
#include "twt/core/src/wlan_twt_objmgr_handler.h"
struct wlan_lmac_if_twt_tx_ops *
wlan_twt_get_tx_ops(struct wlan_objmgr_psoc *psoc)
{
struct wlan_lmac_if_tx_ops *tx_ops;
if (!psoc) {
twt_err("psoc is null");
return NULL;
}
tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
if (!tx_ops) {
twt_err("tx_ops is NULL");
return NULL;
}
return &tx_ops->twt_tx_ops;
}
struct wlan_lmac_if_twt_rx_ops *
wlan_twt_get_rx_ops(struct wlan_objmgr_psoc *psoc)
{
struct wlan_lmac_if_rx_ops *rx_ops;
if (!psoc) {
twt_err("psoc is null");
return NULL;
}
rx_ops = wlan_psoc_get_lmac_if_rxops(psoc);
if (!rx_ops) {
twt_err("rx_ops is NULL");
return NULL;
}
return &rx_ops->twt_rx_ops;
}
struct twt_psoc_priv_obj*
wlan_twt_psoc_get_comp_private_obj(struct wlan_objmgr_psoc *psoc)
{
struct twt_psoc_priv_obj *twt_psoc;
twt_psoc = wlan_objmgr_psoc_get_comp_private_obj(psoc,
WLAN_UMAC_COMP_TWT);
if (!twt_psoc) {
twt_err("TWT PSOC component object is NULL");
return NULL;
}
return twt_psoc;
}
QDF_STATUS wlan_twt_init(void)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_twt_deinit(void)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS twt_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS twt_psoc_disable(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_SUCCESS;
}

53
umac/twt/dispatcher/src/wlan_twt_tgt_if_rx_api.c Звичайний файл
Переглянути файл

@@ -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: wlan_twt_tgt_if_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_rx_api.h>
#include <wlan_twt_tgt_if_ext_rx_ops.h>
#include "twt/core/src/wlan_twt_common.h"
static QDF_STATUS
tgt_twt_enable_complete_resp_handler(struct wlan_objmgr_psoc *psoc,
struct twt_enable_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS
tgt_twt_disable_complete_resp_handler(struct wlan_objmgr_psoc *psoc,
struct twt_disable_complete_event_param *event)
{
return QDF_STATUS_SUCCESS;
}
void tgt_twt_register_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_enable_comp_cb = tgt_twt_enable_complete_resp_handler;
twt_rx_ops->twt_disable_comp_cb = tgt_twt_disable_complete_resp_handler;
tgt_twt_register_ext_rx_ops(rx_ops);
}

41
umac/twt/dispatcher/src/wlan_twt_tgt_if_tx_api.c Звичайний файл
Переглянути файл

@@ -0,0 +1,41 @@
/*
* 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_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_tgt_if_tx_api.h>
QDF_STATUS
tgt_twt_enable_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_enable_param *req)
{
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
tgt_twt_disable_req_send(struct wlan_objmgr_psoc *psoc,
struct twt_disable_param *req)
{
return QDF_STATUS_SUCCESS;
}

103
umac/twt/dispatcher/src/wlan_twt_ucfg_api.c Звичайний файл
Переглянути файл

@@ -0,0 +1,103 @@
/*
* 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_ucfg_api.c
* This file contains twt ucfg APIs
*/
#include <wlan_twt_ucfg_api.h>
#include "twt/core/src/wlan_twt_common.h"
QDF_STATUS ucfg_twt_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_get_requestor(psoc, val);
}
QDF_STATUS ucfg_twt_get_responder(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_get_responder(psoc, val);
}
QDF_STATUS ucfg_twt_get_legacy_bcast_twt_support(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return wlan_twt_get_legacy_bcast_twt_support(psoc, val);
}
QDF_STATUS ucfg_twt_get_twt_bcast_req_support(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return wlan_twt_get_twt_bcast_req_support(psoc, val);
}
QDF_STATUS ucfg_twt_get_twt_bcast_res_support(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return wlan_twt_get_twt_bcast_res_support(psoc, val);
}
QDF_STATUS ucfg_twt_get_twt_nudge_enabled(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return wlan_twt_get_twt_nudge_enabled(psoc, val);
}
QDF_STATUS ucfg_twt_get_all_twt_enabled(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return wlan_twt_get_all_twt_enabled(psoc, val);
}
QDF_STATUS ucfg_twt_get_twt_stats_enabled(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return wlan_twt_get_twt_stats_enabled(psoc, val);
}
QDF_STATUS ucfg_twt_get_twt_ack_supported(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return wlan_twt_get_twt_ack_supported(psoc, val);
}
QDF_STATUS ucfg_twt_requestor_disable(struct wlan_objmgr_psoc *psoc,
struct twt_disable_param *req,
void *context)
{
return wlan_twt_requestor_disable(psoc, req, context);
}
QDF_STATUS ucfg_twt_responder_disable(struct wlan_objmgr_psoc *psoc,
struct twt_disable_param *req,
void *context)
{
return wlan_twt_responder_disable(psoc, req, context);
}
QDF_STATUS ucfg_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
struct twt_enable_param *req,
void *context)
{
return wlan_twt_requestor_enable(psoc, req, context);
}
QDF_STATUS ucfg_twt_responder_enable(struct wlan_objmgr_psoc *psoc,
struct twt_enable_param *req,
void *context)
{
return wlan_twt_responder_enable(psoc, req, context);
}