Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp574331imu; Thu, 20 Dec 2018 01:38:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/WOGEsljTFPWssShbGawBvgKxRQ6u/5KohCOsb3eMC87U9yibiQzbeC98vGzN6FO6qP1+Pc X-Received: by 2002:a17:902:31a4:: with SMTP id x33mr23001467plb.41.1545298726563; Thu, 20 Dec 2018 01:38:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545298726; cv=none; d=google.com; s=arc-20160816; b=m27LxaaL060Kmf3RBRMRqaTfS2DKnjO0/sSBcoeOWfQxtQLqpO50lvEDIbjnb3JIKO QjKp30Tay6RzdjpbzAGO+pxNBjko/9n7uQiIlSWC+ITmN7tI+L/dvCsg3R2VSELPEpIP +UwRn4mI4TMM34Cbt+6T7AFGk/A+7v6Zt6wV0KopUgw/s8ud2gLtHTVs0q98ntfTQSuy HPxpfpVw0R30ynWpjLzeNQPDnxn6Jca66kUTnB5igFV3QZgls/Ngzwe0myq6V0uhBc+c PEPKQBBeIZ0OOg/+/ibkYXAHool89mbhWRbKhyiyFav0z/7ocirioF5V4RaKs1rdP6z9 W0WA== 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=rWneBFXRw17sXbCczZ03GL30qmpuSmLrYFlrAzs77As=; b=Lu0CEdrQgti9AOq+qwawyHaBcFvfRMkLb9eOQaTv3KnqAQesnogd1nsfkpfyCVhDMZ YFiCk5qbLcDdACLx2IpP8aAisUB6D+GD86DNsUKzsdciISca5g/SuzDHRYsY+FqrhbWb 13+4lKX/+lrpK7u9m+ruyGTJdSvV5HDiUvqtXmjXo3DKMI9THn5K3WQdsK79Y5Py0nXA wESB2FKgqo/qYTgvVLXWaTiQU5ACV0Hh/47JyEF+UoVIckRXS9Jxyv4sBE9y/MohYjpg htXrXmpcKQzlWI7eqTDplEWIstjiQsesaT77BS/2giA6cHYen+J2qKtAP3st+hoC61a1 E/mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=svBNrrfm; 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 h5si1128659plk.373.2018.12.20.01.38.31; Thu, 20 Dec 2018 01:38:46 -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=svBNrrfm; 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 S1733249AbeLTJf5 (ORCPT + 99 others); Thu, 20 Dec 2018 04:35:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:44498 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732493AbeLTJ2O (ORCPT ); Thu, 20 Dec 2018 04:28:14 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 9ACA820989; Thu, 20 Dec 2018 09:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545298094; bh=ZDXLPp1gKbg1CL0oZyECXa6dz7tamLfLAG4hafAiul8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=svBNrrfmXxXsfqAEZAoSGsnDrbCKioM6G4nuAsljA64RIksgUrBHlZFARax19PaKg IpQcZ8xAsOwbHYUvggrxNZ/kMH5QC5sjraNQT14MJRY/xkPg4uHzYEd67auv7DERk0 hUWoIn+J8o4OFXEp5vECHyn6ywIkTyGzzyY0uK/0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Emmanuel Grumbach , Johannes Berg , Sasha Levin Subject: [PATCH 4.14 32/72] mac80211: dont WARN on bad WMM parameters from buggy APs Date: Thu, 20 Dec 2018 10:18:31 +0100 Message-Id: <20181220085923.610889624@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181220085922.332225035@linuxfoundation.org> References: <20181220085922.332225035@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit c470bdc1aaf36669e04ba65faf1092b2d1c6cabe ] Apparently, some APs are buggy enough to send a zeroed WMM IE. Don't WARN on this since this is not caused by a bug on the client's system. This aligns the condition of the WARNING in drv_conf_tx with the validity check in ieee80211_sta_wmm_params. We will now pick the default values whenever we get a zeroed WMM IE. This has been reported here: https://bugzilla.kernel.org/show_bug.cgi?id=199161 Fixes: f409079bb678 ("mac80211: sanity check CW_min/CW_max towards driver") Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/mlme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 328ac10084e4..75909a744121 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1861,7 +1861,8 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local, params[ac].acm = acm; params[ac].uapsd = uapsd; - if (params[ac].cw_min > params[ac].cw_max) { + if (params->cw_min == 0 || + params[ac].cw_min > params[ac].cw_max) { sdata_info(sdata, "AP has invalid WMM params (CWmin/max=%d/%d for ACI %d), using defaults\n", params[ac].cw_min, params[ac].cw_max, aci); -- 2.19.1