diff --git a/cmd_parser.c b/cmd_parser.c index e3595132..8b03c49e 100644 --- a/cmd_parser.c +++ b/cmd_parser.c @@ -150,6 +150,14 @@ uint8_t atoi_hex(uint8_t idx) h_idx++; } + if (h_idx & 1) { + hexvalue[h_idx >> 1] <<= 4; + hexvalue[3] = hexvalue[3] >> 4 | (hexvalue[2] << 4); + hexvalue[2] = hexvalue[2] >> 4 | (hexvalue[1] << 4); + hexvalue[1] = hexvalue[1] >> 4 | (hexvalue[0] << 4); + hexvalue[0] >>= 4; + } + return ((h_idx + 1) >> 1); } @@ -707,7 +715,7 @@ void parse_bw(void) goto err; port = cmd_buffer[cmd_words_b[2]] - '1'; - if (port < 0 || port > 9) + if (port > 9) goto err; port = machine.phys_to_log_port[port]; diff --git a/html/bandwidth.html b/html/bandwidth.html new file mode 100644 index 00000000..68a6b754 --- /dev/null +++ b/html/bandwidth.html @@ -0,0 +1,20 @@ + + + + +
| Ingress | Egress | |||||
|---|---|---|---|---|---|---|
| Port | Limit | Bandwidth [kBit/s] | Flow Control | Limit | Bandwidth [kBit/s] | Apply |