Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp973641pxb; Fri, 13 Nov 2020 00:18:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPV9Eotcie5Os4j+9U/1uwjfWdrbxzRsY4EVTr1ysVwGFmkUDlDumwf6wk0Bb25aiiGzAv X-Received: by 2002:a17:906:1390:: with SMTP id f16mr893778ejc.504.1605255489436; Fri, 13 Nov 2020 00:18:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605255489; cv=none; d=google.com; s=arc-20160816; b=GoF/1tDINaEUgbsXpRptDtveoEsdxOxVBIqU/uGyO4iZgZxwWi3qvFE7erpJ6SBf2x B/2cE56fpPuqWV+UyIiA7TwTjlkclLeV0EedyIb02O7mx7Y0LBDgeRDqWjSwHi+xWk/g 8/emqolnosjc/fIkKuTVwuJOycVofQQH73AVPlOHPsz1JGon0yE00Px4r96X+fSVpGio 1hCZ67s5Ixr2hbNPunjD8/hg31bH8ouCFhACsHSDQ7bP2mcpjCuPHn8iJf90uzOVQUC9 RABsyrgErj9/OWUAx44Vla/33Em00d0DaS9ikiTAqimXtOn2lAesFZ7m2F7qeCg86sH1 JhCw== 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=j/B48YIN5aBxI3YNiA6JEn0Blg7He1y+zdfLPngKagE=; b=qRk+nODmM6xnYkJNZXb5Q97dBdS6Tbs2iBCMGu8T8m7loqR9JP4THEwz5Va0K1Mqqf u0XUC6WdKaBW2tsRjWAeret3puxNbXw69uLvDOfFaa88PYYNka1l+wG/dhOoGipyc+tv vxBUidPyukBWSEawjDVUcdSgpAssV4RYgTNlOm6tcDUVvgyah8WHyC4EiffodquTogDD N/FpBC0OJl1QQMTMRR/feFbtAmQklNCje4S7oVJb9C8ILFtqg9gybyaXAV/UWiPR9QzY zBQTik0svV3Lsy5MfHhFyFvBR0Y3M1CdnJ8JpYHuZIwV4Uug63qfzRfA4TiHGIYqCwK4 EgWA== 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 a1si5177712ejt.206.2020.11.13.00.17.35; Fri, 13 Nov 2020 00:18:09 -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 S1726295AbgKMIQy (ORCPT + 99 others); Fri, 13 Nov 2020 03:16:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbgKMIQy (ORCPT ); Fri, 13 Nov 2020 03:16:54 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B35DC0613D1; Fri, 13 Nov 2020 00:16:54 -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 1kdUGI-006pgI-UN; Fri, 13 Nov 2020 09:16:51 +0100 Message-ID: <798cea679ae1df5a2ab9b59dd81c8e2b3ca2d6e3.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:16:50 +0100 In-Reply-To: <83dd20def685d303106f285400367b6e@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> 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:14 +0800, Wen Gong wrote: > On 2020-11-13 15:38, Johannes Berg wrote: > > On Fri, 2020-11-13 at 10:08 +0800, Wen Gong wrote: > > > > Which was the intent of this change, wasn't it? > > > > Indeed. Permitting this leads to warnings later. > > > > > We need to set the tx rate to fixed at a single rate, e.g., > > > 54M/48M/36M... for a test case. > > > I do not want a clear error message, I want to the 54M rate pass/set > > > success to lower wlan driver. > > > Then lower wlan driver can handle it. > > > > No, that will not happen. You should configure your test AP to actually > > support 54M. > Yes, the AP support 54M, but it is not basic rate, so > ieee80211_set_bitrate_mask will reject 54M > because fail for check (mask->control[band].legacy & basic_rates). Ah. So this is what I said in the original commit message even: > Technically, selecting basic rates as the criterion is a bit too > restrictive, but calculating the usable rates over all stations > (e.g. in AP mode) is harder, and all stations must support the > basic rates. Similarly, in client mode, the basic rates will be > used anyway for control frames. I guess if we really want to redefine the user rate mask to not apply to control frames, then we can relax this? johannes