All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] two simple cleanups in OnProbeReq
@ 2022-04-03 16:32 Martin Kaiser
  2022-04-03 16:32 ` [PATCH 1/2] staging: r8188eu: remove unnecessary jump Martin Kaiser
  2022-04-03 16:32 ` [PATCH 2/2] staging: r8188eu: remove constant variable Martin Kaiser
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Kaiser @ 2022-04-03 16:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove a constant variable and an unnecessary goto.

Martin Kaiser (2):
  staging: r8188eu: remove unnecessary jump
  staging: r8188eu: remove constant variable

 drivers/staging/r8188eu/core/rtw_mlme_ext.c | 24 +++++++--------------
 1 file changed, 8 insertions(+), 16 deletions(-)

-- 
2.30.2


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

* [PATCH 1/2] staging: r8188eu: remove unnecessary jump
  2022-04-03 16:32 [PATCH 0/2] two simple cleanups in OnProbeReq Martin Kaiser
@ 2022-04-03 16:32 ` Martin Kaiser
  2022-04-03 16:32 ` [PATCH 2/2] staging: r8188eu: remove constant variable Martin Kaiser
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Kaiser @ 2022-04-03 16:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Don't jump to _continue, we go there anyway.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/core/rtw_mlme_ext.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 2c073219c13f..ca415d123cbf 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -503,15 +503,10 @@ unsigned int OnProbeReq(struct adapter *padapter, struct recv_frame *precv_frame
 
 					return _SUCCESS;
 				}
-
-				if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
-					goto _continue;
 			}
 		}
 	}
 
-_continue:
-
 	if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
 		return _SUCCESS;
 
-- 
2.30.2


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

* [PATCH 2/2] staging: r8188eu: remove constant variable
  2022-04-03 16:32 [PATCH 0/2] two simple cleanups in OnProbeReq Martin Kaiser
  2022-04-03 16:32 ` [PATCH 1/2] staging: r8188eu: remove unnecessary jump Martin Kaiser
@ 2022-04-03 16:32 ` Martin Kaiser
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Kaiser @ 2022-04-03 16:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

wifi_test_chk_rate is always 1. Remove the variable and the code to
check it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/core/rtw_mlme_ext.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index ca415d123cbf..2f85d3a545cd 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -478,7 +478,6 @@ unsigned int OnProbeReq(struct adapter *padapter, struct recv_frame *precv_frame
 	u8 is_valid_p2p_probereq = false;
 
 	struct wifidirect_info	*pwdinfo = &padapter->wdinfo;
-	u8 wifi_test_chk_rate = 1;
 
 	if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) &&
 	    !rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE) &&
@@ -493,16 +492,14 @@ unsigned int OnProbeReq(struct adapter *padapter, struct recv_frame *precv_frame
 
 		/*	Commented by Kurt 2012/10/16 */
 		/*	IOT issue: Google Nexus7 use 1M rate to send p2p_probe_req after GO nego completed and Nexus7 is client */
-		if (wifi_test_chk_rate == 1) {
-			is_valid_p2p_probereq = process_probe_req_p2p_ie(pwdinfo, pframe, len);
-			if (is_valid_p2p_probereq) {
-				if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_DEVICE)) {
-					/*  FIXME */
-					report_survey_event(padapter, precv_frame);
-					p2p_listen_state_process(padapter,  get_sa(pframe));
-
-					return _SUCCESS;
-				}
+		is_valid_p2p_probereq = process_probe_req_p2p_ie(pwdinfo, pframe, len);
+		if (is_valid_p2p_probereq) {
+			if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_DEVICE)) {
+				/*  FIXME */
+				report_survey_event(padapter, precv_frame);
+				p2p_listen_state_process(padapter,  get_sa(pframe));
+
+				return _SUCCESS;
 			}
 		}
 	}
-- 
2.30.2


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

end of thread, other threads:[~2022-04-03 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03 16:32 [PATCH 0/2] two simple cleanups in OnProbeReq Martin Kaiser
2022-04-03 16:32 ` [PATCH 1/2] staging: r8188eu: remove unnecessary jump Martin Kaiser
2022-04-03 16:32 ` [PATCH 2/2] staging: r8188eu: remove constant variable Martin Kaiser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.