From patchwork Tue Jan 6 15:58:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 5574991 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2638ABF6C3 for ; Tue, 6 Jan 2015 15:59:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5D95020211 for ; Tue, 6 Jan 2015 15:59:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 742572020F for ; Tue, 6 Jan 2015 15:59:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756478AbbAFP7E (ORCPT ); Tue, 6 Jan 2015 10:59:04 -0500 Received: from mail-oi0-f42.google.com ([209.85.218.42]:61782 "EHLO mail-oi0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756139AbbAFP63 (ORCPT ); Tue, 6 Jan 2015 10:58:29 -0500 Received: by mail-oi0-f42.google.com with SMTP id v63so52595999oia.1; Tue, 06 Jan 2015 07:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=7aj6NM8cZl7i7lR9VR/GhfXETG9lE5b+gqHVqixcqX4=; b=GTyqt9HN0fp3x+TvMAKsXNpNNALTcyqPv5fQAeIb+oMrPg702gyiB64Ttfyfe8Cn09 D1495lyjVEsJ1UbB47xN8kPpnt0HZgxugfhEiow5uOTga5Jr/5NpJY07EEVljy7/LX38 kelYURyAsowQxFoQuvXA7AOdWTPRxNFkN5k+sHorZgXT/W0FOesKLuTY4evJoy/4nLSf OVlyJzvheOZKvO+aasGEYSO4RuwJ4SEQ784MlpnPHSMn8URN101fHtkRTbDMEDUfZPen LmaZZvWBObBz1Qer0O/95bVaCFbS9EVB8cdIoxHeFrUABiu+mdhM9A9bR6esUDe9Hmxl 9psA== X-Received: by 10.202.182.11 with SMTP id g11mr53205934oif.13.1420559909299; Tue, 06 Jan 2015 07:58:29 -0800 (PST) Received: from linux.site ([69.76.245.152]) by mx.google.com with ESMTPSA id e143sm26953258oic.7.2015.01.06.07.58.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Jan 2015 07:58:28 -0800 (PST) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Larry Finger , netdev@vger.kernel.org Subject: [PATCH 07/11 V2] rtlwifi: rtl8192ee: Convert driver to use common DM table initialization Date: Tue, 6 Jan 2015 09:58:08 -0600 Message-Id: <1420559892-12384-8-git-send-email-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1420559892-12384-1-git-send-email-Larry.Finger@lwfinger.net> References: <1420559892-12384-1-git-send-email-Larry.Finger@lwfinger.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_BLACK autolearn=ham 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 Convert driver rtl8192ee to use the common routine to initialize dm_digtable. Signed-off-by: Larry Finger --- V2 - unchanged from V1 --- drivers/net/wireless/rtlwifi/rtl8192ee/dm.c | 32 ++--------------------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/drivers/net/wireless/rtlwifi/rtl8192ee/dm.c b/drivers/net/wireless/rtlwifi/rtl8192ee/dm.c index 70e58d1..459f3d0 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ee/dm.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ee/dm.c @@ -152,35 +152,6 @@ static const u8 cckswing_table_ch14[CCK_TABLE_SIZE][8] = { {0x09, 0x08, 0x07, 0x04, 0x00, 0x00, 0x00, 0x00} /* 32, -16.0dB */ }; -static void rtl92ee_dm_diginit(struct ieee80211_hw *hw) -{ - struct rtl_priv *rtlpriv = rtl_priv(hw); - struct dig_t *dm_dig = &rtlpriv->dm_digtable; - - dm_dig->cur_igvalue = rtl_get_bbreg(hw, DM_REG_IGI_A_11N, - DM_BIT_IGI_11N); - dm_dig->rssi_lowthresh = DM_DIG_THRESH_LOW; - dm_dig->rssi_highthresh = DM_DIG_THRESH_HIGH; - dm_dig->fa_lowthresh = DM_FALSEALARM_THRESH_LOW; - dm_dig->fa_highthresh = DM_FALSEALARM_THRESH_HIGH; - dm_dig->rx_gain_max = DM_DIG_MAX; - dm_dig->rx_gain_min = DM_DIG_MIN; - dm_dig->back_val = DM_DIG_BACKOFF_DEFAULT; - dm_dig->back_range_max = DM_DIG_BACKOFF_MAX; - dm_dig->back_range_min = DM_DIG_BACKOFF_MIN; - dm_dig->pre_cck_cca_thres = 0xff; - dm_dig->cur_cck_cca_thres = 0x83; - dm_dig->forbidden_igi = DM_DIG_MIN; - dm_dig->large_fa_hit = 0; - dm_dig->recover_cnt = 0; - dm_dig->dig_min_0 = DM_DIG_MIN; - dm_dig->dig_min_1 = DM_DIG_MIN; - dm_dig->media_connect_0 = false; - dm_dig->media_connect_1 = false; - rtlpriv->dm.dm_initialgain_enable = true; - dm_dig->bt30_cur_igi = 0x32; -} - static void rtl92ee_dm_false_alarm_counter_statistics(struct ieee80211_hw *hw) { u32 ret_value; @@ -1089,10 +1060,11 @@ static void rtl92ee_dm_init_dynamic_atc_switch(struct ieee80211_hw *hw) void rtl92ee_dm_init(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); + u32 cur_igvalue = rtl_get_bbreg(hw, DM_REG_IGI_A_11N, DM_BIT_IGI_11N); rtlpriv->dm.dm_type = DM_TYPE_BYDRIVER; - rtl92ee_dm_diginit(hw); + rtl_dm_diginit(hw, cur_igvalue); rtl92ee_dm_init_rate_adaptive_mask(hw); rtl92ee_dm_init_primary_cca_check(hw); rtl92ee_dm_init_edca_turbo(hw);