mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ivan Safonov <insafonov@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Bhaktipriya Shridhar <bhaktipriya96@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Geliang Tang <geliangtang@163.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: insafonov@gmail.com
Subject: [PATCH 06/37] staging:r8188eu: refactor rtl88eu_phy_iq_calibrate function
Date: Wed, 19 Oct 2016 22:07:34 +0700	[thread overview]
Message-ID: <1476889685-7367-6-git-send-email-insafonov@gmail.com> (raw)
In-Reply-To: <1476889685-7367-1-git-send-email-insafonov@gmail.com>

is2t local variable always is false.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/rtl8188eu/hal/phy.c | 57 +------------------------------------
 1 file changed, 1 insertion(+), 56 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
index 8462a91..c344882 100644
--- a/drivers/staging/rtl8188eu/hal/phy.c
+++ b/drivers/staging/rtl8188eu/hal/phy.c
@@ -768,53 +768,6 @@ static void patha_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8],
 	}
 }
 
-static void pathb_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8],
-			   u8 final_candidate, bool txonly)
-{
-	u32 oldval_1, x, tx1_a, reg;
-	s32 y, tx1_c;
-
-	if (final_candidate == 0xFF) {
-		return;
-	} else if (iqkok) {
-		oldval_1 = (phy_query_bb_reg(adapt, rOFDM0_XBTxIQImbalance, bMaskDWord) >> 22) & 0x3FF;
-
-		x = result[final_candidate][4];
-		if ((x & 0x00000200) != 0)
-			x = x | 0xFFFFFC00;
-		tx1_a = (x * oldval_1) >> 8;
-		phy_set_bb_reg(adapt, rOFDM0_XBTxIQImbalance, 0x3FF, tx1_a);
-
-		phy_set_bb_reg(adapt, rOFDM0_ECCAThreshold, BIT(27),
-			       ((x * oldval_1>>7) & 0x1));
-
-		y = result[final_candidate][5];
-		if ((y & 0x00000200) != 0)
-			y = y | 0xFFFFFC00;
-
-		tx1_c = (y * oldval_1) >> 8;
-
-		phy_set_bb_reg(adapt, rOFDM0_XDTxAFE, 0xF0000000,
-			       ((tx1_c&0x3C0)>>6));
-		phy_set_bb_reg(adapt, rOFDM0_XBTxIQImbalance, 0x003F0000,
-			       (tx1_c&0x3F));
-		phy_set_bb_reg(adapt, rOFDM0_ECCAThreshold, BIT(25),
-			       ((y * oldval_1>>7) & 0x1));
-
-		if (txonly)
-			return;
-
-		reg = result[final_candidate][6];
-		phy_set_bb_reg(adapt, rOFDM0_XBRxIQImbalance, 0x3FF, reg);
-
-		reg = result[final_candidate][7] & 0x3F;
-		phy_set_bb_reg(adapt, rOFDM0_XBRxIQImbalance, 0xFC00, reg);
-
-		reg = (result[final_candidate][7] >> 6) & 0xF;
-		phy_set_bb_reg(adapt, rOFDM0_AGCRSSITable, 0x0000F000, reg);
-	}
-}
-
 static void save_adda_registers(struct adapter *adapt, u32 *addareg,
 				u32 *backup, u32 register_num)
 {
@@ -1232,9 +1185,6 @@ void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery)
 		rOFDM0_XATxIQImbalance, rOFDM0_XBTxIQImbalance,
 		rOFDM0_XCTxAFE, rOFDM0_XDTxAFE,
 		rOFDM0_RxIQExtAnta};
-	bool is2t;
-
-	is2t = false;
 
 	if (!(dm_odm->SupportAbility & ODM_RF_CALIBRATION))
 		return;
