From patchwork Wed Jun 28 15:12:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9814595 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 9EACC603F2 for ; Wed, 28 Jun 2017 15:13:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 918FC1FF29 for ; Wed, 28 Jun 2017 15:13:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 862ED285FD; Wed, 28 Jun 2017 15:13:48 +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 53D2B1FF29 for ; Wed, 28 Jun 2017 15:13:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752552AbdF1PNj (ORCPT ); Wed, 28 Jun 2017 11:13:39 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:35504 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752138AbdF1PMr (ORCPT ); Wed, 28 Jun 2017 11:12:47 -0400 Received: by mail-oi0-f65.google.com with SMTP id l130so5799708oib.2 for ; Wed, 28 Jun 2017 08:12:42 -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=Z7ErpREwMkByaYwyt6HGteYHFUyj2sNgTUyDDJ41xV8=; b=mm20zvIhPpbc8cYlhJAXt3UgN11s4pxHwQfwm7ISpaoA9wmRt7jpyoqMHEU5UST7vf uU5+OEs3OQerCP2y/S6U+Fe8PiMzsf5v7nFoS/OreW1KAYgC7gMviCxNiDv6vCa/E9TL /VVBpbO7P0DhuxyCEIF+cQKZv4tBRQX5x8tiGZ0S+TjXnaRhxsiWKUDfL9BI5V9ghC1c E++Nyk2L2uwt6JtZXTU2QOa2RxqsAvWsg3q8YQNc5kOof6slkOEJqURWWm3LHRMdCS0p D60+y9zI5UgA6d7EzypxFO6gHA0T1kJ/bl93Yh6WrqfLeHrLNc7YkP7QB4P5OYLslW4Z P/6A== 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=Z7ErpREwMkByaYwyt6HGteYHFUyj2sNgTUyDDJ41xV8=; b=XjNDVfnAx/JWzlLIenLuU24fOZVpIOL29le8IQ0uaswDD0zzY+GtlQx+uFhCneNHnm gfDqbnwQjULRbB3a58PotODE8cAi+h6D11FKrDM88m1a2E3HFdnujxwmKO6ProZllZLe I+hmhJ3qLsEhvFQfbq1qV6vbP0yqWD9bt7MRdu5691P/tnmRU/8VR1asq/WiwtUmCtbc AJpd6tRsWbR7blb6kLYe+LLnKvsAUgSXXq6Ws2RChaYJ2qQdB8h87Hk/to6DylC/fIJA 3pCJr3BajL3/onbuTxYcez9fzICA0uSyMlCD/29w05ih5HOS13biAD+aS3MhOH94ZsKC jo5Q== X-Gm-Message-State: AKS2vOztSsiZlgXnnuOYiOgUMRlaKd6s4SeVHOs2WbRL1bviqdO73C9+ 6JTQAAgk7EFMyDdR X-Received: by 10.202.212.9 with SMTP id l9mr7280715oig.120.1498662762038; Wed, 28 Jun 2017 08:12:42 -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 x74sm3805951oia.23.2017.06.28.08.12.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Jun 2017 08:12:41 -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 v3 07/10] rtlwifi: Uses addr1 instead DA to determine broadcast and multicast addr. Date: Wed, 28 Jun 2017 10:12:22 -0500 Message-Id: <20170628151225.22190-8-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170628151225.22190-1-Larry.Finger@lwfinger.net> References: <20170628151225.22190-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 --- 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 7aa3c39c9c5c..464f14450f75 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);