Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp458729ybl; Tue, 28 Jan 2020 06:18:00 -0800 (PST) X-Google-Smtp-Source: APXvYqwJs35BB6WAsRYcJiS+zFzGZW8SobXdZUwzSZWh301y1H0vJydJqpjEaOZVBd+ji32x/y2Y X-Received: by 2002:a05:6830:1e37:: with SMTP id t23mr16958716otr.16.1580221080388; Tue, 28 Jan 2020 06:18:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580221080; cv=none; d=google.com; s=arc-20160816; b=gZdafkKhey/YY8B5HFb/pCIClfTwPRg+WLbEYgY2O/aLsXQ18ck0EI9XCGnJ6egFLS CJk1D2kdNNpZjuT+G0WxQDR9eiEG+LnFcxsTS6OCQBZj+s/Uw1NTflmiFI+GmuHO4evZ DqPwfQjylHIjMHz+5YjNRDi4YcCwxgWP6fV+kB5t6PA4zEF/MZpHk2TXrJ0YS4PymJEW mbnWo/Dgqg7UfAHOhuCKwmuqofSc7S4Tza2ottYbAhgKlCW7lVfEENidiBAHG776J5xx +oqyzdnVlQsONXOkkBDkTTsuM75B9pzydO95ea5gmqG9og2MdOnEb+rWFR26l/gjpLtJ AyRg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RHHnun0muvq3fsHlc8LenZc0rB+tOOOK34vFqZPaDQM=; b=JSj2MpnFGF/PNYEWL/Nm92tvsThS+QqkKVv5lSS+D2rBNGpY7tQWquu4k0zITEI/h3 CrfMyzOtYy+L198QiCuwV+x/oVraOB7zdW1SJBYnltAgZFmL/tn52T0QN20p14s0vxHm ADix9wq4CiywBaL+2Rj7SMp7VEXjfL7ieCTo4rvc/2Kolr7HPPInyy3rGPvCkMNVQ5Uw R1+0ein1iJTuklr5EOe5W7lAnwSCUP+5v9cQawWysND9Ol2iwk3xhxFHG44AlTImFgVk y90cK36urb2mZrnz8KGy41LpZMJLavtJhlDtBqfU+B9kSx/k0LHzEsJOX/En+JtLjPaO H4kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SOWFNrBY; 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 i9si9132673otp.139.2020.01.28.06.17.44; Tue, 28 Jan 2020 06:18:00 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=SOWFNrBY; 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 S1730133AbgA1OQo (ORCPT + 99 others); Tue, 28 Jan 2020 09:16:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:40202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730361AbgA1OQn (ORCPT ); Tue, 28 Jan 2020 09:16:43 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 4383721739; Tue, 28 Jan 2020 14:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221002; bh=Bz2SxhI9AvOcXcwpMJHZtAiOnFwkbSoPB1FXw8dmQtg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SOWFNrBYY4p8mbYhVSZSdwjGQgPk/iVQ+nACbPMdkQkuHEenECCWry6CWm152FySe 76+pV9AFWU3ApnZ29ChmY8JF0DAuka32psktWAJjMtKimGEz06wcE59z5LdweAgoIg AZbUbBzmzJgZion++XrnYaV9B6BW15ghfVVPFsNQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Danny Alexander , Johannes Berg , Luca Coelho , Sasha Levin Subject: [PATCH 4.9 049/271] iwlwifi: mvm: fix A-MPDU reference assignment Date: Tue, 28 Jan 2020 15:03:18 +0100 Message-Id: <20200128135856.288817924@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg [ Upstream commit 1f7698abedeeb3fef3cbcf78e16f925df675a179 ] The current code assigns the reference, and then goes to increment it if the toggle bit has changed. That way, we get Toggle 0 0 0 0 1 1 1 1 ID 1 1 1 1 1 2 2 2 Fix that by assigning the post-toggle ID to get Toggle 0 0 0 0 1 1 1 1 ID 1 1 1 1 2 2 2 2 Reported-by: Danny Alexander Signed-off-by: Johannes Berg Fixes: fbe4112791b8 ("iwlwifi: mvm: update mpdu metadata API") Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index c2bbc8c17beb9..bc06d87a0106c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -810,12 +810,12 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, bool toggle_bit = phy_info & IWL_RX_MPDU_PHY_AMPDU_TOGGLE; rx_status->flag |= RX_FLAG_AMPDU_DETAILS; - rx_status->ampdu_reference = mvm->ampdu_ref; /* toggle is switched whenever new aggregation starts */ if (toggle_bit != mvm->ampdu_toggle) { mvm->ampdu_ref++; mvm->ampdu_toggle = toggle_bit; } + rx_status->ampdu_reference = mvm->ampdu_ref; } rcu_read_lock(); -- 2.20.1