Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8470858ybl; Thu, 16 Jan 2020 17:30:42 -0800 (PST) X-Google-Smtp-Source: APXvYqxSskO6a+6FekP6i3uF9YKtIDxcMVpHuNFGPQ9L0Cr7L4vDrF1dczTdpW79nVzm4+A5cC1V X-Received: by 2002:a05:6830:1257:: with SMTP id s23mr4451475otp.241.1579224641660; Thu, 16 Jan 2020 17:30:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579224641; cv=none; d=google.com; s=arc-20160816; b=ZCzwMfvsgXNEm0CjvZvejBrDLPYckcthI8Fj6xhd+uKK0yhhWkKKGlUM/NPVeUcWBs GzE0aZVO2CwSx8U0UiHORFlGt5fLALgPmlJKDRfKZN+aIaZa1VFpVpLpSBFsnfwvvUNk HnBJtd5DzlY1Z1cI4RjBKalE7jWTbQCQTF0zWTP5EzV0Eqgcvxo8Q/puwnGGUSz8lPsh cxXY+djJQk429T/IdMdmruMtIGA2U+8+6j7OgyVCUuZf2konbYAhe6F/lMlAOdjbMwoZ Lh5nA9+MUpoSxnBlFke+zi53HcEosSrLdSM8SXnugVEaK9RLYAF+6OyH2gZziLyV1rtp gtFw== 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=di5YBn13/g+PIaCOnJYZ1lPlmYvURZuTz/Y9b4F+h2k=; b=S/lzjVyq47tUqtcsSVPIdURFe1pSCfuryVgwcPw7yspODjiysQPIWrDDcsaFrXCy/X kakSMIWQS3Zv8Z06KvFSBwlbsr1tiHNPEDrACdGH6ogNvEJpg1i0027yWYCHtynlDwfi EJ9SO1BU1oEaqVKflgZXPFSTyUwb+qYifoERy8g1ii/vaCUPufLFd//x1Ek6O693QywQ sXHXEyTgTRiSeUUGcySUMTHWup/YSL5qY1e6f4uWJ/HN2pma7xFcXxfP24USC1wtY2Qu L9pKHt95AzcRnhJRs+A9/ahNuq64jdYmK+rFRDDu90iqtdGOwv8hx1lzzJlym/oq8B1k FNWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FLRUTzX1; 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 h18si14703716otj.114.2020.01.16.17.30.30; Thu, 16 Jan 2020 17:30:41 -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=FLRUTzX1; 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 S2388662AbgAPX0W (ORCPT + 99 others); Thu, 16 Jan 2020 18:26:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:56110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730625AbgAPXZ7 (ORCPT ); Thu, 16 Jan 2020 18:25:59 -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 6D3152075B; Thu, 16 Jan 2020 23:25:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579217158; bh=RPnjgwJitvJ9WTJhiXRj+CfScZfy+WqaNZeXHqvhueI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FLRUTzX1+2xgdgmuBxhoaKoGplXW6wzklXu6l1PKnTxf8wLHRonFq33Nhq4o9cq90 azhkuTZ3PLDuIz6bHkZ+uC8N058FpoopdBo/jgLpgAAKZsICFTnjJkqU1wap73tdxS za9al0sCzZFXqgoHAXoKfKdFFS6h9erGG8p8dymA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mordechay Goodstein , Luca Coelho Subject: [PATCH 5.4 172/203] iwlwifi: mvm: consider ieee80211 station max amsdu value Date: Fri, 17 Jan 2020 00:18:09 +0100 Message-Id: <20200116231759.571800150@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200116231745.218684830@linuxfoundation.org> References: <20200116231745.218684830@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: Mordechay Goodstein commit ee4cce9b9d6421d037ffc002536b918fd7f4aff3 upstream. debugfs amsdu_len sets only the max_amsdu_len for ieee80211 station so take it into consideration while getting max amsdu Fixes: af2984e9e625 ("iwlwifi: mvm: add a debugfs entry to set a fixed size AMSDU for all TX packets") Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 8 +++++++- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c @@ -350,7 +350,13 @@ void iwl_mvm_tlc_update_notif(struct iwl u16 size = le32_to_cpu(notif->amsdu_size); int i; - if (WARN_ON(sta->max_amsdu_len < size)) + /* + * In debug sta->max_amsdu_len < size + * so also check with orig_amsdu_len which holds the original + * data before debugfs changed the value + */ + if (WARN_ON(sta->max_amsdu_len < size && + mvmsta->orig_amsdu_len < size)) goto out; mvmsta->amsdu_enabled = le32_to_cpu(notif->amsdu_enabled); --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -935,7 +935,12 @@ static int iwl_mvm_tx_tso(struct iwl_mvm !(mvmsta->amsdu_enabled & BIT(tid))) return iwl_mvm_tx_tso_segment(skb, 1, netdev_flags, mpdus_skb); - max_amsdu_len = iwl_mvm_max_amsdu_size(mvm, sta, tid); + /* + * Take the min of ieee80211 station and mvm station + */ + max_amsdu_len = + min_t(unsigned int, sta->max_amsdu_len, + iwl_mvm_max_amsdu_size(mvm, sta, tid)); /* * Limit A-MSDU in A-MPDU to 4095 bytes when VHT is not