qcacmn: Remove CONFIG_WIN from spectral

Remove CONFIG_WIN from spectral module to achieve maximum
possible convergence.

CRs-Fixed: 2354105
Change-Id: I59e4d8029fcf096042741573cf020136747e7367
This commit is contained in:
Edayilliam Jayadev
2018-12-10 14:29:30 +05:30
committed by nshrivas
parent 60e6dd9978
commit 780b60ea90
5 changed files with 55 additions and 28 deletions

View File

@@ -35,6 +35,7 @@
#define WCN3990_v2 0x40010000
#define WCN3990_v2_1 0x40010002
#define WCN3998 0x40030001
#define AR900B_REV_2 0x1
struct qwlan_hw {
u32 id;

View File

@@ -21,11 +21,9 @@
#include "spectral_ol_api_i.h"
#include <qdf_mem.h>
#include <qdf_types.h>
#ifdef CONFIG_WIN
#ifdef DA_SUPPORT
#include "spectral_da_api_i.h"
#include <osif_private.h>
#include <wlan_mlme_dispatcher.h>
#endif /*CONFIG_WIN*/
#endif
#include <wlan_spectral_public_structs.h>
#include <wlan_cfg80211_spectral.h>
@@ -523,6 +521,26 @@ spectral_ctx_deinit(struct spectral_context *sc)
}
}
#ifdef DA_SUPPORT
/**
* wlan_spectral_init_da() - init context of DA devices
*
* init context of DA device
*
* Return: void
*/
static void
wlan_spectral_init_da(struct spectral_context *sc)
{
spectral_ctx_init_da(sc);
}
#else
static void
wlan_spectral_init_da(struct spectral_context *sc)
{
}
#endif
QDF_STATUS
wlan_spectral_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc, void *arg)
{
@@ -542,10 +560,8 @@ wlan_spectral_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc, void *arg)
sc->psoc_obj = psoc;
if (wlan_objmgr_psoc_get_dev_type(psoc) == WLAN_DEV_OL)
spectral_ctx_init_ol(sc);
#ifdef CONFIG_WIN
else if (wlan_objmgr_psoc_get_dev_type(psoc) == WLAN_DEV_DA)
spectral_ctx_init_da(sc);
#endif
wlan_spectral_init_da(sc);
wlan_objmgr_psoc_component_obj_attach(psoc, WLAN_UMAC_COMP_SPECTRAL,
(void *)sc, QDF_STATUS_SUCCESS);

View File

@@ -30,9 +30,6 @@
#include <qdf_util.h>
#include <wlan_spectral_public_structs.h>
#include <wlan_spectral_utils_api.h>
#ifdef CONFIG_WIN
#include <if_athioctl.h>
#endif /*CONFIG_WIN*/
#include <spectral_ioctl.h>
#define spectral_log(level, args...) \

View File

