summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorOyvind Repvik <nail@nslu2-linux.org>2005-10-06 01:55:35 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-10-06 01:55:35 +0000
commit6d06189a635905bfa4d889d2a8f8af0f45df3d72 (patch)
treea1f711829f0fde76a40046e7a16b05e08c24cf73 /packages
parenta9e4f9da6ecb564965ec017ccc764a9d4a44f047 (diff)
zd1211: Fix compilation issues on kernels >=2.6.13
Add iwconfig rate patch remove old cvs version that won't compile
Diffstat (limited to 'packages')
-rw-r--r--packages/zd1211/zd1211-20050315/.mtn2git_empty0
-rw-r--r--packages/zd1211/zd1211-20050315/Makefile.patch15
-rw-r--r--packages/zd1211/zd1211-20050822/access_ok.patch11
-rw-r--r--packages/zd1211/zd1211-20050822/iwconfig-rate.patch126
-rw-r--r--packages/zd1211/zd1211-20050822/urb-async.patch82
-rw-r--r--packages/zd1211/zd1211_20050315.bb32
-rw-r--r--packages/zd1211/zd1211_20050822.bb7
7 files changed, 224 insertions, 49 deletions
diff --git a/packages/zd1211/zd1211-20050315/.mtn2git_empty b/packages/zd1211/zd1211-20050315/.mtn2git_empty
deleted file mode 100644
index e69de29bb2..0000000000
--- a/packages/zd1211/zd1211-20050315/.mtn2git_empty
+++ /dev/null
diff --git a/packages/zd1211/zd1211-20050315/Makefile.patch b/packages/zd1211/zd1211-20050315/Makefile.patch
deleted file mode 100644
index 76e422d476..0000000000
--- a/packages/zd1211/zd1211-20050315/Makefile.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- zd1211/Makefile.orig 2005-08-14 04:50:45.898802688 +0200
-+++ zd1211/Makefile 2005-08-14 04:50:53.134702664 +0200
-@@ -4,9 +4,9 @@
- #
-
- # Some commands
--CC=gcc
--CPP=g++
--LD=ld
-+#CC=gcc
-+#CPP=g++
-+#LD=ld
- RM=rm -f -r
- CVS=cvs
- TAR=tar
diff --git a/packages/zd1211/zd1211-20050822/access_ok.patch b/packages/zd1211/zd1211-20050822/access_ok.patch
new file mode 100644
index 0000000000..95fbb592b0
--- /dev/null
+++ b/packages/zd1211/zd1211-20050822/access_ok.patch
@@ -0,0 +1,11 @@
+--- zd1211/src/zd1205.c.orig 2005-10-06 03:30:27.200837520 +0200
++++ zd1211/src/zd1205.c 2005-10-06 03:29:37.176442384 +0200
+@@ -4434,7 +4434,7 @@
+ { SIOCIWFIRSTPRIV + 0xD, 0, 0, "save_conf" },
+ };
+
+- err = verify_area(VERIFY_WRITE, wrq->u.data.pointer, sizeof(privtab));
++ err = access_ok(VERIFY_WRITE, wrq->u.data.pointer, sizeof(privtab));
+ if (err)
+ break;
+
diff --git a/packages/zd1211/zd1211-20050822/iwconfig-rate.patch b/packages/zd1211/zd1211-20050822/iwconfig-rate.patch
new file mode 100644
index 0000000000..c1cb634b1a
--- /dev/null
+++ b/packages/zd1211/zd1211-20050822/iwconfig-rate.patch
@@ -0,0 +1,126 @@
+--- zd1211/src/zd1205.c 7 Jun 2005 21:45:21 -0000 1.17
++++ zd1211/src/zd1205.c 24 Aug 2005 11:39:29 -0000
+@@ -3599,9 +3599,59 @@
+
+ }
+
++static const unsigned long zd1205_rates[] = {
++ /* RATE_1M, 0 */
++ 1000000,
++ /* RATE_2M, 1 */
++ 2000000,
++ /* RATE_5M, 2 */
++ 5500000,
++ /* RATE_11M, 3 */
++ 11000000,
++ /* RATE_6M, 4 */
++ 600000,
++ /* RATE_9M, 5 */
++ 9000000,
++ /* RATE_12M, 6 */
++ 12000000,
++ /* RATE_18M, 7 */
++ 18000000,
++ /* RATE_24M, 8 */
++ 24000000,
++ /* RATE_36M, 9 */
++ 36000000,
++ /* RATE_48M, 10 */
++ 48000000,
++ /* RATE_54M, 11 */
++ 54000000,
++};
++
++#define ZD1205_NRATES ((sizeof(zd1205_rates))/(sizeof(unsigned long)))
++
+ static int zd1205_ioctl_setrate(struct net_device *dev, struct iw_param *frq)
+ {
+- return 0;
++ struct zd1205_private *macp = dev->priv;
++ U8 rate;
++ if(frq->value < 0) {
++ /* Auto */
++ macp->bFixedRate = 0;
++ macp->AdapterMaxRate = RATE_54M;
++ return 0;
++ }
++ for(rate = 0; rate < ZD1205_NRATES; rate++)
++ if(zd1205_rates[rate] == frq->value) {
++ zd1205_lock(macp);
++ macp->bFixedRate = frq->fixed;
++ if(frq->fixed)
++ macp->cardSetting.FixedRate = rate;
++ else {
++ macp->AdapterMaxRate = rate;
++ macp->cardSetting.TxRate = rate;
++ }
++ zd1205_unlock(macp);
++ return 0;
++ }
++ return -EINVAL;
+ }
+
+ static int zd1205_ioctl_getrate(struct net_device *dev, struct iw_param *frq)
+@@ -3612,60 +3662,9 @@
+ frq->disabled = 0;
+ frq->value = 0;
+
+- switch(macp->cardSetting.CurrTxRate)
+- {
+- case RATE_1M:
+- frq->value = 1000000;
+- break;
+-
+- case RATE_2M:
+- frq->value = 2000000;
+- break;
+-
+- case RATE_5M:
+- frq->value = 5500000;
+- break;
+-
+- case RATE_11M:
+- frq->value = 11000000;
+- break;
+-
+- case RATE_6M:
+- frq->value = 600000;
+- break;
+-
+- case RATE_9M:
+- frq->value = 9000000;
+- break;
+-
+- case RATE_12M:
+- frq->value = 12000000;
+- break;
+-
+- case RATE_18M:
+- frq->value = 18000000;
+- break;
+-
+- case RATE_24M:
+- frq->value = 24000000;
+- break;
+-
+- case RATE_36M:
+- frq->value = 36000000;
+- break;
+-
+- case RATE_48M:
+- frq->value = 48000000;
+- break;
+-
+- case RATE_54M:
+- frq->value = 54000000;
+- break;
+-
+- default:
++ if(macp->cardSetting.CurrTxRate > ZD1205_NRATES)
+ return -EINVAL;
+- }
+-
++ frq->value = zd1205_rates[macp->cardSetting.CurrTxRate];
+ return 0;
+ }
+
diff --git a/packages/zd1211/zd1211-20050822/urb-async.patch b/packages/zd1211/zd1211-20050822/urb-async.patch
new file mode 100644
index 0000000000..cd1149e766
--- /dev/null
+++ b/packages/zd1211/zd1211-20050822/urb-async.patch
@@ -0,0 +1,82 @@
+--- zd1211/src/zd1211.c.orig 2005-03-27 22:47:35.000000000 +0200
++++ zd1211/src/zd1211.c 2005-10-06 02:53:23.380909536 +0200
+@@ -313,7 +313,6 @@
+ } else {
+ usb_fill_bulk_urb(macp->reg_urb, macp->usb,usb_sndbulkpipe(macp->usb, EP_REG_OUT),pBuffer, DataLen,zd1211_reg_cb, macp);
+ }
+- macp->reg_urb->transfer_flags |= URB_ASYNC_UNLINK;
+
+ if ((ret = SUBMIT_URB(macp->reg_urb, GFP_ATOMIC))) {
+ printk(KERN_ERR "zd1211: failed reg_urb\n");
+@@ -362,7 +361,6 @@
+ } else {
+ usb_fill_bulk_urb(macp->reg_urb, macp->usb,usb_sndbulkpipe(macp->usb, EP_REG_OUT),pRegBuffer, bufSize,zd1211_reg_cb, macp);
+ }
+- macp->reg_urb->transfer_flags |= URB_ASYNC_UNLINK;
+ if ((ret = SUBMIT_URB(macp->reg_urb, memflags))) {
+ printk(KERN_ERR "zd1211: failed reg_urb\n");
+ zd1211_DumpErrorCode(macp, ret);
+@@ -426,7 +424,6 @@
+ } else {
+ usb_fill_bulk_urb(macp->reg_urb, macp->usb,usb_sndbulkpipe(macp->usb, EP_REG_OUT),pRegBuffer, bufSize,zd1211_reg_cb, macp);
+ }
+- macp->reg_urb->transfer_flags |= URB_ASYNC_UNLINK;
+
+ if ((ret = SUBMIT_URB(macp->reg_urb, GFP_ATOMIC))) {
+ printk(KERN_ERR "zd1211: failed reg_urb\n");
+@@ -569,7 +566,6 @@
+ usb_fill_bulk_urb(macp->reg_urb, macp->usb,usb_sndbulkpipe(macp->usb, EP_REG_OUT),pRegBuffer, bufSize,zd1211_reg_cb, macp);
+ }
+
+- macp->reg_urb->transfer_flags |= URB_ASYNC_UNLINK;
+ if ((ret = SUBMIT_URB(macp->reg_urb, GFP_ATOMIC))) {
+ printk(KERN_ERR "zd1211: failed reg_urb\n");
+ zd1211_DumpErrorCode(macp, ret);
+@@ -1240,7 +1236,6 @@
+ pRegBuffer, bufSize,
+ zd1211_reg_cb, macp);
+
+- macp->reg_urb->transfer_flags |= URB_ASYNC_UNLINK;
+
+ if ((ret = SUBMIT_URB(macp->reg_urb, GFP_ATOMIC))) {
+ printk(KERN_ERR "zd1211: failed rf reg_urb\n");
+@@ -1311,7 +1306,6 @@
+ return;
+
+ printk("%s: Tx timed out.\n", dev->name);
+- macp->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
+ USB_URB(macp->tx_urb);
+ }
+
+@@ -1384,7 +1378,6 @@
+ zd1211_intr_cb, macp);
+ #endif
+
+- macp->intr_urb->transfer_flags |= URB_ASYNC_UNLINK;
+
+ if ((res = SUBMIT_URB(macp->intr_urb, GFP_KERNEL))) {
+ printk(KERN_ERR "zd1211: failed intr_urb\n");
+@@ -1822,7 +1815,6 @@
+ macp->IntEPBuffer, MAX_EPINT_BUFFER,
+ zd1211_intr_cb, macp);
+
+- macp->intr_urb->transfer_flags |= URB_ASYNC_UNLINK;
+ status = SUBMIT_URB(macp->intr_urb, GFP_ATOMIC);
+
+ if (status)
+@@ -1916,7 +1908,6 @@
+ usb_rcvbulkpipe(macp->usb, EP_DATA_IN),
+ rx_buff, bufLen, zd1211_rx_comp_cb, macp);
+
+- macp->rx_urb->transfer_flags |= URB_ASYNC_UNLINK;
+ if ((res = SUBMIT_URB(macp->rx_urb, GFP_ATOMIC))) {
+ printk(KERN_ERR "zd1211: failed rx_urb\n");
+ zd1211_DumpErrorCode(macp, res);
+@@ -2024,7 +2015,6 @@
+ macp->tx_buff, TotalLength,zd1211_tx_comp_cb, macp);
+
+ macp->tx_urb->transfer_buffer_length = TotalLength;
+- macp->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
+ res = SUBMIT_URB(macp->tx_urb, GFP_ATOMIC);
+ if (res) {
+ printk("error in tx submit urb: %d", res);
diff --git a/packages/zd1211/zd1211_20050315.bb b/packages/zd1211/zd1211_20050315.bb
deleted file mode 100644
index 068839fd34..0000000000
--- a/packages/zd1211/zd1211_20050315.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-DESCRIPTION = "Driver for zd1211 family of wireless USB Dongles"
-PRIORITY = "optional"
-SECTION = "kernel/modules"
-MAINTAINER = "dyoung <dyoung8888@yahoo.com>"
-LICENSE = "GPL"
-PR = "r1"
-
-SRC_URI = "http://download.sourceforge.net/zd1211/sf_zd1211_${PV}_src.tar.gz \
- file://Makefile.patch;patch=1"
-# file://Makefile"
-
-S = "${WORKDIR}/zd1211"
-
-inherit module
-
-#do_compile_prepend() {
-# cp -f ${WORKDIR}/Makefile ${S}/
-#}
-
-do_compile () {
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP
- oe_runmake 'KSRC=${STAGING_KERNEL_DIR}' \
- 'KDIR=${STAGING_KERNEL_DIR}' \
- 'CC="${KERNEL_CC}"' \
- 'LD="${KERNEL_LD}"'
-}
-
-do_install() {
- install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net
- install -m 0644 *${KERNEL_OBJECT_SUFFIX} ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net
-}
-
diff --git a/packages/zd1211/zd1211_20050822.bb b/packages/zd1211/zd1211_20050822.bb
index cc1cc9f8f7..917706ee34 100644
--- a/packages/zd1211/zd1211_20050822.bb
+++ b/packages/zd1211/zd1211_20050822.bb
@@ -3,11 +3,14 @@ PRIORITY = "optional"
SECTION = "kernel/modules"
MAINTAINER = "dyoung <dyoung8888@yahoo.com>"
LICENSE = "GPL"
-PR = "r2"
+PR = "r3"
RDEPENDS = "wireless-tools"
SRC_URI = "http://download.sourceforge.net/zd1211/sf_zd1211_${PV}_src.tar.gz \
- file://makefile.patch;patch=1"
+ file://makefile.patch;patch=1 \
+ file://iwconfig-rate.patch;patch=1 \
+ file://access_ok.patch;patch=1 \
+ file://urb-async.patch;patch=1"
S = "${WORKDIR}/zd1211"