wireless: don't publish __regulatory_hint
[safe/jmp/linux-2.6] / net / wireless / reg.h
1 #ifndef __NET_WIRELESS_REG_H
2 #define __NET_WIRELESS_REG_H
3
4 extern struct mutex cfg80211_reg_mutex;
5 bool is_world_regdom(const char *alpha2);
6 bool reg_is_valid_request(const char *alpha2);
7
8 int regulatory_init(void);
9 void regulatory_exit(void);
10
11 int set_regdom(const struct ieee80211_regdomain *rd);
12
13 /**
14  * __regulatory_hint - hint to the wireless core a regulatory domain
15  * @wiphy: if a driver is providing the hint this is the driver's very
16  *      own &struct wiphy
17  * @alpha2: the ISO/IEC 3166 alpha2 being claimed the regulatory domain
18  *      should be in. If @rd is set this should be NULL
19  * @rd: a complete regulatory domain, if passed the caller need not worry
20  *      about freeing it
21  *
22  * The Wireless subsystem can use this function to hint to the wireless core
23  * what it believes should be the current regulatory domain by
24  * giving it an ISO/IEC 3166 alpha2 country code it knows its regulatory
25  * domain should be in or by providing a completely build regulatory domain.
26  *
27  * Returns -EALREADY if *a regulatory domain* has already been set. Note that
28  * this could be by another driver. It is safe for drivers to continue if
29  * -EALREADY is returned, if drivers are not capable of world roaming they
30  * should not register more channels than they support. Right now we only
31  * support listening to the first driver hint. If the driver is capable
32  * of world roaming but wants to respect its own EEPROM mappings for
33  * specific regulatory domains it should register the @reg_notifier callback
34  * on the &struct wiphy. Returns 0 if the hint went through fine or through an
35  * intersection operation. Otherwise a standard error code is returned.
36  *
37  */
38 extern int __regulatory_hint(struct wiphy *wiphy, enum reg_set_by set_by,
39                 const char *alpha2, struct ieee80211_regdomain *rd);
40
41 #endif  /* __NET_WIRELESS_REG_H */