Skip to content

OpenBSD: rewrite rate calculation to use IFM_BAUDRATE_DESCRIPTIONS

Courtesy of @landry, taken from this local patch in the ports tree: https://github.com/openbsd/ports/commit/12fa92c7fd0a7be414d093777f543438b3ce4760

Apply this patch and replace tabs with two spaces to fit the file's style.

Original commit message:

rewrite rate calculation to use IFM_BAUDRATE_DESCRIPTIONS from <net/if_media.h>

even if the max rate is theoretical, it allows the plugin tooltip to
nicely display 'R2K22: 100% at 121Mb/s', fully taking advantages of the
11n/11ac/HT/VHT rates, instead of reporting 54Mb/s as it's the maximum
11g can do.

with hints from stsp@
Edited by Klemens Nanni

Merge request reports