From: Michael Straube Date: Wed, 22 Sep 2021 20:03:39 +0000 (+0200) Subject: staging: r8188eu: remove rtw_efuse_map_write() X-Git-Tag: v6.6.17~8914^2~292 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61f5e31a0da3d20c7ad95b18a859a7a6ee9bd4d1;p=platform%2Fkernel%2Flinux-rpi.git staging: r8188eu: remove rtw_efuse_map_write() Function rtw_efuse_map_write() is not used, remove it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20210922200420.9693-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c index 893287e5..a55e486 100644 --- a/drivers/staging/r8188eu/core/rtw_efuse.c +++ b/drivers/staging/r8188eu/core/rtw_efuse.c @@ -262,97 +262,6 @@ u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) return _SUCCESS; } -u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) -{ - u8 offset, word_en; - u8 *map; - u8 newdata[PGPKT_DATA_SIZE + 1]; - s32 i, idx; - u8 ret = _SUCCESS; - u16 mapLen = 0; - - rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false); - - if ((addr + cnts) > mapLen) - return _FAIL; - - map = kzalloc(mapLen, GFP_KERNEL); - if (!map) - return _FAIL; - - ret = rtw_efuse_map_read(padapter, 0, mapLen, map); - if (ret == _FAIL) - goto exit; - - rtl8188e_EfusePowerSwitch(padapter, true, true); - - offset = (addr >> 3); - word_en = 0xF; - memset(newdata, 0xFF, PGPKT_DATA_SIZE + 1); - i = addr & 0x7; /* index of one package */ - idx = 0; /* data index */ - - if (i & 0x1) { - /* odd start */ - if (data[idx] != map[addr + idx]) { - word_en &= ~BIT(i >> 1); - newdata[i - 1] = map[addr + idx - 1]; - newdata[i] = data[idx]; - } - i++; - idx++; - } - do { - for (; i < PGPKT_DATA_SIZE; i += 2) { - if (cnts == idx) - break; - if ((cnts - idx) == 1) { - if (data[idx] != map[addr + idx]) { - word_en &= ~BIT(i >> 1); - newdata[i] = data[idx]; - newdata[i + 1] = map[addr + idx + 1]; - } - idx++; - break; - } else { - if ((data[idx] != map[addr + idx]) || - (data[idx + 1] != map[addr + idx + 1])) { - word_en &= ~BIT(i >> 1); - newdata[i] = data[idx]; - newdata[i + 1] = data[idx + 1]; - } - idx += 2; - } - if (idx == cnts) - break; - } - - if (word_en != 0xF) { - ret = rtl8188e_Efuse_PgPacketWrite(padapter, offset, word_en, newdata, false); - DBG_88E("offset=%x\n", offset); - DBG_88E("word_en=%x\n", word_en); - - for (i = 0; i < PGPKT_DATA_SIZE; i++) - DBG_88E("data=%x \t", newdata[i]); - if (ret == _FAIL) - break; - } - - if (idx == cnts) - break; - - offset++; - i = 0; - word_en = 0xF; - memset(newdata, 0xFF, PGPKT_DATA_SIZE); - } while (1); - - rtl8188e_EfusePowerSwitch(padapter, true, false); -exit: - kfree(map); - return ret; -} - /*----------------------------------------------------------------------------- * Function: Efuse_ReadAllMap * diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h index f0236a89..c7ce639 100644 --- a/drivers/staging/r8188eu/include/rtw_efuse.h +++ b/drivers/staging/r8188eu/include/rtw_efuse.h @@ -102,7 +102,6 @@ extern u8 fakeBTEfuseModifiedMap[]; /*------------------------Export global variable----------------------------*/ u8 rtw_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data); -u8 rtw_efuse_map_write(struct adapter *adapter, u16 addr, u16 cnts, u8 *data); u8 rtw_BT_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data); u8 Efuse_CalculateWordCnts(u8 word_en);