From patchwork Sat Dec 20 16:44:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5522891 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8640F9F326 for ; Sat, 20 Dec 2014 16:41:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 93DF320160 for ; Sat, 20 Dec 2014 16:41:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 86C922015A for ; Sat, 20 Dec 2014 16:41:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753084AbaLTQlh (ORCPT ); Sat, 20 Dec 2014 11:41:37 -0500 Received: from mail-wi0-f170.google.com ([209.85.212.170]:60957 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753295AbaLTQlY (ORCPT ); Sat, 20 Dec 2014 11:41:24 -0500 Received: by mail-wi0-f170.google.com with SMTP id bs8so7267062wib.1 for ; Sat, 20 Dec 2014 08:41:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wMzYiZsdUE4a0S+44ThsDnQekPuDljHUtO1w8jRD+Vo=; b=GxgbGghe52OqCVaVCHLXyw9FdOWD6dMI31Q9LY0QYAwVix+OmtFtIHwCwUjomRJn7s 4jmj6n2HWB9A+UpiEOkks+OZ8hC7+7UoSH1r4eD6gsJjZNjQo0C5bCz/3useCs15nFSd QYmR20kORBPovubRB3T1DNjoZeRunomnaQevS0JcTmzNP9ndwEU/E3vmjulZwbm9GTVO 3gUh6EdMuPLbPG1m5iZUvm0HvZbxs0zFJJMJ5sT/6Pd4Bg2sHbMjwsWqErIh4vRR2cVx PdWRHR/VtYg3jJzaPmaSqSpIF3sSwRg+0+YwaDopFYIMnPujLchtoYn/OgSasdTbwz16 9Zlw== X-Gm-Message-State: ALoCoQk8asH5wwnBRAbLyjE+F6ou8DFzyxQPNNVeHZxYd++doW/uGopONk+m7yQeTt6dI2YhGPKo X-Received: by 10.194.89.3 with SMTP id bk3mr26101866wjb.92.1419093683199; Sat, 20 Dec 2014 08:41:23 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id lg7sm6504053wic.0.2014.12.20.08.41.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Dec 2014 08:41:22 -0800 (PST) From: Rickard Strandqvist To: Larry Finger , Jes Sorensen Cc: Rickard Strandqvist , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8723au: hal: odm.c: Remove some unused functions Date: Sat, 20 Dec 2014 17:44:10 +0100 Message-Id: <1419093850-8610-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Removes some functions that are not used anywhere: odm_1R_CCA23a() odm_TXPowerTrackingCheckAP() odm_TXPowerTrackingCheckMP() odm_RSSIMonitorCheck23aAP() odm_RSSIMonitorCheck23aMP() odm_RSSIMonitorInit() odm_RefreshRateAdaptiveMask23aAPADSL23a() odm_RefreshRateAdaptiveMask23aMP23a() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/staging/rtl8723au/hal/odm.c | 81 ----------------------------------- 1 file changed, 81 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c index 1c0f106d..6d84fb5 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -187,24 +187,13 @@ void odm23a_DynBBPSInit(struct dm_odm_t *pDM_Odm); void odm_DynamicBBPowerSaving23a(struct dm_odm_t *pDM_Odm); -void odm_1R_CCA23a(struct dm_odm_t *pDM_Odm); /* END---------BB POWER SAVE----------------------- */ -void odm_RefreshRateAdaptiveMask23aMP23a(struct dm_odm_t *pDM_Odm); - void odm_RefreshRateAdaptiveMask23aCE23a(struct dm_odm_t *pDM_Odm); -void odm_RefreshRateAdaptiveMask23aAPADSL23a(struct dm_odm_t *pDM_Odm); - void odm_DynamicTxPower23aInit(struct dm_odm_t *pDM_Odm); -void odm_RSSIMonitorInit(struct dm_odm_t *pDM_Odm); - -void odm_RSSIMonitorCheck23aMP(struct dm_odm_t *pDM_Odm); - void odm_RSSIMonitorCheck23aCE(struct dm_odm_t *pDM_Odm); -void odm_RSSIMonitorCheck23aAP(struct dm_odm_t *pDM_Odm); - void odm_RSSIMonitorCheck23a(struct dm_odm_t *pDM_Odm); void odm_DynamicTxPower23a(struct dm_odm_t *pDM_Odm); @@ -212,16 +201,12 @@ void odm_RefreshRateAdaptiveMask23a(struct dm_odm_t *pDM_Odm); void ODM_TXPowerTrackingCheck23a(struct dm_odm_t *pDM_Odm); -void odm_TXPowerTrackingCheckAP(struct dm_odm_t *pDM_Odm); - void odm_RateAdaptiveMaskInit23a(struct dm_odm_t *pDM_Odm); void odm_TXPowerTrackingThermalMeterInit23a(struct dm_odm_t *pDM_Odm); void odm_TXPowerTrackingInit23a(struct dm_odm_t *pDM_Odm); -void odm_TXPowerTrackingCheckMP(struct dm_odm_t *pDM_Odm); - void odm_TXPowerTrackingCheckCE23a(struct dm_odm_t *pDM_Odm); static void odm_EdcaTurboCheck23a(struct dm_odm_t *pDM_Odm); @@ -946,40 +931,6 @@ void odm_DynamicBBPowerSaving23a(struct dm_odm_t *pDM_Odm) return; } -void odm_1R_CCA23a(struct dm_odm_t *pDM_Odm) -{ - struct dynamic_pwr_sav *pDM_PSTable = &pDM_Odm->DM_PSTable; - - if (pDM_Odm->RSSI_Min != 0xFF) { - if (pDM_PSTable->PreCCAState == CCA_2R) { - if (pDM_Odm->RSSI_Min >= 35) - pDM_PSTable->CurCCAState = CCA_1R; - else - pDM_PSTable->CurCCAState = CCA_2R; - } else { - if (pDM_Odm->RSSI_Min <= 30) - pDM_PSTable->CurCCAState = CCA_2R; - else - pDM_PSTable->CurCCAState = CCA_1R; - } - } else { - pDM_PSTable->CurCCAState = CCA_MAX; - } - - if (pDM_PSTable->PreCCAState != pDM_PSTable->CurCCAState) { - if (pDM_PSTable->CurCCAState == CCA_1R) { - if (pDM_Odm->RFType == ODM_2T2R) - ODM_SetBBReg(pDM_Odm, 0xc04, bMaskByte0, 0x13); - else - ODM_SetBBReg(pDM_Odm, 0xc04, bMaskByte0, 0x23); - } else { - ODM_SetBBReg(pDM_Odm, 0xc04, bMaskByte0, 0x33); - /* PHY_SetBBReg(pAdapter, 0xe70, bMaskByte3, 0x63); */ - } - pDM_PSTable->PreCCAState = pDM_PSTable->CurCCAState; - } -} - void ODM_RF_Saving23a(struct dm_odm_t *pDM_Odm, u8 bForceInNormal) { struct dynamic_pwr_sav *pDM_PSTable = &pDM_Odm->DM_PSTable; @@ -1177,10 +1128,6 @@ void odm_RefreshRateAdaptiveMask23a(struct dm_odm_t *pDM_Odm) odm_RefreshRateAdaptiveMask23aCE23a(pDM_Odm); } -void odm_RefreshRateAdaptiveMask23aMP23a(struct dm_odm_t *pDM_Odm) -{ -} - void odm_RefreshRateAdaptiveMask23aCE23a(struct dm_odm_t *pDM_Odm) { u8 i; @@ -1216,10 +1163,6 @@ void odm_RefreshRateAdaptiveMask23aCE23a(struct dm_odm_t *pDM_Odm) } -void odm_RefreshRateAdaptiveMask23aAPADSL23a(struct dm_odm_t *pDM_Odm) -{ -} - /* Return Value: bool */ /* - true: RATRState is changed. */ bool ODM_RAStateCheck23a(struct dm_odm_t *pDM_Odm, s32 RSSI, bool bForceUpdate, @@ -1284,14 +1227,6 @@ void odm_DynamicTxPower23aInit(struct dm_odm_t *pDM_Odm) pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal; } -/* 3 ============================================================ */ -/* 3 RSSI Monitor */ -/* 3 ============================================================ */ - -void odm_RSSIMonitorInit(struct dm_odm_t *pDM_Odm) -{ -} - void odm_RSSIMonitorCheck23a(struct dm_odm_t *pDM_Odm) { /* For AP/ADSL use struct rtl8723a_priv * */ @@ -1306,10 +1241,6 @@ void odm_RSSIMonitorCheck23a(struct dm_odm_t *pDM_Odm) odm_RSSIMonitorCheck23aCE(pDM_Odm); } /* odm_RSSIMonitorCheck23a */ -void odm_RSSIMonitorCheck23aMP(struct dm_odm_t *pDM_Odm) -{ -} - static void FindMinimumRSSI( struct rtw_adapter *pAdapter @@ -1378,10 +1309,6 @@ void odm_RSSIMonitorCheck23aCE(struct dm_odm_t *pDM_Odm) ODM_CmnInfoUpdate23a(&pHalData->odmpriv, ODM_CMNINFO_RSSI_MIN, pdmpriv->MinUndecoratedPWDBForDM); } -void odm_RSSIMonitorCheck23aAP(struct dm_odm_t *pDM_Odm) -{ -} - /* endif */ /* 3 ============================================================ */ /* 3 Tx Power Tracking */ @@ -1422,14 +1349,6 @@ void odm_TXPowerTrackingCheckCE23a(struct dm_odm_t *pDM_Odm) { } -void odm_TXPowerTrackingCheckMP(struct dm_odm_t *pDM_Odm) -{ -} - -void odm_TXPowerTrackingCheckAP(struct dm_odm_t *pDM_Odm) -{ -} - /* EDCA Turbo */ static void ODM_EdcaTurboInit23a(struct dm_odm_t *pDM_Odm) {