staging: r8188eu: Fix smatch warnings in odm_HWConfig.c
Smatch reports the following warnings: drivers/staging/rtl8188eu/hal/odm_HWConfig.c:302 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyInfo->RxPwr' 2 <= 2 drivers/staging/rtl8188eu/hal/odm_HWConfig.c:319 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyInfo->RxMIMOSignalStrength' 2 <= 2 drivers/staging/rtl8188eu/hal/odm_HWConfig.c:322 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyStaRpt->path_rxsnr' 2 <= 2 drivers/staging/rtl8188eu/hal/odm_HWConfig.c:322 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyInfo->RxSNR' 2 <= 2 drivers/staging/rtl8188eu/hal/odm_HWConfig.c:323 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyStaRpt->path_rxsnr' 2 <= 2 drivers/staging/rtl8188eu/hal/odm_HWConfig.c:323 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'dm_odm->PhyDbgInfo.RxSNRdB' 2 <= 2 These warnings are again due to the number of radio patchs being increased to 3 without adjustments to the array sizes. A duplicate and redundant definition was also removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1ad866e7bf
commit
bdbdc54e18
@ -283,8 +283,6 @@ struct odm_rate_adapt {
|
|||||||
|
|
||||||
/* Declare for common info */
|
/* Declare for common info */
|
||||||
|
|
||||||
#define MAX_PATH_NUM_92CS 2
|
|
||||||
|
|
||||||
struct odm_phy_status_info {
|
struct odm_phy_status_info {
|
||||||
u8 RxPWDBAll;
|
u8 RxPWDBAll;
|
||||||
u8 SignalQuality; /* in 0-100 index. */
|
u8 SignalQuality; /* in 0-100 index. */
|
||||||
|
@ -69,7 +69,7 @@ struct phy_rx_agc_info {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct phy_status_rpt {
|
struct phy_status_rpt {
|
||||||
struct phy_rx_agc_info path_agc[2];
|
struct phy_rx_agc_info path_agc[3];
|
||||||
u8 ch_corr[2];
|
u8 ch_corr[2];
|
||||||
u8 cck_sig_qual_ofdm_pwdb_all;
|
u8 cck_sig_qual_ofdm_pwdb_all;
|
||||||
u8 cck_agc_rpt_ofdm_cfosho_a;
|
u8 cck_agc_rpt_ofdm_cfosho_a;
|
||||||
@ -79,7 +79,7 @@ struct phy_status_rpt {
|
|||||||
u8 path_cfotail[2];
|
u8 path_cfotail[2];
|
||||||
u8 pcts_mask[2];
|
u8 pcts_mask[2];
|
||||||
s8 stream_rxevm[2];
|
s8 stream_rxevm[2];
|
||||||
u8 path_rxsnr[2];
|
u8 path_rxsnr[3];
|
||||||
u8 noise_power_db_lsb;
|
u8 noise_power_db_lsb;
|
||||||
u8 rsvd_2[3];
|
u8 rsvd_2[3];
|
||||||
u8 stream_csi[2];
|
u8 stream_csi[2];
|
||||||
|
@ -83,7 +83,7 @@ struct signal_stat {
|
|||||||
u32 total_num; /* num of valid elements */
|
u32 total_num; /* num of valid elements */
|
||||||
u32 total_val; /* sum 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 {
|
struct phy_info {
|
||||||
u8 RxPWDBAll;
|
u8 RxPWDBAll;
|
||||||
u8 SignalQuality; /* in 0-100 index. */
|
u8 SignalQuality; /* in 0-100 index. */
|
||||||
|
Loading…
Reference in New Issue
Block a user