- if (hw)
- sprintf(buf, "%s %s", hw->vendor_name, hw->device_name);
+int madwifi_get_hardware_name(const char *ifname, char *buf)
+{
+ char vendor[64];
+ char device[64];
+ const struct iwinfo_hardware_entry *hw;
+
+ if (!(hw = madwifi_get_hardware_entry(ifname)))
+ {
+ madwifi_proc_file(ifname, "dev_vendor", vendor, sizeof(vendor));
+ madwifi_proc_file(ifname, "dev_name", device, sizeof(device));
+
+ if (vendor[0] && device[0])
+ sprintf(buf, "%s %s", vendor, device);
+ else
+ sprintf(buf, "Generic Atheros");
+ }