staging: r8188eu: remove constant variable
authorMartin Kaiser <martin@kaiser.cx>
Sun, 3 Apr 2022 16:32:06 +0000 (18:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 14:30:45 +0000 (16:30 +0200)
wifi_test_chk_rate is always 1. Remove the variable and the code to
check it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220403163206.357004-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme_ext.c

index ca415d1..2f85d3a 100644 (file)
@@ -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;
                        }
                }
        }