Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1955674ybn; Thu, 26 Sep 2019 04:56:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxllLCaYmiWd9JI1aOaLOu+3biShAV19zn9MFI8DQ2N+JD2YZJsgBthnFEtFGS4CsL5HvIa X-Received: by 2002:a50:935d:: with SMTP id n29mr3111721eda.294.1569499003420; Thu, 26 Sep 2019 04:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569499003; cv=none; d=google.com; s=arc-20160816; b=jlNmBVLqF6mw2PqXOE/xKAT+JB85YZjTZC2ma6efEs1PfhQoOUx0ItY7fPPHBIhVXv uzmMMxg4Bw0ZzE6jrAhfEstPdUhy8Tno5q3WYLqHOjAEype9CuteBSgVtC35xeit7Cit RLHVvwakedec2Ky/NFP50OT1VqkZ6QSbS3uHz9+yyZ0I6tQW/Pd/ajMnQqivbzLmgFYa TUJaCn+4iZpx1Y4UYnM7AxgoWHhQLpz6JP5o2IGpUbDh1uwJc4E2Sjna1wlBTDg46FD3 Lr8197aDco5AS8rsgynQzaIqK9Ljma2AiQqLGUXtslSH+IrYZd0YVHfjp7XQoQXtsRwr /3lw== 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=2NEs6qQB8JM9FiMJhFSyOoYqOBu3oJMo01q0ie7ADO4=; b=YK3s/Wq6YlltqtLwGAKuF/gDmeq+aafRwY1avfmgOauf/nkbvdocWVrZQYxdooq7Bg o2+Piv6kOm0S1/z+ctjNZuh4WSrYVFMXKgGUEDH5amqz3XKKhKbyJm7cvYFSRAkcIGNL zMsoy/LkVyzRa0g6EApYunXJxzIpAsfeXtFIPRqq0vo2Wl6t/8u/FQCxLAfkC4z1l7eN T2nlGN8447w92TaocIS6kCvXMrkxfT8b17fyYJ26rXK0CLzL8B2QjifajPTJl5iV18SB luUG6/hzkOpCFQq4Fgoewm44GyoGiVHFR60wZodY77eBcETpb3ImmKObIVy6d9ksHRMC atcg== 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 r8si1138187edm.158.2019.09.26.04.56.18; Thu, 26 Sep 2019 04:56:43 -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 S1726418AbfIZLzO (ORCPT + 99 others); Thu, 26 Sep 2019 07:55:14 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:51542 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725821AbfIZLzO (ORCPT ); Thu, 26 Sep 2019 07:55:14 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iDSMU-0000Wn-4M; Thu, 26 Sep 2019 13:55:06 +0200 Message-ID: <9ece533700be8237699881312a99cc91c6a71d36.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 , =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= 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 13:55:04 +0200 In-Reply-To: <4f6f37e5-802c-4504-3dcb-c4a640d138bd@milecki.pl> References: <20190920133708.15313-1-zajec5@gmail.com> <20190920140143.GA30514@w1.fi> <4f6f37e5-802c-4504-3dcb-c4a640d138bd@milecki.pl> 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 13:52 +0200, Rafał Miłecki wrote: > > Indeed my main concert is AP mode. I'm afraid that cfg80211 doesn't > cache all settings, consider e.g. nl80211_start_ap(). It builds > struct cfg80211_ap_settings using info from nl80211 message and > passes it to the driver (rdev_start_ap()). Once it's done it > caches only a small subset of all setup data. > > In other words driver doesn't have enough info to recover interfaces > setup. So the driver can cache it, just like mac80211. You can't seriously be suggesting that the driver doesn't *have* enough information - everything passed through it :) > I meant that hardware has been recovered & is operational again (driver > can talk to it). I expected user space to reconfigure all interfaces > using the same settings that were used on previous run. > > If driver were able to recover interfaces setup on its own (with a help > of cfg80211) then user space wouldn't need to be involved. The driver can do it, mac80211 does. It's just a matter of what the driver will do or not. > First of all I was wondering how to handle interfaces creation. After a > firmware crash we have: > 1) Interfaces created in Linux > 2) No corresponsing interfaces in firmware > Syncing that (re-creating in-firmware firmwares) may be a bit tricky > depending on a driver and hardware. We do that in mac80211, it works fine. Why would it be tricky? If something fails, I think we force that interface to go down. > For some cases it could be easier to > delete all interfaces and ask user space to setup wiphy (create required > interfaces) again. I'm not sure if that's acceptable though? > > If we agree interfaces should stay and driver simply should configure > firmware properly, then we need all data as explained earlier. struct > cfg80211_ap_settings is not available during runtime. How should we > handle that problem? You can cache it in the driver in whatever format makes sense. > I was aiming for a brutal force solution: just make user space > interfaces need a full setup just at they were just created. You can still do that btw, just unregister and re-register the wiphy. johannes