show current opclass when bh_topology_dump
2 unresolved threads
2 unresolved threads
Signed-off-by: Janusz Dziedzic janusz.dziedzic@iopsys.eu
Merge request reports
Activity
requested review from @kamil_z
179 return "6g"; 180 else 181 return ""; 182 } 183 184 static void cntlr_dbg_print_opclass(struct blob_buf *bb, struct wifi_radio_opclass *opclass) 185 { 186 char buf[128]; 187 188 if (!opclass || !opclass->num_opclass) 189 return; 190 snprintf(buf, sizeof(buf), "%u/%u %s", 191 opclass->opclass[0].channel[0].channel, 192 opclass->opclass[0].bandwidth, 193 cntlr_dbg_opclass_id_to_band(opclass->opclass[0].id)); 194 blobmsg_add_string(bb, "channel", buf); changed this line in version 5 of the diff
168 169 return UBUS_STATUS_OK; 169 170 } 170 171 172 static char * cntlr_dbg_opclass_id_to_band(uint8_t id) 173 { 174 if (id >= 81 && id <=84) 175 return "2g"; 176 else if (id >= 115 && id <= 130) 177 return "5g"; 178 else if (id >= 131 && id <=136) 179 return "6g"; changed this line in version 5 of the diff
Please register or sign in to reply