Subject: [patch 2/5] d80211: fix multiple device support

From: David Kimdon <[email-masked]>
Date: Tue, 22 Aug 2006 10:33:17 -0700

Fix interpretation of dev_alloc_name() return value.  dev_alloc_name()
returns the number of the unit assigned or a negative errno code.

Signed-off-by: David Kimdon <[email-masked]>

Index: wireless-dev/net/d80211/ieee80211_iface.c
===================================================================
--- wireless-dev.orig/net/d80211/ieee80211_iface.c
+++ wireless-dev/net/d80211/ieee80211_iface.c
@@ -64,7 +64,7 @@ int ieee80211_if_add(struct net_device *
 		} while (i < 10000);
 	} else if (format) {
 		ret = dev_alloc_name(ndev, name);
-		if (ret)
+		if (ret < 0)
 			goto fail;
 	} else {
 		snprintf(ndev->name, IFNAMSIZ, "%s", name);

--