|
@@ -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(
|