linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/47] staging: r8188eu: remove unused functions
@ 2021-09-22 20:03 Michael Straube
  2021-09-22 20:03 ` [PATCH 01/47] staging: r8188eu: remove EFUSE_ShadowRead() Michael Straube
                   ` (46 more replies)
  0 siblings, 47 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

This series removes a bunch of unused functions and one unused enum.

Tested on x86_64 with Inter-Tech DMG-02.

Michael Straube (47):
  staging: r8188eu: remove EFUSE_ShadowRead()
  staging: r8188eu: remove efuse_GetCurrentSize()
  staging: r8188eu: remove efuse_GetMaxSize()
  staging: r8188eu: remove rtw_BT_efuse_map_write()
  staging: r8188eu: remove rtw_efuse_access()
  staging: r8188eu: remove rtw_efuse_map_write()
  staging: r8188eu: remove rtw_BT_efuse_map_read()
  staging: r8188eu: remove rtw_efuse_map_read()
  staging: r8188eu: remove _rtw_dequeue_network()
  staging: r8188eu: remove _rtw_enqueue_network()
  staging: r8188eu: remove rtw_get_timestampe_from_ie()
  staging: r8188eu: remove rtw_scan_abort()
  staging: r8188eu: remove issue_action_spct_ch_switch()
  staging: r8188eu: remove issue_probereq_p2p_ex()
  staging: r8188eu: remove sreset_get_wifi_status()
  staging: r8188eu: remove build_deauth_p2p_ie()
  staging: r8188eu: remove rtw_freq2ch()
  staging: r8188eu: remove rtw_set_802_11_add_key()
  staging: r8188eu: remove rtw_set_802_11_remove_key()
  staging: r8188eu: remove rtw_set_802_11_remove_wep()
  staging: r8188eu: remove rtw_set_country()
  staging: r8188eu: remove rtw_set_scan_mode()
  staging: r8188eu: remove rtw_validate_ssid()
  staging: r8188eu: remove rtw_set_channel_plan()
  staging: r8188eu: remove rtw_atoi()
  staging: r8188eu: remove rtw_cbuf_push()
  staging: r8188eu: remove rtw_cbuf_full()
  staging: r8188eu: remove rtw_os_read_port()
  staging: r8188eu: remove rtw_IOL_cmd_buf_dump()
  staging: r8188eu: remove action_public_str()
  staging: r8188eu: remove dump_ies()
  staging: r8188eu: remove hal_ch_offset_to_secondary_ch_offset()
  staging: r8188eu: remove secondary_ch_offset_to_hal_ch_offset()
  staging: r8188eu: remove ieee80211_get_hdrlen()
  staging: r8188eu: remove ieee80211_is_empty_essid()
  staging: r8188eu: remove rtw_action_frame_parse()
  staging: r8188eu: remove rtw_ies_remove_ie()
  staging: r8188eu: remove rtw_set_ie_ch_switch()
  staging: r8188eu: remove rtw_set_ie_mesh_ch_switch_parm()
  staging: r8188eu: remove rtw_set_ie_secondary_ch_offset()
  staging: r8188eu: remove enum secondary_ch_offset
  staging: r8188eu: remove rtw_dequeue_recvbuf()
  staging: r8188eu: remove rtw_enqueue_recvbuf()
  staging: r8188eu: remove rtw_enqueue_recvbuf_to_head()
  staging: r8188eu: remove rtw_init_recvframe()
  staging: r8188eu: remove rtw_calculate_wlan_pkt_size_by_attribue()
  staging: r8188eu: remove rtw_sctx_done()

 drivers/staging/r8188eu/core/rtw_efuse.c      | 377 ------------------
 drivers/staging/r8188eu/core/rtw_ieee80211.c  | 301 --------------
 drivers/staging/r8188eu/core/rtw_ioctl_set.c  | 374 -----------------
 drivers/staging/r8188eu/core/rtw_iol.c        |  17 -
 drivers/staging/r8188eu/core/rtw_mlme.c       |  64 ---
 drivers/staging/r8188eu/core/rtw_mlme_ext.c   |  96 -----
 drivers/staging/r8188eu/core/rtw_p2p.c        |   7 -
 drivers/staging/r8188eu/core/rtw_recv.c       |  58 ---
 drivers/staging/r8188eu/core/rtw_rf.c         |  17 -
 drivers/staging/r8188eu/core/rtw_sreset.c     |  30 --
 drivers/staging/r8188eu/core/rtw_xmit.c       |  23 --
 drivers/staging/r8188eu/include/ieee80211.h   |  31 --
 .../staging/r8188eu/include/osdep_service.h   |   4 -
 drivers/staging/r8188eu/include/recv_osdep.h  |   2 -
 drivers/staging/r8188eu/include/rtw_efuse.h   |  11 -
 .../staging/r8188eu/include/rtw_ioctl_set.h   |   8 -
 drivers/staging/r8188eu/include/rtw_iol.h     |   1 -
 drivers/staging/r8188eu/include/rtw_mlme.h    |   6 -
 .../staging/r8188eu/include/rtw_mlme_ext.h    |   4 -
 drivers/staging/r8188eu/include/rtw_p2p.h     |   1 -
 drivers/staging/r8188eu/include/rtw_recv.h    |   5 -
 drivers/staging/r8188eu/include/rtw_rf.h      |   1 -
 drivers/staging/r8188eu/include/rtw_sreset.h  |   1 -
 drivers/staging/r8188eu/include/rtw_xmit.h    |   3 -
 .../staging/r8188eu/os_dep/osdep_service.c    |  49 ---
 drivers/staging/r8188eu/os_dep/recv_linux.c   |  14 -
 26 files changed, 1505 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 48+ messages in thread

* [PATCH 01/47] staging: r8188eu: remove EFUSE_ShadowRead()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 02/47] staging: r8188eu: remove efuse_GetCurrentSize() Michael Straube
                   ` (45 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function EFUSE_ShadowRead() is not used, remove it. It is the only
user of the functions efuse_ShadowRead{1,2,4}Byte, remove these as
well.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c    | 87 ---------------------
 drivers/staging/r8188eu/include/rtw_efuse.h |  1 -
 2 files changed, 88 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 801887f497cf..958954473d9b 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -516,66 +516,6 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
 	return ret;
 }
 
-/*-----------------------------------------------------------------------------
- * Function:	efuse_ShadowRead1Byte
- *			efuse_ShadowRead2Byte
- *			efuse_ShadowRead4Byte
- *
- * Overview:	Read from efuse init map by one/two/four bytes !!!!!
- *
- * Input:       NONE
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- * When			Who		Remark
- * 11/12/2008	MHC		Create Version 0.
- *
- *---------------------------------------------------------------------------*/
-static void
-efuse_ShadowRead1Byte(
-		struct adapter *pAdapter,
-		u16 Offset,
-		u8 *Value)
-{
-	struct eeprom_priv *pEEPROM = &pAdapter->eeprompriv;
-
-	*Value = pEEPROM->efuse_eeprom_data[Offset];
-
-}	/*  EFUSE_ShadowRead1Byte */
-
-/* Read Two Bytes */
-static void
-efuse_ShadowRead2Byte(
-		struct adapter *pAdapter,
-		u16 Offset,
-		u16 *Value)
-{
-	struct eeprom_priv *pEEPROM = &pAdapter->eeprompriv;
-
-	*Value = pEEPROM->efuse_eeprom_data[Offset];
-	*Value |= pEEPROM->efuse_eeprom_data[Offset + 1] << 8;
-
-}	/*  EFUSE_ShadowRead2Byte */
-
-/* Read Four Bytes */
-static void
-efuse_ShadowRead4Byte(
-		struct adapter *pAdapter,
-		u16 Offset,
-		u32 *Value)
-{
-	struct eeprom_priv *pEEPROM = &pAdapter->eeprompriv;
-
-	*Value = pEEPROM->efuse_eeprom_data[Offset];
-	*Value |= pEEPROM->efuse_eeprom_data[Offset + 1] << 8;
-	*Value |= pEEPROM->efuse_eeprom_data[Offset + 2] << 16;
-	*Value |= pEEPROM->efuse_eeprom_data[Offset + 3] << 24;
-
-}	/*  efuse_ShadowRead4Byte */
-
 /*-----------------------------------------------------------------------------
  * Function:	Efuse_ReadAllMap
  *
@@ -636,30 +576,3 @@ void EFUSE_ShadowMapUpdate(
 	else
 		Efuse_ReadAllMap(pAdapter, efuseType, pEEPROM->efuse_eeprom_data, pseudo);
 } /*  EFUSE_ShadowMapUpdate */
-
-/*-----------------------------------------------------------------------------
- * Function:	EFUSE_ShadowRead
- *
- * Overview:	Read from efuse init map !!!!!
- *
- * Input:       NONE
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- * When			Who		Remark
- * 11/12/2008	MHC		Create Version 0.
- *
- *---------------------------------------------------------------------------*/
-void EFUSE_ShadowRead(struct adapter *pAdapter, u8 Type, u16 Offset, u32 *Value)
-{
-	if (Type == 1)
-		efuse_ShadowRead1Byte(pAdapter, Offset, (u8 *)Value);
-	else if (Type == 2)
-		efuse_ShadowRead2Byte(pAdapter, Offset, (u16 *)Value);
-	else if (Type == 4)
-		efuse_ShadowRead4Byte(pAdapter, Offset, (u32 *)Value);
-
-}	/*  EFUSE_ShadowRead */
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index 53ac906f79fd..81407efbdc44 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -119,6 +119,5 @@ u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool	test);
 void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata);
 
 void EFUSE_ShadowMapUpdate(struct adapter *adapter, u8 efusetype, bool test);
-void EFUSE_ShadowRead(struct adapter *adapt, u8 type, u16 offset, u32 *val);
 
 #endif
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 02/47] staging: r8188eu: remove efuse_GetCurrentSize()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
  2021-09-22 20:03 ` [PATCH 01/47] staging: r8188eu: remove EFUSE_ShadowRead() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 03/47] staging: r8188eu: remove efuse_GetMaxSize() Michael Straube
                   ` (44 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function efuse_GetCurrentSize() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c    | 9 ---------
 drivers/staging/r8188eu/include/rtw_efuse.h | 1 -
 2 files changed, 10 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 958954473d9b..cb4ad21f00c1 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -286,15 +286,6 @@ u16 efuse_GetMaxSize(struct adapter *padapter)
 	return max_size;
 }
 
-u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)
-{
-	rtl8188e_EfusePowerSwitch(padapter, false, true);
-	*size = rtl8188e_EfuseGetCurrentSize(padapter, EFUSE_WIFI, false);
-	rtl8188e_EfusePowerSwitch(padapter, false, false);
-
-	return _SUCCESS;
-}
-
 u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 {
 	u16 mapLen = 0;
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index 81407efbdc44..a6e36be6ee76 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -101,7 +101,6 @@ extern u8 fakeBTEfuseInitMap[];
 extern u8 fakeBTEfuseModifiedMap[];
 /*------------------------Export global variable----------------------------*/
 
-u8 efuse_GetCurrentSize(struct adapter *adapter, u16 *size);
 u16 efuse_GetMaxSize(struct adapter *adapter);
 u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr,
 		    u16 cnts, u8 *data);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 03/47] staging: r8188eu: remove efuse_GetMaxSize()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
  2021-09-22 20:03 ` [PATCH 01/47] staging: r8188eu: remove EFUSE_ShadowRead() Michael Straube
  2021-09-22 20:03 ` [PATCH 02/47] staging: r8188eu: remove efuse_GetCurrentSize() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 04/47] staging: r8188eu: remove rtw_BT_efuse_map_write() Michael Straube
                   ` (43 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function efuse_GetMaxSize is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c    | 7 -------
 drivers/staging/r8188eu/include/rtw_efuse.h | 1 -
 2 files changed, 8 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index cb4ad21f00c1..ef7a50d31c01 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -279,13 +279,6 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts
 	return res;
 }
 
-u16 efuse_GetMaxSize(struct adapter *padapter)
-{
-	u16 max_size;
-	rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, false);
-	return max_size;
-}
-
 u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 {
 	u16 mapLen = 0;
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index a6e36be6ee76..de98b732fce0 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -101,7 +101,6 @@ extern u8 fakeBTEfuseInitMap[];
 extern u8 fakeBTEfuseModifiedMap[];
 /*------------------------Export global variable----------------------------*/
 
-u16 efuse_GetMaxSize(struct adapter *adapter);
 u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr,
 		    u16 cnts, u8 *data);
 u8 rtw_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 04/47] staging: r8188eu: remove rtw_BT_efuse_map_write()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (2 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 03/47] staging: r8188eu: remove efuse_GetMaxSize() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 05/47] staging: r8188eu: remove rtw_efuse_access() Michael Straube
                   ` (42 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_BT_efuse_map_write() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c    | 94 ---------------------
 drivers/staging/r8188eu/include/rtw_efuse.h |  2 -
 2 files changed, 96 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index ef7a50d31c01..010740d035ea 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -406,100 +406,6 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 	return ret;
 }
 
-u8 rtw_BT_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_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
-
-	if ((addr + cnts) > mapLen)
-		return _FAIL;
-
-	map = kzalloc(mapLen, GFP_KERNEL);
-	if (!map)
-		return _FAIL;
-
-	ret = rtw_BT_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) {
-			DBG_88E("%s: offset=%#X\n", __func__, offset);
-			DBG_88E("%s: word_en=%#X\n", __func__, word_en);
-			DBG_88E("%s: data=", __func__);
-			for (i = 0; i < PGPKT_DATA_SIZE; i++)
-				DBG_88E("0x%02X ", newdata[i]);
-			DBG_88E("\n");
-
-			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 de98b732fce0..02cbadb2ec2b 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -107,8 +107,6 @@ 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 rtw_BT_efuse_map_write(struct adapter *adapter, u16 addr,
-			  u16 cnts, u8 *data);
 u8 Efuse_CalculateWordCnts(u8 word_en);
 void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
 u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 05/47] staging: r8188eu: remove rtw_efuse_access()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (3 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 04/47] staging: r8188eu: remove rtw_BT_efuse_map_write() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 06/47] staging: r8188eu: remove rtw_efuse_map_write() Michael Straube
                   ` (41 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_efuse_access() is not used, remove it. It is the only
user of the functions efuse_{read,write}8, remove these as well.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c    | 53 ---------------------
 drivers/staging/r8188eu/include/rtw_efuse.h |  2 -
 2 files changed, 55 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 010740d035ea..893287e50d9c 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -226,59 +226,6 @@ void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata)
 	}
 }
 
