hostap: handling device renames better

Dan Williams
2008-08-05T20:21:59Z

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)