From patchwork Tue Feb 16 21:28:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avery Pennarun X-Patchwork-Id: 8332271 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 395FCC02AA for ; Tue, 16 Feb 2016 21:28:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 488E6202E6 for ; Tue, 16 Feb 2016 21:28:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60E74202BE for ; Tue, 16 Feb 2016 21:28:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756102AbcBPV20 (ORCPT ); Tue, 16 Feb 2016 16:28:26 -0500 Received: from mail-qk0-f171.google.com ([209.85.220.171]:36460 "EHLO mail-qk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755938AbcBPV2Z (ORCPT ); Tue, 16 Feb 2016 16:28:25 -0500 Received: by mail-qk0-f171.google.com with SMTP id s68so72262650qkh.3; Tue, 16 Feb 2016 13:28:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7dZkgN6wWgm/Bnyf0GVSnkocGxCsUxNBNyF08WPfRBQ=; b=RdqTkqhDcFpSepa9infVygE4cU51G6sk/JyRr/InQhM5yUdMhqEN4Oh9o72qNXLEAL bXkxfeqKQJaxsgMMY9KKGJiRYM+acf5et8j20rrO7Usf4iyDbZEZDyAmA42wbb/mQRx5 w6jxgKXAK80XzVUuVRcZ3K7htxZos08yce8Jh0jnpPxZofqxqRDLXTtq2c1+fOJlqZlb +qwChn4THTnrQvUPhDoAUrg1q8i8cpMe7JVMAvkHAhMSrLI5rMBtC51PApW0WHd2jITj zkF7UVxWb24QTMz+tE5L0kXXM1d/6Wer51xHaed8S8b2lI9QWFdfoYw8VAuGR3jpiyRl 3fAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7dZkgN6wWgm/Bnyf0GVSnkocGxCsUxNBNyF08WPfRBQ=; b=SvHZFNvynjVn6UGA9nzvoFvx3IJrqH5fAtQj70+G19kZMMsk7hYEvD9KeqTMdtPTZl egeWTIOKzQPt+AhS6IJVRTc88WLyM559VYBCVh34ZoZOjp+2BVEWHG5iRumutd6XFzGm MpZpZgpvahAcguBNlCUy18Nk9VN7C7muDb6W17v1UzHlH85H4ycuU1pliFWQ6zFvp7n2 A3aU7rlVT+pali0/O9Z3/f8WdgPtnAXsYVQhcYho8LvVfEfht9MQoKbGvuqwjlbx2jbc 5zqt/f8DJN3lYXQq28gaCkYj4sxE19D900UMxzb3m+za6UWHKHRhLU6udn0F4m8uZOnP GXYA== X-Gm-Message-State: AG10YOSsTdFcHU1Mfg//LvD+RRdZTzyw/ZDY3n+xWe+pnhymxViIZNt7/Ubcs5OqYa6Gsw== X-Received: by 10.55.78.84 with SMTP id c81mr30299379qkb.85.1455658104795; Tue, 16 Feb 2016 13:28:24 -0800 (PST) Received: from emphatic.nyc.corp.google.com ([2620:0:1003:1001:959f:ec08:cc43:2eeb]) by smtp.gmail.com with ESMTPSA id r6sm13901910qhr.28.2016.02.16.13.28.22 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 16 Feb 2016 13:28:24 -0800 (PST) Received: by emphatic.nyc.corp.google.com (sSMTP sendmail emulation); Tue, 16 Feb 2016 16:28:22 -0500 From: "Avery Pennarun" To: linux-wireless , ath9k-devel@vger.kernel.org, johannes@sipsolutions.net, nbd@nbd.name Cc: Avery Pennarun Subject: [PATCH] mac80211: debugfs var for the default aggregation timeout. Date: Tue, 16 Feb 2016 16:28:11 -0500 Message-Id: <1455658091-28262-2-git-send-email-apenwarr@gmail.com> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1455658091-28262-1-git-send-email-apenwarr@gmail.com> References: <1455658091-28262-1-git-send-email-apenwarr@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since around the beginning of time, ath9k aggregates have timed out after 5000 TU (around 5000ms) of inactivity, but nobody seems to be quite sure why, and this magic number seems to have migrated around from one place to another. An openbsd mailing list recently had a patch to disable the timeout completely, which they say matches some commercial routers: https://www.mail-archive.com/tech@openbsd.org/msg29456.html Even in Linux, several non-ath9k drivers default to no timeout already. I think changing it directly to zero would be safe, but to allow a more structured investigation, let's make it configurable for now. Signed-off-by: Avery Pennarun --- net/mac80211/debugfs_netdev.c | 4 ++++ net/mac80211/rc80211_minstrel_ht.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 37ea30e..5ae160b 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c @@ -715,6 +715,8 @@ static void add_mesh_config(struct ieee80211_sub_if_data *sdata) } #endif +u32 default_agg_timeout = 5000; + static void add_files(struct ieee80211_sub_if_data *sdata) { if (!sdata->vif.debugfs_dir) @@ -725,6 +727,8 @@ static void add_files(struct ieee80211_sub_if_data *sdata) DEBUGFS_ADD(txpower); DEBUGFS_ADD(user_power_level); DEBUGFS_ADD(ap_power_level); + debugfs_create_u32("default_agg_timeout", 0600, sdata->vif.debugfs_dir, + &default_agg_timeout); if (sdata->vif.type != NL80211_IFTYPE_MONITOR) add_common_files(sdata); diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 3928dbd..028d9d4 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -671,6 +671,8 @@ minstrel_downgrade_rate(struct minstrel_ht_sta *mi, u16 *idx, bool primary) } } +extern u32 default_agg_timeout; + static void minstrel_aggr_check(struct ieee80211_sta *pubsta, struct sk_buff *skb) { @@ -691,7 +693,7 @@ minstrel_aggr_check(struct ieee80211_sta *pubsta, struct sk_buff *skb) if (likely(sta->ampdu_mlme.tid_tx[tid])) return; - ieee80211_start_tx_ba_session(pubsta, tid, 5000); + ieee80211_start_tx_ba_session(pubsta, tid, default_agg_timeout); } static void