diff --git a/src/backhaul_topology_dbg.c b/src/backhaul_topology_dbg.c index 27a5b37dbd83f632f51395495c83b5af4133d4ad..a2ef86847bc68b0f3e1f473cc7ea2c82bfaa1a14 100644 --- a/src/backhaul_topology_dbg.c +++ b/src/backhaul_topology_dbg.c @@ -21,9 +21,20 @@ static const char *get_prefix(enum dbg_bh_topo_indent_lvl indent_level) const char *i1905_media_type_to_str(uint16_t media_type) { - switch (media_type >> 8) { - case 0: return "Ethernet"; - case 1: return "Wi-Fi"; + switch (media_type) { + case 0x0000: return "Ethernet (802_3U_FAST_ETHERNET)"; + case 0x0001: return "Ethernet (802_3AB_GIGABIT_ETHERNET)"; + case 0x0100: return "Wi-Fi (802_11B_2_4_GHZ)"; + case 0x0101: return "Wi-Fi (802_11G_2_4_GHZ)"; + case 0x0102: return "Wi-Fi (802_11A_5_GHZ)"; + case 0x0103: return "Wi-Fi (802_11N_2_4_GHZ )"; + case 0x0104: return "Wi-Fi (802_11N_5_GHZ)"; + case 0x0105: return "Wi-Fi (802_11AC_5_GHZ)"; + case 0x0106: return "Wi-Fi (802_11AD_60_GHZ)"; + case 0x0107: return "Wi-Fi (802_11AF_WHITESPACE)"; + case 0x0108: return "Wi-Fi (802_11AX)"; + case 0x0109: return "Wi-Fi (802_11BE)"; + default: return "Other"; } } diff --git a/src/cntlr_ubus_dbg.c b/src/cntlr_ubus_dbg.c index 30457b6b0bcd212a96f25613faa020c25840d4aa..383d059cf40685beb04156d86d76c47f6d7d2acf 100644 --- a/src/cntlr_ubus_dbg.c +++ b/src/cntlr_ubus_dbg.c @@ -194,8 +194,6 @@ static int cntrl_dbg_bh_topology_dump(struct ubus_context *ctx, const struct backhaul_info *bh_info = &topo_dev->bh_info; - blobmsg_add_u32(&bb, "time_since_topo_response", - timestamp_elapsed_sec(&topo_dev->last_topo_response)); blobmsg_add_string(&bb, "al_mac", hwaddr_ntoa(topo_dev->al_macaddr, macaddrstr)); blobmsg_add_u16(&bb, "hops_from_root", bh_info->level_in_tree); @@ -220,6 +218,8 @@ static int cntrl_dbg_bh_topology_dump(struct ubus_context *ctx, blobmsg_close_table(&bb, bh_table); } + blobmsg_add_u32(&bb, "time_since_topo_response", + timestamp_elapsed_sec(&topo_dev->last_topo_response)); blobmsg_close_table(&bb, dev_table); }