Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp982349pxb; Fri, 13 Nov 2020 00:37:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzUR+naJ28Z6Gt41GEaZvc2nG1qvE36Bcv61tPwZpqGvTL9Q/UTu6yQXHVH48u4IQnW+HK X-Received: by 2002:a17:906:4e90:: with SMTP id v16mr915019eju.477.1605256676744; Fri, 13 Nov 2020 00:37:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605256676; cv=none; d=google.com; s=arc-20160816; b=QI1JfBpm15YEnyFeny9BTjgLQZitokB7+eRy3Hk2QE/Ewv1pYxn0/6mbJTQyKDRQtA O86LE/RW6nSaybe+185qJq7pdVb7uBNFiC2UtW/owScI/i9bGxqUFY816KLzUxfl42Wz 4YCAxwmWER8mhSjvcAxGXu0thjesYatrWUfuC+ugzzYUfan5WKblhKvdYGCXVEcBZAtu Z6TwXVzoK3ra8P78Lb/Q3LggSHxKOykmcYCw7XcVGtXMRD207Fc6KCB9FeJUMrhSOLoR eMXm76g7U+AvoUo/64LHuQWeJgPZXbDEcSWHW5MIXmHH5miAEbfWg66xIgvX6xfV7br9 tRAg== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=orvSpIhmCErvrSoR8zqMCoaR6a0NpO7DH6hv0/iUdRs=; b=QnyVVF7m1s6g3ycmtk7H31653JzN1fXM3GKhh8Ls0Ump+Crz8W9UtkeMHaT22Vj1q9 QRgxTzgSt8b/KBJwx7lP1tIPqYAv64Cel328aBPN06JwK79+1Zg5F/ZLM2l9qzsvz7Gc ST579EJG53++P695dBlcqarNuWLkIe8GmZhphdyxiW3bYvT1vTkexdaZ6uHCqDK+uHal mOsu9tkNPtNo8/srQKFfrJky7DXIk+xQpDlAv1x6pESpDR3auKlLqU+Pl6XnMHfRv4jY eV2ST/FU7GPjqBQ8oiZoG1T57uoGnMURnxutCm28En/xJdwnlxpvMselmr8vdkKjUG/f Mv6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id wr19si5488356ejb.218.2020.11.13.00.37.32; Fri, 13 Nov 2020 00:37:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726293AbgKMIgD (ORCPT + 99 others); Fri, 13 Nov 2020 03:36:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726181AbgKMIgD (ORCPT ); Fri, 13 Nov 2020 03:36:03 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C951C0613D1; Fri, 13 Nov 2020 00:36:03 -0800 (PST) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kdUYo-006q7y-OT; Fri, 13 Nov 2020 09:35:58 +0100 Message-ID: <0e60e4cdc036a5ef7394848d212a6e3f499c386f.camel@sipsolutions.net> Subject: Re: [PATCH v2] mac80211: reject/clear user rate mask if not usable From: Johannes Berg To: Wen Gong Cc: Arend Van Spriel , linux-wireless@vger.kernel.org, kirtika@google.com, linux-wireless-owner@vger.kernel.org, ath11k@lists.infradead.org, ath10k@lists.infradead.org Date: Fri, 13 Nov 2020 09:35:57 +0100 In-Reply-To: <30e2e578983e4df447e0c26c5bba0aba@codeaurora.org> References: <20170308132022.4216-1-johannes@sipsolutions.net> <07179008e9369bc81e152009ca85191d@codeaurora.org> <5decc452-7b2a-db1d-c5eb-04ab6bb61553@broadcom.com> <4b8f37fde23262547edb6ed4635cf89b@codeaurora.org> <83dd20def685d303106f285400367b6e@codeaurora.org> <798cea679ae1df5a2ab9b59dd81c8e2b3ca2d6e3.camel@sipsolutions.net> <30e2e578983e4df447e0c26c5bba0aba@codeaurora.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, 2020-11-13 at 16:35 +0800, Wen Gong wrote: > > > I guess if we really want to redefine the user rate mask to not apply > > to > > control frames, then we can relax this? > > > Yes, for AP mode, it is hard to calculate the usable rates over all > stations. > But for STATION mode, it can set 54M because AP support it, so it should > not reject it. > If add a check for nl80211_iftype of ieee80211_vif in > ieee80211_set_bitrate_mask, it can > solve this like this: > if (sdata->vif.type != NL80211_IFTYPE_STATION && > !(mask->control[band].legacy & basic_rates)) That would forgo the check completely - we'd still need to check against the *supported* rates. johannes