Skip to content

Commit 790d384

Browse files
Philipp Hortmanngregkh
authored andcommitted
staging: rtl8723bs: Remove unused function Hal_EfusePgPacketRead
Remove unused function pointer Efuse_PgPacketRead and unused function Hal_EfusePgPacketRead. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/920a7fdca106fc21e845f9ceba3f38bcfa9fa547.1730916582.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0452ce8 commit 790d384

File tree

2 files changed

+0
-74
lines changed

2 files changed

+0
-74
lines changed

drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,78 +1151,6 @@ static u8 Hal_EfuseWordEnableDataWrite(
11511151
return badworden;
11521152
}
11531153

1154-
static s32 Hal_EfusePgPacketRead(
1155-
struct adapter *padapter,
1156-
u8 offset,
1157-
u8 *data,
1158-
bool bPseudoTest
1159-
)
1160-
{
1161-
u8 efuse_data, word_cnts = 0;
1162-
u16 efuse_addr = 0;
1163-
u8 hoffset = 0, hworden = 0;
1164-
u8 i;
1165-
u8 max_section = 0;
1166-
s32 ret;
1167-
1168-
1169-
if (!data)
1170-
return false;
1171-
1172-
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAX_SECTION, &max_section, bPseudoTest);
1173-
if (offset > max_section)
1174-
return false;
1175-
1176-
memset(data, 0xFF, PGPKT_DATA_SIZE);
1177-
ret = true;
1178-
1179-
/* */
1180-
/* <Roger_TODO> Efuse has been pre-programmed dummy 5Bytes at the end of Efuse by CP. */
1181-
/* Skip dummy parts to prevent unexpected data read from Efuse. */
1182-
/* By pass right now. 2009.02.19. */
1183-
/* */
1184-
while (AVAILABLE_EFUSE_ADDR(efuse_addr)) {
1185-
if (efuse_OneByteRead(padapter, efuse_addr++, &efuse_data, bPseudoTest) == false) {
1186-
ret = false;
1187-
break;
1188-
}
1189-
1190-
if (efuse_data == 0xFF)
1191-
break;
1192-
1193-
if (EXT_HEADER(efuse_data)) {
1194-
hoffset = GET_HDR_OFFSET_2_0(efuse_data);
1195-
efuse_OneByteRead(padapter, efuse_addr++, &efuse_data, bPseudoTest);
1196-
if (ALL_WORDS_DISABLED(efuse_data))
1197-
continue;
1198-
1199-
hoffset |= ((efuse_data & 0xF0) >> 1);
1200-
hworden = efuse_data & 0x0F;
1201-
} else {
1202-
hoffset = (efuse_data>>4) & 0x0F;
1203-
hworden = efuse_data & 0x0F;
1204-
}
1205-
1206-
if (hoffset == offset) {
1207-
for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) {
1208-
/* Check word enable condition in the section */
1209-
if (!(hworden & (0x01<<i))) {
1210-
efuse_OneByteRead(padapter, efuse_addr++, &efuse_data, bPseudoTest);
1211-
data[i*2] = efuse_data;
1212-
1213-
efuse_OneByteRead(padapter, efuse_addr++, &efuse_data, bPseudoTest);
1214-
data[(i*2)+1] = efuse_data;
1215-
}
1216-
}
1217-
} else {
1218-
word_cnts = Efuse_CalculateWordCnts(hworden);
1219-
efuse_addr += word_cnts*2;
1220-
}
1221-
}
1222-
1223-
return ret;
1224-
}
1225-
12261154
static u8 hal_EfusePgCheckAvailableAddr(
12271155
struct adapter *padapter, u8 efuseType, u8 bPseudoTest
12281156
)
@@ -1745,7 +1673,6 @@ void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level)
17451673
void rtl8723b_set_hal_ops(struct hal_ops *pHalFunc)
17461674
{
17471675
/* Efuse related function */
1748-
pHalFunc->Efuse_PgPacketRead = &Hal_EfusePgPacketRead;
17491676
pHalFunc->Efuse_PgPacketWrite = &Hal_EfusePgPacketWrite;
17501677
pHalFunc->Efuse_WordEnableDataWrite = &Hal_EfuseWordEnableDataWrite;
17511678
pHalFunc->Efuse_PgPacketWrite_BT = &Hal_EfusePgPacketWrite_BT;

drivers/staging/rtl8723bs/include/hal_intf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ typedef s32 (*c2h_id_filter)(u8 *c2h_evt);
164164
struct hal_ops {
165165
void (*SetHalODMVarHandler)(struct adapter *padapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet);
166166

167-
int (*Efuse_PgPacketRead)(struct adapter *padapter, u8 offset, u8 *data, bool bPseudoTest);
168167
int (*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest);
169168
u8 (*Efuse_WordEnableDataWrite)(struct adapter *padapter, u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest);
170169
bool (*Efuse_PgPacketWrite_BT)(struct adapter *padapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest);

0 commit comments

Comments
 (0)