netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] rtlwifi: rtl8192ee: simplify coding
@ 2016-05-18  0:43 Heinrich Schuchardt
  2016-05-18 12:02 ` Larry Finger
  2016-06-14 14:23 ` [1/1] " Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2016-05-18  0:43 UTC (permalink / raw)
  To: Larry Finger, Chaoming Li, Kalle Valo
  Cc: Wu Fengguang, linux-wireless, netdev, linux-kernel,
	Heinrich Schuchardt

Simplify _rtl92ee_phy_path_adda_on.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
index 018340a..c2bf8d1 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
@@ -2414,19 +2414,10 @@ static void _rtl92ee_phy_reload_mac_registers(struct ieee80211_hw *hw,
 static void _rtl92ee_phy_path_adda_on(struct ieee80211_hw *hw, u32 *addareg,
 				      bool is_patha_on, bool is2t)
 {
-	u32 pathon;
 	u32 i;
 
-	pathon = is_patha_on ? 0x0fc01616 : 0x0fc01616;
-	if (!is2t) {
-		pathon = 0x0fc01616;
-		rtl_set_bbreg(hw, addareg[0], MASKDWORD, 0x0fc01616);
-	} else {
-		rtl_set_bbreg(hw, addareg[0], MASKDWORD, pathon);
-	}
-
-	for (i = 1; i < IQK_ADDA_REG_NUM; i++)
-		rtl_set_bbreg(hw, addareg[i], MASKDWORD, pathon);
+	for (i = 0; i < IQK_ADDA_REG_NUM; i++)
+		rtl_set_bbreg(hw, addareg[i], MASKDWORD, 0x0fc01616);
 }
 
 static void _rtl92ee_phy_mac_setting_calibration(struct ieee80211_hw *hw,
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] rtlwifi: rtl8192ee: simplify coding
  2016-05-18  0:43 [PATCH 1/1] rtlwifi: rtl8192ee: simplify coding Heinrich Schuchardt
@ 2016-05-18 12:02 ` Larry Finger
  2016-06-14 14:23 ` [1/1] " Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Larry Finger @ 2016-05-18 12:02 UTC (permalink / raw)
  To: Heinrich Schuchardt, Kalle Valo
  Cc: Wu Fengguang, linux-wireless, netdev, linux-kernel

On 05/17/2016 07:43 PM, Heinrich Schuchardt wrote:
> Simplify _rtl92ee_phy_path_adda_on.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>   drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c | 13 ++-----------
>   1 file changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
> index 018340a..c2bf8d1 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
> @@ -2414,19 +2414,10 @@ static void _rtl92ee_phy_reload_mac_registers(struct ieee80211_hw *hw,
>   static void _rtl92ee_phy_path_adda_on(struct ieee80211_hw *hw, u32 *addareg,
>   				      bool is_patha_on, bool is2t)
>   {
> -	u32 pathon;
>   	u32 i;
>
> -	pathon = is_patha_on ? 0x0fc01616 : 0x0fc01616;
> -	if (!is2t) {
> -		pathon = 0x0fc01616;
> -		rtl_set_bbreg(hw, addareg[0], MASKDWORD, 0x0fc01616);
> -	} else {
> -		rtl_set_bbreg(hw, addareg[0], MASKDWORD, pathon);
> -	}
> -
> -	for (i = 1; i < IQK_ADDA_REG_NUM; i++)
> -		rtl_set_bbreg(hw, addareg[i], MASKDWORD, pathon);
> +	for (i = 0; i < IQK_ADDA_REG_NUM; i++)
> +		rtl_set_bbreg(hw, addareg[i], MASKDWORD, 0x0fc01616);
>   }
>
>   static void _rtl92ee_phy_mac_setting_calibration(struct ieee80211_hw *hw,

Initially the thought was that addareg[0] would need to be set differently for 
devices with 2 TX paths. For that reason, this routine was coded as shown. As 
that assumption is no longer valid, this change should be made.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [1/1] rtlwifi: rtl8192ee: simplify coding
  2016-05-18  0:43 [PATCH 1/1] rtlwifi: rtl8192ee: simplify coding Heinrich Schuchardt
  2016-05-18 12:02 ` Larry Finger
@ 2016-06-14 14:23 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-06-14 14:23 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Larry Finger, Chaoming Li, Kalle Valo, Wu Fengguang,
	linux-wireless, netdev, linux-kernel, Heinrich Schuchardt

Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> Simplify _rtl92ee_phy_path_adda_on.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Thanks, 1 patch applied to wireless-drivers-next.git:

a81605b14942 rtlwifi: rtl8192ee: simplify coding

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9115711/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-14 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18  0:43 [PATCH 1/1] rtlwifi: rtl8192ee: simplify coding Heinrich Schuchardt
2016-05-18 12:02 ` Larry Finger
2016-06-14 14:23 ` [1/1] " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).