linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] staging: r8188eu: remove unused functions
@ 2021-08-29  9:24 Michael Straube
  2021-08-29  9:24 ` [PATCH 1/6] staging: r8188eu: remove rtw_get_oper_bw() Michael Straube
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Michael Straube @ 2021-08-29  9:24 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

This series removes unused functions from core/rtw_wlan_util.c.

Michael Straube (6):
  staging: r8188eu: remove rtw_get_oper_bw()
  staging: r8188eu: remove rtw_get_oper_choffset()
  staging: r8188eu: remove get_bsstype()
  staging: r8188eu: remove CAM_empty_entry()
  staging: r8188eu: remove is_ap_in_wep()
  staging: r8188eu: remove should_forbid_n_rate()

 drivers/staging/r8188eu/core/rtw_wlan_util.c  | 91 -------------------
 .../staging/r8188eu/include/rtw_mlme_ext.h    |  6 --
 2 files changed, 97 deletions(-)

-- 
2.32.0


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

* [PATCH 1/6] staging: r8188eu: remove rtw_get_oper_bw()
  2021-08-29  9:24 [PATCH 0/6] staging: r8188eu: remove unused functions Michael Straube
@ 2021-08-29  9:24 ` Michael Straube
  2021-08-29  9:24 ` [PATCH 2/6] staging: r8188eu: remove rtw_get_oper_choffset() Michael Straube
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2021-08-29  9:24 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Function rtw_get_oper_bw() is unused, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_wlan_util.c   | 5 -----
 drivers/staging/r8188eu/include/rtw_mlme_ext.h | 1 -
 2 files changed, 6 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index a3a5e1c64c4a..e13e4dd189be 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -304,11 +304,6 @@ inline void rtw_set_oper_ch(struct adapter *adapter, u8 ch)
 	adapter->mlmeextpriv.oper_channel = ch;
 }
 
-inline u8 rtw_get_oper_bw(struct adapter *adapter)
-{
-	return adapter->mlmeextpriv.oper_bwmode;
-}
-
 inline void rtw_set_oper_bw(struct adapter *adapter, u8 bw)
 {
 	adapter->mlmeextpriv.oper_bwmode = bw;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index d2f4d3ce7b90..b3ca9f3fba7f 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -447,7 +447,6 @@ void Set_MSR(struct adapter *padapter, u8 type);
 
 u8 rtw_get_oper_ch(struct adapter *adapter);
 void rtw_set_oper_ch(struct adapter *adapter, u8 ch);
-u8 rtw_get_oper_bw(struct adapter *adapter);
 void rtw_set_oper_bw(struct adapter *adapter, u8 bw);
 u8 rtw_get_oper_choffset(struct adapter *adapter);
 void rtw_set_oper_choffset(struct adapter *adapter, u8 offset);
-- 
2.32.0


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

* [PATCH 2/6] staging: r8188eu: remove rtw_get_oper_choffset()
  2021-08-29  9:24 [PATCH 0/6] staging: r8188eu: remove unused functions Michael Straube
  2021-08-29  9:24 ` [PATCH 1/6] staging: r8188eu: remove rtw_get_oper_bw() Michael Straube
@ 2021-08-29  9:24 ` Michael Straube
  2021-08-29  9:24 ` [PATCH 3/6] staging: r8188eu: remove get_bsstype() Michael Straube
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2021-08-29  9:24 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Function rtw_get_oper_choffset() is unused, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_wlan_util.c   | 5 -----
 drivers/staging/r8188eu/include/rtw_mlme_ext.h | 1 -
 2 files changed, 6 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index e13e4dd189be..57330b3a66d7 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -309,11 +309,6 @@ inline void rtw_set_oper_bw(struct adapter *adapter, u8 bw)
 	adapter->mlmeextpriv.oper_bwmode = bw;
 }
 
