summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu/include
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2013-09-04 20:56:06 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-17 14:47:45 (GMT)
commitbdbdc54e186da6b8e8ea98c173f55198b0d337eb (patch)
tree31ca3b8cd87a0c1ca01bd72943cf3fdfa7c3005a /drivers/staging/rtl8188eu/include
parent1ad866e7bf1c64238d77aa5e390e90cf7a5c6c41 (diff)
downloadlinux-fsl-qoriq-bdbdc54e186da6b8e8ea98c173f55198b0d337eb.tar.xz
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>
Diffstat (limited to 'drivers/staging/rtl8188eu/include')
-rw-r--r--drivers/staging/rtl8188eu/include/odm.h2
-rw-r--r--drivers/staging/rtl8188eu/include/odm_HWConfig.h4
-rw-r--r--drivers/staging/rtl8188eu/include/rtw_recv.h2
3 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/rtl8188eu/include/odm.h b/drivers/staging/rtl8188eu/include/odm.h
index e3b40f8..300ca78 100644
--- a/drivers/staging/rtl8188eu/include/odm.h
+++ b/drivers/staging/rtl8188eu/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. */
diff --git a/drivers/staging/rtl8188eu/include/odm_HWConfig.h b/drivers/staging/rtl8188eu/include/odm_HWConfig.h
index 63779f5..df52722 100644
--- a/drivers/staging/rtl8188eu/include/odm_HWConfig.h
+++ b/drivers/staging/rtl8188eu/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[3];
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[3];
u8 noise_power_db_lsb;
u8 rsvd_2[3];
u8 stream_csi[2];
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index bae8885..be9c30c 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/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. */