-static u8 efuse_read8(struct adapter *padapter, u16 address, u8 *value)
-{
-	return efuse_OneByteRead(padapter, address, value, false);
-}
-
-static u8 efuse_write8(struct adapter *padapter, u16 address, u8 *value)
-{
-	return efuse_OneByteWrite(padapter, address, *value, false);
-}
-
-/*
- * read/wirte raw efuse data
- */
-u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts, u8 *data)
-{
-	int i = 0;
-	u16 real_content_len = 0, max_available_size = 0;
-	u8 res = _FAIL;
-	u8 (*rw8)(struct adapter *, u16, u8*);
-
-	rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&real_content_len, false);
-	rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
-
-	if (start_addr > real_content_len)
-		return _FAIL;
-
-	if (write) {
-		if ((start_addr + cnts) > max_available_size)
-			return _FAIL;
-		rw8 = &efuse_write8;
-	} else {
-		rw8 = &efuse_read8;
-	}
-
-	rtl8188e_EfusePowerSwitch(padapter, write, true);
-
-	/*  e-fuse one byte read / write */
-	for (i = 0; i < cnts; i++) {
-		if (start_addr >= real_content_len) {
-			res = _FAIL;
-			break;
-		}
-
-		res = rw8(padapter, start_addr++, data++);
-		if (_FAIL == res)
-			break;
-	}
-
-	rtl8188e_EfusePowerSwitch(padapter, write, false);
-
-	return res;
-}
-
 u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 {
 	u16 mapLen = 0;
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index 02cbadb2ec2b..f0236a89d731 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -101,8 +101,6 @@ extern u8 fakeBTEfuseInitMap[];
 extern u8 fakeBTEfuseModifiedMap[];
 /*------------------------Export global variable----------------------------*/
 
-u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr,
-		    u16 cnts, u8 *data);
 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,
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 06/47] staging: r8188eu: remove rtw_efuse_map_write()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (4 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 05/47] staging: r8188eu: remove rtw_efuse_access() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 07/47] staging: r8188eu: remove rtw_BT_efuse_map_read() Michael Straube
                   ` (40 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_efuse_map_write() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c    | 91 ---------------------
 drivers/staging/r8188eu/include/rtw_efuse.h |  1 -
 2 files changed, 92 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 893287e50d9c..a55e4861054c 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 f0236a89d731..c7ce63985c7a 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);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 07/47] staging: r8188eu: remove rtw_BT_efuse_map_read()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (5 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 06/47] staging: r8188eu: remove rtw_efuse_map_write() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 08/47] staging: r8188eu: remove rtw_efuse_map_read() Michael Straube
                   ` (39 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_BT_efuse_map_read() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c    | 18 ------------------
 drivers/staging/r8188eu/include/rtw_efuse.h |  2 --
 2 files changed, 20 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index a55e4861054c..4b97ce488b21 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -244,24 +244,6 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 	return _SUCCESS;
 }
 
-u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
-{
-	u16 mapLen = 0;
-
-	rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
-
-	if ((addr + cnts) > mapLen)
-		return _FAIL;
-
-	rtl8188e_EfusePowerSwitch(padapter, false, true);
-
-	rtl8188e_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, false);
-
-	rtl8188e_EfusePowerSwitch(padapter, false, false);
-
-	return _SUCCESS;
-}
-
 /*-----------------------------------------------------------------------------
  * Function:	Efuse_ReadAllMap
  *
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index c7ce63985c7a..39b30ee1bae2 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -102,8 +102,6 @@ extern u8 fakeBTEfuseModifiedMap[];
 /*------------------------Export global variable----------------------------*/
 
 u8 rtw_efuse_map_read(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);
 void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
 u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 08/47] staging: r8188eu: remove rtw_efuse_map_read()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (6 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 07/47] staging: r8188eu: remove rtw_BT_efuse_map_read() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 09/47] staging: r8188eu: remove _rtw_dequeue_network() Michael Straube
                   ` (38 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_efuse_map_read() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c    | 18 ------------------
 drivers/staging/r8188eu/include/rtw_efuse.h |  1 -
 2 files changed, 19 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 4b97ce488b21..163cfd543ccd 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -226,24 +226,6 @@ void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata)
 	}
 }
 
-u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
-{
-	u16 mapLen = 0;
-
-	rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
-
-	if ((addr + cnts) > mapLen)
-		return _FAIL;
-
-	rtl8188e_EfusePowerSwitch(padapter, false, true);
-
-	rtl8188e_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, false);
-
-	rtl8188e_EfusePowerSwitch(padapter, false, false);
-
-	return _SUCCESS;
-}
-
 /*-----------------------------------------------------------------------------
  * Function:	Efuse_ReadAllMap
  *
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index 39b30ee1bae2..2e19b7be1075 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -101,7 +101,6 @@ extern u8 fakeBTEfuseInitMap[];
 extern u8 fakeBTEfuseModifiedMap[];
 /*------------------------Export global variable----------------------------*/
 
-u8 rtw_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
 u8 Efuse_CalculateWordCnts(u8 word_en);
 void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
 u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 09/47] staging: r8188eu: remove _rtw_dequeue_network()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (7 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 08/47] staging: r8188eu: remove rtw_efuse_map_read() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 10/47] staging: r8188eu: remove _rtw_enqueue_network() Michael Straube
                   ` (37 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function _rtw_dequeue_network() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_mlme.c    | 19 -------------------
 drivers/staging/r8188eu/include/rtw_mlme.h |  2 --
 2 files changed, 21 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index 179bddc1e54c..eae3f8a55a58 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -142,25 +142,6 @@ int	_rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork)
 	return _SUCCESS;
 }
 
-struct	wlan_network *_rtw_dequeue_network(struct __queue *queue)
-{
-	struct wlan_network *pnetwork;
-
-	spin_lock_bh(&queue->lock);
-
-	if (list_empty(&queue->queue)) {
-		pnetwork = NULL;
-	} else {
-		pnetwork = container_of((&queue->queue)->next, struct wlan_network, list);
-
-		list_del_init(&pnetwork->list);
-	}
-
-	spin_unlock_bh(&queue->lock);
-
-	return pnetwork;
-}
-
 struct	wlan_network *_rtw_alloc_network(struct	mlme_priv *pmlmepriv)/* _queue *free_queue) */
 {
 	struct	wlan_network	*pnetwork;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h
index 3e583748df74..fcd700c79af7 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme.h
@@ -586,8 +586,6 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
 
 int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork);
 
-struct wlan_network *_rtw_dequeue_network(struct __queue *queue);
-
  struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
 
 void _rtw_free_network(struct mlme_priv *pmlmepriv,
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 10/47] staging: r8188eu: remove _rtw_enqueue_network()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (8 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 09/47] staging: r8188eu: remove _rtw_dequeue_network() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 11/47] staging: r8188eu: remove rtw_get_timestampe_from_ie() Michael Straube
                   ` (36 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function _rtw_enqueue_network() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_mlme.c    | 17 -----------------
 drivers/staging/r8188eu/include/rtw_mlme.h |  2 --
 2 files changed, 19 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index eae3f8a55a58..fb5952d5f1e4 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -125,23 +125,6 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
 
 }
 
-int	_rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork)
-{
-
-	if (!pnetwork)
-		goto exit;
-
-	spin_lock_bh(&queue->lock);
-
-	list_add_tail(&pnetwork->list, &queue->queue);
-
-	spin_unlock_bh(&queue->lock);
-
-exit:
-
-	return _SUCCESS;
-}
-
 struct	wlan_network *_rtw_alloc_network(struct	mlme_priv *pmlmepriv)/* _queue *free_queue) */
 {
 	struct	wlan_network	*pnetwork;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h
index fcd700c79af7..e0fec3ac55de 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme.h
@@ -584,8 +584,6 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
 
 void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
 
-int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork);
-
  struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
 
 void _rtw_free_network(struct mlme_priv *pmlmepriv,
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 11/47] staging: r8188eu: remove rtw_get_timestampe_from_ie()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (9 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 10/47] staging: r8188eu: remove _rtw_enqueue_network() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 12/47] staging: r8188eu: remove rtw_scan_abort() Michael Straube
                   ` (35 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_get_timestampe_from_ie() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_mlme.c    | 5 -----
 drivers/staging/r8188eu/include/rtw_mlme.h | 1 -
 2 files changed, 6 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index fb5952d5f1e4..456933475c16 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -290,11 +290,6 @@ u16 rtw_get_capability(struct wlan_bssid_ex *bss)
 	return le16_to_cpu(val);
 }
 
-u8 *rtw_get_timestampe_from_ie(u8 *ie)
-{
-	return ie + 0;
-}
-
 u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
 {
 	return ie + 8;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h
index e0fec3ac55de..9dc9f9b94850 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme.h
@@ -598,7 +598,6 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall);
 int rtw_if_up(struct adapter *padapter);
 
 u8 *rtw_get_capability_from_ie(u8 *ie);
-u8 *rtw_get_timestampe_from_ie(u8 *ie);
 u8 *rtw_get_beacon_interval_from_ie(u8 *ie);
 
 void rtw_joinbss_reset(struct adapter *padapter);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 12/47] staging: r8188eu: remove rtw_scan_abort()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (10 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 11/47] staging: r8188eu: remove rtw_get_timestampe_from_ie() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 13/47] staging: r8188eu: remove issue_action_spct_ch_switch() Michael Straube
                   ` (34 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_scan_abort() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_mlme.c    | 23 ----------------------
 drivers/staging/r8188eu/include/rtw_mlme.h |  1 -
 2 files changed, 24 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index 456933475c16..f1bc4b2e930d 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -897,29 +897,6 @@ inline void rtw_indicate_scan_done(struct adapter *padapter, bool aborted)
 	rtw_os_indicate_scan_done(padapter, aborted);
 }
 
-void rtw_scan_abort(struct adapter *adapter)
-{
-	u32 start;
-	struct mlme_priv	*pmlmepriv = &adapter->mlmepriv;
-	struct mlme_ext_priv	*pmlmeext = &adapter->mlmeextpriv;
-
-	start = jiffies;
-	pmlmeext->scan_abort = true;
-	while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) &&
-	       rtw_get_passing_time_ms(start) <= 200) {
-		if (adapter->bDriverStopped || adapter->bSurpriseRemoved)
-			break;
-		DBG_88E(FUNC_NDEV_FMT"fw_state=_FW_UNDER_SURVEY!\n", FUNC_NDEV_ARG(adapter->pnetdev));
-		msleep(20);
-	}
-	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
-		if (!adapter->bDriverStopped && !adapter->bSurpriseRemoved)
-			DBG_88E(FUNC_NDEV_FMT"waiting for scan_abort time out!\n", FUNC_NDEV_ARG(adapter->pnetdev));
-		rtw_indicate_scan_done(adapter, true);
-	}
-	pmlmeext->scan_abort = false;
-}
-
 static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, struct wlan_network *pnetwork)
 {
 	int i;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h
index 9dc9f9b94850..e8d51f495702 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme.h
@@ -557,7 +557,6 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue);
 void rtw_indicate_disconnect(struct adapter *adapter);
 void rtw_indicate_connect(struct adapter *adapter);
 void rtw_indicate_scan_done( struct adapter *padapter, bool aborted);
-void rtw_scan_abort(struct adapter *adapter);
 
 int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie,
 			uint in_len);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 13/47] staging: r8188eu: remove issue_action_spct_ch_switch()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (11 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 12/47] staging: r8188eu: remove rtw_scan_abort() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 14/47] staging: r8188eu: remove issue_probereq_p2p_ex() Michael Straube
                   ` (33 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function issue_action_spct_ch_switch() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_mlme_ext.c   | 59 -------------------
 .../staging/r8188eu/include/rtw_mlme_ext.h    |  2 -
 2 files changed, 61 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 38ab1ab18872..c35ca002b63f 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5756,65 +5756,6 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int
 	return ret;
 }
 
-void issue_action_spct_ch_switch(struct adapter *padapter, u8 *ra, u8 new_ch, u8 ch_offset)
-{
-	struct xmit_frame			*pmgntframe;
-	struct pkt_attrib			*pattrib;
-	unsigned char				*pframe;
-	struct rtw_ieee80211_hdr	*pwlanhdr;
-	__le16 *fctrl;
-	struct xmit_priv			*pxmitpriv = &padapter->xmitpriv;
-	struct mlme_ext_priv	*pmlmeext = &padapter->mlmeextpriv;
-
-	DBG_88E(FUNC_NDEV_FMT" ra =%pM, ch:%u, offset:%u\n",
-		FUNC_NDEV_ARG(padapter->pnetdev), ra, new_ch, ch_offset);
-
-	pmgntframe = alloc_mgtxmitframe(pxmitpriv);
-	if (!pmgntframe)
-		return;
-
-	/* update attribute */
-	pattrib = &pmgntframe->attrib;
-	update_mgntframe_attrib(padapter, pattrib);
-
-	memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
-
-	pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
-	pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
-
-	fctrl = &pwlanhdr->frame_ctl;
-	*(fctrl) = 0;
-
-	memcpy(pwlanhdr->addr1, ra, ETH_ALEN); /* RA */
-	memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN); /* TA */
-	memcpy(pwlanhdr->addr3, ra, ETH_ALEN); /* DA = RA */
-
-	SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
-	pmlmeext->mgnt_seq++;
-	SetFrameSubType(pframe, WIFI_ACTION);
-
-	pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
-	pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
-
-	/* category, action */
-	{
-		u8 category, action;
-		category = RTW_WLAN_CATEGORY_SPECTRUM_MGMT;
-		action = RTW_WLAN_ACTION_SPCT_CHL_SWITCH;
-
-		pframe = rtw_set_fixed_ie(pframe, 1, &category, &pattrib->pktlen);
-		pframe = rtw_set_fixed_ie(pframe, 1, &action, &pattrib->pktlen);
-	}
-
-	pframe = rtw_set_ie_ch_switch(pframe, &pattrib->pktlen, 0, new_ch, 0);
-	pframe = rtw_set_ie_secondary_ch_offset(pframe, &pattrib->pktlen,
-		hal_ch_offset_to_secondary_ch_offset(ch_offset));
-
-	pattrib->last_txcmdsz = pattrib->pktlen;
-
-	dump_mgntframe(padapter, pmgntframe);
-}
-
 void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short status)
 {
 	u8 category = RTW_WLAN_CATEGORY_BACK;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index c00ed9553209..89020f828e08 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -566,8 +566,6 @@ int issue_deauth(struct adapter *padapter, unsigned char *da,
 		 unsigned short reason);
 int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason,
 		    int try_cnt, int wait_ms);
