Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp764576rwj; Sat, 29 Oct 2022 10:25:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM79IVcnDC38VdcwjMEJSt+hQwX27b4UpyUUW8TmRATJ5RwfNXoI9HTWTEcK9UqUVBXSlwkA X-Received: by 2002:a17:902:ecc8:b0:186:e2e6:f567 with SMTP id a8-20020a170902ecc800b00186e2e6f567mr5349923plh.11.1667064315763; Sat, 29 Oct 2022 10:25:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667064315; cv=none; d=google.com; s=arc-20160816; b=IB+E3ky5QYleHuSadFnMMKEFS0qf6MjNHt5D9qs6HIFpoCKGEVw4sfCzT0cFsXL39F eU6uRouVHHkh0PTnB+2n4lmNdN40TfNgHuNnkBujRb+a3zq6RlaBL7lp98makEf187vR 0ogPWvQUSRc5oz+BVMcAvyn9oBSwTUiO8i3abzjarFf92i3Mrzql3hXwiZobuuAOJoU/ F/1MQiueRWjbI2lQm5mkmqMH2EEi5oOoPgVuJpBX3IG/MPfn3PnDNkgY/MssOjHCNYOL Wp+7/4QOs07DuRUGkCyYqZ3Yzsft9mN4efNEKHEQ3VsSbMt93T61e0ms8IrpXSoA14Vv rjvw== 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=Sxr1xjpCCzhSSNZjhtpvDER6IT6Hi5X1gAlfkWhVJrQ=; b=lkFHPIQAwub94r2gQLAu36TTaRWA8wVI9Sb9Fl7xYDTWzpbpGAgTpuFVfJaVjp5DDk FaglJG27mS1fAgoAzPn0V54BG8ESRZjc4rO+X6FOShPiiu4fP74M7K26q9D0nPIFa/+i 12ey/OJ+oSXvQLHnw+J4IH+nc/UgbyfQYO0/3W6ZEWjDGXBgkWAWRmo0FUnFDT39MdCG Q5Pz4LqrXLbzisnqOaQrV9aTwIKzeFiVyU2TgDFz658CblqEyQuAmNYIeQDXwyMstZYK 8AOKVvOQZlKitm368KwStmzlQ2WvvnFddZI0hBP4YArU3/TNyWHuCVXbNvElZn84KpCF 9mnQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o6-20020a17090ac08600b001fe39932aa3si2343757pjs.48.2022.10.29.10.25.04; Sat, 29 Oct 2022 10:25:15 -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 S229838AbiJ2RKt (ORCPT + 99 others); Sat, 29 Oct 2022 13:10:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbiJ2RKl (ORCPT ); Sat, 29 Oct 2022 13:10:41 -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 38C0C27178 for ; Sat, 29 Oct 2022 10:10:39 -0700 (PDT) Received: from dslb-188-097-213-253.188.097.pools.vodafone-ip.de ([188.97.213.253] 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 1oopLu-0006xg-T0; Sat, 29 Oct 2022 19:10:34 +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/2] staging: r8188eu: remove get_da Date: Sat, 29 Oct 2022 19:10:11 +0200 Message-Id: <20221029171011.1572091-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221029171011.1572091-1-martin@kaiser.cx> References: <20221029171011.1572091-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Replace the last get_da call with ieee80211_get_DA and remove the get_da function. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 3 ++- drivers/staging/r8188eu/include/wifi.h | 22 ------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c index dff0cba751df..f01ae71bcdb1 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c @@ -108,6 +108,7 @@ void update_recvframe_attrib_88e(struct recv_frame *precvframe, struct recv_stat */ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, struct phy_stat *pphy_status) { + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)precvframe->rx_data; struct adapter *padapter = precvframe->adapter; struct rx_pkt_attrib *pattrib = &precvframe->attrib; struct hal_data_8188e *pHalData = &padapter->haldata; @@ -125,7 +126,7 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, struct phy_stat get_bssid(&padapter->mlmepriv), ETH_ALEN)); pkt_info.bPacketToSelf = pkt_info.bPacketMatchBSSID && - (!memcmp(get_da(wlanhdr), + (!memcmp(ieee80211_get_DA(hdr), myid(&padapter->eeprompriv), ETH_ALEN)); pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID && ieee80211_is_beacon(fc); diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h index 6b50089cea29..92a584a8b6c0 100644 --- a/drivers/staging/r8188eu/include/wifi.h +++ b/drivers/staging/r8188eu/include/wifi.h @@ -217,28 +217,6 @@ enum WIFI_REG_DOMAIN { #define GetAddr4Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 24)) -static inline unsigned char *get_da(unsigned char *pframe) -{ - unsigned char *da; - unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe); - - switch (to_fr_ds) { - case 0x00: /* ToDs=0, FromDs=0 */ - da = GetAddr1Ptr(pframe); - break; - case 0x01: /* ToDs=0, FromDs=1 */ - da = GetAddr1Ptr(pframe); - break; - case 0x02: /* ToDs=1, FromDs=0 */ - da = GetAddr3Ptr(pframe); - break; - default: /* ToDs=1, FromDs=1 */ - da = GetAddr3Ptr(pframe); - break; - } - return da; -} - static inline unsigned char *get_sa(unsigned char *pframe) { unsigned char *sa; -- 2.30.2