Received: by 2002:a17:90a:9307:0:0:0:0 with SMTP id p7csp5142371pjo; Tue, 11 Feb 2020 04:48:14 -0800 (PST) X-Google-Smtp-Source: APXvYqwtwiLMPgbszEvKTHZbxd0m1oxB2j1K1CjQatw8/OgeoKriuUVe8rgSUA9gkDlEhvawzOHV X-Received: by 2002:a9d:7e99:: with SMTP id m25mr4903638otp.212.1581425294822; Tue, 11 Feb 2020 04:48:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581425294; cv=none; d=google.com; s=arc-20160816; b=oSZlR3pBQaqqwh4Lss+ByEItGP31WEVVQBURn5SJJzQjiyO3byZbLXLkOW+BaHgzNf 8JmeMNlFVxj7u7isLaK3eCDmZcHFOp2YRg/PofwU46ek4k5gce3z2cYxI8KW4jxiKffu qKSwvQXScdHVAiCpbX3WIW84nUtRtAf8QBGSyKcTP1QjulrOiuNFncS7GRpsNhNL1MNX q+KrMxRdpqWiVmlor4I19ybxbUp5ncPZZVH8C02ZCT6H19G/miYatMisdSSlSYmO4r81 S6etgFpeViqFPxOhPnpzI8CKMhUVw+fFso7cp+Bgkmnamm/O9pbmGawkorh6q2ckwUj3 ng2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8qMiEDKKNDV2wSuyhKKPEZ+Z8U4BDDZBRsfkl4eC8LI=; b=zbJEptKHnIu6kHugGBj3NMPrTwSdRw7NJ4F6OBmOYMpbVWXbedEidCuYPfdvJWrmz+ K2uJJK6HwvSiu+JzMuqrfJ4EbScxquSoPzpuXot44tdvNxbtmEvOc09xrsLwZZ2jlwt9 E6ZoS7eP6VxPvcDjJbqFA9nitj7++H9QKFZoR7+2dgOgc5hD4+zm6hPzIy3kaIaQiRsj R0KAxePEk8oJQsm6SzhdjkofpC8VeCSWA4eSDta8ygDta9HcAi7Hq27Oj8+ga6KmjLTF SqKwaGngRGtj+umKiVioUaX318mphTT64aslxVqGjNYLjkREvMZwGYPUpc3PG1BVKzQw E/sg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si1676618oix.100.2020.02.11.04.47.54; Tue, 11 Feb 2020 04:48:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728348AbgBKM0R (ORCPT + 99 others); Tue, 11 Feb 2020 07:26:17 -0500 Received: from nbd.name ([46.4.11.11]:59476 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728355AbgBKM0R (ORCPT ); Tue, 11 Feb 2020 07:26:17 -0500 Received: from [46.59.221.152] (helo=bertha.fritz.box) by ds12 with esmtpa (Exim 4.89) (envelope-from ) id 1j1UcH-000356-04; Tue, 11 Feb 2020 13:26:13 +0100 From: John Crispin To: Johannes Berg , Kalle Valo Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, John Crispin Subject: [PATCH 1/2] mac80211: allow setting queue_len for drivers not using wake_tx_queue Date: Tue, 11 Feb 2020 13:26:04 +0100 Message-Id: <20200211122605.13002-1-john@phrozen.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Currently a mac80211 driver can only set the txq_limit when using wake_tx_queue. Not all drivers use wake_tx_queue. This patch adds a new element to wiphy allowing a driver to set a custom tx_queue_len and the code that will apply it in case it is set. The current default is 1000 which is too low for ath11k when doing HE rates. Signed-off-by: John Crispin --- include/net/cfg80211.h | 2 ++ net/mac80211/iface.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 0939645567e9..254080a04ee3 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -4742,6 +4742,8 @@ struct wiphy { u32 txq_memory_limit; u32 txq_quantum; + unsigned long tx_queue_len; + u8 support_mbssid:1, support_only_he_mbssid:1; diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 3c00408e9c8c..128b3468d13e 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -1834,6 +1834,10 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, if_setup, txqs, 1); if (!ndev) return -ENOMEM; + + if (!local->ops->wake_tx_queue && local->hw.wiphy->tx_queue_len) + ndev->tx_queue_len = local->hw.wiphy->tx_queue_len; + dev_net_set(ndev, wiphy_net(local->hw.wiphy)); ndev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); -- 2.20.1