File fix_reg_dom.diff of Package iw

diff -urN BUILD/iw-0.9.4/iw.8 BUILD2/iw-0.9.4/iw.8
--- BUILD/iw-0.9.4/iw.8	2008-09-17 13:28:09.000000000 +0200
+++ BUILD2/iw-0.9.4/iw.8	2008-09-18 09:15:28.000000000 +0200
@@ -13,7 +13,7 @@
 
 .ti -8
 .IR OBJECT " := { "
-.BR dev " | " phy " | " reg " }"
+.BR dev " | " phy " }"
 .sp
 
 .ti -8
diff -urN BUILD/iw-0.9.4/Makefile BUILD2/iw-0.9.4/Makefile
--- BUILD/iw-0.9.4/Makefile	2008-09-17 13:28:09.000000000 +0200
+++ BUILD2/iw-0.9.4/Makefile	2008-09-18 09:15:00.000000000 +0200
@@ -11,7 +11,7 @@
 LDFLAGS += `pkg-config --libs libnl-1`
 NLVERSION = 1.0
 
-OBJS = iw.o info.o phy.o interface.o station.o util.o mpath.o reg.o
+OBJS = iw.o info.o phy.o interface.o station.o util.o mpath.o
 ALL = iw
 
 ifeq ($(V),1)
diff -urN BUILD/iw-0.9.4/reg.c BUILD2/iw-0.9.4/reg.c
--- BUILD/iw-0.9.4/reg.c	2008-09-17 13:28:09.000000000 +0200
+++ BUILD2/iw-0.9.4/reg.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,69 +0,0 @@
-#include <linux/nl80211.h>
-#include <net/if.h>
-#include <errno.h>
-#include <string.h>
-
-#include <netlink/genl/genl.h>
-#include <netlink/genl/family.h>
-#include <netlink/genl/ctrl.h>
-#include <netlink/msg.h>
-#include <netlink/attr.h>
-
-#include "iw.h"
-
-int isalpha_upper(char letter)
-{
-	if (letter >= 65 && letter <= 90)
-		return 1;
-	return 0;
-}
-
-static int is_alpha2(char *alpha2)
-{
-	if (isalpha_upper(alpha2[0]) && isalpha_upper(alpha2[1]))
-		return 1;
-	return 0;
-}
-
-static int is_world_regdom(char *alpha2)
-{
-	/* ASCII 0 */
-	if (alpha2[0] == 48 && alpha2[1] == 48)
-		return 1;
-	return 0;
-}
-
-static int handle_reg_set(struct nl_cb *cb,
-			  struct nl_msg *msg,
-			  int argc, char **argv)
-{
-	char alpha2[3];
-
-	if (argc < 1)
-		return 1;
-
-	if (!is_alpha2(argv[0]) && !is_world_regdom(argv[0])) {
-		fprintf(stderr, "not a valid ISO/IEC 3166-1 alpha2\n");
-		fprintf(stderr, "Special non-alpha2 usable entries:\n");
-		fprintf(stderr, "\t00\tWorld Regulatory domain\n");
-		return 2;
-	}
-
-	alpha2[0] = argv[0][0];
-	alpha2[1] = argv[0][1];
-	alpha2[2] = '\0';
-
-	argc--;
-	argv++;
-
-	if (argc)
-		return 1;
-
-	NLA_PUT_STRING(msg, NL80211_ATTR_REG_ALPHA2, alpha2);
-
-	return 0;
- nla_put_failure:
-	return -ENOBUFS;
-}
-COMMAND(reg, set, "<ISO/IEC 3166-1 alpha2>",
-	NL80211_CMD_REQ_SET_REG, 0, CIB_NONE, handle_reg_set);
openSUSE Build Service is sponsored by