From patchwork Fri Jun 15 12:01:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Stromdahl X-Patchwork-Id: 10466273 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 89E5760384 for ; Fri, 15 Jun 2018 12:04:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DB5A28D7D for ; Fri, 15 Jun 2018 12:04:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71DEF28D80; Fri, 15 Jun 2018 12:04:57 +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=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2777D28D7D for ; Fri, 15 Jun 2018 12:04:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=9KzDjPCN7IosSjlMfSPIEBzpeyfUzKz+I/j5bho5c7Y=; b=q3M 2ksgo57MOMBMVrgt5XQkyL4Cp+yaQpzp9bkN7LfrosWcliqptPMnDMDFp3q3wlE3wi3TqvNNs+BxV hqcF8Hrdhxhpk2wkXOB/EUWErp9ZXiBTY+YGt1/ot7Xx80cV5KI9PyEZs84dHMrigokvdeD0M8S0q zDt6tVtakgfF2LGNPwcvMl2lnNnaKifrx9Lntb7J5cHHhjDf6RsB8LFHYn7uwHXKtTDOu/ZBEabF2 ay8UV5EgLdaJ4bRFKWOSSm2odr36GRUC24Vf/S5N7lLZMwT5S12VzZ2Cw0UfPevqidGXfWNjsE0fH LPYVYsFVSQ3mAxUUTp76xJCv1Wdynog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTnTA-0003Dc-Hh; Fri, 15 Jun 2018 12:04:44 +0000 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTnT7-0003Bb-2a for ath10k@lists.infradead.org; Fri, 15 Jun 2018 12:04:42 +0000 Received: by mail-lf0-x243.google.com with SMTP id q11-v6so14274567lfc.7 for ; Fri, 15 Jun 2018 05:04:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=9QkZzrQ6cVbJdBdx0aXSyVmyzglY6wbRhx1wAT32TD0=; b=m03BwqjzHGq1youQiPm1R0Id0/s15+VlBngHQbzagvFrhtlO8nKcK6fK/YEqL/swhR /jZG0V8c/30zNJ+ozhBGNH4Fe2sQDoTDUI1c7KUYM4Yk5tHQa9t7AREFqU5MrybSAWFi h0k+UTwp0j/Kvk8hvUnuNK5CwMY+erDImyxnllB7PBdDBpY8itKaJ7YqPeMd8RvlAIzR YPzSp/w2JdkOnLwFqKjoClJhPYu3FlwpSAir3DlHXR98SVhGrpTiDhRu8zMKDaqZoOLh vJB1+fJvg5GB531nWXNh3vnFLmjk8xOAyVSTiJNBZvmMVx3JTCAKx1WOuHBWBXchOL1b pfcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9QkZzrQ6cVbJdBdx0aXSyVmyzglY6wbRhx1wAT32TD0=; b=t7Gad2/+dg2KfbUPM7+U2YJERYMyjq0d3gOlxpCYsE8r2hnASjEP9i8LNQ3zSVgJCj dMJmyubhNm8qDebnJYYBfxxhKhudNpBAUmjiKyU+gjgH2i3/u7+awOveSi2gVowetlAA xA0N62EK4x8z4AVoYZ1HdWAhURfaC64YAGMdEsXKGZObL6jsJ0ZcQQf3LdFygEDqdM9k eIvqa0GJwFXlmKAWq+/nwUnSzJctRrjFVUG7d5AFBrjEUrBm63r1QAcqq11QaNKfyN4j 8CR0jgi31ucqQKtpQfMkEGibJSgu7zsaSClHcjFeGp23vTj1828MQkLR1mpdTAaqxhOr JVVA== X-Gm-Message-State: APt69E0oXHbcbukJSL/e/bE+P8dy2W+ByXctTT4VdpRblqSGuon3lPDc fse8OVgxyp8bWJVCfenfbVo= X-Google-Smtp-Source: ADUXVKImPvrXXEVyIaLV+nUy6wEpBtxIdko4NWMZXrimPa0Ed0RuMUaIPwsaEO5hsPLi976pVyCH9Q== X-Received: by 2002:a19:1c5:: with SMTP id 188-v6mr1097226lfb.67.1529064267968; Fri, 15 Jun 2018 05:04:27 -0700 (PDT) Received: from localhost.localdomain (90-227-62-61-no75.tbcn.telia.com. [90.227.62.61]) by smtp.gmail.com with ESMTPSA id y82-v6sm1474546lfd.81.2018.06.15.05.04.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jun 2018 05:04:26 -0700 (PDT) From: Erik Stromdahl To: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Subject: [PATCH] ath10k: fix bug in masking of TID value Date: Fri, 15 Jun 2018 14:01:53 +0200 Message-Id: <20180615120153.4677-1-erik.stromdahl@gmail.com> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180615_050441_137050_E5C6083E X-CRM114-Status: GOOD ( 11.40 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Erik Stromdahl MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Although the TID mask is 0xf, the modulus operation does still not produce identical results as the bitwise and operator. If the TID is 15, the modulus operation will "convert" it to 0, whereas the bitwise and will keep it as 15. Signed-off-by: Erik Stromdahl --- drivers/net/wireless/ath/ath10k/htt_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c index 89157c5b5e5f..be5b52aaffa6 100644 --- a/drivers/net/wireless/ath/ath10k/htt_tx.c +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c @@ -1056,7 +1056,7 @@ static u8 ath10k_htt_tx_get_tid(struct sk_buff *skb, bool is_eth) if (!is_eth && ieee80211_is_mgmt(hdr->frame_control)) return HTT_DATA_TX_EXT_TID_MGMT; else if (cb->flags & ATH10K_SKB_F_QOS) - return skb->priority % IEEE80211_QOS_CTL_TID_MASK; + return skb->priority & IEEE80211_QOS_CTL_TID_MASK; else return HTT_DATA_TX_EXT_TID_NON_QOS_MCAST_BCAST; }