Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5457818pxu; Tue, 22 Dec 2020 18:39:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJyfxe5+1dZ+7vpuCA836MBUBahTJjJfZNVgYC6dZlJUoyIhdjsWljciVHOp+GyooF5mN/Ls X-Received: by 2002:a17:906:f0d0:: with SMTP id dk16mr22069126ejb.144.1608691168442; Tue, 22 Dec 2020 18:39:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608691168; cv=none; d=google.com; s=arc-20160816; b=oh58jn02GhHGXxjgbFO4Md8RoFMqN+L9a8WZ1UVZUwXMeQBad18Wu/D9DLJ8FpY59b fy5n255+xxloGRD+Ds+l73qQIO714SS/JUIAmt4THXzXwyrptz15nf8e0iJ0Q6CynAjV BQvsHOb1InZ/RAon90uBCiDuA6Ldbu+Uidco9mnVRFsDtB3VWNCjlIggExKojY2AkhPw vhRgA02qsBTNnWVN0jRt/1C+cVneaxNwSOUjJu92Vdsgr5Kn5sidXonrfhFm0+Kki8nf fPzUuIb643tnywXOGz4UHoB/STbKpcw8Me5aL/3lCrgcQyCNotHbWesDS5fr9PrcNrkQ 5hTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7dJQof6Py5lhpFC2lAotybfjTDUU0g0P8wPjwJjJZ6k=; b=WA3h57VwkZmZQMhmmv9s0aLUnAXAEMaHhN1vvxIcKtyXfxjTaB+eytT6rKIdH2QQCd ZEJhEARfACuaPCmGefjhRhzpolNPXY1OrE96uJS94wbsNe0bLdNQ4u/fVCYFEMei5e9t +hMrqDhHdBLnI51MGErgySubnlDiIY+PFsPMvPzzvid3XPhuZtdtuxDPqBye0vgmfV5C Gq2ritCnfiFapZoHxQ0xbGqqMsGxdzoFayZqLf826RyPrtOKyIwWiyCE3YXqZChdf2Zw xMit9m0PLMGtev0UyY19exUKCs+ynSHLJd8+i+zliWG46J50QSxr65RER+xiNg9ckyaf 7aPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QXLPi+om; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r12si11365498ejs.382.2020.12.22.18.39.05; Tue, 22 Dec 2020 18:39:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QXLPi+om; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730633AbgLWChM (ORCPT + 99 others); Tue, 22 Dec 2020 21:37:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:50890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730205AbgLWCYZ (ORCPT ); Tue, 22 Dec 2020 21:24:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A71B225AA; Wed, 23 Dec 2020 02:24:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690247; bh=N1ax7JCrbT8ECzAEjM7JbNqVYqEL8lBu/fjipxZcYPg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QXLPi+omka+si35EBdNaeqeOwuyrhCXRFHLJ3tn4m1DWH9r4F1gCYQbQAwBshstpb m6JLOaGw4ETJIAjPYv4JbPMewRfpiJmfPPqDnBTHZLrp03lPNPXXeyZUS7BNPrQ2Yp Ko/7G110u/bX/HzBVgUTEBoBJo1EzdHB68T7rqRcj5R8Be95jR9QxcUzjJfulDmOqV OJU/h7QVNBxWIDBgkjZliM3sJ3zUqcRt93Y7jHFyR7yX+Qmw1TXuUjEwChlHOVo7OX BFoLfNY43KRoglIgDzabevVTqIXRPy+v46SPZe7SGe6fjv3qCkxYT5OfwFzeUX4XMo bo7TI4l0GsxZg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Avraham Stern , Luca Coelho , Johannes Berg , Sasha Levin , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 59/66] nl80211: always accept scan request with the duration set Date: Tue, 22 Dec 2020 21:22:45 -0500 Message-Id: <20201223022253.2793452-59-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223022253.2793452-1-sashal@kernel.org> References: <20201223022253.2793452-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Avraham Stern [ Upstream commit c837cbad40d949feaff86734d637c7602ae0b56b ] Accept a scan request with the duration set even if the driver does not support setting the scan dwell. The duration can be used as a hint to the driver, but the driver may use its internal logic for setting the scan dwell. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.9491a12f9226.Ia9c5b24fcefc5ce5592537507243391633a27e5f@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/wireless/nl80211.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 6bd4f6c8fc2ef..3b1be955b69e8 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -6859,12 +6859,6 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) } if (info->attrs[NL80211_ATTR_MEASUREMENT_DURATION]) { - if (!wiphy_ext_feature_isset(wiphy, - NL80211_EXT_FEATURE_SET_SCAN_DWELL)) { - err = -EOPNOTSUPP; - goto out_free; - } - request->duration = nla_get_u16(info->attrs[NL80211_ATTR_MEASUREMENT_DURATION]); request->duration_mandatory = -- 2.27.0