From patchwork Tue Aug 20 16:20:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 11104373 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F37CF1395 for ; Tue, 20 Aug 2019 16:20:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA0222339E for ; Tue, 20 Aug 2019 16:20:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566318045; bh=H5G6UKQkBFQgl0vJVDL8g573eISyQHuogp77cbpAZRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fVaB6JnJPizqvxFw89HSL9OUY8+lxRc9woA6jOqoyQWqgXd2VcM+MD/iUdtWT3OIH S86Ykzz6Bz1xRZUCLL77uqFY7dAC9tyO9IwNyt87F8oWi+IOajq9rMPkRKqNPkWRc5 75ikBl3dXntULbYb9Y65YFqD80d7FqkXZUc/1bms= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730497AbfHTQUp (ORCPT ); Tue, 20 Aug 2019 12:20:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:50008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726742AbfHTQUo (ORCPT ); Tue, 20 Aug 2019 12:20:44 -0400 Received: from localhost.localdomain (unknown [151.66.62.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1B68F22DD6; Tue, 20 Aug 2019 16:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566318044; bh=H5G6UKQkBFQgl0vJVDL8g573eISyQHuogp77cbpAZRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oU/CgOvGZgdyK609pDaMpCJtUUsTjVzqc8ZqgW8A/c4CaYJXSIZ451V27Q3vP0Wrc hL0sVKsSrD8eTdIOx0JK1y87hauAZipdll+4GfxvOtcEn0g844c4i+Mw6NBn6ZXyRQ d53cnfMwjh6ietjy+uuzs5wcIlq4MX5607WfzzqA= From: Lorenzo Bianconi To: kvalo@codeaurora.org Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org, koen.vandeputte@ncentric.com Subject: [PATCH 1/4] ath9k: dyanck: introduce ath_dynack_set_timeout routine Date: Tue, 20 Aug 2019 18:20:19 +0200 Message-Id: <4d64a2f91fcb8dbadaad8fef2e693abde47e6b5c.1566317488.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Introduce ath_dynack_set_timeout routine to configure slottime/ack/cts timeouts and remove duplicated code Tested-by: Koen Vandeputte Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/ath/ath9k/dynack.c | 37 ++++++++++++++----------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/dynack.c b/drivers/net/wireless/ath/ath9k/dynack.c index 1ccf20d8c160..c244dd15dce4 100644 --- a/drivers/net/wireless/ath/ath9k/dynack.c +++ b/drivers/net/wireless/ath/ath9k/dynack.c @@ -78,6 +78,24 @@ static inline bool ath_dynack_bssidmask(struct ath_hw *ah, const u8 *mac) return true; } +/** + * ath_dynack_set_timeout - configure timeouts/slottime registers + * @ah: ath hw + * @to: timeout value + * + */ +static void ath_dynack_set_timeout(struct ath_hw *ah, int to) +{ + struct ath_common *common = ath9k_hw_common(ah); + int slottime = (to - 3) / 2; + + ath_dbg(common, DYNACK, "ACK timeout %u slottime %u\n", + to, slottime); + ath9k_hw_setslottime(ah, slottime); + ath9k_hw_set_ack_timeout(ah, to); + ath9k_hw_set_cts_timeout(ah, to); +} + /** * ath_dynack_compute_ackto - compute ACK timeout as the maximum STA timeout * @ah: ath hw @@ -86,7 +104,6 @@ static inline bool ath_dynack_bssidmask(struct ath_hw *ah, const u8 *mac) */ static void ath_dynack_compute_ackto(struct ath_hw *ah) { - struct ath_common *common = ath9k_hw_common(ah); struct ath_dynack *da = &ah->dynack; struct ath_node *an; int to = 0; @@ -96,15 +113,8 @@ static void ath_dynack_compute_ackto(struct ath_hw *ah) to = an->ackto; if (to && da->ackto != to) { - u32 slottime; - - slottime = (to - 3) / 2; + ath_dynack_set_timeout(ah, to); da->ackto = to; - ath_dbg(common, DYNACK, "ACK timeout %u slottime %u\n", - da->ackto, slottime); - ath9k_hw_setslottime(ah, slottime); - ath9k_hw_set_ack_timeout(ah, da->ackto); - ath9k_hw_set_cts_timeout(ah, da->ackto); } } @@ -198,10 +208,7 @@ void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb, ieee80211_is_assoc_resp(hdr->frame_control) || ieee80211_is_auth(hdr->frame_control)) { ath_dbg(common, DYNACK, "late ack\n"); - - ath9k_hw_setslottime(ah, (LATEACK_TO - 3) / 2); - ath9k_hw_set_ack_timeout(ah, LATEACK_TO); - ath9k_hw_set_cts_timeout(ah, LATEACK_TO); + ath_dynack_set_timeout(ah, LATEACK_TO); if (sta) { struct ath_node *an; @@ -340,9 +347,7 @@ void ath_dynack_reset(struct ath_hw *ah) da->ack_rbf.h_rb = 0; /* init acktimeout */ - ath9k_hw_setslottime(ah, (ackto - 3) / 2); - ath9k_hw_set_ack_timeout(ah, ackto); - ath9k_hw_set_cts_timeout(ah, ackto); + ath_dynack_set_timeout(ah, ackto); } EXPORT_SYMBOL(ath_dynack_reset); From patchwork Tue Aug 20 16:20:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 11104375 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0913B14DB for ; Tue, 20 Aug 2019 16:20:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D24742332B for ; Tue, 20 Aug 2019 16:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566318047; bh=jSmhanjxopelC1YifYJft6uqU7jj/C7V9CPn+BZtfBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=mh6bT0LhVmpmxv39EieAV7LdZ3nUfp6YkLwFX332W4Ire+VDBwOtODsMkOKTLMwi5 p3wpgEla5x6aptINPEpu1TyWKLl9sam8hE1++EpJqLDt439wJgzrXA6LG0UuKDBqou Z7zWKUh8Nc5iR+C2NzhkW9HXcdbaV1ccTdqSgTLA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730503AbfHTQUr (ORCPT ); Tue, 20 Aug 2019 12:20:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:50080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726742AbfHTQUq (ORCPT ); Tue, 20 Aug 2019 12:20:46 -0400 Received: from localhost.localdomain (unknown [151.66.62.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 40FCA230F2; Tue, 20 Aug 2019 16:20:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566318046; bh=jSmhanjxopelC1YifYJft6uqU7jj/C7V9CPn+BZtfBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HftfuISYH6K+SUZ6oQQ8zb4JLQ81b0ZoIBivb+J0qh6jcGCUv3t8ravT14guqsd9P 1OqtSlJUK2TKZydE+38j4kwQNYk/JApi6SZ441UICE8ZolYu8UxNY2ZjTtML+PgfKA sAEo4VBh9Mmq2ouPsxiWaWpvm39/fvzoVF+Z1Wt0= From: Lorenzo Bianconi To: kvalo@codeaurora.org Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org, koen.vandeputte@ncentric.com Subject: [PATCH 2/4] ath9k: dynack: properly set last timeout timestamp in ath_dynack_reset Date: Tue, 20 Aug 2019 18:20:20 +0200 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Add compute timeout to last computation timestamp in ath_dynack_reset in order to not run ath_dynack_compute_ackto immediately Tested-by: Koen Vandeputte Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/ath/ath9k/dynack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/dynack.c b/drivers/net/wireless/ath/ath9k/dynack.c index c244dd15dce4..5d5809d160af 100644 --- a/drivers/net/wireless/ath/ath9k/dynack.c +++ b/drivers/net/wireless/ath/ath9k/dynack.c @@ -338,7 +338,7 @@ void ath_dynack_reset(struct ath_hw *ah) u32 ackto = 9 + 16 + 64; struct ath_dynack *da = &ah->dynack; - da->lto = jiffies; + da->lto = jiffies + COMPUTE_TO; da->ackto = ackto; da->st_rbf.t_rb = 0; From patchwork Tue Aug 20 16:20:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 11104377 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 20E0614DB for ; Tue, 20 Aug 2019 16:20:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F3F42230F2 for ; Tue, 20 Aug 2019 16:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566318051; bh=rtMaEpL3DsF69rbGUdKxql1MDB8UgDQpPK6Pemxe8mQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=YO+VI8mlqwVYqJERq5ta02o9ZiCekcK2thmEZ+hzA5/0KbNXGyrZ+d66p1dNpeiZj iKjLED7VyVirfBF7AoszWmnAneDNerqPTbnfrUS5XhytrIIsPOTRcj0MNx0TVE9cun 4patN6rSKQqi+t+GhIH5p1/5qjO+riVNVHBhwOVs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730507AbfHTQUu (ORCPT ); Tue, 20 Aug 2019 12:20:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:50138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726742AbfHTQUu (ORCPT ); Tue, 20 Aug 2019 12:20:50 -0400 Received: from localhost.localdomain (unknown [151.66.62.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E9F622DD6; Tue, 20 Aug 2019 16:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566318049; bh=rtMaEpL3DsF69rbGUdKxql1MDB8UgDQpPK6Pemxe8mQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yITAvVxST9/hnyXlU2yDpAhfE16MW5VfG9ajviDrhahKuPpxKJrUGdU01Mmxf3zs8 avMMig+7OeN4xVfagntyOfmDOHQSLqXHC5xqeFKKosKA/4kgG5BcmdHUMMn+dKUA5f m57dfVgcSTA+TniokJj6S7fcAOcwrifEDoZvEIcI= From: Lorenzo Bianconi To: kvalo@codeaurora.org Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org, koen.vandeputte@ncentric.com Subject: [PATCH 3/4] ath9k: dynack: set max timeout according to channel width Date: Tue, 20 Aug 2019 18:20:21 +0200 Message-Id: <164ef3b0ab907b67fecfaf966ea833973da39f07.1566317488.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Compute maximum configurable ackimeout/ctstimeout according to channel width (clockrate) Tested-by: Koen Vandeputte Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/ath/ath9k/dynack.c | 38 +++++++++++++++++++------ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/dynack.c b/drivers/net/wireless/ath/ath9k/dynack.c index 5d5809d160af..f5acaa577d62 100644 --- a/drivers/net/wireless/ath/ath9k/dynack.c +++ b/drivers/net/wireless/ath/ath9k/dynack.c @@ -20,11 +20,30 @@ #define COMPUTE_TO (5 * HZ) #define LATEACK_DELAY (10 * HZ) -#define LATEACK_TO 256 -#define MAX_DELAY 300 #define EWMA_LEVEL 96 #define EWMA_DIV 128 +/** + * ath_dynack_get_max_to - set max timeout according to channel width + * @ah: ath hw + * + */ +static u32 ath_dynack_get_max_to(struct ath_hw *ah) +{ + const struct ath9k_channel *chan = ah->curchan; + + if (!chan) + return 300; + + if (IS_CHAN_HT40(chan)) + return 300; + if (IS_CHAN_HALF_RATE(chan)) + return 750; + if (IS_CHAN_QUARTER_RATE(chan)) + return 1500; + return 600; +} + /** * ath_dynack_ewma - EWMA (Exponentially Weighted Moving Average) calculation * @@ -126,15 +145,16 @@ static void ath_dynack_compute_ackto(struct ath_hw *ah) */ static void ath_dynack_compute_to(struct ath_hw *ah) { - u32 ackto, ack_ts; - u8 *dst, *src; + struct ath_dynack *da = &ah->dynack; + u32 ackto, ack_ts, max_to; struct ieee80211_sta *sta; - struct ath_node *an; struct ts_info *st_ts; - struct ath_dynack *da = &ah->dynack; + struct ath_node *an; + u8 *dst, *src; rcu_read_lock(); + max_to = ath_dynack_get_max_to(ah); while (da->st_rbf.h_rb != da->st_rbf.t_rb && da->ack_rbf.h_rb != da->ack_rbf.t_rb) { ack_ts = da->ack_rbf.tstamp[da->ack_rbf.h_rb]; @@ -150,7 +170,7 @@ static void ath_dynack_compute_to(struct ath_hw *ah) if (ack_ts > st_ts->tstamp + st_ts->dur) { ackto = ack_ts - st_ts->tstamp - st_ts->dur; - if (ackto < MAX_DELAY) { + if (ackto < max_to) { sta = ieee80211_find_sta_by_ifaddr(ah->hw, dst, src); if (sta) { @@ -207,8 +227,10 @@ void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb, if (ieee80211_is_assoc_req(hdr->frame_control) || ieee80211_is_assoc_resp(hdr->frame_control) || ieee80211_is_auth(hdr->frame_control)) { + u32 max_to = ath_dynack_get_max_to(ah); + ath_dbg(common, DYNACK, "late ack\n"); - ath_dynack_set_timeout(ah, LATEACK_TO); + ath_dynack_set_timeout(ah, max_to); if (sta) { struct ath_node *an; From patchwork Tue Aug 20 16:20:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 11104379 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30D331395 for ; Tue, 20 Aug 2019 16:20:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0EA82230F2 for ; Tue, 20 Aug 2019 16:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566318054; bh=tXKYT723szjHBi1g/o3QzxNt71lwc6D06BrdlXFob9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=J4heydevRoRRUyg9PHJAmZHLcL+nc8ajBztTQpoVx5diAjLj8+Z/TZBoED8syTvfY zIJ+hdHSGS5AHNEGU2cXyAR//6DwrTYL5L3LQsf1krrHXgRrjwZOLZWcJ+ccgCDzU6 AL+45zKtUrCI3Z6DB1xfwtrovDtge7APSpBxeTvM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730515AbfHTQUx (ORCPT ); Tue, 20 Aug 2019 12:20:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:50198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726742AbfHTQUx (ORCPT ); Tue, 20 Aug 2019 12:20:53 -0400 Received: from localhost.localdomain (unknown [151.66.62.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4BB1022DD6; Tue, 20 Aug 2019 16:20:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566318052; bh=tXKYT723szjHBi1g/o3QzxNt71lwc6D06BrdlXFob9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zaPRUuok7ljOdwyblon0pAdC0VSJ7ZKO87ixeOrL39zvBTuzhsah2LaJ2NHdF6BQb EuqUmJgB1/ke/tRGb5fe3p0bgWlIqRwpIhf7bPN4g9mmuLlHygNd8EVA94mjdYwcaB ivgBlHXUnGs0CtRmIB6kX24GKaU/JoDjfBkZIupg= From: Lorenzo Bianconi To: kvalo@codeaurora.org Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org, koen.vandeputte@ncentric.com Subject: [PATCH 4/4] ath9k: dynack: set ackto to max timeout in ath_dynack_reset Date: Tue, 20 Aug 2019 18:20:22 +0200 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Initialize acktimeout to the maximum configurable value in ath_dynack_reset in order to not disconnect long distance static links enabling dynack and even to take care of possible errors configuring a static timeout. Moreover initialize station timeout value to the current acktimeout value Tested-by: Koen Vandeputte Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/ath/ath9k/dynack.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/dynack.c b/drivers/net/wireless/ath/ath9k/dynack.c index f5acaa577d62..fbeb4a739d32 100644 --- a/drivers/net/wireless/ath/ath9k/dynack.c +++ b/drivers/net/wireless/ath/ath9k/dynack.c @@ -321,11 +321,9 @@ EXPORT_SYMBOL(ath_dynack_sample_ack_ts); */ void ath_dynack_node_init(struct ath_hw *ah, struct ath_node *an) { - /* ackto = slottime + sifs + air delay */ - u32 ackto = 9 + 16 + 64; struct ath_dynack *da = &ah->dynack; - an->ackto = ackto; + an->ackto = da->ackto; spin_lock_bh(&da->qlock); list_add_tail(&an->list, &da->nodes); @@ -356,20 +354,26 @@ EXPORT_SYMBOL(ath_dynack_node_deinit); */ void ath_dynack_reset(struct ath_hw *ah) { - /* ackto = slottime + sifs + air delay */ - u32 ackto = 9 + 16 + 64; struct ath_dynack *da = &ah->dynack; + struct ath_node *an; + + spin_lock_bh(&da->qlock); da->lto = jiffies + COMPUTE_TO; - da->ackto = ackto; da->st_rbf.t_rb = 0; da->st_rbf.h_rb = 0; da->ack_rbf.t_rb = 0; da->ack_rbf.h_rb = 0; + da->ackto = ath_dynack_get_max_to(ah); + list_for_each_entry(an, &da->nodes, list) + an->ackto = da->ackto; + /* init acktimeout */ - ath_dynack_set_timeout(ah, ackto); + ath_dynack_set_timeout(ah, da->ackto); + + spin_unlock_bh(&da->qlock); } EXPORT_SYMBOL(ath_dynack_reset); @@ -386,6 +390,8 @@ void ath_dynack_init(struct ath_hw *ah) spin_lock_init(&da->qlock); INIT_LIST_HEAD(&da->nodes); + /* ackto = slottime + sifs + air delay */ + da->ackto = 9 + 16 + 64; ah->hw->wiphy->features |= NL80211_FEATURE_ACKTO_ESTIMATION; }