Blob Blame History Raw
From 6c352cfd12f40e95635e8f6b6be53f1f958e7f86 Mon Sep 17 00:00:00 2001
From: Bhaskar Singh <bhaskar.kernel@gmail.com>
Date: Tue, 21 Aug 2018 07:06:03 +0530
Subject: [PATCH] staging: rtl8188eu: Removed code valid for 5GHz
Git-commit: 6c352cfd12f40e95635e8f6b6be53f1f958e7f86
Patch-mainline: v4.20-rc1
References: FATE#326906

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 .../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.19.1