[PATCH v2] rfkill: match only the correct expected wiphy rfkill

Johannes Berg johannes at sipsolutions.net
Thu Dec 10 06:39:10 PST 2015

On Wed, 2015-12-09 at 08:55 +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg at intel.com>
> On systems that have multiple WLAN rfkill instances, the rfkill code
> can become confused into thinking that the device was unblocked when
> in fact it wasn't, because it only matches on the WLAN type.
> Since it then stores the new (unblocked) state from the wrong rfkill
> instance, it will never retry the failing IFF_UP operation and the
> user has to toggle rfkill again, or otherwise intervene manually, in
> this case to get back to operational.
> Fix this by using the existing (but unused) ifname argument when the
> rfkill instance is created to match to a specific rfkill index only.
Ilan found that this is broken for p2p-device, for obvious reasons (not
having a netdev, so no sysfs entry for the netdev).

We probably should change the rfkill_init() API to pass the wiphy
instead of the netdev - we'll fix it.


More information about the Hostap mailing list