-void issue_action_spct_ch_switch(struct adapter *padapter, u8 *ra, u8 new_ch,
-				 u8 ch_offset);
 void issue_action_BA(struct adapter *padapter, unsigned char *raddr,
 		     unsigned char action, unsigned short status);
 unsigned int send_delba(struct adapter *padapter, u8 initiator, u8 *addr);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 14/47] staging: r8188eu: remove issue_probereq_p2p_ex()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (12 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 13/47] staging: r8188eu: remove issue_action_spct_ch_switch() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 15/47] staging: r8188eu: remove sreset_get_wifi_status() Michael Straube
                   ` (32 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function issue_probereq_p2p_ex() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_mlme_ext.c   | 37 -------------------
 .../staging/r8188eu/include/rtw_mlme_ext.h    |  2 -
 2 files changed, 39 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index c35ca002b63f..905e7f0b83d1 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -3690,43 +3690,6 @@ inline void issue_probereq_p2p(struct adapter *adapter, u8 *da)
 	_issue_probereq_p2p(adapter, da, false);
 }
 
-int issue_probereq_p2p_ex(struct adapter *adapter, u8 *da, int try_cnt, int wait_ms)
-{
-	int ret;
-	int i = 0;
-	u32 start = jiffies;
-
-	do {
-		ret = _issue_probereq_p2p(adapter, da, wait_ms > 0);
-
-		i++;
-
-		if (adapter->bDriverStopped || adapter->bSurpriseRemoved)
-			break;
-
-		if (i < try_cnt && wait_ms > 0 && ret == _FAIL)
-			msleep(wait_ms);
-	} while ((i < try_cnt) && ((ret == _FAIL) || (wait_ms == 0)));
-
-	if (ret != _FAIL) {
-		ret = _SUCCESS;
-		goto exit;
-	}
-
-	if (try_cnt && wait_ms) {
-		if (da)
-			DBG_88E(FUNC_ADPT_FMT" to %pM, ch:%u%s, %d/%d in %u ms\n",
-				FUNC_ADPT_ARG(adapter), da, rtw_get_oper_ch(adapter),
-				ret == _SUCCESS ? ", acked" : "", i, try_cnt, rtw_get_passing_time_ms(start));
-		else
-			DBG_88E(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n",
-				FUNC_ADPT_ARG(adapter), rtw_get_oper_ch(adapter),
-				ret == _SUCCESS ? ", acked" : "", i, try_cnt, rtw_get_passing_time_ms(start));
-	}
-exit:
-	return ret;
-}
-
 static s32 rtw_action_public_decache(struct recv_frame *recv_frame, s32 token)
 {
 	struct adapter *adapter = recv_frame->adapter;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index 89020f828e08..5b307ad3afa5 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -541,8 +541,6 @@ void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid,
 				 u8 ussidlen, u8 *pdev_raddr);
 void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr);
 void issue_probereq_p2p(struct adapter *padapter, u8 *da);
-int issue_probereq_p2p_ex(struct adapter *adapter, u8 *da, int try_cnt,
-			  int wait_ms);
 void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr,
 				   u8 dialogToken, u8 success);
 void issue_p2p_invitation_request(struct adapter *padapter, u8* raddr);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 15/47] staging: r8188eu: remove sreset_get_wifi_status()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (13 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 14/47] staging: r8188eu: remove issue_probereq_p2p_ex() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 16/47] staging: r8188eu: remove build_deauth_p2p_ie() Michael Straube
                   ` (31 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function sreset_get_wifi_status() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_sreset.c    | 30 --------------------
 drivers/staging/r8188eu/include/rtw_sreset.h |  1 -
 2 files changed, 31 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_sreset.c b/drivers/staging/r8188eu/core/rtw_sreset.c
index 1787c2d7ea5f..baa2a080a46e 100644
--- a/drivers/staging/r8188eu/core/rtw_sreset.c
+++ b/drivers/staging/r8188eu/core/rtw_sreset.c
@@ -25,36 +25,6 @@ void sreset_reset_value(struct adapter *padapter)
 	psrtpriv->last_tx_complete_time = 0;
 }
 
-u8 sreset_get_wifi_status(struct adapter *padapter)
-{
-	struct hal_data_8188e	*pHalData = GET_HAL_DATA(padapter);
-	struct sreset_priv *psrtpriv = &pHalData->srestpriv;
-
-	u8 status = WIFI_STATUS_SUCCESS;
-	u32 val32 = 0;
-
-	if (psrtpriv->silent_reset_inprogress)
-		return status;
-	val32 = rtw_read32(padapter, REG_TXDMA_STATUS);
-	if (val32 == 0xeaeaeaea) {
-		psrtpriv->wifi_error_status = WIFI_IF_NOT_EXIST;
-	} else if (val32 != 0) {
-		DBG_88E("txdmastatu(%x)\n", val32);
-		psrtpriv->wifi_error_status = WIFI_MAC_TXDMA_ERROR;
-	}
-
-	if (WIFI_STATUS_SUCCESS != psrtpriv->wifi_error_status) {
-		DBG_88E("==>%s error_status(0x%x)\n", __func__, psrtpriv->wifi_error_status);
-		status = (psrtpriv->wifi_error_status & (~(USB_READ_PORT_FAIL | USB_WRITE_PORT_FAIL)));
-	}
-	DBG_88E("==> %s wifi_status(0x%x)\n", __func__, status);
-
-	/* status restore */
-	psrtpriv->wifi_error_status = WIFI_STATUS_SUCCESS;
-
-	return status;
-}
-
 void sreset_set_wifi_error_status(struct adapter *padapter, u32 status)
 {
 	struct hal_data_8188e	*pHalData = GET_HAL_DATA(padapter);
diff --git a/drivers/staging/r8188eu/include/rtw_sreset.h b/drivers/staging/r8188eu/include/rtw_sreset.h
index 4e97997c305b..47ad185c755f 100644
--- a/drivers/staging/r8188eu/include/rtw_sreset.h
+++ b/drivers/staging/r8188eu/include/rtw_sreset.h
@@ -28,7 +28,6 @@ struct sreset_priv {
 
 void sreset_init_value(struct adapter *padapter);
 void sreset_reset_value(struct adapter *padapter);
-u8 sreset_get_wifi_status(struct adapter *padapter);
 void sreset_set_wifi_error_status(struct adapter *padapter, u32 status);
 
 #endif
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 16/47] staging: r8188eu: remove build_deauth_p2p_ie()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (14 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 15/47] staging: r8188eu: remove sreset_get_wifi_status() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 17/47] staging: r8188eu: remove rtw_freq2ch() Michael Straube
                   ` (30 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function build_deauth_p2p_ie() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_p2p.c    | 7 -------
 drivers/staging/r8188eu/include/rtw_p2p.h | 1 -
 2 files changed, 8 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188eu/core/rtw_p2p.c
index f942f8f9e3f6..dbcf8bd24e6a 100644
--- a/drivers/staging/r8188eu/core/rtw_p2p.c
+++ b/drivers/staging/r8188eu/core/rtw_p2p.c
@@ -733,13 +733,6 @@ u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status
 	return len;
 }
 
-u32 build_deauth_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
-{
-	u32 len = 0;
-
-	return len;
-}
-
 u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len)
 {
 	u8 *p;
diff --git a/drivers/staging/r8188eu/include/rtw_p2p.h b/drivers/staging/r8188eu/include/rtw_p2p.h
index 92b9bfe3ea0b..b91322a1fe10 100644
--- a/drivers/staging/r8188eu/include/rtw_p2p.h
+++ b/drivers/staging/r8188eu/include/rtw_p2p.h
@@ -13,7 +13,6 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo,
 				   u8 *pdev_raddr);
 u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo,
 			    u8 *pbuf, u8 status_code);
-u32 build_deauth_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
 u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo,
 			     u8 *pframe, uint len);
 u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo,
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 17/47] staging: r8188eu: remove rtw_freq2ch()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (15 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 16/47] staging: r8188eu: remove build_deauth_p2p_ie() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 18/47] staging: r8188eu: remove rtw_set_802_11_add_key() Michael Straube
                   ` (29 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_freq2ch() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_rf.c    | 17 -----------------
 drivers/staging/r8188eu/include/rtw_rf.h |  1 -
 2 files changed, 18 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_rf.c b/drivers/staging/r8188eu/core/rtw_rf.c
index 321546c40446..2ec56012516e 100644
--- a/drivers/staging/r8188eu/core/rtw_rf.c
+++ b/drivers/staging/r8188eu/core/rtw_rf.c
@@ -53,20 +53,3 @@ u32 rtw_ch2freq(u32 channel)
 
 	return freq;
 }
-
-u32 rtw_freq2ch(u32 freq)
-{
-	u8	i;
-	u32	ch = 0;
-
-	for (i = 0; i < ch_freq_map_num; i++) {
-		if (freq == ch_freq_map[i].frequency) {
-			ch = ch_freq_map[i].channel;
-				break;
-		}
-	}
-	if (i == ch_freq_map_num)
-		ch = 1;
-
-	return ch;
-}
diff --git a/drivers/staging/r8188eu/include/rtw_rf.h b/drivers/staging/r8188eu/include/rtw_rf.h
index 48129da9c93f..fadb141c6945 100644
--- a/drivers/staging/r8188eu/include/rtw_rf.h
+++ b/drivers/staging/r8188eu/include/rtw_rf.h
@@ -121,6 +121,5 @@ enum rt_rf_type_def {
 };
 
 u32 rtw_ch2freq(u32 ch);
