12e183d99SBjoern A. Zeeb /*- 22e183d99SBjoern A. Zeeb * Copyright (c) 2020-2021 The FreeBSD Foundation 32e183d99SBjoern A. Zeeb * Copyright (c) 2021-2022 Bjoern A. Zeeb 42e183d99SBjoern A. Zeeb * 52e183d99SBjoern A. Zeeb * This software was developed by Björn Zeeb under sponsorship from 62e183d99SBjoern A. Zeeb * the FreeBSD Foundation. 72e183d99SBjoern A. Zeeb * 82e183d99SBjoern A. Zeeb * Redistribution and use in source and binary forms, with or without 92e183d99SBjoern A. Zeeb * modification, are permitted provided that the following conditions 102e183d99SBjoern A. Zeeb * are met: 112e183d99SBjoern A. Zeeb * 1. Redistributions of source code must retain the above copyright 122e183d99SBjoern A. Zeeb * notice, this list of conditions and the following disclaimer. 132e183d99SBjoern A. Zeeb * 2. Redistributions in binary form must reproduce the above copyright 142e183d99SBjoern A. Zeeb * notice, this list of conditions and the following disclaimer in the 152e183d99SBjoern A. Zeeb * documentation and/or other materials provided with the distribution. 162e183d99SBjoern A. Zeeb * 172e183d99SBjoern A. Zeeb * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 182e183d99SBjoern A. Zeeb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 192e183d99SBjoern A. Zeeb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 202e183d99SBjoern A. Zeeb * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 212e183d99SBjoern A. Zeeb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 222e183d99SBjoern A. Zeeb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 232e183d99SBjoern A. Zeeb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 242e183d99SBjoern A. Zeeb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 252e183d99SBjoern A. Zeeb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 262e183d99SBjoern A. Zeeb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 272e183d99SBjoern A. Zeeb * SUCH DAMAGE. 282e183d99SBjoern A. Zeeb */ 292e183d99SBjoern A. Zeeb 302e183d99SBjoern A. Zeeb #ifndef _LINUXKPI_NET_REGULATORY_H 312e183d99SBjoern A. Zeeb #define _LINUXKPI_NET_REGULATORY_H 322e183d99SBjoern A. Zeeb 33*69cc1630SBjoern A. Zeeb enum environment_cap { 34*69cc1630SBjoern A. Zeeb ENVIRON_INDOOR = 1, /* keep != 0 */ 35*69cc1630SBjoern A. Zeeb }; 36*69cc1630SBjoern A. Zeeb 372e183d99SBjoern A. Zeeb #define REG_RULE(_begin, _end, _bw, _mag, _meirp, _flags) \ 382e183d99SBjoern A. Zeeb { \ 392e183d99SBjoern A. Zeeb .flags = (_flags), \ 402e183d99SBjoern A. Zeeb .freq_range.start_freq_khz = MHZ_TO_KHZ(_begin), \ 412e183d99SBjoern A. Zeeb .freq_range.end_freq_khz = MHZ_TO_KHZ(_end), \ 422e183d99SBjoern A. Zeeb .freq_range.max_bandwidth_khz = MHZ_TO_KHZ(_bw), \ 432e183d99SBjoern A. Zeeb .power_rule.max_antenna_gain = DBI_TO_MBI(_mag), \ 442e183d99SBjoern A. Zeeb .power_rule.max_eirp = DBI_TO_MBI(_meirp), \ 452e183d99SBjoern A. Zeeb } 462e183d99SBjoern A. Zeeb 472e183d99SBjoern A. Zeeb #endif /* _LINUXKPI_NET_REGULATORY_H */ 48