qcacmn: Handle wmi event wmi_vdev_quiet_offload_eventid
Extract information from wmi event wmi_vdev_quiet_offload_eventid and send it to mlme Change-Id: I49ef7f2811c5975a95e8e33050977c49e2b104e4 CRs-Fixed: 3101974
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f048242a78
commit
ab4cfe87b0
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2019-2020 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
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -912,6 +912,87 @@ target_if_unregister_set_mac_addr_evt_cbk(struct wmi_unified *wmi_handle)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11BE_MLO
|
||||||
|
/**
|
||||||
|
* target_if_quiet_offload_event_handler() - Quiet IE offload mlo
|
||||||
|
* station event handler
|
||||||
|
* @scn: Pointer to scn structure
|
||||||
|
* @event_buff: event data
|
||||||
|
* @len: length
|
||||||
|
*
|
||||||
|
* Return: 0 for success or error code
|
||||||
|
*/
|
||||||
|
static int target_if_quiet_offload_event_handler(ol_scn_t scn,
|
||||||
|
uint8_t *event_buff,
|
||||||
|
uint32_t len)
|
||||||
|
{
|
||||||
|
struct wlan_objmgr_psoc *psoc;
|
||||||
|
struct wmi_unified *wmi_handle;
|
||||||
|
QDF_STATUS status;
|
||||||
|
struct wlan_lmac_if_mlme_rx_ops *rx_ops;
|
||||||
|
struct vdev_sta_quiet_event sta_quiet_event = {0};
|
||||||
|
|
||||||
|
if (!event_buff) {
|
||||||
|
mlme_err("Received NULL event ptr from FW");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
psoc = target_if_get_psoc_from_scn_hdl(scn);
|
||||||
|
if (!psoc) {
|
||||||
|
mlme_err("PSOC is NULL");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||||
|
if (!wmi_handle) {
|
||||||
|
mlme_err("wmi_handle is null");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = wmi_extract_quiet_offload_event(wmi_handle, event_buff,
|
||||||
|
&sta_quiet_event);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
mlme_err("Failed to extract quiet IE offload event");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
rx_ops = target_if_vdev_mgr_get_rx_ops(psoc);
|
||||||
|
if (!rx_ops || !rx_ops->vdev_mgr_quiet_offload) {
|
||||||
|
mlme_err("No Rx Ops");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
rx_ops->vdev_mgr_quiet_offload(psoc, &sta_quiet_event);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
target_if_register_quiet_offload_event(struct wmi_unified *wmi_handle)
|
||||||
|
{
|
||||||
|
wmi_unified_register_event_handler(
|
||||||
|
wmi_handle, wmi_vdev_quiet_offload_eventid,
|
||||||
|
target_if_quiet_offload_event_handler, VDEV_RSP_RX_CTX);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
target_if_unregister_quiet_offload_event(struct wmi_unified *wmi_handle)
|
||||||
|
{
|
||||||
|
wmi_unified_unregister_event_handler(
|
||||||
|
wmi_handle, wmi_vdev_quiet_offload_eventid);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void
|
||||||
|
target_if_register_quiet_offload_event(struct wmi_unified *wmi_handle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
target_if_unregister_quiet_offload_event(struct wmi_unified *wmi_handle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS target_if_vdev_mgr_wmi_event_register(
|
QDF_STATUS target_if_vdev_mgr_wmi_event_register(
|
||||||
struct wlan_objmgr_psoc *psoc)
|
struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
@@ -981,6 +1062,8 @@ QDF_STATUS target_if_vdev_mgr_wmi_event_register(
|
|||||||
|
|
||||||
target_if_register_set_mac_addr_evt_cbk(wmi_handle);
|
target_if_register_set_mac_addr_evt_cbk(wmi_handle);
|
||||||
|
|
||||||
|
target_if_register_quiet_offload_event(wmi_handle);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1000,6 +1083,8 @@ QDF_STATUS target_if_vdev_mgr_wmi_event_unregister(
|
|||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
target_if_unregister_quiet_offload_event(wmi_handle);
|
||||||
|
|
||||||
target_if_unregister_set_mac_addr_evt_cbk(wmi_handle);
|
target_if_unregister_set_mac_addr_evt_cbk(wmi_handle);
|
||||||
|
|
||||||
wmi_unified_unregister_event_handler(
|
wmi_unified_unregister_event_handler(
|
||||||
|
@@ -4646,4 +4646,18 @@ QDF_STATUS wmi_extract_update_mac_address_event(wmi_unified_t wmi_handle,
|
|||||||
void *evt_buf, uint8_t *vdev_id,
|
void *evt_buf, uint8_t *vdev_id,
|
||||||
uint8_t *status);
|
uint8_t *status);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11BE_MLO
|
||||||
|
/**
|
||||||
|
* wmi_extract_quiet_offload_event() - Extra mlo sta quiet IE offload event
|
||||||
|
* @wmi_handle: WMI handle
|
||||||
|
* @evt_buf: event buffer
|
||||||
|
* @quiet_event: pointer to struct vdev_sta_quiet_event
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_extract_quiet_offload_event(
|
||||||
|
struct wmi_unified *wmi_handle, void *evt_buf,
|
||||||
|
struct vdev_sta_quiet_event *quiet_event);
|
||||||
|
#endif
|
||||||
#endif /* _WMI_UNIFIED_API_H_ */
|
#endif /* _WMI_UNIFIED_API_H_ */
|
||||||
|
@@ -4869,6 +4869,9 @@ typedef enum {
|
|||||||
wmi_roam_frame_event_id,
|
wmi_roam_frame_event_id,
|
||||||
#ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
|
#ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
|
||||||
wmi_vdev_update_mac_addr_conf_eventid,
|
wmi_vdev_update_mac_addr_conf_eventid,
|
||||||
|
#endif
|
||||||
|
#ifdef WLAN_FEATURE_11BE_MLO
|
||||||
|
wmi_vdev_quiet_offload_eventid,
|
||||||
#endif
|
#endif
|
||||||
wmi_events_max,
|
wmi_events_max,
|
||||||
} wmi_conv_event_id;
|
} wmi_conv_event_id;
|
||||||
|
@@ -2926,6 +2926,12 @@ QDF_STATUS
|
|||||||
(*send_set_nss_probe_intvl_cmd)(wmi_unified_t wmi_handle, uint8_t pdev_id,
|
(*send_set_nss_probe_intvl_cmd)(wmi_unified_t wmi_handle, uint8_t pdev_id,
|
||||||
struct wmi_rc_params *param);
|
struct wmi_rc_params *param);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11BE_MLO
|
||||||
|
QDF_STATUS (*extract_quiet_offload_event)(
|
||||||
|
wmi_unified_t wmi_handle, void *evt_buf,
|
||||||
|
struct vdev_sta_quiet_event *quiet_event);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Forward declartion for psoc*/
|
/* Forward declartion for psoc*/
|
||||||
|
@@ -3719,3 +3719,16 @@ QDF_STATUS wmi_extract_update_mac_address_event(wmi_unified_t wmi_handle,
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11BE_MLO
|
||||||
|
QDF_STATUS wmi_extract_quiet_offload_event(
|
||||||
|
struct wmi_unified *wmi_handle, void *evt_buf,
|
||||||
|
struct vdev_sta_quiet_event *quiet_event)
|
||||||
|
{
|
||||||
|
if (wmi_handle->ops->extract_quiet_offload_event)
|
||||||
|
return wmi_handle->ops->extract_quiet_offload_event(
|
||||||
|
wmi_handle, evt_buf, quiet_event);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@@ -17046,6 +17046,53 @@ static QDF_STATUS extract_update_mac_address_event_tlv(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11BE_MLO
|
||||||
|
/**
|
||||||
|
* extract_quiet_offload_event_tlv() - extract quiet offload event
|
||||||
|
* @wmi_handle: WMI handle
|
||||||
|
* @evt_buf: event buffer
|
||||||
|
* @mld_mac: mld mac address
|
||||||
|
* @link_mac: link mac address
|
||||||
|
* @link_id: link id
|
||||||
|
* @quiet_status: quiet is started or stopped
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
static QDF_STATUS extract_quiet_offload_event_tlv(
|
||||||
|
wmi_unified_t wmi_handle, void *evt_buf,
|
||||||
|
struct vdev_sta_quiet_event *quiet_event)
|
||||||
|
{
|
||||||
|
WMI_QUIET_HANDLING_EVENTID_param_tlvs *param_buf;
|
||||||
|
wmi_quiet_event_fixed_param *event;
|
||||||
|
|
||||||
|
param_buf = (WMI_QUIET_HANDLING_EVENTID_param_tlvs *)evt_buf;
|
||||||
|
|
||||||
|
event = param_buf->fixed_param;
|
||||||
|
|
||||||
|
if (!(event->mld_mac_address_present && event->linkid_present) &&
|
||||||
|
!event->link_mac_address_present) {
|
||||||
|
wmi_err("Invalid sta quiet offload event. present bit: mld mac %d link mac %d linkid %d",
|
||||||
|
event->mld_mac_address_present,
|
||||||
|
event->linkid_present,
|
||||||
|
event->link_mac_address_present);
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event->mld_mac_address_present)
|
||||||
|
WMI_MAC_ADDR_TO_CHAR_ARRAY(&event->mld_mac_address,
|
||||||
|
quiet_event->mld_mac.bytes);
|
||||||
|
if (event->link_mac_address_present)
|
||||||
|
WMI_MAC_ADDR_TO_CHAR_ARRAY(&event->link_mac_address,
|
||||||
|
quiet_event->link_mac.bytes);
|
||||||
|
if (event->linkid_present)
|
||||||
|
quiet_event->link_id = event->linkid;
|
||||||
|
quiet_event->quiet_status = (event->quiet_status ==
|
||||||
|
WMI_QUIET_EVENT_START);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
struct wmi_ops tlv_ops = {
|
struct wmi_ops tlv_ops = {
|
||||||
.send_vdev_create_cmd = send_vdev_create_cmd_tlv,
|
.send_vdev_create_cmd = send_vdev_create_cmd_tlv,
|
||||||
.send_vdev_delete_cmd = send_vdev_delete_cmd_tlv,
|
.send_vdev_delete_cmd = send_vdev_delete_cmd_tlv,
|
||||||
@@ -17468,6 +17515,11 @@ struct wmi_ops tlv_ops = {
|
|||||||
.extract_update_mac_address_event =
|
.extract_update_mac_address_event =
|
||||||
extract_update_mac_address_event_tlv,
|
extract_update_mac_address_event_tlv,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11BE_MLO
|
||||||
|
.extract_quiet_offload_event =
|
||||||
|
extract_quiet_offload_event_tlv,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17910,6 +17962,10 @@ event_ids[wmi_roam_scan_chan_list_id] =
|
|||||||
event_ids[wmi_vdev_update_mac_addr_conf_eventid] =
|
event_ids[wmi_vdev_update_mac_addr_conf_eventid] =
|
||||||
WMI_VDEV_UPDATE_MAC_ADDR_CONF_EVENTID;
|
WMI_VDEV_UPDATE_MAC_ADDR_CONF_EVENTID;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WLAN_FEATURE_11BE_MLO
|
||||||
|
event_ids[wmi_vdev_quiet_offload_eventid] =
|
||||||
|
WMI_QUIET_HANDLING_EVENTID;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
|
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
|
||||||
|
Reference in New Issue
Block a user