-u32 rtw_freq2ch(u32 freq);
 
 #endif /* _RTL8711_RF_H_ */
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 18/47] staging: r8188eu: remove rtw_set_802_11_add_key()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (16 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 17/47] staging: r8188eu: remove rtw_freq2ch() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 19/47] staging: r8188eu: remove rtw_set_802_11_remove_key() Michael Straube
                   ` (28 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_set_802_11_add_key() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ioctl_set.c  | 230 ------------------
 .../staging/r8188eu/include/rtw_ioctl_set.h   |   1 -
 2 files changed, 231 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ioctl_set.c b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
index a0702bfaa549..afa72b21fc0b 100644
--- a/drivers/staging/r8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
@@ -492,236 +492,6 @@ u8 rtw_set_802_11_remove_wep(struct adapter *padapter, u32 keyindex)
 	return ret;
 }
 
-u8 rtw_set_802_11_add_key(struct adapter *padapter, struct ndis_802_11_key *key)
-{
-	uint	encryptionalgo;
-	u8 *pbssid;
-	struct sta_info *stainfo;
-	u8	bgroup = false;
-	u8	bgrouptkey = false;/* can be removed later */
-	u8	ret = _SUCCESS;
-
-	if (((key->KeyIndex & 0x80000000) == 0) && ((key->KeyIndex & 0x40000000) > 0)) {
-		/*  It is invalid to clear bit 31 and set bit 30. If the miniport driver encounters this combination, */
-		/*  it must fail the request and return NDIS_STATUS_INVALID_DATA. */
-		ret = _FAIL;
-		goto exit;
-	}
-
-	if (key->KeyIndex & 0x40000000) {
-		/*  Pairwise key */
-
-		pbssid = get_bssid(&padapter->mlmepriv);
-		stainfo = rtw_get_stainfo(&padapter->stapriv, pbssid);
-
-		if (stainfo && padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)
-			encryptionalgo = stainfo->dot118021XPrivacy;
-		else
-			encryptionalgo = padapter->securitypriv.dot11PrivacyAlgrthm;
-
-		if (key->KeyIndex & 0x000000FF) {
-			/*  The key index is specified in the lower 8 bits by values of zero to 255. */
-			/*  The key index should be set to zero for a Pairwise key, and the driver should fail with */
-			/*  NDIS_STATUS_INVALID_DATA if the lower 8 bits is not zero */
-			ret = _FAIL;
-			goto exit;
-		}
-
-		/*  check BSSID */
-		if (is_broadcast_ether_addr(key->BSSID)) {
-			ret = false;
-			goto exit;
-		}
-
-		/*  Check key length for TKIP. */
-		if ((encryptionalgo == _TKIP_) && (key->KeyLength != 32)) {
-			ret = _FAIL;
-			goto exit;
-		}
-
-		/*  Check key length for AES. */
-		if ((encryptionalgo == _AES_) && (key->KeyLength != 16)) {
-			/*  For our supplicant, EAPPkt9x.vxd, cannot differentiate TKIP and AES case. */
-			if (key->KeyLength == 32) {
-				key->KeyLength = 16;
-			} else {
-				ret = _FAIL;
-				goto exit;
-			}
-		}
-
-		/*  Check key length for WEP. For NDTEST, 2005.01.27, by rcnjko. */
-		if ((encryptionalgo == _WEP40_ || encryptionalgo == _WEP104_) &&
-		    (key->KeyLength != 5 && key->KeyLength != 13)) {
-			ret = _FAIL;
-			goto exit;
-		}
-
-		bgroup = false;
-	} else {
-		/*  Group key - KeyIndex(BIT(30) == 0) */
-		/*  when add wep key through add key and didn't assigned encryption type before */
-		if ((padapter->securitypriv.ndisauthtype <= 3) &&
-		    (padapter->securitypriv.dot118021XGrpPrivacy == 0)) {
-			switch (key->KeyLength) {
-			case 5:
-				padapter->securitypriv.dot11PrivacyAlgrthm = _WEP40_;
-				break;
-			case 13:
-				padapter->securitypriv.dot11PrivacyAlgrthm = _WEP104_;
-				break;
-			default:
-				padapter->securitypriv.dot11PrivacyAlgrthm = _NO_PRIVACY_;
-				break;
-			}
-
-			encryptionalgo = padapter->securitypriv.dot11PrivacyAlgrthm;
-		} else {
-			encryptionalgo = padapter->securitypriv.dot118021XGrpPrivacy;
-		}
-
-		if (check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE) && !is_broadcast_ether_addr(key->BSSID)) {
-			ret = _FAIL;
-			goto exit;
-		}
-
-		/*  Check key length for TKIP */
-		if ((encryptionalgo == _TKIP_) && (key->KeyLength != 32)) {
-			ret = _FAIL;
-			goto exit;
-		} else if (encryptionalgo == _AES_ && (key->KeyLength != 16 && key->KeyLength != 32)) {
-			/*  Check key length for AES */
-			/*  For NDTEST, we allow keylen = 32 in this case. 2005.01.27, by rcnjko. */
-			ret = _FAIL;
-			goto exit;
-		}
-
-		/*  Change the key length for EAPPkt9x.vxd. Added by Annie, 2005-11-03. */
-		if ((encryptionalgo ==  _AES_) && (key->KeyLength == 32))
-			key->KeyLength = 16;
-
-		if (key->KeyIndex & 0x8000000) {/* error ??? 0x8000_0000 */
-			bgrouptkey = true;
-		}
-
-		if ((check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE)) &&
-		    (check_fwstate(&padapter->mlmepriv, _FW_LINKED)))
-			bgrouptkey = true;
-		bgroup = true;
-	}
-
-	/*  If WEP encryption algorithm, just call rtw_set_802_11_add_wep(). */
-	if ((padapter->securitypriv.dot11AuthAlgrthm != dot11AuthAlgrthm_8021X) &&
-	    (encryptionalgo == _WEP40_ || encryptionalgo == _WEP104_)) {
-		u32 keyindex;
-		u32 len = FIELD_OFFSET(struct ndis_802_11_key, KeyMaterial) + key->KeyLength;
-		struct ndis_802_11_wep *wep = &padapter->securitypriv.ndiswep;
-
-		wep->Length = len;
-		keyindex = key->KeyIndex & 0x7fffffff;
-		wep->KeyIndex = keyindex;
-		wep->KeyLength = key->KeyLength;
-
-		memcpy(wep->KeyMaterial, key->KeyMaterial, key->KeyLength);
-		memcpy(&padapter->securitypriv.dot11DefKey[keyindex].skey[0], key->KeyMaterial, key->KeyLength);
-
-		padapter->securitypriv.dot11DefKeylen[keyindex] = key->KeyLength;
-		padapter->securitypriv.dot11PrivacyKeyIndex = keyindex;
-
-		ret = rtw_set_802_11_add_wep(padapter, wep);
-		goto exit;
-	}
-	if (key->KeyIndex & 0x20000000) {
-		/*  SetRSC */
-		if (bgroup) {
-			unsigned long long keysrc = key->KeyRSC & 0x00FFFFFFFFFFFFULL;
-			memcpy(&padapter->securitypriv.dot11Grprxpn, &keysrc, 8);
-		} else {
-			unsigned long long keysrc = key->KeyRSC & 0x00FFFFFFFFFFFFULL;
-			memcpy(&padapter->securitypriv.dot11Grptxpn, &keysrc, 8);
-		}
-	}
-
-	/*  Indicate this key idx is used for TX */
-	/*  Save the key in KeyMaterial */
-	if (bgroup) { /*  Group transmit key */
-		int res;
-
-		if (bgrouptkey)
-			padapter->securitypriv.dot118021XGrpKeyid = (u8)key->KeyIndex;
-		if ((key->KeyIndex & 0x3) == 0) {
-			ret = _FAIL;
-			goto exit;
-		}
-		memset(&padapter->securitypriv.dot118021XGrpKey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
-		memset(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
-		memset(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
-
-		if ((key->KeyIndex & 0x10000000)) {
-			memcpy(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 16, 8);
-			memcpy(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 24, 8);
-		} else {
-			memcpy(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 24, 8);
-			memcpy(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 16, 8);
-		}
-
-		/* set group key by index */
-		memcpy(&padapter->securitypriv.dot118021XGrpKey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial, key->KeyLength);
-
-		key->KeyIndex = key->KeyIndex & 0x03;
-
-		padapter->securitypriv.binstallGrpkey = true;
-
-		padapter->securitypriv.bcheck_grpkey = false;
-
-		res = rtw_set_key(padapter, &padapter->securitypriv, key->KeyIndex, 1);
-
-		if (res == _FAIL)
-			ret = _FAIL;
-
-		goto exit;
-
-	} else { /*  Pairwise Key */
-		u8 res;
-
-		pbssid = get_bssid(&padapter->mlmepriv);
-		stainfo = rtw_get_stainfo(&padapter->stapriv, pbssid);
-
-		if (stainfo) {
-			memset(&stainfo->dot118021x_UncstKey, 0, 16);/*  clear keybuffer */
-
-			memcpy(&stainfo->dot118021x_UncstKey, key->KeyMaterial, 16);
-
-			if (encryptionalgo == _TKIP_) {
-				padapter->securitypriv.busetkipkey = false;
-
-				/* _set_timer(&padapter->securitypriv.tkip_timer, 50); */
-
-				/*  if TKIP, save the Receive/Transmit MIC key in KeyMaterial[128-255] */
-				if ((key->KeyIndex & 0x10000000)) {
-					memcpy(&stainfo->dot11tkiptxmickey, key->KeyMaterial + 16, 8);
-					memcpy(&stainfo->dot11tkiprxmickey, key->KeyMaterial + 24, 8);
-
-				} else {
-					memcpy(&stainfo->dot11tkiptxmickey, key->KeyMaterial + 24, 8);
-					memcpy(&stainfo->dot11tkiprxmickey, key->KeyMaterial + 16, 8);
-				}
-			}
-
-			/* Set key to CAM through H2C command */
-			if (bgrouptkey) /* never go to here */
-				res = rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, false);
-			else
-				res = rtw_setstakey_cmd(padapter, (unsigned char *)stainfo, true);
-			if (!res)
-				ret = _FAIL;
-		}
-	}
-exit:
-
-	return ret;
-}
-
 u8 rtw_set_802_11_remove_key(struct adapter *padapter, struct ndis_802_11_remove_key *key)
 {
 	u8 *pbssid;
diff --git a/drivers/staging/r8188eu/include/rtw_ioctl_set.h b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
index 6216b8ab3a79..3f4b4873eb98 100644
--- a/drivers/staging/r8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
@@ -8,7 +8,6 @@
 
 typedef u8 NDIS_802_11_PMKID_VALUE[16];
 
-u8 rtw_set_802_11_add_key(struct adapter *adapt, struct ndis_802_11_key *key);
 u8 rtw_set_802_11_authentication_mode(struct adapter *adapt,
 				      enum ndis_802_11_auth_mode authmode);
 u8 rtw_set_802_11_bssid(struct adapter*adapter, u8 *bssid);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 19/47] staging: r8188eu: remove rtw_set_802_11_remove_key()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (17 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 18/47] staging: r8188eu: remove rtw_set_802_11_add_key() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 20/47] staging: r8188eu: remove rtw_set_802_11_remove_wep() Michael Straube
                   ` (27 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_set_802_11_remove_key() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ioctl_set.c  | 37 -------------------
 .../staging/r8188eu/include/rtw_ioctl_set.h   |  2 -
 2 files changed, 39 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ioctl_set.c b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
index afa72b21fc0b..219d579a853f 100644
--- a/drivers/staging/r8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
@@ -492,43 +492,6 @@ u8 rtw_set_802_11_remove_wep(struct adapter *padapter, u32 keyindex)
 	return ret;
 }
 
-u8 rtw_set_802_11_remove_key(struct adapter *padapter, struct ndis_802_11_remove_key *key)
-{
-	u8 *pbssid;
-	struct sta_info *stainfo;
-	u8	bgroup = (key->KeyIndex & 0x4000000) > 0 ? false : true;
-	u8	keyIndex = (u8)key->KeyIndex & 0x03;
-	u8	ret = _SUCCESS;
-
-	if ((key->KeyIndex & 0xbffffffc) > 0) {
-		ret = _FAIL;
-		goto exit;
-	}
-
-	if (bgroup) {
-		/*  clear group key by index */
-
-		memset(&padapter->securitypriv.dot118021XGrpKey[keyIndex], 0, 16);
-
-		/*  \todo Send a H2C Command to Firmware for removing this Key in CAM Entry. */
-	} else {
-		pbssid = get_bssid(&padapter->mlmepriv);
-		stainfo = rtw_get_stainfo(&padapter->stapriv, pbssid);
-		if (stainfo) {
-			/*  clear key by BSSID */
-			memset(&stainfo->dot118021x_UncstKey, 0, 16);
-
-			/*  \todo Send a H2C Command to Firmware for disable this Key in CAM Entry. */
-		} else {
-			ret = _FAIL;
-			goto exit;
-		}
-	}
-exit:
-
-	return ret;
-}
-
 /*
 * rtw_get_cur_max_rate -
 * @adapter: pointer to struct adapter structure
diff --git a/drivers/staging/r8188eu/include/rtw_ioctl_set.h b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
index 3f4b4873eb98..6203f49f8bf7 100644
--- a/drivers/staging/r8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
@@ -20,8 +20,6 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter *adapter,
 				      enum ndis_802_11_network_infra type);
 u8 rtw_set_802_11_remove_wep(struct adapter *adapter, u32 keyindex);
 u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
-u8 rtw_set_802_11_remove_key(struct adapter *adapt,
-			     struct ndis_802_11_remove_key *key);
 u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 20/47] staging: r8188eu: remove rtw_set_802_11_remove_wep()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (18 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 19/47] staging: r8188eu: remove rtw_set_802_11_remove_key() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 21/47] staging: r8188eu: remove rtw_set_country() Michael Straube
                   ` (26 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_set_802_11_remove_wep() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ioctl_set.c  | 25 -------------------
 .../staging/r8188eu/include/rtw_ioctl_set.h   |  1 -
 2 files changed, 26 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ioctl_set.c b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
index 219d579a853f..9b083829fffa 100644
--- a/drivers/staging/r8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
@@ -467,31 +467,6 @@ u8 rtw_set_802_11_add_wep(struct adapter *padapter, struct ndis_802_11_wep *wep)
 	return ret;
 }
 
-u8 rtw_set_802_11_remove_wep(struct adapter *padapter, u32 keyindex)
-{
-	u8 ret = _SUCCESS;
-
-	if (keyindex >= 0x80000000 || !padapter) {
-		ret = false;
-		goto exit;
-	} else {
-		int res;
-		struct security_priv *psecuritypriv = &padapter->securitypriv;
-		if (keyindex < 4) {
-			memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16);
-			res = rtw_set_key(padapter, psecuritypriv, keyindex, 0);
-			psecuritypriv->dot11DefKeylen[keyindex] = 0;
-			if (res == _FAIL)
-				ret = _FAIL;
-		} else {
-			ret = _FAIL;
-		}
-	}
-exit:
-
-	return ret;
-}
-
 /*
 * rtw_get_cur_max_rate -
 * @adapter: pointer to struct adapter structure
diff --git a/drivers/staging/r8188eu/include/rtw_ioctl_set.h b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
index 6203f49f8bf7..5114d217a3d9 100644
--- a/drivers/staging/r8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
@@ -18,7 +18,6 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter*adapter,
 				  int ssid_max_num);
 u8 rtw_set_802_11_infrastructure_mode(struct adapter *adapter,
 				      enum ndis_802_11_network_infra type);
-u8 rtw_set_802_11_remove_wep(struct adapter *adapter, u32 keyindex);
 u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
 u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 21/47] staging: r8188eu: remove rtw_set_country()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (19 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 20/47] staging: r8188eu: remove rtw_set_802_11_remove_wep() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 22/47] staging: r8188eu: remove rtw_set_scan_mode() Michael Straube
                   ` (25 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_set_country() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ioctl_set.c  | 29 -------------------
 .../staging/r8188eu/include/rtw_ioctl_set.h   |  1 -
 2 files changed, 30 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ioctl_set.c b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
index 9b083829fffa..9fb6e07ae963 100644
--- a/drivers/staging/r8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
@@ -558,32 +558,3 @@ int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan)
 	/* handle by cmd_thread to sync with scan operation */
 	return rtw_set_chplan_cmd(adapter, channel_plan, 1);
 }
-
-/*
-* rtw_set_country -
-* @adapter: pointer to struct adapter structure
-* @country_code: string of country code
-*
-* Return _SUCCESS or _FAIL
-*/
-int rtw_set_country(struct adapter *adapter, const char *country_code)
-{
-	int channel_plan = RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN_2G;
-
-	DBG_88E("%s country_code:%s\n", __func__, country_code);
-
-	/* TODO: should have a table to match country code and RT_CHANNEL_DOMAIN */
-	/* TODO: should consider 2-character and 3-character country code */
-	if (0 == strcmp(country_code, "US"))
-		channel_plan = RT_CHANNEL_DOMAIN_FCC;
-	else if (0 == strcmp(country_code, "EU"))
-		channel_plan = RT_CHANNEL_DOMAIN_ETSI;
-	else if (0 == strcmp(country_code, "JP"))
-		channel_plan = RT_CHANNEL_DOMAIN_MKK;
-	else if (0 == strcmp(country_code, "CN"))
-		channel_plan = RT_CHANNEL_DOMAIN_CHINA;
-	else
-		DBG_88E("%s unknown country_code:%s\n", __func__, country_code);
-
-	return rtw_set_channel_plan(adapter, channel_plan);
-}
diff --git a/drivers/staging/r8188eu/include/rtw_ioctl_set.h b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
index 5114d217a3d9..2631c85773cd 100644
--- a/drivers/staging/r8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
@@ -23,7 +23,6 @@ u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode);
 int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan);
