Return-path: Received: from s3.sipsolutions.net ([5.9.151.49]:39526 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965350AbdAILHr (ORCPT ); Mon, 9 Jan 2017 06:07:47 -0500 Message-ID: <1483960061.17582.27.camel@sipsolutions.net> (sfid-20170109_120810_387840_CCCD41B9) Subject: Re: [PATCH V6 4/3] brcmfmac: use wiphy_read_of_freq_limits to respect extra limits From: Johannes Berg To: Arend Van Spriel , =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= Cc: "linux-wireless@vger.kernel.org" , Martin Blumenstingl , Felix Fietkau , Arend van Spriel , Arnd Bergmann , "devicetree@vger.kernel.org" , Rob Herring , =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= Date: Mon, 09 Jan 2017 12:07:41 +0100 In-Reply-To: <684d1aff-a9ce-ae42-0c11-5840d3a92daf@broadcom.com> (sfid-20170109_120214_167212_462C1A4A) References: <20170104175832.25996-1-zajec5@gmail.com> <20170104175832.25996-4-zajec5@gmail.com> <3fc87224-7f08-e365-7bbb-a4b8b5746e4f@broadcom.com> <36d2dbd1-bcbe-021b-dd7f-068a5b9739ef@broadcom.com> <1483952320.17582.13.camel@sipsolutions.net> <684d1aff-a9ce-ae42-0c11-5840d3a92daf@broadcom.com> (sfid-20170109_120214_167212_462C1A4A) Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Mon, 2017-01-09 at 12:02 +0100, Arend Van Spriel wrote: > > However, with the OF, I argued (succesfully it seems :P) that the > > sensible thing to do was to register with the DISABLED flag and > > thereby > > "permanently" disable the channels that OF didn't think were > > usable, > > but in this case now the driver has to adhere to the cfg80211 logic > > of > > preserving orig_flags forever. > > By adhere you mean we should not enable channes for which orig_flags > indicate DISABLED? Well, the regulatory code will "OR" in all the orig_flags after modifications. If you don't use any of the others before registering, and you don't use any other helpers other than the OF one that we know sets only DISABLED, then keeping only the DISABLED flag would be OK - however, it should *also* be OK to always keep *all* of the orig_flags, just like the normal regulatory code would? johannes