Merge tag 'nfs-for-3.14-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / staging / rtl8821ae / regd.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2009-2010  Realtek Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  * The full GNU General Public License is included in this distribution in the
19  * file called LICENSE.
20  *
21  * Contact Information:
22  * wlanfae <wlanfae@realtek.com>
23  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
24  * Hsinchu 300, Taiwan.
25  *
26  * Larry Finger <Larry.Finger@lwfinger.net>
27  *
28  *****************************************************************************/
29
30 #ifndef __RTL_REGD_H__
31 #define __RTL_REGD_H__
32
33 #define IEEE80211_CHAN_NO_IBSS          1<<2
34 #define IEEE80211_CHAN_PASSIVE_SCAN     1<<1
35 #define WIPHY_FLAG_CUSTOM_REGULATORY    BIT(0)
36 #define WIPHY_FLAG_STRICT_REGULATORY    BIT(1)
37 #define WIPHY_FLAG_DISABLE_BEACON_HINTS BIT(2)
38
39 struct country_code_to_enum_rd {
40         u16 countrycode;
41         const char *iso_name;
42 };
43
44 enum country_code_type_t {
45         COUNTRY_CODE_FCC = 0,
46         COUNTRY_CODE_IC = 1,
47         COUNTRY_CODE_ETSI = 2,
48         COUNTRY_CODE_SPAIN = 3,
49         COUNTRY_CODE_FRANCE = 4,
50         COUNTRY_CODE_MKK = 5,
51         COUNTRY_CODE_MKK1 = 6,
52         COUNTRY_CODE_ISRAEL = 7,
53         COUNTRY_CODE_TELEC = 8,
54         COUNTRY_CODE_MIC = 9,
55         COUNTRY_CODE_GLOBAL_DOMAIN = 10,
56         COUNTRY_CODE_WORLD_WIDE_13 = 11,
57         COUNTRY_CODE_TELEC_NETGEAR = 12,
58
59         /*add new channel plan above this line */
60         COUNTRY_CODE_MAX
61 };
62
63 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
64 int rtl_regd_init(struct ieee80211_hw *hw,
65                   void (*reg_notifier) (struct wiphy *wiphy,
66                                         struct regulatory_request *request));
67 void rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request);
68 #else
69 int rtl_regd_init(struct ieee80211_hw *hw,
70                   int (*reg_notifier) (struct wiphy *wiphy,
71                                        struct regulatory_request *request));
72 int rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request);
73 #endif
74
75 #endif