Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp246841ybl; Thu, 22 Aug 2019 23:47:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqz98CT7UOxRUuvvk5kk+05vNeH/3vB5EYcZNjLzDA9aLgmdUwgB5hIWBbOJPLotN2e6VeD7 X-Received: by 2002:a17:902:aa91:: with SMTP id d17mr2909113plr.74.1566542837442; Thu, 22 Aug 2019 23:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566542837; cv=none; d=google.com; s=arc-20160816; b=vUqUrxi20VnFu9UiDi+9myj64i+oQ73xqPIpFOi0pHFOgVi5ENq0huc65kraxv8Fqx YZIn9Cqal7ypUs9JZKUJ14/MIQN9FkQCy8lu2gLqgh2qO9jPlk4VojR9zJ8uMeFthPds Tn2DGwn5rr7RRIaIGVTs899xJEKeE3+QOAX06mMgOvACK3OvJwmaqs78kfyj4Cw+OPlz yGkghd1mCHNOVKGjgVGI+LmOfF27ot0atxuP7RfGJu2ySSTaLBgQKtk4ntU9hd0mk0id Gcy7wuaD6cpe/fbg9AexgABzTRc5YYH/BhG9ITZEsrEbee65IYeH0mnphFDjc/q1uKhq 0O5Q== 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=v0Kq2LM1LgPAWesMKoef02E6cufxfMmhU9x8f7kO8yY=; b=DOWWUbT8o/Hy0GcZx5QxkqqMk6xuvyvJO4nWU9ioISInQ2n8RA49ktzkk0giQOraSa n85KdAGwuF+5GzQtmIbADEF34yN8XKAVZq+RFTfgAMq8e3b1qYfBN9GR/79UKIC/14wy YOtJULXFcmKsovLfb+v0NUnthIb7w48Qcnx12fDjqf30r3AMcW4Ti9sBSLtWIFQfaQPs zc1/SWbwAmEsoMhvv9pAKPUKRfLoYdtebYEUUI1Fbpgttkm91mFGLwAjYfZHsfVotye9 1bGRzhgSF1m+zRh2IcuOP4y7GQ9l4YaLZNcd1j0p7jFrQcP8SAghUZiLY3UiqjCLSGh1 5VnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=snr1uwJe; 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 t6si1543875pjv.81.2019.08.22.23.47.01; Thu, 22 Aug 2019 23:47:17 -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; dkim=pass header.i=@kernel.org header.s=default header.b=snr1uwJe; 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 S2392869AbfHVRos (ORCPT + 99 others); Thu, 22 Aug 2019 13:44:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:42712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403868AbfHVRXO (ORCPT ); Thu, 22 Aug 2019 13:23:14 -0400 Received: from localhost (wsip-184-188-36-2.sd.sd.cox.net [184.188.36.2]) (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 D22AA23402; Thu, 22 Aug 2019 17:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566494594; bh=/Ff2BB1YQa4gCwavzBkOv5LyIublasKxglhj1JWbgpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=snr1uwJevNPGt6RNCSvu12+eUwLgFKXWJ5y84n4deiAyWw0C9jSm5eCGrSMVhsquq uNxIU88uFMrG0fH7FVySGsDlWsKP2kvN09UeAjNedHkw82qtDs9yjlMarLOg/Hbb6g B+IXZink6pi1oqyRuNEkO29pALvafzXzxOOtICyY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brian Norris , Johannes Berg , Sasha Levin Subject: [PATCH 4.9 014/103] mac80211: dont warn about CW params when not using them Date: Thu, 22 Aug 2019 10:18:02 -0700 Message-Id: <20190822171729.429243453@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190822171728.445189830@linuxfoundation.org> References: <20190822171728.445189830@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 [ Upstream commit d2b3fe42bc629c2d4002f652b3abdfb2e72991c7 ] ieee80211_set_wmm_default() normally sets up the initial CW min/max for each queue, except that it skips doing this if the driver doesn't support ->conf_tx. We still end up calling drv_conf_tx() in some cases (e.g., ieee80211_reconfig()), which also still won't do anything useful...except it complains here about the invalid CW parameters. Let's just skip the WARN if we weren't going to do anything useful with the parameters. Signed-off-by: Brian Norris Link: https://lore.kernel.org/r/20190718015712.197499-1-briannorris@chromium.org Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/driver-ops.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c index bb886e7db47f1..f783d1377d9a8 100644 --- a/net/mac80211/driver-ops.c +++ b/net/mac80211/driver-ops.c @@ -169,11 +169,16 @@ int drv_conf_tx(struct ieee80211_local *local, if (!check_sdata_in_driver(sdata)) return -EIO; - if (WARN_ONCE(params->cw_min == 0 || - params->cw_min > params->cw_max, - "%s: invalid CW_min/CW_max: %d/%d\n", - sdata->name, params->cw_min, params->cw_max)) + if (params->cw_min == 0 || params->cw_min > params->cw_max) { + /* + * If we can't configure hardware anyway, don't warn. We may + * never have initialized the CW parameters. + */ + WARN_ONCE(local->ops->conf_tx, + "%s: invalid CW_min/CW_max: %d/%d\n", + sdata->name, params->cw_min, params->cw_max); return -EINVAL; + } trace_drv_conf_tx(local, sdata, ac, params); if (local->ops->conf_tx) -- 2.20.1