From: Johannes Berg <johannes@sipsolutions.net>
To: "Rafał Miłecki" <rafal@milecki.pl>, "Jouni Malinen" <j@w1.fi>,
"Rafał Miłecki" <zajec5@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, hostap@lists.infradead.org,
openwrt-devel@lists.openwrt.org
Subject: Re: [PATCH RFC] cfg80211: add new command for reporting wiphy crashes
Date: Thu, 26 Sep 2019 13:55:04 +0200 [thread overview]
Message-ID: <9ece533700be8237699881312a99cc91c6a71d36.camel@sipsolutions.net> (raw)
In-Reply-To: <4f6f37e5-802c-4504-3dcb-c4a640d138bd@milecki.pl>
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
next prev parent reply other threads:[~2019-09-26 11:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 13:37 [PATCH RFC] cfg80211: add new command for reporting wiphy crashes Rafał Miłecki
2019-09-20 14:01 ` Jouni Malinen
2019-09-26 11:52 ` Rafał Miłecki
2019-09-26 11:55 ` Johannes Berg [this message]
2019-09-26 12:00 ` Rafał Miłecki
2019-09-26 12:04 ` Johannes Berg
2019-09-26 11:55 ` Rafał Miłecki
2019-09-20 17:56 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ece533700be8237699881312a99cc91c6a71d36.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=hostap@lists.infradead.org \
--cc=j@w1.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=openwrt-devel@lists.openwrt.org \
--cc=rafal@milecki.pl \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).