Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3701306imm; Mon, 18 Jun 2018 02:34:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK081+bZQXLNygb5WESB+K4HeF/Vm895Y8zS64xBEpbElIHffP6rQwKcjFwcCpST84KlMvF X-Received: by 2002:a17:902:8347:: with SMTP id z7-v6mr13491495pln.290.1529314488877; Mon, 18 Jun 2018 02:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529314488; cv=none; d=google.com; s=arc-20160816; b=f2//pubJEtNytzU5AjmK3DCEXUJiPDe5VEDuOA1I0c+3rczG3Kc7lzfaRPrNLH3dJ4 +iAlJID4/r95l6H6Mm+SniAA7nbzaeKbaa0uigFsn6g16Ya0ZASpDTobF9cYKqdxhueC rHsj2m/WcPtaVVQl3rE3IqvF4BxzyrsyGKyAfAYANs8rbZp2Ja9H+EQteYZZNf4slVRP gOjDaVyV81u8eNK6v7+g1KZsXIZY+eNo+9tXpciN0WoMY5hGbc7HVGsH4wABLMpc7OwP dFz8egUPFRmi/VMnnttlAG6NOqjMF0EZNGoMM5Wq8I/uw+cgTrTamP0afSE16utaWvhZ 7FyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Fb9iBAsH6kmENGjY46dqqZSUR8kdkNUPabX6+rGk/L4=; b=lvcjk+nACkl3FZwS0W+FLfI4V9UOmiofBCIpsYxe0zG3/9IHqdFVEVgu0TV6GHiQ73 MMuyoCmRY7Y0Ek4l1Mi4IhTlLqvcKodef1vD8YvkESOJIvmrMdNEe/HxK6Eq2BK2u24r z3fqe7ZSXSIxrUuwEb0kmfz0v3FfSf6gI3y9NhF8hFICCQUmTVfGLLFx0Kgf6nWn6ALG HtoYRHL4VVT/hq/YTWh299R942uz5TAmf+K2wHwCSOKnv0hApPNHf5JYSOoljcs69KuR 5f7X534eePBHBlJsBNmPKJdlyd/5gUltkDC1LPEC0Wn6qROaBqA7AeSmlI50xLvuEL7B Vd7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 m20-v6si13766603pff.301.2018.06.18.02.34.35; Mon, 18 Jun 2018 02:34:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936365AbeFRJcr (ORCPT + 99 others); Mon, 18 Jun 2018 05:32:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56074 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936155AbeFRIYk (ORCPT ); Mon, 18 Jun 2018 04:24:40 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 72CECBAD; Mon, 18 Jun 2018 08:24:39 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sara Sharon , Luca Coelho , Johannes Berg , Sasha Levin Subject: [PATCH 4.16 200/279] mac80211: use timeout from the AddBA response instead of the request Date: Mon, 18 Jun 2018 10:13:05 +0200 Message-Id: <20180618080617.183822856@linuxfoundation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618080608.851973560@linuxfoundation.org> References: <20180618080608.851973560@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sara Sharon [ Upstream commit 914eac248d876f9c00cd1792ffec3d182c863f13 ] 2016 spec, section 10.24.2 specifies that the block ack timeout in the ADD BA request is advisory. That means we should check the value in the response and act upon it (same as buffer size). Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/mac80211/agg-tx.c | 4 ++++ net/mac80211/tx.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c @@ -8,6 +8,7 @@ * Copyright 2007, Michael Wu * Copyright 2007-2010, Intel Corporation * Copyright(c) 2015-2017 Intel Deutschland GmbH + * Copyright (C) 2018 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -970,6 +971,9 @@ void ieee80211_process_addba_resp(struct sta->ampdu_mlme.addba_req_num[tid] = 0; + tid_tx->timeout = + le16_to_cpu(mgmt->u.action.u.addba_resp.timeout); + if (tid_tx->timeout) { mod_timer(&tid_tx->session_timer, TU_TO_EXP_TIME(tid_tx->timeout)); --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -4,6 +4,7 @@ * Copyright 2006-2007 Jiri Benc * Copyright 2007 Johannes Berg * Copyright 2013-2014 Intel Mobile Communications GmbH + * Copyright (C) 2018 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -1138,7 +1139,7 @@ static bool ieee80211_tx_prep_agg(struct } /* reset session timer */ - if (reset_agg_timer && tid_tx->timeout) + if (reset_agg_timer) tid_tx->last_tx = jiffies; return queued;