qcacmn: Callback functions for legacy spectral apis
Use table of function pointers for legacy api calls instead of calling legacy apis directely CRs-Fixed: 2146231 Change-Id: Ia5840208d0de5bd4e78c1d27b8ffdc0cf6cbf298
This commit is contained in:

committed by
snandini

parent
d8c6a467dd
commit
e0c7fbdb93
@@ -940,7 +940,7 @@ u_int32_t target_if_spectral_get_extension_channel(void *arg)
|
||||
if (!vdev)
|
||||
return 0;
|
||||
|
||||
if (wlan_vdev_get_sec20chan_freq_mhz(vdev, &sec20chan_freq) < 0) {
|
||||
if (target_if_vdev_get_sec20chan_freq_mhz(vdev, &sec20chan_freq) < 0) {
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_SPECTRAL_ID);
|
||||
return 0;
|
||||
}
|
||||
@@ -974,7 +974,7 @@ u_int32_t target_if_spectral_get_current_channel(void *arg)
|
||||
if (!vdev)
|
||||
return 0;
|
||||
|
||||
chan_freq = wlan_vdev_get_chan_freq(vdev);
|
||||
chan_freq = target_if_vdev_get_chan_freq(vdev);
|
||||
if (chan_freq < 0) {
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_SPECTRAL_ID);
|
||||
return 0;
|
||||
@@ -1967,7 +1967,7 @@ static int target_if_spectral_scan_enable_params(
|
||||
if (!vdev)
|
||||
return 1;
|
||||
|
||||
spectral->ch_width = wlan_vdev_get_ch_width(vdev);
|
||||
spectral->ch_width = target_if_vdev_get_ch_width(vdev);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_SPECTRAL_ID);
|
||||
|
||||
if (spectral->ch_width == CH_WIDTH_INVALID)
|
||||
|
@@ -939,6 +939,40 @@ struct target_if_spectral *get_target_if_spectral_handle_from_pdev(
|
||||
return spectral;
|
||||
}
|
||||
|
||||
static inline
|
||||
int16_t target_if_vdev_get_chan_freq(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = NULL;
|
||||
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
|
||||
return psoc->soc_cb.rx_ops.sptrl_rx_ops.sptrlro_vdev_get_chan_freq(
|
||||
vdev);
|
||||
}
|
||||
|
||||
static inline
|
||||
enum phy_ch_width target_if_vdev_get_ch_width(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = NULL;
|
||||
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
|
||||
return psoc->soc_cb.rx_ops.sptrl_rx_ops.sptrlro_vdev_get_ch_width(
|
||||
vdev);
|
||||
}
|
||||
|
||||
static inline
|
||||
int target_if_vdev_get_sec20chan_freq_mhz(struct wlan_objmgr_vdev *vdev,
|
||||
uint16_t *sec20chan_freq)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = NULL;
|
||||
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
|
||||
return psoc->soc_cb.rx_ops.sptrl_rx_ops.
|
||||
sptrlro_vdev_get_sec20chan_freq_mhz(vdev, sec20chan_freq);
|
||||
}
|
||||
|
||||
/**
|
||||
* target_if_spectral_set_rxchainmask() - Set Spectral Rx chainmask
|
||||
* @pdev: Pointer to pdev
|
||||
|
@@ -848,7 +848,7 @@ u_int32_t tif_spectral_sim_configure_params(
|
||||
return 0;
|
||||
}
|
||||
|
||||
bw = wlan_vdev_get_ch_width(vdev);
|
||||
bw = target_if_vdev_get_ch_width(vdev);
|
||||
|
||||
switch (bw) {
|
||||
case CH_WIDTH_20MHZ:
|
||||
|
Reference in New Issue
Block a user