From patchwork Sun Jun 25 15:43:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9808213 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 9424460329 for ; Sun, 25 Jun 2017 15:44:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 855CD285D5 for ; Sun, 25 Jun 2017 15:44:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A5D328675; Sun, 25 Jun 2017 15:44:07 +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=-4.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID, URIBL_BLACK 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 1D6E4285D5 for ; Sun, 25 Jun 2017 15:44:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751337AbdFYPoB (ORCPT ); Sun, 25 Jun 2017 11:44:01 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:36487 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156AbdFYPn5 (ORCPT ); Sun, 25 Jun 2017 11:43:57 -0400 Received: by mail-ot0-f196.google.com with SMTP id r67so9298156ota.3 for ; Sun, 25 Jun 2017 08:43:56 -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=/XRqhltb4fa8YmJ9Ef+cDDZbazLuzw8Jg8ZC8v18QmU=; b=a6gjru5MSIYfPZFXOrezRl4Owh1zxKAdU8QHXwyeR6vYoujIy12oHHcKZW4xjOy30Y yaUXj4LEjNtDc4aKeYGtBZj2GAzopnZ0comCvrNOikLBMfFGp4n/31RoQ31feyCLRjXm 5YDvWlJqRMnhrwkR+JIyKka0sC2MlXaw+VfN7Ztd+MORErhnsqtByxCa0itoFPFZs+gd AVvmqQZaptYOfnFDpNF6du8eGt8X0ivthWUFTHQvg2ep6BJ/42/+2r7T8sNTNpIpSSI6 iktXEy1Or9cyshX4lD8gvJVUEcHUWxyJPytiydLVrFlS+B5WCWfr3UZ/hvVGoRwPN/8o qXrA== 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=/XRqhltb4fa8YmJ9Ef+cDDZbazLuzw8Jg8ZC8v18QmU=; b=PjhTPPwSOLMRV3xYBQ5pEQuOJ4UfBWjvxYqyh978QsgCkk9+mxJaeiS3fKSkrIqbz1 wfufAD6/aVgQg1s3ig7l8Ei1KnFbYEVDuVD7GddYNuRuUY1YGVJETlRgeztZ3kqpOI4d W8jXNrqz2krxDgLhl1oSGwCVML3vELu3iQmKU19n9FvB+MW1c7CKULwW2+Nehvhz7lwl HixVTfPPELpX+B39AhShgdePU1IVtKqouUCOlxJXBdiYWBmU1fVPZtdldCTYmVbHUN7e 8mg2RBN6tDk6phU5s5uCS+8JyjYxU8Fk7m0OgqpSLkxq+b064A9k12j7SzzHaJJcfX2l JjcA== X-Gm-Message-State: AKS2vOzAmTwOi38/Lke9WpZYnnStZ14kI422R9jJVTSWEyoqSzETaavj XG01cjxQ0walaA== X-Received: by 10.157.41.3 with SMTP id d3mr8746191otb.70.1498405436470; Sun, 25 Jun 2017 08:43:56 -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 p33sm5351379otc.49.2017.06.25.08.43.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Jun 2017 08:43:56 -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 v2 07/10] rtlwifi: Uses addr1 instead DA to determine broadcast and multicast addr. Date: Sun, 25 Jun 2017 10:43:41 -0500 Message-Id: <20170625154344.19213-8-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170625154344.19213-1-Larry.Finger@lwfinger.net> References: <20170625154344.19213-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 --- 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);