hostap: handling device renames better
Hi,
While trying to flash my Prism 2.5 card today, I ran into a problem that'll probably hit quite a few drivers (mostly older ones).
udev renames the interface after probing, but anything the driver set up manually at probe/init time (in this case /proc/net/hostap/wifi0/pda) will still be using the old device name. Thus the prism2_srec tool refused to work because it needs both the PDA from /proc/net/hostap/... as well as some ioctls on the device. Unfortunately, the device names are different due to udev's renaming.
How are drivers made aware that their device's name has changed so they could potentially update things they stick in /proc or wherever? hostap and airo come to mind as current users of /proc.
Dan
(ideally this stuff should be migrated to the device's sysfs directory, not live in /proc/net)
Quoted 3 lines · Dan Williams
How are drivers made aware that their device's name has changed so they could potentially update things they stick in /proc or wherever? hostap and airo come to mind as current users of /proc.
You can register a netdevice notifier and follow the renames. mac80211 does this for the debugfs dir.
johannes
Quoted 8 lines · Johannes Berg
Quoted 3 lines · Dan Williams
How are drivers made aware that their device's name has changed so they could potentially update things they stick in /proc or wherever? hostap and airo come to mind as current users of /proc.
You can register a netdevice notifier and follow the renames. mac80211 does this for the debugfs dir.
Ok, will look into this. Thanks!
Dan