Page MenuHomeFreeBSD

net80211: post RTM_IFINFO notification after toggling IFF_DRV_RUNNING
ClosedPublic

Authored by avg on May 20 2020, 6:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 5:40 AM
Unknown Object (File)
Dec 2 2023, 8:39 PM
Unknown Object (File)
Oct 26 2023, 2:14 PM
Unknown Object (File)
Oct 26 2023, 11:06 AM
Unknown Object (File)
Sep 3 2023, 3:47 AM
Unknown Object (File)
Aug 28 2023, 5:57 AM
Unknown Object (File)
Aug 28 2023, 5:56 AM
Unknown Object (File)
Aug 28 2023, 5:54 AM

Details

Summary

This is useful when a wireless driver is stopped or started in response
to events like an RF Kill button press.
Applications like wpa_supplicant depend on such events to have
a correct view of interface state.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avg requested review of this revision.May 20 2020, 6:53 AM

LGTM.

Works on iwn.

Maybe I'm wrong but I seem to have a foggy recollection that this used to work.

This revision is now accepted and ready to land.May 20 2020, 2:36 PM

It likely worked via polling the interface state or something.

I've noticed a bunch of other un-fun issues where dhclient stops noticing the interface state change so it starts re-doing DHCP.. should look into that too to see what's up.

sys/net80211/ieee80211_proto.c
1633 ↗(On Diff #72019)

So to try and keep this portable, I suggest making the call to rt_ifmsg() a method that you add to ieee80211_freebsd.c . That way the other downstream consumers of net80211 (dragonflybsd and haiku to name two) can decide how they want to handle it.

That also potentially keeps the CURVNET_SET/RESTORE calls in _freebsd.c, hiding it from OSes that don't use it.

do not call rt_ifmsg directly, wrap it under ieee80211_notify_ifnet_change

This revision now requires review to proceed.May 21 2020, 8:04 AM

@adrian, is this closer to what you have in mind?
Thanks!

This revision is now accepted and ready to land.May 21 2020, 3:03 PM