Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1603105ybj; Fri, 20 Sep 2019 13:12:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7xKqOwSzI/2XMrog+OrfuzDTPUVxxQPto/w2tJ8nBq/rrblB7ZOMaZ6VnZBstL+oQv0rd X-Received: by 2002:a05:6402:7c1:: with SMTP id u1mr9678014edy.198.1569010373535; Fri, 20 Sep 2019 13:12:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569010373; cv=none; d=google.com; s=arc-20160816; b=Q7Hgn4vXcGlUtPr7UeeBSiFCa7X6MuvFzXRsv3JR56Zehb/HmyUBzTYbTZ0Hem7Fho kD8/BdyW/9/IocT56zCnw4hyNhp28wWX9Yd77zbFl7QUvCY779bD0R0PisNZMdxYkXWk U32ZbTw2dDOf3xXE4pl+uuTLthbpcMt19u2sIxdw01690zdsG4/u1HWA0iWp6tR0Wq/6 pFOWElhbp0lrE0+iUHd3LFoRjfglj7K0+cyQpsX3tksZLhf76C3ai8hMnF+dvDBe0f11 qz+0i8+r8RvWSK4Y6LLjG0xGZn/Ytu53jmpUjeM1LUYkjCBL89eoA2TWCKPA8fLZeQh5 Q5iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nCLCEPwR7CpLqqAQ7jCtCOAkDkvwGKkwqxTdX9m4R1E=; b=EUACEJR2Hddk2TZejEvJJx2AK/hG/Erti86gOE0FFVgEUY03i3KzKOqdzS7OXW5QWo 0B8gvWz7hmB2ZSrHEIJC1OUJTivBs9ekabnJ5bIFzcL6B2LvQTy9Oibdc2LQ8BGSFGO9 uae4aMUCMG0oYxGni+S8sX8i+fTqdw3ohkeUMyogdxwZs7kYISLjUElHMm31+wG3JcPz NEWVutwaujH/i5JBtGJNJ8nDtsjoIR5W2tzkKaMmkGZP4+VDCrDelHK0WaCqOO+T5SJq sq1elzBpL6MljbO2edtQPUa9OvrPrUUHXrm2FN9vsvSqTIVGET8bJ+7Vs7gpJdtGyZ2f oMcQ== 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 52si1825053edz.413.2019.09.20.13.12.25; Fri, 20 Sep 2019 13:12:53 -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 S1728237AbfITOBt (ORCPT + 99 others); Fri, 20 Sep 2019 10:01:49 -0400 Received: from mail.w1.fi ([212.71.239.96]:60684 "EHLO li674-96.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727904AbfITOBt (ORCPT ); Fri, 20 Sep 2019 10:01:49 -0400 Received: from localhost (localhost [127.0.0.1]) by li674-96.members.linode.com (Postfix) with ESMTP id 6738411952; Fri, 20 Sep 2019 14:01:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at w1.fi Received: from li674-96.members.linode.com ([127.0.0.1]) by localhost (mail.w1.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hAKQx5DjrZrw; Fri, 20 Sep 2019 14:01:45 +0000 (UTC) Received: by jm (sSMTP sendmail emulation); Fri, 20 Sep 2019 17:01:43 +0300 Date: Fri, 20 Sep 2019 17:01:43 +0300 From: Jouni Malinen To: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: Johannes Berg , "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, =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Subject: Re: [PATCH RFC] cfg80211: add new command for reporting wiphy crashes Message-ID: <20190920140143.GA30514@w1.fi> References: <20190920133708.15313-1-zajec5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190920133708.15313-1-zajec5@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Sep 20, 2019 at 03:37:08PM +0200, Rafał Miłecki wrote: > Hardware or firmware instability may result in unusable wiphy. In such > cases usually a hardware reset is needed. To allow a full recovery > kernel has to indicate problem to the user space. Why? Shouldn't the driver be able to handle this on its own since all the previous configuration was done through the driver anyway. As far as I know, there are drivers that do indeed try to do this and handle it successfully at least for station mode. AP mode may be more complex, but for that one, I guess it would be fine to drop all associations (and provide indication of that to user space) and just restart the BSS. > This new nl80211 command lets user space known wiphy has crashed and has > been just recovered. When applicable it should result in supplicant or > authenticator reconfiguring all interfaces. For me, that is not really "recovered" if some additional reconfiguration steps are needed.. I'd like to get a more detailed view on what exactly might need to be reconfigured and how would user space know what exactly to do. Or would the plan here be that the driver would not even indicate this crash if it is actually able to internally recover fully from the firmware restart? > I'd like to use this new cfg80211_crash_report() in brcmfmac after a > successful recovery from a FullMAC firmware crash. > > Later on I'd like to modify hostapd to reconfigure wiphy using a > previously used setup. So this implies that at least something would need to happen in AP mode. Do you have a list of items that the driver cannot do on its own and why it would be better to do them from user space? > I'm OpenWrt developer & user and I got annoyed by my devices not auto > recovering after various failures. There are things I cannot fix (hw > failures or closed fw crashes) but I still expect my devices to get > back to operational state as soon as possible on their own. I fully agree with the auto recovery being important thing to cover for this, but I'm not yet convinced that this needs user space action. Or if it does, there would need to be more detailed way of indicating what exactly is needed for user space to do. The proposed change here is just saying "hey, I crashed and did something to get the hardware/firmware responding again" which does not really tell much to user space other than potentially requiring full disable + re-enable for the related interfaces. And that is something that should not actually be done in all cases of firmware crashes since there are drivers that handle recovery in a manner that is in practice completely transparent to user space. -- Jouni Malinen PGP id EFC895FA