-int rtw_set_country(struct adapter *adapter, const char *country_code);
 int rtw_change_ifname(struct adapter *padapter, const char *ifname);
 
 #endif
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 22/47] staging: r8188eu: remove rtw_set_scan_mode()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (20 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 21/47] staging: r8188eu: remove rtw_set_country() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 23/47] staging: r8188eu: remove rtw_validate_ssid() Michael Straube
                   ` (24 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_set_scan_mode() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ioctl_set.c    | 17 -----------------
 drivers/staging/r8188eu/include/rtw_ioctl_set.h |  1 -
 2 files changed, 18 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ioctl_set.c b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
index 9fb6e07ae963..222c7f696279 100644
--- a/drivers/staging/r8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
@@ -529,23 +529,6 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
 	return max_rate;
 }
 
-/*
-* rtw_set_scan_mode -
-* @adapter: pointer to struct adapter structure
-* @scan_mode:
-*
-* Return _SUCCESS or _FAIL
-*/
-int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode)
-{
-	if (scan_mode != SCAN_ACTIVE && scan_mode != SCAN_PASSIVE)
-		return _FAIL;
-
-	adapter->mlmepriv.scan_mode = scan_mode;
-
-	return _SUCCESS;
-}
-
 /*
 * rtw_set_channel_plan -
 * @adapter: pointer to struct adapter structure
diff --git a/drivers/staging/r8188eu/include/rtw_ioctl_set.h b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
index 2631c85773cd..32885d8e42ff 100644
--- a/drivers/staging/r8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
@@ -21,7 +21,6 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter *adapter,
 u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
 u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
-int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode);
 int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan);
 int rtw_change_ifname(struct adapter *padapter, const char *ifname);
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 23/47] staging: r8188eu: remove rtw_validate_ssid()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (21 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 22/47] staging: r8188eu: remove rtw_set_scan_mode() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 24/47] staging: r8188eu: remove rtw_set_channel_plan() Michael Straube
                   ` (23 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_validate_ssid() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ioctl_set.c  | 23 -------------------
 .../staging/r8188eu/include/rtw_ioctl_set.h   |  1 -
 2 files changed, 24 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ioctl_set.c b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
index 222c7f696279..62ab7fbdcee0 100644
--- a/drivers/staging/r8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
@@ -13,29 +13,6 @@
 
 extern void indicate_wx_scan_complete_event(struct adapter *padapter);
 
-u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
-{
-	u8	 i;
-	u8	ret = true;
-
-	if (ssid->SsidLength > 32) {
-		ret = false;
-		goto exit;
-	}
-
-	for (i = 0; i < ssid->SsidLength; i++) {
-		/* wifi, printable ascii code must be supported */
-		if (!((ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e))) {
-			ret = false;
-			break;
-		}
-	}
-
-exit:
-
-	return ret;
-}
-
 u8 rtw_do_join(struct adapter *padapter)
 {
 	struct list_head *plist, *phead;
diff --git a/drivers/staging/r8188eu/include/rtw_ioctl_set.h b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
index 32885d8e42ff..d84ae57494e7 100644
--- a/drivers/staging/r8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
@@ -19,7 +19,6 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter*adapter,
 u8 rtw_set_802_11_infrastructure_mode(struct adapter *adapter,
 				      enum ndis_802_11_network_infra type);
 u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
-u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan);
 int rtw_change_ifname(struct adapter *padapter, const char *ifname);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 24/47] staging: r8188eu: remove rtw_set_channel_plan()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (22 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 23/47] staging: r8188eu: remove rtw_validate_ssid() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 25/47] staging: r8188eu: remove rtw_atoi() Michael Straube
                   ` (22 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_set_channel_plan() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ioctl_set.c    | 13 -------------
 drivers/staging/r8188eu/include/rtw_ioctl_set.h |  1 -
 2 files changed, 14 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ioctl_set.c b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
index 62ab7fbdcee0..21ba2873919d 100644
--- a/drivers/staging/r8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
@@ -505,16 +505,3 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
 
 	return max_rate;
 }
-
-/*
-* rtw_set_channel_plan -
-* @adapter: pointer to struct adapter structure
-* @channel_plan:
-*
-* Return _SUCCESS or _FAIL
-*/
-int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan)
-{
-	/* handle by cmd_thread to sync with scan operation */
-	return rtw_set_chplan_cmd(adapter, channel_plan, 1);
-}
diff --git a/drivers/staging/r8188eu/include/rtw_ioctl_set.h b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
index d84ae57494e7..7365079c704f 100644
--- a/drivers/staging/r8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/r8188eu/include/rtw_ioctl_set.h
@@ -20,7 +20,6 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter *adapter,
 				      enum ndis_802_11_network_infra type);
 u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
-int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan);
 int rtw_change_ifname(struct adapter *padapter, const char *ifname);
 
 #endif
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 25/47] staging: r8188eu: remove rtw_atoi()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (23 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 24/47] staging: r8188eu: remove rtw_set_channel_plan() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:03 ` [PATCH 26/47] staging: r8188eu: remove rtw_cbuf_push() Michael Straube
                   ` (21 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_atoi() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/include/osdep_service.h |  2 --
 drivers/staging/r8188eu/os_dep/osdep_service.c  | 17 -----------------
 2 files changed, 19 deletions(-)

diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index 86140ca3a115..b9b87f2317a1 100644
--- a/drivers/staging/r8188eu/include/osdep_service.h
+++ b/drivers/staging/r8188eu/include/osdep_service.h
@@ -155,8 +155,6 @@ s32  rtw_get_passing_time_ms(u32 start);
 
 void rtw_usleep_os(int us);
 
-u32  rtw_atoi(u8 *s);
-
 static inline unsigned char _cancel_timer_ex(struct timer_list *ptimer)
 {
 	return del_timer_sync(ptimer);
diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index bee6d42b8738..489a7d33b212 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -19,23 +19,6 @@ inline int RTW_STATUS_CODE(int error_code)
 	return _FAIL;
 }
 
-u32 rtw_atoi(u8 *s)
-{
-	int num = 0, flag = 0;
-	int i;
-	for (i = 0; i <= strlen(s); i++) {
-		if (s[i] >= '0' && s[i] <= '9')
-			num = num * 10 + s[i] - '0';
-		else if (s[0] == '-' && i == 0)
-			flag = 1;
-		else
-			break;
-	}
-	if (flag == 1)
-		num = num * -1;
-	return num;
-}
-
 void *rtw_malloc2d(int h, int w, int size)
 {
 	int j;
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 26/47] staging: r8188eu: remove rtw_cbuf_push()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (24 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 25/47] staging: r8188eu: remove rtw_atoi() Michael Straube
@ 2021-09-22 20:03 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 27/47] staging: r8188eu: remove rtw_cbuf_full() Michael Straube
                   ` (20 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:03 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_cbuf_push() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 .../staging/r8188eu/include/osdep_service.h   |  1 -
 .../staging/r8188eu/os_dep/osdep_service.c    | 21 -------------------
 2 files changed, 22 deletions(-)

diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index b9b87f2317a1..59747822148e 100644
--- a/drivers/staging/r8188eu/include/osdep_service.h
+++ b/drivers/staging/r8188eu/include/osdep_service.h
@@ -294,7 +294,6 @@ struct rtw_cbuf {
 
 bool rtw_cbuf_full(struct rtw_cbuf *cbuf);
 bool rtw_cbuf_empty(struct rtw_cbuf *cbuf);
-bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf);
 void *rtw_cbuf_pop(struct rtw_cbuf *cbuf);
 struct rtw_cbuf *rtw_cbuf_alloc(u32 size);
 int wifirate2_ratetbl_inx(unsigned char rate);
diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index 489a7d33b212..8b0c8429e836 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -245,27 +245,6 @@ inline bool rtw_cbuf_empty(struct rtw_cbuf *cbuf)
 	return (cbuf->write == cbuf->read) ? true : false;
 }
 
-/**
- * rtw_cbuf_push - push a pointer into cbuf
- * @cbuf: pointer of struct rtw_cbuf
- * @buf: pointer to push in
- *
- * Lock free operation, be careful of the use scheme
- * Returns: true push success
- */
-bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf)
-{
-	if (rtw_cbuf_full(cbuf))
-		return _FAIL;
-
-	if (0)
-		DBG_88E("%s on %u\n", __func__, cbuf->write);
-	cbuf->bufs[cbuf->write] = buf;
-	cbuf->write = (cbuf->write + 1) % cbuf->size;
-
-	return _SUCCESS;
-}
-
 /**
  * rtw_cbuf_pop - pop a pointer from cbuf
  * @cbuf: pointer of struct rtw_cbuf
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 27/47] staging: r8188eu: remove rtw_cbuf_full()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (25 preceding siblings ...)
  2021-09-22 20:03 ` [PATCH 26/47] staging: r8188eu: remove rtw_cbuf_push() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 28/47] staging: r8188eu: remove rtw_os_read_port() Michael Straube
                   ` (19 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_cbuf_full() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/include/osdep_service.h |  1 -
 drivers/staging/r8188eu/os_dep/osdep_service.c  | 11 -----------
 2 files changed, 12 deletions(-)

diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index 59747822148e..da85a9681c4a 100644
--- a/drivers/staging/r8188eu/include/osdep_service.h
+++ b/drivers/staging/r8188eu/include/osdep_service.h
@@ -292,7 +292,6 @@ struct rtw_cbuf {
 	void *bufs[0];
 };
 
-bool rtw_cbuf_full(struct rtw_cbuf *cbuf);
 bool rtw_cbuf_empty(struct rtw_cbuf *cbuf);
 void *rtw_cbuf_pop(struct rtw_cbuf *cbuf);
 struct rtw_cbuf *rtw_cbuf_alloc(u32 size);
diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index 8b0c8429e836..026c5627736a 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -223,17 +223,6 @@ void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)
 	kfree(ori);
 }
 
-/**
- * rtw_cbuf_full - test if cbuf is full
- * @cbuf: pointer of struct rtw_cbuf
- *
- * Returns: true if cbuf is full
- */
-inline bool rtw_cbuf_full(struct rtw_cbuf *cbuf)
-{
-	return (cbuf->write == cbuf->read - 1) ? true : false;
-}
-
 /**
  * rtw_cbuf_empty - test if cbuf is empty
  * @cbuf: pointer of struct rtw_cbuf
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 28/47] staging: r8188eu: remove rtw_os_read_port()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (26 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 27/47] staging: r8188eu: remove rtw_cbuf_full() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 29/47] staging: r8188eu: remove rtw_IOL_cmd_buf_dump() Michael Straube
                   ` (18 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_os_read_port() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/include/recv_osdep.h |  2 --
 drivers/staging/r8188eu/os_dep/recv_linux.c  | 14 --------------
 2 files changed, 16 deletions(-)

diff --git a/drivers/staging/r8188eu/include/recv_osdep.h b/drivers/staging/r8188eu/include/recv_osdep.h
index 72ddf515071e..e87467022b39 100644
--- a/drivers/staging/r8188eu/include/recv_osdep.h
+++ b/drivers/staging/r8188eu/include/recv_osdep.h
@@ -27,8 +27,6 @@ void rtw_os_recv_resource_free(struct recv_priv *precvpriv);
 int rtw_os_recvbuf_resource_alloc(struct adapter *adapt, struct recv_buf *buf);
 int rtw_os_recvbuf_resource_free(struct adapter *adapt, struct recv_buf *buf);
 
-void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf);
-
 void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl);
 int _netdev_open(struct net_device *pnetdev);
 int netdev_open(struct net_device *pnetdev);
diff --git a/drivers/staging/r8188eu/os_dep/recv_linux.c b/drivers/staging/r8188eu/os_dep/recv_linux.c
index 917a63e3e94c..5a7fb94e21c1 100644
--- a/drivers/staging/r8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/r8188eu/os_dep/recv_linux.c
@@ -186,20 +186,6 @@ int rtw_recv_indicatepkt(struct adapter *padapter,
 	 return _FAIL;
 }
 
-void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf)
-{
-	struct recv_priv *precvpriv = &padapter->recvpriv;
-
-	precvbuf->ref_cnt--;
-	/* free skb in recv_buf */
-	dev_kfree_skb_any(precvbuf->pskb);
-	precvbuf->pskb = NULL;
-	precvbuf->reuse = false;
-	if (!precvbuf->irp_pending)
-		rtw_read_port(padapter, precvpriv->ff_hwaddr, 0,
-			      (unsigned char *)precvbuf);
-}
-
 static void _rtw_reordering_ctrl_timeout_handler(struct timer_list *t)
 {
 	struct recv_reorder_ctrl *preorder_ctrl;
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 29/47] staging: r8188eu: remove rtw_IOL_cmd_buf_dump()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (27 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 28/47] staging: r8188eu: remove rtw_os_read_port() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 30/47] staging: r8188eu: remove action_public_str() Michael Straube
                   ` (17 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_IOL_cmd_buf_dump() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_iol.c    | 17 -----------------
 drivers/staging/r8188eu/include/rtw_iol.h |  1 -
 2 files changed, 18 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_iol.c b/drivers/staging/r8188eu/core/rtw_iol.c
index ee7cda76e767..fe6078864158 100644
--- a/drivers/staging/r8188eu/core/rtw_iol.c
+++ b/drivers/staging/r8188eu/core/rtw_iol.c
@@ -163,20 +163,3 @@ u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame)
 	}
 	return is_cmd_bndy;
 }
-
-void rtw_IOL_cmd_buf_dump(int buf_len, u8 *pbuf)
-{
-	int i;
-	int j = 1;
-
-	pr_info("###### %s ######\n", __func__);
-	for (i = 0; i < buf_len; i++) {
-		printk("%02x-", *(pbuf + i));
-
-		if (j % 32 == 0)
-			printk("\n");
-		j++;
-	}
-	printk("\n");
-	pr_info("=============ioreg_cmd len=%d===============\n", buf_len);
-}
diff --git a/drivers/staging/r8188eu/include/rtw_iol.h b/drivers/staging/r8188eu/include/rtw_iol.h
index 4d44e59fd04f..fb88ebc1dabb 100644
--- a/drivers/staging/r8188eu/include/rtw_iol.h
+++ b/drivers/staging/r8188eu/include/rtw_iol.h
@@ -59,6 +59,5 @@ int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path,
 	_rtw_IOL_append_WRF_cmd((xmit_frame),(rf_path), (addr), (value), (mask))
 
 u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame);
-void  rtw_IOL_cmd_buf_dump(int buf_len, u8 *pbuf);
 
 #endif /* __RTW_IOL_H_ */
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 30/47] staging: r8188eu: remove action_public_str()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (28 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 29/47] staging: r8188eu: remove rtw_IOL_cmd_buf_dump() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 31/47] staging: r8188eu: remove dump_ies() Michael Straube
                   ` (16 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function action_public_str() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 26 --------------------
 drivers/staging/r8188eu/include/ieee80211.h  |  1 -
 2 files changed, 27 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index 5f8bd8cd886d..7dc40d6a5de1 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -1495,29 +1495,3 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act
 
 	return true;
 }
