|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
|
|
+ * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
|
|
*
|
|
|
*
|
|
|
* Permission to use, copy, modify, and/or distribute this software for
|
|
@@ -23,67 +23,78 @@
|
|
|
#include <wlan_spectral_tgt_api.h>
|
|
|
#include <linux/export.h>
|
|
|
|
|
|
-QDF_STATUS wlan_spectral_init(void)
|
|
|
+QDF_STATUS
|
|
|
+wlan_spectral_init(void)
|
|
|
{
|
|
|
if (wlan_objmgr_register_psoc_create_handler(
|
|
|
WLAN_UMAC_COMP_SPECTRAL,
|
|
|
wlan_spectral_psoc_obj_create_handler,
|
|
|
- NULL) != QDF_STATUS_SUCCESS) {
|
|
|
+ NULL) !=
|
|
|
+ QDF_STATUS_SUCCESS) {
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
if (wlan_objmgr_register_psoc_destroy_handler(
|
|
|
WLAN_UMAC_COMP_SPECTRAL,
|
|
|
wlan_spectral_psoc_obj_destroy_handler,
|
|
|
- NULL) != QDF_STATUS_SUCCESS) {
|
|
|
+ NULL) !=
|
|
|
+ QDF_STATUS_SUCCESS) {
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
if (wlan_objmgr_register_pdev_create_handler(
|
|
|
WLAN_UMAC_COMP_SPECTRAL,
|
|
|
wlan_spectral_pdev_obj_create_handler,
|
|
|
- NULL) != QDF_STATUS_SUCCESS) {
|
|
|
+ NULL) !=
|
|
|
+ QDF_STATUS_SUCCESS) {
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
if (wlan_objmgr_register_pdev_destroy_handler(
|
|
|
WLAN_UMAC_COMP_SPECTRAL,
|
|
|
wlan_spectral_pdev_obj_destroy_handler,
|
|
|
- NULL) != QDF_STATUS_SUCCESS) {
|
|
|
+ NULL) !=
|
|
|
+ QDF_STATUS_SUCCESS) {
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-QDF_STATUS wlan_spectral_deinit(void)
|
|
|
+QDF_STATUS
|
|
|
+wlan_spectral_deinit(void)
|
|
|
{
|
|
|
if (wlan_objmgr_unregister_psoc_create_handler(
|
|
|
WLAN_UMAC_COMP_SPECTRAL,
|
|
|
wlan_spectral_psoc_obj_create_handler,
|
|
|
- NULL) != QDF_STATUS_SUCCESS) {
|
|
|
+ NULL) !=
|
|
|
+ QDF_STATUS_SUCCESS) {
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
if (wlan_objmgr_unregister_psoc_destroy_handler(
|
|
|
WLAN_UMAC_COMP_SPECTRAL,
|
|
|
wlan_spectral_psoc_obj_destroy_handler,
|
|
|
- NULL) != QDF_STATUS_SUCCESS) {
|
|
|
+ NULL) !=
|
|
|
+ QDF_STATUS_SUCCESS) {
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
if (wlan_objmgr_unregister_pdev_create_handler(
|
|
|
WLAN_UMAC_COMP_SPECTRAL,
|
|
|
wlan_spectral_pdev_obj_create_handler,
|
|
|
- NULL) != QDF_STATUS_SUCCESS) {
|
|
|
+ NULL) !=
|
|
|
+ QDF_STATUS_SUCCESS) {
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
if (wlan_objmgr_unregister_pdev_destroy_handler(
|
|
|
WLAN_UMAC_COMP_SPECTRAL,
|
|
|
wlan_spectral_pdev_obj_destroy_handler,
|
|
|
- NULL) != QDF_STATUS_SUCCESS) {
|
|
|
+ NULL) !=
|
|
|
+ QDF_STATUS_SUCCESS) {
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-QDF_STATUS spectral_register_legacy_cb(struct wlan_objmgr_psoc *psoc,
|
|
|
- struct spectral_legacy_cbacks *legacy_cbacks)
|
|
|
+QDF_STATUS
|
|
|
+spectral_register_legacy_cb(struct wlan_objmgr_psoc *psoc,
|
|
|
+ struct spectral_legacy_cbacks *legacy_cbacks)
|
|
|
{
|
|
|
struct spectral_context *sc;
|
|
|
|
|
@@ -94,17 +105,17 @@ QDF_STATUS spectral_register_legacy_cb(struct wlan_objmgr_psoc *psoc,
|
|
|
}
|
|
|
|
|
|
sc->legacy_cbacks.vdev_get_chan_freq =
|
|
|
- legacy_cbacks->vdev_get_chan_freq;
|
|
|
- sc->legacy_cbacks.vdev_get_ch_width =
|
|
|
- legacy_cbacks->vdev_get_ch_width;
|
|
|
+ legacy_cbacks->vdev_get_chan_freq;
|
|
|
+ sc->legacy_cbacks.vdev_get_ch_width = legacy_cbacks->vdev_get_ch_width;
|
|
|
sc->legacy_cbacks.vdev_get_sec20chan_freq_mhz =
|
|
|
- legacy_cbacks->vdev_get_sec20chan_freq_mhz;
|
|
|
+ legacy_cbacks->vdev_get_sec20chan_freq_mhz;
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
EXPORT_SYMBOL(spectral_register_legacy_cb);
|
|
|
|
|
|
-int16_t spectral_vdev_get_chan_freq(struct wlan_objmgr_vdev *vdev)
|
|
|
+int16_t
|
|
|
+spectral_vdev_get_chan_freq(struct wlan_objmgr_vdev *vdev)
|
|
|
{
|
|
|
struct spectral_context *sc;
|
|
|
|
|
@@ -112,7 +123,8 @@ int16_t spectral_vdev_get_chan_freq(struct wlan_objmgr_vdev *vdev)
|
|
|
return sc->legacy_cbacks.vdev_get_chan_freq(vdev);
|
|
|
}
|
|
|
|
|
|
-enum phy_ch_width spectral_vdev_get_ch_width(struct wlan_objmgr_vdev *vdev)
|
|
|
+enum phy_ch_width
|
|
|
+spectral_vdev_get_ch_width(struct wlan_objmgr_vdev *vdev)
|
|
|
{
|
|
|
struct spectral_context *sc;
|
|
|
|
|
@@ -120,31 +132,34 @@ enum phy_ch_width spectral_vdev_get_ch_width(struct wlan_objmgr_vdev *vdev)
|
|
|
return sc->legacy_cbacks.vdev_get_ch_width(vdev);
|
|
|
}
|
|
|
|
|
|
-int spectral_vdev_get_sec20chan_freq_mhz(struct wlan_objmgr_vdev *vdev,
|
|
|
- uint16_t *sec20chan_freq)
|
|
|
+int
|
|
|
+spectral_vdev_get_sec20chan_freq_mhz(struct wlan_objmgr_vdev *vdev,
|
|
|
+ uint16_t *sec20chan_freq)
|
|
|
{
|
|
|
struct spectral_context *sc;
|
|
|
|
|
|
sc = spectral_get_spectral_ctx_from_vdev(vdev);
|
|
|
- return sc->legacy_cbacks.vdev_get_sec20chan_freq_mhz(vdev, sec20chan_freq);
|
|
|
+ return sc->legacy_cbacks.vdev_get_sec20chan_freq_mhz(vdev,
|
|
|
+ sec20chan_freq);
|
|
|
}
|
|
|
|
|
|
-void wlan_lmac_if_sptrl_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
|
|
|
+void
|
|
|
+wlan_lmac_if_sptrl_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
|
|
|
{
|
|
|
struct wlan_lmac_if_sptrl_rx_ops *sptrl_rx_ops = &rx_ops->sptrl_rx_ops;
|
|
|
|
|
|
/* Spectral rx ops */
|
|
|
sptrl_rx_ops->sptrlro_send_phydata = tgt_send_phydata;
|
|
|
- sptrl_rx_ops->sptrlro_get_target_handle = tgt_get_target_handle;
|
|
|
+ sptrl_rx_ops->sptrlro_get_target_handle = tgt_get_target_handle;
|
|
|
sptrl_rx_ops->sptrlro_vdev_get_chan_freq = spectral_vdev_get_chan_freq;
|
|
|
- sptrl_rx_ops->sptrlro_vdev_get_ch_width = spectral_vdev_get_ch_width;
|
|
|
+ sptrl_rx_ops->sptrlro_vdev_get_ch_width = spectral_vdev_get_ch_width;
|
|
|
sptrl_rx_ops->sptrlro_vdev_get_sec20chan_freq_mhz =
|
|
|
- spectral_vdev_get_sec20chan_freq_mhz;
|
|
|
+ spectral_vdev_get_sec20chan_freq_mhz;
|
|
|
}
|
|
|
|
|
|
-void wlan_register_wmi_spectral_cmd_ops(
|
|
|
- struct wlan_objmgr_pdev *pdev,
|
|
|
- struct wmi_spectral_cmd_ops *cmd_ops)
|
|
|
+void
|
|
|
+wlan_register_wmi_spectral_cmd_ops(struct wlan_objmgr_pdev *pdev,
|
|
|
+ struct wmi_spectral_cmd_ops *cmd_ops)
|
|
|
{
|
|
|
struct spectral_context *sc;
|
|
|
|
|
@@ -155,9 +170,6 @@ void wlan_register_wmi_spectral_cmd_ops(
|
|
|
if (!sc)
|
|
|
spectral_err("spectral context is NULL!\n");
|
|
|
|
|
|
- return sc->sptrlc_register_wmi_spectral_cmd_ops(
|
|
|
- pdev,
|
|
|
- cmd_ops
|
|
|
- );
|
|
|
+ return sc->sptrlc_register_wmi_spectral_cmd_ops(pdev, cmd_ops);
|
|
|
}
|
|
|
EXPORT_SYMBOL(wlan_register_wmi_spectral_cmd_ops);
|