aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-01-22 18:05:48 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:01:15 -0500
commite74b1e7fb2f12db36f25af2158ee6e2940e4f138 (patch)
treee448c3290ec8d11fcba1cb67680752e9d17b579b /net/wireless/reg.c
parent5eebade608d695e30e89d4c5ca6136a58f24ed14 (diff)
cfg80211: ignore consecutive equal regulatory hints
We ignore regulatory hints for the same alpha2 if we already have processed the same alpha2 on the current regulatory domain. For a driver regulatory_hint() this means we copy onto its wiphy->regd the previously procesed regulatory domain from CRDA without having to call CRDA again. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 4d2d2d4cc0d4..c201abd38ad1 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1080,8 +1080,13 @@ static int ignore_request(struct wiphy *wiphy, enum reg_set_by set_by,
1080 } 1080 }
1081 return REG_INTERSECT; 1081 return REG_INTERSECT;
1082 case REGDOM_SET_BY_DRIVER: 1082 case REGDOM_SET_BY_DRIVER:
1083 if (last_request->initiator == REGDOM_SET_BY_CORE) 1083 if (last_request->initiator == REGDOM_SET_BY_CORE) {
1084 return 0; 1084 if (is_old_static_regdom(cfg80211_regdomain))
1085 return 0;
1086 if (!alpha2_equal(cfg80211_regdomain->alpha2, alpha2))
1087 return 0;
1088 return -EALREADY;
1089 }
1085 return REG_INTERSECT; 1090 return REG_INTERSECT;
1086 case REGDOM_SET_BY_USER: 1091 case REGDOM_SET_BY_USER:
1087 if (last_request->initiator == REGDOM_SET_BY_COUNTRY_IE) 1092 if (last_request->initiator == REGDOM_SET_BY_COUNTRY_IE)
@@ -1101,6 +1106,10 @@ static int ignore_request(struct wiphy *wiphy, enum reg_set_by set_by,
1101 return -EAGAIN; 1106 return -EAGAIN;
1102 } 1107 }
1103 1108
1109 if (!is_old_static_regdom(cfg80211_regdomain) &&
1110 alpha2_equal(cfg80211_regdomain->alpha2, alpha2))
1111 return -EALREADY;
1112
1104 return 0; 1113 return 0;
1105 } 1114 }
1106 1115