diff --git a/hif/src/hif_hw_version.h b/hif/src/hif_hw_version.h index 4a55d7d3e4..35201033d7 100644 --- a/hif/src/hif_hw_version.h +++ b/hif/src/hif_hw_version.h @@ -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; diff --git a/spectral/core/spectral_common.c b/spectral/core/spectral_common.c index 93282fdc66..9efc462f57 100644 --- a/spectral/core/spectral_common.c +++ b/spectral/core/spectral_common.c @@ -21,11 +21,9 @@ #include "spectral_ol_api_i.h" #include #include -#ifdef CONFIG_WIN +#ifdef DA_SUPPORT #include "spectral_da_api_i.h" -#include -#include -#endif /*CONFIG_WIN*/ +#endif #include #include @@ -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); diff --git a/spectral/core/spectral_defs_i.h b/spectral/core/spectral_defs_i.h index aa92ef886c..7d25fd4d65 100644 --- a/spectral/core/spectral_defs_i.h +++ b/spectral/core/spectral_defs_i.h @@ -30,9 +30,6 @@ #include #include #include -#ifdef CONFIG_WIN -#include -#endif /*CONFIG_WIN*/ #include #define spectral_log(level, args...) \ diff --git a/target_if/spectral/target_if_spectral.c b/target_if/spectral/target_if_spectral.c index 0efd37e055..babbbd45b0 100644 --- a/target_if/spectral/target_if_spectral.c +++ b/target_if/spectral/target_if_spectral.c @@ -27,13 +27,11 @@ #include #include #include -#ifdef CONFIG_WIN -#include -#endif /*CONFIG_WIN*/ #include #include #include #include + /** * @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; diff --git a/target_if/spectral/target_if_spectral_phyerr.c b/target_if/spectral/target_if_spectral_phyerr.c index 3fcb07a2f3..0b9566258c 100644 --- a/target_if/spectral/target_if_spectral_phyerr.c +++ b/target_if/spectral/target_if_spectral_phyerr.c @@ -27,9 +27,6 @@ #include #include #include -#ifdef CONFIG_WIN -#include -#endif /*CONFIG_WIN*/ #include #ifdef DIRECT_BUF_RX_ENABLE #include @@ -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);