@@ -1267,7 +1217,7 @@ void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery)
 	is13simular = false;
 
 	for (i = 0; i < 3; i++) {
-		phy_iq_calibrate(adapt, result, i, is2t);
+		phy_iq_calibrate(adapt, result, i, 0);
 
 		if (i == 1) {
 			is12simular = simularity_compare(adapt, result, 0, 1);
@@ -1324,11 +1274,6 @@ void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery)
 	if (reg_e94 != 0)
 		patha_fill_iqk(adapt, pathaok, result, final,
 			       (reg_ea4 == 0));
-	if (is2t) {
-		if (reg_eb4 != 0)
-			pathb_fill_iqk(adapt, pathbok, result, final,
-				       (reg_ec4 == 0));
-	}
 
 	chn_index = get_right_chnl_for_iqk(adapt->HalData->CurrentChannel);
 
-- 
2.7.3

  parent reply	other threads:[~2016-10-19 15:06 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 15:07 [PATCH 01/37] staging:r8188eu: remove get_rxmem function Ivan Safonov
2016-10-19 15:07 ` [PATCH 02/37] staging:r8188eu: remove device assignment after netdev_alloc_skb call Ivan Safonov
2016-10-19 16:53   ` Andy Shevchenko
2016-10-19 16:59     ` Andy Shevchenko
2016-10-20 12:16       ` Ivan Safonov
2016-10-25  8:51         ` Greg Kroah-Hartman
2016-10-20  8:46   ` Dan Carpenter
2016-10-19 15:07 ` [PATCH 03/37] staging:r8188eu: remove skb cloning after netdev_alloc_skb fail Ivan Safonov
2016-10-20  8:43   ` Dan Carpenter
2016-10-19 15:07 ` [PATCH 04/37] staging:r8188eu: remove WIFI_MP_* definitions and all corresponding code Ivan Safonov
2016-10-19 15:07 ` [PATCH 05/37] staging:r8188eu: remove mp_mode member of odm_dm_struct and odm_dm_struct structures Ivan Safonov
2016-10-19 15:07 ` Ivan Safonov [this message]
2016-10-19 15:07 ` [PATCH 07/37] staging:r8188eu: remove is2t argument if the phy_iq_calibrate function Ivan Safonov
2016-10-19 15:07 ` [PATCH 08/37] staging:r8188eu: refactor path_adda_on function Ivan Safonov
2016-10-19 15:07 ` [PATCH 09/37] staging:r8188eu: remove is2t argument of phy_lc_calibrate function Ivan Safonov
2016-10-19 15:07 ` [PATCH 10/37] staging:r8188eu: remove type cast for first argument of memset Ivan Safonov
2016-10-19 15:07 ` [PATCH 11/37] staging:r8188eu: remove is_(multicast|broadcast)_mac_addr Ivan Safonov
2016-10-19 15:07 ` [PATCH 12/37] staging:r8188eu: remove ieee80211_get_hdrlen function Ivan Safonov
2016-10-19 15:07 ` [PATCH 13/37] staging:r8188eu: remove debug messages after memory allocation failed Ivan Safonov
2016-10-25  9:11   ` Dan Carpenter
2016-10-19 15:07 ` [PATCH 14/37] staging:r8188eu: remove ieee80211_is_empty_essid function Ivan Safonov
2016-10-19 15:07 ` [PATCH 15/37] staging:r8188eu: remove rx_head member of recv_frame structure Ivan Safonov
2016-10-19 15:07 ` [PATCH 16/37] staging:r8188eu: change recvframe_pull last argument type Ivan Safonov
2016-10-19 15:07 ` [PATCH 17/37] staging:r8188eu: update pkt->data synchronously with rx_data Ivan Safonov
2016-10-20  9:03   ` Dan Carpenter
2016-10-20 13:15     ` Ivan Safonov
2016-10-19 15:07 ` [PATCH 18/37] staging:r8188eu: remove rx_data member of recv_frame structure Ivan Safonov
2016-10-19 15:07 ` [PATCH 19/37] staging:r8188eu: remove rx_end " Ivan Safonov
2016-10-19 15:07 ` [PATCH 20/37] staging:r8188eu: change recvframe_put last argument type Ivan Safonov
2016-10-19 15:07 ` [PATCH 21/37] staging:r8188eu: change recvframe_pull_tail " Ivan Safonov
2016-10-19 15:07 ` [PATCH 22/37] staging:r8188eu: change recvframe_pull_tail type to void Ivan Safonov
2016-10-19 15:07 ` [PATCH 23/37] staging:r8188eu: update rx_tail and pkt->tail synchronously Ivan Safonov
2016-10-19 15:07 ` [PATCH 24/37] staging:r8188eu: remove rx_tail member of recv_frame structure Ivan Safonov
2016-10-19 15:07 ` [PATCH 25/37] staging:r8188eu: remove len " Ivan Safonov
2016-10-19 15:07 ` [PATCH 26/37] staging:r8188eu: remove recvframe_pull function Ivan Safonov
2016-10-19 15:07 ` [PATCH 27/37] staging:r8188eu: remove recvframe_put function Ivan Safonov
2016-10-19 15:07 ` [PATCH 28/37] staging:r8188eu: remove recvframe_pull_tail function Ivan Safonov
2016-10-19 15:07 ` [PATCH 29/37] staging:r8188eu: take out stripping of iv and icv space from wlanhdr_to_ethhdr function Ivan Safonov
2016-10-20  9:11   ` Dan Carpenter
2016-10-19 15:07 ` [PATCH 30/37] staging:r8188eu: remove eth_type member of rx_pkt_attrib structure Ivan Safonov
2016-10-19 15:07 ` [PATCH 31/37] staging:r8188eu: remove pscanned member of mlme_priv structure Ivan Safonov
2016-10-19 15:08 ` [PATCH 32/37] staging:r8188eu: remove SET_EARLYMODE_* definitions Ivan Safonov
2016-10-19 15:08 ` [PATCH 33/37] staging:r8188eu: remove rtw_calculate_wlan_pkt_size_by_attribue function Ivan Safonov
2016-10-19 15:08 ` [PATCH 34/37] staging:r8188eu: remove update_bcn member of mlme_priv structure Ivan Safonov
2016-10-19 15:08 ` [PATCH 35/37] staging:r8188eu: remove clr_fwstate* functions Ivan Safonov
2016-10-19 15:08 ` [PATCH 36/37] staging:r8188eu: remove unused structures from include/rtw_mlme.h Ivan Safonov
2016-10-19 15:08 ` [PATCH 37/37] staging:r8188eu: remove P2P_* enumerations Ivan Safonov
2016-10-20  9:18 ` [PATCH 01/37] staging:r8188eu: remove get_rxmem function Dan Carpenter
2016-10-20 13:56   ` Ivan Safonov

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=1476889685-7367-6-git-send-email-insafonov@gmail.com \
    --to=insafonov@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bhaktipriya96@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=geliangtang@163.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome