From patchwork Sun Jul 2 18:12:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9821743 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0BABE6035F for ; Sun, 2 Jul 2017 18:13:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 063FF27C2D for ; Sun, 2 Jul 2017 18:13:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEE0A27F9F; Sun, 2 Jul 2017 18:13:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96D3A27C2D for ; Sun, 2 Jul 2017 18:13:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752128AbdGBSM7 (ORCPT ); Sun, 2 Jul 2017 14:12:59 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:33075 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751810AbdGBSMy (ORCPT ); Sun, 2 Jul 2017 14:12:54 -0400 Received: by mail-oi0-f68.google.com with SMTP id f134so10161147oig.0 for ; Sun, 02 Jul 2017 11:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=SvKd462htN8E71K7tVBSue1D+amjxJjapbE9yZgsLm8=; b=Oih4VZpC3ydX4RJCQhtWiyKNBOqKjAjKFm3fns5F1qch2/b/phGHpkBUHMPBooiDkS tuh79hntUK0M/HO4vFapvZt49PcTnNYk8UswRpNZspRsLu0Se0WCR8gpApXlp10SDhx3 9ZVW9RdaJGgyGZtM4vsRpCTYVfYsdOIQTk0M3Fi7+WAngFnA5/q0O2z40zQ5a0zy6qrV lRingVPOMUAj0ZKQ1OC6JRkyRTLl/qLAJMCnC4j58BvsnmLdDoOqm3pHorZ2+oxjEqSs CiyuwEOXWLGPwDkdgj0BKwbVbWkequkSHA4+97Ut1U87SnmcWEg3p+ZgDrH0pskrBX87 q68w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=SvKd462htN8E71K7tVBSue1D+amjxJjapbE9yZgsLm8=; b=pYyLfQn3Pr/y+UD7nCeL4pBr7Nlxhh8UiyXnVWlCwAzP/CTIhwgG7v18wweW8hprpE SLxHz9dG/2ib9TVyiLxqxiJFEvEua4UqZLIIv/JKExiEzvHfDEvINOSabilJJKFDOWXS FTLFM7H05OiqXLpP9qmIFmxuP/lOOeXsHAi0r133axtWFxLAR5bkYIt4uI6egtmLQxbU cg0PteVc2inreTgZ7afnWTMA9gIm1YiquwcxqGiwWVevuDhLSDZvM2YnkZnXc2Jm/08J k9mfE9nJ34IPIWtbvu9Bet6MrYDU+GIEgz2fH29b+UBWZcRDF1Cfv9MoWnPs7O5N1AUO GiqQ== X-Gm-Message-State: AKS2vOxgg3y7eRyqOg0mEuJxvdWd0V9TviSZiB3GilYtlynROlhH5mCi jADHpTjE7bRLnw== X-Received: by 10.202.51.136 with SMTP id z130mr17998288oiz.163.1499019173927; Sun, 02 Jul 2017 11:12:53 -0700 (PDT) Received: from linux-4v1g.suse (cpe-24-31-249-175.kc.res.rr.com. [24.31.249.175]) by smtp.gmail.com with ESMTPSA id t130sm23296520oig.3.2017.07.02.11.12.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 02 Jul 2017 11:12:53 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Ping-Ke Shih , Larry Finger , Yan-Hsuan Chuang , Birming Chiu , Shaofu , Steven Ting Subject: [PATCH v4 07/10] rtlwifi: Uses addr1 instead DA to determine broadcast and multicast addr. Date: Sun, 2 Jul 2017 13:12:36 -0500 Message-Id: <20170702181239.17911-8-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170702181239.17911-1-Larry.Finger@lwfinger.net> References: <20170702181239.17911-1-Larry.Finger@lwfinger.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ping-Ke Shih We should check addr1 to indicate a packet as broadcast or multicast in tx desc. An obvious example, a STA transmit an *unicast* ARP packet where addr1 and DA are the addresses of AP and broadcast respectively. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- v2 - no changes v3 - no changes v4 - no changes --- drivers/net/wireless/realtek/rtlwifi/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c index 0c9cfb670cec..4023644c3532 100644 --- a/drivers/net/wireless/realtek/rtlwifi/base.c +++ b/drivers/net/wireless/realtek/rtlwifi/base.c @@ -1166,9 +1166,9 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw, } } - if (is_multicast_ether_addr(ieee80211_get_DA(hdr))) + if (is_multicast_ether_addr(hdr->addr1)) tcb_desc->multicast = 1; - else if (is_broadcast_ether_addr(ieee80211_get_DA(hdr))) + else if (is_broadcast_ether_addr(hdr->addr1)) tcb_desc->broadcast = 1; _rtl_txrate_selectmode(hw, sta, tcb_desc);