diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-01-26 12:00:51 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:01:50 -0500 |
commit | d81c2d9c909e95ee8a5745da95bbb35f8ded3d17 (patch) | |
tree | 6f379f98f15090fd1b0eb41590f296f784761b83 /net/wireless | |
parent | b51bb3cd6c8078b8b8cc1d1725b100267eaa726e (diff) |
cfg80211: do not pass -EALREADY to userspace on regdomain change request
If the regulatory domain is already set it is technically not an error
so do not pass an errno to userspace.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 09a5d0f1d6dc..e69da8d20474 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1908,6 +1908,11 @@ static int nl80211_req_set_reg(struct sk_buff *skb, struct genl_info *info) | |||
1908 | mutex_lock(&cfg80211_drv_mutex); | 1908 | mutex_lock(&cfg80211_drv_mutex); |
1909 | r = __regulatory_hint(NULL, REGDOM_SET_BY_USER, data, 0, ENVIRON_ANY); | 1909 | r = __regulatory_hint(NULL, REGDOM_SET_BY_USER, data, 0, ENVIRON_ANY); |
1910 | mutex_unlock(&cfg80211_drv_mutex); | 1910 | mutex_unlock(&cfg80211_drv_mutex); |
1911 | /* This means the regulatory domain was already set, however | ||
1912 | * we don't want to confuse userspace with a "successful error" | ||
1913 | * message so lets just treat it as a success */ | ||
1914 | if (r == -EALREADY) | ||
1915 | r = 0; | ||
1911 | return r; | 1916 | return r; |
1912 | } | 1917 | } |
1913 | 1918 | ||