aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-01-07 20:43:34 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:59 -0500
commit3e0c3ff36c4c7b9e39af7d600e399664ca04e817 (patch)
tree837fa4d480d5f18bfb7bdb5f59c0caf5341d38eb /include
parent560e28e14f69ad3440a6e8c283dcfd37e1e41c2d (diff)
cfg80211: allow multiple driver regulatory_hints()
We add support for multiple drivers to provide a regulatory_hint() on a system by adding a wiphy specific regulatory domain cache. This allows drivers to keep around cache their own regulatory domain structure queried from CRDA. We handle conflicts by intersecting multiple regulatory domains, each driver will stick to its own regulatory domain though unless a country IE has been received and processed. If the user already requested a regulatory domain and a driver requests the same regulatory domain then simply copy to the driver's regd the same regulatory domain and do not call CRDA, do not collect $200. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/wireless.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/wireless.h b/include/net/wireless.h
index 21c5d966142d..9e73aae40c5d 100644
--- a/include/net/wireless.h
+++ b/include/net/wireless.h
@@ -187,6 +187,10 @@ struct ieee80211_supported_band {
187 * we will disregard the first regulatory hint (when the 187 * we will disregard the first regulatory hint (when the
188 * initiator is %REGDOM_SET_BY_CORE). 188 * initiator is %REGDOM_SET_BY_CORE).
189 * @reg_notifier: the driver's regulatory notification callback 189 * @reg_notifier: the driver's regulatory notification callback
190 * @regd: the driver's regulatory domain, if one was requested via
191 * the regulatory_hint() API. This can be used by the driver
192 * on the reg_notifier() if it chooses to ignore future
193 * regulatory domain changes caused by other drivers.
190 */ 194 */
191struct wiphy { 195struct wiphy {
192 /* assign these fields before you register the wiphy */ 196 /* assign these fields before you register the wiphy */
@@ -213,6 +217,8 @@ struct wiphy {
213 217
214 /* fields below are read-only, assigned by cfg80211 */ 218 /* fields below are read-only, assigned by cfg80211 */
215 219
220 const struct ieee80211_regdomain *regd;
221
216 /* the item in /sys/class/ieee80211/ points to this, 222 /* the item in /sys/class/ieee80211/ points to this,
217 * you need use set_wiphy_dev() (see below) */ 223 * you need use set_wiphy_dev() (see below) */
218 struct device dev; 224 struct device dev;