@@ -27,13 +27,11 @@
#include <wlan_osif_priv.h>
#include <init_deinit_lmac.h>
#include <reg_services_public_struct.h>
#ifdef CONFIG_WIN
#include <wlan_mlme_dispatcher.h>
#endif /*CONFIG_WIN*/
#include <reg_services_public_struct.h>
#include <target_if_spectral_sim.h>
#include <target_if.h>
#include <qdf_module.h>
/**
* @spectral_ops - Spectral function table, holds the Spectral functions that
* depend on whether the architecture is Direct Attach or Offload. This is used
@@ -1942,12 +1940,10 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
{
struct target_if_spectral_ops *p_sops = NULL;
struct target_if_spectral *spectral = NULL;
#ifdef CONFIG_WIN
uint32_t target_type;
uint32_t target_revision;
struct wlan_objmgr_psoc *psoc;
struct wlan_lmac_if_target_tx_ops *tx_ops;
#endif
if (!pdev) {
spectral_err("SPECTRAL: pdev is NULL!");
@@ -1963,7 +1959,6 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
/* Store pdev in Spectral */
spectral->pdev_obj = pdev;
#ifdef CONFIG_WIN
psoc = wlan_pdev_get_psoc(pdev);
tx_ops = &psoc->soc_cb.tx_ops.target_tx_ops;
@@ -1981,7 +1976,6 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
qdf_mem_free(spectral);
return NULL;
}
#endif
/* init the function ptr table */
target_if_spectral_init_dummy_function_table(spectral);
@@ -2005,7 +1999,6 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
qdf_spinlock_create(&spectral->noise_pwr_reports_lock);
target_if_spectral_clear_stats(spectral);
#ifdef CONFIG_WIN
if (target_type == TARGET_TYPE_QCA8074V2 ||
target_type == TARGET_TYPE_QCA6018)
spectral->fftbin_size_war =
@@ -2036,9 +2029,7 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
TLV_TAG_SPECTRAL_SUMMARY_REPORT_GEN3;
spectral->tag_sscan_fft_exp = TLV_TAG_SEARCH_FFT_REPORT_GEN3;
spectral->tlvhdr_size = SPECTRAL_PHYERR_TLVSIZE_GEN3;
} else
#endif
{
} else {
spectral->spectral_gen = SPECTRAL_GEN2;
spectral->hdr_sig_exp = SPECTRAL_PHYERR_SIGNATURE_GEN2;
spectral->tag_sscan_summary_exp =
@@ -2072,7 +2063,6 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
spectral->is_160_format = false;
spectral->is_lb_edge_extrabins_format = false;
spectral->is_rb_edge_extrabins_format = false;
#ifdef CONFIG_WIN
if (target_type == TARGET_TYPE_QCA9984 ||
target_type == TARGET_TYPE_QCA9888) {
@@ -2087,6 +2077,7 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
if (target_type == TARGET_TYPE_QCA9984 ||
target_type == TARGET_TYPE_QCA9888)
spectral->is_sec80_rssi_war_required = true;
#ifdef CONFIG_WIN
spectral->use_nl_bcast = true;
#else
spectral->use_nl_bcast = false;

View File

@@ -27,9 +27,6 @@
#include <target_if_spectral.h>
#include <wlan_lmac_if_def.h>
#include <wlan_osif_priv.h>
#ifdef CONFIG_WIN
#include <osif_rawmode_sim.h>
#endif /*CONFIG_WIN*/
#include <reg_services_public_struct.h>
#ifdef DIRECT_BUF_RX_ENABLE
#include <target_if_direct_buf_rx_api.h>
@@ -38,6 +35,32 @@ extern int spectral_debug_level;
#ifdef WLAN_CONV_SPECTRAL_ENABLE
static inline void target_if_spectral_hexdump(unsigned char *_buf, int _len)
{
int i, mod;
unsigned char ascii[17];
unsigned char *pc = (_buf);
for (i = 0; i < _len; i++) {
mod = i % 16;
if (!mod) {
if (i)
spectral_debug(" %s\n", ascii);
}
spectral_debug(" %02x", pc[i]);
if ((pc[i] < 0x20) || (pc[i] > 0x7e))
ascii[mod] = '.';
else
ascii[mod] = pc[i];
ascii[(mod) + 1] = '\0';
}
while ((i % 16) != 0) {
spectral_debug(" ");
i++;
}
spectral_debug(" %s\n", ascii);
}
/**
* target_if_print_buf() - Prints given buffer for given length
* @pbuf: Pointer to buffer
@@ -1792,9 +1815,8 @@ int target_if_spectral_process_report_gen3(
payload->dbr_len,
payload->dbr_len,
payload->vaddr);
#ifdef CONFIG_WIN
RAWSIM_PKT_HEXDUMP((unsigned char *)payload->vaddr, 1024);
#endif
target_if_spectral_hexdump((unsigned char *)payload->vaddr,
1024);
}
ret = target_if_consume_spectral_report_gen3(spectral, &report);