-
-static const char *_action_public_str[] = {
-	"ACT_PUB_BSSCOEXIST",
-	"ACT_PUB_DSE_ENABLE",
-	"ACT_PUB_DSE_DEENABLE",
-	"ACT_PUB_DSE_REG_LOCATION",
-	"ACT_PUB_EXT_CHL_SWITCH",
-	"ACT_PUB_DSE_MSR_REQ",
-	"ACT_PUB_DSE_MSR_RPRT",
-	"ACT_PUB_MP",
-	"ACT_PUB_DSE_PWR_CONSTRAINT",
-	"ACT_PUB_VENDOR",
-	"ACT_PUB_GAS_INITIAL_REQ",
-	"ACT_PUB_GAS_INITIAL_RSP",
-	"ACT_PUB_GAS_COMEBACK_REQ",
-	"ACT_PUB_GAS_COMEBACK_RSP",
-	"ACT_PUB_TDLS_DISCOVERY_RSP",
-	"ACT_PUB_LOCATION_TRACK",
-	"ACT_PUB_RSVD",
-};
-
-const char *action_public_str(u8 action)
-{
-	action = (action >= ACT_PUBLIC_MAX) ? ACT_PUBLIC_MAX : action;
-	return _action_public_str[action];
-}
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index d64358ab8503..c6acb48059f7 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -1181,6 +1181,5 @@ u16 rtw_mcs_rate(u8 rf_type, u8 bw_40MHz, u8 short_GI_20, u8 short_GI_40,
 
 int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category,
 			   u8 *action);
-const char *action_public_str(u8 action);
 
 #endif /* IEEE80211_H */
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 31/47] staging: r8188eu: remove dump_ies()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (29 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 30/47] staging: r8188eu: remove action_public_str() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 32/47] staging: r8188eu: remove hal_ch_offset_to_secondary_ch_offset() Michael Straube
                   ` (15 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function dump_ies() is not used, remove it. It is the only user of
the functions dump_{wps,p2p}_ie(), remove these as well.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 59 --------------------
 drivers/staging/r8188eu/include/ieee80211.h  |  4 --
 2 files changed, 63 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index 7dc40d6a5de1..182164e17b3f 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -1041,65 +1041,6 @@ void rtw_macaddr_cfg(u8 *mac_addr)
 	DBG_88E("rtw_macaddr_cfg MAC Address  = %pM\n", mac_addr);
 }
 
-void dump_ies(u8 *buf, u32 buf_len)
-{
-	u8 *pos = (u8 *)buf;
-	u8 id, len;
-
-	while (pos - buf <= buf_len) {
-		id = *pos;
-		len = *(pos + 1);
-
-		DBG_88E("%s ID:%u, LEN:%u\n", __func__, id, len);
-		dump_p2p_ie(pos, len);
-		dump_wps_ie(pos, len);
-
-		pos += (2 + len);
-	}
-}
-
-void dump_wps_ie(u8 *ie, u32 ie_len)
-{
-	u8 *pos = (u8 *)ie;
-	u16 id;
-	u16 len;
-	u8 *wps_ie;
-	uint wps_ielen;
-
-	wps_ie = rtw_get_wps_ie(ie, ie_len, NULL, &wps_ielen);
-	if (wps_ie != ie || wps_ielen == 0)
-		return;
-
-	pos += 6;
-	while (pos - ie < ie_len) {
-		id = RTW_GET_BE16(pos);
-		len = RTW_GET_BE16(pos + 2);
-		DBG_88E("%s ID:0x%04x, LEN:%u\n", __func__, id, len);
-		pos += (4 + len);
-	}
-}
-
-void dump_p2p_ie(u8 *ie, u32 ie_len)
-{
-	u8 *pos = (u8 *)ie;
-	u8 id;
-	u16 len;
-	u8 *p2p_ie;
-	uint p2p_ielen;
-
-	p2p_ie = rtw_get_p2p_ie(ie, ie_len, NULL, &p2p_ielen);
-	if (p2p_ie != ie || p2p_ielen == 0)
-		return;
-
-	pos += 6;
-	while (pos - ie < ie_len) {
-		id = *pos;
-		len = get_unaligned_le16(pos + 1);
-		DBG_88E("%s ID:%u, LEN:%u\n", __func__, id, len);
-		pos += (3 + len);
-	}
-}
-
 /**
  * rtw_get_p2p_ie - Search P2P IE from a series of IEs
  * @in_ie: Address of IEs to search
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index c6acb48059f7..09d27a0b6476 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -1146,10 +1146,6 @@ u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id,
 	for (ie = (void *)buf; (((u8 *)ie) - ((u8 *)buf) + 1) < buf_len;	\
 		ie = (void *)(((u8 *)ie) + *(((u8 *)ie)+1) + 2))
 
-void dump_ies(u8 *buf, u32 buf_len);
-void dump_wps_ie(u8 *ie, u32 ie_len);
-
-void dump_p2p_ie(u8 *ie, u32 ie_len);
 u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen);
 u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id,
 		     u8 *buf_attr, u32 *len_attr);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 32/47] staging: r8188eu: remove hal_ch_offset_to_secondary_ch_offset()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (30 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 31/47] staging: r8188eu: remove dump_ies() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 33/47] staging: r8188eu: remove secondary_ch_offset_to_hal_ch_offset() Michael Straube
                   ` (14 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function hal_ch_offset_to_secondary_ch_offset() is not used, remove
it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 12 ------------
 drivers/staging/r8188eu/include/ieee80211.h  |  1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index 182164e17b3f..9379beeccede 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -163,18 +163,6 @@ inline u8 secondary_ch_offset_to_hal_ch_offset(u8 ch_offset)
 	return HAL_PRIME_CHNL_OFFSET_DONT_CARE;
 }
 
-inline u8 hal_ch_offset_to_secondary_ch_offset(u8 ch_offset)
-{
-	if (ch_offset == HAL_PRIME_CHNL_OFFSET_DONT_CARE)
-		return SCN;
-	else if (ch_offset == HAL_PRIME_CHNL_OFFSET_LOWER)
-		return SCB;
-	else if (ch_offset == HAL_PRIME_CHNL_OFFSET_UPPER)
-		return SCA;
-
-	return SCN;
-}
-
 inline u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len, u8 secondary_ch_offset)
 {
 	return rtw_set_ie(buf, WLAN_EID_SECONDARY_CHANNEL_OFFSET,  1, &secondary_ch_offset, buf_len);
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index 09d27a0b6476..2545d7ca82d9 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -1100,7 +1100,6 @@ enum secondary_ch_offset {
 	SCB = 3,  /* secondary channel below */
 };
 u8 secondary_ch_offset_to_hal_ch_offset(u8 ch_offset);
-u8 hal_ch_offset_to_secondary_ch_offset(u8 ch_offset);
 u8 *rtw_set_ie_ch_switch(u8 *buf, u32 *buf_len, u8 ch_switch_mode,
 			 u8 new_ch, u8 ch_switch_cnt);
 u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len,
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 33/47] staging: r8188eu: remove secondary_ch_offset_to_hal_ch_offset()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (31 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 32/47] staging: r8188eu: remove hal_ch_offset_to_secondary_ch_offset() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 34/47] staging: r8188eu: remove ieee80211_get_hdrlen() Michael Straube
                   ` (13 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function secondary_ch_offset_to_hal_ch_offset() is not used, remove
it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 12 ------------
 drivers/staging/r8188eu/include/ieee80211.h  |  1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index 9379beeccede..3f0c1a78ccb1 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -151,18 +151,6 @@ inline u8 *rtw_set_ie_ch_switch(u8 *buf, u32 *buf_len, u8 ch_switch_mode,
 	return rtw_set_ie(buf, WLAN_EID_CHANNEL_SWITCH,  3, ie_data, buf_len);
 }
 
-inline u8 secondary_ch_offset_to_hal_ch_offset(u8 ch_offset)
-{
-	if (ch_offset == SCN)
-		return HAL_PRIME_CHNL_OFFSET_DONT_CARE;
-	else if (ch_offset == SCA)
-		return HAL_PRIME_CHNL_OFFSET_UPPER;
-	else if (ch_offset == SCB)
-		return HAL_PRIME_CHNL_OFFSET_LOWER;
-
-	return HAL_PRIME_CHNL_OFFSET_DONT_CARE;
-}
-
 inline u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len, u8 secondary_ch_offset)
 {
 	return rtw_set_ie(buf, WLAN_EID_SECONDARY_CHANNEL_OFFSET,  1, &secondary_ch_offset, buf_len);
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index 2545d7ca82d9..8df83481bf47 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -1099,7 +1099,6 @@ enum secondary_ch_offset {
 	SCA = 1, /* secondary channel above */
 	SCB = 3,  /* secondary channel below */
 };
-u8 secondary_ch_offset_to_hal_ch_offset(u8 ch_offset);
 u8 *rtw_set_ie_ch_switch(u8 *buf, u32 *buf_len, u8 ch_switch_mode,
 			 u8 new_ch, u8 ch_switch_cnt);
 u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len,
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 34/47] staging: r8188eu: remove ieee80211_get_hdrlen()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (32 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 33/47] staging: r8188eu: remove secondary_ch_offset_to_hal_ch_offset() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 35/47] staging: r8188eu: remove ieee80211_is_empty_essid() Michael Straube
                   ` (12 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function ieee80211_get_hdrlen() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 27 --------------------
 drivers/staging/r8188eu/include/ieee80211.h  |  1 -
 2 files changed, 28 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index 3f0c1a78ccb1..956b9bafcdd1 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -1214,33 +1214,6 @@ int ieee80211_is_empty_essid(const char *essid, int essid_len)
 	return 1;
 }
 
-int ieee80211_get_hdrlen(u16 fc)
-{
-	int hdrlen = 24;
-
-	switch (WLAN_FC_GET_TYPE(fc)) {
-	case RTW_IEEE80211_FTYPE_DATA:
-		if (fc & RTW_IEEE80211_STYPE_QOS_DATA)
-			hdrlen += 2;
-		if ((fc & RTW_IEEE80211_FCTL_FROMDS) && (fc & RTW_IEEE80211_FCTL_TODS))
-			hdrlen += 6; /* Addr4 */
-		break;
-	case RTW_IEEE80211_FTYPE_CTL:
-		switch (WLAN_FC_GET_STYPE(fc)) {
-		case RTW_IEEE80211_STYPE_CTS:
-		case RTW_IEEE80211_STYPE_ACK:
-			hdrlen = 10;
-			break;
-		default:
-			hdrlen = 16;
-			break;
-		}
-		break;
-	}
-
-	return hdrlen;
-}
-
 static int rtw_get_cipher_info(struct wlan_network *pnetwork)
 {
 	u32 wpa_ielen;
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index 8df83481bf47..7e9520c7fac5 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -890,7 +890,6 @@ struct tx_pending {
 
 /* Baron move to ieee80211.c */
 int ieee80211_is_empty_essid(const char *essid, int essid_len);
-int ieee80211_get_hdrlen(u16 fc);
 
 /* Action category code */
 enum rtw_ieee80211_category {
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 35/47] staging: r8188eu: remove ieee80211_is_empty_essid()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (33 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 34/47] staging: r8188eu: remove ieee80211_get_hdrlen() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 36/47] staging: r8188eu: remove rtw_action_frame_parse() Michael Straube
                   ` (11 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function ieee80211_is_empty_essid() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 17 -----------------
 drivers/staging/r8188eu/include/ieee80211.h  |  3 ---
 2 files changed, 20 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index 956b9bafcdd1..29bf3bdb598b 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -1197,23 +1197,6 @@ void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex, u8 attr_id)
 	}
 }
 
-/* Baron adds to avoid FreeBSD warning */
-int ieee80211_is_empty_essid(const char *essid, int essid_len)
-{
-	/* Single white space is for Linksys APs */
-	if (essid_len == 1 && essid[0] == ' ')
-		return 1;
-
-	/* Otherwise, if the entire essid is 0, we assume it is hidden */
-	while (essid_len) {
-		essid_len--;
-		if (essid[essid_len] != '\0')
-			return 0;
-	}
-
-	return 1;
-}
-
 static int rtw_get_cipher_info(struct wlan_network *pnetwork)
 {
 	u32 wpa_ielen;
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index 7e9520c7fac5..af1e074e0bdf 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -888,9 +888,6 @@ struct tx_pending {
 #define IEEE_G	    (1<<2)
 #define IEEE_MODE_MASK    (IEEE_A|IEEE_B|IEEE_G)
 
-/* Baron move to ieee80211.c */
-int ieee80211_is_empty_essid(const char *essid, int essid_len);
-
 /* Action category code */
 enum rtw_ieee80211_category {
 	RTW_WLAN_CATEGORY_SPECTRUM_MGMT = 0,
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 36/47] staging: r8188eu: remove rtw_action_frame_parse()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (34 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 35/47] staging: r8188eu: remove ieee80211_is_empty_essid() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 37/47] staging: r8188eu: remove rtw_ies_remove_ie() Michael Straube
                   ` (10 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_action_frame_parse() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 29 --------------------
 drivers/staging/r8188eu/include/ieee80211.h  |  3 --
 2 files changed, 32 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index 29bf3bdb598b..bc7ab84c0e05 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -1339,32 +1339,3 @@ u16 rtw_mcs_rate(u8 rf_type, u8 bw_40MHz, u8 short_GI_20, u8 short_GI_40, unsign
 	}
 	return max_rate;
 }
-
-int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *action)
-{
-	const u8 *frame_body = frame + sizeof(struct rtw_ieee80211_hdr_3addr);
-	u16 fc;
-	u8 c, a = 0;
-
-	fc = le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)frame)->frame_ctl);
-
-	if ((fc & (RTW_IEEE80211_FCTL_FTYPE | RTW_IEEE80211_FCTL_STYPE)) !=
-	    (RTW_IEEE80211_FTYPE_MGMT | RTW_IEEE80211_STYPE_ACTION))
-		return false;
-
-	c = frame_body[0];
-
-	switch (c) {
-	case RTW_WLAN_CATEGORY_P2P: /* vendor-specific */
-		break;
-	default:
-		a = frame_body[1];
-	}
-
-	if (category)
-		*category = c;
-	if (action)
-		*action = a;
-
-	return true;
-}
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index af1e074e0bdf..36c95adb9d85 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -1169,7 +1169,4 @@ void rtw_macaddr_cfg(u8 *mac_addr);
 u16 rtw_mcs_rate(u8 rf_type, u8 bw_40MHz, u8 short_GI_20, u8 short_GI_40,
 		 unsigned char *MCS_rate);
 
-int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category,
-			   u8 *action);
-
 #endif /* IEEE80211_H */
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 37/47] staging: r8188eu: remove rtw_ies_remove_ie()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (35 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 36/47] staging: r8188eu: remove rtw_action_frame_parse() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 38/47] staging: r8188eu: remove rtw_set_ie_ch_switch() Michael Straube
                   ` (9 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_ies_remove_ie() is not used, remove it. It is the only
user of rtw_get_ie_ex(), remove that function as well.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 90 --------------------
 drivers/staging/r8188eu/include/ieee80211.h  |  4 -
 2 files changed, 94 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index bc7ab84c0e05..b2a376867c54 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -201,96 +201,6 @@ u8 *rtw_get_ie(u8 *pbuf, int index, int *len, int limit)
 	return NULL;
 }
 
-/**
- * rtw_get_ie_ex - Search specific IE from a series of IEs
- * @in_ie: Address of IEs to search
- * @in_len: Length limit from in_ie
- * @eid: Element ID to match
- * @oui: OUI to match
- * @oui_len: OUI length
- * @ie: If not NULL and the specific IE is found, the IE will be copied to the buf starting from the specific IE
- * @ielen: If not NULL and the specific IE is found, will set to the length of the entire IE
- *
- * Returns: The address of the specific IE found, or NULL
- */
-u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, uint *ielen)
-{
-	uint cnt;
-	u8 *target_ie = NULL;
-
-	if (ielen)
-		*ielen = 0;
-
-	if (!in_ie || in_len <= 0)
-		return target_ie;
-
-	cnt = 0;
-
-	while (cnt < in_len) {
-		if (eid == in_ie[cnt] && (!oui || !memcmp(&in_ie[cnt + 2], oui, oui_len))) {
-			target_ie = &in_ie[cnt];
-
-			if (ie)
-				memcpy(ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
-
-			if (ielen)
-				*ielen = in_ie[cnt + 1] + 2;
-
-			break;
-		} else {
-			cnt += in_ie[cnt + 1] + 2; /* goto next */
-		}
-	}
-	return target_ie;
-}
-
-/**
- * rtw_ies_remove_ie - Find matching IEs and remove
- * @ies: Address of IEs to search
- * @ies_len: Pointer of length of ies, will update to new length
- * @offset: The offset to start scarch
- * @eid: Element ID to match
- * @oui: OUI to match
- * @oui_len: OUI length
- *
- * Returns: _SUCCESS: ies is updated, _FAIL: not updated
- */
-int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 oui_len)
-{
-	int ret = _FAIL;
-	u8 *target_ie;
-	u32 target_ielen;
-	u8 *start;
-	uint search_len;
-
-	if (!ies || !ies_len || *ies_len <= offset)
-		goto exit;
-
-	start = ies + offset;
-	search_len = *ies_len - offset;
-
-	while (1) {
-		target_ie = rtw_get_ie_ex(start, search_len, eid, oui, oui_len, NULL, &target_ielen);
-		if (target_ie && target_ielen) {
-			u8 buf[MAX_IE_SZ] = {0};
-			u8 *remain_ies = target_ie + target_ielen;
-			uint remain_len = search_len - (remain_ies - start);
-
-			memcpy(buf, remain_ies, remain_len);
-			memcpy(target_ie, buf, remain_len);
-			*ies_len = *ies_len - target_ielen;
-			ret = _SUCCESS;
-
-			start = target_ie;
-			search_len = remain_len;
-		} else {
-			break;
-		}
-	}
-exit:
-	return ret;
-}
-
 void rtw_set_supported_rate(u8 *SupportedRates, uint mode)
 {
 
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index 36c95adb9d85..65e21d5d5b46 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -1103,10 +1103,6 @@ u8 *rtw_set_ie_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl,
 				   u8 flags, u16 reason, u16 precedence);
 
 u8 *rtw_get_ie(u8 *pbuf, int index, int *len, int limit);
-u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui,
-		  u8 oui_len, u8 *ie, uint *ielen);
-int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset,
-		      u8 eid, u8 *oui, u8 oui_len);
 
 void rtw_set_supported_rate(u8 *SupportedRates, uint mode);
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 38/47] staging: r8188eu: remove rtw_set_ie_ch_switch()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (36 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 37/47] staging: r8188eu: remove rtw_ies_remove_ie() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 39/47] staging: r8188eu: remove rtw_set_ie_mesh_ch_switch_parm() Michael Straube
                   ` (8 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_set_ie_ch_switch() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 11 -----------
 drivers/staging/r8188eu/include/ieee80211.h  |  2 --
 2 files changed, 13 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index b2a376867c54..06445a4192a0 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -140,17 +140,6 @@ u8 *rtw_set_ie
 	return pbuf + len + 2;
 }
 
-inline u8 *rtw_set_ie_ch_switch(u8 *buf, u32 *buf_len, u8 ch_switch_mode,
-	u8 new_ch, u8 ch_switch_cnt)
-{
-	u8 ie_data[3];
-
-	ie_data[0] = ch_switch_mode;
-	ie_data[1] = new_ch;
-	ie_data[2] = ch_switch_cnt;
-	return rtw_set_ie(buf, WLAN_EID_CHANNEL_SWITCH,  3, ie_data, buf_len);
-}
-
 inline u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len, u8 secondary_ch_offset)
 {
 	return rtw_set_ie(buf, WLAN_EID_SECONDARY_CHANNEL_OFFSET,  1, &secondary_ch_offset, buf_len);
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index 65e21d5d5b46..ba3b414aae71 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -1095,8 +1095,6 @@ enum secondary_ch_offset {
 	SCA = 1, /* secondary channel above */
 	SCB = 3,  /* secondary channel below */
 };
-u8 *rtw_set_ie_ch_switch(u8 *buf, u32 *buf_len, u8 ch_switch_mode,
-			 u8 new_ch, u8 ch_switch_cnt);
 u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len,
 				   u8 secondary_ch_offset);
 u8 *rtw_set_ie_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl,
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 39/47] staging: r8188eu: remove rtw_set_ie_mesh_ch_switch_parm()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (37 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 38/47] staging: r8188eu: remove rtw_set_ie_ch_switch() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 40/47] staging: r8188eu: remove rtw_set_ie_secondary_ch_offset() Michael Straube
                   ` (7 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_set_ie_mesh_ch_switch_parm() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 13 -------------
 drivers/staging/r8188eu/include/ieee80211.h  |  2 --
 2 files changed, 15 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index 06445a4192a0..cc053a5d0f01 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -145,19 +145,6 @@ inline u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len, u8 secondary_ch
 	return rtw_set_ie(buf, WLAN_EID_SECONDARY_CHANNEL_OFFSET,  1, &secondary_ch_offset, buf_len);
 }
 
-inline u8 *rtw_set_ie_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl,
-	u8 flags, u16 reason, u16 precedence)
-{
-	u8 ie_data[6];
-
-	ie_data[0] = ttl;
-	ie_data[1] = flags;
-	*(u16 *)(ie_data + 2) = cpu_to_le16(reason);
-	*(u16 *)(ie_data + 4) = cpu_to_le16(precedence);
-
-	return rtw_set_ie(buf, 0x118,  6, ie_data, buf_len);
-}
-
 /*----------------------------------------------------------------------------
 index: the information element id index, limit is the limit for search
 -----------------------------------------------------------------------------*/
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index ba3b414aae71..d97ba27f7f72 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -1097,8 +1097,6 @@ enum secondary_ch_offset {
 };
 u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len,
 				   u8 secondary_ch_offset);
-u8 *rtw_set_ie_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl,
-				   u8 flags, u16 reason, u16 precedence);
 
 u8 *rtw_get_ie(u8 *pbuf, int index, int *len, int limit);
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 40/47] staging: r8188eu: remove rtw_set_ie_secondary_ch_offset()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (38 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 39/47] staging: r8188eu: remove rtw_set_ie_mesh_ch_switch_parm() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 41/47] staging: r8188eu: remove enum secondary_ch_offset Michael Straube
                   ` (6 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_set_ie_secondary_ch_offset() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 5 -----
 drivers/staging/r8188eu/include/ieee80211.h  | 2 --
 2 files changed, 7 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index cc053a5d0f01..343c2f9a4ce8 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -140,11 +140,6 @@ u8 *rtw_set_ie
 	return pbuf + len + 2;
 }
 
-inline u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len, u8 secondary_ch_offset)
-{
-	return rtw_set_ie(buf, WLAN_EID_SECONDARY_CHANNEL_OFFSET,  1, &secondary_ch_offset, buf_len);
-}
-
 /*----------------------------------------------------------------------------
 index: the information element id index, limit is the limit for search
 -----------------------------------------------------------------------------*/
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index d97ba27f7f72..f0d5a640143f 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -1095,8 +1095,6 @@ enum secondary_ch_offset {
 	SCA = 1, /* secondary channel above */
 	SCB = 3,  /* secondary channel below */
 };
-u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len,
-				   u8 secondary_ch_offset);
 
 u8 *rtw_get_ie(u8 *pbuf, int index, int *len, int limit);
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 41/47] staging: r8188eu: remove enum secondary_ch_offset
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (39 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 40/47] staging: r8188eu: remove rtw_set_ie_secondary_ch_offset() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 42/47] staging: r8188eu: remove rtw_dequeue_recvbuf() Michael Straube
                   ` (5 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

The enum secondary_ch_offset is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/include/ieee80211.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index f0d5a640143f..b2b0d8ee903f 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -1089,13 +1089,6 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
 u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len,
 		     unsigned char *source, unsigned int *frlen);
 u8 *rtw_set_ie(u8 *pbuf, int index, uint len, u8 *source, uint *frlen);
-
-enum secondary_ch_offset {
-	SCN = 0, /* no secondary channel */
-	SCA = 1, /* secondary channel above */
-	SCB = 3,  /* secondary channel below */
-};
-
 u8 *rtw_get_ie(u8 *pbuf, int index, int *len, int limit);
 
 void rtw_set_supported_rate(u8 *SupportedRates, uint mode);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 42/47] staging: r8188eu: remove rtw_dequeue_recvbuf()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (40 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 41/47] staging: r8188eu: remove enum secondary_ch_offset Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 43/47] staging: r8188eu: remove rtw_enqueue_recvbuf() Michael Straube
                   ` (4 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_dequeue_recvbuf() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_recv.c    | 25 ----------------------
 drivers/staging/r8188eu/include/rtw_recv.h |  1 -
 2 files changed, 26 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 983505aac213..ad60967943c2 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -282,31 +282,6 @@ int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue)
 	return _SUCCESS;
 }
 
-struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue)
-{
-	struct recv_buf *precvbuf;
-	struct list_head *plist, *phead;
-	unsigned long flags;
-
-	spin_lock_irqsave(&queue->lock, flags);
-
-	if (list_empty(&queue->queue)) {
-		precvbuf = NULL;
-	} else {
-		phead = get_list_head(queue);
-
-		plist = phead->next;
-
-		precvbuf = container_of(plist, struct recv_buf, list);
-
-		list_del_init(&precvbuf->list);
-	}
-
-	spin_unlock_irqrestore(&queue->lock, flags);
-
-	return precvbuf;
-}
-
 static int recvframe_chkmic(struct adapter *adapter,  struct recv_frame *precvframe)
 {
 	int	i, res = _SUCCESS;
diff --git a/drivers/staging/r8188eu/include/rtw_recv.h b/drivers/staging/r8188eu/include/rtw_recv.h
index d1d1ca0e56d6..67042c7a781c 100644
--- a/drivers/staging/r8188eu/include/rtw_recv.h
+++ b/drivers/staging/r8188eu/include/rtw_recv.h
@@ -286,7 +286,6 @@ void rtw_free_recvframe_queue(struct __queue *pframequeue,
 u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
 int rtw_enqueue_recvbuf_to_head(struct recv_buf *buf, struct __queue *queue);
 int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
-struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue);
 
 void rtw_reordering_ctrl_timeout_handler(void *pcontext);
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 43/47] staging: r8188eu: remove rtw_enqueue_recvbuf()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (41 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 42/47] staging: r8188eu: remove rtw_dequeue_recvbuf() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 44/47] staging: r8188eu: remove rtw_enqueue_recvbuf_to_head() Michael Straube
                   ` (3 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_enqueue_recvbuf() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_recv.c    | 13 -------------
 drivers/staging/r8188eu/include/rtw_recv.h |  1 -
 2 files changed, 14 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index ad60967943c2..1e05437a1a8d 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -269,19 +269,6 @@ int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue
 	return _SUCCESS;
 }
 
-int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&queue->lock, flags);
-
-	list_del_init(&precvbuf->list);
-
-	list_add_tail(&precvbuf->list, get_list_head(queue));
-	spin_unlock_irqrestore(&queue->lock, flags);
-	return _SUCCESS;
-}
-
 static int recvframe_chkmic(struct adapter *adapter,  struct recv_frame *precvframe)
 {
 	int	i, res = _SUCCESS;
diff --git a/drivers/staging/r8188eu/include/rtw_recv.h b/drivers/staging/r8188eu/include/rtw_recv.h
index 67042c7a781c..065942e816c6 100644
--- a/drivers/staging/r8188eu/include/rtw_recv.h
+++ b/drivers/staging/r8188eu/include/rtw_recv.h
@@ -285,7 +285,6 @@ void rtw_free_recvframe_queue(struct __queue *pframequeue,
 			      struct __queue *pfree_recv_queue);
 u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
 int rtw_enqueue_recvbuf_to_head(struct recv_buf *buf, struct __queue *queue);
-int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
 
 void rtw_reordering_ctrl_timeout_handler(void *pcontext);
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 44/47] staging: r8188eu: remove rtw_enqueue_recvbuf_to_head()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (42 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 43/47] staging: r8188eu: remove rtw_enqueue_recvbuf() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 45/47] staging: r8188eu: remove rtw_init_recvframe() Michael Straube
                   ` (2 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_enqueue_recvbuf_to_head() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_recv.c    | 12 ------------
 drivers/staging/r8188eu/include/rtw_recv.h |  1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 1e05437a1a8d..3f0c4d9d239d 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -257,18 +257,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter)
 	return cnt;
 }
 
-int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue)
-{
-	spin_lock_bh(&queue->lock);
-
-	list_del_init(&precvbuf->list);
-	list_add(&precvbuf->list, get_list_head(queue));
-
-	spin_unlock_bh(&queue->lock);
-
-	return _SUCCESS;
-}
-
 static int recvframe_chkmic(struct adapter *adapter,  struct recv_frame *precvframe)
 {
 	int	i, res = _SUCCESS;
diff --git a/drivers/staging/r8188eu/include/rtw_recv.h b/drivers/staging/r8188eu/include/rtw_recv.h
index 065942e816c6..d35a9276350f 100644
--- a/drivers/staging/r8188eu/include/rtw_recv.h
+++ b/drivers/staging/r8188eu/include/rtw_recv.h
@@ -284,7 +284,6 @@ int rtw_enqueue_recvframe(struct recv_frame *precvframe, struct __queue *queue);
 void rtw_free_recvframe_queue(struct __queue *pframequeue,
 			      struct __queue *pfree_recv_queue);
 u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
-int rtw_enqueue_recvbuf_to_head(struct recv_buf *buf, struct __queue *queue);
 
 void rtw_reordering_ctrl_timeout_handler(void *pcontext);
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 45/47] staging: r8188eu: remove rtw_init_recvframe()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (43 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 44/47] staging: r8188eu: remove rtw_enqueue_recvbuf_to_head() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 46/47] staging: r8188eu: remove rtw_calculate_wlan_pkt_size_by_attribue() Michael Straube
  2021-09-22 20:04 ` [PATCH 47/47] staging: r8188eu: remove rtw_sctx_done() Michael Straube
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_init_recvframe() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_recv.c    | 8 --------
 drivers/staging/r8188eu/include/rtw_recv.h | 2 --
 2 files changed, 10 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 3f0c4d9d239d..5ac63bd6dd8e 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -147,14 +147,6 @@ struct recv_frame *rtw_alloc_recvframe(struct __queue *pfree_recv_queue)
 	return precvframe;
 }
 
-void rtw_init_recvframe(struct recv_frame *precvframe, struct recv_priv *precvpriv)
-{
-	/* Perry: This can be removed */
-	INIT_LIST_HEAD(&precvframe->list);
-
-	precvframe->len = 0;
-}
-
 int rtw_free_recvframe(struct recv_frame *precvframe, struct __queue *pfree_recv_queue)
 {
 	struct adapter *padapter;
diff --git a/drivers/staging/r8188eu/include/rtw_recv.h b/drivers/staging/r8188eu/include/rtw_recv.h
index d35a9276350f..0b1fc752b0c1 100644
--- a/drivers/staging/r8188eu/include/rtw_recv.h
+++ b/drivers/staging/r8188eu/include/rtw_recv.h
@@ -274,8 +274,6 @@ struct recv_frame {
 
 struct recv_frame *_rtw_alloc_recvframe(struct __queue *pfree_recv_queue);
 struct recv_frame *rtw_alloc_recvframe(struct __queue *pfree_recv_queue);
-void rtw_init_recvframe(struct recv_frame *precvframe,
-			struct recv_priv *precvpriv);
 int  rtw_free_recvframe(struct recv_frame *precvframe,
 			struct __queue *pfree_recv_queue);
 #define rtw_dequeue_recvframe(queue) rtw_alloc_recvframe(queue)
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 46/47] staging: r8188eu: remove rtw_calculate_wlan_pkt_size_by_attribue()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (44 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 45/47] staging: r8188eu: remove rtw_init_recvframe() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  2021-09-22 20:04 ` [PATCH 47/47] staging: r8188eu: remove rtw_sctx_done() Michael Straube
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_calculate_wlan_pkt_size_by_attribue() is not used,
remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_xmit.c    | 18 ------------------
 drivers/staging/r8188eu/include/rtw_xmit.h |  2 --
 2 files changed, 20 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index f9ae48f73cdf..6213244450e7 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -861,24 +861,6 @@ s32 rtw_txframes_sta_ac_pending(struct adapter *padapter, struct pkt_attrib *pat
 	return 0;
 }
 
-/*
- * Calculate wlan 802.11 packet MAX size from pkt_attrib
- * This function doesn't consider fragment case
- */
-u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib)
-{
-	u32	len = 0;
-
-	len = pattrib->hdrlen + pattrib->iv_len; /*  WLAN Header and IV */
-	len += SNAP_SIZE + sizeof(u16); /*  LLC */
-	len += pattrib->pktlen;
-	if (pattrib->encrypt == _TKIP_)
-		len += 8; /*  MIC */
-	len += ((pattrib->bswenc) ? pattrib->icv_len : 0); /*  ICV */
-
-	return len;
-}
-
 /*
 
 This sub-routine will perform all the following:
diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h
index 1244545070c7..01e8b90becf5 100644
--- a/drivers/staging/r8188eu/include/rtw_xmit.h
+++ b/drivers/staging/r8188eu/include/rtw_xmit.h
@@ -333,8 +333,6 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv,
 
 s32 rtw_xmit_classifier(struct adapter *padapter,
 			struct xmit_frame *pxmitframe);
-u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib);
-#define rtw_wlan_pkt_size(f) rtw_calculate_wlan_pkt_size_by_attribue(&f->attrib)
 s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt,
 			   struct xmit_frame *pxmitframe);
 s32 _rtw_init_hw_txqueue(struct hw_txqueue *phw_txqueue, u8 ac_tag);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH 47/47] staging: r8188eu: remove rtw_sctx_done()
  2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
                   ` (45 preceding siblings ...)
  2021-09-22 20:04 ` [PATCH 46/47] staging: r8188eu: remove rtw_calculate_wlan_pkt_size_by_attribue() Michael Straube
@ 2021-09-22 20:04 ` Michael Straube
  46 siblings, 0 replies; 48+ messages in thread
From: Michael Straube @ 2021-09-22 20:04 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

Function rtw_sctx_done() is not used, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_xmit.c    | 5 -----
 drivers/staging/r8188eu/include/rtw_xmit.h | 1 -
 2 files changed, 6 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 6213244450e7..896ed91d3814 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -2188,11 +2188,6 @@ void rtw_sctx_done_err(struct submit_ctx **sctx, int status)
 	}
 }
 
-void rtw_sctx_done(struct submit_ctx **sctx)
-{
-	rtw_sctx_done_err(sctx, RTW_SCTX_DONE_SUCCESS);
-}
-
 int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms)
 {
 	struct submit_ctx *pack_tx_ops = &pxmitpriv->ack_tx_ops;
diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h
index 01e8b90becf5..ea8e82e0b4be 100644
--- a/drivers/staging/r8188eu/include/rtw_xmit.h
+++ b/drivers/staging/r8188eu/include/rtw_xmit.h
@@ -185,7 +185,6 @@ enum {
 void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms);
 int rtw_sctx_wait(struct submit_ctx *sctx);
 void rtw_sctx_done_err(struct submit_ctx **sctx, int status);
-void rtw_sctx_done(struct submit_ctx **sctx);
 
 struct xmit_buf {
 	struct list_head list;
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2021-09-22 20:06 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 20:03 [PATCH 00/47] staging: r8188eu: remove unused functions Michael Straube
2021-09-22 20:03 ` [PATCH 01/47] staging: r8188eu: remove EFUSE_ShadowRead() Michael Straube
2021-09-22 20:03 ` [PATCH 02/47] staging: r8188eu: remove efuse_GetCurrentSize() Michael Straube
2021-09-22 20:03 ` [PATCH 03/47] staging: r8188eu: remove efuse_GetMaxSize() Michael Straube
2021-09-22 20:03 ` [PATCH 04/47] staging: r8188eu: remove rtw_BT_efuse_map_write() Michael Straube
2021-09-22 20:03 ` [PATCH 05/47] staging: r8188eu: remove rtw_efuse_access() Michael Straube
2021-09-22 20:03 ` [PATCH 06/47] staging: r8188eu: remove rtw_efuse_map_write() Michael Straube
2021-09-22 20:03 ` [PATCH 07/47] staging: r8188eu: remove rtw_BT_efuse_map_read() Michael Straube
2021-09-22 20:03 ` [PATCH 08/47] staging: r8188eu: remove rtw_efuse_map_read() Michael Straube
2021-09-22 20:03 ` [PATCH 09/47] staging: r8188eu: remove _rtw_dequeue_network() Michael Straube
2021-09-22 20:03 ` [PATCH 10/47] staging: r8188eu: remove _rtw_enqueue_network() Michael Straube
2021-09-22 20:03 ` [PATCH 11/47] staging: r8188eu: remove rtw_get_timestampe_from_ie() Michael Straube
2021-09-22 20:03 ` [PATCH 12/47] staging: r8188eu: remove rtw_scan_abort() Michael Straube
2021-09-22 20:03 ` [PATCH 13/47] staging: r8188eu: remove issue_action_spct_ch_switch() Michael Straube
2021-09-22 20:03 ` [PATCH 14/47] staging: r8188eu: remove issue_probereq_p2p_ex() Michael Straube
2021-09-22 20:03 ` [PATCH 15/47] staging: r8188eu: remove sreset_get_wifi_status() Michael Straube
2021-09-22 20:03 ` [PATCH 16/47] staging: r8188eu: remove build_deauth_p2p_ie() Michael Straube
2021-09-22 20:03 ` [PATCH 17/47] staging: r8188eu: remove rtw_freq2ch() Michael Straube
2021-09-22 20:03 ` [PATCH 18/47] staging: r8188eu: remove rtw_set_802_11_add_key() Michael Straube
2021-09-22 20:03 ` [PATCH 19/47] staging: r8188eu: remove rtw_set_802_11_remove_key() Michael Straube
2021-09-22 20:03 ` [PATCH 20/47] staging: r8188eu: remove rtw_set_802_11_remove_wep() Michael Straube
2021-09-22 20:03 ` [PATCH 21/47] staging: r8188eu: remove rtw_set_country() Michael Straube
2021-09-22 20:03 ` [PATCH 22/47] staging: r8188eu: remove rtw_set_scan_mode() Michael Straube
2021-09-22 20:03 ` [PATCH 23/47] staging: r8188eu: remove rtw_validate_ssid() Michael Straube
2021-09-22 20:03 ` [PATCH 24/47] staging: r8188eu: remove rtw_set_channel_plan() Michael Straube
2021-09-22 20:03 ` [PATCH 25/47] staging: r8188eu: remove rtw_atoi() Michael Straube
2021-09-22 20:03 ` [PATCH 26/47] staging: r8188eu: remove rtw_cbuf_push() Michael Straube
2021-09-22 20:04 ` [PATCH 27/47] staging: r8188eu: remove rtw_cbuf_full() Michael Straube
2021-09-22 20:04 ` [PATCH 28/47] staging: r8188eu: remove rtw_os_read_port() Michael Straube
2021-09-22 20:04 ` [PATCH 29/47] staging: r8188eu: remove rtw_IOL_cmd_buf_dump() Michael Straube
2021-09-22 20:04 ` [PATCH 30/47] staging: r8188eu: remove action_public_str() Michael Straube
2021-09-22 20:04 ` [PATCH 31/47] staging: r8188eu: remove dump_ies() Michael Straube
2021-09-22 20:04 ` [PATCH 32/47] staging: r8188eu: remove hal_ch_offset_to_secondary_ch_offset() Michael Straube
2021-09-22 20:04 ` [PATCH 33/47] staging: r8188eu: remove secondary_ch_offset_to_hal_ch_offset() Michael Straube
2021-09-22 20:04 ` [PATCH 34/47] staging: r8188eu: remove ieee80211_get_hdrlen() Michael Straube
2021-09-22 20:04 ` [PATCH 35/47] staging: r8188eu: remove ieee80211_is_empty_essid() Michael Straube
2021-09-22 20:04 ` [PATCH 36/47] staging: r8188eu: remove rtw_action_frame_parse() Michael Straube
2021-09-22 20:04 ` [PATCH 37/47] staging: r8188eu: remove rtw_ies_remove_ie() Michael Straube
2021-09-22 20:04 ` [PATCH 38/47] staging: r8188eu: remove rtw_set_ie_ch_switch() Michael Straube
2021-09-22 20:04 ` [PATCH 39/47] staging: r8188eu: remove rtw_set_ie_mesh_ch_switch_parm() Michael Straube
2021-09-22 20:04 ` [PATCH 40/47] staging: r8188eu: remove rtw_set_ie_secondary_ch_offset() Michael Straube
2021-09-22 20:04 ` [PATCH 41/47] staging: r8188eu: remove enum secondary_ch_offset Michael Straube
2021-09-22 20:04 ` [PATCH 42/47] staging: r8188eu: remove rtw_dequeue_recvbuf() Michael Straube
2021-09-22 20:04 ` [PATCH 43/47] staging: r8188eu: remove rtw_enqueue_recvbuf() Michael Straube
2021-09-22 20:04 ` [PATCH 44/47] staging: r8188eu: remove rtw_enqueue_recvbuf_to_head() Michael Straube
2021-09-22 20:04 ` [PATCH 45/47] staging: r8188eu: remove rtw_init_recvframe() Michael Straube
2021-09-22 20:04 ` [PATCH 46/47] staging: r8188eu: remove rtw_calculate_wlan_pkt_size_by_attribue() Michael Straube
2021-09-22 20:04 ` [PATCH 47/47] staging: r8188eu: remove rtw_sctx_done() Michael Straube

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).