linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cfg80211: do not pass -EALREADY to userspace on regdomain change request
@ 2009-01-26 17:00 Luis R. Rodriguez
  2009-01-26 17:27 ` Gábor Stefanik
  0 siblings, 1 reply; 3+ messages in thread
From: Luis R. Rodriguez @ 2009-01-26 17:00 UTC (permalink / raw)
  To: johannes, johannes, linville; +Cc: Luis R. Rodriguez, linux-wireless

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>
---
 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 09a5d0f..4baa875 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)
 	mutex_lock(&cfg80211_drv_mutex);
 	r = __regulatory_hint(NULL, REGDOM_SET_BY_USER, data, 0, ENVIRON_ANY);
 	mutex_unlock(&cfg80211_drv_mutex);
+	/* This means the regulatory domain was already set, however
+	 * we don't want to confuse userspace with a "successfull error"
+	 * message so lets just treat it as a success */
+	if (r == -EALREADY)
+		r = 0;
 	return r;
 }
 
-- 
1.5.6.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cfg80211: do not pass -EALREADY to userspace on regdomain change request
  2009-01-26 17:00 [PATCH] cfg80211: do not pass -EALREADY to userspace on regdomain change request Luis R. Rodriguez
@ 2009-01-26 17:27 ` Gábor Stefanik
  2009-01-26 17:31   ` Luis R. Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Gábor Stefanik @ 2009-01-26 17:27 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: johannes, linville, linux-wireless

On Mon, Jan 26, 2009 at 6:00 PM, Luis R. Rodriguez
<lrodriguez@atheros.com> wrote:
> +        * we don't want to confuse userspace with a "successfull error"

Typo.

-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cfg80211: do not pass -EALREADY to userspace on regdomain  change request
  2009-01-26 17:27 ` Gábor Stefanik
@ 2009-01-26 17:31   ` Luis R. Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Luis R. Rodriguez @ 2009-01-26 17:31 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: Luis Rodriguez, johannes@sipsolutions.net, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org

On Mon, Jan 26, 2009 at 09:27:37AM -0800, G=E1bor Stefanik wrote:
> On Mon, Jan 26, 2009 at 6:00 PM, Luis R. Rodriguez
> <lrodriguez@atheros.com> wrote:
> > +        * we don't want to confuse userspace with a "successfull e=
rror"
>=20
> Typo.

successful, thanks.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-26 17:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-26 17:00 [PATCH] cfg80211: do not pass -EALREADY to userspace on regdomain change request Luis R. Rodriguez
2009-01-26 17:27 ` Gábor Stefanik
2009-01-26 17:31   ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).