-inline u8 rtw_get_oper_choffset(struct adapter *adapter)
-{
-	return adapter->mlmeextpriv.oper_ch_offset;
-}
-
 inline void rtw_set_oper_choffset(struct adapter *adapter, u8 offset)
 {
 	adapter->mlmeextpriv.oper_ch_offset = offset;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index b3ca9f3fba7f..fe3a32f17308 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -448,7 +448,6 @@ void Set_MSR(struct adapter *padapter, u8 type);
 u8 rtw_get_oper_ch(struct adapter *adapter);
 void rtw_set_oper_ch(struct adapter *adapter, u8 ch);
 void rtw_set_oper_bw(struct adapter *adapter, u8 bw);
-u8 rtw_get_oper_choffset(struct adapter *adapter);
 void rtw_set_oper_choffset(struct adapter *adapter, u8 offset);
 
 void set_channel_bwmode(struct adapter *padapter, unsigned char channel,
-- 
2.32.0


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

* [PATCH 3/6] staging: r8188eu: remove get_bsstype()
  2021-08-29  9:24 [PATCH 0/6] staging: r8188eu: remove unused functions Michael Straube
  2021-08-29  9:24 ` [PATCH 1/6] staging: r8188eu: remove rtw_get_oper_bw() Michael Straube
  2021-08-29  9:24 ` [PATCH 2/6] staging: r8188eu: remove rtw_get_oper_choffset() Michael Straube
@ 2021-08-29  9:24 ` Michael Straube
  2021-08-29  9:25 ` [PATCH 4/6] staging: r8188eu: remove CAM_empty_entry() Michael Straube
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2021-08-29  9:24 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Function get_bsstype() is unused, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_wlan_util.c   | 10 ----------
 drivers/staging/r8188eu/include/rtw_mlme_ext.h |  1 -
 2 files changed, 11 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index 57330b3a66d7..bc10a08d01e6 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -363,16 +363,6 @@ void set_channel_bwmode(struct adapter *padapter, unsigned char channel, unsigne
 	SetBWMode(padapter, bwmode, channel_offset);
 }
 
-int get_bsstype(unsigned short capability)
-{
-	if (capability & BIT(0))
-		return WIFI_FW_AP_STATE;
-	else if (capability & BIT(1))
-		return WIFI_FW_ADHOC_STATE;
-	else
-		return 0;
-}
-
 __inline u8 *get_my_bssid(struct wlan_bssid_ex *pnetwork)
 {
 	return pnetwork->MacAddress;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index fe3a32f17308..c6b17da73c5f 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -473,7 +473,6 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame,
 void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
 		    struct adapter *adapter, bool update_ie);
 
-int get_bsstype(unsigned short capability);
 u8 *get_my_bssid(struct wlan_bssid_ex *pnetwork);
 u16 get_beacon_interval(struct wlan_bssid_ex *bss);
 
-- 
2.32.0


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

* [PATCH 4/6] staging: r8188eu: remove CAM_empty_entry()
  2021-08-29  9:24 [PATCH 0/6] staging: r8188eu: remove unused functions Michael Straube
                   ` (2 preceding siblings ...)
  2021-08-29  9:24 ` [PATCH 3/6] staging: r8188eu: remove get_bsstype() Michael Straube
@ 2021-08-29  9:25 ` Michael Straube
  2021-08-29  9:25 ` [PATCH 5/6] staging: r8188eu: remove is_ap_in_wep() Michael Straube
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2021-08-29  9:25 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Function CAM_empty_entry() is unused, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_wlan_util.c   | 5 -----
 drivers/staging/r8188eu/include/rtw_mlme_ext.h | 1 -
 2 files changed, 6 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index bc10a08d01e6..ddc84f6b74e2 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -427,11 +427,6 @@ unsigned int decide_wait_for_beacon_timeout(unsigned int bcn_interval)
 		return bcn_interval << 2;
 }
 
-void CAM_empty_entry(struct adapter *Adapter, u8 ucIndex)
-{
-	rtw_hal_set_hwreg(Adapter, HW_VAR_CAM_EMPTY_ENTRY, (u8 *)(&ucIndex));
-}
-
 void invalidate_cam_all(struct adapter *padapter)
 {
 	rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, NULL);
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index c6b17da73c5f..01f770d02e5f 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -462,7 +462,6 @@ void write_cam(struct adapter *padapter, u8 entry, u16 ctrl, u8 *mac, u8 *key);
 void clear_cam_entry(struct adapter *padapter, u8 entry);
 
 void invalidate_cam_all(struct adapter *padapter);
-void CAM_empty_entry(struct adapter * Adapter, u8 ucIndex);
 
 int allocate_fw_sta_entry(struct adapter *padapter);
 void flush_all_cam_entry(struct adapter *padapter);
-- 
2.32.0


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

* [PATCH 5/6] staging: r8188eu: remove is_ap_in_wep()
  2021-08-29  9:24 [PATCH 0/6] staging: r8188eu: remove unused functions Michael Straube
                   ` (3 preceding siblings ...)
  2021-08-29  9:25 ` [PATCH 4/6] staging: r8188eu: remove CAM_empty_entry() Michael Straube
@ 2021-08-29  9:25 ` Michael Straube
  2021-08-29  9:25 ` [PATCH 6/6] staging: r8188eu: remove should_forbid_n_rate() Michael Straube
  2021-08-30  0:10 ` [PATCH 0/6] staging: r8188eu: remove unused functions Phillip Potter
  6 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2021-08-29  9:25 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Function is_ap_in_wep() is unused, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_wlan_util.c  | 30 -------------------
 .../staging/r8188eu/include/rtw_mlme_ext.h    |  1 -
 2 files changed, 31 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index ddc84f6b74e2..8491d82f4a70 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -1134,36 +1134,6 @@ unsigned int should_forbid_n_rate(struct adapter *padapter)
 	}
 }
 
-unsigned int is_ap_in_wep(struct adapter *padapter)
-{
-	u32 i;
-	struct ndis_802_11_var_ie *pIE;
-	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
-	struct mlme_ext_info	*pmlmeinfo = &pmlmeext->mlmext_info;
-	struct wlan_bssid_ex		*cur_network = &pmlmeinfo->network;
-
-	if (rtw_get_capability((struct wlan_bssid_ex *)cur_network) & WLAN_CAPABILITY_PRIVACY) {
-		for (i = sizeof(struct ndis_802_11_fixed_ie); i < pmlmeinfo->network.IELength;) {
-			pIE = (struct ndis_802_11_var_ie *)(pmlmeinfo->network.IEs + i);
-
-			switch (pIE->ElementID) {
-			case _VENDOR_SPECIFIC_IE_:
-				if (!memcmp(pIE->data, RTW_WPA_OUI, 4))
-					return false;
-				break;
-			case _RSN_IE_2_:
-				return false;
-			default:
-				break;
-			}
-			i += (pIE->Length + 2);
-		}
-		return true;
-	} else {
-		return false;
-	}
-}
-
 int wifirate2_ratetbl_inx(unsigned char rate)
 {
 	int	inx = 0;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index 01f770d02e5f..1695a9695ddf 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -516,7 +516,6 @@ unsigned int receive_disconnect(struct adapter *padapter,
 unsigned char get_highest_rate_idx(u32 mask);
 int support_short_GI(struct adapter *padapter, struct HT_caps_element *caps);
 unsigned int is_ap_in_tkip(struct adapter *padapter);
-unsigned int is_ap_in_wep(struct adapter *padapter);
 unsigned int should_forbid_n_rate(struct adapter *padapter);
 
 void report_join_res(struct adapter *padapter, int res);
-- 
2.32.0


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

* [PATCH 6/6] staging: r8188eu: remove should_forbid_n_rate()
  2021-08-29  9:24 [PATCH 0/6] staging: r8188eu: remove unused functions Michael Straube
                   ` (4 preceding siblings ...)
  2021-08-29  9:25 ` [PATCH 5/6] staging: r8188eu: remove is_ap_in_wep() Michael Straube
@ 2021-08-29  9:25 ` Michael Straube
  2021-08-30  0:10 ` [PATCH 0/6] staging: r8188eu: remove unused functions Phillip Potter
  6 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2021-08-29  9:25 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Function should_forbid_n_rate() is unused, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_wlan_util.c  | 36 -------------------
 .../staging/r8188eu/include/rtw_mlme_ext.h    |  1 -
 2 files changed, 37 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index 8491d82f4a70..ccb5fbbc3ffb 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -1098,42 +1098,6 @@ unsigned int is_ap_in_tkip(struct adapter *padapter)
 	}
 }
 
-unsigned int should_forbid_n_rate(struct adapter *padapter)
-{
-	u32 i;
-	struct ndis_802_11_var_ie *pIE;
-	struct mlme_priv	*pmlmepriv = &padapter->mlmepriv;
-	struct wlan_bssid_ex  *cur_network = &pmlmepriv->cur_network.network;
-
-	if (rtw_get_capability((struct wlan_bssid_ex *)cur_network) & WLAN_CAPABILITY_PRIVACY) {
-		for (i = sizeof(struct ndis_802_11_fixed_ie); i < cur_network->IELength;) {
-			pIE = (struct ndis_802_11_var_ie *)(cur_network->IEs + i);
-
-			switch (pIE->ElementID) {
-			case _VENDOR_SPECIFIC_IE_:
-				if (!memcmp(pIE->data, RTW_WPA_OUI, 4) &&
-				    ((!memcmp((pIE->data + 12), WPA_CIPHER_SUITE_CCMP, 4)) ||
-				    (!memcmp((pIE->data + 16), WPA_CIPHER_SUITE_CCMP, 4))))
-					return false;
-				break;
-			case _RSN_IE_2_:
-				if  ((!memcmp((pIE->data + 8), RSN_CIPHER_SUITE_CCMP, 4))  ||
-				     (!memcmp((pIE->data + 12), RSN_CIPHER_SUITE_CCMP, 4)))
-					return false;
-				break;
-			default:
-				break;
-			}
-
-			i += (pIE->Length + 2);
-		}
-
-		return true;
-	} else {
-		return false;
-	}
-}
-
 int wifirate2_ratetbl_inx(unsigned char rate)
 {
 	int	inx = 0;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index 1695a9695ddf..e15e2cec77bd 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -516,7 +516,6 @@ unsigned int receive_disconnect(struct adapter *padapter,
 unsigned char get_highest_rate_idx(u32 mask);
 int support_short_GI(struct adapter *padapter, struct HT_caps_element *caps);
 unsigned int is_ap_in_tkip(struct adapter *padapter);
-unsigned int should_forbid_n_rate(struct adapter *padapter);
 
 void report_join_res(struct adapter *padapter, int res);
 void report_survey_event(struct adapter *padapter, struct recv_frame *precv_frame);
-- 
2.32.0


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

* Re: [PATCH 0/6] staging: r8188eu: remove unused functions
  2021-08-29  9:24 [PATCH 0/6] staging: r8188eu: remove unused functions Michael Straube
                   ` (5 preceding siblings ...)
  2021-08-29  9:25 ` [PATCH 6/6] staging: r8188eu: remove should_forbid_n_rate() Michael Straube
@ 2021-08-30  0:10 ` Phillip Potter
  6 siblings, 0 replies; 8+ messages in thread
From: Phillip Potter @ 2021-08-30  0:10 UTC (permalink / raw)
  To: Michael Straube
  Cc: Greg KH, Larry Finger, Martin Kaiser, Fabio M. De Francesco,
	open list:STAGING SUBSYSTEM, Linux Kernel Mailing List

On Sun, 29 Aug 2021 at 10:25, Michael Straube <straube.linux@gmail.com> wrote:
>
> This series removes unused functions from core/rtw_wlan_util.c.
>
> Michael Straube (6):
>   staging: r8188eu: remove rtw_get_oper_bw()
>   staging: r8188eu: remove rtw_get_oper_choffset()
>   staging: r8188eu: remove get_bsstype()
>   staging: r8188eu: remove CAM_empty_entry()
>   staging: r8188eu: remove is_ap_in_wep()
>   staging: r8188eu: remove should_forbid_n_rate()
>
>  drivers/staging/r8188eu/core/rtw_wlan_util.c  | 91 -------------------
>  .../staging/r8188eu/include/rtw_mlme_ext.h    |  6 --
>  2 files changed, 97 deletions(-)
>
> --
> 2.32.0
>

Dear Michael,

Looks good and builds/runs fine for me, many thanks.

Acked-by: Phillip Potter <phil@philpotter.co.uk>

Regards,
Phil

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

end of thread, other threads:[~2021-08-30  0:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-29  9:24 [PATCH 0/6] staging: r8188eu: remove unused functions Michael Straube
2021-08-29  9:24 ` [PATCH 1/6] staging: r8188eu: remove rtw_get_oper_bw() Michael Straube
2021-08-29  9:24 ` [PATCH 2/6] staging: r8188eu: remove rtw_get_oper_choffset() Michael Straube
2021-08-29  9:24 ` [PATCH 3/6] staging: r8188eu: remove get_bsstype() Michael Straube
2021-08-29  9:25 ` [PATCH 4/6] staging: r8188eu: remove CAM_empty_entry() Michael Straube
2021-08-29  9:25 ` [PATCH 5/6] staging: r8188eu: remove is_ap_in_wep() Michael Straube
2021-08-29  9:25 ` [PATCH 6/6] staging: r8188eu: remove should_forbid_n_rate() Michael Straube
2021-08-30  0:10 ` [PATCH 0/6] staging: r8188eu: remove unused functions Phillip Potter

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