All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jes.Sorensen@redhat.com
To: linux-wireless@vger.kernel.org
Cc: kvalo@codeaurora.org, Larry.Finger@lwfinger.net
Subject: [PATCH 07/18] rtl8xxxu: Pick PHY init table based on chip version first
Date: Thu,  7 Apr 2016 14:19:22 -0400	[thread overview]
Message-ID: <1460053173-8494-8-git-send-email-Jes.Sorensen@redhat.com> (raw)
In-Reply-To: <1460053173-8494-1-git-send-email-Jes.Sorensen@redhat.com>

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Pick PHY init table based on device before distinguishing between
1T/2T/high PA tables. The latter is only currently used for
8188cu/8192cu/8188ru.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index fa6ab85..d6abe27 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -3637,11 +3637,7 @@ static int rtl8xxxu_init_phy_bb(struct rtl8xxxu_priv *priv)
 	val8 = RF_ENABLE | RF_RSTB | RF_SDMRSTB;
 	rtl8xxxu_write8(priv, REG_RF_CTRL, val8);
 
-	if (priv->hi_pa)
-		rtl8xxxu_init_phy_regs(priv, rtl8188ru_phy_1t_highpa_table);
-	else if (priv->tx_paths == 2)
-		rtl8xxxu_init_phy_regs(priv, rtl8192cu_phy_2t_init_table);
-	else if (priv->rtl_chip == RTL8723B) {
+	if (priv->rtl_chip == RTL8723B) {
 		/*
 		 * Why?
 		 */
@@ -3656,10 +3652,13 @@ static int rtl8xxxu_init_phy_bb(struct rtl8xxxu_priv *priv)
 		val8 = RF_ENABLE | RF_RSTB | RF_SDMRSTB;
 		rtl8xxxu_write8(priv, REG_RF_CTRL, val8);
 		rtl8xxxu_init_phy_regs(priv, rtl8192eu_phy_init_table);
-	} else
+	} else	if (priv->hi_pa)
+		rtl8xxxu_init_phy_regs(priv, rtl8188ru_phy_1t_highpa_table);
+	else if (priv->tx_paths == 2)
+		rtl8xxxu_init_phy_regs(priv, rtl8192cu_phy_2t_init_table);
+	else
 		rtl8xxxu_init_phy_regs(priv, rtl8723a_phy_1t_init_table);
 
-
 	if (priv->rtl_chip == RTL8188C && priv->hi_pa &&
 	    priv->vendor_umc && priv->chip_cut == 1)
 		rtl8xxxu_write8(priv, REG_OFDM0_AGC_PARM1 + 2, 0x50);
-- 
2.5.5


  parent reply	other threads:[~2016-04-07 18:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 18:19 [PATCH 00/18] rtl8xxxu: Additional code to support rtl8192eu Jes.Sorensen
2016-04-07 18:19 ` [PATCH 01/18] rtl8xxxu: Add MAC init table for 8192eu Jes.Sorensen
2016-04-14 12:55   ` [01/18] " Kalle Valo
2016-04-07 18:19 ` [PATCH 02/18] rtl8xxxu: Do not mess with AFE_XTAL_CTRL on 8192eu Jes.Sorensen
2016-04-07 18:19 ` [PATCH 03/18] rtl8xxxu: Set TX page boundaries for 8192eu Jes.Sorensen
2016-04-07 18:19 ` [PATCH 04/18] rtl8xxxu: Add radio init tables " Jes.Sorensen
2016-04-07 18:19 ` [PATCH 05/18] rtl8xxxu: Add 8192eu AGC tables Jes.Sorensen
2016-04-07 18:19 ` [PATCH 06/18] rtl8xxxu: Add 8192eu PHY init table Jes.Sorensen
2016-04-07 18:19 ` Jes.Sorensen [this message]
2016-04-07 18:19 ` [PATCH 08/18] rtl8xxxu: Correctly parse 8192eu efuse Jes.Sorensen
2016-04-07 18:19 ` [PATCH 09/18] rtl8xxxu: Handle BB init for 8192eu Jes.Sorensen
2016-04-07 18:19 ` [PATCH 10/18] rtl8xxxu: Provide special handling when writing RF regs on 8192eu Jes.Sorensen
2016-04-07 18:19 ` [PATCH 11/18] rtl8xxxu: Handle XTAL value setting " Jes.Sorensen
2016-04-07 18:19 ` [PATCH 12/18] rtl8xxxu: Set correct interrupt masking registers " Jes.Sorensen
2016-04-07 18:19 ` [PATCH 13/18] rtl8xxxu: Set REG_USB_HRPWM for 8192eu Jes.Sorensen
2016-04-07 18:19 ` [PATCH 14/18] rtl8xxxu: Fix LDPC RX hang issue on 8192eu Jes.Sorensen
2016-04-07 18:19 ` [PATCH 15/18] rtl8xxxu: Implement 8192eu device specific quirks Jes.Sorensen
2016-04-07 18:19 ` [PATCH 16/18] rtl8xxxu: Use proper register name for REG_PAD_CTRL1 Jes.Sorensen
2016-04-07 18:19 ` [PATCH 17/18] rtl8xxxu: Implement IQK calibration for 8192eu Jes.Sorensen
2016-04-07 18:19 ` [PATCH 18/18] rtl8xxxu: Adjust AFE crystal value on 8192eu Jes.Sorensen

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=1460053173-8494-8-git-send-email-Jes.Sorensen@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /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.