From patchwork Sun Oct 23 17:08:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 8065 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp70610wru; Sun, 23 Oct 2022 10:10:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5f/acxpB0+pLCFbQyJk69AgC17D9tny0jjf0H0YR2vcBn+2pqSOAjvh5um6WEQIhU23ZTJ X-Received: by 2002:a17:90a:9405:b0:212:d24e:b3b with SMTP id r5-20020a17090a940500b00212d24e0b3bmr14644322pjo.43.1666545020314; Sun, 23 Oct 2022 10:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666545020; cv=none; d=google.com; s=arc-20160816; b=HMtSn8oKrpLR/Ut3fymAPCPqE/aN/zgyWHfT9sITl+i9UCCsAH/r0ZAX3c4RaukzpK NK+ZeX8Yu+P1zpyckI/aeJxdoIuSAdkIhaSF6Oues99Ko9e2825vrWSrZ2tSRCsJgIXI F8qNK82WHuFNBm2a34gCf2CCD+YgIA9ISQNFo6AgviHoacPBDeKDvdpeaIm2uQJgGRoX Ir83M1Ga3fhFx6TFR9ApM6NgInVUYi0jXvAEXwgVBKC+zUjwhzYBQ7qIfHqbJWbx+3sD mhlXHpZT9nDM0PXFEXixu/XjlLrfe1WcwmXkW+yh/EzlWw+A3s6ZvSrwJ+U0smXz5ADc Dt4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PV+Ey3TGRpopRY76XNoBiP+UtPhhhxbM4xlGKQvbNsg=; b=jsDHGrLyB7T8XYiHDoXQf3vggbaOfpGSK0j5cEo1VkgWfbF3r+l1xsQkvLJlip3WTV /uW4LSZmVafkEf5o8VUUX1nL2WU3Euw3AXX5hnRLpShAP+4VwmXXfdRtePvlQ7yYu6De /vU9oRfBvF1DlT8kwDsMphCcHPY4wc2Rt1C81Lu/6+oToKVqMzG81pxTcRjRQKmnF954 CSj+A5foEqseRiC2xu7cgSQZNSvJKd1flDeYOWefB2o/se/70+5Tn19p89kXtGkUJCkX pWCsOlJg7a0sBl1Y+099GN1G8frX0LAGDPtL7i6CG9NoeYZ/LqlbAMAYwE7UGAnx5fNo 7srg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d21-20020a056a0024d500b00565ec924efasi32710368pfv.365.2022.10.23.10.10.06; Sun, 23 Oct 2022 10:10:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230261AbiJWRIX (ORCPT + 99 others); Sun, 23 Oct 2022 13:08:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiJWRIV (ORCPT ); Sun, 23 Oct 2022 13:08:21 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CF9273305 for ; Sun, 23 Oct 2022 10:08:20 -0700 (PDT) Received: from ipservice-092-217-070-181.092.217.pools.vodafone-ip.de ([92.217.70.181] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1omeSO-0000Rj-Pc; Sun, 23 Oct 2022 19:08:16 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 1/5] staging: r8188eu: use standard multicast addr check Date: Sun, 23 Oct 2022 19:08:04 +0200 Message-Id: <20221023170808.46233-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221023170808.46233-1-martin@kaiser.cx> References: <20221023170808.46233-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747499110878122782?= X-GMAIL-MSGID: =?utf-8?q?1747499110878122782?= Use is_multicast_ether_addr to check for a multicast address instead of reimplementing this check in the driver. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_sta_mgt.c | 2 +- drivers/staging/r8188eu/include/wifi.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c index bbde5c03f9ae..51324e708697 100644 --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c @@ -404,7 +404,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) if (!hwaddr) return NULL; - if (IS_MCAST(hwaddr)) + if (is_multicast_ether_addr(hwaddr)) addr = bc_addr; else addr = hwaddr; diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h index 381385a7e118..fdb7c1bf3573 100644 --- a/drivers/staging/r8188eu/include/wifi.h +++ b/drivers/staging/r8188eu/include/wifi.h @@ -236,11 +236,6 @@ enum WIFI_REG_DOMAIN { #define GetAddr4Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 24)) -static inline bool IS_MCAST(unsigned char *da) -{ - return (*da) & 0x01; -} - static inline unsigned char *get_da(unsigned char *pframe) { unsigned char *da; From patchwork Sun Oct 23 17:08:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 8066 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp71232wru; Sun, 23 Oct 2022 10:12:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4atrkQkz/PQ6bD+lMBJbZx2WiOOtte1NACF71S0Uvr2l1RxsRgFvQ5uoa8ic2F9w/Ggjh2 X-Received: by 2002:a05:6402:34cf:b0:461:a72c:7ada with SMTP id w15-20020a05640234cf00b00461a72c7adamr3718613edc.198.1666545138712; Sun, 23 Oct 2022 10:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666545138; cv=none; d=google.com; s=arc-20160816; b=MIZhDJKhB7J7OkevXVHAyHtpmYZDwy2vSEOJxd6t2BnoT/4TEisjMufL16df2lrHYu u+MYIyVNCvuFboLRUF2XcKnl6tr0yoswz7+6e7crNnCOcuWFODyqIupw/M26oQOz0d0h m6YAF6rGPi01gXKQy7lOGtx7AqPVYZpbVya6l+6/D+ytHZ+k1Y+GkNgdUcQMi77OKf+0 dNmqPhu/e67h/tg1QLMmuVzoj9kJ8VntyBgN80+Vd3Zh0v6H8srlwcfj5V1ZVMYIJvEC 0eXJAMKVO6v/j+7LNIL+Zyg48SZRn2EEU2WTGVnrQMDRGgXd2UWZ8LtkWX4uO2nct6Wn k+ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=4nFeAMuE5vQtUSJvez1rPYc9o3vOdn6J4P6PrllP7ZU=; b=T7gjVt8IkjSQMUIhpoP11E/zNE7zMyJ1t6vZP2xFwumxmZYYWGW6OkIFjBfZ2sDA5K zCQtKRch+eMCDE2Om+FYSY/JD9OhXe1bhCqDpwlifhI0W0gDx1/1BEMyVSLvAwqHniH3 AODkGStDsZvurnBMOnMci1DQkNIfDL3QMWeeUG1iq1CiTKIp2YV/Ebaajvu31Zk0AuW9 LyyXqrWfRtn/f39vMiTHXPDEbwhsKzzL8SIEz1ZHuUOnAxuqaf2Zsu+GdiAgXIh2957z mBNbmCQ1qhvJ178+BDxPllZ3iRRaU6X82dxCD7SQ0drZMte9Af1LyLpYL2OrtzsFI+vp SNkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i14-20020a1709064fce00b0078db594808dsi23543736ejw.588.2022.10.23.10.11.54; Sun, 23 Oct 2022 10:12:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230408AbiJWRI1 (ORCPT + 99 others); Sun, 23 Oct 2022 13:08:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiJWRIY (ORCPT ); Sun, 23 Oct 2022 13:08:24 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0777F72FF4 for ; Sun, 23 Oct 2022 10:08:22 -0700 (PDT) Received: from ipservice-092-217-070-181.092.217.pools.vodafone-ip.de ([92.217.70.181] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1omeSP-0000Rj-N0; Sun, 23 Oct 2022 19:08:17 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 2/5] staging: r8188eu: don't set pcmd_obj components to 0 Date: Sun, 23 Oct 2022 19:08:05 +0200 Message-Id: <20221023170808.46233-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221023170808.46233-1-martin@kaiser.cx> References: <20221023170808.46233-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747499235644590498?= X-GMAIL-MSGID: =?utf-8?q?1747499235644590498?= pcmd_obj was allocated with kzalloc, its memory is filled with 0s. There's no need to set rsp and rspsz to NULL or 0 again. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index d146b94307b8..8050f682c997 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -6753,9 +6753,6 @@ void report_join_res(struct adapter *padapter, int res) pcmd_obj->cmdsz = cmdsz; pcmd_obj->parmbuf = pevtcmd; - pcmd_obj->rsp = NULL; - pcmd_obj->rspsz = 0; - pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd); pc2h_evt_hdr->len = sizeof(struct joinbss_event); pc2h_evt_hdr->ID = GEN_EVT_CODE(_JoinBss); From patchwork Sun Oct 23 17:08:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 8068 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp71760wru; Sun, 23 Oct 2022 10:14:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5WuY8skpEyoo3BzP9ex0jugAZXealipK4E2hDcbI9Ljx1v/2u0Y1zgf4z104Pce3Cc6u7G X-Received: by 2002:a50:baec:0:b0:461:4c59:12bf with SMTP id x99-20020a50baec000000b004614c5912bfmr12615388ede.54.1666545251559; Sun, 23 Oct 2022 10:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666545251; cv=none; d=google.com; s=arc-20160816; b=AzWcx0gyUrsdcXCUV7xt5YI6JJVtVeQ+Oop1qLv3q0vkr6yUhSc+aB1htFvPJkhJV4 12pz2G7YF19hYZIuCIkvf20yIVpGLpXdWPFERGu1dAH4Pxu3KGrOu8JqVGKypGfiCXSQ sgggFhDPGrO77BU1qqMPLGwxupGgvUJFviYrHZZGMMtbQiqAjoWuY+BH0NWWZXALebEL d/xqy9XBZwf557zXd+zmL/AlUPzD2s7mIDn9s8PwcoTcgx+Q3CIzb/KOVIgXSrgw44mG mQe/gErNx3JGuK+ledtbndjG90GASPIWLD3ufoUHZSpNjUmVY60SH31d7T74x6qv34iL ob5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=sHpE/8A/VffTPJ05Tpc6yFSpZMU3ibyHoMr4iZIEbTk=; b=t2bxOOvyXFtdRkWQ4R7RKP1JF41HL1sT1rulN2npUJGZqoEg2VbusS1lDw4o9mHr2X XZNrnAF//1s1S8x+pEJok42NVkWSM0xU8ntg2/vZ3u11+dgK4lE8CDcjrz5CnGoc89sB Y5Swt6qNJOSxGLvI9ObI46peFuzYOyv9NjNZeLITtFq7mKBrT04U7O8M/51lfkCbm/db pTUzN9FEIrnZjzw7iwnQCQjS+5g+W1bPLWabgv1iyuk0cSO+iWYASRu8ZF9GR976iHg9 WJGxX1W4KuIkyE2nvGHzxATEWM5ohqtijFR5z/6H3lBz343mk00GglZXUXDWR+aE9OKK hvFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc23-20020a1709071c1700b00779f8e7ec5bsi26602055ejc.42.2022.10.23.10.13.47; Sun, 23 Oct 2022 10:14:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230510AbiJWRId (ORCPT + 99 others); Sun, 23 Oct 2022 13:08:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230370AbiJWRI0 (ORCPT ); Sun, 23 Oct 2022 13:08:26 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E477973305 for ; Sun, 23 Oct 2022 10:08:24 -0700 (PDT) Received: from ipservice-092-217-070-181.092.217.pools.vodafone-ip.de ([92.217.70.181] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1omeSQ-0000Rj-G1; Sun, 23 Oct 2022 19:08:18 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 3/5] staging: r8188eu: NetworkTypeInUse is not in use Date: Sun, 23 Oct 2022 19:08:06 +0200 Message-Id: <20221023170808.46233-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221023170808.46233-1-martin@kaiser.cx> References: <20221023170808.46233-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747499353853121220?= X-GMAIL-MSGID: =?utf-8?q?1747499353853121220?= NetworkTypeInUse from struct wlan_bssid_ex is not used. Remove NetworkTypeInUse itself, the code to set it and the enum for its possible values. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme.c | 16 ---------------- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 --- drivers/staging/r8188eu/include/wlan_bssdef.h | 9 --------- 3 files changed, 28 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index 1f69e5c57d5d..a47ae33454b3 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -1819,22 +1819,6 @@ void rtw_update_registrypriv_dev_network(struct adapter *adapter) pdev_network->Rssi = 0; - switch (pregistrypriv->wireless_mode) { - case WIRELESS_11B: - pdev_network->NetworkTypeInUse = (Ndis802_11DS); - break; - case WIRELESS_11G: - case WIRELESS_11BG: - case WIRELESS_11_24N: - case WIRELESS_11G_24N: - case WIRELESS_11BG_24N: - pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24); - break; - default: - /* TODO */ - break; - } - pdev_network->Configuration.DSConfig = (pregistrypriv->channel); if (cur_network->network.InfrastructureMode == Ndis802_11IBSS) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 8050f682c997..61d2680cbafc 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -6188,9 +6188,6 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame, st memcpy(bssid->SupportedRates + i, (p + 2), len); } - /* todo: */ - bssid->NetworkTypeInUse = Ndis802_11OFDM24; - if (bssid->IELength < 12) return _FAIL; diff --git a/drivers/staging/r8188eu/include/wlan_bssdef.h b/drivers/staging/r8188eu/include/wlan_bssdef.h index 81bda91a4136..831c465df500 100644 --- a/drivers/staging/r8188eu/include/wlan_bssdef.h +++ b/drivers/staging/r8188eu/include/wlan_bssdef.h @@ -17,14 +17,6 @@ struct ndis_802_11_ssid { u8 Ssid[32]; }; -enum NDIS_802_11_NETWORK_TYPE { - Ndis802_11FH, - Ndis802_11DS, - Ndis802_11OFDM5, - Ndis802_11OFDM24, - Ndis802_11NetworkTypeMax /* dummy upper bound */ -}; - struct ndis_802_11_config_fh { u32 Length; /* Length of structure */ u32 HopPattern; /* As defined by 802.11, MSB set */ @@ -233,7 +225,6 @@ struct wlan_bssid_ex { struct ndis_802_11_ssid Ssid; u32 Privacy; NDIS_802_11_RSSI Rssi;/* in dBM,raw data ,get from PHY) */ - enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; struct ndis_802_11_config Configuration; enum ndis_802_11_network_infra InfrastructureMode; unsigned char SupportedRates[NDIS_802_11_LENGTH_RATES_EX]; From patchwork Sun Oct 23 17:08:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 8067 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp71550wru; Sun, 23 Oct 2022 10:13:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM49CnQQJ2mm/hICWBZT9FkIh1hqxZ0NiGP9QLZxVIks6NFXJ+NfNykvtlSPTEZoui+OcwDF X-Received: by 2002:a17:903:2348:b0:186:970e:739e with SMTP id c8-20020a170903234800b00186970e739emr5891427plh.115.1666545208318; Sun, 23 Oct 2022 10:13:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666545208; cv=none; d=google.com; s=arc-20160816; b=bdO9f2+Isr2eS99A3ClAuWrCfifo5rdE6GZhYLRJtFWh+J9TS3ShIMqreAM83zk3n6 qxtSnOtxnoKkghYHkjCXvJJvrvNjWNFwPPBAl5//c1Io99QMnNoEYZpcJsLnDlrgYO4G e83JOMUZymp30QeL3kZJ4T+wBRJxtTO+9+OUDHwsps3RQz6cPf8wSdVi0wfHv0nnQBCH jJJtZWmpTl7ScDt+NWEIqxwvef1RQ8Fq/9RaowZI+ThS6ju5af9mDY1Q1Njxxiqw07WZ eRwXfIDsUsb2cMLU3thg64/k54rvTMcCP4r5QRp6rXTF4b+Jw0dO3lTzMdzc33lms2BL c74w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=YYmDQzxKldflmJUNnmc/tkpay4dJSpMLgrJUhystUjU=; b=a7rceQTKYI4g9aklmIggDQSrAir/IGZ+bqDRN31NHMvw9cF1jDSexWbDhg6QJY9ci2 syKbSJknyvuELiPusCPxddL3OE6PSpTbF60QQpALXdI4vbeEM4FE/ca8/8+WsC5QmMJK g/RkGYEgIPs/GXc5mRzYPSe59ijryuXZihBZUlveR52v+ySQrwPMFNrfK/EunlVso6DC gF4oWQJFm59WgkzYOaZqwwk5wgerYCu6ct7mVZXbme52MFshwgXBxzEPfciv3dRuL+GE 0CJ89mwOLtZzUVYzSlAZ4N/X1nuO3+qPy8TYU+yjdkqdA3WT58mNwY7tuJTLrJJUxlTw MVcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oc1-20020a17090b1c0100b0020ad6d218cdsi8179949pjb.3.2022.10.23.10.13.15; Sun, 23 Oct 2022 10:13:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbiJWRIa (ORCPT + 99 others); Sun, 23 Oct 2022 13:08:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230307AbiJWRIY (ORCPT ); Sun, 23 Oct 2022 13:08:24 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FA3B73305 for ; Sun, 23 Oct 2022 10:08:23 -0700 (PDT) Received: from ipservice-092-217-070-181.092.217.pools.vodafone-ip.de ([92.217.70.181] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1omeSR-0000Rj-98; Sun, 23 Oct 2022 19:08:19 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 4/5] staging: r8188eu: remove wait_ack param from _issue_probereq_p2p Date: Sun, 23 Oct 2022 19:08:07 +0200 Message-Id: <20221023170808.46233-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221023170808.46233-1-martin@kaiser.cx> References: <20221023170808.46233-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747499308185042564?= X-GMAIL-MSGID: =?utf-8?q?1747499308185042564?= The only caller of _issue_probereq_p2p sets wait_ack = false. Remove the wait_ack parameter and the code that would run only if wait_ack == true. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 61d2680cbafc..d44e455f09ca 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3291,7 +3291,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da) dump_mgntframe(padapter, pmgntframe); } -static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack) +static int _issue_probereq_p2p(struct adapter *padapter, u8 *da) { int ret = _FAIL; struct xmit_frame *pmgntframe; @@ -3564,12 +3564,8 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack) pattrib->last_txcmdsz = pattrib->pktlen; - if (wait_ack) { - ret = dump_mgntframe_and_wait_ack(padapter, pmgntframe); - } else { - dump_mgntframe(padapter, pmgntframe); - ret = _SUCCESS; - } + dump_mgntframe(padapter, pmgntframe); + ret = _SUCCESS; exit: return ret; @@ -3577,7 +3573,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack) inline void issue_probereq_p2p(struct adapter *adapter, u8 *da) { - _issue_probereq_p2p(adapter, da, false); + _issue_probereq_p2p(adapter, da); } static s32 rtw_action_public_decache(struct recv_frame *recv_frame, s32 token) From patchwork Sun Oct 23 17:08:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 8069 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp72624wru; Sun, 23 Oct 2022 10:16:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM76TYyOYp2YwFkH8asNYqwEe6HD+yWRREM+XJ26phz4mKZv31TmT9TiDZPq7A2FvikcAJv1 X-Received: by 2002:a50:d70a:0:b0:460:5db5:368b with SMTP id t10-20020a50d70a000000b004605db5368bmr17415640edi.397.1666545406885; Sun, 23 Oct 2022 10:16:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666545406; cv=none; d=google.com; s=arc-20160816; b=YLD28IzHGCzhaokgT6PHdNFp9ebYRxx6BNA42iWJaJ9Kq6t6En3HscsvdDIfxS9bQF V9VuJe4zi9wAmC96XyyT2ohjP8d/7uj05hbyVGKTa31DLu0VV2Iq2K91nEsEvL26equU lDnhySxd4WO7RGRg//nMI6tpCJy5ExsvxlmvQbld4TvodWVuZyOJ8zBZ0EMVi4imNhwP fqrkR8XMh7c/+ncA1lbxjWYx+eGYkvAIyi8zAv5ykDlcR0rW2dX6uhjYUSEs9efWdEDL 6dMjF7Mqn7y3l4waEAPFs2CLXdcyEuU59oQVstAq7gIYzZrkhFxFhYqYK8qWX/KIekCb TQ4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/U2dHWwJqu26ze8z9CGbB7v508Yu9MObE4lhGo1gBGY=; b=eYAmzWEZm7Zwf815bIvE9p1DNBWb3EYJ2PS9r9KifxWWmA+Fl3SXclHcLvN2Y24AWf DTiIlIRGDQxXv0fQjUqFQpPrl6ibFagiWhswH98kcoOiI0HjtbzkW9liD6UATtqjuBQY Y1Idib6adE0CF0yToD9HJSKeVL/Y03ky+dlXuiZK6fCzCPueQKOilWYeN7x7zJ58MmqR zve+VMDTB1GMUYqgM23yRaXSZvEindGu2YQ75xbNsA16GZLtV9puzOryNabVrPxSVMFT mIxsuNfbXn7X7FNlRabmZRzhXCkzL6yDeZUkSe7bhiyrONu+Ak5xOKTfvrdS/4fkRcJv G2zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc41-20020a1709078a2900b0078ddde15fdcsi28913851ejc.279.2022.10.23.10.16.21; Sun, 23 Oct 2022 10:16:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231129AbiJWRIh (ORCPT + 99 others); Sun, 23 Oct 2022 13:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230489AbiJWRI2 (ORCPT ); Sun, 23 Oct 2022 13:08:28 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15AD8733D2 for ; Sun, 23 Oct 2022 10:08:25 -0700 (PDT) Received: from ipservice-092-217-070-181.092.217.pools.vodafone-ip.de ([92.217.70.181] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1omeSS-0000Rj-4e; Sun, 23 Oct 2022 19:08:20 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 5/5] staging: r8188eu: bCardDisableWOHSM is write-only Date: Sun, 23 Oct 2022 19:08:08 +0200 Message-Id: <20221023170808.46233-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221023170808.46233-1-martin@kaiser.cx> References: <20221023170808.46233-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747499516641527995?= X-GMAIL-MSGID: =?utf-8?q?1747499516641527995?= bCardDisableWOHSM in struct adapter is only written but never read. It can be removed. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/drv_types.h | 1 - drivers/staging/r8188eu/os_dep/os_intfs.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h index 1bd0c8f3a358..8fef5759c36a 100644 --- a/drivers/staging/r8188eu/include/drv_types.h +++ b/drivers/staging/r8188eu/include/drv_types.h @@ -167,7 +167,6 @@ struct adapter { s32 bDriverStopped; s32 bSurpriseRemoved; - s32 bCardDisableWOHSM; u8 hw_init_completed; s8 signal_strength; diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c index 38e324754c8f..970f380bac96 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -620,7 +620,6 @@ static int _netdev_open(struct net_device *pnetdev) if (!padapter->bup) { padapter->bDriverStopped = false; padapter->bSurpriseRemoved = false; - padapter->bCardDisableWOHSM = false; status = rtw_hal_init(padapter); if (status == _FAIL) @@ -686,7 +685,6 @@ static int ips_netdrv_open(struct adapter *padapter) padapter->bDriverStopped = false; padapter->bSurpriseRemoved = false; - padapter->bCardDisableWOHSM = false; status = rtw_hal_init(padapter); if (status == _FAIL) @@ -718,13 +716,11 @@ int rtw_ips_pwr_up(struct adapter *padapter) void rtw_ips_pwr_down(struct adapter *padapter) { - padapter->bCardDisableWOHSM = true; padapter->net_closed = true; rtw_led_control(padapter, LED_CTL_POWER_OFF); rtw_ips_dev_unload(padapter); - padapter->bCardDisableWOHSM = false; } static void rtw_fifo_cleanup(struct adapter *adapter)