From c17cf6327b9c813f7df15f6c3ed3702c2378e3f3 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 6 Sep 2013 22:29:33 -0500 Subject: [PATCH] rtl8188eu: Fix smatch errors due to MAX_PATH too small Several of the struct definitions all for only 2 radio paths; however, the code now has 3 such paths. Signed-off-by: Larry Finger --- include/Hal8188EPhyCfg.h | 2 +- include/odm.h | 4 +--- include/odm_HWConfig.h | 4 ++-- include/rtw_recv.h | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/Hal8188EPhyCfg.h b/include/Hal8188EPhyCfg.h index b1f263e..abfbf5c 100644 --- a/include/Hal8188EPhyCfg.h +++ b/include/Hal8188EPhyCfg.h @@ -75,7 +75,7 @@ enum rf_radio_path { #define MAX_PG_GROUP 13 -#define RF_PATH_MAX 2 +#define RF_PATH_MAX 3 #define MAX_RF_PATH RF_PATH_MAX #define MAX_TX_COUNT 4 /* path numbers */ diff --git a/include/odm.h b/include/odm.h index 4787bac..eaa4bc1 100644 --- a/include/odm.h +++ b/include/odm.h @@ -283,8 +283,6 @@ struct odm_rate_adapt { /* Declare for common info */ -#define MAX_PATH_NUM_92CS 2 - struct odm_phy_status_info { u8 RxPWDBAll; u8 SignalQuality; /* in 0-100 index. */ @@ -950,7 +948,7 @@ struct odm_dm_struct { struct timer_list FastAntTrainingTimer; }; /* DM_Dynamic_Mechanism_Structure */ -#define ODM_RF_PATH_MAX 2 +#define ODM_RF_PATH_MAX 3 enum ODM_RF_RADIO_PATH { ODM_RF_PATH_A = 0, /* Radio Path A */ diff --git a/include/odm_HWConfig.h b/include/odm_HWConfig.h index 930a2c6..4332b26 100644 --- a/include/odm_HWConfig.h +++ b/include/odm_HWConfig.h @@ -69,7 +69,7 @@ struct phy_rx_agc_info { }; struct phy_status_rpt { - struct phy_rx_agc_info path_agc[2]; + struct phy_rx_agc_info path_agc[ODM_RF_PATH_MAX]; u8 ch_corr[2]; u8 cck_sig_qual_ofdm_pwdb_all; u8 cck_agc_rpt_ofdm_cfosho_a; @@ -79,7 +79,7 @@ struct phy_status_rpt { u8 path_cfotail[2]; u8 pcts_mask[2]; s8 stream_rxevm[2]; - u8 path_rxsnr[2]; + u8 path_rxsnr[ODM_RF_PATH_MAX]; u8 noise_power_db_lsb; u8 rsvd_2[3]; u8 stream_csi[2]; diff --git a/include/rtw_recv.h b/include/rtw_recv.h index bae8885..be9c30c 100644 --- a/include/rtw_recv.h +++ b/include/rtw_recv.h @@ -83,7 +83,7 @@ struct signal_stat { u32 total_num; /* num of valid elements */ u32 total_val; /* sum of valid elements */ }; -#define MAX_PATH_NUM_92CS 2 +#define MAX_PATH_NUM_92CS 3 struct phy_info { u8 RxPWDBAll; u8 SignalQuality; /* in 0-100 index. */