linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: r8188eu: remove more rf_type related dead code
@ 2021-11-19 12:26 Michael Straube
  2021-11-19 12:26 ` [PATCH 1/2] staging: r8188eu: remove rf_type from add_RATid() Michael Straube
  2021-11-19 12:26 ` [PATCH 2/2] staging: r8188eu: remove rf_type from HT_caps_handler() Michael Straube
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Straube @ 2021-11-19 12:26 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

This small series removes some more rf_type related dead code.

Michael Straube (2):
  staging: r8188eu: remove rf_type from add_RATid()
  staging: r8188eu: remove rf_type from HT_caps_handler()

 drivers/staging/r8188eu/core/rtw_ap.c        |  7 +------
 drivers/staging/r8188eu/core/rtw_wlan_util.c | 11 ++---------
 2 files changed, 3 insertions(+), 15 deletions(-)

-- 
2.33.1


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

* [PATCH 1/2] staging: r8188eu: remove rf_type from add_RATid()
  2021-11-19 12:26 [PATCH 0/2] staging: r8188eu: remove more rf_type related dead code Michael Straube
@ 2021-11-19 12:26 ` Michael Straube
  2021-11-19 12:26 ` [PATCH 2/2] staging: r8188eu: remove rf_type from HT_caps_handler() Michael Straube
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Straube @ 2021-11-19 12:26 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

rf_type is always RF_1T1R. Remove it from add_RATid() and remove
related dead code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ap.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188eu/core/rtw_ap.c
index c78feeb9c862..47bd84b67a08 100644
--- a/drivers/staging/r8188eu/core/rtw_ap.c
+++ b/drivers/staging/r8188eu/core/rtw_ap.c
@@ -318,7 +318,6 @@ void	expire_timeout_chk(struct adapter *padapter)
 void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
 {
 	int i;
-	u8 rf_type;
 	u32 init_rate = 0;
 	unsigned char sta_band = 0, raid, shortGIrate = false;
 	unsigned char limit;
@@ -342,11 +341,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
 	}
 	/* n mode ra_bitmap */
 	if (psta_ht->ht_option) {
-		GetHwReg8188EU(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
-		if (rf_type == RF_2T2R)
-			limit = 16;/*  2R */
-		else
-			limit = 8;/*   1R */
+		limit = 8; /* 1R */
 
 		for (i = 0; i < limit; i++) {
 			if (psta_ht->ht_cap.mcs.rx_mask[i / 8] & BIT(i % 8))
-- 
2.33.1


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

* [PATCH 2/2] staging: r8188eu: remove rf_type from HT_caps_handler()
  2021-11-19 12:26 [PATCH 0/2] staging: r8188eu: remove more rf_type related dead code Michael Straube
  2021-11-19 12:26 ` [PATCH 1/2] staging: r8188eu: remove rf_type from add_RATid() Michael Straube
@ 2021-11-19 12:26 ` Michael Straube
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Straube @ 2021-11-19 12:26 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

rf_type is always RF_1T1R. Remove it from HT_caps_handler() and
remove related dead code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_wlan_util.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index 6d4e21a16783..3c8876822602 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -695,7 +695,6 @@ static void bwmode_update_check(struct adapter *padapter, struct ndis_802_11_var
 void HT_caps_handler(struct adapter *padapter, struct ndis_802_11_var_ie *pIE)
 {
 	unsigned int	i;
-	u8	rf_type;
 	u8	max_AMPDU_len, min_MPDU_spacing;
 	struct mlme_ext_priv	*pmlmeext = &padapter->mlmeextpriv;
 	struct mlme_ext_info	*pmlmeinfo = &pmlmeext->mlmext_info;
@@ -730,15 +729,9 @@ void HT_caps_handler(struct adapter *padapter, struct ndis_802_11_var_ie *pIE)
 		}
 	}
 
-	GetHwReg8188EU(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
-
 	/* update the MCS rates */
-	for (i = 0; i < 16; i++) {
-		if ((rf_type == RF_1T1R) || (rf_type == RF_1T2R))
-			pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_1R[i];
-		else
-			pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_2R[i];
-	}
+	for (i = 0; i < 16; i++)
+		pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_1R[i];
 }
 
 void HT_info_handler(struct adapter *padapter, struct ndis_802_11_var_ie *pIE)
-- 
2.33.1


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

end of thread, other threads:[~2021-11-19 12:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 12:26 [PATCH 0/2] staging: r8188eu: remove more rf_type related dead code Michael Straube
2021-11-19 12:26 ` [PATCH 1/2] staging: r8188eu: remove rf_type from add_RATid() Michael Straube
2021-11-19 12:26 ` [PATCH 2/2] staging: r8188eu: remove rf_type from HT_caps_handler() Michael Straube

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).