netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] zd1211: Fix compilation for d80211 hwmode API change
@ 2006-12-15 19:47 Michael Buesch
  0 siblings, 0 replies; only message in thread
From: Michael Buesch @ 2006-12-15 19:47 UTC (permalink / raw)
  To: Jiri Benc; +Cc: John Linville, netdev, dsd, kune

This fixes compilation for the d80211 hwmode API change.

Signed-off-by: Michael Buesch <mb@bu3sch.de>


Index: jbenc-dscape/drivers/net/wireless/d80211/zd1211rw/zd_mac.c
===================================================================
--- jbenc-dscape.orig/drivers/net/wireless/d80211/zd1211rw/zd_mac.c	2006-12-15 15:58:04.000000000 +0100
+++ jbenc-dscape/drivers/net/wireless/d80211/zd1211rw/zd_mac.c	2006-12-15 20:27:38.000000000 +0100
@@ -521,9 +521,6 @@ struct ieee80211_hw *zd_mac_alloc(struct
 		     IEEE80211_HW_WEP_INCLUDE_IV;
 	dev->maxssi = 100;
 
-	dev->num_modes = 2;
-	dev->modes = mac->modes;
-
 	dev->queues = 1;
 	dev->extra_tx_headroom = sizeof(struct zd_ctrlset);
 
Index: jbenc-dscape/drivers/net/wireless/d80211/zd1211rw/zd_mac.h
===================================================================
--- jbenc-dscape.orig/drivers/net/wireless/d80211/zd1211rw/zd_mac.h	2006-12-15 15:58:04.000000000 +0100
+++ jbenc-dscape/drivers/net/wireless/d80211/zd1211rw/zd_mac.h	2006-12-15 20:26:58.000000000 +0100
@@ -137,7 +137,7 @@ struct zd_mac {
 	u8 *hwaddr;
 	struct ieee80211_channel channels[14];
 	struct ieee80211_rate rates[12];
-	struct ieee80211_hw_modes modes[2];
+	struct ieee80211_hw_mode modes[2];
 };
 
 static inline struct zd_mac *zd_dev_mac(struct ieee80211_hw *dev)
Index: jbenc-dscape/drivers/net/wireless/d80211/zd1211rw/zd_usb.c
===================================================================
--- jbenc-dscape.orig/drivers/net/wireless/d80211/zd1211rw/zd_usb.c	2006-12-15 15:58:04.000000000 +0100
+++ jbenc-dscape/drivers/net/wireless/d80211/zd1211rw/zd_usb.c	2006-12-15 20:34:49.000000000 +0100
@@ -1006,7 +1006,7 @@ static int eject_installer(struct usb_in
 
 static int probe(struct usb_interface *intf, const struct usb_device_id *id)
 {
-	int r;
+	int i, r;
 	struct usb_device *udev = interface_to_usbdev(intf);
 	struct ieee80211_hw *dev = NULL;
 
@@ -1064,10 +1064,20 @@ static int probe(struct usb_interface *i
 			 "couldn't register device. Error number %d\n", r);
 		goto error;
 	}
+	for (i = 0; i < 2; i++) {
+		struct zd_mac *mac = zd_dev_mac(dev);
+		r = ieee80211_register_hwmode(dev,
+					      &mac->modes[i]);
+		if (r)
+			goto error_unreg_hw;
+	}
 
 	dev_dbg_f(&intf->dev, "successful\n");
 	dev_info(&intf->dev,"wiphy%d\n", dev->index);
 	return 0;
+
+error_unreg_hw:
+	ieee80211_unregister_hw(dev);
 error:
 	usb_reset_device(interface_to_usbdev(intf));
 	if (dev) {

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-15 19:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-15 19:47 [PATCH] zd1211: Fix compilation for d80211 hwmode API change Michael Buesch

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).