Received: by 2002:ac0:cd04:0:0:0:0:0 with SMTP id w4csp856975imn; Sat, 2 Jul 2022 07:58:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sSBPmWoL830nfNn2O/UFw1M7h9PkrcVCSG9L1LmlK6FJRm/MM+BlnGN6D8jDonzCR7jJto X-Received: by 2002:a17:90b:3148:b0:1ed:75:47b with SMTP id ip8-20020a17090b314800b001ed0075047bmr23248762pjb.9.1656773910779; Sat, 02 Jul 2022 07:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656773910; cv=none; d=google.com; s=arc-20160816; b=ptb3k47eBYVFe2dxahNY6AS2czEWYAbEhqLJQ8OG3/jrrbNS7W47cIQ0CLnpgZ59Ls kc+iEvM3o8o3o45NtJbIX/KwgSN6oJN/P0IyHvTZq67l7S32wKZvpqG69ve9Aaq13DEW bjsWkxD2AFdu5A6uMaF53oA2z3zly+W90/1d4ZFagGZJ+s41P7ZQgc2+ABY/Kwg+erIx OBHHBTHP1atUDcl5UsW7U92s9nFb8ujan4aOk9bpBWVcGg8TrUo6RhtJ3CXZ6FznJurf 0Dk+Hz7q4Rm13o7sQFotCmys0BLnuhJQKW7YTcZPcDPnGsZ7SGaHU8HoUGE5/ScuzkNO 4zng== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=rSSLDM4nRDwUakIOMpX3jLkhNiYonjFcAMyTKgg+VW0=; b=umQnXXSS1kapvVXGXnko4PG/e7E4LajozqU8C4EHo9SsMppnlfGZVBL4UAg8TgUny7 9VGJQTQ0Bv4Ql7kKfcc7Hh2MdOCf04AHFSAXjBi2LxrRdbfrd58J1h8k1lrsxeEmM06y JnR47J8zHxTrh01uevFjVi4JOxriw2fFzNlPTM2KC17uLGc9YCdlaX9asutRwwTkKGau mBkyLtkegK0CLaNVXxFzyPf0K76+8TXhzgxx16u9gAO4cdFaQ/wi/UdCbyobfIUGYWIV VXU0+QmPGpdRAZIr1Gy4bQfcBJrZRSdYZlM0lC2UTdpXGauQMpW4j+8u2o4W2gq7U7j8 O9xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=M3Vpk6xP; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j2-20020aa78dc2000000b00527ffe6b3bdsi12160153pfr.177.2022.07.02.07.58.20; Sat, 02 Jul 2022 07:58:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=M3Vpk6xP; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232289AbiGBOwd (ORCPT + 66 others); Sat, 2 Jul 2022 10:52:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231426AbiGBOwd (ORCPT ); Sat, 2 Jul 2022 10:52:33 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBC25BC0F for ; Sat, 2 Jul 2022 07:52:31 -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:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=rSSLDM4nRDwUakIOMpX3jLkhNiYonjFcAMyTKgg+VW0=; b=M3Vpk6xP8xi3v7kKLN1aSjiGmD HqQcGTz/zAUhHsY/j1Z0j2/RGUGfe+QtxJrQhJb3+LA2Tv9NfAwrqYsQ/SIUe6oPUhpalnZC5D5TN S3U6GqHcvbIcqsUI6L13EwSXccGMY+qfEAXg+dd+RfbezoWNWmxBfnLlsLLN/XCIZYEo=; Received: from [217.114.218.24] (helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1o7eU1-00013u-S9; Sat, 02 Jul 2022 16:52:29 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Subject: [PATCH] mac80211: fix queue selection for mesh/OCB interfaces Date: Sat, 2 Jul 2022 16:52:27 +0200 Message-Id: <20220702145227.39356-1-nbd@nbd.name> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When using iTXQ, the code assumes that there is only one vif queue for broadcast packets, using the BE queue. Allowing non-BE queue marking violates that assumption and txq->ac == skb_queue_mapping is no longer guaranteed. This can cause issues with queue handling in the driver and also causes issues with the recent ATF change, resulting in an AQL underflow warning. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau --- net/mac80211/wme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index fc36c8e9d1d2..ecc1de2e68a5 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c @@ -148,8 +148,8 @@ u16 __ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, bool qos; /* all mesh/ocb stations are required to support WME */ - if (sdata->vif.type == NL80211_IFTYPE_MESH_POINT || - sdata->vif.type == NL80211_IFTYPE_OCB) + if (sta && (sdata->vif.type == NL80211_IFTYPE_MESH_POINT || + sdata->vif.type == NL80211_IFTYPE_OCB)) qos = true; else if (sta) qos = sta->sta.wme; -- 2.36.1