# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../at76c503a/linux-2.6.17.patch
# Copyright (C) 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---

--- at76c503a/at76c503-fw_skel.c.vanilla	2006-07-01 16:41:07.000000000 +0000
+++ at76c503a/at76c503-fw_skel.c	2006-07-01 17:03:19.000000000 +0000
@@ -56,13 +58,12 @@
 /* Module paramaters */
 
 static char netdev_name[IFNAMSIZ+1] = "eth%d";
-MODULE_PARM(netdev_name, "c" __MODULE_STRING(IFNAMSIZ));
+module_param(netdev_name, charp, 0);
 MODULE_PARM_DESC(netdev_name,
                  "network device name (default is eth%d)");
 static int debug = 1;
-MODULE_PARM(debug, "i");
-MODULE_PARM_DESC(debug,
-                 "debug output (default: 1)");
+module_param(debug, int, 0);
+MODULE_PARM_DESC(debug, "debug output (default: 1)");
 
 /* Use our own dbg macro */
 #undef dbg
--- at76c503a/at76c503.c.vanilla	2006-07-01 17:04:21.000000000 +0000
+++ at76c503a/at76c503.c	2006-07-01 17:13:11.000000000 +0000
@@ -310,60 +310,60 @@
 #define DRIVER_DESC "Generic Atmel at76c503/at76c505 routines"
 
 /* Module paramaters */
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 #define DRIVER_AUTHOR \
 "Oliver Kurth, Joerg Albert <joerg.albert@gmx.de>, Alex, Nick Jones, "\
 "Balint Seeber <n0_5p4m_p13453@hotmail.com>"
 MODULE_PARM_DESC(debug, "Debugging level");
 
 static int rx_copybreak = 200;
-MODULE_PARM(rx_copybreak, "i");
+module_param(rx_copybreak, int, 0);
 MODULE_PARM_DESC(rx_copybreak, "rx packet copy threshold");
 
 static int scan_min_time = 10;
-MODULE_PARM(scan_min_time, "i");
+module_param(scan_min_time, int, 0);
 MODULE_PARM_DESC(scan_min_time, "scan min channel time (default: 10)");
 
 static int scan_max_time = 120;
-MODULE_PARM(scan_max_time, "i");
+module_param(scan_max_time, int, 0);
 MODULE_PARM_DESC(scan_max_time, "scan max channel time (default: 120)");
 
 static int scan_mode = SCAN_TYPE_ACTIVE;
-MODULE_PARM(scan_mode, "i");
+module_param(scan_mode, int, 0);
 MODULE_PARM_DESC(scan_mode, "scan mode: 0 active (with ProbeReq, default), 1 passive");
 
 static int preamble_type = PREAMBLE_TYPE_LONG;
-MODULE_PARM(preamble_type, "i");
+module_param (preamble_type, int, 0);
 MODULE_PARM_DESC(preamble_type, "preamble type: 0 long (default), 1 short");
 
 static int auth_mode = 0;
-MODULE_PARM(auth_mode, "i");
+module_param(auth_mode, int, 0);
 MODULE_PARM_DESC(auth_mode, "authentication mode: 0 open system (default), "
 		 "1 shared secret");
 
 static int pm_mode = PM_ACTIVE;
-MODULE_PARM(pm_mode, "i");
+module_param(pm_mode, int, 0);
 MODULE_PARM_DESC(pm_mode, "power management mode: 1 active (def.), 2 powersave, 3 smart save");
 
 static int pm_period = 0;
-MODULE_PARM(pm_period, "i");
+module_param(pm_period, int, 0);
 MODULE_PARM_DESC(pm_period, "period of waking up the device in usec");
 
 static int international_roaming = IR_OFF;
-MODULE_PARM(international_roaming, "i");
+module_param(international_roaming, int, 0);
 MODULE_PARM_DESC(international_roaming, "enable international roaming: 0 (no, default), 1 (yes)");
 
 static int default_iw_mode = IW_MODE_INFRA;
-MODULE_PARM(default_iw_mode, "i");
+module_param(default_iw_mode, int, 0);
 MODULE_PARM_DESC(default_iw_mode, "default IW mode for a new device: "
 		 "1 (ad-hoc), 2 (infrastructure, def.), 6 (monitor mode)");
 
 static int monitor_scan_min_time = 50;
-MODULE_PARM(monitor_scan_min_time, "i");
+module_param(monitor_scan_min_time, int, 0);
 MODULE_PARM_DESC(monitor_scan_min_time, "scan min channel time in MONITOR MODE (default: 50)");
 
 static int monitor_scan_max_time = 600;
-MODULE_PARM(monitor_scan_max_time, "i");
+module_param(monitor_scan_max_time, int, 0);
 MODULE_PARM_DESC(monitor_scan_max_time, "scan max channel time in MONITOR MODE (default: 600)");
 
 #define DEF_RTS_THRESHOLD 1536
@@ -7155,14 +7155,14 @@
 	dbg(DBG_PROC_ENTRY, "%s: ENTER",__FUNCTION__);
 
 	if (dev->flags & AT76C503A_NETDEV_REGISTERED) {
-		if ((sem_taken=down_trylock(&rtnl_sem)) != 0)
-			info("%s: rtnl_sem already down'ed", __FUNCTION__);
+		//if ((sem_taken=down_trylock(&rtnl_sem)) != 0)
+		//	info("%s: rtnl_sem already down'ed", __FUNCTION__);
 
 		/* synchronously calls at76c503_stop() */
 		unregister_netdevice(dev->netdev);
 
-		if (!sem_taken)
-			rtnl_unlock();
+		//if (!sem_taken)
+		//	rtnl_unlock();
 	}
 
 	PUT_DEV(dev->udev);
--- at76c503a/at76_usbdfu.c.vanilla	2006-07-01 17:13:58.000000000 +0000
+++ at76c503a/at76_usbdfu.c	2006-07-01 17:14:08.000000000 +0000
@@ -57,7 +57,7 @@
 #define DRIVER_DESC "USB Device Firmware Upgrade (DFU) handler"
 
 /* Module paramaters */
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "debug enabled (=1)");
 
 /* DFU states */