From patchwork Mon Oct 31 20:54:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 13443 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2547708wru; Mon, 31 Oct 2022 14:08:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Xz3VxjezWc8grwznQMmtUMvg5ruJT7GgO9aXsqu1dnhXhs9FcrZnQzzN8O9eBkzD8Cd1l X-Received: by 2002:a17:907:25c1:b0:77b:9966:ccf1 with SMTP id ae1-20020a17090725c100b0077b9966ccf1mr15289082ejc.763.1667250500053; Mon, 31 Oct 2022 14:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667250500; cv=none; d=google.com; s=arc-20160816; b=xQF7Kk0RtaVOvLl4na217B46oe9JvG41KOADYtw4AusygDAkyb/yf9JkzsHULVPmsU Opho1XjOFYALCesbfturdXsrZa3E3KYOdrYv/SUyvsTC7C4F5x14+ogDUm7e3/oTKqhs 74AaUBRCV6roSx8w7qKInf6a0b2Xy5zK3DeItJo49gcLdKcWsB3wkS8Lu0PMxqylX9FN rGMJfgsrKTccuIqQsVG4T0QPqLvvq4E8AIlDozenMYPWpHcwUlZsezfwj3QusD0+oXU7 eKyG6V+Sn7yzq9MEMT4pP2STC5kLlUFs3QHYSr9rvncqr8gqCQykF6iTizBWAcOneXQP 71HQ== 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=nCEXWi77iCYD3L8jo8vNVD/qzJOZQ3kKaThyg7tzAxs=; b=D4fTCAqSsg7xUpFkGCR6Q3/Z1bMDtv+tUl5VvkXbw0Dc/E+5m7/ccwK1USvgIJ9ven CkQzW/PMK+V9o/oRh75K8pEY45sWWZvK0Jf2W3pxXk9942wrGVrxQYSZQv0Xde+/01dl 2u158x5aAz+aa4YMIhWRXpLpM7aCijnTr6V5S4cRKfoWwLFDlc+AwAR1EtRignqN6+bf /sCtiRwcrgYJXCgnAGXUW702xZvgxBrzCJ+Wuonm3IDbeiPKAo2ACzzUJ96BIsESTm8Z +sy6Gt4S++vvjrBMI+OLnEhIvLHu567r7JX2rfDYPByobyPiWU9SfxyZ2HPKpF/2FRs6 B7Ug== 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 h11-20020a056402280b00b00461ed1fe6ffsi11971452ede.85.2022.10.31.14.07.55; Mon, 31 Oct 2022 14:08:19 -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 S230222AbiJaUzU (ORCPT + 99 others); Mon, 31 Oct 2022 16:55:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbiJaUy7 (ORCPT ); Mon, 31 Oct 2022 16:54:59 -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 F33FDD10E for ; Mon, 31 Oct 2022 13:54:58 -0700 (PDT) Received: from dslb-084-059-234-234.084.059.pools.vodafone-ip.de ([84.59.234.234] 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 1opbo6-0006z9-US; Mon, 31 Oct 2022 21:54:55 +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/3] staging: r8188eu: use hdr->frame_control instead of fc Date: Mon, 31 Oct 2022 21:54:11 +0100 Message-Id: <20221031205412.124871-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221031205412.124871-1-martin@kaiser.cx> References: <20221031205412.124871-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?1748238860163637894?= X-GMAIL-MSGID: =?utf-8?q?1748238860163637894?= We can remove the fc variable in update_recvframe_phyinfo_88e and use hdr->frame_control instead. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c index 10bb2e602984..4e9d8c8285c4 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c @@ -114,13 +114,12 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, struct phy_stat struct hal_data_8188e *pHalData = &padapter->haldata; struct phy_info *pPHYInfo = &pattrib->phy_info; u8 *wlanhdr = precvframe->rx_data; - __le16 fc = *(__le16 *)wlanhdr; struct odm_per_pkt_info pkt_info; u8 *sa = NULL; struct sta_priv *pstapriv; struct sta_info *psta; - pkt_info.bPacketMatchBSSID = ((!ieee80211_is_ctl(fc)) && + pkt_info.bPacketMatchBSSID = ((!ieee80211_is_ctl(hdr->frame_control)) && !pattrib->icv_err && !pattrib->crc_err && !memcmp(get_hdr_bssid(wlanhdr), get_bssid(&padapter->mlmepriv), ETH_ALEN)); @@ -129,7 +128,8 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, struct phy_stat ether_addr_equal(ieee80211_get_DA(hdr), myid(&padapter->eeprompriv)); - pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID && ieee80211_is_beacon(fc); + pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID && + ieee80211_is_beacon(hdr->frame_control); if (pkt_info.bPacketBeacon) { if (check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE)) sa = padapter->mlmepriv.cur_network.network.MacAddress;