SetHwReg8188EU() is called with HW_VAR_ACM_CTRL only in one place. Remove the HW_VAR_RESP_SIFS case from SetHwReg8188EU() and replace its call with the code from that case. This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@xxxxxxxxx> --- drivers/staging/r8188eu/core/rtw_wlan_util.c | 27 +++++++++++++++++--- drivers/staging/r8188eu/hal/usb_halinit.c | 26 ------------------- drivers/staging/r8188eu/include/hal_intf.h | 1 - 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c index eda4e5f9a6af..cde3779ff21d 100644 --- a/drivers/staging/r8188eu/core/rtw_wlan_util.c +++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c @@ -571,10 +571,31 @@ void WMMOnAssocRsp(struct adapter *padapter) } } - if (padapter->registrypriv.acm_method == 1) - SetHwReg8188EU(padapter, HW_VAR_ACM_CTRL, (u8 *)(&acm_mask)); - else + if (padapter->registrypriv.acm_method == 1) { + u8 acmctrl = rtw_read8(padapter, REG_ACMHWCTRL); + + if (acm_mask > 1) + acmctrl = acmctrl | 0x1; + + if (acm_mask & BIT(3)) + acmctrl |= ACMHW_VOQEN; + else + acmctrl &= (~ACMHW_VOQEN); + + if (acm_mask & BIT(2)) + acmctrl |= ACMHW_VIQEN; + else + acmctrl &= (~ACMHW_VIQEN); + + if (acm_mask & BIT(1)) + acmctrl |= ACMHW_BEQEN; + else + acmctrl &= (~ACMHW_BEQEN); + + rtw_write8(padapter, REG_ACMHWCTRL, acmctrl); + } else { padapter->mlmepriv.acm_mask = acm_mask; + } inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3; diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 26a86b891aa1..86d8b603d4fa 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -1143,32 +1143,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) haldata->AcParam_BE = ((u32 *)(val))[0]; rtw_write32(Adapter, REG_EDCA_BE_PARAM, ((u32 *)(val))[0]); break; - case HW_VAR_ACM_CTRL: - { - u8 acm_ctrl = *((u8 *)val); - u8 AcmCtrl = rtw_read8(Adapter, REG_ACMHWCTRL); - - if (acm_ctrl > 1) - AcmCtrl = AcmCtrl | 0x1; - - if (acm_ctrl & BIT(3)) - AcmCtrl |= ACMHW_VOQEN; - else - AcmCtrl &= (~ACMHW_VOQEN); - - if (acm_ctrl & BIT(2)) - AcmCtrl |= ACMHW_VIQEN; - else - AcmCtrl &= (~ACMHW_VIQEN); - - if (acm_ctrl & BIT(1)) - AcmCtrl |= ACMHW_BEQEN; - else - AcmCtrl &= (~ACMHW_BEQEN); - - rtw_write8(Adapter, REG_ACMHWCTRL, AcmCtrl); - } - break; case HW_VAR_AMPDU_MIN_SPACE: { u8 MinSpacingToSet; diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h index a2c5724790f6..d0317f5b85ba 100644 --- a/drivers/staging/r8188eu/include/hal_intf.h +++ b/drivers/staging/r8188eu/include/hal_intf.h @@ -23,7 +23,6 @@ enum hw_variables { HW_VAR_DM_FUNC_SET, HW_VAR_DM_FUNC_CLR, HW_VAR_AC_PARAM_BE, - HW_VAR_ACM_CTRL, HW_VAR_AMPDU_MIN_SPACE, HW_VAR_AMPDU_FACTOR, HW_VAR_RXDMA_AGG_PG_TH, -- 2.35.1