Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2419662pxj; Mon, 10 May 2021 02:27:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjFQRuOftEc+YgwxEqbdc3deV6fBhi0hSr0ZEOnZBwe4+6tM4xOS+8S2XKkcPzUuqYpEHX X-Received: by 2002:a17:906:e206:: with SMTP id gf6mr24106213ejb.434.1620638864663; Mon, 10 May 2021 02:27:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620638864; cv=none; d=google.com; s=arc-20160816; b=KdYYrblvBS2q5VM8Q4KtYI+Aj8yCOvwzZ1WRXyW1ekC9kIcRaj4q++MW1EvpSMAEuy eXC/Pp3HMkQy7RlP2IkGmUI7UbgBhCU2SzhDTH5nBFZdv0wkfIAIbir0T2Mfa0Wz7QJe tKM2Fc4UKXtNtoKytIr/3x52qC8HIe96wqGMdzfmonMsTNBP15GHNou+AmPX91L6rpOc vnB90fBV3JJhWBv6fQCwU/oUn2CJVM1N0eeBRKlY1PriqJX95Ggc03X++x58rYe2Qmcm /7sgJOTNWJxXNoS5zZQfSLpB6KPNBQbNpiMYjgdQBfMKTE3dJOnyog5rBqdVDrJ7DuJQ Hi7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=pVtLWlZ1ypbXlX6qXsgvhng1/2mOJz8mXkRcbpFQF3A=; b=WLDpCtkiCYbV/nT1vaKlnzbLLSzzqnbzvjM9IvKdYpJMVgrHxOv3sB0klCW6XzMvjf Mcglo9qvV2eaBVBEb2QkPEIk4AgiWb8vOTJitme1a0ni/AQlwnfikQQRFRJJlyinxQVT 1H44Xv1a8Vlu96onfCzSUfawyaqzLOULGWmryEk8ru48emiM4vNcsiY+aclpNWV/62uo mSZu0l3ykl7vLlMNfXNx4licJTi3oXeO0hwClaOXzjx8R+t/Ifb/Q9IFSFX6VPQQXv0P drr9P1ZJdJnJppOJkh32H0y766FwMu95Pvo0QJEx7HYnuNy9U9kJK9tLN340b3G7zCLv wVBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=SndGS9jl; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si9185076ejw.423.2021.05.10.02.27.15; Mon, 10 May 2021 02:27:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=SndGS9jl; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230267AbhEJJ2N (ORCPT + 99 others); Mon, 10 May 2021 05:28:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230245AbhEJJ2M (ORCPT ); Mon, 10 May 2021 05:28:12 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30CF5C061760 for ; Mon, 10 May 2021 02:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pVtLWlZ1ypbXlX6qXsgvhng1/2mOJz8mXkRcbpFQF3A=; b=SndGS9jlexG+IJztXjdtujakiZ 2IntOrbHRtQAXxET7OYHQw/YhKUJUHUDqo/01jfyp1qk/7C3lv54A4RPbg5Wv/hja/ugALIhnHz92 o+wikCEQTaDhD3v6neH8l2HgPvXlPqGBXGJ9UAs5pqjYn689R4OEsle+Rbgmokdn8Hhk=; Received: from p54ae9ff2.dip0.t-ipconnect.de ([84.174.159.242] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1lg2Bu-000572-04 for linux-wireless@vger.kernel.org; Mon, 10 May 2021 11:27:06 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 5/9] mt76: intialize tx queue entry wcid to 0xffff by default Date: Mon, 10 May 2021 11:26:59 +0200 Message-Id: <20210510092703.90500-5-nbd@nbd.name> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210510092703.90500-1-nbd@nbd.name> References: <20210510092703.90500-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Avoid accidentally mapping them to WCID 0 on completion Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/dma.c | 1 + drivers/net/wireless/mediatek/mt76/sdio.c | 1 + drivers/net/wireless/mediatek/mt76/usb.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c index 72b1cc0ecfda..75c1f54b1fe5 100644 --- a/drivers/net/wireless/mediatek/mt76/dma.c +++ b/drivers/net/wireless/mediatek/mt76/dma.c @@ -191,6 +191,7 @@ mt76_dma_add_buf(struct mt76_dev *dev, struct mt76_queue *q, q->entry[idx].txwi = txwi; q->entry[idx].skb = skb; + q->entry[idx].wcid = 0xffff; return idx; } diff --git a/drivers/net/wireless/mediatek/mt76/sdio.c b/drivers/net/wireless/mediatek/mt76/sdio.c index a18d2896ee1f..1665fe88ebb8 100644 --- a/drivers/net/wireless/mediatek/mt76/sdio.c +++ b/drivers/net/wireless/mediatek/mt76/sdio.c @@ -256,6 +256,7 @@ mt76s_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q, q->entry[q->head].skb = tx_info.skb; q->entry[q->head].buf_sz = len; + q->entry[q->head].wcid = 0xffff; smp_wmb(); diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c index 30bc54e98c58..1e9f60bb811a 100644 --- a/drivers/net/wireless/mediatek/mt76/usb.c +++ b/drivers/net/wireless/mediatek/mt76/usb.c @@ -925,6 +925,7 @@ mt76u_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q, q->head = (q->head + 1) % q->ndesc; q->entry[idx].skb = tx_info.skb; + q->entry[idx].wcid = 0xffff; q->queued++; return idx; -- 2.30.1