Remove duplicate names for rtw_read[n] and rtw_write[n]

rtw_read[n]() is redefined as _rtw_read[n]() and PlatformEFIORead[n]Byte
Same for rtw_write[n]() furntions

Link: https://lore.kernel.org/r/9880c86c2aad7d95a714d8b03b28b83634f98c1e.1621361919.git-series.hello@bryanbrattlof.com
Link: https://lore.kernel.org/r/11458342572f21d9df58b3969ad1f16fdff157f4.1621361919.git-series.hello@bryanbrattlof.com
Link: https://lore.kernel.org/r/15956707341f76de683245c392063b8121a805ea.1621361919.git-series.hello@bryanbrattlof.com
Link: https://lore.kernel.org/r/35ffc9cd5af7009b317361033a6ca5263307d61a.1621361919.git-series.hello@bryanbrattlof.com
Link: https://lore.kernel.org/r/7d53fb295f67f01c72640045afb88150391bce35.1621361919.git-series.hello@bryanbrattlof.com
Link: https://lore.kernel.org/r/43917aee34e85139e613578cf6f14938211c8835.1621361919.git-series.hello@bryanbrattlof.com

Port of
51d4aa6d6bf35d85d318831df60a34bad27cdb9e
8ff74e4307b42302c89023faf8fd37dbde4c4666
16b1b3c8221a40bf899dfeebdb3d5245ecb65515
7f06caf9a40bb3c08fe86c8355ace25b7ce69ba9
1c42d72e4747fb546eba53821ae56ecf827202a7
4d6bfc6f62705ec5baee9c572d4ca03bc9e36c00
This commit is contained in:
Carlos Garces
2021-10-23 11:09:24 +02:00
parent 99c0f78547
commit 97bac22d5b
10 changed files with 79 additions and 219 deletions

View File

