mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 15:49:42 -04:00
staging: r8188eu: remove HW_VAR_FIFO_CLEARN_UP
Remove the HW_VAR_FIFO_CLEARN_UP case from SetHwReg8188EU() and move its functionality to a new static function in os_intfs.c. This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220409120627.10633-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
26209855c3
commit
7c05493bcf
@@ -1116,32 +1116,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
|
||||
rtl8188e_set_FwPwrMode_cmd(Adapter, psmode);
|
||||
}
|
||||
break;
|
||||
case HW_VAR_FIFO_CLEARN_UP:
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = &Adapter->pwrctrlpriv;
|
||||
u8 trycnt = 100;
|
||||
|
||||
/* pause tx */
|
||||
rtw_write8(Adapter, REG_TXPAUSE, 0xff);
|
||||
|
||||
/* keep sn */
|
||||
Adapter->xmitpriv.nqos_ssn = rtw_read16(Adapter, REG_NQOS_SEQ);
|
||||
|
||||
if (!pwrpriv->bkeepfwalive) {
|
||||
/* RX DMA stop */
|
||||
rtw_write32(Adapter, REG_RXPKT_NUM, (rtw_read32(Adapter, REG_RXPKT_NUM) | RW_RELEASE_EN));
|
||||
do {
|
||||
if (!(rtw_read32(Adapter, REG_RXPKT_NUM) & RXDMA_IDLE))
|
||||
break;
|
||||
} while (trycnt--);
|
||||
|
||||
/* RQPN Load 0 */
|
||||
rtw_write16(Adapter, REG_RQPN_NPQ, 0x0);
|
||||
rtw_write32(Adapter, REG_RQPN, 0x80000000);
|
||||
mdelay(10);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HW_VAR_H2C_MEDIA_STATUS_RPT:
|
||||
rtl8188e_set_FwMediaStatus_cmd(Adapter, (*(__le16 *)val));
|
||||
break;
|
||||
|
||||
@@ -21,7 +21,6 @@ enum hw_variables {
|
||||
HW_VAR_AC_PARAM_BE,
|
||||
HW_VAR_AMPDU_FACTOR,
|
||||
HW_VAR_H2C_FW_PWRMODE,
|
||||
HW_VAR_FIFO_CLEARN_UP,
|
||||
HW_VAR_H2C_MEDIA_STATUS_RPT,
|
||||
};
|
||||
|
||||
|
||||
@@ -736,9 +736,36 @@ void rtw_ips_pwr_down(struct adapter *padapter)
|
||||
padapter->bCardDisableWOHSM = false;
|
||||
}
|
||||
|
||||
static void rtw_fifo_cleanup(struct adapter *adapter)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = &adapter->pwrctrlpriv;
|
||||
u8 trycnt = 100;
|
||||
|
||||
/* pause tx */
|
||||
rtw_write8(adapter, REG_TXPAUSE, 0xff);
|
||||
|
||||
/* keep sn */
|
||||
adapter->xmitpriv.nqos_ssn = rtw_read16(adapter, REG_NQOS_SEQ);
|
||||
|
||||
if (!pwrpriv->bkeepfwalive) {
|
||||
/* RX DMA stop */
|
||||
rtw_write32(adapter, REG_RXPKT_NUM,
|
||||
(rtw_read32(adapter, REG_RXPKT_NUM) | RW_RELEASE_EN));
|
||||
do {
|
||||
if (!(rtw_read32(adapter, REG_RXPKT_NUM) & RXDMA_IDLE))
|
||||
break;
|
||||
} while (trycnt--);
|
||||
|
||||
/* RQPN Load 0 */
|
||||
rtw_write16(adapter, REG_RQPN_NPQ, 0x0);
|
||||
rtw_write32(adapter, REG_RQPN, 0x80000000);
|
||||
mdelay(10);
|
||||
}
|
||||
}
|
||||
|
||||
void rtw_ips_dev_unload(struct adapter *padapter)
|
||||
{
|
||||
SetHwReg8188EU(padapter, HW_VAR_FIFO_CLEARN_UP, NULL);
|
||||
rtw_fifo_cleanup(padapter);
|
||||
|
||||
if (padapter->intf_stop)
|
||||
padapter->intf_stop(padapter);
|
||||
|
||||
Reference in New Issue
Block a user