return buf;
}
+static const char *format_band(int band)
+{
+ const char *name;
+
+ name = iwinfo_band_name(band);
+ if (name)
+ return name;
+
+ return "unknown";
+}
+
static char * format_channel(int ch)
{
static char buf[16];
{
if (strlen(ids.compatible) > 0)
snprintf(buf, sizeof(buf), "embedded");
+ else if (ids.vendor_id == 0 && ids.device_id == 0 &&
+ ids.subsystem_vendor_id != 0 && ids.subsystem_device_id != 0)
+ snprintf(buf, sizeof(buf), "USB %04X:%04X",
+ ids.subsystem_vendor_id, ids.subsystem_device_id);
else
snprintf(buf, sizeof(buf), "%04X:%04X %04X:%04X",
ids.vendor_id, ids.device_id,
{
e = (struct iwinfo_freqlist_entry *) &buf[i];
- printf("%s %s (Channel %s)%s\n",
+ printf("%s %s (Band: %s, Channel %s)%s\n",
(freq == e->mhz) ? "*" : " ",
format_frequency(e->mhz),
+ format_band(e->band),
format_channel(e->channel),
e->restricted ? " [restricted]" : "");
}