Deleted Added
full compact
ah_regdomain.c (224719) ah_regdomain.c (225883)
1/*
2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
3 * Copyright (c) 2005-2006 Atheros Communications, Inc.
4 * All rights reserved.
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 *
1/*
2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
3 * Copyright (c) 2005-2006 Atheros Communications, Inc.
4 * All rights reserved.
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 *
18 * $FreeBSD: head/sys/dev/ath/ath_hal/ah_regdomain.c 224719 2011-08-08 18:05:22Z adrian $
18 * $FreeBSD: head/sys/dev/ath/ath_hal/ah_regdomain.c 225883 2011-09-30 05:17:57Z adrian $
19 */
20#include "opt_ah.h"
21
22#include "ah.h"
23
24#include <net80211/_ieee80211.h>
25#include <net80211/ieee80211_regdomain.h>
26

--- 137 unchanged lines hidden (view full) ---

164 for (i = 0; i < N(allCountries); i++)
165 if (allCountries[i].countryCode == cc)
166 return AH_TRUE;
167 } else {
168 for (i = 0; i < N(regDomainPairs); i++)
169 if (regDomainPairs[i].regDmnEnum == rd)
170 return AH_TRUE;
171 }
19 */
20#include "opt_ah.h"
21
22#include "ah.h"
23
24#include <net80211/_ieee80211.h>
25#include <net80211/ieee80211_regdomain.h>
26

--- 137 unchanged lines hidden (view full) ---

164 for (i = 0; i < N(allCountries); i++)
165 if (allCountries[i].countryCode == cc)
166 return AH_TRUE;
167 } else {
168 for (i = 0; i < N(regDomainPairs); i++)
169 if (regDomainPairs[i].regDmnEnum == rd)
170 return AH_TRUE;
171 }
172 HALDEBUG_G(ah, HAL_DEBUG_REGDOMAIN,
172 HALDEBUG(ah, HAL_DEBUG_REGDOMAIN,
173 "%s: invalid regulatory domain/country code 0x%x\n", __func__, rd);
174 return AH_FALSE;
175}
176
177/*
178 * Find the pointer to the country element in the country table
179 * corresponding to the country code
180 */

--- 427 unchanged lines hidden (view full) ---

608ath_hal_mapgsm(int sku, int freq)
609{
610 if (sku == SKU_XR9)
611 return 1520 + freq;
612 if (sku == SKU_GZ901)
613 return 1544 + freq;
614 if (sku == SKU_SR9)
615 return 3344 - freq;
173 "%s: invalid regulatory domain/country code 0x%x\n", __func__, rd);
174 return AH_FALSE;
175}
176
177/*
178 * Find the pointer to the country element in the country table
179 * corresponding to the country code
180 */

--- 427 unchanged lines hidden (view full) ---

608ath_hal_mapgsm(int sku, int freq)
609{
610 if (sku == SKU_XR9)
611 return 1520 + freq;
612 if (sku == SKU_GZ901)
613 return 1544 + freq;
614 if (sku == SKU_SR9)
615 return 3344 - freq;
616 HALDEBUG_G(AH_NULL, HAL_DEBUG_ANY,
616 HALDEBUG(AH_NULL, HAL_DEBUG_ANY,
617 "%s: cannot map freq %u unknown gsm sku %u\n",
618 __func__, freq, sku);
619 return freq;
620}
621
622/*
623 * Setup the internal/private channel state given a table of
624 * net80211 channels. We collapse entries for the same frequency

--- 243 unchanged lines hidden ---
617 "%s: cannot map freq %u unknown gsm sku %u\n",
618 __func__, freq, sku);
619 return freq;
620}
621
622/*
623 * Setup the internal/private channel state given a table of
624 * net80211 channels. We collapse entries for the same frequency

--- 243 unchanged lines hidden ---