From b8bd4a9751d101a32257bd893d81c008376bb1bb Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Thu, 5 Feb 2009 17:51:46 +0000 Subject: add support for max antenna gain (not used at the moment) --- sbin/ifconfig/regdomain.c | 4 ++++ sbin/ifconfig/regdomain.h | 1 + 2 files changed, 5 insertions(+) diff --git a/sbin/ifconfig/regdomain.c b/sbin/ifconfig/regdomain.c index 584646934712..e5d17340eb0b 100644 --- a/sbin/ifconfig/regdomain.c +++ b/sbin/ifconfig/regdomain.c @@ -289,6 +289,10 @@ end_element(void *data, const char *name) mt->netband->maxPowerDFS = strtoul(p, NULL, 0); goto done; } + if (iseq(name, "maxantgain") && mt->netband != NULL) { + mt->netband->maxAntGain = strtoul(p, NULL, 0); + goto done; + } /* ... */ if (iseq(name, "isocc") && mt->country != NULL) { diff --git a/sbin/ifconfig/regdomain.h b/sbin/ifconfig/regdomain.h index 5b37a0b17fc2..05ddb620b172 100644 --- a/sbin/ifconfig/regdomain.h +++ b/sbin/ifconfig/regdomain.h @@ -49,6 +49,7 @@ struct netband { const struct freqband *band; /* channel list description */ uint8_t maxPower; /* regulatory cap on tx power (dBm) */ uint8_t maxPowerDFS; /* regulatory cap w/ DFS (dBm) */ + uint8_t maxAntGain; /* max allowed antenna gain (.5 dBm) */ uint32_t flags; /* net80211 channel flags */ LIST_ENTRY(netband) next; -- cgit v1.2.3