From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arend Van Spriel Subject: Re: [PATCH V6 4/3] brcmfmac: use wiphy_read_of_freq_limits to respect extra limits Date: Mon, 9 Jan 2017 12:02:07 +0100 Message-ID: <684d1aff-a9ce-ae42-0c11-5840d3a92daf@broadcom.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <1483952320.17582.13.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Johannes Berg , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: "linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Martin Blumenstingl , Felix Fietkau , Arend van Spriel , Arnd Bergmann , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Rob Herring , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= List-Id: devicetree@vger.kernel.org On 9-1-2017 9:58, Johannes Berg wrote: > On Sat, 2017-01-07 at 13:58 +0100, Rafał Miłecki wrote: > >>> I indeed prefer to talk about the driver instead of we. Indeed it >>> is true due to the orig_flags behavior although that only seems to >>> involve regulatory code. Could it be that brcmfmac undo that >>> through the notifier? >> >> I guess you could touch orig_flags, but I don't know if it's >> preferred way. This is probably question to Johannes & cfg80211 guys. > > Right now - before the OF patch - there can't really be any orig_flags > with DISABLED since the driver doesn't set flags to DISABLED before > registering, does it? While registering, flags are copied to orig_flags > so the driver can register with flags like DFS or NO_IR already enabled > - say the firmware requires that - and they will never be overwritten > by cfg80211. Actually, in brcmfmac we do set channels to DISABLED before registering. I was blissfully unaware of the orig_flags when I added the channel setup in our probe sequence. > Arguably, what the driver does today - before OF - isn't incorrect > either, since it simply doesn't care about anything it registered with > at all. Given the statement above I think brcmfmac is incorrect. > 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? Regards, Arend