All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
	martin@kaiser.cx, fmdefrancesco@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 29/40] staging: r8188eu: remove Efuse_PgPacketWrite from hal_ops
Date: Mon,  6 Sep 2021 20:24:27 +0200	[thread overview]
Message-ID: <20210906182438.5417-30-straube.linux@gmail.com> (raw)
In-Reply-To: <20210906182438.5417-1-straube.linux@gmail.com>

Remove Efuse_PgPacketWrite hal_ops and remove its wrapper
Efuse_PgPacketWrite(). Call rtl8188e_Efuse_PgPacketWrite() directly
instead.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c        | 11 +----------
 drivers/staging/r8188eu/core/rtw_mp_ioctl.c     |  2 +-
 drivers/staging/r8188eu/hal/rtl8188e_hal_init.c |  9 ++++-----
 drivers/staging/r8188eu/include/hal_intf.h      |  3 +--
 drivers/staging/r8188eu/include/rtw_efuse.h     |  2 --
 5 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 518ed5b2e8d2..25c1e545313f 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -247,15 +247,6 @@ u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data, bool pseudo)
 	return result;
 }
 
-int Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool pseudo)
-{
-	int ret;
-
-	ret =  pAdapter->HalFunc.Efuse_PgPacketWrite(pAdapter, offset, word_en, data, pseudo);
-
-	return ret;
-}
-
 /*-----------------------------------------------------------------------------
  * Function:	efuse_WordEnableDataRead
  *
@@ -473,7 +464,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 		}
 
 		if (word_en != 0xF) {
-			ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata, false);
+			ret = rtl8188e_Efuse_PgPacketWrite(padapter, offset, word_en, newdata, false);
 			DBG_88E("offset=%x\n", offset);
 			DBG_88E("word_en=%x\n", word_en);
 
diff --git a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
index 4c56c0da7625..65450091051f 100644
--- a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
+++ b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
@@ -981,7 +981,7 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
 		rtl8188e_EfusePowerSwitch(Adapter, false, false);
 	} else {
 		rtl8188e_EfusePowerSwitch(Adapter, true, true);
-		if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false))
+		if (rtl8188e_Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false))
 			*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
 		else
 			status = NDIS_STATUS_FAILURE;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 9cbb13a07f83..24009e9cc099 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1318,7 +1318,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st
 		badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr + 1, pFixPkt->word_en, originaldata, bPseudoTest);
 
 		if (badworden != 0xf) {	/*  write fail */
-			PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest);
+			PgWriteSuccess = rtl8188e_Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest);
 
 			if (!PgWriteSuccess)
 				return false;
@@ -1448,7 +1448,7 @@ static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u
 		return true;
 	} else {
 		/* reorganize other pg packet */
-		PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
+		PgWriteSuccess = rtl8188e_Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
 		if (!PgWriteSuccess)
 			return false;
 		else
@@ -1574,7 +1574,7 @@ static bool hal_EfusePartialWriteCheck(struct adapter *pAdapter, u8 efuseType, u
 					u32	PgWriteSuccess = 0;
 					/*  if write fail on some words, write these bad words again */
 
-					PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
+					PgWriteSuccess = rtl8188e_Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
 
 					if (!PgWriteSuccess) {
 						bRet = false;	/*  write fail, return */
@@ -1665,7 +1665,7 @@ static int Hal_EfusePgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_e
 	return ret;
 }
 
-static int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest)
+int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest)
 {
 	int	ret;
 
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
 	pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
 
 	/*  Efuse related function */
-	pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
 	pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
 
 	pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 115d2598b3b0..748c809b1adc 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -177,8 +177,6 @@ struct hal_ops {
 			       enum rf_radio_path eRFPath, u32 RegAddr,
 			       u32 BitMask, u32 Data);
 
-	int	(*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset,
-				       u8 word_en, u8 *data, bool bPseudoTest);
 	u8	(*Efuse_WordEnableDataWrite)(struct adapter *padapter,
 					     u16 efuse_addr, u8 word_en,
 					     u8 *data, bool bPseudoTest);
@@ -219,6 +217,7 @@ void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType,
 				       u8 type, void *pOut, bool bPseudoTest);
 u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest);
 int rtl8188e_Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest);
+int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest);
 
 void	rtw_hal_free_data(struct adapter *padapter);
 uint rtw_hal_init(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index d19ef73be39e..b10798354a6b 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -116,8 +116,6 @@ void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
 u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
 u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool	test);
 
-int Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data,
-			bool test);
 void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata);
 u8 Efuse_WordEnableDataWrite(struct adapter *adapter, u16 efuse_addr,
 			     u8 word_en, u8 *data, bool test);
-- 
2.33.0


  parent reply	other threads:[~2021-09-06 18:25 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 18:23 [PATCH 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
2021-09-06 18:23 ` [PATCH 01/40] staging: r8188eu: remove InitSwLeds from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 02/40] staging: r8188eu: remove DeInitSwLeds " Michael Straube
2021-09-06 18:24 ` [PATCH 03/40] staging: r8188eu: remove dm_init " Michael Straube
2021-09-06 18:24 ` [PATCH 04/40] staging: r8188eu: remove dm_deinit " Michael Straube
2021-09-06 18:24 ` [PATCH 05/40] staging: r8188eu: remove SetHalODMVarHandler " Michael Straube
2021-09-06 18:24 ` [PATCH 06/40] staging: r8188eu: remove empty functions Michael Straube
2021-09-06 18:24 ` [PATCH 07/40] staging: r8188eu: remove unused function rtw_interface_ps_func() Michael Straube
2021-09-06 18:24 ` [PATCH 08/40] staging: r8188eu: remove interface_ps_func from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 09/40] staging: r8188eu: remove hal_dm_watchdog " Michael Straube
2021-09-06 18:24 ` [PATCH 10/40] staging: r8188eu: remove set_bwmode_handler " Michael Straube
2021-09-06 18:24 ` [PATCH 11/40] staging: r8188eu: remove set_channel_handler " Michael Straube
2021-09-06 18:24 ` [PATCH 12/40] staging: r8188eu: remove unused enum hal_intf_ps_func Michael Straube
2021-09-06 18:24 ` [PATCH 13/40] staging: r8188eu: remove Add_RateATid from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 14/40] staging: r8188eu: remove hal_power_on " Michael Straube
2021-09-06 18:24 ` [PATCH 15/40] staging: r8188eu: remove sreset_init_value " Michael Straube
2021-09-06 18:24 ` [PATCH 16/40] staging: r8188eu: remove sreset_reset_value " Michael Straube
2021-09-06 18:24 ` [PATCH 17/40] staging: r8188eu: remove silentreset " Michael Straube
2021-09-06 18:24 ` [PATCH 18/40] staging: r8188eu: remove sreset_xmit_status_check " Michael Straube
2021-09-06 18:24 ` [PATCH 19/40] staging: r8188eu: remove sreset_linked_status_check " Michael Straube
2021-09-06 18:24 ` [PATCH 20/40] staging: r8188eu: remove sreset_get_wifi_status " Michael Straube
2021-09-06 18:24 ` [PATCH 21/40] staging: r8188eu: remove EfusePowerSwitch " Michael Straube
2021-09-06 18:24 ` [PATCH 22/40] staging: r8188eu: rename hal_EfusePowerSwitch_RTL8188E() Michael Straube
2021-09-06 18:24 ` [PATCH 23/40] staging: r8188eu: remove wrapper Efuse_PowerSwitch() Michael Straube
2021-09-06 18:24 ` [PATCH 24/40] staging: r8188eu: remove ReadEFuse from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 25/40] staging: r8188eu: remove EFUSEGetEfuseDefinition " Michael Straube
2021-09-06 18:24 ` [PATCH 26/40] staging: r8188eu: remove EfuseGetCurrentSize " Michael Straube
2021-09-06 18:24 ` [PATCH 27/40] staging: r8188eu: remove empty comments Michael Straube
2021-09-06 18:24 ` [PATCH 28/40] staging: r8188eu: remove Efuse_PgPacketRead from hal_ops Michael Straube
2021-09-06 18:24 ` Michael Straube [this message]
2021-09-06 18:24 ` [PATCH 30/40] staging: r8188eu: remove Efuse_WordEnableDataWrite " Michael Straube
2021-09-06 18:24 ` [PATCH 31/40] staging: r8188eu: remove useless assignment Michael Straube
2021-09-06 18:24 ` [PATCH 32/40] staging: r8188eu: remove AntDivBeforeLinkHandler from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 33/40] staging: r8188eu: remove AntDivCompareHandler " Michael Straube
2021-09-06 18:24 ` [PATCH 34/40] staging: r8188eu: remove empty function rtl8188e_start_thread() Michael Straube
2021-09-06 18:24 ` [PATCH 35/40] staging: r8188eu: remove empty function rtl8188e_stop_thread() Michael Straube
2021-09-06 18:24 ` [PATCH 36/40] staging: r8188eu: remove hal_notch_filter from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 37/40] staging: r8188eu: remove free_hal_data " Michael Straube
2021-09-06 18:24 ` [PATCH 38/40] staging: r8188eu: remove unused function rtl8188e_clone_haldata() Michael Straube
2021-09-06 18:24 ` [PATCH 39/40] staging: r8188eu: remove SetBeaconRelatedRegistersHandler from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 40/40] staging: r8188eu: remove UpdateHalRAMask8188EUsb " Michael Straube
2021-09-06 18:38 ` [PATCH 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210906182438.5417-30-straube.linux@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=phil@philpotter.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.