From 12b235cd182fd486b5548cbdc49446a65bdd90db Mon Sep 17 00:00:00 2001 From: Xianjun Jiao Date: Mon, 28 Mar 2022 20:44:42 +0200 Subject: [PATCH] Remove the unnecessary variable and code from openofdm_rx interface --- driver/hw_def.h | 3 --- driver/openofdm_rx/openofdm_rx.c | 7 +------ 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/driver/hw_def.h b/driver/hw_def.h index 019a621..46ebcc3 100644 --- a/driver/hw_def.h +++ b/driver/hw_def.h @@ -214,9 +214,6 @@ enum openofdm_rx_mode { }; struct openofdm_rx_driver_api { - u32 power_thres; - u32 min_plateau; - u32 (*hw_init)(enum openofdm_rx_mode mode); u32 (*reg_read)(u32 reg); diff --git a/driver/openofdm_rx/openofdm_rx.c b/driver/openofdm_rx/openofdm_rx.c index f78ae84..828acf7 100644 --- a/driver/openofdm_rx/openofdm_rx.c +++ b/driver/openofdm_rx/openofdm_rx.c @@ -80,8 +80,6 @@ static inline u32 hw_init(enum openofdm_rx_mode mode){ case OPENOFDM_RX_NORMAL: { printk("%s hw_init mode OPENOFDM_RX_NORMAL\n", openofdm_rx_compatible_str); - openofdm_rx_api->power_thres = 0; - openofdm_rx_api->min_plateau = 100; break; } default: @@ -90,9 +88,7 @@ static inline u32 hw_init(enum openofdm_rx_mode mode){ err=1; } } - printk("%s hw_init input:\npower_thres %d\nmin_plateau %d\n", - openofdm_rx_compatible_str, - openofdm_rx_api->power_thres, openofdm_rx_api->min_plateau); + printk("%s hw_init input: power_thres %d dc_running_sum_th %d min_plateau %d\n", openofdm_rx_compatible_str, OPENOFDM_RX_POWER_THRES_INIT, OPENOFDM_RX_DC_RUNNING_SUM_TH_INIT, OPENOFDM_RX_MIN_PLATEAU_INIT); // 1) power threshold configuration and reset openofdm_rx_api->OPENOFDM_RX_REG_POWER_THRES_write(0); @@ -109,7 +105,6 @@ static inline u32 hw_init(enum openofdm_rx_mode mode){ printk("%s hw_init err %d\n", openofdm_rx_compatible_str, err); - reg_write(4*4,1);//enable soft decoding return(err); }