qcacld-3.0: Add function to handle the FTM time sync events from target
Add the function to parse the FTM timesync start/stop and offset events received from target and populate them in ftm timsync priv vdev structure. Change-Id: Ibdcf97bb0a04fc6490c6bd2c26701036df92c5d4 CRs-Fixed: 2618646
Цей коміт міститься в:
@@ -46,4 +46,14 @@ void target_if_ftm_time_sync_register_rx_ops(struct wlan_ftm_timesync_rx_ops
|
||||
*/
|
||||
void target_if_ftm_time_sync_register_tx_ops(struct wlan_ftm_timesync_tx_ops
|
||||
*tx_ops);
|
||||
|
||||
/**
|
||||
* target_if_ftm_time_sync_unregister_ev_handlers() - Unregister wmi events
|
||||
* handlers
|
||||
* @psoc: psoc context
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
target_if_ftm_time_sync_unregister_ev_handlers(struct wlan_objmgr_psoc *psoc);
|
||||
#endif /*_TARGET_IF_FTM_TIME_SYNC_H_ */
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include "target_if.h"
|
||||
#include "target_if_ftm_time_sync.h"
|
||||
#include "wlan_ftm_time_sync_public_struct.h"
|
||||
#include "wlan_ftm_time_sync_tgt_api.h"
|
||||
#include <wmi_unified_api.h>
|
||||
|
||||
static QDF_STATUS
|
||||
@@ -84,6 +85,8 @@ target_if_time_sync_ftm_start_stop_event_handler(ol_scn_t scn_handle,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tgt_ftm_ts_start_stop_evt(psoc, ¶m);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -99,9 +102,10 @@ target_if_ftm_time_sync_start_stop_event(struct wlan_objmgr_psoc *psoc)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
status = wmi_unified_register_event(
|
||||
status = wmi_unified_register_event_handler(
|
||||
wmi_handle, wmi_wlan_time_sync_ftm_start_stop_event_id,
|
||||
target_if_time_sync_ftm_start_stop_event_handler);
|
||||
target_if_time_sync_ftm_start_stop_event_handler,
|
||||
WMI_RX_SERIALIZER_CTX);
|
||||
if (status) {
|
||||
target_if_err("Ftm timesync start stop event register failed");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -142,6 +146,8 @@ target_if_time_sync_master_slave_offset_event_handler(ol_scn_t scn_handle,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tgt_ftm_ts_offset_evt(psoc, ¶m);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -157,10 +163,11 @@ target_if_ftm_time_sync_master_slave_offset(struct wlan_objmgr_psoc *psoc)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
status = wmi_unified_register_event(
|
||||
status = wmi_unified_register_event_handler(
|
||||
wmi_handle,
|
||||
wmi_wlan_time_sync_q_master_slave_offset_eventid,
|
||||
target_if_time_sync_master_slave_offset_event_handler);
|
||||
target_if_time_sync_master_slave_offset_event_handler,
|
||||
WMI_RX_SERIALIZER_CTX);
|
||||
if (status) {
|
||||
target_if_err("Ftm timesync offset event register failed");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -169,6 +176,40 @@ target_if_ftm_time_sync_master_slave_offset(struct wlan_objmgr_psoc *psoc)
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
target_if_ftm_time_sync_unregister_ev_handlers(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
wmi_unified_t wmi_handle;
|
||||
int ret, status = 0;
|
||||
|
||||
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||
if (!wmi_handle) {
|
||||
target_if_err("Invalid wmi handle");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
ret = wmi_unified_unregister_event(
|
||||
wmi_handle,
|
||||
wmi_wlan_time_sync_ftm_start_stop_event_id);
|
||||
if (ret) {
|
||||
target_if_err("failed to unregister time sync start/stop evt");
|
||||
status = ret;
|
||||
}
|
||||
|
||||
ret = wmi_unified_unregister_event(
|
||||
wmi_handle,
|
||||
wmi_wlan_time_sync_q_master_slave_offset_eventid);
|
||||
if (ret) {
|
||||
target_if_err("failed to unregister time sync offset evt");
|
||||
status = ret;
|
||||
}
|
||||
|
||||
if (status)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
else
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
target_if_ftm_time_sync_register_rx_ops(struct wlan_ftm_timesync_rx_ops *rx_ops)
|
||||
{
|
||||
|
Посилання в новій задачі
Заблокувати користувача