linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] staging: rtl8188eu: Removed code valid for 5GHz
@ 2018-08-21  1:36 Bhaskar Singh
  2018-08-21  9:42 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Bhaskar Singh @ 2018-08-21  1:36 UTC (permalink / raw)
  To: devel; +Cc: linux-kernel, gregkh, bhaskar.kernel, dan.carpenter

This patch removes support for channels > 14. That is from the TODO which
says:

	-find and remove remaining code valid only for 5HGz. Most of
	obvious ones have been removed, but things like channel > 14 still
	exist.

Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
---

Changes in v2:
- Make the commit message more clearer.
- Rectify indentation as per Linux kernel coding style.
---
 drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
index 7d5cbaf50f1c..9e5c7e62d26f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
@@ -100,19 +100,13 @@ bool rtw_is_cckratesonly_included(u8 *rate)
 
 int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
 {
-	if (channel > 14) {
-		if (rtw_is_cckrates_included(rate))
-			return WIRELESS_INVALID;
-		else
-			return WIRELESS_11A;
-	} else {  /*  could be pure B, pure G, or B/G */
-		if (rtw_is_cckratesonly_included(rate))
-			return WIRELESS_11B;
-		else if (rtw_is_cckrates_included(rate))
-			return	WIRELESS_11BG;
-		else
-			return WIRELESS_11G;
-	}
+	/*  could be pure B, pure G, or B/G */
+	if (rtw_is_cckratesonly_included(rate))
+		return WIRELESS_11B;
+	else if (rtw_is_cckrates_included(rate))
+		return	WIRELESS_11BG;
+	else
+		return WIRELESS_11G;
 }
 
 u8 *rtw_set_fixed_ie(void *pbuf, unsigned int len, void *source,
-- 
2.16.4


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

* Re: [PATCH v2] staging: rtl8188eu: Removed code valid for 5GHz
  2018-08-21  1:36 [PATCH v2] staging: rtl8188eu: Removed code valid for 5GHz Bhaskar Singh
@ 2018-08-21  9:42 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2018-08-21  9:42 UTC (permalink / raw)
  To: Bhaskar Singh; +Cc: devel, gregkh, linux-kernel

Great.  Thanks!

regards,
dan carpenter


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

end of thread, other threads:[~2018-08-21  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-21  1:36 [PATCH v2] staging: rtl8188eu: Removed code valid for 5GHz Bhaskar Singh
2018-08-21  9:42 ` Dan Carpenter

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