Skip to contentSkip to conversation

staging: r8188eu: some simple cleanups

PATCH New Michael Straube 1 participant 5 messages Feb 25, 2022 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: r8188eu: some simple cleanups

This series contains some simple cleanups in different areas of the driver.

Tested on x86_64 with Inter-Tech DMG-02.

Michael Straube (4):
staging: r8188eu: EepromAddressSize is set but not used
staging: r8188eu: remove unused function prototype
staging: r8188eu: remove update_bcn_p2p_ie()
staging: r8188eu: remove ETH_ALEN from ieee80211.h

 drivers/staging/r8188eu/core/rtw_ap.c           |  6 ------
 drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 15 ---------------
 drivers/staging/r8188eu/hal/usb_halinit.c       |  3 ---
 drivers/staging/r8188eu/include/drv_types.h     |  1 -
 drivers/staging/r8188eu/include/ieee80211.h     |  1 -
 drivers/staging/r8188eu/include/rtl8188e_hal.h  |  1 -
 drivers/staging/r8188eu/include/rtl8188e_recv.h |  1 -
 7 files changed, 28 deletions(-)
Signature · 1 line
2.35.1
#1 lore raw

PATCH 1/4 staging: r8188eu: EepromAddressSize is set but not used

EepromAddressSize in struct adapter is set but not used. Remove it and remove the now unused function GetEEPROMSize8188E().

---
 drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 15 ---------------
 drivers/staging/r8188eu/hal/usb_halinit.c       |  3 ---
 drivers/staging/r8188eu/include/drv_types.h     |  1 -
 drivers/staging/r8188eu/include/rtl8188e_hal.h  |  1 -
 4 files changed, 20 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -15
index cf58dfc3ff4d..fc47f1b596cc 100644
@@ -535,21 +535,6 @@ void hal_notch_filter_8188e(struct adapter *adapter, bool enable)
 		rtw_write8(adapter, rOFDM0_RxDSP + 1, rtw_read8(adapter, rOFDM0_RxDSP + 1) & ~BIT(1));
 }
 
-u8 GetEEPROMSize8188E(struct adapter *padapter)
-{
-	u8 size = 0;
-	u32	cr;
-
-	cr = rtw_read16(padapter, REG_9346CR);
-	/*  6: EEPROM used is 93C46, 4: boot from E-Fuse. */
-	size = (cr & BOOT_FROM_EEPROM) ? 6 : 4;
-
-	netdev_dbg(padapter->pnetdev, "EEPROM type is %s\n",
-		   size == 4 ? "E-FUSE" : "93C46");
-
-	return size;
-}
-
 /*  */
 /*  */
 /*  LLT R/W/Init function */
drivers/staging/r8188eu/hal/usb_halinit.c +0 -3
index 0704fa3156af..0a720fa7ca78 100644
@@ -835,9 +835,6 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter)
 	struct led_priv *ledpriv = &Adapter->ledpriv;
 	u8 eeValue;
 
-	/*  Read EEPROM size before call any EEPROM function */
-	Adapter->EepromAddressSize = GetEEPROMSize8188E(Adapter);
-
 	/* check system boot selection */
 	eeValue = rtw_read8(Adapter, REG_9346CR);
 	eeprom->EepromOrEfuse		= (eeValue & BOOT_FROM_EEPROM);
drivers/staging/r8188eu/include/drv_types.h +0 -1
index 894e70a0d506..09fc27082f7c 100644
@@ -177,7 +177,6 @@ struct adapter {
 	s32	bSurpriseRemoved;
 	s32	bCardDisableWOHSM;
 
-	u8	EepromAddressSize;
 	u8	hw_init_completed;
 	s8	signal_strength;
 
drivers/staging/r8188eu/include/rtl8188e_hal.h +0 -1
index 44321a53a345..82cb4f7f4d3e 100644
@@ -176,7 +176,6 @@ struct hal_data_8188e {
 s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy);
 
 /*  EFuse */
-u8 GetEEPROMSize8188E(struct adapter *padapter);
 void Hal_EfuseParseIDCode88E(struct adapter *padapter, u8 *hwinfo);
 void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *hwinfo,
 			    bool AutoLoadFail);
Signature · 1 line
2.35.1
#2 lore raw

PATCH 2/4 staging: r8188eu: remove unused function prototype

In reply to Michael Straube

The function prototype rtl8188e_query_rx_phy_status() is not used. Remove it.

---
 drivers/staging/r8188eu/include/rtl8188e_recv.h | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/r8188eu/include/rtl8188e_recv.h +0 -1
index 0be9896eaf0f..87dd4152082a 100644
@@ -42,7 +42,6 @@ s32 rtl8188eu_init_recv_priv(struct adapter *padapter);
 void rtl8188eu_free_recv_priv(struct adapter * padapter);
 void rtl8188eu_recv_hdl(struct adapter * padapter, struct recv_buf *precvbuf);
 void rtl8188eu_recv_tasklet(unsigned long priv);
-void rtl8188e_query_rx_phy_status(struct recv_frame *fr, struct phy_stat *phy);
 void rtl8188e_process_phy_info(struct adapter * padapter, void *prframe);
 void update_recvframe_phyinfo_88e(struct recv_frame *fra, struct phy_stat *phy);
 void update_recvframe_attrib_88e(struct recv_frame *fra, struct recv_stat *stat);
Signature · 1 line
2.35.1
#3 lore raw

PATCH 3/4 staging: r8188eu: remove update_bcn_p2p_ie()

In reply to Michael Straube

The function update_bcn_p2p_ie() is empty. Remove it.

---
 drivers/staging/r8188eu/core/rtw_ap.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/staging/r8188eu/core/rtw_ap.c +0 -6
index ed66331de319..2ff78ed1faab 100644
@@ -613,16 +613,10 @@ static void update_bcn_wps_ie(struct adapter *padapter)
 	kfree(pbackup_remainder_ie);
 }
 
-static void update_bcn_p2p_ie(struct adapter *padapter)
-{
-}
-
 static void update_bcn_vendor_spec_ie(struct adapter *padapter, u8 *oui)
 {
 	if (!memcmp(WPS_OUI, oui, 4))
 		update_bcn_wps_ie(padapter);
-	else if (!memcmp(P2P_OUI, oui, 4))
-		update_bcn_p2p_ie(padapter);
 }
 
 void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
Signature · 1 line
2.35.1
#4 lore raw

PATCH 4/4 staging: r8188eu: remove ETH_ALEN from ieee80211.h

In reply to Michael Straube

The definition of ETH_ALEN in ieee80211.h is redundant as it is an in-kernel constant. Remove it.

---
 drivers/staging/r8188eu/include/ieee80211.h | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/r8188eu/include/ieee80211.h +0 -1
index 1793b99feb9f..3a860e132cbd 100644
@@ -11,7 +11,6 @@
 
 #define MGMT_QUEUE_NUM 5
 
-#define ETH_ALEN	6
 #define ETH_TYPE_LEN		2
 #define PAYLOAD_TYPE_LEN	1
 
Signature · 1 line
2.35.1