Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1967380ybn; Thu, 26 Sep 2019 05:06:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvY9o7fmnSLqYakF40mzUzwnlSIQ6Tapz/TjAKtgZTwTiivQta8mnJ8AMRwzd09ZylDa9w X-Received: by 2002:a17:906:7d0:: with SMTP id m16mr2762262ejc.95.1569499609474; Thu, 26 Sep 2019 05:06:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569499609; cv=none; d=google.com; s=arc-20160816; b=YjaUVfGRuH0chjkKepTJ40phJD77BaYfZanf2spB9MkPLuYLeUdLf1JI6Qm8woGOqp UkwqpNGmBTskf90V0msenB7ii3fFKisAe9aDq4ZAQaxuXTT9rL0ZhLA1BpbdS21fFCJK /bxj6ZyVY0m2DKuC9yJRkefjaB0mi983KtLq8ajwKT6JoRDLTuN1ZfI/zRK8C+vLvj0T ZIe/9bTf9H84a45y1QRquW9GVFuqOY3uZK1qtpqwRPzfEzG4gd5V81nmpGUkGVNg28R+ MZMfME2OB5KR+QM3P7msjlknGlZOIe8Jk5Q/iCLBFd0MG5FNpA5rWIxL4hz0lfRWBm1U ejmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=ZcV3VpXRt+tvkrxhVwsZNpkYqnWroPTLlyd8sY7DuqA=; b=F9MmnuO0ULE4l4OcExGUzEMADoo3nw4flRoqRKHDSwslVDNgnSE0IIN2T3KeKOH8aw JEkkVpd/zN/Sr+E7cwqo2VytxdQfFDMuVAydmopJDmc1Gzjn7jir+i+hgHXOsjQwqXBL ugjsB1X9ppCx8TElkEyhmzYefZIYFQhyseyEypesMj3G1+5yyslKxTHrVNLb6eoAaAft Wx+PM+q6gd1IlmIny6yWzSG51Cay7vIXPa+8ukuVlJhwoY+zUJYD7BxZb2H5E0JL1R1q qmkOQ2O2CQVuoIKU3J36qURPMmdb/0uQlDVPb801GNwrZlX6Nv9thKJ6+gHGQs91/2ka YfBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dt14si862910ejb.168.2019.09.26.05.06.23; Thu, 26 Sep 2019 05:06:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726291AbfIZME7 (ORCPT + 99 others); Thu, 26 Sep 2019 08:04:59 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:51726 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbfIZME7 (ORCPT ); Thu, 26 Sep 2019 08:04:59 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iDSVx-0000lJ-AK; Thu, 26 Sep 2019 14:04:53 +0200 Message-ID: <8b36a751a3498415a6474940ed904dbd40e1f26b.camel@sipsolutions.net> Subject: Re: [PATCH RFC] cfg80211: add new command for reporting wiphy crashes From: Johannes Berg To: =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= , Jouni Malinen Cc: "David S . Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, hostap@lists.infradead.org, openwrt-devel@lists.openwrt.org Date: Thu, 26 Sep 2019 14:04:52 +0200 In-Reply-To: <09503390-91f0-3789-496a-6e9891156c5e@gmail.com> (sfid-20190926_140042_451511_E87E7FE4) References: <20190920133708.15313-1-zajec5@gmail.com> <20190920140143.GA30514@w1.fi> <4f6f37e5-802c-4504-3dcb-c4a640d138bd@milecki.pl> <9ece533700be8237699881312a99cc91c6a71d36.camel@sipsolutions.net> <09503390-91f0-3789-496a-6e9891156c5e@gmail.com> (sfid-20190926_140042_451511_E87E7FE4) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 2019-09-26 at 14:00 +0200, Rafał Miłecki wrote: > > You can't seriously be suggesting that the driver doesn't *have* enough > > information - everything passed through it :) > > Precisely: it doesn't store (cache) enough info. But nothing stops it (the driver) from doing so! > In brcmfmac on .add_virtual_intf() we: > 1) Send request to the FullMAC firmware > 2) Wait for a reply > 3) On success we create interface > 4) We wake up .add_virtual_intf() handler > > I'll need to find a way to skip step 3 in recovery path since interface > on host side already exists. Sure, we skip lots of things in all drivers, look at iwlwifi for example with IWL_MVM_STATUS_IN_HW_RESTART. > OK, so basically I need to work on caching setup data. Should I try > doing that at my selected driver level (brcmfmac)? Or should I focus on > generic solution (cfg80211) and consider offloading mac80211 if > possible? I think doing it generically will not work well, you have different code paths and different formats, different data that you need etc. Sometimes there's information cfg80211 doesn't even *have*, because the driver is responsible for things (e.g. elements). I guess you can try, but my gut feeling is that it'd simpler in the driver. Now you can argue that everything passes through cfg80211 so it must have enough data too (just like I'm arguing the driver certainly has enough data), but ... it seems to me the cfg80211 is usually more action-based, where the restore flow needs to keep the *state*, not replay the series of actions that happened. johannes