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: 10466271 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 A36D860384 for ; Fri, 15 Jun 2018 12:04:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94B5928D7F for ; Fri, 15 Jun 2018 12:04:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 875C928D7D; Fri, 15 Jun 2018 12:04:32 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 3D1DD28D7D for ; Fri, 15 Jun 2018 12:04:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755869AbeFOMEa (ORCPT ); Fri, 15 Jun 2018 08:04:30 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:43044 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755650AbeFOME3 (ORCPT ); Fri, 15 Jun 2018 08:04:29 -0400 Received: by mail-lf0-f65.google.com with SMTP id n15-v6so14255045lfn.10 for ; Fri, 15 Jun 2018 05:04:28 -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=JHWnodgdjRVKKRlA2vBojolaWJSEG0sgnm7NHr6n1m9XdMvRheqyGAc66eWj8L3tg8 hH7QOZS0bEqZlLJE2MA6nxw2gW3FMFlo7SZxovFLXfiAF6GTFqMr+nSA6MMq9yPKRS8i GFEIrK8SV6nEyUGc7kww20MMJl6tzdeLPmU0XWEHFSul28HjZBfcokLQaUJgUIi9Ofhm n6Mfl+o5KDMh6FFF+jzh0H16jDg5yRCREGlge8NInxKfYUGKmvoEEWjIO5MpN2XstJxY qFR9S5rlqpmbxVvup2wwYWukjypqu59OiRmBY+PeoWPvWFT+vxeW8mI3WS3Q3WXpIzQG uH5A== X-Gm-Message-State: APt69E0zXoL8GZjqjw1tAA6XYCWSJb4b3VZ7VklBC55sRL4zHy0HSyHD yHttfQVff+L84fuid8006Ig= 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 Cc: Erik Stromdahl 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 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 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; }