From patchwork Fri Jan 2 16:58:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 5560011 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 86BC0BF6C3 for ; Fri, 2 Jan 2015 16:59:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA8F82024D for ; Fri, 2 Jan 2015 16:59:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC62A2022D for ; Fri, 2 Jan 2015 16:59:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752260AbbABQ6m (ORCPT ); Fri, 2 Jan 2015 11:58:42 -0500 Received: from mail-ob0-f174.google.com ([209.85.214.174]:43839 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752225AbbABQ6k (ORCPT ); Fri, 2 Jan 2015 11:58:40 -0500 Received: by mail-ob0-f174.google.com with SMTP id nt9so59474668obb.5; Fri, 02 Jan 2015 08:58:39 -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=FG89gc4DYPrWGj9mbDWnP4lAvS9S9qJmnYw1lD6pJGc=; b=JUw+Fwg2uuXHf9Fvzw8GSg59x6IgvTaMCmtSZIU9oOwNBRsEw4Iyu4I7zQBu6oAwTQ hGDvyIrcJQkLt12jqi6vsxOdE1//ukvqXrnFa2/CMRctzKfy0o4pu8rnWnEo1ba9ZrP1 vUZurvAa9LY/7MbwFoqK4XDRUelOkDIqstVnXFbLfgUDlpkxzUYbCPtszSHFADqlzaVS tFCB9lEhAjXyuo3DJmc6hbLoiwOmt4TrLz0sHLZcfguYvkNbpWstii0R/2osFhrpGHbq 2EW5sxQtnSDlciaFuopjQQq1Ey52agy1dDfXIVnFTmHhEsat7j0CBLmPbWCL0BbDlwdf FrqQ== X-Received: by 10.202.175.146 with SMTP id y140mr42828385oie.79.1420217919855; Fri, 02 Jan 2015 08:58:39 -0800 (PST) Received: from linux.site ([69.76.245.152]) by mx.google.com with ESMTPSA id p1sm12073758oew.4.2015.01.02.08.58.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Jan 2015 08:58:39 -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] rtlwifi: rtl8192ee: Convert driver to use common DM table initialization Date: Fri, 2 Jan 2015 10:58:24 -0600 Message-Id: <1420217908-1382-8-git-send-email-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1420217908-1382-1-git-send-email-Larry.Finger@lwfinger.net> References: <1420217908-1382-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=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,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 Convert driver rtl8192ee to use the common routine to initialize dm_digtable. Signed-off-by: Larry Finger --- 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);