cfg80211: fix set_regdom() to cancel requests with same alpha2

Use a different error code if the regdomain is same and then
set the request processed so that it doesn't block new
requests.

Git-commit: 959085352b7c44ff9bae4d8a4d76146193260e4c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
Author: Kalle Valo <kvalo@qca.qualcomm.com>
Date: Thu Jul 12 15:33:58 2012 +0300

Change-Id: I8cbcf80bb43d983c72cf9037f30e11ae8d329b06
Signed-off-by: Mihir Shete <smihir@codeaurora.org>
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index b96094c..4d075f3 100755
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2117,7 +2117,7 @@
 		 * checking if the alpha2 changes if CRDA was already called
 		 */
 		if (!regdom_changes(rd->alpha2))
-			return -EINVAL;
+			return -EALREADY;
 	}
 
 	/*
@@ -2242,6 +2242,9 @@
 	/* Note that this doesn't update the wiphys, this is done below */
 	r = __set_regdom(rd);
 	if (r) {
+		if (r == -EALREADY)
+			reg_set_request_processed();
+
 		kfree(rd);
 		mutex_unlock(&reg_mutex);
 		return r;