From patchwork Sun Nov 6 12:48:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 16123 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1476496wru; Sun, 6 Nov 2022 04:49:56 -0800 (PST) X-Google-Smtp-Source: AMsMyM7SeaKcTaKHR8GsV6hBy3SOfgIrq4aUNJTBP+6ARXiARHT7LLpCzM2yRNYukvqzBdJC0ECA X-Received: by 2002:a17:902:7598:b0:178:3f96:4ffc with SMTP id j24-20020a170902759800b001783f964ffcmr46877668pll.53.1667738996547; Sun, 06 Nov 2022 04:49:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667738996; cv=none; d=google.com; s=arc-20160816; b=PUlJcO6w5Zwxov2H5w/eWo4D7p3tiakWGOrfXIBZs0Ag93HxcjD9wYyDBDmUdUgIq0 6PSBorklOJ9Z0M6IlC2N//Tz0gpFCukDmZqb3XgQIDIgBTLSX9D/o7qPitao5CcRwyfg 5vOlFJZ10Xqybl/CCcuiE0SPLdJm/bm+aPQ51pYunAP37ENGdXadaeXU4fHX+j/RP34O P1Jqunk8aLtpQ1SVBx2QfhPIpwQuw5x26cYg2K3UmQfOjVBi1M8jaWilqvTBqJyIsKzw ICbrvbaXlmsIk5kmWJisF3E68XWrf9fwUSjmrgGqHCWhYnNF1ezR9deoAVAOsxuGZy0x Gyrw== 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=3JqxZSAG6qc03hUN+XGlJv/5pPawUNp7QjfuZ5tlhcg=; b=nxIUE0YRVxjkyoBhR2l+BejpiFObs59n6SvUAmjdkHg0dtNG+76FF6Wg9khDKRZaWh IWA+cm0a1TcKwWZT+a+/XoM/rz0b7gdcGrX1H2DlhcZGin0UN/lV/a3M8u3uChdAkO/9 3ylrJR9XTMag3GqY9HlB1oYHXdAkA2j+AeLmNzi4KN7vzs8vS1eM4oLnrbVJ7tydoJfg hZu8DmoI829F8fYoM4nApZTMoAoFZ2J7i7AlaxH15FJhrhq2c7poofi7lrtCOiw8Th5E ycTIdo1qCyOGKcATkdMl17E3357C7lYV69b88fmGdyHDozsh0ejP1x0VvKZQreCGYP31 fVMA== 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 193-20020a6301ca000000b0046f357face9si6769978pgb.356.2022.11.06.04.49.43; Sun, 06 Nov 2022 04:49:56 -0800 (PST) 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 S229956AbiKFMtQ (ORCPT + 99 others); Sun, 6 Nov 2022 07:49:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbiKFMtM (ORCPT ); Sun, 6 Nov 2022 07:49:12 -0500 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 DC90963B8 for ; Sun, 6 Nov 2022 04:49:11 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] 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 1orf5I-0008Dj-QE; Sun, 06 Nov 2022 13:49:08 +0100 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/9] staging: r8188eu: don't store addba request Date: Sun, 6 Nov 2022 13:48:53 +0100 Message-Id: <20221106124901.720785-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-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?1748751085729627606?= X-GMAIL-MSGID: =?utf-8?q?1748751085729627606?= There's no need to store an incoming addba request in struct mlme_ext_info. We only need the addba request to copy some of its fields into our addba response. It's simpler to pass the incoming request's management frame to issue_action_BA as an additional parameter. issue_action_BA can then extract the required fields. If issue_action_BA prepares a request rather than a response, the caller sets the parameter for the incoming request to NULL. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 25 ++++++++----------- .../staging/r8188eu/include/rtw_mlme_ext.h | 4 +-- drivers/staging/r8188eu/include/wifi.h | 8 ------ 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 6679d4037d6b..324757699716 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1486,11 +1486,9 @@ static void OnAction_back(struct adapter *padapter, struct recv_frame *precv_fra struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data; struct sta_info *psta = NULL; struct recv_reorder_ctrl *preorder_ctrl; - unsigned char *frame_body; unsigned short tid; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; - u8 *pframe = precv_frame->rx_data; struct sta_priv *pstapriv = &padapter->stapriv; if ((pmlmeinfo->state & 0x03) != WIFI_FW_AP_STATE) @@ -1501,23 +1499,19 @@ static void OnAction_back(struct adapter *padapter, struct recv_frame *precv_fra if (!psta) return; - frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr)); - if (!pmlmeinfo->HT_enable) return; /* All union members start with an action code, it's ok to use addba_req. */ switch (mgmt->u.action.u.addba_req.action_code) { case WLAN_ACTION_ADDBA_REQ: - memcpy(&pmlmeinfo->ADDBA_req, &frame_body[2], sizeof(struct ADDBA_request)); tid = u16_get_bits(le16_to_cpu(mgmt->u.action.u.addba_req.capab), IEEE80211_ADDBA_PARAM_TID_MASK); preorder_ctrl = &psta->recvreorder_ctrl[tid]; preorder_ctrl->indicate_seq = 0xffff; preorder_ctrl->enable = pmlmeinfo->bAcceptAddbaReq; - issue_action_BA(padapter, mgmt->sa, WLAN_ACTION_ADDBA_RESP, pmlmeinfo->bAcceptAddbaReq ? - WLAN_STATUS_SUCCESS : WLAN_STATUS_REQUEST_DECLINED); + WLAN_STATUS_SUCCESS : WLAN_STATUS_REQUEST_DECLINED, mgmt); break; case WLAN_ACTION_ADDBA_RESP: tid = u16_get_bits(le16_to_cpu(mgmt->u.action.u.addba_resp.capab), @@ -5377,7 +5371,8 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int return ret; } -void issue_action_BA(struct adapter *padapter, unsigned char *raddr, u8 action, u16 status) +void issue_action_BA(struct adapter *padapter, unsigned char *raddr, u8 action, + u16 status, struct ieee80211_mgmt *mgmt_req) { u16 start_seq; u16 BA_starting_seqctrl = 0; @@ -5446,13 +5441,13 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, u8 action, break; case WLAN_ACTION_ADDBA_RESP: mgmt->u.action.u.addba_resp.action_code = WLAN_ACTION_ADDBA_RESP; - mgmt->u.action.u.addba_resp.dialog_token = pmlmeinfo->ADDBA_req.dialog_token; + mgmt->u.action.u.addba_resp.dialog_token = mgmt_req->u.action.u.addba_req.dialog_token; mgmt->u.action.u.addba_resp.status = cpu_to_le16(status); - capab = le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f; + capab = le16_to_cpu(mgmt_req->u.action.u.addba_req.capab) & 0x3f; capab |= u16_encode_bits(64, IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK); capab |= u16_encode_bits(pregpriv->ampdu_amsdu, IEEE80211_ADDBA_PARAM_AMSDU_MASK); mgmt->u.action.u.addba_req.capab = cpu_to_le16(capab); - mgmt->u.action.u.addba_resp.timeout = pmlmeinfo->ADDBA_req.BA_timeout_value; + mgmt->u.action.u.addba_resp.timeout = mgmt_req->u.action.u.addba_req.timeout; pattrib->pktlen = offsetofend(struct ieee80211_mgmt, u.action.u.addba_resp.timeout); break; case WLAN_ACTION_DELBA: @@ -5620,7 +5615,8 @@ unsigned int send_delba(struct adapter *padapter, u8 initiator, u8 *addr) if (initiator == 0) { /* recipient */ for (tid = 0; tid < MAXTID; tid++) { if (psta->recvreorder_ctrl[tid].enable) { - issue_action_BA(padapter, addr, WLAN_ACTION_DELBA, (((tid << 1) | initiator) & 0x1F)); + issue_action_BA(padapter, addr, WLAN_ACTION_DELBA, + (((tid << 1) | initiator) & 0x1F), NULL); psta->recvreorder_ctrl[tid].enable = false; psta->recvreorder_ctrl[tid].indicate_seq = 0xffff; } @@ -5628,7 +5624,8 @@ unsigned int send_delba(struct adapter *padapter, u8 initiator, u8 *addr) } else if (initiator == 1) { /* originator */ for (tid = 0; tid < MAXTID; tid++) { if (psta->htpriv.agg_enable_bitmap & BIT(tid)) { - issue_action_BA(padapter, addr, WLAN_ACTION_DELBA, (((tid << 1) | initiator) & 0x1F)); + issue_action_BA(padapter, addr, WLAN_ACTION_DELBA, + (((tid << 1) | initiator) & 0x1F), NULL); psta->htpriv.agg_enable_bitmap &= ~BIT(tid); psta->htpriv.candidate_tid_bitmap &= ~BIT(tid); } @@ -7683,7 +7680,7 @@ u8 add_ba_hdl(struct adapter *padapter, unsigned char *pbuf) if (((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && (pmlmeinfo->HT_enable)) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)) { - issue_action_BA(padapter, pparm->addr, WLAN_ACTION_ADDBA_REQ, (u16)pparm->tid); + issue_action_BA(padapter, pparm->addr, WLAN_ACTION_ADDBA_REQ, (u16)pparm->tid, NULL); _set_timer(&psta->addba_retry_timer, ADDBA_TO); } else { psta->htpriv.candidate_tid_bitmap &= ~BIT(pparm->tid); diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h index e234a3b9af6f..a519a3dcdf61 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h @@ -285,7 +285,6 @@ struct mlme_ext_info { u8 bwmode_updated; u8 hidden_ssid_mode; - struct ADDBA_request ADDBA_req; struct WMM_para_element WMM_param; struct HT_caps_element HT_caps; struct HT_info_element HT_info; @@ -523,7 +522,8 @@ int issue_deauth(struct adapter *padapter, unsigned char *da, unsigned short reason); int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int try_cnt, int wait_ms); -void issue_action_BA(struct adapter *padapter, unsigned char *raddr, u8 action, u16 status); +void issue_action_BA(struct adapter *padapter, unsigned char *raddr, u8 action, + u16 status, struct ieee80211_mgmt *mgmt_req); unsigned int send_delba(struct adapter *padapter, u8 initiator, u8 *addr); unsigned int send_beacon(struct adapter *padapter); bool get_beacon_valid_bit(struct adapter *adapter); diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h index 92a584a8b6c0..2381c519ceaf 100644 --- a/drivers/staging/r8188eu/include/wifi.h +++ b/drivers/staging/r8188eu/include/wifi.h @@ -430,14 +430,6 @@ struct WMM_para_element { struct AC_param ac_param[4]; } __packed; -struct ADDBA_request { - unsigned char action_code; - unsigned char dialog_token; - __le16 BA_para_set; - __le16 BA_timeout_value; - __le16 BA_starting_seqctrl; -} __packed; - #define MAX_AMPDU_FACTOR_64K 3 /* Spatial Multiplexing Power Save Modes */ From patchwork Sun Nov 6 12:48:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 16124 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1476879wru; Sun, 6 Nov 2022 04:51:01 -0800 (PST) X-Google-Smtp-Source: AMsMyM5+KC/QfHEdH+R4bgcHg05T/pjHUlVz2tCOcyeIfT7+wBuFB7GvcT36tqu3wDD549PqUTBq X-Received: by 2002:a17:902:bcc1:b0:187:31da:494a with SMTP id o1-20020a170902bcc100b0018731da494amr30939629pls.121.1667739061452; Sun, 06 Nov 2022 04:51:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667739061; cv=none; d=google.com; s=arc-20160816; b=roVH/47Ou2XJMIt6T5PbcIvPQoGXXTgnrAwdkEwCUrYk8v/1PSM8Vz3eobFyjALYhS yVPBsdy9G2JeBQnWS027qciDjekPYY0o51hIjapUVVdPF8hj72Lnsvkba/tqHP+EfhtS 0O5erfsFlYfTLgLjVB6cmESP7n7JktIpDQdqbGvcQhMhu/KSqhdjGkMp/mnM/yWQ8G6k awQ36C9DGDp6cxl0PSHOp53K7bsCvJD6CeFuHPVY3QAMhfMd46dCF+HwtN08SoGDkJ4j d+uzZAE2iF5dq86Lp1QWNm0iUk2N7d1m8AZ4o8M7NbczJ5Yl7AOsOyj+1uu3hLrbdUiD 34HA== 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=IKsLBpOhsrUSRJDGPS+Ka6+ACv5DORVpJ1HgcLw7KO8=; b=oCcEg9VpG47yjI3b249PpaRMN8+TK9gstW+zld9wDbxh9wQBP/e0xGPB5x6/PF7C4b ojiQuexufXB1+PPrrxBuoVKl3VhWejFt4/w+6+/fte+wY9f8dSmOmH1DZAcoiWKB2skZ +cTTqknDfKik74OEDQrTjDyWPXmikLQD4BQrXgy2ALZMGL1jgRJtf3Jl00s5RAOfZJf3 T2pINrBIihmvjoK6qr310xMPsdjlJxTD9FJ5DbyUjnb3pYwcEoLkbnkNWTt7wKvBiaTA ronz2/n21cwuWLQtZmTYKjfzXqLTqgRzLfKS9K4s1A88rmCmSh/71DIiZN9eoZyc3tYI X8Ww== 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 b6-20020a17090a990600b00202d026ca0fsi5705039pjp.14.2022.11.06.04.50.48; Sun, 06 Nov 2022 04:51:01 -0800 (PST) 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 S229971AbiKFMtS (ORCPT + 99 others); Sun, 6 Nov 2022 07:49:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229916AbiKFMtN (ORCPT ); Sun, 6 Nov 2022 07:49:13 -0500 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 A607163B9 for ; Sun, 6 Nov 2022 04:49:12 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] 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 1orf5J-0008Dj-Oj; Sun, 06 Nov 2022 13:49:09 +0100 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/9] staging: r8188eu: remove some obsolete comments Date: Sun, 6 Nov 2022 13:48:54 +0100 Message-Id: <20221106124901.720785-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-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?1748751154087863463?= X-GMAIL-MSGID: =?utf-8?q?1748751154087863463?= Remove obsolete comments in validate_recv_data_frame. There is no prxcmd variable (any more?). Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_recv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c index 94f85cd7038d..cb0f35d7ab98 100644 --- a/drivers/staging/r8188eu/core/rtw_recv.c +++ b/drivers/staging/r8188eu/core/rtw_recv.c @@ -1065,8 +1065,6 @@ static int validate_recv_data_frame(struct adapter *adapter, if (!psta) return _FAIL; - /* psta->rssi = prxcmd->rssi; */ - /* psta->signal_quality = prxcmd->sq; */ precv_frame->psta = psta; pattrib->amsdu = 0; From patchwork Sun Nov 6 12:48:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 16125 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1476888wru; Sun, 6 Nov 2022 04:51:03 -0800 (PST) X-Google-Smtp-Source: AMsMyM6kGQ9kfRxFyr8uWKbiKWQm5AEzUGEwbw4w3FyTzVeySrY/Gsj8liv0A4+XbIZodpad1zYI X-Received: by 2002:a17:90b:2393:b0:213:ecb2:2e04 with SMTP id mr19-20020a17090b239300b00213ecb22e04mr34506082pjb.100.1667739062902; Sun, 06 Nov 2022 04:51:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667739062; cv=none; d=google.com; s=arc-20160816; b=cTBrYYIhInKDy4PuhSlSsWZc3sCZ5eh9UVodN3rteBIAmUlq6pWpAhnXso5Jovf3ad qHgG+BXMzbGtJlmgDoJQpwUfDtXk7y0Y/B25DLNGkheX91dMeHqM3rQdH+oSDMyai08g P4OX8lDGNbTl00xP2V3Xco2jqR3YoZ+8HanrX6Nh16fOP15J1a971ioe6Xm6FQ5xsSNz BcdE1PSVzdxuGSvHhjNjtglOrP5UIz36iaivGOQ89GomcRBkkP4PAI9S5Rcfpx+wxv7A 9YGQochHxNBMCVhPOM3cvyFfSKluNvnsFPRnX6X42UYYOzt9enLd5fwjt/megqo9wYy/ d89A== 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=+921zLhrnFjYtEqI1rjpvCPG0slEe9dQtJzgWp4BacA=; b=Lzu/IcYOQf1rT2EYbq9+3Jy1GAbxtOf64jfF81OewfahCvt4Jc4m2te94xMOhOd4oc 11EQocSGfn/9ZloXQTnlR0UD3IoNHfXRNH4cPQFgkgtHUfTDz6B2HWihJr/xK2kJBlYc F01Qy2u6K/liYlLmCXbqKUGEnBr9tbnGUyjPM6araZAHZHMbsNsM4EidzJuEBh7Dxvt3 wkCn1WtVuFzeIkiquN5vCKzvG+jq6O80Vs4//eCDUIOyLwwskLcnLQceMDVXxGL3cf8z 0CWRUw5iEJt9ZmNMtxsUhAsNn1yBt3QdZUSa7VEOOtHkLCfsMfAIlBaYu17eWS+x6u25 HQrA== 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 l22-20020a056a0016d600b0056e48944824si6898609pfc.191.2022.11.06.04.50.50; Sun, 06 Nov 2022 04:51:02 -0800 (PST) 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 S229845AbiKFMtV (ORCPT + 99 others); Sun, 6 Nov 2022 07:49:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbiKFMtQ (ORCPT ); Sun, 6 Nov 2022 07:49:16 -0500 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 AA1AD647E for ; Sun, 6 Nov 2022 04:49:15 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] 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 1orf5K-0008Dj-HH; Sun, 06 Nov 2022 13:49:10 +0100 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/9] staging: r8188eu: reorder assignments, clarify the header format Date: Sun, 6 Nov 2022 13:48:55 +0100 Message-Id: <20221106124901.720785-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-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?1748751155687886582?= X-GMAIL-MSGID: =?utf-8?q?1748751155687886582?= Reorder some of the assignments in update_recvframe_attrib_88e. This should make it a bit easier to understand the format of the header that is added by the chip's firmware. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c index 9a61eef8550b..d1ac2960f1c4 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c @@ -66,28 +66,25 @@ void update_recvframe_attrib_88e(struct recv_frame *precvframe, struct recv_stat if (pattrib->pkt_rpt_type == NORMAL_RX) { pattrib->pkt_len = le32_to_cpu(prxstat->rxdw0) & 0x00003fff; + pattrib->icv_err = (le32_to_cpu(prxstat->rxdw0) >> 15) & 0x1; pattrib->drvinfo_sz = ((le32_to_cpu(prxstat->rxdw0) >> 16) & 0xf) * 8; - + pattrib->encrypt = (u8)((le32_to_cpu(prxstat->rxdw0) >> 20) & 0x7); + pattrib->qos = (le32_to_cpu(prxstat->rxdw0) >> 23) & 0x1; + pattrib->shift_sz = (le32_to_cpu(prxstat->rxdw0) >> 24) & 0x3; pattrib->physt = (le32_to_cpu(prxstat->rxdw0) >> 26) & 0x1; - pattrib->bdecrypted = (le32_to_cpu(prxstat->rxdw0) & BIT(27)) ? 0 : 1; - pattrib->encrypt = (le32_to_cpu(prxstat->rxdw0) >> 20) & 0x7; - pattrib->qos = (le32_to_cpu(prxstat->rxdw0) >> 23) & 0x1; pattrib->priority = (le32_to_cpu(prxstat->rxdw1) >> 8) & 0xf; - pattrib->amsdu = (le32_to_cpu(prxstat->rxdw1) >> 13) & 0x1; + pattrib->mdata = (le32_to_cpu(prxstat->rxdw1) >> 26) & 0x1; + pattrib->mfrag = (le32_to_cpu(prxstat->rxdw1) >> 27) & 0x1; pattrib->seq_num = le32_to_cpu(prxstat->rxdw2) & 0x00000fff; pattrib->frag_num = (le32_to_cpu(prxstat->rxdw2) >> 12) & 0xf; - pattrib->mfrag = (le32_to_cpu(prxstat->rxdw1) >> 27) & 0x1; - pattrib->mdata = (le32_to_cpu(prxstat->rxdw1) >> 26) & 0x1; pattrib->mcs_rate = le32_to_cpu(prxstat->rxdw3) & 0x3f; pattrib->rxht = (le32_to_cpu(prxstat->rxdw3) >> 6) & 0x1; - pattrib->icv_err = (le32_to_cpu(prxstat->rxdw0) >> 15) & 0x1; - pattrib->shift_sz = (le32_to_cpu(prxstat->rxdw0) >> 24) & 0x3; } else if (pattrib->pkt_rpt_type == TX_REPORT1) { /* CCX */ pattrib->pkt_len = TX_RPT1_PKT_LEN; } else if (pattrib->pkt_rpt_type == TX_REPORT2) { From patchwork Sun Nov 6 12:48:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 16128 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1477154wru; Sun, 6 Nov 2022 04:51:46 -0800 (PST) X-Google-Smtp-Source: AMsMyM4Unrj1FgEaArNFPEyNpfc4Hsnwp9fjph+Pp5zNY6nsonewNPBuBZ93I3cyE0CvNB5bdPks X-Received: by 2002:a17:906:1f48:b0:7ae:77d:bac with SMTP id d8-20020a1709061f4800b007ae077d0bacmr22362609ejk.708.1667739106778; Sun, 06 Nov 2022 04:51:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667739106; cv=none; d=google.com; s=arc-20160816; b=vytT8Q3OefdV+Gnw0UftgPdygut70wVEK3wY8J4fUDhJ5d6eebEFKwhJLoYsc2V4vL mNVpit9m3/NigQvn6rFBiYSxNegtllUX2eBJpHYyhvbxqfqn7TrpPp8bYaFm7KMrR7k1 Q3hsBrtnfPxUUpljrzO2QuFgXlWQxvAOIbV4HDjujLKDXvJx+9EYbUNxSgxgqYzBhUHD TqiGBnxqK8tdB6Agc1Ja2tpAMwA6WODA/+bHf/4lar1FfvCYwF2xYELpgqhwQw1pzAOZ pL3s6e+6nRmuDGOISYfIQiX4xL67b57dIN0fuSRuWqfuXfY3h8tqj+aOMSrVyQDc/3YK DPfQ== 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=khBWJbFKun1ANwf8WynCrKyBwbPvyVgfniMf/+q+o6E=; b=DYXfjahP2A+tLYA6Kvw6PkM8ohUku76TmiuQvVDKZVDihVsAfrxZiJzSV5GngjZ8cO 7tSXSwKGRiO99IyXvIjqPt0HfSqFYESbaB/qU2BwdejUyZvait7xnajlufdxn35dSLKT QoDb81S1CTIu1dzWT1ju7LZVsZkeBPRhTB4rRLFsAgqgHE89+AwxPXn33rmqLzTPRHDd 4q5PQxlNBgqDrGFAeRS1PwG9oxOfa8Rjwv3irNNblLxC+/RpFDe0vrNZSelGqVUZyY82 T/flmtdsEbqmo5qELR8YJZ0LjIkncuSvjeTNMB/XXI/6d+HHQGBE6S6OCYcCRF1/OuYc suwg== 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 b23-20020aa7cd17000000b004588172def1si4899542edw.410.2022.11.06.04.51.23; Sun, 06 Nov 2022 04:51:46 -0800 (PST) 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 S229993AbiKFMtY (ORCPT + 99 others); Sun, 6 Nov 2022 07:49:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229963AbiKFMtR (ORCPT ); Sun, 6 Nov 2022 07:49:17 -0500 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 4A7BB64D8 for ; Sun, 6 Nov 2022 04:49:16 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] 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 1orf5L-0008Dj-A1; Sun, 06 Nov 2022 13:49:11 +0100 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/9] staging: r8188eu: reformat a function header Date: Sun, 6 Nov 2022 13:48:56 +0100 Message-Id: <20221106124901.720785-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-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?1748751201364997331?= X-GMAIL-MSGID: =?utf-8?q?1748751201364997331?= The definition of Hal_EfuseParseIDCode88E can be a single line. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c index cc29963f4b49..73855bca76fe 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c @@ -676,11 +676,7 @@ s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy) return status; } -void -Hal_EfuseParseIDCode88E( - struct adapter *padapter, - u8 *hwinfo - ) +void Hal_EfuseParseIDCode88E(struct adapter *padapter, u8 *hwinfo) { struct eeprom_priv *pEEPROM = &padapter->eeprompriv; struct net_device *netdev = padapter->pnetdev; From patchwork Sun Nov 6 12:48:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 16131 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1477225wru; Sun, 6 Nov 2022 04:51:55 -0800 (PST) X-Google-Smtp-Source: AMsMyM6sKMgHlTV/PmYnqW1HPh2+rRoLMTHowcqCfeu2o/HyWJYoKKI2z6ADJc2Pbx5kWXJmXs1f X-Received: by 2002:a05:6402:14ca:b0:462:e375:a1f4 with SMTP id f10-20020a05640214ca00b00462e375a1f4mr45975449edx.344.1667739115699; Sun, 06 Nov 2022 04:51:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667739115; cv=none; d=google.com; s=arc-20160816; b=yQQyKd5vK+BriAtQCUjpEdtjnUaKJ+hqgC5VSD1uynJ7Npt7OFYQ6uS0qLBRK/g/0a BhSITdaoLI1es5BSGeOazXyUG+z/2EZTJ/6eokl+sFkdLVoRvsCtZ8namXPy4SDWO+qp G+iYwnmUbbIT0JVsGDLAJ62ezSbK+C4oN+V0JWn549eJDockvVpc4weHP9WDBstH98Rp I4plQaIras58gDRABY1ayaRPyF4HtIBBcA+guCOJn9AOHIB+45tRyHcBR+oZ8JDZkfkF PjqeuF4hBLjhHcuktdEweryogbVEvJbtKMZBMSQ9+bex1RyXXqSsSTE8YDWUePfCJ4pE 27DQ== 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=MyJvvkuHk0VG4UCYFw7SBKsC24Wtu6t/lGt2R+4Qh7o=; b=wf+zZAagwztzz6dzMY6V265YchZ+atZo+Rt9mVLMDIKIDoVvbN8t6Gn3gbizEBQlRV 1XaXLvzeV5pPa3FaO/jlmXw+e09PYaRGlMMoy1giK4ZX0d9M/uPrmYzKE1JLEtL4DS8O f7wKKgapYL2DXkZSrgjDUZ+svV3HGW17OKQIYB4XrLUGJ+uPG3z+D5VpnGMwQF7AtYLw Im+uhX1lrq9WIDGICuaKJLa0MEBRNUodQugeanstmDPTcEOPcXckcZzeUBh8/y1Ailxn wDuFOTj/nLSOeQPyhDmOJq1LpWGAjznGqFZ+GmhglGErhIktOnTHUodjmbh+oLfBLOdt n2Hw== 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 w18-20020a50fa92000000b00461d5afea01si5183088edr.165.2022.11.06.04.51.32; Sun, 06 Nov 2022 04:51:55 -0800 (PST) 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 S230012AbiKFMth (ORCPT + 99 others); Sun, 6 Nov 2022 07:49:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229962AbiKFMtS (ORCPT ); Sun, 6 Nov 2022 07:49:18 -0500 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 6152964FF for ; Sun, 6 Nov 2022 04:49:17 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] 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 1orf5M-0008Dj-20; Sun, 06 Nov 2022 13:49:12 +0100 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/9] staging: r8188eu: remove state checks in rtw_led_control Date: Sun, 6 Nov 2022 13:48:57 +0100 Message-Id: <20221106124901.720785-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-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?1748751211031289448?= X-GMAIL-MSGID: =?utf-8?q?1748751211031289448?= There's no need to check for bSurpriseRemoved or bDriverStopped in the rtw_led_control function. This function schedules a delayed worker which calls SwLedOn or SwLedOff (or the function calls SwLedOff directly). SwLedOn and SwLedOff check bDriverStopped themselves or they initiate a USB control transfer via usb_write, where bSurpriseRemoved is checked. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_led.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c index ce8de2eb7845..48725ce9d369 100644 --- a/drivers/staging/r8188eu/core/rtw_led.c +++ b/drivers/staging/r8188eu/core/rtw_led.c @@ -140,8 +140,7 @@ void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction) struct registry_priv *registry_par; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped) || - (!padapter->hw_init_completed)) + if (!padapter->hw_init_completed) return; if (!pLed->bRegUseLed) From patchwork Sun Nov 6 12:48:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 16130 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1477163wru; Sun, 6 Nov 2022 04:51:47 -0800 (PST) X-Google-Smtp-Source: AMsMyM7NIQ5L33zLbxb1acSTYnHKLGHbf3PaUYVy57RGDGtnkqcTgSsadSMtONmgBFA4D3m2TYJm X-Received: by 2002:a17:907:1b1c:b0:72f:9aac:ee41 with SMTP id mp28-20020a1709071b1c00b0072f9aacee41mr15788648ejc.56.1667739107614; Sun, 06 Nov 2022 04:51:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667739107; cv=none; d=google.com; s=arc-20160816; b=lBSUgLMfwrMTChJ1jg00zUGwZxkbodDzjM/UvzTjtarvXsc9pQWl6fBJN2C5ZUsF0w SWby14tiEiC6Ls6aDKwAHRvzJ1sNEKXBasjhbkNpQXErfJ2O4NiYasdOTupCZo6T+dEQ zpVssrheKs62gJBVTUon+B9AnYuHL/DbGkZyl3jiDkOBHTrxFIqyPDqkecbA2BAWezig SXRej7mRrIbIdLhOIiPHKYoWPD+C6nuQw+Jb9/ECx9bHOjCKPOTBBCGXtLLwgFEPHW2L bpz7euspAFbObthAWix0S69v05eUuPbqlGH89b1PLICukDuHaUFScN9UZjxblBpJtCn0 kJCA== 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=5kT7xi9VnVNOQWDRX48pX3OZXVrsoa9uVvmIjZHu9XM=; b=JgvmWdPx2u7+GLpmgD61y4/5sJtvs6EKQBvIDrfy3T+0SWX2ZXCEMGKj5e7P17XUS5 vpyDze/F4q28VG5rJNs9pZ1IEESC22YNM1JcbiKx4UVNxbdGHHPUAHJJNMK8RNOKZvYT YL6jeYFaJdfiHea3pbskNU4ysggNVircV3mWDGxQ9udLkaogQqcItqhb1bbsoXSKW5MB KhlXDb5G+rqzO+gcycL/99BvqIj88LULQWJ+ot3lfm0gUwvztuACt1n+4WCVlf9zt4Hw 4rzPjSianMxxrUmRCELMxtztTwYdbaD4UhZlbKGhc4dCbiysAMnJA1XALsM4yB0xUnDK UzVQ== 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 a26-20020aa7d75a000000b0045bccc84cebsi5441396eds.71.2022.11.06.04.51.24; Sun, 06 Nov 2022 04:51:47 -0800 (PST) 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 S230013AbiKFMt1 (ORCPT + 99 others); Sun, 6 Nov 2022 07:49:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229967AbiKFMtR (ORCPT ); Sun, 6 Nov 2022 07:49:17 -0500 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 A9E0464E0 for ; Sun, 6 Nov 2022 04:49:16 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] 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 1orf5M-0008Dj-PQ; Sun, 06 Nov 2022 13:49:12 +0100 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 6/9] staging: r8188eu: clean up rtw_hal_init Date: Sun, 6 Nov 2022 13:48:58 +0100 Message-Id: <20221106124901.720785-7-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-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?1748751202730609851?= X-GMAIL-MSGID: =?utf-8?q?1748751202730609851?= Clean up the rtw_hal_init function. Remove the status variable. Exit immediately for errors. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/hal_intf.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c index 37935aef71ea..13790e32f11c 100644 --- a/drivers/staging/r8188eu/hal/hal_intf.c +++ b/drivers/staging/r8188eu/hal/hal_intf.c @@ -6,24 +6,19 @@ #include "../include/drv_types.h" #include "../include/hal_intf.h" -uint rtw_hal_init(struct adapter *adapt) +uint rtw_hal_init(struct adapter *adapt) { - uint status = _SUCCESS; - adapt->hw_init_completed = false; - status = rtl8188eu_hal_init(adapt); + if (rtl8188eu_hal_init(adapt) != _SUCCESS) + return _FAIL; - if (status == _SUCCESS) { - adapt->hw_init_completed = true; + adapt->hw_init_completed = true; - if (adapt->registrypriv.notch_filter == 1) - hal_notch_filter_8188e(adapt, 1); - } else { - adapt->hw_init_completed = false; - } + if (adapt->registrypriv.notch_filter == 1) + hal_notch_filter_8188e(adapt, 1); - return status; + return _SUCCESS; } uint rtw_hal_deinit(struct adapter *adapt) From patchwork Sun Nov 6 12:48:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 16129 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1477162wru; Sun, 6 Nov 2022 04:51:47 -0800 (PST) X-Google-Smtp-Source: AMsMyM6MhxKNNAAjoSo7JMtt1/Hp7cVLSva5gNB2PivHQz6yw7JB9IWKap293JFqFSDIdOVdbBsX X-Received: by 2002:a17:907:3e14:b0:7ae:4066:a0f2 with SMTP id hp20-20020a1709073e1400b007ae4066a0f2mr9922159ejc.446.1667739107392; Sun, 06 Nov 2022 04:51:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667739107; cv=none; d=google.com; s=arc-20160816; b=MjYDNDb/IcIkokojvBfOQL8dElVw9KsA9g6l5VG1ZPG1fGMAh61RshL/WB5ub8HKTb viOjt0grSiCYyg9wyXm130QutxcZg8yiUR6wmAzO66AeEBJcQJZoKHUWCpd6SnJEYbod rkUQWsg0JTvPW1e+UXn/PwqxX1KzZ5o5TipiXanXYqVaGpssUhbvqzppf8VJQqgtRpQ4 tX7u2n0FElJjZjw9lPrOMwpFRm5WE7j0R64Z3VqUMmp6NKCzcf8HlZWqkJioi2rWIGOk hS2GyKGNJAfqbj4c+zKqdBZMSAEuK2Sd5D+2B3D6hKJJ773r2Y0wDJR+w18J1v3CI6jb bnyg== 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=0h2jb3GwRGDqgyd43FXXnyMzIWSDwDtJQpQXCZ4tKcM=; b=xyIQ0hNbZ181Og2F7CzzOStzYQEVsblJTXp996+Bnx3HM4NkH9q1Gz6pvNrBrdcptZ vXcZ8Dk88Cw++ObWSSj7HVY/e3H7TKQiFWhDC/rJPZoap6cNyZeODMV8fEO0hQI9uRlq +bkyKTAnCeAM+XGiVaQl0KS6rUE6M7GJW4bMbqQ0XVYnIpf16sUGENRM4AsUyZ/ZOaky kuMEUvE2j8P3rr83W0oIIE5tRHUPuyHmDHTvVI5mM8U93gbHtgBaa5r+C4koHhXzwvI2 KWqpFnnEWZKPFc6j24UxgWyPxBhzDQ8wpkBLjQagj+bHD5ND1FayCrd2k7txVtcz8jOr e4ow== 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 v9-20020a1709064e8900b00732fcbcfedesi4506332eju.623.2022.11.06.04.51.23; Sun, 06 Nov 2022 04:51:47 -0800 (PST) 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 S229915AbiKFMtb (ORCPT + 99 others); Sun, 6 Nov 2022 07:49:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229969AbiKFMtS (ORCPT ); Sun, 6 Nov 2022 07:49:18 -0500 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 567F664EB for ; Sun, 6 Nov 2022 04:49:17 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] 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 1orf5N-0008Dj-Hj; Sun, 06 Nov 2022 13:49:13 +0100 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 7/9] staging: r8188eu: remove get_fwstate Date: Sun, 6 Nov 2022 13:48:59 +0100 Message-Id: <20221106124901.720785-8-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-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?1748751202216130306?= X-GMAIL-MSGID: =?utf-8?q?1748751202216130306?= The get_fwstate function is not used. Remove it. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/rtw_mlme.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h index ca539c652f26..268f898b151b 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme.h +++ b/drivers/staging/r8188eu/include/rtw_mlme.h @@ -443,11 +443,6 @@ static inline bool check_fwstate(struct mlme_priv *pmlmepriv, int state) return false; } -static inline int get_fwstate(struct mlme_priv *pmlmepriv) -{ - return pmlmepriv->fw_state; -} - /* * No Limit on the calling context, * therefore set it to be the critical section... From patchwork Sun Nov 6 12:49:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 16127 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1477120wru; Sun, 6 Nov 2022 04:51:41 -0800 (PST) X-Google-Smtp-Source: AMsMyM4eqZ3I7wTsDf81OK9bu4SIJDLsVT+S/pnHn9b29tMQAmcpFfwVGPGDM8tidK93xaGaAl44 X-Received: by 2002:a17:90a:5517:b0:213:b122:41b3 with SMTP id b23-20020a17090a551700b00213b12241b3mr43691319pji.121.1667739100835; Sun, 06 Nov 2022 04:51:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667739100; cv=none; d=google.com; s=arc-20160816; b=0sJsY2oJrQu7e55KzGxRRku4RyAYXQMCJz3txQXgx3VSx3+z+DEbN+R0Y/XdoBFrnM EOBD9G1RAJnImDAd2dXE0O1mMvi33Qg9MJoTrRvYVi3zmLoHzQdQfyzjIg33q+i082lE iQ/49VFiYAigjnDAhDZJspCq880AsE/v4sYEoVzUoLh4uiChLZA0thGFqRzh1HmbQn48 DorvSRGHMRAyP/ZjRiE1Ehjx5VFxi5xhhRl3QitqmEmLqJOGwCy3CUBjW0Bq8b77EuDv DZOxfijZ/SubPm9+DKbnBfYIk+wdXKy/0ZQ3EyiC8kT4dWbcvTt+dpSFhP3moG9JrdQK asdQ== 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=q6OUP76AAwiprYadAtwUs/r558eQStsdsYOgufct/Rg=; b=S1RBuCsBvPGLwV5RUDQ8EhxdNs2r0I2FHRhvj1yozHeONsmd5f7wuRRUlX9TLI5ykK fklc55LYdHrYPF+sNJI5q0ZcPeppeI4c9mq67qf8fpXZGxis5W+bDgOoKtJURtwhTVML Bj586GXVxKvuIPV1F2TFgS6OSiOruv8VEnbcmKYMKkN/fKEfZrpl2sO8s6gq2Tdro77n siUbHgVloQUA7GHiAL9o6jBqNHinV6Ezmd9yKsuKhn3NFAethi+83pYU/oWVpK0eWYIf 0B+GZEmFCHCMjCYtxltKSnhfOdhQpQO8SUP2JTXUuuHgLYGGnWFARPmatgaNwYRL/zlG AmzA== 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 k9-20020a170902ce0900b001868a61d507si6758265plg.180.2022.11.06.04.51.28; Sun, 06 Nov 2022 04:51:40 -0800 (PST) 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 S230073AbiKFMtl (ORCPT + 99 others); Sun, 6 Nov 2022 07:49:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229985AbiKFMtU (ORCPT ); Sun, 6 Nov 2022 07:49:20 -0500 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 CF79364D7 for ; Sun, 6 Nov 2022 04:49:19 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] 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 1orf5O-0008Dj-AB; Sun, 06 Nov 2022 13:49:14 +0100 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 8/9] staging: r8188eu: merge two rtw_free_network_nolock functions Date: Sun, 6 Nov 2022 13:49:00 +0100 Message-Id: <20221106124901.720785-9-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-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?1748751195706503435?= X-GMAIL-MSGID: =?utf-8?q?1748751195706503435?= Remove the _rtw_free_network_nolock function and merge it into rtw_free_network_nolock, which is its only caller. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme.c | 23 ++++++++-------------- drivers/staging/r8188eu/include/rtw_mlme.h | 2 -- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index a47ae33454b3..b272123626ac 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -76,19 +76,6 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwor spin_unlock_bh(&free_queue->lock); } -void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork) -{ - struct __queue *free_queue = &pmlmepriv->free_bss_pool; - - if (!pnetwork) - return; - if (pnetwork->fixed) - return; - list_del_init(&pnetwork->list); - list_add_tail(&pnetwork->list, get_list_head(free_queue)); - pmlmepriv->num_of_scanned--; -} - /* return the wlan_network with the matching addr @@ -307,9 +294,15 @@ struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv) static void rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork) { + struct __queue *free_queue = &pmlmepriv->free_bss_pool; - _rtw_free_network_nolock(pmlmepriv, pnetwork); - + if (!pnetwork) + return; + if (pnetwork->fixed) + return; + list_del_init(&pnetwork->list); + list_add_tail(&pnetwork->list, get_list_head(free_queue)); + pmlmepriv->num_of_scanned--; } void rtw_free_network_queue(struct adapter *dev, u8 isfreeall) diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h index 268f898b151b..3ff653ff1d81 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme.h +++ b/drivers/staging/r8188eu/include/rtw_mlme.h @@ -539,8 +539,6 @@ struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv); void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 isfreeall); -void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, - struct wlan_network *pnetwork); struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr); From patchwork Sun Nov 6 12:49:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 16126 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1477029wru; Sun, 6 Nov 2022 04:51:23 -0800 (PST) X-Google-Smtp-Source: AMsMyM7jU+Wr5rsEaUiFJ3Zs19RCoUA806wy94BkD5Eodc0JC8OZWTVOaBuEAaRSpw2BzBkpdVyX X-Received: by 2002:a17:906:5d10:b0:7ad:e132:bb85 with SMTP id g16-20020a1709065d1000b007ade132bb85mr32341470ejt.367.1667739083745; Sun, 06 Nov 2022 04:51:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667739083; cv=none; d=google.com; s=arc-20160816; b=vXjTv43QU+cU9nsUCs8e1N3Nf6eAiIFD2q2GF5CCzzulcVgB3oYm+P5Rpg+uUlt6Ld C3PDTvt/oHfVl/u9/R+M1cAiu+hNNjgpRNeilwOEwKNmMeu7UVxeo8SffuWyUydvukUS gwfxjnNq3QGNaGdyophd0vu5pUOoIMeuferaT6hZBESzsVXD7iWMdFgTi+ZndW+WpejI NckMTi0Se8esuoB6rqCHziCGwCB62Io8zuivbmwZeK+93izEj1RJDCDqNe7rqcPtuGnR /ag0aYtzH3s5cyHgGRM44SJ+FUsv0Id4XrBchR4XKDljOy6yrv4TxTIWOfzb2w3p9Gdm Fpog== 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=F1qygqGhD2zLgW/uuEeApHSTD7Ku7C61JEds3dlLSMk=; b=GQQKm7vai6ZedcKQAD7ISVHgSqp6HUE0iDKUDKdPJZWphk5Wj6ALrTOWHxUItylj2L tt3T1yXR57k3yAo1I6PfKj7QrXn93SjErAQ1fzKnJJ4vrYsmSuPNcbcE2kwFOzcFV0Q1 g3TbNpS9AG6/r5DpHGvzOcSrPIrC18NDb2YZtcdfeFGCx9f6ocelxXOnbAFibWV4+k9G hHsGb0Si/iZzdS1j0Suwhuw/wi797GbK39XPON8ikXYGcHgJxPaFJ78qY4QCZ6PYR55s 2gxyLGOS9EcA/l+zMuU09lm9nxsqAqYCdJ7W93Mi2tYbQF3PuTf7poFP8wpwwtHpxc/1 c5QA== 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 z4-20020a05640235c400b004615855c483si7223007edc.98.2022.11.06.04.51.00; Sun, 06 Nov 2022 04:51:23 -0800 (PST) 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 S230019AbiKFMtj (ORCPT + 99 others); Sun, 6 Nov 2022 07:49:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229975AbiKFMtS (ORCPT ); Sun, 6 Nov 2022 07:49:18 -0500 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 7B2B36462 for ; Sun, 6 Nov 2022 04:49:17 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] 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 1orf5P-0008Dj-5T; Sun, 06 Nov 2022 13:49:15 +0100 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 9/9] staging: r8188eu: remove checks in dump_mgntframe Date: Sun, 6 Nov 2022 13:49:01 +0100 Message-Id: <20221106124901.720785-10-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-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?1748751177194025288?= X-GMAIL-MSGID: =?utf-8?q?1748751177194025288?= There's no need to check for bSurpriseRemoved and bDriverStopped in dump_mgmtframe. The sequence of function calls is dump_mgntframe rtl8188eu_mgnt_xmit rtw_dump_xframe loop over all fragments For each fragment, rtw_write_port is called. This function checks bSurpriseRemoved and bDriverStopped. 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 324757699716..17803aca83c8 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3959,9 +3959,6 @@ void update_mgntframe_attrib(struct adapter *padapter, struct pkt_attrib *pattri void dump_mgntframe(struct adapter *padapter, struct xmit_frame *pmgntframe) { - if (padapter->bSurpriseRemoved || padapter->bDriverStopped) - return; - rtl8188eu_mgnt_xmit(padapter, pmgntframe); }