Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134219
b: refs/heads/master
c: 716f939
h: refs/heads/master
i:
  134217: 41268e3
  134215: 0829728
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Jan 29, 2009
1 parent 926a00e commit 55c6918
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 42 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d46e5b1d0c617a2a46353812d7f02115c17b5e72
refs/heads/master: 716f9392e2b84cacc18cc11f7427cb98adeb1c3d
45 changes: 45 additions & 0 deletions trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,51 @@ enum reg_set_by {
REGDOM_SET_BY_COUNTRY_IE,
};

/**
* enum environment_cap - Environment parsed from country IE
* @ENVIRON_ANY: indicates country IE applies to both indoor and
* outdoor operation.
* @ENVIRON_INDOOR: indicates country IE applies only to indoor operation
* @ENVIRON_OUTDOOR: indicates country IE applies only to outdoor operation
*/
enum environment_cap {
ENVIRON_ANY,
ENVIRON_INDOOR,
ENVIRON_OUTDOOR,
};

/**
* struct regulatory_request - receipt of last regulatory request
*
* @wiphy: this is set if this request's initiator is
* %REGDOM_SET_BY_COUNTRY_IE or %REGDOM_SET_BY_DRIVER. This
* can be used by the wireless core to deal with conflicts
* and potentially inform users of which devices specifically
* cased the conflicts.
* @initiator: indicates who sent this request, could be any of
* of those set in reg_set_by, %REGDOM_SET_BY_*
* @alpha2: the ISO / IEC 3166 alpha2 country code of the requested
* regulatory domain. We have a few special codes:
* 00 - World regulatory domain
* 99 - built by driver but a specific alpha2 cannot be determined
* 98 - result of an intersection between two regulatory domains
* @intersect: indicates whether the wireless core should intersect
* the requested regulatory domain with the presently set regulatory
* domain.
* @country_ie_checksum: checksum of the last processed and accepted
* country IE
* @country_ie_env: lets us know if the AP is telling us we are outdoor,
* indoor, or if it doesn't matter
*/
struct regulatory_request {
struct wiphy *wiphy;
enum reg_set_by initiator;
char alpha2[2];
bool intersect;
u32 country_ie_checksum;
enum environment_cap country_ie_env;
};

struct ieee80211_freq_range {
u32 start_freq_khz;
u32 end_freq_khz;
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/net/wireless.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ struct wiphy {
struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS];

/* Lets us get back the wiphy on the callback */
int (*reg_notifier)(struct wiphy *wiphy, enum reg_set_by setby);
int (*reg_notifier)(struct wiphy *wiphy,
struct regulatory_request *request);

/* fields below are read-only, assigned by cfg80211 */

Expand Down
34 changes: 1 addition & 33 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,38 +42,6 @@
#include "core.h"
#include "reg.h"

/**
* struct regulatory_request - receipt of last regulatory request
*
* @wiphy: this is set if this request's initiator is
* %REGDOM_SET_BY_COUNTRY_IE or %REGDOM_SET_BY_DRIVER. This
* can be used by the wireless core to deal with conflicts
* and potentially inform users of which devices specifically
* cased the conflicts.
* @initiator: indicates who sent this request, could be any of
* of those set in reg_set_by, %REGDOM_SET_BY_*
* @alpha2: the ISO / IEC 3166 alpha2 country code of the requested
* regulatory domain. We have a few special codes:
* 00 - World regulatory domain
* 99 - built by driver but a specific alpha2 cannot be determined
* 98 - result of an intersection between two regulatory domains
* @intersect: indicates whether the wireless core should intersect
* the requested regulatory domain with the presently set regulatory
* domain.
* @country_ie_checksum: checksum of the last processed and accepted
* country IE
* @country_ie_env: lets us know if the AP is telling us we are outdoor,
* indoor, or if it doesn't matter
*/
struct regulatory_request {
struct wiphy *wiphy;
enum reg_set_by initiator;
char alpha2[2];
bool intersect;
u32 country_ie_checksum;
enum environment_cap country_ie_env;
};

/* Receipt of information from last regulatory request */
static struct regulatory_request *last_request;

Expand Down Expand Up @@ -951,7 +919,7 @@ void wiphy_update_regulatory(struct wiphy *wiphy, enum reg_set_by setby)
handle_band(wiphy, band);
}
if (wiphy->reg_notifier)
wiphy->reg_notifier(wiphy, setby);
wiphy->reg_notifier(wiphy, last_request);
}

static void handle_channel_custom(struct wiphy *wiphy,
Expand Down
7 changes: 0 additions & 7 deletions trunk/net/wireless/reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ void regulatory_exit(void);

int set_regdom(const struct ieee80211_regdomain *rd);

enum environment_cap {
ENVIRON_ANY,
ENVIRON_INDOOR,
ENVIRON_OUTDOOR,
};


/**
* __regulatory_hint - hint to the wireless core a regulatory domain
* @wiphy: if the hint comes from country information from an AP, this
Expand Down

0 comments on commit 55c6918

Please sign in to comment.