[PATCH 08/13] staging: rtl8723au: Remove RegBcnCtrlVal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>

The value saved in RegBcnCtrlVal was never used. In addition the code
was highly endian broken, declaring it as a u32, then accessing it via
a u8 * later.

Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
---
 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 18 +++++-------------
 drivers/staging/rtl8723au/include/rtl8723a_hal.h  |  1 -
 2 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
index bc9e880..5c4751c 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
@@ -882,20 +882,13 @@ void rtl8723a_read_chip_version(struct rtw_adapter *padapter)
 /*  */
 void SetBcnCtrlReg23a(struct rtw_adapter *padapter, u8 SetBits, u8 ClearBits)
 {
-	struct hal_data_8723a *pHalData;
-	u32 addr;
-	u8 *pRegBcnCtrlVal;
-
-	pHalData = GET_HAL_DATA(padapter);
-	pRegBcnCtrlVal = (u8 *)&pHalData->RegBcnCtrlVal;
-
-	addr = REG_BCN_CTRL;
+	u8 val8;
 
-	*pRegBcnCtrlVal = rtl8723au_read8(padapter, addr);
-	*pRegBcnCtrlVal |= SetBits;
-	*pRegBcnCtrlVal &= ~ClearBits;
+	val8 = rtl8723au_read8(padapter, REG_BCN_CTRL);
+	val8 |= SetBits;
+	val8 &= ~ClearBits;
 
-	rtl8723au_write8(padapter, addr, *pRegBcnCtrlVal);
+	rtl8723au_write8(padapter, REG_BCN_CTRL, val8);
 }
 
 void rtl8723a_InitBeaconParameters(struct rtw_adapter *padapter)
@@ -903,7 +896,6 @@ void rtl8723a_InitBeaconParameters(struct rtw_adapter *padapter)
 	struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
 
 	rtl8723au_write16(padapter, REG_BCN_CTRL, 0x1010);
-	pHalData->RegBcnCtrlVal = 0x1010;
 
 	/*  TODO: Remove these magic number */
 	rtl8723au_write16(padapter, REG_TBTT_PROHIBIT, 0x6404);	/*  ms */
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_hal.h b/drivers/staging/rtl8723au/include/rtl8723a_hal.h
index 066dc9c..1f63eb1 100644
--- a/drivers/staging/rtl8723au/include/rtl8723a_hal.h
+++ b/drivers/staging/rtl8723au/include/rtl8723a_hal.h
@@ -356,7 +356,6 @@ struct hal_data_8723a {
 	u8	fw_ractrl;
 	u8	RegTxPause;
 	/*  Beacon function related global variable. */
-	u32	RegBcnCtrlVal;
 	u8	RegFwHwTxQCtrl;
 	u8	RegReg542;
 
-- 
1.9.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux