[undi] Clean up driver and device name information

Fix the <NULL> driver name reported by "ifstat" when using the undipci
driver (due to the unnecessary extra device node inserted as a child
of the PCI device).

Remove the "UNDI-" prefix from device names since the driver name is
also now visible via "ifstat", and tidy up the device name to match
the format used by standard PCI devices.

The output from "ifstat" now resembles:

  iPXE> ifstat
  net0: 52:54:00:12:34:56 using undipci on 0000:00:03.0

  iPXE> ifstat
  net0: 52:54:00:12:34:56 using undionly on 0000:00:03.0

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2016-12-05 15:45:17 +00:00
parent cc40fcbf8b
commit 6997d3c2fa
5 changed files with 32 additions and 39 deletions

View File

@@ -53,8 +53,6 @@ struct undi_device {
*/
UINT16_t flags;
/** Generic device */
struct device dev;
/** Driver-private data
*
* Use undi_set_drvdata() and undi_get_drvdata() to access this

View File

@@ -10,8 +10,9 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
struct undi_device;
struct device;
extern int undinet_probe ( struct undi_device *undi );
extern int undinet_probe ( struct undi_device *undi, struct device *dev );
extern void undinet_remove ( struct undi_device *undi );
#endif /* _UNDINET_H */