From f9dbfb74dc30706a29d0cd4cd64fd88be0ceb87f Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 13 Feb 2016 15:36:13 -0600 Subject: [PATCH] rtl8188eu: Remove symbol MAX_RF_PATH_NUMS This one is always equal to RF_PATH_MAX. Signed-off-by: Larry Finger --- core/rtw_mp_ioctl.c | 4 ++-- hal/rtl8188e_mp.c | 6 +++--- include/rtw_mp.h | 2 -- os_dep/ioctl_linux.c | 8 ++++---- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/core/rtw_mp_ioctl.c b/core/rtw_mp_ioctl.c index aec327d..87c3f29 100644 --- a/core/rtw_mp_ioctl.c +++ b/core/rtw_mp_ioctl.c @@ -138,7 +138,7 @@ int rtl8188eu_oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv) pbbreg = (struct rf_reg_param *)(poid_par_priv->information_buf); - if (pbbreg->path >= MAX_RF_PATH_NUMS) + if (pbbreg->path >= RF_PATH_MAX) return NDIS_STATUS_NOT_ACCEPTED; if (pbbreg->offset > 0xFF) return NDIS_STATUS_NOT_ACCEPTED; @@ -179,7 +179,7 @@ int rtl8188eu_oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv) pbbreg = (struct rf_reg_param *)(poid_par_priv->information_buf); - if (pbbreg->path >= MAX_RF_PATH_NUMS) + if (pbbreg->path >= RF_PATH_MAX) return NDIS_STATUS_NOT_ACCEPTED; if (pbbreg->offset > 0xFF) return NDIS_STATUS_NOT_ACCEPTED; diff --git a/hal/rtl8188e_mp.c b/hal/rtl8188e_mp.c index 9ceb37a..6638890 100644 --- a/hal/rtl8188e_mp.c +++ b/hal/rtl8188e_mp.c @@ -315,7 +315,7 @@ void Hal_SetOFDMTxPower(struct adapter *pAdapter, u8 *TxPower) void Hal_SetAntennaPathPower(struct adapter *pAdapter) { struct hal_data_8188e *pHalData = GET_HAL_DATA(pAdapter); - u8 TxPowerLevel[MAX_RF_PATH_NUMS]; + u8 TxPowerLevel[RF_PATH_MAX]; u8 rfPath; TxPowerLevel[RF_PATH_A] = pAdapter->mppriv.txpoweridx; @@ -352,10 +352,10 @@ void Hal_SetTxPower(struct adapter *pAdapter) { struct hal_data_8188e *pHalData = GET_HAL_DATA(pAdapter); u8 TxPower = pAdapter->mppriv.txpoweridx; - u8 TxPowerLevel[MAX_RF_PATH_NUMS]; + u8 TxPowerLevel[RF_PATH_MAX]; u8 rf, rfPath; - for (rf = 0; rf < MAX_RF_PATH_NUMS; rf++) + for (rf = 0; rf < RF_PATH_MAX; rf++) TxPowerLevel[rf] = TxPower; switch (pAdapter->mppriv.antenna_tx) { diff --git a/include/rtw_mp.h b/include/rtw_mp.h index 946a424..9111e58 100644 --- a/include/rtw_mp.h +++ b/include/rtw_mp.h @@ -358,8 +358,6 @@ enum mp_mode_{ MP_PACKET_RX }; -#define MAX_RF_PATH_NUMS RF_PATH_MAX - extern u8 mpdatarate[NumRates]; /* MP set force data rate base on the definition. */ diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index ad79f71..d9ef601 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -6584,7 +6584,7 @@ static int rtw_mp_read_reg(struct net_device *dev, /* * Input Format: %d,%x,%x - * %d is RF path, should be smaller than MAX_RF_PATH_NUMS + * %d is RF path, should be smaller than RF_PATH_MAX * 1st %x is address(offset) * 2st %x is data to write */ @@ -6600,7 +6600,7 @@ static int rtw_mp_read_reg(struct net_device *dev, if (ret < 3) return -EINVAL; - if (path >= MAX_RF_PATH_NUMS) + if (path >= RF_PATH_MAX) return -EINVAL; if (addr > 0xFF) return -EINVAL; @@ -6619,7 +6619,7 @@ static int rtw_mp_read_reg(struct net_device *dev, /* * Input Format: %d,%x - * %d is RF path, should be smaller than MAX_RF_PATH_NUMS + * %d is RF path, should be smaller than RF_PATH_MAX * %x is address(offset) * * Return: @@ -6647,7 +6647,7 @@ static int rtw_mp_read_rf(struct net_device *dev, if (ret < 2) return -EINVAL; - if (path >= MAX_RF_PATH_NUMS) + if (path >= RF_PATH_MAX) return -EINVAL; if (addr > 0xFF) return -EINVAL;