@@ -170,64 +170,64 @@ _InitBurstPktLen_8192EU(IN PADAPTER Adapter)
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
/* PlatformEFIOWrite2Byte(Adapter, REG_TRXDMA_CTRL_8195, 0xf5b0); */
/* PlatformEFIOWrite2Byte(Adapter, REG_TRXDMA_CTRL_8812, 0xf5b4); */
PlatformEFIOWrite2Byte(Adapter, REG_RXDMA_STATUS_8192E, 0x7400); /* burset lenght=4, set 0x3400 for burset length=2 */
PlatformEFIOWrite1Byte(Adapter, 0x289, 0xf5); /* for rxdma control */
/* PlatformEFIOWrite1Byte(Adapter, 0x3a, 0x46); */
/* rtw_write16(Adapter, REG_TRXDMA_CTRL_8195, 0xf5b0); */
/* rtw_write16(Adapter, REG_TRXDMA_CTRL_8812, 0xf5b4); */
rtw_write16(Adapter, REG_RXDMA_STATUS_8192E, 0x7400); /* burset lenght=4, set 0x3400 for burset length=2 */
rtw_write8(Adapter, 0x289, 0xf5); /* for rxdma control */
/* rtw_write8(Adapter, 0x3a, 0x46); */
/* 0x456 = 0x70, sugguested by Zhilin */
/* PlatformEFIOWrite1Byte(Adapter, REG_AMPDU_MAX_TIME_8192E, 0x70); */
/* rtw_write8(Adapter, REG_AMPDU_MAX_TIME_8192E, 0x70); */
/* Suggention by SD1 Jong and Pisa, by Maddest 20130107. */
PlatformEFIOWrite2Byte(Adapter, REG_MAX_AGGR_NUM_8192E, 0x0e0e);
PlatformEFIOWrite1Byte(Adapter, REG_FWHW_TXQ_CTRL_8192E, 0x80);/* EN_AMPDU_RTY_NEW */
PlatformEFIOWrite1Byte(Adapter, REG_AMPDU_MAX_TIME_8192E, 0x5e);
PlatformEFIOWrite4Byte(Adapter, REG_FAST_EDCA_CTRL_8192E, 0x03087777);
rtw_write16(Adapter, REG_MAX_AGGR_NUM_8192E, 0x0e0e);
rtw_write8(Adapter, REG_FWHW_TXQ_CTRL_8192E, 0x80);/* EN_AMPDU_RTY_NEW */
rtw_write8(Adapter, REG_AMPDU_MAX_TIME_8192E, 0x5e);
rtw_write32(Adapter, REG_FAST_EDCA_CTRL_8192E, 0x03087777);
/* PlatformEFIOWrite4Byte(Adapter, 0x458, 0xffffffff); */
PlatformEFIOWrite1Byte(Adapter, REG_USTIME_TSF_8192E, 0x50);
PlatformEFIOWrite1Byte(Adapter, REG_USTIME_EDCA_8192E, 0x50);
/* rtw_write32(Adapter, 0x458, 0xffffffff); */
rtw_write8(Adapter, REG_USTIME_TSF_8192E, 0x50);
rtw_write8(Adapter, REG_USTIME_EDCA_8192E, 0x50);
if (IS_HARDWARE_TYPE_8821U(Adapter) || IS_HARDWARE_TYPE_8192EU(Adapter))
speedvalue = BIT7;
else
speedvalue = PlatformEFIORead1Byte(Adapter, 0xff); /* check device operation speed: SS 0xff bit7 */
speedvalue = rtw_read8(Adapter, 0xff); /* check device operation speed: SS 0xff bit7 */
if (speedvalue & BIT7) { /* USB2/1.1 Mode */
temp = PlatformEFIORead1Byte(Adapter, REG_USB_INFO);
temp = rtw_read8(Adapter, REG_USB_INFO);
if (((temp >> 4) & 0x03) == 0) {
/* pHalData->UsbBulkOutSize = 512; */
provalue = PlatformEFIORead1Byte(Adapter, REG_RXDMA_PRO_8192E);
PlatformEFIOWrite1Byte(Adapter, REG_RXDMA_PRO_8192E, (provalue | BIT(4) & (~BIT(5)))); /* set burst pkt len=512B */
PlatformEFIOWrite2Byte(Adapter, REG_RXDMA_PRO_8192E, 0x1e);
provalue = rtw_read8(Adapter, REG_RXDMA_PRO_8192E);
rtw_write8(Adapter, REG_RXDMA_PRO_8192E, (provalue | BIT(4) & (~BIT(5)))); /* set burst pkt len=512B */
rtw_write16(Adapter, REG_RXDMA_PRO_8192E, 0x1e);
} else {
/* pHalData->UsbBulkOutSize = 64; */
provalue = PlatformEFIORead1Byte(Adapter, REG_RXDMA_PRO_8192E);
PlatformEFIOWrite1Byte(Adapter, REG_RXDMA_PRO_8192E, ((provalue | BIT(5)) & (~BIT(4)))); /* set burst pkt len=64B */
provalue = rtw_read8(Adapter, REG_RXDMA_PRO_8192E);
rtw_write8(Adapter, REG_RXDMA_PRO_8192E, ((provalue | BIT(5)) & (~BIT(4)))); /* set burst pkt len=64B */
}
PlatformEFIOWrite2Byte(Adapter, REG_RXDMA_AGG_PG_TH_8192E, 0x2005); /* dmc agg th 20K */
rtw_write16(Adapter, REG_RXDMA_AGG_PG_TH_8192E, 0x2005); /* dmc agg th 20K */
pHalData->bSupportUSB3 = FALSE;
}
PlatformEFIOWrite1Byte(Adapter, REG_DWBCN0_CTRL_8192E, 0x10);
rtw_write8(Adapter, REG_DWBCN0_CTRL_8192E, 0x10);
PlatformEFIOWrite1Byte(Adapter, 0x4c7, PlatformEFIORead1Byte(Adapter, 0x4c7) | BIT(7)); /* enable single pkt ampdu */
PlatformEFIOWrite1Byte(Adapter, REG_RX_PKT_LIMIT_8192E, 0x18); /* for VHT packet length 11K */
rtw_write8(Adapter, 0x4c7, rtw_read8(Adapter, 0x4c7) | BIT(7)); /* enable single pkt ampdu */
rtw_write8(Adapter, REG_RX_PKT_LIMIT_8192E, 0x18); /* for VHT packet length 11K */
/* PlatformEFIOWrite1Byte(Adapter, REG_MAX_AGGR_NUM_8192E, 0x1f); */
PlatformEFIOWrite1Byte(Adapter, REG_PIFS_8192E, 0x00);
/* PlatformEFIOWrite1Byte(Adapter, REG_FWHW_TXQ_CTRL_8192E, PlatformEFIORead1Byte(Adapter, REG_FWHW_TXQ_CTRL)&(~BIT(7))); */
/* rtw_write8(Adapter, REG_MAX_AGGR_NUM_8192E, 0x1f); */
rtw_write8(Adapter, REG_PIFS_8192E, 0x00);
/* rtw_write8(Adapter, REG_FWHW_TXQ_CTRL_8192E, rtw_read8(Adapter, REG_FWHW_TXQ_CTRL)&(~BIT(7))); */
#ifdef CONFIG_TX_EARLY_MODE
if (pHalData->AMPDUBurstMode)
PlatformEFIOWrite1Byte(Adapter, REG_SW_AMPDU_BURST_MODE_CTRL_8192E, 0x5F);
rtw_write8(Adapter, REG_SW_AMPDU_BURST_MODE_CTRL_8192E, 0x5F);
#endif
PlatformEFIOWrite1Byte(Adapter, 0x1c, PlatformEFIORead1Byte(Adapter, 0x1c) | BIT(5) | BIT(6)); /* to prevent mac is reseted by bus. 20111208, by Page */
rtw_write8(Adapter, 0x1c, rtw_read8(Adapter, 0x1c) | BIT(5) | BIT(6)); /* to prevent mac is reseted by bus. 20111208, by Page */
#endif
}
@@ -255,8 +255,8 @@ static u32 _InitPowerOn_8192EU(_adapter *padapter)
/* 0x14[23:20]=b<><62>0101 (raise 1.2V voltage)
u1Byte tmp1Byte = PlatformEFIORead1Byte(Adapter,0x16);
PlatformEFIOWrite1Byte(Adapter,0x16,tmp1Byte |BIT4|BIT6); */
u1Byte tmp1Byte = rtw_read8(Adapter,0x16);
rtw_write8(Adapter,0x16,tmp1Byte |BIT4|BIT6); */
u32 voltage = rtw_read32(padapter , REG_SYS_SWR_CTRL2_8192E);
if (((voltage & 0x00F00000) >> 20) == 0x4) {
@@ -1106,10 +1106,10 @@ u32 rtl8192eu_hal_init(PADAPTER Adapter)
#endif /* CONFIG_XMIT_ACK */
/* Fixed LDPC rx hang issue. */
{
u4Byte tmp4Byte = PlatformEFIORead4Byte(Adapter, REG_SYS_SWR_CTRL1_8192E);
PlatformEFIOWrite1Byte(Adapter, REG_SYS_SWR_CTRL2_8192E, 0x75);
u4Byte tmp4Byte = rtw_read32(Adapter, REG_SYS_SWR_CTRL1_8192E);
rtw_write8(Adapter, REG_SYS_SWR_CTRL2_8192E, 0x75);
tmp4Byte = (tmp4Byte & 0xfff00fff) | (0x7E << 12);
PlatformEFIOWrite4Byte(Adapter, REG_SYS_SWR_CTRL1_8192E, tmp4Byte);
rtw_write32(Adapter, REG_SYS_SWR_CTRL1_8192E, tmp4Byte);
}
exit: