Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3129317pxb; Mon, 6 Sep 2021 13:06:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1a+Ltf2gTG+IfDG9IYwSGl4am+QwERKRNejMn53egISv/fmQ1G1Bb30x5w+abCespX6o2 X-Received: by 2002:a02:6053:: with SMTP id d19mr11425027jaf.126.1630958814094; Mon, 06 Sep 2021 13:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630958814; cv=none; d=google.com; s=arc-20160816; b=07p5tgSD/KCkbxgtfX6kEj3WeIBn0uO/JOygwRDwGG42V9zJ0hBLOosghxlwglCkbO /H5CMAW2/t5Hto3E/lDvBbkhvRTtPtgppSbUlV4Zq7+6lOmMcXfqPzapvpwqRQwhzM6z 6HjWZaoTy/pOt3DpMKedcj36XEZ9Ose+rrjGTmmLfOpsPZfVHWoEVeKB9EFSop1ZlJGN v+GVw24DRTHsQtbv6HVKuAlFZ752xX8C3N3fxEDEEDpCKKGcVToo7Xst+MMMPqU2AZVM e8XQ9BZPVhXIyJHgSgbzROfyPSSZO/V+Y70dRqZwpnCjrROPXV1C/TVW5+D4HZI2dk5p 4clA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oalO9iKhiM11lOdOOoyjtVxK3BVvxs9JJleweDlcP/U=; b=Kx0s69Wo8ytL25SjhC2lwoRg1mEFIdrYZtoRfAMOc3/2hRzUFf+81F8k13HAIze851 LNz9JTAM7cjGxV+8VyWnvbe4k21GTbQKj2jlhni9Czs0NfdVOuUaxyYIgjSlymxlB5Ix 0cCDTW/GJe9jWvx1F/i9oM/XlP+RQOEokkUmAHVqqKkBGsAmhC3jCm6MQd6xfncP5xmS rfxM7klN6As/YAK77HqICUNmnAt+V/5i3aYcDkSgVKDjKhwIO41pJjzqIoKZedevuRLB nV56yuF80YTKd69MiMTDVvxcBG25BtcPOhdnyHsIEbLa5wtlh2IEGUHhLS5p1PtK4AyE IfMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PhyPZpPi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 4si7203774jaj.45.2021.09.06.13.06.42; Mon, 06 Sep 2021 13:06:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PhyPZpPi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245712AbhIFTGI (ORCPT + 99 others); Mon, 6 Sep 2021 15:06:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343603AbhIFTEQ (ORCPT ); Mon, 6 Sep 2021 15:04:16 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37E3EC061757 for ; Mon, 6 Sep 2021 12:03:08 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id h9so15146976ejs.4 for ; Mon, 06 Sep 2021 12:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oalO9iKhiM11lOdOOoyjtVxK3BVvxs9JJleweDlcP/U=; b=PhyPZpPimlURmbrU8KP9Xoxnwo71VAm7988SYG65N4KztvbcpAzalqiIk//Fwl0KnB 489DFpGbam0MQ+0eiU7utjw2oAK9vOJvzctnR5HT0gSsfVQIyADTg/4AZxV+CBolTkqg 1EtqnwxC8YWQmsn9eq7Uq7d/jRHL+vWIE6wngYzn3AQes5v4mPPDc5SInjaDGbMHKfD5 L3HECXLSA4ySflj+Fd8dzowmCuyN8w7x7+Sgf9Kgj8vcYwttWeg/Rh2ksjQBHTG30p+J YvFyr5xokJnsStPxFsG+cl8dTVX8dntMpZNnmbV9AFSCn1obF99aCY/G9toU+EVIq08H GxWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oalO9iKhiM11lOdOOoyjtVxK3BVvxs9JJleweDlcP/U=; b=I6MrlhvzYQKwokJrWd37goWxgs6n0Wu8yvSjIW5Z9TVsPXsyYG75eH5FeoGfrBsPD2 vCGWsLxADeSWY/Zt7UUskBRiM+6mSv7NDU5wdCRtmVO7Y+5hTiT5i1kYw6JQiBV29LhL O9nErA9Rxdpf/hSLoDF5BFsDAlz2J6qfUT+WyUTkh9gG/D4b3Na9djcH1xrbuWbbwp7H 6MxcTwYStZUsZpLWmJ121wEOfnVggxZy5nhDK8z3mgRxGkausnP7ymnaI1fyoyEp+z1M +iBdhGPijUZe8ut6LTFDE5w43M4DRzQvWWgvHqRsjYUgYytvTqPIlF6Z12QIuSRadkPP gLxA== X-Gm-Message-State: AOAM532XCitTEStVkP12MpM82mJ063evwoebg5F7G9KItYb198aP0AXa B/IE8MA6hK73Skfh+QD/IQk= X-Received: by 2002:a17:906:9911:: with SMTP id zl17mr15261371ejb.287.1630954986796; Mon, 06 Sep 2021 12:03:06 -0700 (PDT) Received: from localhost.localdomain ([2a02:8108:96c0:3b88::8fe1]) by smtp.gmail.com with ESMTPSA id k15sm4372018ejb.92.2021.09.06.12.03.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 12:03:06 -0700 (PDT) From: Michael Straube 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 Subject: [PATCH v3 29/40] staging: r8188eu: remove Efuse_PgPacketWrite from hal_ops Date: Mon, 6 Sep 2021 21:02:12 +0200 Message-Id: <20210906190223.11396-30-straube.linux@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210906190223.11396-1-straube.linux@gmail.com> References: <20210906190223.11396-1-straube.linux@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove Efuse_PgPacketWrite from hal_ops and remove its wrapper Efuse_PgPacketWrite(). Call rtl8188e_Efuse_PgPacketWrite() directly instead. Signed-off-by: Michael Straube --- 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