diff options
| author | Richard Henderson <rth@dorothy.sfbay.redhat.com> | 2003-02-18 03:06:22 -0800 |
|---|---|---|
| committer | Richard Henderson <rth@dorothy.sfbay.redhat.com> | 2003-02-18 03:06:22 -0800 |
| commit | dfbf23a3c3fcddadac93be5d00d04aa5d150f348 (patch) | |
| tree | bc7f73c65a0521ffd04aec0620c047f48b134352 | |
| parent | a377062a9968e56605296b2714a39378c0e3a590 (diff) | |
| parent | 6aa909bef3009a7b3c4548c3d4b91b796c89b73c (diff) | |
Merge dorothy.sfbay.redhat.com:/dorothy/rth/linux/linus-2.5
into dorothy.sfbay.redhat.com:/dorothy/rth/linux/op-2.5
188 files changed, 5589 insertions, 12035 deletions
@@ -2746,6 +2746,14 @@ E: wsalamon@tislabs.com E: wsalamon@nai.com D: portions of the Linux Security Module (LSM) framework and security modules +N: Duncan Sands +E: duncan.sands@wanadoo.fr +W: http://topo.math.u-psud.fr/~sands +D: Alcatel SpeedTouch USB driver +S: 69 rue Dunois +S: 75013 Paris +S: France + N: Robert Sanders E: gt8134b@prism.gatech.edu D: Dosemu diff --git a/Documentation/networking/8139too.txt b/Documentation/networking/8139too.txt index 6ef55e0a44b8..894b23ddf305 100644 --- a/Documentation/networking/8139too.txt +++ b/Documentation/networking/8139too.txt @@ -93,6 +93,8 @@ Tested Adapters --------------- AOpen ALN-325C AT-2500TX 10/100 PCI Fast Ethernet Network Adapter Card +Cnet CNF401 'SinglePoint' 10/100 Base-TX +Genius GF 100TXR4 Fast Ethernet 10/100M PCI Network Card KTI KF-230TX KTI KF-230TX/2 Lantech FastNet TX diff --git a/MAINTAINERS b/MAINTAINERS index 60ba69b973b1..ecf696ef3a57 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -215,6 +215,14 @@ M: Juergen Fischer <fischer@norbit.de> L: linux-scsi@vger.kernel.org S: Maintained +ALCATEL SPEEDTOUCH USB DRIVER +P: Duncan Sands +M: duncan.sands@wanadoo.fr +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net +W: http://www.linux-usb.org/SpeedTouch/ +S: Maintained + ALPHA PORT P: Richard Henderson M: rth@twiddle.net diff --git a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c index 90f14e4c3b31..93244d036138 100644 --- a/arch/i386/kernel/i386_ksyms.c +++ b/arch/i386/kernel/i386_ksyms.c @@ -104,6 +104,7 @@ EXPORT_SYMBOL_NOVERS(__up_wakeup); /* Networking helper routines. */ EXPORT_SYMBOL(csum_partial_copy_generic); /* Delay loops */ +EXPORT_SYMBOL(__ndelay); EXPORT_SYMBOL(__udelay); EXPORT_SYMBOL(__delay); EXPORT_SYMBOL(__const_udelay); diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index e2dd7df86023..c7164ac8d374 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c @@ -1027,8 +1027,19 @@ void __init mp_config_ioapic_for_sci(int irq) while ((void *) entry < madt_end) { if (entry->header.type == ACPI_MADT_INT_SRC_OVR && - acpi_fadt.sci_int == entry->global_irq) - return; + acpi_fadt.sci_int == entry->bus_irq) { + /* + * See the note at the end of ACPI 2.0b section + * 5.2.10.8 for what this is about. + */ + if (entry->bus_irq != entry->global_irq) { + acpi_fadt.sci_int = entry->global_irq; + irq = entry->global_irq; + break; + } + else + return; + } entry = (struct acpi_table_int_src_ovr *) ((unsigned long) entry + entry->header.length); diff --git a/arch/i386/lib/delay.c b/arch/i386/lib/delay.c index 55eae89750e7..a678560d383f 100644 --- a/arch/i386/lib/delay.c +++ b/arch/i386/lib/delay.c @@ -41,3 +41,8 @@ void __udelay(unsigned long usecs) { __const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */ } + +void __ndelay(unsigned long nsecs) +{ + __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ +} diff --git a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c index 87f938a9115d..787d4467169f 100644 --- a/drivers/acpi/dispatcher/dsfield.c +++ b/drivers/acpi/dispatcher/dsfield.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/dispatcher/dsinit.c b/drivers/acpi/dispatcher/dsinit.c index cd82a2146bd5..4bf51506bb47 100644 --- a/drivers/acpi/dispatcher/dsinit.c +++ b/drivers/acpi/dispatcher/dsinit.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index f687aed094d9..8ecdf4cc0a13 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c index 1bfa5de9fe28..02aef585b532 100644 --- a/drivers/acpi/dispatcher/dsmthdat.c +++ b/drivers/acpi/dispatcher/dsmthdat.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c index 24a919a202b2..c830ce9d3c4c 100644 --- a/drivers/acpi/dispatcher/dsobject.c +++ b/drivers/acpi/dispatcher/dsobject.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c index 257b5ce86e02..b004b33489e7 100644 --- a/drivers/acpi/dispatcher/dsopcode.c +++ b/drivers/acpi/dispatcher/dsopcode.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c index a41c7422702e..e17de4e52fae 100644 --- a/drivers/acpi/dispatcher/dsutils.c +++ b/drivers/acpi/dispatcher/dsutils.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c index fef0fc9148b0..c950018d5f62 100644 --- a/drivers/acpi/dispatcher/dswexec.c +++ b/drivers/acpi/dispatcher/dswexec.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c index 4d7744f8643a..a33f4ffc3e9c 100644 --- a/drivers/acpi/dispatcher/dswload.c +++ b/drivers/acpi/dispatcher/dswload.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/dispatcher/dswscope.c b/drivers/acpi/dispatcher/dswscope.c index ea666345819d..d65bcd0dfb7d 100644 --- a/drivers/acpi/dispatcher/dswscope.c +++ b/drivers/acpi/dispatcher/dswscope.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c index d53a4f665f03..77298c6d56f9 100644 --- a/drivers/acpi/dispatcher/dswstate.c +++ b/drivers/acpi/dispatcher/dswstate.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c index 2eaa03e4130e..58848dcd19a4 100644 --- a/drivers/acpi/events/evevent.c +++ b/drivers/acpi/events/evevent.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #include <acpi/acpi.h> diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c index a13e6ab05c4e..bf8ba0e85b1b 100644 --- a/drivers/acpi/events/evgpe.c +++ b/drivers/acpi/events/evgpe.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #include <acpi/acpi.h> @@ -255,7 +274,7 @@ acpi_ev_gpe_initialize (void) ACPI_HIDWORD (acpi_gbl_gpe_block_info[gpe_block].block_address->address), ACPI_LODWORD (acpi_gbl_gpe_block_info[gpe_block].block_address->address))); - ACPI_REPORT_INFO (("GPE Block%d defined as GPE%d to GPE%d\n", + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "GPE Block%d defined as GPE%d to GPE%d\n", (s32) gpe_block, (u32) acpi_gbl_gpe_block_info[gpe_block].block_base_number, (u32) (acpi_gbl_gpe_block_info[gpe_block].block_base_number + @@ -307,7 +326,7 @@ acpi_ev_save_method_info ( void **return_value) { u32 gpe_number; - u32 gpe_number_index; + struct acpi_gpe_number_info *gpe_number_info; char name[ACPI_NAME_SIZE + 1]; u8 type; acpi_status status; @@ -357,19 +376,22 @@ acpi_ev_save_method_info ( /* Get GPE index and ensure that we have a valid GPE number */ - gpe_number_index = acpi_ev_get_gpe_number_index (gpe_number); - if (gpe_number_index == ACPI_GPE_INVALID) { + gpe_number_info = acpi_ev_get_gpe_number_info (gpe_number); + if (!gpe_number_info) { /* Not valid, all we can do here is ignore it */ + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "GPE number associated with method is not valid %s\n", + name)); return (AE_OK); } /* - * Now we can add this information to the gpe_info block + * Now we can add this information to the gpe_number_info block * for use during dispatch of this GPE. */ - acpi_gbl_gpe_number_info [gpe_number_index].type = type; - acpi_gbl_gpe_number_info [gpe_number_index].method_node = (struct acpi_namespace_node *) obj_handle; + gpe_number_info->type = type; + gpe_number_info->method_node = (struct acpi_namespace_node *) obj_handle; /* * Enable the GPE (SCIs should be disabled at this point) @@ -532,7 +554,7 @@ acpi_ev_asynch_execute_gpe_method ( { u32 gpe_number = (u32) ACPI_TO_INTEGER (context); u32 gpe_number_index; - struct acpi_gpe_number_info gpe_info; + struct acpi_gpe_number_info gpe_number_info; acpi_status status; @@ -553,26 +575,26 @@ acpi_ev_asynch_execute_gpe_method ( return_VOID; } - gpe_info = acpi_gbl_gpe_number_info [gpe_number_index]; + gpe_number_info = acpi_gbl_gpe_number_info [gpe_number_index]; status = acpi_ut_release_mutex (ACPI_MTX_EVENTS); if (ACPI_FAILURE (status)) { return_VOID; } - if (gpe_info.method_node) { + if (gpe_number_info.method_node) { /* * Invoke the GPE Method (_Lxx, _Exx): * (Evaluate the _Lxx/_Exx control method that corresponds to this GPE.) */ - status = acpi_ns_evaluate_by_handle (gpe_info.method_node, NULL, NULL); + status = acpi_ns_evaluate_by_handle (gpe_number_info.method_node, NULL, NULL); if (ACPI_FAILURE (status)) { ACPI_REPORT_ERROR (("%s while evaluating method [%4.4s] for GPE[%2.2X]\n", acpi_format_exception (status), - gpe_info.method_node->name.ascii, gpe_number)); + gpe_number_info.method_node->name.ascii, gpe_number)); } } - if (gpe_info.type & ACPI_EVENT_LEVEL_TRIGGERED) { + if (gpe_number_info.type & ACPI_EVENT_LEVEL_TRIGGERED) { /* * GPE is level-triggered, we clear the GPE status bit after handling * the event. @@ -609,31 +631,28 @@ u32 acpi_ev_gpe_dispatch ( u32 gpe_number) { - u32 gpe_number_index; - struct acpi_gpe_number_info *gpe_info; + struct acpi_gpe_number_info *gpe_number_info; acpi_status status; ACPI_FUNCTION_TRACE ("ev_gpe_dispatch"); - gpe_number_index = acpi_ev_get_gpe_number_index (gpe_number); - if (gpe_number_index == ACPI_GPE_INVALID) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "GPE[%X] is not a valid event\n", gpe_number)); - return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); - } - /* - * We don't have to worry about mutex on gpe_info because we are + * We don't have to worry about mutex on gpe_number_info because we are * executing at interrupt level. */ - gpe_info = &acpi_gbl_gpe_number_info [gpe_number_index]; + gpe_number_info = acpi_ev_get_gpe_number_info (gpe_number); + if (!gpe_number_info) { + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "GPE[%X] is not a valid event\n", gpe_number)); + return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); + } /* * If edge-triggered, clear the GPE status bit now. Note that * level-triggered events are cleared after the GPE is serviced. */ - if (gpe_info->type & ACPI_EVENT_EDGE_TRIGGERED) { + if (gpe_number_info->type & ACPI_EVENT_EDGE_TRIGGERED) { status = acpi_hw_clear_gpe (gpe_number); if (ACPI_FAILURE (status)) { ACPI_REPORT_ERROR (("acpi_ev_gpe_dispatch: Unable to clear GPE[%2.2X]\n", gpe_number)); @@ -648,12 +667,12 @@ acpi_ev_gpe_dispatch ( * If there is neither a handler nor a method, we disable the level to * prevent further events from coming in here. */ - if (gpe_info->handler) { + if (gpe_number_info->handler) { /* Invoke the installed handler (at interrupt level) */ - gpe_info->handler (gpe_info->context); + gpe_number_info->handler (gpe_number_info->context); } - else if (gpe_info->method_node) { + else if (gpe_number_info->method_node) { /* * Disable GPE, so it doesn't keep firing before the method has a * chance to run. @@ -692,7 +711,7 @@ acpi_ev_gpe_dispatch ( /* * It is now safe to clear level-triggered evnets. */ - if (gpe_info->type & ACPI_EVENT_LEVEL_TRIGGERED) { + if (gpe_number_info->type & ACPI_EVENT_LEVEL_TRIGGERED) { status = acpi_hw_clear_gpe (gpe_number); if (ACPI_FAILURE (status)) { ACPI_REPORT_ERROR (("acpi_ev_gpe_dispatch: Unable to clear GPE[%2.2X]\n", gpe_number)); diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c index 75b12ded1322..d268a3589e2f 100644 --- a/drivers/acpi/events/evmisc.c +++ b/drivers/acpi/events/evmisc.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #include <acpi/acpi.h> @@ -67,27 +86,53 @@ acpi_ev_is_notify_object ( /******************************************************************************* * - * FUNCTION: acpi_ev_get_gpe_register_index + * FUNCTION: acpi_ev_get_gpe_register_info * * PARAMETERS: gpe_number - Raw GPE number * - * RETURN: None. + * RETURN: Pointer to the info struct for this GPE register. * * DESCRIPTION: Returns the register index (index into the GPE register info * table) associated with this GPE. * ******************************************************************************/ -u32 -acpi_ev_get_gpe_register_index ( +struct acpi_gpe_register_info * +acpi_ev_get_gpe_register_info ( u32 gpe_number) { if (gpe_number > acpi_gbl_gpe_number_max) { - return (ACPI_GPE_INVALID); + return (NULL); + } + + return (&acpi_gbl_gpe_register_info [ACPI_DIV_8 (acpi_gbl_gpe_number_to_index[gpe_number].number_index)]); +} + + +/******************************************************************************* + * + * FUNCTION: acpi_ev_get_gpe_number_info + * + * PARAMETERS: gpe_number - Raw GPE number + * + * RETURN: None. + * + * DESCRIPTION: Returns the number index (index into the GPE number info table) + * associated with this GPE. + * + ******************************************************************************/ + +struct acpi_gpe_number_info * +acpi_ev_get_gpe_number_info ( + u32 gpe_number) +{ + + if (gpe_number > acpi_gbl_gpe_number_max) { + return (NULL); } - return (ACPI_DIV_8 (acpi_gbl_gpe_number_to_index[gpe_number].number_index)); + return (&acpi_gbl_gpe_number_info [acpi_gbl_gpe_number_to_index[gpe_number].number_index]); } diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c index 23e208b19031..57b7db37469b 100644 --- a/drivers/acpi/events/evregion.c +++ b/drivers/acpi/events/evregion.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c index 64fd8ad26585..f348a12b47f1 100644 --- a/drivers/acpi/events/evrgnini.c +++ b/drivers/acpi/events/evrgnini.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/events/evsci.c b/drivers/acpi/events/evsci.c index e202c1883be6..6ff37930215a 100644 --- a/drivers/acpi/events/evsci.c +++ b/drivers/acpi/events/evsci.c @@ -6,21 +6,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #include <acpi/acpi.h> diff --git a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c index 029487be5619..c85806d1bb4c 100644 --- a/drivers/acpi/events/evxface.c +++ b/drivers/acpi/events/evxface.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ @@ -473,7 +492,7 @@ acpi_install_gpe_handler ( void *context) { acpi_status status; - u32 gpe_number_index; + struct acpi_gpe_number_info *gpe_number_info; ACPI_FUNCTION_TRACE ("acpi_install_gpe_handler"); @@ -487,8 +506,8 @@ acpi_install_gpe_handler ( /* Ensure that we have a valid GPE number */ - gpe_number_index = acpi_ev_get_gpe_number_index (gpe_number); - if (gpe_number_index == ACPI_GPE_INVALID) { + gpe_number_info = acpi_ev_get_gpe_number_info (gpe_number); + if (!gpe_number_info) { return_ACPI_STATUS (AE_BAD_PARAMETER); } @@ -499,16 +518,16 @@ acpi_install_gpe_handler ( /* Make sure that there isn't a handler there already */ - if (acpi_gbl_gpe_number_info[gpe_number_index].handler) { + if (gpe_number_info->handler) { status = AE_ALREADY_EXISTS; goto cleanup; } /* Install the handler */ - acpi_gbl_gpe_number_info[gpe_number_index].handler = handler; - acpi_gbl_gpe_number_info[gpe_number_index].context = context; - acpi_gbl_gpe_number_info[gpe_number_index].type = (u8) type; + gpe_number_info->handler = handler; + gpe_number_info->context = context; + gpe_number_info->type = (u8) type; /* Clear the GPE (of stale events), the enable it */ @@ -545,7 +564,7 @@ acpi_remove_gpe_handler ( acpi_gpe_handler handler) { acpi_status status; - u32 gpe_number_index; + struct acpi_gpe_number_info *gpe_number_info; ACPI_FUNCTION_TRACE ("acpi_remove_gpe_handler"); @@ -559,8 +578,8 @@ acpi_remove_gpe_handler ( /* Ensure that we have a valid GPE number */ - gpe_number_index = acpi_ev_get_gpe_number_index (gpe_number); - if (gpe_number_index == ACPI_GPE_INVALID) { + gpe_number_info = acpi_ev_get_gpe_number_info (gpe_number); + if (!gpe_number_info) { return_ACPI_STATUS (AE_BAD_PARAMETER); } @@ -578,7 +597,7 @@ acpi_remove_gpe_handler ( /* Make sure that the installed handler is the same */ - if (acpi_gbl_gpe_number_info[gpe_number_index].handler != handler) { + if (gpe_number_info->handler != handler) { (void) acpi_hw_enable_gpe (gpe_number); status = AE_BAD_PARAMETER; goto cleanup; @@ -586,8 +605,8 @@ acpi_remove_gpe_handler ( /* Remove the handler */ - acpi_gbl_gpe_number_info[gpe_number_index].handler = NULL; - acpi_gbl_gpe_number_info[gpe_number_index].context = NULL; + gpe_number_info->handler = NULL; + gpe_number_info->context = NULL; cleanup: diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c index 36b539562fe0..7d1e275d64c1 100644 --- a/drivers/acpi/events/evxfevnt.c +++ b/drivers/acpi/events/evxfevnt.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/events/evxfregn.c b/drivers/acpi/events/evxfregn.c index 8b7f87277a51..76a14f18fe6e 100644 --- a/drivers/acpi/events/evxfregn.c +++ b/drivers/acpi/events/evxfregn.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 120c6146940c..d7764149b894 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ @@ -313,7 +332,6 @@ acpi_ex_load_op ( break; - case ACPI_TYPE_BUFFER_FIELD: case ACPI_TYPE_LOCAL_REGION_FIELD: case ACPI_TYPE_LOCAL_BANK_FIELD: case ACPI_TYPE_LOCAL_INDEX_FIELD: diff --git a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c index bce95fe274e9..194dcd58919b 100644 --- a/drivers/acpi/executer/exconvrt.c +++ b/drivers/acpi/executer/exconvrt.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c index 63cf8ebe67aa..a01199d7da93 100644 --- a/drivers/acpi/executer/excreate.c +++ b/drivers/acpi/executer/excreate.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index 9775c2faa429..5d63a6383ebf 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exfield.c b/drivers/acpi/executer/exfield.c index ebb4a591a0ed..906772cf52d6 100644 --- a/drivers/acpi/executer/exfield.c +++ b/drivers/acpi/executer/exfield.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c index 70b1effb66fe..8123433c048a 100644 --- a/drivers/acpi/executer/exfldio.c +++ b/drivers/acpi/executer/exfldio.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c index 0c4210542b86..0491e6316a22 100644 --- a/drivers/acpi/executer/exmisc.c +++ b/drivers/acpi/executer/exmisc.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c index e187fd9fe7c5..d822710f410d 100644 --- a/drivers/acpi/executer/exmutex.c +++ b/drivers/acpi/executer/exmutex.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c index 8c34cf35fed0..25420a26cd89 100644 --- a/drivers/acpi/executer/exnames.c +++ b/drivers/acpi/executer/exnames.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index a527b3043807..757ef213ede5 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c index a0289743fc34..625643dfea08 100644 --- a/drivers/acpi/executer/exoparg2.c +++ b/drivers/acpi/executer/exoparg2.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exoparg3.c b/drivers/acpi/executer/exoparg3.c index b5d799d7eff3..98d5bf3d2b2e 100644 --- a/drivers/acpi/executer/exoparg3.c +++ b/drivers/acpi/executer/exoparg3.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exoparg6.c b/drivers/acpi/executer/exoparg6.c index e663d6f39cad..74b357f7d277 100644 --- a/drivers/acpi/executer/exoparg6.c +++ b/drivers/acpi/executer/exoparg6.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c index 91f9e06a84ac..3f0c00f189c9 100644 --- a/drivers/acpi/executer/exprep.c +++ b/drivers/acpi/executer/exprep.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c index c2062ef3b331..33adf721dc9b 100644 --- a/drivers/acpi/executer/exregion.c +++ b/drivers/acpi/executer/exregion.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c index 47fcc4b82184..8b6da6099a41 100644 --- a/drivers/acpi/executer/exresnte.c +++ b/drivers/acpi/executer/exresnte.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c index dfda56af6957..38f220cc0c4a 100644 --- a/drivers/acpi/executer/exresolv.c +++ b/drivers/acpi/executer/exresolv.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c index a8a781c16ae5..f1a320df454b 100644 --- a/drivers/acpi/executer/exresop.c +++ b/drivers/acpi/executer/exresop.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ @@ -345,13 +364,6 @@ acpi_ex_resolve_operands ( type_needed = ACPI_TYPE_EVENT; break; - case ARGI_REGION: - - /* Need an operand of type ACPI_TYPE_REGION */ - - type_needed = ACPI_TYPE_REGION; - break; - case ARGI_PACKAGE: /* Package */ /* Need an operand of type ACPI_TYPE_PACKAGE */ @@ -458,6 +470,37 @@ acpi_ex_resolve_operands ( goto next_operand; + case ARGI_BUFFER_OR_STRING: + + /* Need an operand of type STRING or BUFFER */ + + switch (ACPI_GET_OBJECT_TYPE (obj_desc)) { + case ACPI_TYPE_STRING: + case ACPI_TYPE_BUFFER: + + /* Valid operand */ + break; + + case ACPI_TYPE_INTEGER: + + /* Highest priority conversion is to type Buffer */ + + status = acpi_ex_convert_to_buffer (obj_desc, stack_ptr, walk_state); + if (ACPI_FAILURE (status)) { + return_ACPI_STATUS (status); + } + break; + + default: + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "Needed [Integer/String/Buffer], found [%s] %p\n", + acpi_ut_get_object_type_name (obj_desc), obj_desc)); + + return_ACPI_STATUS (AE_AML_OPERAND_TYPE); + } + goto next_operand; + + case ARGI_DATAOBJECT: /* * ARGI_DATAOBJECT is only used by the size_of operator. @@ -477,7 +520,7 @@ acpi_ex_resolve_operands ( default: ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Needed [Buf/Str/Pkg], found [%s] %p\n", + "Needed [Buffer/String/Package/Reference], found [%s] %p\n", acpi_ut_get_object_type_name (obj_desc), obj_desc)); return_ACPI_STATUS (AE_AML_OPERAND_TYPE); @@ -499,7 +542,30 @@ acpi_ex_resolve_operands ( default: ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Needed [Buf/Str/Pkg], found [%s] %p\n", + "Needed [Buffer/String/Package], found [%s] %p\n", + acpi_ut_get_object_type_name (obj_desc), obj_desc)); + + return_ACPI_STATUS (AE_AML_OPERAND_TYPE); + } + goto next_operand; + + + case ARGI_REGION_OR_FIELD: + + /* Need an operand of type ACPI_TYPE_REGION or a FIELD in a region */ + + switch (ACPI_GET_OBJECT_TYPE (obj_desc)) { + case ACPI_TYPE_REGION: + case ACPI_TYPE_LOCAL_REGION_FIELD: + case ACPI_TYPE_LOCAL_BANK_FIELD: + case ACPI_TYPE_LOCAL_INDEX_FIELD: + + /* Valid operand */ + break; + + default: + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "Needed [Region/region_field], found [%s] %p\n", acpi_ut_get_object_type_name (obj_desc), obj_desc)); return_ACPI_STATUS (AE_AML_OPERAND_TYPE); diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c index 5528e84c5c02..acd9da27a3ac 100644 --- a/drivers/acpi/executer/exstore.c +++ b/drivers/acpi/executer/exstore.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c index 3f5854c0721b..7c9e28c3ff0e 100644 --- a/drivers/acpi/executer/exstoren.c +++ b/drivers/acpi/executer/exstoren.c @@ -7,21 +7,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c index efdfb3065933..62e428cc0a3e 100644 --- a/drivers/acpi/executer/exstorob.c +++ b/drivers/acpi/executer/exstorob.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exsystem.c b/drivers/acpi/executer/exsystem.c index 9571641d6532..ea3dbe74ef58 100644 --- a/drivers/acpi/executer/exsystem.c +++ b/drivers/acpi/executer/exsystem.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c index f923e2b822bd..090684c6ea16 100644 --- a/drivers/acpi/executer/exutils.c +++ b/drivers/acpi/executer/exutils.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/hardware/hwacpi.c b/drivers/acpi/hardware/hwacpi.c index fbcef6fdab68..b1bea4332ce6 100644 --- a/drivers/acpi/hardware/hwacpi.c +++ b/drivers/acpi/hardware/hwacpi.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c index d37b9e1f40fb..3d0d9c8c6c5a 100644 --- a/drivers/acpi/hardware/hwgpe.c +++ b/drivers/acpi/hardware/hwgpe.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #include <acpi/acpi.h> @@ -67,34 +86,34 @@ acpi_hw_enable_gpe ( u32 gpe_number) { u32 in_byte; - u32 register_index; - u8 bit_mask; acpi_status status; + struct acpi_gpe_register_info *gpe_register_info; ACPI_FUNCTION_ENTRY (); - /* Translate GPE number to index into global registers array. */ - - register_index = acpi_ev_get_gpe_register_index (gpe_number); - - /* Get the register bitmask for this GPE */ + /* Get the info block for the entire GPE register */ - bit_mask = acpi_hw_get_gpe_bit_mask (gpe_number); + gpe_register_info = acpi_ev_get_gpe_register_info (gpe_number); + if (!gpe_register_info) { + return (AE_BAD_PARAMETER); + } /* * Read the current value of the register, set the appropriate bit * to enable the GPE, and write out the new register. */ status = acpi_hw_low_level_read (8, &in_byte, - &acpi_gbl_gpe_register_info[register_index].enable_address, 0); + &gpe_register_info->enable_address, 0); if (ACPI_FAILURE (status)) { return (status); } - status = acpi_hw_low_level_write (8, (in_byte | bit_mask), - &acpi_gbl_gpe_register_info[register_index].enable_address, 0); + /* Write with the new GPE bit enabled */ + + status = acpi_hw_low_level_write (8, (in_byte | acpi_hw_get_gpe_bit_mask (gpe_number)), + &gpe_register_info->enable_address, 0); return (status); } @@ -117,25 +136,23 @@ void acpi_hw_enable_gpe_for_wakeup ( u32 gpe_number) { - u32 register_index; - u8 bit_mask; + struct acpi_gpe_register_info *gpe_register_info; ACPI_FUNCTION_ENTRY (); - /* Translate GPE number to index into global registers array. */ + /* Get the info block for the entire GPE register */ - register_index = acpi_ev_get_gpe_register_index (gpe_number); - - /* Get the register bitmask for this GPE */ - - bit_mask = acpi_hw_get_gpe_bit_mask (gpe_number); + gpe_register_info = acpi_ev_get_gpe_register_info (gpe_number); + if (!gpe_register_info) { + return; + } /* * Set the bit so we will not disable this when sleeping */ - acpi_gbl_gpe_register_info[register_index].wake_enable |= bit_mask; + gpe_register_info->wake_enable |= acpi_hw_get_gpe_bit_mask (gpe_number); } @@ -156,34 +173,34 @@ acpi_hw_disable_gpe ( u32 gpe_number) { u32 in_byte; - u32 register_index; - u8 bit_mask; acpi_status status; + struct acpi_gpe_register_info *gpe_register_info; ACPI_FUNCTION_ENTRY (); - /* Translate GPE number to index into global registers array. */ + /* Get the info block for the entire GPE register */ - register_index = acpi_ev_get_gpe_register_index (gpe_number); - - /* Get the register bitmask for this GPE */ - - bit_mask = acpi_hw_get_gpe_bit_mask (gpe_number); + gpe_register_info = acpi_ev_get_gpe_register_info (gpe_number); + if (!gpe_register_info) { + return (AE_BAD_PARAMETER); + } /* * Read the current value of the register, clear the appropriate bit, * and write out the new register value to disable the GPE. */ status = acpi_hw_low_level_read (8, &in_byte, - &acpi_gbl_gpe_register_info[register_index].enable_address, 0); + &gpe_register_info->enable_address, 0); if (ACPI_FAILURE (status)) { return (status); } - status = acpi_hw_low_level_write (8, (in_byte & ~bit_mask), - &acpi_gbl_gpe_register_info[register_index].enable_address, 0); + /* Write the byte with this GPE bit cleared */ + + status = acpi_hw_low_level_write (8, (in_byte & ~(acpi_hw_get_gpe_bit_mask (gpe_number))), + &gpe_register_info->enable_address, 0); if (ACPI_FAILURE (status)) { return (status); } @@ -210,25 +227,23 @@ void acpi_hw_disable_gpe_for_wakeup ( u32 gpe_number) { - u32 register_index; - u8 bit_mask; + struct acpi_gpe_register_info *gpe_register_info; ACPI_FUNCTION_ENTRY (); - /* Translate GPE number to index into global registers array. */ - - register_index = acpi_ev_get_gpe_register_index (gpe_number); + /* Get the info block for the entire GPE register */ - /* Get the register bitmask for this GPE */ - - bit_mask = acpi_hw_get_gpe_bit_mask (gpe_number); + gpe_register_info = acpi_ev_get_gpe_register_info (gpe_number); + if (!gpe_register_info) { + return; + } /* * Clear the bit so we will disable this when sleeping */ - acpi_gbl_gpe_register_info[register_index].wake_enable &= ~bit_mask; + gpe_register_info->wake_enable &= ~(acpi_hw_get_gpe_bit_mask (gpe_number)); } @@ -248,28 +263,26 @@ acpi_status acpi_hw_clear_gpe ( u32 gpe_number) { - u32 register_index; - u8 bit_mask; acpi_status status; + struct acpi_gpe_register_info *gpe_register_info; ACPI_FUNCTION_ENTRY (); - /* Translate GPE number to index into global registers array. */ - - register_index = acpi_ev_get_gpe_register_index (gpe_number); + /* Get the info block for the entire GPE register */ - /* Get the register bitmask for this GPE */ - - bit_mask = acpi_hw_get_gpe_bit_mask (gpe_number); + gpe_register_info = acpi_ev_get_gpe_register_info (gpe_number); + if (!gpe_register_info) { + return (AE_BAD_PARAMETER); + } /* * Write a one to the appropriate bit in the status register to * clear this GPE. */ - status = acpi_hw_low_level_write (8, bit_mask, - &acpi_gbl_gpe_register_info[register_index].status_address, 0); + status = acpi_hw_low_level_write (8, acpi_hw_get_gpe_bit_mask (gpe_number), + &gpe_register_info->status_address, 0); return (status); } @@ -292,11 +305,11 @@ acpi_hw_get_gpe_status ( u32 gpe_number, acpi_event_status *event_status) { - u32 in_byte = 0; - u32 register_index = 0; - u8 bit_mask = 0; + u32 in_byte; + u8 bit_mask; struct acpi_gpe_register_info *gpe_register_info; acpi_status status; + acpi_event_status local_event_status = 0; ACPI_FUNCTION_ENTRY (); @@ -306,12 +319,12 @@ acpi_hw_get_gpe_status ( return (AE_BAD_PARAMETER); } - (*event_status) = 0; + /* Get the info block for the entire GPE register */ - /* Translate GPE number to index into global registers array. */ - - register_index = acpi_ev_get_gpe_register_index (gpe_number); - gpe_register_info = &acpi_gbl_gpe_register_info[register_index]; + gpe_register_info = acpi_ev_get_gpe_register_info (gpe_number); + if (!gpe_register_info) { + return (AE_BAD_PARAMETER); + } /* Get the register bitmask for this GPE */ @@ -325,13 +338,13 @@ acpi_hw_get_gpe_status ( } if (bit_mask & in_byte) { - (*event_status) |= ACPI_EVENT_FLAG_ENABLED; + local_event_status |= ACPI_EVENT_FLAG_ENABLED; } /* GPE Enabled for wake? */ if (bit_mask & gpe_register_info->wake_enable) { - (*event_status) |= ACPI_EVENT_FLAG_WAKE_ENABLED; + local_event_status |= ACPI_EVENT_FLAG_WAKE_ENABLED; } /* GPE active (set)? */ @@ -342,8 +355,12 @@ acpi_hw_get_gpe_status ( } if (bit_mask & in_byte) { - (*event_status) |= ACPI_EVENT_FLAG_SET; + local_event_status |= ACPI_EVENT_FLAG_SET; } + + /* Set return value */ + + (*event_status) = local_event_status; return (AE_OK); } @@ -378,7 +395,12 @@ acpi_hw_disable_non_wakeup_gpes ( for (i = 0; i < acpi_gbl_gpe_register_count; i++) { + /* Get the info block for the entire GPE register */ + gpe_register_info = &acpi_gbl_gpe_register_info[i]; + if (!gpe_register_info) { + return (AE_BAD_PARAMETER); + } /* * Read the enabled status of all GPEs. We @@ -430,7 +452,12 @@ acpi_hw_enable_non_wakeup_gpes ( for (i = 0; i < acpi_gbl_gpe_register_count; i++) { + /* Get the info block for the entire GPE register */ + gpe_register_info = &acpi_gbl_gpe_register_info[i]; + if (!gpe_register_info) { + return (AE_BAD_PARAMETER); + } /* * We previously stored the enabled status of all GPEs. diff --git a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c index 41ee2d9bd074..fcc144d58db4 100644 --- a/drivers/acpi/hardware/hwregs.c +++ b/drivers/acpi/hardware/hwregs.c @@ -7,21 +7,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index ee3207388a8d..b02a07ab172f 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #include <acpi/acpi.h> diff --git a/drivers/acpi/hardware/hwtimer.c b/drivers/acpi/hardware/hwtimer.c index 65771736990e..7807f520f18d 100644 --- a/drivers/acpi/hardware/hwtimer.c +++ b/drivers/acpi/hardware/hwtimer.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #include <acpi/acpi.h> diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c index dd13719395a0..914acaa62474 100644 --- a/drivers/acpi/namespace/nsaccess.c +++ b/drivers/acpi/namespace/nsaccess.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ @@ -100,6 +119,18 @@ acpi_ns_root_initialize (void) * initial value, create the initial value. */ if (init_val->val) { + acpi_string val; + + status = acpi_os_predefined_override(init_val, &val); + if (ACPI_FAILURE (status)) { + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not override predefined %s\n", + init_val->name)); + } + + if (!val) { + val = init_val->val; + } + /* * Entry requests an initial value, allocate a * descriptor for it. @@ -118,7 +149,7 @@ acpi_ns_root_initialize (void) switch (init_val->type) { case ACPI_TYPE_METHOD: obj_desc->method.param_count = - (u8) ACPI_STRTOUL (init_val->val, NULL, 10); + (u8) ACPI_STRTOUL (val, NULL, 10); obj_desc->common.flags |= AOPOBJ_DATA_VALID; #if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY) @@ -132,7 +163,7 @@ acpi_ns_root_initialize (void) case ACPI_TYPE_INTEGER: obj_desc->integer.value = - (acpi_integer) ACPI_STRTOUL (init_val->val, NULL, 10); + (acpi_integer) ACPI_STRTOUL (val, NULL, 10); break; @@ -141,8 +172,8 @@ acpi_ns_root_initialize (void) /* * Build an object around the static string */ - obj_desc->string.length = (u32) ACPI_STRLEN (init_val->val); - obj_desc->string.pointer = init_val->val; + obj_desc->string.length = (u32) ACPI_STRLEN (val); + obj_desc->string.pointer = val; obj_desc->common.flags |= AOPOBJ_STATIC_POINTER; break; @@ -151,7 +182,7 @@ acpi_ns_root_initialize (void) obj_desc->mutex.node = new_node; obj_desc->mutex.sync_level = - (u16) ACPI_STRTOUL (init_val->val, NULL, 10); + (u16) ACPI_STRTOUL (val, NULL, 10); if (ACPI_STRCMP (init_val->name, "_GL_") == 0) { /* diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c index f8af33942412..c412245e848a 100644 --- a/drivers/acpi/namespace/nsalloc.c +++ b/drivers/acpi/namespace/nsalloc.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c index eae7cf990705..64251cc5a9b3 100644 --- a/drivers/acpi/namespace/nsdump.c +++ b/drivers/acpi/namespace/nsdump.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nsdumpdv.c b/drivers/acpi/namespace/nsdumpdv.c index d7b310327190..af4bdd41e5cc 100644 --- a/drivers/acpi/namespace/nsdumpdv.c +++ b/drivers/acpi/namespace/nsdumpdv.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c index 4882f13d926c..374b5c3de2b8 100644 --- a/drivers/acpi/namespace/nseval.c +++ b/drivers/acpi/namespace/nseval.c @@ -6,21 +6,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nsinit.c b/drivers/acpi/namespace/nsinit.c index e2e9601ffbb0..df9d3d8535a3 100644 --- a/drivers/acpi/namespace/nsinit.c +++ b/drivers/acpi/namespace/nsinit.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c index 21b299ce08f3..8cb42fefda19 100644 --- a/drivers/acpi/namespace/nsload.c +++ b/drivers/acpi/namespace/nsload.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c index 17a3a5bd7cff..257865453766 100644 --- a/drivers/acpi/namespace/nsnames.c +++ b/drivers/acpi/namespace/nsnames.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nsobject.c b/drivers/acpi/namespace/nsobject.c index ab461135d65a..f542f7d8b5cc 100644 --- a/drivers/acpi/namespace/nsobject.c +++ b/drivers/acpi/namespace/nsobject.c @@ -6,21 +6,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nsparse.c b/drivers/acpi/namespace/nsparse.c index b2d64ee578f6..3d75e08a2d09 100644 --- a/drivers/acpi/namespace/nsparse.c +++ b/drivers/acpi/namespace/nsparse.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c index 9a065767ac54..10fe6e8f5aed 100644 --- a/drivers/acpi/namespace/nssearch.c +++ b/drivers/acpi/namespace/nssearch.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c index 3c108b15c740..a9168b9f1c21 100644 --- a/drivers/acpi/namespace/nsutils.c +++ b/drivers/acpi/namespace/nsutils.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nswalk.c b/drivers/acpi/namespace/nswalk.c index ee334a6cd3a0..c9aecf710546 100644 --- a/drivers/acpi/namespace/nswalk.c +++ b/drivers/acpi/namespace/nswalk.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c index 41b983339283..a80987103ce7 100644 --- a/drivers/acpi/namespace/nsxfeval.c +++ b/drivers/acpi/namespace/nsxfeval.c @@ -6,21 +6,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nsxfname.c b/drivers/acpi/namespace/nsxfname.c index fef5da08d3cd..5c146c96bb3c 100644 --- a/drivers/acpi/namespace/nsxfname.c +++ b/drivers/acpi/namespace/nsxfname.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/namespace/nsxfobj.c b/drivers/acpi/namespace/nsxfobj.c index 589159c15577..7cfac7da6866 100644 --- a/drivers/acpi/namespace/nsxfobj.c +++ b/drivers/acpi/namespace/nsxfobj.c @@ -6,21 +6,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 6dd24a0a11c3..62a484e4f6f8 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -1,7 +1,7 @@ /* * acpi_numa.c - ACPI NUMA support * - * Copyright (C) 2002 Takayoshi Kochi <t-kouchi@cq.jp.nec.com> + * Copyright (C) 2002 Takayoshi Kochi <t-kochi@bq.jp.nec.com> * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index d45eb0ad070c..f96f7d921357 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -203,6 +203,26 @@ acpi_os_get_physical_address(void *virt, acpi_physical_address *phys) return AE_OK; } +#define ACPI_MAX_OVERRIDE_LEN 100 + +static char acpi_os_name[ACPI_MAX_OVERRIDE_LEN]; + +acpi_status +acpi_os_predefined_override (const struct acpi_predefined_names *init_val, + acpi_string *new_val) +{ + if (!init_val || !new_val) + return AE_BAD_PARAMETER; + + *new_val = NULL; + if (!memcmp (init_val->name, "_OS_", 4) && strlen(acpi_os_name)) { + printk(KERN_INFO PREFIX "Overriding _OS definition\n"); + *new_val = acpi_os_name; + } + + return AE_OK; +} + acpi_status acpi_os_table_override (struct acpi_table_header *existing_table, struct acpi_table_header **new_table) @@ -223,6 +243,13 @@ acpi_irq(int irq, void *dev_id, struct pt_regs *regs) acpi_status acpi_os_install_interrupt_handler(u32 irq, OSD_HANDLER handler, void *context) { + /* + * Ignore the irq from the core, and use the value in our copy of the + * FADT. It may not be the same if an interrupt source override exists + * for the SCI. + */ + irq = acpi_fadt.sci_int; + #ifdef CONFIG_IA64 irq = gsi_to_vector(irq); #endif @@ -847,3 +874,28 @@ acpi_os_signal ( return AE_OK; } + +int __init +acpi_os_name_setup(char *str) +{ + char *p = acpi_os_name; + int count = ACPI_MAX_OVERRIDE_LEN-1; + + if (!str || !*str) + return 0; + + for (; count-- && str && *str; str++) { + if (isalnum(*str) || *str == ' ') + *p++ = *str; + else if (*str == '\'' || *str == '"') + continue; + else + break; + } + *p = 0; + + return 1; + +} + +__setup("acpi_os_name=", acpi_os_name_setup); diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c index 9a0e1f93f077..1bee8daf3c65 100644 --- a/drivers/acpi/parser/psargs.c +++ b/drivers/acpi/parser/psargs.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c index 633d862c67da..da6a02b71a86 100644 --- a/drivers/acpi/parser/psopcode.c +++ b/drivers/acpi/parser/psopcode.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ @@ -258,7 +277,7 @@ #define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE #define ARGI_LNOT_OP ARGI_LIST1 (ARGI_INTEGER) #define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE -#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION, ARGI_TARGETREF) +#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION_OR_FIELD,ARGI_TARGETREF) #define ARGI_LOAD_TABLE_OP ARGI_LIST6 (ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_ANYTYPE) #define ARGI_LOCAL0 ARG_NONE #define ARGI_LOCAL1 ARG_NONE @@ -272,7 +291,7 @@ #define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER) #define ARGI_METHOD_OP ARGI_INVALID_OPCODE #define ARGI_METHODCALL_OP ARGI_INVALID_OPCODE -#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFERSTRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFER_OR_STRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_MOD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_MUTEX_OP ARGI_INVALID_OPCODE diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index 5c58e0180a57..fc01f007f68f 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/parser/psscope.c b/drivers/acpi/parser/psscope.c index 7bdcf2cdfa4c..510c57d395fa 100644 --- a/drivers/acpi/parser/psscope.c +++ b/drivers/acpi/parser/psscope.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/parser/pstree.c b/drivers/acpi/parser/pstree.c index 8bc3444c0614..22da5291be59 100644 --- a/drivers/acpi/parser/pstree.c +++ b/drivers/acpi/parser/pstree.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/parser/psutils.c b/drivers/acpi/parser/psutils.c index a5d5413e39fb..2d6253319253 100644 --- a/drivers/acpi/parser/psutils.c +++ b/drivers/acpi/parser/psutils.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/parser/pswalk.c b/drivers/acpi/parser/pswalk.c index 8d3b85fb319d..f2a92dc2e3cf 100644 --- a/drivers/acpi/parser/pswalk.c +++ b/drivers/acpi/parser/pswalk.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/parser/psxface.c b/drivers/acpi/parser/psxface.c index 738779c1f44e..bc2ce6b17c05 100644 --- a/drivers/acpi/parser/psxface.c +++ b/drivers/acpi/parser/psxface.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 00a649d8a998..7160d98a4154 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -351,8 +351,10 @@ acpi_pci_irq_enable ( printk(" - using IRQ %d\n", dev->irq); return_VALUE(dev->irq); } - else + else { + printk("\n"); return_VALUE(0); + } } dev->irq = irq; diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 28c97972728b..cb23e4ff5ec0 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -306,13 +306,26 @@ acpi_pci_link_set ( memset(&resource, 0, sizeof(resource)); /* NOTE: PCI interrupts are always level / active_low / shared. */ - resource.res.id = ACPI_RSTYPE_IRQ; - resource.res.length = sizeof(struct acpi_resource); - resource.res.data.irq.edge_level = ACPI_LEVEL_SENSITIVE; - resource.res.data.irq.active_high_low = ACPI_ACTIVE_LOW; - resource.res.data.irq.shared_exclusive = ACPI_SHARED; - resource.res.data.irq.number_of_interrupts = 1; - resource.res.data.irq.interrupts[0] = irq; + if (irq <= 15) { + resource.res.id = ACPI_RSTYPE_IRQ; + resource.res.length = sizeof(struct acpi_resource); + resource.res.data.irq.edge_level = ACPI_LEVEL_SENSITIVE; + resource.res.data.irq.active_high_low = ACPI_ACTIVE_LOW; + resource.res.data.irq.shared_exclusive = ACPI_SHARED; + resource.res.data.irq.number_of_interrupts = 1; + resource.res.data.irq.interrupts[0] = irq; + } + else { + resource.res.id = ACPI_RSTYPE_EXT_IRQ; + resource.res.length = sizeof(struct acpi_resource); + resource.res.data.extended_irq.producer_consumer = ACPI_CONSUMER; + resource.res.data.extended_irq.edge_level = ACPI_LEVEL_SENSITIVE; + resource.res.data.extended_irq.active_high_low = ACPI_ACTIVE_LOW; + resource.res.data.extended_irq.shared_exclusive = ACPI_SHARED; + resource.res.data.extended_irq.number_of_interrupts = 1; + resource.res.data.extended_irq.interrupts[0] = irq; + /* ignore resource_source, it's optional */ + } resource.end.id = ACPI_RSTYPE_END_TAG; status = acpi_set_current_resources(link->handle, &buffer); diff --git a/drivers/acpi/resources/rsaddr.c b/drivers/acpi/resources/rsaddr.c index 34f3c45ef8d7..14a3472d4ada 100644 --- a/drivers/acpi/resources/rsaddr.c +++ b/drivers/acpi/resources/rsaddr.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ @@ -130,6 +149,8 @@ acpi_rs_address16_resource ( if (ACPI_IO_RANGE == output_struct->data.address16.resource_type) { output_struct->data.address16.attribute.io.range_attribute = (u16) (temp8 & 0x03); + output_struct->data.address16.attribute.io.translation_attribute = + (u16) ((temp8 >> 4) & 0x03); } else { /* BUS_NUMBER_RANGE == Address16.Data->resource_type */ @@ -328,6 +349,9 @@ acpi_rs_address16_stream ( temp8 = (u8) (linked_list->data.address16.attribute.io.range_attribute & 0x03); + temp8 |= + (linked_list->data.address16.attribute.io.translation_attribute & + 0x03) << 4; } *buffer = temp8; @@ -516,6 +540,8 @@ acpi_rs_address32_resource ( if (ACPI_IO_RANGE == output_struct->data.address32.resource_type) { output_struct->data.address32.attribute.io.range_attribute = (u16) (temp8 & 0x03); + output_struct->data.address32.attribute.io.translation_attribute = + (u16) ((temp8 >> 4) & 0x03); } else { /* BUS_NUMBER_RANGE == output_struct->Data.Address32.resource_type */ @@ -712,6 +738,9 @@ acpi_rs_address32_stream ( temp8 = (u8) (linked_list->data.address32.attribute.io.range_attribute & 0x03); + temp8 |= + (linked_list->data.address32.attribute.io.translation_attribute & + 0x03) << 4; } *buffer = temp8; @@ -899,6 +928,8 @@ acpi_rs_address64_resource ( if (ACPI_IO_RANGE == output_struct->data.address64.resource_type) { output_struct->data.address64.attribute.io.range_attribute = (u16) (temp8 & 0x03); + output_struct->data.address64.attribute.io.translation_attribute = + (u16) ((temp8 >> 4) & 0x03); } else { /* BUS_NUMBER_RANGE == output_struct->Data.Address64.resource_type */ @@ -1099,6 +1130,9 @@ acpi_rs_address64_stream ( temp8 = (u8) (linked_list->data.address64.attribute.io.range_attribute & 0x03); + temp8 |= + (linked_list->data.address64.attribute.io.range_attribute & + 0x03) << 4; } *buffer = temp8; diff --git a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c index ab70c70d220f..d631953eb7cf 100644 --- a/drivers/acpi/resources/rscalc.c +++ b/drivers/acpi/resources/rscalc.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/resources/rscreate.c b/drivers/acpi/resources/rscreate.c index 29554d1ceb3d..4e9cd4d14392 100644 --- a/drivers/acpi/resources/rscreate.c +++ b/drivers/acpi/resources/rscreate.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/resources/rsdump.c b/drivers/acpi/resources/rsdump.c index 1af37e74a359..8f2ff6a196e5 100644 --- a/drivers/acpi/resources/rsdump.c +++ b/drivers/acpi/resources/rsdump.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ @@ -551,6 +570,11 @@ acpi_rs_dump_address16 ( "Invalid range attribute\n"); break; } + + acpi_os_printf (" Type Specific: %s Translation\n", + ACPI_SPARSE_TRANSLATION == + address16_data->attribute.io.translation_attribute ? + "Sparse" : "Dense"); break; case ACPI_BUS_NUMBER_RANGE: @@ -673,26 +697,31 @@ acpi_rs_dump_address32 ( acpi_os_printf (" Resource Type: Io Range\n"); switch (address32_data->attribute.io.range_attribute) { - case ACPI_NON_ISA_ONLY_RANGES: - acpi_os_printf (" Type Specific: " - "Non-ISA Io Addresses\n"); - break; + case ACPI_NON_ISA_ONLY_RANGES: + acpi_os_printf (" Type Specific: " + "Non-ISA Io Addresses\n"); + break; - case ACPI_ISA_ONLY_RANGES: - acpi_os_printf (" Type Specific: " - "ISA Io Addresses\n"); - break; + case ACPI_ISA_ONLY_RANGES: + acpi_os_printf (" Type Specific: " + "ISA Io Addresses\n"); + break; - case ACPI_ENTIRE_RANGE: - acpi_os_printf (" Type Specific: " - "ISA and non-ISA Io Addresses\n"); - break; + case ACPI_ENTIRE_RANGE: + acpi_os_printf (" Type Specific: " + "ISA and non-ISA Io Addresses\n"); + break; - default: - acpi_os_printf (" Type Specific: " - "Invalid Range attribute"); - break; - } + default: + acpi_os_printf (" Type Specific: " + "Invalid Range attribute"); + break; + } + + acpi_os_printf (" Type Specific: %s Translation\n", + ACPI_SPARSE_TRANSLATION == + address32_data->attribute.io.translation_attribute ? + "Sparse" : "Dense"); break; case ACPI_BUS_NUMBER_RANGE: @@ -815,26 +844,31 @@ acpi_rs_dump_address64 ( acpi_os_printf (" Resource Type: Io Range\n"); switch (address64_data->attribute.io.range_attribute) { - case ACPI_NON_ISA_ONLY_RANGES: - acpi_os_printf (" Type Specific: " - "Non-ISA Io Addresses\n"); - break; + case ACPI_NON_ISA_ONLY_RANGES: + acpi_os_printf (" Type Specific: " + "Non-ISA Io Addresses\n"); + break; - case ACPI_ISA_ONLY_RANGES: - acpi_os_printf (" Type Specific: " - "ISA Io Addresses\n"); - break; + case ACPI_ISA_ONLY_RANGES: + acpi_os_printf (" Type Specific: " + "ISA Io Addresses\n"); + break; - case ACPI_ENTIRE_RANGE: - acpi_os_printf (" Type Specific: " - "ISA and non-ISA Io Addresses\n"); - break; + case ACPI_ENTIRE_RANGE: + acpi_os_printf (" Type Specific: " + "ISA and non-ISA Io Addresses\n"); + break; - default: - acpi_os_printf (" Type Specific: " - "Invalid Range attribute"); - break; - } + default: + acpi_os_printf (" Type Specific: " + "Invalid Range attribute"); + break; + } + + acpi_os_printf (" Type Specific: %s Translation\n", + ACPI_SPARSE_TRANSLATION == + address64_data->attribute.io.translation_attribute ? + "Sparse" : "Dense"); break; case ACPI_BUS_NUMBER_RANGE: diff --git a/drivers/acpi/resources/rsio.c b/drivers/acpi/resources/rsio.c index 5a26465b81e5..4ec559527c4b 100644 --- a/drivers/acpi/resources/rsio.c +++ b/drivers/acpi/resources/rsio.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/resources/rsirq.c b/drivers/acpi/resources/rsirq.c index ecca15bfeff0..46f0e5e66c09 100644 --- a/drivers/acpi/resources/rsirq.c +++ b/drivers/acpi/resources/rsirq.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/resources/rslist.c b/drivers/acpi/resources/rslist.c index 8b7d38a78834..3bfdffd76599 100644 --- a/drivers/acpi/resources/rslist.c +++ b/drivers/acpi/resources/rslist.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/resources/rsmemory.c b/drivers/acpi/resources/rsmemory.c index d1ca73b7e54d..65c04f185478 100644 --- a/drivers/acpi/resources/rsmemory.c +++ b/drivers/acpi/resources/rsmemory.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/resources/rsmisc.c b/drivers/acpi/resources/rsmisc.c index 14bc3c102973..d9f5a4d7cebf 100644 --- a/drivers/acpi/resources/rsmisc.c +++ b/drivers/acpi/resources/rsmisc.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/resources/rsutils.c b/drivers/acpi/resources/rsutils.c index cd9643e66ba3..6480adf82402 100644 --- a/drivers/acpi/resources/rsutils.c +++ b/drivers/acpi/resources/rsutils.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/resources/rsxface.c b/drivers/acpi/resources/rsxface.c index cfa72e6e17e9..ca3aee318f2b 100644 --- a/drivers/acpi/resources/rsxface.c +++ b/drivers/acpi/resources/rsxface.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c index 3858de09a9dc..b81e1178cc47 100644 --- a/drivers/acpi/tables/tbconvrt.c +++ b/drivers/acpi/tables/tbconvrt.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c index ee08f7a619e3..91ed931eb2f1 100644 --- a/drivers/acpi/tables/tbget.c +++ b/drivers/acpi/tables/tbget.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c index 8ea96cd6a203..eb49796455de 100644 --- a/drivers/acpi/tables/tbgetall.c +++ b/drivers/acpi/tables/tbgetall.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index 8eebd2dda233..2e5921992d99 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c index 5abe32b2c9ef..c610edf078b7 100644 --- a/drivers/acpi/tables/tbrsdt.c +++ b/drivers/acpi/tables/tbrsdt.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c index 8cc950cc8d8f..3760fb9acddd 100644 --- a/drivers/acpi/tables/tbutils.c +++ b/drivers/acpi/tables/tbutils.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index 104637d19040..43597f10f2f4 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c index 2b1ae218e8f4..26983567f760 100644 --- a/drivers/acpi/tables/tbxfroot.c +++ b/drivers/acpi/tables/tbxfroot.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index d4a90b26d169..ed2d67787214 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c @@ -2,7 +2,7 @@ * toshiba_acpi.c - Toshiba Laptop ACPI Extras * * - * Copyright (C) 2002 John Belmonte + * Copyright (C) 2002-2003 John Belmonte * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ * */ -#define TOSHIBA_ACPI_VERSION "0.13" +#define TOSHIBA_ACPI_VERSION "0.14" #define PROC_INTERFACE_VERSION 1 #include <linux/kernel.h> @@ -41,19 +41,9 @@ #include <linux/init.h> #include <linux/types.h> #include <linux/proc_fs.h> -#include <linux/seq_file.h> #include <linux/version.h> -#include <acpi/acconfig.h> -#define OLD_ACPI_INTERFACE (ACPI_CA_VERSION < 0x20020000) - -#if OLD_ACPI_INTERFACE -#include <acpi.h> -extern struct proc_dir_entry* bm_proc_root; -#define acpi_root_dir bm_proc_root -#else #include <acpi/acpi_drivers.h> -#endif MODULE_AUTHOR("John Belmonte"); MODULE_DESCRIPTION("Toshiba Laptop ACPI Extras Driver"); @@ -101,47 +91,6 @@ MODULE_LICENSE("GPL"); #define HCI_VIDEO_OUT_CRT 0x2 #define HCI_VIDEO_OUT_TV 0x4 -static int toshiba_lcd_open_fs(struct inode *inode, struct file *file); -static int toshiba_video_open_fs(struct inode *inode, struct file *file); -static int toshiba_fan_open_fs(struct inode *inode, struct file *file); -static int toshiba_keys_open_fs(struct inode *inode, struct file *file); -static int toshiba_version_open_fs(struct inode *inode, struct file *file); - -static struct file_operations toshiba_lcd_fops = { - .open = toshiba_lcd_open_fs, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -static struct file_operations toshiba_video_fops = { - .open = toshiba_video_open_fs, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -static struct file_operations toshiba_fan_fops = { - .open = toshiba_fan_open_fs, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -static struct file_operations toshiba_keys_fops = { - .open = toshiba_keys_open_fs, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -static struct file_operations toshiba_version_fops = { - .open = toshiba_version_open_fs, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - /* utility */ @@ -191,8 +140,8 @@ write_acpi_int(const char* methodName, int val) static int read_acpi_int(const char* methodName, int* pVal) { - acpi_buffer results; - acpi_object out_objs[1]; + struct acpi_buffer results; + union acpi_object out_objs[1]; acpi_status status; results.length = sizeof(out_objs); @@ -270,22 +219,50 @@ hci_read1(u32 reg, u32* out1, u32* result) return status; } -#define PROC_TOSHIBA "toshiba" -#define PROC_LCD "lcd" -#define PROC_VIDEO "video" -#define PROC_FAN "fan" -#define PROC_KEYS "keys" -#define PROC_VERSION "version" - static struct proc_dir_entry* toshiba_proc_dir = NULL; static int force_fan; static int last_key_event; static int key_event_valid; +typedef struct _ProcItem +{ + char* name; + char* (*read_func)(char*); + unsigned long (*write_func)(const char*, unsigned long); +} ProcItem; + /* proc file handlers */ -static int toshiba_lcd_seq_show(struct seq_file *seq, void *offset) +static int +dispatch_read(char* page, char** start, off_t off, int count, int* eof, + ProcItem* item) +{ + char* p = page; + int len; + + if (off == 0) + p = item->read_func(p); + + /* ISSUE: I don't understand this code */ + len = (p - page); + if (len <= off+count) *eof = 1; + *start = page + off; + len -= off; + if (len>count) len = count; + if (len<0) len = 0; + return len; +} + +static int +dispatch_write(struct file* file, const char* buffer, unsigned long count, + ProcItem* item) +{ + return item->write_func(buffer, count); +} + +static char* +read_lcd(char* p) { u32 hci_result; u32 value; @@ -293,24 +270,18 @@ static int toshiba_lcd_seq_show(struct seq_file *seq, void *offset) hci_read1(HCI_LCD_BRIGHTNESS, &value, &hci_result); if (hci_result == HCI_SUCCESS) { value = value >> HCI_LCD_BRIGHTNESS_SHIFT; - seq_printf(seq, "brightness: %d\n" - "brightness_levels: %d\n", - value, - HCI_LCD_BRIGHTNESS_LEVELS); - } else - seq_puts(seq, "ERROR\n"); - - return 0; -} + p += sprintf(p, "brightness: %d\n", value); + p += sprintf(p, "brightness_levels: %d\n", + HCI_LCD_BRIGHTNESS_LEVELS); + } else { + p += sprintf(p, "ERROR\n"); + } -static int toshiba_lcd_open_fs(struct inode *inode, struct file *file) -{ - return single_open(file, toshiba_lcd_seq_show, NULL); + return p; } -static int -proc_write_lcd(struct file* file, const char* buffer, size_t count, - loff_t* data) +static unsigned long +write_lcd(const char* buffer, unsigned long count) { int value; /*int byte_count;*/ @@ -330,7 +301,8 @@ proc_write_lcd(struct file* file, const char* buffer, size_t count, return count; } -static int toshiba_video_seq_show(struct seq_file *seq, void *offset) +static char* +read_video(char* p) { u32 hci_result; u32 value; @@ -340,26 +312,18 @@ static int toshiba_video_seq_show(struct seq_file *seq, void *offset) int is_lcd = (value & HCI_VIDEO_OUT_LCD) ? 1 : 0; int is_crt = (value & HCI_VIDEO_OUT_CRT) ? 1 : 0; int is_tv = (value & HCI_VIDEO_OUT_TV ) ? 1 : 0; - seq_printf(seq, "lcd_out: %d\n" - "crt_out: %d\n" - "tv_out: %d\n", - is_lcd, - is_crt, - is_tv); - } else - seq_puts(seq, "ERROR\n"); - - return 0; -} + p += sprintf(p, "lcd_out: %d\n", is_lcd); + p += sprintf(p, "crt_out: %d\n", is_crt); + p += sprintf(p, "tv_out: %d\n", is_tv); + } else { + p += sprintf(p, "ERROR\n"); + } -static int toshiba_video_open_fs(struct inode *inode, struct file *file) -{ - return single_open(file, toshiba_video_seq_show, NULL); + return p; } -static int -proc_write_video(struct file* file, const char* buffer, size_t count, - loff_t* data) +static unsigned long +write_video(const char* buffer, unsigned long count) { int value; const char* buffer_end = buffer + count; @@ -400,31 +364,25 @@ proc_write_video(struct file* file, const char* buffer, size_t count, return count; } -static int toshiba_fan_seq_show(struct seq_file *seq, void *offset) +static char* +read_fan(char* p) { u32 hci_result; u32 value; hci_read1(HCI_FAN, &value, &hci_result); if (hci_result == HCI_SUCCESS) { - seq_printf(seq, "running: %d\n" - "force_on: %d\n", - (value > 0), - force_fan); - } else - seq_puts(seq, "ERROR\n"); - - return 0; -} + p += sprintf(p, "running: %d\n", (value > 0)); + p += sprintf(p, "force_on: %d\n", force_fan); + } else { + p += sprintf(p, "ERROR\n"); + } -static int toshiba_fan_open_fs(struct inode *inode, struct file *file) -{ - return single_open(file, toshiba_fan_seq_show, NULL); + return p; } -static int -proc_write_fan(struct file* file, const char* buffer, size_t count, - loff_t* data) +static unsigned long +write_fan(const char* buffer, unsigned long count) { int value; u32 hci_result; @@ -443,7 +401,8 @@ proc_write_fan(struct file* file, const char* buffer, size_t count, return count; } -static int toshiba_keys_seq_show(struct seq_file *seq, void *offset) +static char* +read_keys(char* p) { u32 hci_result; u32 value; @@ -456,28 +415,20 @@ static int toshiba_keys_seq_show(struct seq_file *seq, void *offset) } else if (hci_result == HCI_EMPTY) { /* better luck next time */ } else { - seq_puts(seq, "ERROR\n"); + p += sprintf(p, "ERROR\n"); goto end; } } - seq_printf(seq, "hotkey_ready: %d\n" - "hotkey: 0x%04x\n", - key_event_valid, - last_key_event); + p += sprintf(p, "hotkey_ready: %d\n", key_event_valid); + p += sprintf(p, "hotkey: 0x%04x\n", last_key_event); end: - return 0; -} - -static int toshiba_keys_open_fs(struct inode *inode, struct file *file) -{ - return single_open(file, toshiba_keys_seq_show, NULL); + return p; } -static int -proc_write_keys(struct file* file, const char* buffer, size_t count, - loff_t* data) +static unsigned long +write_keys(const char* buffer, unsigned long count) { int value; @@ -491,73 +442,55 @@ proc_write_keys(struct file* file, const char* buffer, size_t count, return count; } -static int toshiba_version_seq_show(struct seq_file *seq, void *offset) +static char* +read_version(char* p) { - seq_printf(seq, "driver: %s\n" - "proc_interface: %d\n", - TOSHIBA_ACPI_VERSION, - PROC_INTERFACE_VERSION); - - return 0; -} - -static int toshiba_version_open_fs(struct inode *inode, struct file *file) -{ - return single_open(file, toshiba_version_seq_show, NULL); + p += sprintf(p, "driver: %s\n", TOSHIBA_ACPI_VERSION); + p += sprintf(p, "proc_interface: %d\n", + PROC_INTERFACE_VERSION); + return p; } /* proc and module init */ +#define PROC_TOSHIBA "toshiba" + +ProcItem proc_items[] = +{ + { "lcd" , read_lcd , write_lcd }, + { "video" , read_video , write_video }, + { "fan" , read_fan , write_fan }, + { "keys" , read_keys , write_keys }, + { "version" , read_version , 0 }, + { 0 , 0 , 0 }, +}; + static acpi_status add_device(void) { struct proc_dir_entry* proc; - - proc = create_proc_entry(PROC_LCD, S_IFREG | S_IRUGO | S_IWUSR, - toshiba_proc_dir); - if (proc) { - proc->proc_fops = &toshiba_lcd_fops; - proc->proc_fops->write = proc_write_lcd; + ProcItem* item; + + for (item = proc_items; item->name; ++item) + { + proc = create_proc_read_entry(item->name, + S_IFREG | S_IRUGO | S_IWUSR, + toshiba_proc_dir, (read_proc_t*)dispatch_read, item); + if (proc && item->write_func) + proc->write_proc = (write_proc_t*)dispatch_write; } - proc = create_proc_entry(PROC_VIDEO, S_IFREG | S_IRUGO | S_IWUSR, - toshiba_proc_dir); - if (proc) { - proc->proc_fops = &toshiba_video_fops; - proc->proc_fops->write = proc_write_video; - } - - proc = create_proc_entry(PROC_FAN, S_IFREG | S_IRUGO | S_IWUSR, - toshiba_proc_dir); - if (proc) { - proc->proc_fops = &toshiba_fan_fops; - proc->proc_fops->write = proc_write_fan; - } - - proc = create_proc_entry(PROC_KEYS, S_IFREG | S_IRUGO | S_IWUSR, - toshiba_proc_dir); - if (proc) { - proc->proc_fops = &toshiba_keys_fops; - proc->proc_fops->write = proc_write_keys; - } - - proc = create_proc_entry(PROC_VERSION, S_IFREG | S_IRUGO | S_IWUSR, - toshiba_proc_dir); - if (proc) - proc->proc_fops = &toshiba_version_fops; - return(AE_OK); } static acpi_status remove_device(void) { - remove_proc_entry(PROC_LCD, toshiba_proc_dir); - remove_proc_entry(PROC_VIDEO, toshiba_proc_dir); - remove_proc_entry(PROC_FAN, toshiba_proc_dir); - remove_proc_entry(PROC_KEYS, toshiba_proc_dir); - remove_proc_entry(PROC_VERSION, toshiba_proc_dir); + ProcItem* item; + + for (item = proc_items; item->name; ++item) + remove_proc_entry(item->name, toshiba_proc_dir); return(AE_OK); } diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c index 91b2f395a758..148b5403a5ef 100644 --- a/drivers/acpi/utilities/utalloc.c +++ b/drivers/acpi/utilities/utalloc.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index c1f6ee16d05d..870da95755dc 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c index 2e095f502faf..5ca9e4421962 100644 --- a/drivers/acpi/utilities/utdebug.c +++ b/drivers/acpi/utilities/utdebug.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c index d4f916c312eb..106ce0847863 100644 --- a/drivers/acpi/utilities/utdelete.c +++ b/drivers/acpi/utilities/utdelete.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c index b292da168ce1..141f21af0cd7 100644 --- a/drivers/acpi/utilities/uteval.c +++ b/drivers/acpi/utilities/uteval.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index 4e2e88273d69..205081ff1670 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #define DEFINE_ACPI_GLOBALS @@ -358,14 +377,16 @@ struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVE const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { - "system_memory", - "system_iO", +/*! [Begin] no source code translation (keep these ASL Keywords as-is) */ + "SystemMemory", + "SystemIO", "PCI_Config", - "embedded_control", + "EmbeddedControl", "SMBus", "CMOS", "PCIBARTarget", - "data_table", + "DataTable" +/*! [End] no source code translation !*/ }; @@ -381,7 +402,7 @@ acpi_ut_get_region_name ( else if (space_id >= ACPI_NUM_PREDEFINED_REGIONS) { - return ("invalid_space_iD"); + return ("invalid_space_id"); } return ((char *) acpi_gbl_region_types[space_id]); diff --git a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c index 36557a26580c..8a84bd523077 100644 --- a/drivers/acpi/utilities/utinit.c +++ b/drivers/acpi/utilities/utinit.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/utilities/utmath.c b/drivers/acpi/utilities/utmath.c index fe2ae432eb60..66ff2bc26829 100644 --- a/drivers/acpi/utilities/utmath.c +++ b/drivers/acpi/utilities/utmath.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index 1b7c4b4faf0b..db035a034422 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c @@ -5,21 +5,40 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index 90e6468b2518..aa7dd52cf37a 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c index c6c6cb33b4a3..b1eeb9e49fbc 100644 --- a/drivers/acpi/utilities/utxface.c +++ b/drivers/acpi/utilities/utxface.c @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 74cb355400eb..eaaea21b01c4 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -2376,176 +2376,8 @@ config SLIP_MODE_SLIP6 end of the link as well. It's good enough, for example, to run IP over the async ports of a Camtec JNT Pad. If unsure, say N. - -menu "Wireless LAN (non-hamradio)" - depends on NETDEVICES - -config NET_RADIO - bool "Wireless LAN (non-hamradio)" - ---help--- - Support for wireless LANs and everything having to do with radio, - but not with amateur radio or FM broadcasting. - - Saying Y here also enables the Wireless Extensions (creates - /proc/net/wireless and enables ifconfig access). The Wireless - Extension is a generic API allowing a driver to expose to the user - space configuration and statistics specific to common Wireless LANs. - The beauty of it is that a single set of tool can support all the - variations of Wireless LANs, regardless of their type (as long as - the driver supports Wireless Extension). Another advantage is that - these parameters may be changed on the fly without restarting the - driver (or Linux). If you wish to use Wireless Extensions with - wireless PCMCIA (PC-) cards, you need to say Y here; you can fetch - the tools from - <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>. - - Some user-level drivers for scarab devices which don't require - special kernel support are available from - <ftp://shadow.cabi.net/pub/Linux/>. - -config STRIP - tristate "STRIP (Metricom starmode radio IP)" - depends on NET_RADIO && INET - ---help--- - Say Y if you have a Metricom radio and intend to use Starmode Radio - IP. STRIP is a radio protocol developed for the MosquitoNet project - (on the WWW at <http://mosquitonet.stanford.edu/>) to send Internet - traffic using Metricom radios. Metricom radios are small, battery - powered, 100kbit/sec packet radio transceivers, about the size and - weight of a cellular telephone. (You may also have heard them called - "Metricom modems" but we avoid the term "modem" because it misleads - many people into thinking that you can plug a Metricom modem into a - phone line and use it as a modem.) - - You can use STRIP on any Linux machine with a serial port, although - it is obviously most useful for people with laptop computers. If you - think you might get a Metricom radio in the future, there is no harm - in saying Y to STRIP now, except that it makes the kernel a bit - bigger. - - You can also compile this as a module ( = code which can be inserted - in and removed from the running kernel whenever you want), say M - here and read <file:Documentation/modules.txt>. The module will be - called strip. - -config ARLAN - tristate "Aironet Arlan 655 & IC2200 DS support" - depends on NET_RADIO && ISA - ---help--- - Aironet makes Arlan, a class of wireless LAN adapters. These use the - www.Telxon.com chip, which is also used on several similar cards. - This driver is tested on the 655 and IC2200 series cards. Look at - <http://www.ylenurme.ee/~elmer/655/> for the latest information. - - The driver is built as two modules, arlan and arlan-proc. The latter - is the /proc interface and is not needed most of time. - - On some computers the card ends up in non-valid state after some - time. Use a ping-reset script to clear it. - -config AIRONET4500 - tristate "Aironet 4500/4800 series adapters" - depends on NET_RADIO && (PCI || ISA || PCMCIA) - ---help--- - www.aironet.com (recently bought by Cisco) makes these 802.11 DS - adapters. Driver by Elmer Joandi (elmer@ylenurme.ee). - - Say Y here if you have such an adapter, and then say Y below to - the option that applies to your particular type of card (PCI, ISA, - or PCMCIA). - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called aironet4500_core. If you want to - compile it as a module, say M here and read - <file:Documentation/modules.txt> as well as - <file:Documentation/networking/net-modules.txt>. - - quick config parameters: - SSID=tsunami - "The Password" - adhoc=1 there are no Access Points around - master=1 Adhoc master (the one who creates network - sync) - slave=1 Adhoc slave (btw, it is still forming own net - sometimes, and has problems with firmware... - change IbssJoinNetTimeout from /proc...) - channel=1..? meaningful in adhoc mode - - If you have problems with screwing up card, both_bap_lock=1 is a - conservative value (performance hit 15%). - - All other parameters can be set via the proc interface. - -config AIRONET4500_NONCS - tristate "Aironet 4500/4800 ISA/PCI/PNP/365 support " - depends on AIRONET4500 - help - If you have an ISA, PCI or PCMCIA Aironet 4500/4800 wireless LAN - card, say Y here, and then also to the options below that apply - to you. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called aironet4500_card. If you want to - compile it as a module, say M here and read - <file:Documentation/modules.txt>. - -config AIRONET4500_PNP - bool "Aironet 4500/4800 PNP support " - depends on AIRONET4500_NONCS - help - If you have an ISA Aironet 4500/4800 card which you want to use in - PnP (Plug and Play) mode, say Y here. This is the recommended mode - for ISA cards. Remember however to enable the PnP jumper on the - board if you say Y here. - -config AIRONET4500_PCI - bool "Aironet 4500/4800 PCI support " - depends on AIRONET4500_NONCS && PCI - help - If you have an PCI Aironet 4500/4800 card, say Y here. - -config AIRONET4500_ISA - bool "Aironet 4500/4800 ISA broken support (EXPERIMENTAL)" - depends on AIRONET4500_NONCS && EXPERIMENTAL - help - If you have an ISA Aironet 4500/4800 card which you want to run in - non-PnP mode, say Y here. This is not recommended and does not work - correctly at this point. Say N. - -config AIRONET4500_I365 - bool "Aironet 4500/4800 I365 broken support (EXPERIMENTAL)" - depends on AIRONET4500_NONCS && EXPERIMENTAL - help - If you have a PCMCIA Aironet 4500/4800 card which you want to use - without the standard PCMCIA cardservices provided by the pcmcia-cs - package, say Y here. This is not recommended, so say N. - -config AIRONET4500_PROC - tristate "Aironet 4500/4800 PROC interface " - depends on AIRONET4500 && m - ---help--- - If you say Y here (and to the "/proc file system" below), you will - be able to configure your Aironet card via the - /proc/sys/aironet4500 interface. - - Additional info: look in <file:drivers/net/aironet4500_rid.c>. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called aironet4500_proc. If you want to - compile it as a module, say M here and read - <file:Documentation/modules.txt>. - - NOTE: the proc interface uses a lot of memory, so it is recommended - to compile it as a module and remove the module after - configuration. - -# New directory for Wireless LAN devices - cards above will move there source "drivers/net/wireless/Kconfig" -endmenu - source "drivers/net/tokenring/Kconfig" config NET_FC diff --git a/drivers/net/Makefile b/drivers/net/Makefile index bdb8942ca55b..b0b65d9cdbd8 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -59,11 +59,6 @@ obj-$(CONFIG_ADAPTEC_STARFIRE) += starfire.o mii.o # obj-$(CONFIG_MII) += mii.o -obj-$(CONFIG_AIRONET4500) += aironet4500_core.o -obj-$(CONFIG_AIRONET4500_CS) += aironet4500_core.o -obj-$(CONFIG_AIRONET4500_NONCS) += aironet4500_card.o -obj-$(CONFIG_AIRONET4500_PROC) += aironet4500_proc.o -obj-$(CONFIG_AIRONET4500_CS) += aironet4500_proc.o obj-$(CONFIG_WINBOND_840) += mii.o obj-$(CONFIG_SUNDANCE) += sundance.o mii.o @@ -111,7 +106,6 @@ ifeq ($(CONFIG_SLIP_COMPRESSED),y) obj-$(CONFIG_SLIP) += slhc.o endif -obj-$(CONFIG_STRIP) += strip.o obj-$(CONFIG_DUMMY) += dummy.o obj-$(CONFIG_BONDING) += bonding.o obj-$(CONFIG_DE600) += de600.o @@ -136,7 +130,6 @@ obj-$(CONFIG_EEXPRESS) += eexpress.o obj-$(CONFIG_EEXPRESS_PRO) += eepro.o obj-$(CONFIG_8139CP) += 8139cp.o mii.o obj-$(CONFIG_8139TOO) += 8139too.o mii.o -obj-$(CONFIG_ARLAN) += arlan.o arlan-proc.o obj-$(CONFIG_ZNET) += znet.o obj-$(CONFIG_LAN_SAA9730) += saa9730.o obj-$(CONFIG_DEPCA) += depca.o diff --git a/drivers/net/aironet4500.h b/drivers/net/aironet4500.h deleted file mode 100644 index 10797fde6d7d..000000000000 --- a/drivers/net/aironet4500.h +++ /dev/null @@ -1,1607 +0,0 @@ -/* - * Aironet 4500 Pcmcia driver - * - * Elmer Joandi, Januar 1999 - * Copyright: GPL - * - * - * Revision 0.1 ,started 30.12.1998 - * - * - */ - - -#ifndef AIRONET4500_H -#define AIRONET4500_H -// redefined to avoid PCMCIA includes - - #include <linux/version.h> -/*#include <linux/module.h> - #include <linux/kernel.h> -*/ - -/* -#include <linux/types.h> -#include <linux/netdevice.h> -#include <linux/etherdevice.h> -#include <linux/delay.h> -#include <linux/time.h> -*/ -#include <linux/802_11.h> -#include <linux/workqueue.h> - -//damn idiot PCMCIA stuff -#ifndef DEV_NAME_LEN - #define DEV_NAME_LEN 32 -#endif - -struct pcmcia_junkdev_node_t { - char dev_name[DEV_NAME_LEN]; - u_short major, minor; - struct dev_node_t *next; -}; - -#ifndef CS_RELEASE -typedef struct pcmcia_junkdev_node_t dev_node_t; -#endif - - - -#include <linux/spinlock.h> - - -#define AWC_ERROR -1 -#define AWC_SUCCESS 0 - -struct awc_cis { - unsigned char cis[0x301]; - unsigned char unknown302[0xdf]; - unsigned short configuration_register; - unsigned short pin_replacement_register; - unsigned short socket_and_copy_register; - -}; - - -/* timeout for transmit watchdog timer, AP default is 8 sec */ -#define AWC_TX_TIMEOUT (HZ * 8) - - - -/*************************** REGISTER OFFSETS *********************/ -#define awc_Command_register 0x00 -#define awc_Param0_register 0x02 -#define awc_Param1_register 0x04 -#define awc_Param2_register 0x06 -#define awc_Status_register 0x08 -#define awc_Resp0_register 0x0A -#define awc_Resp1_register 0x0C -#define awc_Resp2_register 0x0E -#define awc_EvStat_register 0x30 -#define awc_EvIntEn_register 0x32 -#define awc_EvAck_register 0x34 -#define awc_SWSupport0_register 0x28 -#define awc_SWSupport1_register 0x2A -#define awc_SWSupport2_register 0x2C -#define awc_SWSupport3_register 0x2E -#define awc_LinkStatus_register 0x10 -// Memory access RID FID -#define awc_Select0_register 0x18 -#define awc_Offset0_register 0x1C -#define awc_Data0_register 0x36 -#define awc_Select1_register 0x1A -#define awc_Offset1_register 0x1E -#define awc_Data1_register 0x38 -// -#define awc_RxFID_register 0x20 -#define awc_TxAllocFID_register 0x22 -#define awc_TxComplFID_register 0x24 -#define awc_AuxPage_register 0x3A -#define awc_AuxOffset_register 0x3C -#define awc_AuxData_register 0x3E - - -struct awc_bap { - u16 select; - u16 offset; - u16 data; - volatile int lock; - volatile int status; - struct semaphore sem; - spinlock_t spinlock; - unsigned long flags; -}; - - - -#define AWC_COMMAND_STATE_WAIT_CMD_BUSY 1 -#define AWC_COMMAND_STATE_WAIT_CMD_ACK 2 -#define AWC_COMMAND_STATE_WAIT_BAP_BUSY 3 -#define AWC_COMMAND_STATE_BAP_NOT_SET 4 -#define AWC_COMMAND_STATE_BAP_SET 5 - -struct awc_command { - volatile int state; - volatile int lock_state; - struct net_device * dev; - struct awc_private * priv; - u16 port; - struct awc_bap * bap; - u16 command; - u16 par0; - u16 par1; - u16 par2; - u16 status; - u16 resp0; - u16 resp1; - u16 resp2; - u16 rid; - u16 offset; - u16 len; - void * buff; - -}; - - - - -#define DOWN(a) down_interruptible( a ) ; -// if (in_interrupt()) { down_interruptible( a ) ; } else printk("semaphore DOWN in interrupt tried \n"); -#define UP(a) up( a ) ; -// if (in_interrupt()) {up( a ) ; } else printk("semaphore UP in interrupt tried \n"); - -/* if (!in_interrupt())\ - printk("bap lock under cli but not in int\n");\ -*/ - -#define AWC_LOCK_COMMAND_ISSUING(a) spin_lock_irqsave(&a->command_issuing_spinlock,a->command_issuing_spinlock_flags); -#define AWC_UNLOCK_COMMAND_ISSUING(a) spin_unlock_irqrestore(&a->command_issuing_spinlock,a->command_issuing_spinlock_flags); - -#define AWC_BAP_LOCK_UNDER_CLI_REAL(cmd) \ - if (!cmd.priv) {\ - printk(KERN_CRIT "awc4500: no priv present in command !");\ - }\ - cmd.bap = &(cmd.priv->bap1);\ - if (both_bap_lock)\ - spin_lock_irqsave(&cmd.priv->both_bap_spinlock,cmd.priv->both_bap_spinlock_flags);\ - if (cmd.bap){\ - spin_lock_irqsave(&(cmd.bap->spinlock),cmd.bap->flags);\ - cmd.bap->lock++;\ - if (cmd.bap->lock > 1)\ - printk("Bap 1 lock high\n");\ - cmd.lock_state |= AWC_BAP_LOCKED;\ - } - -#define AWC_BAP_LOCK_NOT_CLI_REAL(cmd) {\ - if (in_interrupt())\ - printk("bap lock not cli in int\n");\ - if (!cmd.priv) {\ - printk(KERN_CRIT "awc4500: no priv present in command,lockup follows !");\ - }\ - cmd.bap = &(cmd.priv->bap0);\ - if (both_bap_lock)\ - spin_lock_irqsave(&cmd.priv->both_bap_spinlock,cmd.priv->both_bap_spinlock_flags);\ - spin_lock_irqsave(&(cmd.bap->spinlock),cmd.bap->flags);\ - DOWN(&(cmd.priv->bap0.sem));\ - cmd.bap->lock++;\ - if (cmd.bap->lock > 1)\ - printk("Bap 0 lock high\n");\ - cmd.lock_state |= AWC_BAP_SEMALOCKED;\ -} - -#define AWC_BAP_LOCK_NOT_CLI_CLI_REAL(cmd) {\ - cmd.bap = &(cmd.priv->bap0);\ - if (both_bap_lock)\ - spin_lock_irqsave(&cmd.priv->both_bap_spinlock,cmd.priv->both_bap_spinlock_flags);\ - spin_lock_irqsave(&(cmd.bap->spinlock),cmd.bap->flags);\ - cmd.bap->lock++;\ - if (cmd.bap->lock > 1)\ - printk("Bap 0 lock high\n");\ - cmd.lock_state |= AWC_BAP_LOCKED;\ -} - -#define BAP_LOCK_ANY(cmd)\ - if (in_interrupt()) AWC_BAP_LOCK_NOT_CLI_CLI_REAL(cmd)\ - else AWC_BAP_LOCK_NOT_CLI_REAL(cmd) - -#define AWC_BAP_LOCK_NOT_CLI(cmd) BAP_LOCK_ANY(cmd) -#define AWC_BAP_LOCK_UNDER_CLI(cmd) AWC_BAP_LOCK_UNDER_CLI_REAL(cmd) -/* - if (!cmd.priv->bap1.lock ) {BAP_LOCK_ANY(cmd);}\ - else AWC_BAP_LOCK_NOT_CLI_CLI_REAL(cmd); -*/ -#define AWC_BAP_LOCKED 0x01 -#define AWC_BAP_SEMALOCKED 0x02 - -#define AWC_BAP_BUSY 0x8000 -#define AWC_BAP_ERR 0x4000 -#define AWC_BAP_DONE 0x2000 - -#define AWC_CLI 1 -#define AWC_NOT_CLI 2 - -/*#define WAIT61x3 inb(0x61);\ - inb(0x61);\ - inb(0x61); -*/ -#define WAIT61x3 udelay(bap_sleep) - -#define AWC_INIT_COMMAND(context, a_com, a_dev,a_cmmand,a_pr0, a_rid, a_offset, a_len, a_buff) {\ - memset(&a_com,0,sizeof(a_com) );\ - a_com.dev = a_dev;\ - a_com.priv = a_dev->priv;\ - a_com.port = a_dev->base_addr;\ - a_com.bap = NULL;\ - a_com.command = a_cmmand;\ - a_com.par0 = a_pr0;\ - a_com.rid = a_rid;\ - a_com.offset = a_offset;\ - a_com.len = a_len;\ - a_com.buff = a_buff;\ - a_com.lock_state = 0;\ -}; - -/* väga veider asi järgnevast - makrost välja jäetud if (cmd.bap) AWC_IN((cmd.bap)->data);\ -*/ - -#define AWC_BAP_UNLOCK(com) { \ - if (com.bap){ \ - if ( (com.lock_state & AWC_BAP_SEMALOCKED) &&\ - (com.lock_state & AWC_BAP_LOCKED) ){\ - printk("Both Sema and simple lock \n");\ - }\ - if ( com.lock_state & AWC_BAP_SEMALOCKED ){\ - com.bap->lock--; \ - com.lock_state &= ~AWC_BAP_SEMALOCKED;\ - UP(&(com.bap->sem)); \ - spin_unlock_irqrestore(&(cmd.bap->spinlock),cmd.bap->flags);\ - } else if (com.lock_state & AWC_BAP_LOCKED){\ - com.bap->lock--; \ - com.lock_state &= ~AWC_BAP_LOCKED;\ - spin_unlock_irqrestore(&(cmd.bap->spinlock),cmd.bap->flags);\ - }\ - }\ - if (both_bap_lock)\ - spin_unlock_irqrestore(&cmd.priv->both_bap_spinlock,cmd.priv->both_bap_spinlock_flags);\ -} - -#define AWC_RELEASE_COMMAND(com) {\ - AWC_BAP_UNLOCK(cmd);\ - } - - - -#define awc_manufacturer_code 0x015F -#define awc_product_code 0x0005 - - -#define awc_write(base,register,u16value) outw(u16value, (base)+(register)) -#define awc_read(base,register) inw((base)+(register)) -#define AWC_OUT(base,val) outw(val, base) -#define AWC_IN(base) inw(base) - - -#define awc_read_response(cmd) { \ - cmd->status=awc_read(cmd->port,awc_Status_register);\ - cmd->resp0=awc_read(cmd->port,awc_Resp0_register);\ - cmd->resp1=awc_read(cmd->port,awc_Resp1_register);\ - cmd->resp2=awc_read(cmd->port,awc_Resp2_register);\ -}; - -#define awc_command_busy(base) (awc_read(base,awc_Command_register) & 0x8000) -#define awc_command_read(base) awc_read(base,awc_Command_register) -#define awc_command_write(base,cmd) awc_write(base,awc_Command_register,cmd) -#define awc_event_status_Awake(base) (awc_read(base,awc_EvStat_register) & 0x0100) -#define awc_event_status_Link(base) (awc_read(base,awc_EvStat_register) & 0x0080) -#define awc_event_status_Cmd(base) (awc_read(base,awc_EvStat_register) & 0x0010) -#define awc_event_status_Alloc(base) (awc_read(base,awc_EvStat_register) & 0x0008) -#define awc_event_status_TxExc(base) (awc_read(base,awc_EvStat_register) & 0x0004) -#define awc_event_status_Tx(base) (awc_read(base,awc_EvStat_register) & 0x0002) -#define awc_event_status_TxResp(base) (awc_read(base,awc_EvStat_register) & 0x0006) -#define awc_event_status_Rx(base) (awc_read(base,awc_EvStat_register) & 0x0001) -#define awc_event_status(base) (awc_read(base,awc_EvStat_register)) - -#define awc_Link_Status(base) awc_read(base,awc_LinkStatus_register) - -#define awc_Rx_Fid(base) awc_read(base,awc_RxFID_register) -#define awc_Tx_Allocated_Fid(base) awc_read(base,awc_TxAllocFID_register) -#define awc_Tx_Compl_Fid(base) awc_read(base,awc_TxComplFID_register) - -#define awc_event_ack_ClrStckCmdBsy(base) awc_write(base,awc_EvAck_register, 0x4000) -#define awc_event_ack_WakeUp(base) awc_write(base,awc_EvAck_register, 0x2000) -#define awc_event_ack_Awaken(base) awc_write(base,awc_EvAck_register, 0x0100) -#define awc_event_ack_Link(base) awc_write(base,awc_EvAck_register, 0x0080) -#define awc_event_ack_Cmd(base) awc_write(base,awc_EvAck_register, 0x0010) -#define awc_event_ack_Alloc(base) awc_write(base,awc_EvAck_register, 0x0008) -#define awc_event_ack_TxExc(base) awc_write(base,awc_EvAck_register, 0x0004) -#define awc_event_ack_Tx(base) awc_write(base,awc_EvAck_register, 0x0002) -#define awc_event_ack_Rx(base) awc_write(base,awc_EvAck_register, 0x0001) - -#define awc_event_ack(base,ints) awc_write(base,awc_EvAck_register,ints) - -#define awc_ints_enabled(base) (awc_read(base,awc_EvIntEn_register)) -#define awc_ints_enable(base,ints) awc_write(base,awc_EvIntEn_register,ints) - - - -/************************ RX TX BUFF ************************/ - - -struct aironet4500_radio_rx_header { - u32 RxTime; - u16 Status; - u16 PayloadLength; - u8 Reserved0; - u8 RSSI; - u8 Rate; - u8 Frequency; - u8 Rx_association_count; - u8 Reserved1[3]; - u8 PLCP_header[4]; - -}; - - -struct aironet4500_radio_tx_header { - u32 SWSupport; - u16 Status; - #define aironet4500_tx_status_max_retries 0x0002 - #define aironet4500_tx_status_lifetime_exceeded 0x0004 - #define aironet4500_tx_status_AID_failure 0x0008 - #define aironet4500_tx_status_MAC_disabled 0x0010 - #define aironet4500_tx_status_association_lost 0x0020 - u16 PayloadLength; - u16 TX_Control; - #define aironet4500_tx_control_tx_ok_event_enable 0x0002 - #define aironet4500_tx_control_tx_fail_event_enable 0x0004 - #define aironet4500_tx_control_header_type_802_11 0x0008 - #define aironet4500_tx_control_payload_type_llc 0x0010 - #define aironet4500_tx_control_no_release 0x0020 - #define aironet4500_tx_control_reuse_fid \ - (aironet4500_tx_control_tx_ok_event_enable |\ - aironet4500_tx_control_tx_fail_event_enable |\ - aironet4500_tx_control_no_release) - #define aironet4500_tx_control_no_retries 0x0040 - #define aironet4500_tx_control_clear_AID 0x0080 - #define aironet4500_tx_control_strict_order 0x0100 - #define aironet4500_tx_control_use_rts 0x0200 - u16 AID; - u8 Tx_Long_Retry; - u8 Tx_Short_Retry; - u8 tx_association_count; - u8 tx_bit_rate; - #define aironet4500_tx_bit_rate_automatic 0 - #define aironet4500_tx_bit_rate_500kbps 1 - #define aironet4500_tx_bit_rate_1Mbps 2 - #define aironet4500_tx_bit_rate_2Mbps 4 - u8 Max_Long_Retry; - u8 Max_Short_Retry; - u8 Reserved0[2]; -}; - - -struct aironet4500_rx_fid { - - u16 rid; - struct aironet4500_radio_rx_header radio_rx; - struct ieee_802_11_header ieee_802_11; - u16 gap_length; - struct ieee_802_3_header ieee_802_3; - u8 * payload; -}; - - -struct aironet4500_tx_fid { - - u16 fid; - u16 fid_size; - struct aironet4500_radio_tx_header radio_tx; - struct ieee_802_11_header ieee_802_11; - u16 gap_length; - #define aironet4500_gap_len_without_802_3 6 - #define aironet4500_gap_len_with_802_3 0 - struct ieee_802_3_header ieee_802_3; - u8 * payload; -}; - -struct awc_fid { - - u32 type; - #define p80211_llc_snap 0x0100 - #define p80211_8021H 0x0200 - #define p80211_8022 0x0400 - #define p80211_8023 0x0800 - #define p80211_snap_8021H 0x1000 - #define p80211copy_path_skb 0x2000 - - u8 priority; - u8 busy; - - #define awc_tx_fid_complete_read 0x01 - u16 state; - union { - struct aironet4500_tx_fid tx; - struct aironet4500_rx_fid rx; - } u; - - struct ieee_802_11_snap_header snap; - struct ieee_802_11_802_1H_header bridge; - u16 bridge_size; - struct ieee_802_11_802_2_header p8022; - - u16 pkt_len; - u8 * mac; - struct sk_buff * skb; - long long transmit_start_time; - struct awc_fid * next; - struct awc_fid * prev; - -}; - - - -struct awc_fid_queue { - - - struct awc_fid * head; - struct awc_fid * tail; - int size; - spinlock_t spinlock; -}; - - -static __inline__ void -awc_fid_queue_init(struct awc_fid_queue * queue){ - - unsigned long flags; - memset(queue,0, sizeof(struct awc_fid_queue)); - spin_lock_init(&queue->spinlock); - spin_lock_irqsave(&queue->spinlock,flags); - queue->head = NULL; - queue->tail = NULL; - queue->size = 0; - spin_unlock_irqrestore(&queue->spinlock,flags); -}; - -static inline void -awc_fid_queue_push_tail( struct awc_fid_queue * queue, - struct awc_fid * fid){ - - unsigned long flags; - - spin_lock_irqsave(&queue->spinlock,flags); - - fid->prev = queue->tail; - fid->next = NULL; - - if (queue->tail){ - queue->tail->next = fid; - } - queue->tail = fid; - - if (!queue->head) - queue->head = fid; - queue->size++; - - spin_unlock_irqrestore(&queue->spinlock,flags); - -}; - - -static inline void -awc_fid_queue_push_head( struct awc_fid_queue * queue, - struct awc_fid * fid){ - - unsigned long flags; - - spin_lock_irqsave(&queue->spinlock,flags); - - fid->prev = NULL; - fid->next = queue->head; - - if (queue->head){ - queue->head->prev = fid; - } - queue->head = fid; - - if (!queue->tail) - queue->tail = fid; - queue->size++; - - spin_unlock_irqrestore(&queue->spinlock,flags); -}; - - - -static inline void -awc_fid_queue_rm( struct awc_fid_queue * queue, - struct awc_fid * fid){ - - - if (fid->prev) { - fid->prev->next = fid->next; - }; - - if (fid->next) { - fid->next->prev = fid->prev; - }; - - if (fid == queue->tail) { - queue->tail = fid->prev; - }; - if (fid == queue->head) { - queue->head = fid->next; - }; - fid->next = NULL; - fid->prev = NULL; - queue->size--; - if (queue->size ==0 ){ - queue->tail = NULL; - queue->head = NULL; - } -}; - -static inline void -awc_fid_queue_remove( struct awc_fid_queue * queue, - struct awc_fid * fid){ - unsigned long flags; - spin_lock_irqsave(&queue->spinlock,flags); - - awc_fid_queue_rm(queue,fid); - - spin_unlock_irqrestore(&queue->spinlock,flags); - -}; - - - -static inline struct awc_fid * -awc_fid_queue_pop_head( struct awc_fid_queue * queue){ - - unsigned long flags; - struct awc_fid * fid; - - spin_lock_irqsave(&queue->spinlock,flags); - - fid = queue->head; - if (fid) - awc_fid_queue_rm(queue,fid); - - spin_unlock_irqrestore(&queue->spinlock,flags); - - return fid; -}; - - - - -static inline struct awc_fid * -awc_fid_queue_pop_tail( struct awc_fid_queue * queue){ - - unsigned long flags; - struct awc_fid * fid; - - spin_lock_irqsave(&queue->spinlock,flags); - - fid = queue->tail; - if (fid) - awc_fid_queue_rm(queue,fid); - - spin_unlock_irqrestore(&queue->spinlock,flags); - - return fid; -}; - - - -#define AWC_TX_HEAD_SIZE 0x44 -#define AWC_TX_ALLOC_SMALL_SIZE 200 -#define AWC_RX_BUFFS 50 - - -/***************************** RID & CONFIG ***********************/ - -struct awc_config{ - unsigned short Len; /* sizeof(PC4500_CONFIG) */ - unsigned short OperatingMode; /* operating mode */ - - #define MODE_STA_IBSS 0 - #define MODE_STA_ESS 1 - #define MODE_AP 2 - #define MODE_AP_RPTR 3 - #define MODE_ETHERNET_HOST (0<<8) /* rx payloads converted */ - #define MODE_LLC_HOST (1<<8) /* rx payloads left as is */ - #define MODE_AIRONET_EXTEND (1<<9) /* enable Aironet extenstions */ - #define MODE_AP_INTERFACE (1<<10) /* enable ap interface extensions */ - unsigned short ReceiveMode; /* receive mode */ - #define RXMODE_BC_MC_ADDR 0 - #define RXMODE_BC_ADDR 1 /* ignore multicasts */ - #define RXMODE_ADDR 2 /* ignore multicast and broadcast */ - #define RXMODE_RFMON 3 /* wireless monitor mode */ - #define RXMODE_RFMON_ANYBSS 4 - #define RXMODE_LANMON 5 /* lan style monitor -- data packets only */ - #define RXMODE_DISABLE_802_3_HEADER 0x100 /* disables 802.3 header on rx */ - - unsigned short FragmentThreshold; - unsigned short RtsThreshold; - unsigned char StationMacAddress[6]; - unsigned char Rates[8]; - unsigned short ShortRetryLimit; - unsigned short LongRetryLimit; - unsigned short TxLifetime; /* in kusec */ - unsigned short RxLifetime; /* in kusec */ - unsigned short Stationary; - unsigned short Ordering; - unsigned short DeviceType; /* for overriding device type */ - unsigned short _reserved1[5]; /*---------- Scanning/Associating ----------*/ - unsigned short ScanMode; - #define SCANMODE_ACTIVE 0 - #define SCANMODE_PASSIVE 1 - #define SCANMODE_AIROSCAN 2 - unsigned short ProbeDelay; /* in kusec */ - unsigned short ProbeEnergyTimeout; /* in kusec */ - unsigned short ProbeResponseTimeout; - unsigned short BeaconListenTimeout; - unsigned short JoinNetTimeout; - unsigned short AuthenticationTimeout; - unsigned short AuthenticationType; - #define AUTH_OPEN 1 - #define AUTH_SHAREDKEY 2 - #define AUTH_EXCLUDENONWEP 4 - unsigned short AssociationTimeout; - unsigned short SpecifiedApTimeout; - unsigned short OfflineScanInterval; - unsigned short OfflineScanDuration; - unsigned short LinkLossDelay; - unsigned short MaxBeaconLostTime; - unsigned short RefreshInterval; - #define DISABLE_REFRESH 0xFFFF - unsigned short _reserved1a[1]; /*---------- Power save operation ----------*/ - unsigned short PowerSaveMode; - #define POWERSAVE_CAM 0 - #define POWERSAVE_PSP 1 - #define POWERSAVE_PSP_CAM 2 - unsigned short SleepForDtims; - unsigned short ListenInterval; - unsigned short FastListenInterval; - unsigned short ListenDecay; - unsigned short FastListenDelay; - unsigned short _reserved2[2]; /*---------- Ap/Ibss config items ----------*/ - unsigned short BeaconPeriod; - unsigned short AtimDuration; - unsigned short HopPeriod; - unsigned short ChannelSet; - unsigned short Channel; - unsigned short DtimPeriod; - unsigned short _reserved3[2]; /*---------- Radio configuration ----------*/ - unsigned short RadioType; - #define RADIOTYPE_DEFAULT 0 - #define RADIOTYPE_802_11 1 - #define RADIOTYPE_LEGACY 2 - unsigned char u8RxDiversity; - unsigned char u8TxDiversity; - unsigned short TxPower; - #define TXPOWER_DEFAULT 0 - unsigned short RssiThreshold; - #define RSSI_DEFAULT 0 - unsigned short RadioSpecific[4]; /*---------- Aironet Extensions ----------*/ - unsigned char NodeName[16]; - unsigned short ArlThreshold; - unsigned short ArlDecay; - unsigned short ArlDelay; - unsigned short _reserved4[1]; /*---------- Aironet Extensions ----------*/ - unsigned short MagicAction; - #define MAGIC_ACTION_STSCHG 1 - #define MACIC_ACTION_RESUME 2 - #define MAGIC_IGNORE_MCAST (1<<8) - #define MAGIC_IGNORE_BCAST (1<<9) - #define MAGIC_SWITCH_TO_PSP (0<<10) - #define MAGIC_STAY_IN_CAM (1<<10) -}; - - - -struct awc_SSID { - u16 lenght; - u8 SSID[32]; -}; - -struct awc_SSIDs { - u16 ridLen; - struct awc_SSID SSID[3]; - -}; - -struct awc_fixed_APs{ - u16 ridLen; - u8 AP[4][6]; -}; - -struct awc_driver_name{ - u16 ridLen; - u8 name[16]; -}; - -struct awc_encapsulation{ - u16 etherType; - u16 Action; -}; - -struct awc_enc_trans{ - u16 ridLen; - struct awc_encapsulation rules[8]; -}; - -struct awc_wep_key { - u16 ridLen; - u16 KeyIndex; - u8 Address[6]; - u16 KeyLen; - u8 Key[16]; -}; - -struct awc_modulation { - u16 ridLen; - u16 Modulation; -}; - -struct awc_cap{ - u16 ridLen; - u8 OUI[3]; - u8 ProductNum[3]; - u8 ManufacturerName[32]; - u8 ProductName[16]; - u8 ProductVersion[8]; - u8 FactoryAddress[6]; - u8 AironetAddress[6]; - u16 RadioType; - u16 RegDomain; - u8 Callid[6]; - u8 SupportedRates[8]; - u8 RxDiversity; - u8 TxDiversity; - u16 TxPowerLevels[8]; - u16 HardwareVersion; - u16 HardwareCapabilities; - u16 TemperatureRange; - u16 SoftwareVersion; - u16 SoftwareSubVersion; - u16 InterfaceVersion; - u16 SoftwareCapabilities; - u8 BootBlockVersionMajor; - u8 BootBlockVersionMinor; - -}; - - -struct awc_status{ - u16 ridLen; - u8 MacAddress[6]; - u16 OperationalMode; - u16 ErrorCode; - u16 CurrentSignalQuality; - u16 SSIDlength; - u8 SSID[32]; - u8 ApName[16]; - u8 CurrentBssid[32]; - u8 PreviousBSSIDs[3][6]; - u16 BeaconPeriod; - u16 DtimPeriod; - u16 AtimDuration; - u16 HopPeriod; - u16 ChannelSet; - u16 Channel; - - u16 HopsToBackbone; - u16 ApTotalLoad; - u16 OurGeneratedLoad; - u16 AccumulatedArl; - -}; - - -struct awc_AP{ - u16 ridLen; - u16 TIM_Addr; - u16 Airo_Addr; -}; - -struct awc_Statistics_32 { - - u32 RidLen; - u32 RxOverrunErr; - u32 RxPlcpCrcErr; - u32 RxPlcpFormat; - u32 RxPlcpLength; - u32 RxMacCrcErr; - u32 RxMacCrcOk; - u32 RxWepErr; - u32 RxWepOk; - u32 RetryLong; - u32 RetryShort; - u32 MaxRetries; - u32 NoAck; - - u32 NoCts; - u32 RxAck; - u32 RxCts; - u32 TxAck; - u32 TxRts; - u32 TxCts; - u32 TxMc; - u32 TxBc; - u32 TxUcFrags; - u32 TxUcPackets; - u32 TxBeacon; - u32 RxBeacon; - u32 TxSinColl; - u32 TxMulColl; - u32 DefersNo; - u32 DefersProt; - u32 DefersEngy; - u32 DupFram; - u32 RxFragDisc; - u32 TxAged; - u32 RxAged; - u32 LostSync_Max; - u32 LostSync_Mis; - u32 LostSync_Arl; - u32 LostSync_Dea; - u32 LostSync_Disa; - u32 LostSync_Tsf; - u32 HostTxMc; - u32 HostTxBc; - u32 HostTxUc; - u32 HostTxFail; - u32 HostRxMc; - u32 HostRxBc; - u32 HostRxUc; - u32 HostRxDiscar; - u32 HmacTxMc; - u32 HmacTxBc; - u32 HmacTxUc; - u32 HmacTxFail; - u32 HmacRxMc; - u32 HmacRxBc; - u32 HmacRxUc; - u32 HmacRxDisca; - u32 HmacRxAcce; - u32 SsidMismatch; - u32 ApMismatch; - u32 RatesMismatc; - u32 AuthReject; - u32 AuthTimeout; - u32 AssocReject; - u32 AssocTimeout; - u32 NewReason; - u32 AuthFail_1; - u32 AuthFail_2; - u32 AuthFail_3; - u32 AuthFail_4; - u32 AuthFail_5; - u32 AuthFail_6; - u32 AuthFail_7; - u32 AuthFail_8; - u32 AuthFail_9; - u32 AuthFail_10; - u32 AuthFail_11; - u32 AuthFail_12; - u32 AuthFail_13; - u32 AuthFail_14; - u32 AuthFail_15; - u32 AuthFail_16; - u32 AuthFail_17; - u32 AuthFail_18; - u32 AuthFail_19; - u32 RxMan; - u32 TxMan; - u32 RxRefresh; - u32 TxRefresh; - u32 RxPoll; - u32 TxPoll; - u32 HostRetries; - u32 LostSync_HostReq; - u32 HostTxBytes; - u32 HostRxBytes; - u32 ElapsedUsec; - u32 ElapsedSec; - u32 LostSyncBett; -}; - -struct awc_Statistics_16 { - - u16 RidLen; - u16 RxOverrunErr; - u16 RxPlcpCrcErr; - u16 RxPlcpFormat; - u16 RxPlcpLength; - u16 RxMacCrcErr; - u16 RxMacCrcOk; - u16 RxWepErr; - u16 RxWepOk; - u16 RetryLong; - u16 RetryShort; - u16 MaxRetries; - u16 NoAck; - u16 NoCts; - u16 RxAck; - u16 RxCts; - u16 TxAck; - u16 TxRts; - u16 TxCts; - u16 TxMc; - u16 TxBc; - u16 TxUcFrags; - u16 TxUcPackets; - u16 TxBeacon; - u16 RxBeacon; - u16 TxSinColl; - u16 TxMulColl; - u16 DefersNo; - u16 DefersProt; - u16 DefersEngy; - u16 DupFram; - u16 RxFragDisc; - u16 TxAged; - u16 RxAged; - u16 LostSync_Max; - u16 LostSync_Mis; - u16 LostSync_Arl; - u16 LostSync_Dea; - u16 LostSync_Disa; - u16 LostSync_Tsf; - u16 HostTxMc; - u16 HostTxBc; - u16 HostTxUc; - u16 HostTxFail; - u16 HostRxMc; - u16 HostRxBc; - u16 HostRxUc; - u16 HostRxDiscar; - u16 HmacTxMc; - u16 HmacTxBc; - u16 HmacTxUc; - u16 HmacTxFail; - u16 HmacRxMc; - u16 HmacRxBc; - u16 HmacRxUc; - u16 HmacRxDisca; - u16 HmacRxAcce; - u16 SsidMismatch; - u16 ApMismatch; - u16 RatesMismatc; - u16 AuthReject; - u16 AuthTimeout; - u16 AssocReject; - u16 AssocTimeout; - u16 NewReason; - u16 AuthFail_1; - u16 AuthFail_2; - u16 AuthFail_3; - u16 AuthFail_4; - u16 AuthFail_5; - u16 AuthFail_6; - u16 AuthFail_7; - u16 AuthFail_8; - u16 AuthFail_9; - u16 AuthFail_10; - u16 AuthFail_11; - u16 AuthFail_12; - u16 AuthFail_13; - u16 AuthFail_14; - u16 AuthFail_15; - u16 AuthFail_16; - u16 AuthFail_17; - u16 AuthFail_18; - u16 AuthFail_19; - u16 RxMan; - u16 TxMan; - u16 RxRefresh; - u16 TxRefresh; - u16 RxPoll; - u16 TxPoll; - u16 HostRetries; - u16 LostSync_HostReq; - u16 HostTxBytes; - u16 HostRxBytes; - u16 ElapsedUsec; - u16 ElapsedSec; - u16 LostSyncBett; -}; - - -#define AWC_TXCTL_TXOK (1<<1) /* report if tx is ok */ -#define AWC_TXCTL_TXEX (1<<2) /* report if tx fails */ -#define AWC_TXCTL_802_3 (0<<3) /* 802.3 packet */ -#define AWC_TXCTL_802_11 (1<<3) /* 802.11 mac packet */ -#define AWC_TXCTL_ETHERNET (0<<4) /* payload has ethertype */ -#define AWC_TXCTL_LLC (1<<4) /* payload is llc */ -#define AWC_TXCTL_RELEASE (0<<5) /* release after completion */ -#define AWC_TXCTL_NORELEASE (1<<5) /* on completion returns to host */ - - -/************************* LINK STATUS STUFF *******************/ - -#define awc_link_status_loss_of_sync_missed_beacons 0x8000 -#define awc_link_status_loss_of_sync_max_retries 0x8001 -#define awc_link_status_loss_of_sync_ARL_exceed 0x8002 -#define awc_link_status_loss_of_sync_host_request 0x8003 -#define awc_link_status_loss_of_sync_TSF_sync 0x8004 -#define awc_link_status_deauthentication 0x8100 -#define awc_link_status_disassociation 0x8200 -#define awc_link_status_association_failed 0x8400 -#define awc_link_status_authentication_failed 0x0300 -#define awc_link_status_associated 0x0400 - -struct awc_strings { - int par; - unsigned int mask; - const char * string; - -}; - -#define awc_link_status_strings {\ -{awc_link_status_loss_of_sync_missed_beacons, 0xFFFF,"Loss of sync -- missed beacons"},\ -{awc_link_status_loss_of_sync_max_retries, 0xFFFF,"Loss of sync -- max retries"},\ -{awc_link_status_loss_of_sync_ARL_exceed, 0xFFFF,"Loss of sync -- average retry level (ARL) exceeded"},\ -{awc_link_status_loss_of_sync_host_request, 0xFFFF,"Loss of sync -- host request"},\ -{awc_link_status_loss_of_sync_TSF_sync, 0xFFFF,"Loss of sync -- TSF synchronization"},\ -{awc_link_status_deauthentication, 0xFF00,"Deauthentication "},\ -{awc_link_status_disassociation, 0xFF00,"Disassocation "},\ -{awc_link_status_association_failed , 0xFF00,"Association failed "},\ -{awc_link_status_authentication_failed, 0xFF00,"Authentication failure"},\ -{awc_link_status_associated, 0xFFFF,"Associated "},\ -{0,0,NULL}\ -} - - -/****************************** COMMANDS and DEFAULTS and STATUSES ***********/ - -/****************************** COMMANDS */ - - -// Command definitions - - - - -#define awc4500wout(base, com, p0,p1,p2) {\ - awc_write(base,awc_Param0_register, p0);\ - awc_write(base,awc_Param1_register, p1);\ - awc_write(base,awc_Param2_register, p2);\ - WAIT61x3;\ - awc_write(base,awc_Command_register, com);\ - WAIT61x3;\ -} -#define awc_wout(cmd, com, p0,p1,p2) {\ - awc_write(base,awc_Param0_register, p0);\ - awc_write(base,awc_Param1_register, p1);\ - awc_write(base,awc_Param2_register, p2);\ - WAIT61x3;\ - awc_write(base,awc_Command_register, com);\ - WAIT61x3;\ -} - - -#define awc_command_NOP(cmd) awc_wout( cmd,0x0000,0,0,0) // NOP -#define awc_command_Enable_All(cmd) awc_wout( cmd,0x0001,0,0,0) // Enable -#define awc_command_Enable_MAC(cmd) awc_wout( cmd,0x0101,0,0,0) // Enable Mac -#define awc_command_Enable_Rx(cmd) awc_wout( cmd,0x0201,0,0,0) // Enable Rx -#define awc_command_Disable_MAC(cmd) awc_wout( cmd,0x0002,0,0,0) // Disable -#define awc_command_Sync_Loss(cmd) awc_wout( cmd,0x0003,0,0,0) // Force a Loss of Sync -#define awc_command_Soft_Reset(cmd) awc_wout( cmd,0x0004,0,0,0) // Firmware Restart (soft reset) -#define awc_command_Host_Sleep(cmd) awc_wout( cmd,0x0005,0,0,0) // Host Sleep (must be issued as 0x0085) -#define awc_command_Magic_Packet(cmd) awc_wout( cmd,0x0006,0,0,0) // Magic Packet -#define awc_command_Read_Configuration(cmd) awc_wout( cmd,0x0008,0,0,0) // Read the Configuration from nonvolatile storage -#define awc_command_Allocate_TX_Buff(cmd,size) awc_wout( cmd,0x000A,size,0,0) // Allocate Transmit Buffer -#define awc_command_TX(cmd,FID) awc_wout( cmd,0x000B,FID ,0,0) // Transmit -#define awc_command_Deallocate(cmd,FID) awc_wout( cmd,0x000C,FID ,0,0) // Deallocate -#define awc_command_NOP2(cmd) awc_wout( cmd,0x0010,0,0,0) // NOP (same as 0x0000) -#define awc_command_Read_RID(cmd,RID) awc_wout( cmd,0x0021,RID ,0,0) // Read RID -#define awc_command_Write_RID(cmd,RID) awc_wout( cmd,0x0121,RID ,0,0) // Write RID -#define awc_command_Allocate_Buff(cmd,size) awc_wout( cmd,0x0028,size,0,0) // Allocate Buffer -#define awc_command_PSP_Nodes(cmd) awc_wout( cmd,0x0030,0,0,0) // PSP nodes (AP only) -#define awc_command_Set_Phy_register(cmd,phy_register,clear_bits, set_bits)\ - awc_wout( cmd,0x003E,phy_register,clear_bits, set_bits) // Set PHY register -#define awc_command_TX_Test(cmd,command, frequency, pattern) awc_wout( cmd,0x003F,command, frequency, pattern) // Transmitter Test -#define awc_command_RX_Test(cmd) awc_wout( cmd,0x013F,0,0,0) // RX Test -#define awc_command_Sleep(cmd) awc_wout( cmd,0x0085,0,0,0) // Go to Sleep (No Ack bit is mandatory) -#define awc_command_Save_Configuration(cmd) awc_wout( cmd,0x0108,0,0,0) // Save the configuration to nonvolatile - - -#define AWC_COMMAND_NOOP_BULL 0x000 -#define AWC_COMMAND_ENABLE 0x001 -#define AWC_COMMAND_ENABLE_MAC 0x101 -#define AWC_COMMAND_ENABLE_RX 0x201 -#define AWC_COMMAND_DISABLE 0x002 -#define AWC_COMMAND_LOSE_SYNC 0x003 -#define AWC_COMMAND_SOFT_RESET 0x004 -#define AWC_COMMAND_HOST_SLEEP 0x085 -#define AWC_COMMAND_MAGIC_PACKET 0x006 -#define AWC_COMMAND_READ_CONF 0x008 -#define AWC_COMMAND_SAVE_CONF 0x108 -#define AWC_COMMAND_TX_ALLOC 0x00A -#define AWC_COMMAND_TX 0x00B -#define AWC_COMMAND_DEALLOC 0x00C -#define AWC_COMMAND_NOOP 0x010 -#define AWC_COMMAND_READ_RID 0x021 -#define AWC_COMMAND_WRITE_RID 0x121 -#define AWC_COMMAND_ALLOC 0x028 -#define AWC_COMMAND_PSP_NODES 0x030 -#define AWC_COMMAND_SET_PHY 0x03E -#define AWC_COMMAND_TX_TEST 0x03F -#define AWC_COMMAND_SLEEP 0x085 - - -#define awc_command_name_strings {\ - {0x0000, 0x00FF,"awc_command_NOP " },\ - {0x0001, 0x00FF,"awc_command_Enable_All " },\ - {0x0101, 0x01FF,"awc_command_Enable_MAC " },\ - {0x0201, 0x01FF,"awc_command_Enable_Rx " },\ - {0x0002, 0x00FF,"awc_command_Disable_MAC " },\ - {0x0003, 0x00FF,"awc_command_Sync_Loss " },\ - {0x0004, 0x00FF,"awc_command_Soft_Reset " },\ - {0x0005, 0x00FF,"awc_command_Host_Sleep " },\ - {0x0006, 0x00FF,"awc_command_Magic_Packet " },\ - {0x0008, 0x00FF,"awc_command_Read_Configuration " },\ - {0x000A, 0x00FF,"awc_command_Allocate_TX_Buff " },\ - {0x000B, 0x00FF,"awc_command_TX " },\ - {0x000C, 0x00FF,"awc_command_Deallocate " },\ - {0x0010, 0x00FF,"awc_command_NOP2 " },\ - {0x0021, 0x00FF,"awc_command_Read_RID " },\ - {0x0121, 0x01FF,"awc_command_Write_RID " },\ - {0x0028, 0x00FF,"awc_command_Allocate_Buff " },\ - {0x0030, 0x00FF,"awc_command_PSP_Nodes " },\ - {0x003E, 0x00FF,"awc_command_Set_Phy_register " },\ - {0x003F, 0x00FF,"awc_command_TX_Test " },\ - {0x013F, 0x01FF,"awc_command_RX_Test " },\ - {0x0085, 0x00FF,"awc_command_Sleep " },\ - {0x0108, 0x01FF,"awc_command_Save_Configuration " },\ - {0x0000, 0x00FF, NULL}\ -}; - - -/***************************** STATUSES */ - -#define awc_reply_success 0x0000 - -#define awc_reply_error_strings {\ - { 0x0000, 0x00FF," Success"},\ - { 0x0001, 0x00FF," Illegal command."},\ - { 0x0002, 0x00FF," Illegal format."},\ - { 0x0003, 0x00FF," Invalid FID."},\ - { 0x0004, 0x00FF," Invalid RID."},\ - { 0x0005, 0x00FF," Too Large"},\ - { 0x0006, 0x00FF," MAC is not disabled."},\ - { 0x0007, 0x00FF," Alloc is still busy processing previous alloc"},\ - { 0x0008, 0x00FF," Invalid Mode Field"},\ - { 0x0009, 0x00FF," Tx is not allowed in monitor mode"},\ - { 0x000A, 0x00FF," Loop test or memory test error"},\ - { 0x000B, 0x00FF," Cannot read this RID."},\ - { 0x000C, 0x00FF," Cannot write to this RID."},\ - { 0x000D, 0x00FF," Tag not found."},\ - { 0x0080, 0x00FF," Config mode is invalid."},\ - { 0x0081, 0x00FF," Config hop interval is invalid."},\ - { 0x0082, 0x00FF," Config beacon interval is invalid."},\ - { 0x0083, 0x00FF," Config receive mode is invalid."},\ - { 0x0084, 0x00FF," Config MAC address is invalid."},\ - { 0x0085, 0x00FF," Config rates are invalid."},\ - { 0x0086, 0x00FF," Config ordering field is invalid."},\ - { 0x0087, 0x00FF," Config scan mode is invalid."},\ - { 0x0088, 0x00FF," Config authentication type is invalid."},\ - { 0x0089, 0x00FF," Config power save mode is invalid."},\ - { 0x008A, 0x00FF," Config radio type is invalid."},\ - { 0x008B, 0x00FF," Config diversity is invalid."},\ - { 0x008C, 0x00FF," Config SSID list is invalid."},\ - { 0x008D, 0x00FF," Config specified AP list is invalid."},\ - { 0x0000, 0x00FF, NULL}\ -}; - -#define awc_reply_command_failed( status) ((status & 0x7F00) == 0x7F) - - -/************************* PHY and TEST commands ****************/ - - -// this might be wrong and reading is not implemented(was not in spec properly) -#define awc_Set_PLCP_Word(PLCP_Word)\ - awc_command_Set_Phy_register(base,0x8000,0 ,PLCP_Word) -#define awc_Set_TX_Test_Freq(Tx_Test_Freq)\ - awc_command_Set_Phy_register(base,0x8002,0 ,Tx_Test_Freq) -#define awc_Set_Tx_Power(Tx_Power)\ - awc_command_Set_Phy_register(base,0x8004,0 ,Tx_Power) -#define awc_Set_RSSI_Treshold(RSSI_Treshold)\ - awc_command_Set_Phy_register(base,0x8006,0 ,RSSI_Treshold) -#define awc_Get_PLCP_Word(PLCP_Word)\ - awc_command_Set_Phy_register(base,0x8000,0 ,0) -#define awc_Get_TX_Test_Freq(Tx_Test_Freq)\ - awc_command_Set_Phy_register(base,0x8002,0 ,0) -#define awc_Get_Tx_Power(Tx_Power)\ - awc_command_Set_Phy_register(base,0x8004,0 ,0) -#define awc_Get_RSSI_Treshold(RSSI_Treshold)\ - awc_command_Set_Phy_register(base,0x8006,0 ,0) - - -#define awc_tx_test_code_end 0x0000 // Ends the transmitter test -#define awc_tx_test_code_loop 0x0001 // Loop back to the beginning of the commands -#define awc_tx_test_code_start 0x0002 // Start transmitting -#define awc_tx_test_code_stop 0x0003 // Stop transmitting -#define awc_tx_test_code_delayu 0x0004 // Delay for N usec where N is the next word -#define awc_tx_test_code_delayk 0x0005 // Delay for N Kusec where N is the next word -#define awc_tx_test_code_next 0x0006 // Go to the next frequency in the frequency RID -#define awc_tx_test_code_rx 0x0007 // Start receive mode - -#define awc_tx_test_code_strings {\ -{ awc_tx_test_code_end , 0x000f ," Ends the transmitter test"},\ -{ awc_tx_test_code_loop , 0x000f ," Loop back to the beginning of the commands"},\ -{ awc_tx_test_code_start , 0x000f ," Start transmitting"},\ -{ awc_tx_test_code_stop , 0x000f ," Stop transmitting"},\ -{ awc_tx_test_code_delayu , 0x000f ," Delay for N usec where N is the next word"},\ -{ awc_tx_test_code_delayk , 0x000f ," Delay for N Kusec where N is the next word"},\ -{ awc_tx_test_code_next , 0x000f ," Go to the next frequency in the frequency RID"},\ -{ awc_tx_test_code_rx , 0x000f ," Start receive mode"},\ -{ 0 , 0x000f ,NULL}\ -}; - - - -#define AWC_COMMSTAT_HARD_RESET 0x0000001 -#define AWC_COMMSTAT_WAKE 0x0000002 -#define AWC_COMMSTAT_SOFT_RESET 0x0000004 -#define AWC_COMMSTAT_CONFIGURE 0x0000008 -#define AWC_COMMSTAT_READ_CONF 0x0000010 -#define AWC_COMMSTAT_SAVE_CONF 0x0000020 -#define AWC_COMMSTAT_DEALLOC 0x0000040 -#define AWC_COMMSTAT_ALLOC_TX 0x0000080 -#define AWC_COMMSTAT_ALLOC_TEST 0x0000100 -#define AWC_COMMSTAT_ENABLE_MAC 0x0000200 -#define AWC_COMMSTAT_ENABLE_RX 0x0000400 -#define AWC_COMMSTAT_DISABLE_MAC 0x0000800 -#define AWC_COMMSTAT_RX_ACK 0x0001000 -#define AWC_COMMSTAT_TX_ACK 0x0002000 -#define AWC_COMMSTAT_AWAKEN_ACK 0x0004000 -#define AWC_COMMSTAT_TX_FAIL_ACK 0x0008000 -#define AWC_COMMSTAT_LINK_ACK 0x0010000 -#define AWC_COMMSTAT_CLR_CMD 0x0020000 -#define AWC_COMMSTAT_ALLOC_ACK 0x0040000 -#define AWC_COMMSTAT_HOST_SLEEP 0x0080000 -#define AWC_COMMSTAT_RX 0x0100000 -#define AWC_COMMSTAT_TX 0x0200000 -#define AWC_COMMSTAT_SLEEP 0x0400000 -#define AWC_COMMSTAT_PSP_NODES 0x0800000 -#define AWC_COMMSTAT_SET_TX_POWER 0x1000000 - - -/***************************** R I D ***************/ - -#define AWC_NOF_RIDS 18 -extern int awc_rid_setup(struct net_device * dev); - -struct aironet4500_rid_selector{ - const u16 selector; - const unsigned MAC_Disable_at_write:1; - const unsigned read_only:1; - const unsigned may_change:1; - const char * name; -}; - - - - - -extern const struct aironet4500_rid_selector aironet4500_RID_Select_General_Config; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_SSID_list; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_AP_list ; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_Driver_name; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_Encapsulation; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_Active_Config; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_Capabilities; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_AP_Info ; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_Radio_Info; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_Status ; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_Modulation ; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_WEP_volatile ; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_WEP_nonvolatile ; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_16_stats; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_16_stats_delta; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_16_stats_clear; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_32_stats; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_32_stats_delta; -extern const struct aironet4500_rid_selector aironet4500_RID_Select_32_stats_clear; - -#define awc_def_gen_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_General_Config,offset, bits,1,1,0,0, mask, value, name, value_name} -#define awc_def_SSID_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_SSID_list,offset, bits,1,1,0,0, mask, value, name, value_name} -#define awc_def_AP_List_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_AP_list,offset, bits,1,1,0,0, mask, value, name, value_name} -#define awc_def_Dname_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_Driver_name,offset, bits,1,1,0,0, mask, value, name, value_name} -#define awc_def_act_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_Active_Config,offset, bits,1,1,0,0, mask, value, name, value_name} -#define awc_def_Cap_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_Capabilities,offset, bits,1,1,0,0, mask, value, name, value_name} -#define awc_def_AP_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_AP_Info,offset, bits,1,1,0,0, mask, value, name, value_name} -#define awc_def_Radio_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_Radio_Info,offset, bits,1,1,0,0, mask, value, name, value_name} -#define awc_def_Stat_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_Status,offset, bits,1,1,0,0, mask, value, name, value_name} -#define awc_def_Enc_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_Encapsulation,offset, bits,1,1,0,0, mask, value, name, value_name} - -#define awc_def_WEPv_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_WEP_volatile,offset, bits,1,1,0,0, mask, value, name, value_name} -#define awc_def_WEPnv_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_WEP_nonvolatile,offset, bits,1,1,0,0, mask, value, name, value_name} -#define awc_def_Modulation_RID(offset,name, bits,mask,value,value_name)\ - {&aironet4500_RID_Select_Modulation,offset, bits,1,1,0,0, mask, value, name, value_name} - -#define awc_def_Stats_RID(o16,offset,name, value_name)\ - {&aironet4500_RID_Select_32_stats,offset, 32,1,1,0,0, 0xffffffff, 0, name, value_name} -#define awc_def_Stats_delta_RID(o16,offset,name, value_name)\ - {&aironet4500_RID_Select_32_stats_delta,offset, 32,1,1,0,0, 0xffffffff, 0, name, value_name} -#define awc_def_Stats_clear_RID(o16,offset,name, value_name)\ - {&aironet4500_RID_Select_32_stats_delta,offset,32,1,1,0,0, 0xffffffff, 0, name,value_name} - -#define awc_def_Stats16_RID(offset,o32,name, value_name)\ - {&aironet4500_RID_Select_16_stats,offset, 16,1,1,0,0, 0xffffffff, 0, name, value_name} -#define awc_def_Stats16_delta_RID(offset,o32,name, value_name)\ - {&aironet4500_RID_Select_16_stats_delta,offset, 16,1,1,0,0, 0xffffffff, 0, name,value_name} -#define awc_def_Stats16_clear_RID(offset,o32,name, value_name)\ - {&aironet4500_RID_Select_16_stats_delta,offset, 16,1,1,0,0, 0xffffffff, 0, name,value_name} - - -#define aironet4500_RID_Select_strings {\ -{ 0xFF10, 0xffff, "General Configuration"},\ -{ 0xFF11, 0xffff, "Valid SSID list" },\ -{ 0xFF12, 0xffff, "Valid AP list"},\ -{ 0xFF13, 0xffff, "Driver name"},\ -{ 0xFF14, 0xffff, "Ethernet Protocol"},\ -{ 0xFF15, 0xffff, "WEP volatile"},\ -{ 0xFF16, 0xffff, "WEP nonvolatile"},\ -{ 0xFF17, 0xffff, "Modulation"},\ -{ 0xFF20, 0xffff, "Actual Configuration"},\ -{ 0xFF00, 0xffff, "Capabilities"},\ -{ 0xFF01, 0xffff, "AP Info"},\ -{ 0xFF02, 0xffff, "Radio Info"},\ -{ 0xFF50, 0xffff, "Status"},\ -{ 0xFF60, 0xffff, "Cumulative 16-bit Statistics"},\ -{ 0xFF61, 0xffff, "Delta 16-bit Statistics"},\ -{ 0xFF62, 0xffff, "Delta 16-bit Statistics and Clear"},\ -{ 0xFF68, 0xffff, "Cumulative 32-bit Statistics"},\ -{ 0xFF69, 0xffff, "Delta 32-bit Statistics "},\ -{ 0xFF6A, 0xffff, "Delta 32-bit Statistics and Clear"},\ -{ 0x0000, 0xffff, NULL}\ -} - - - - - -struct aironet4500_RID { - const struct aironet4500_rid_selector * selector; - const u32 offset; - const u8 bits; - const u8 array; - const u32 units; - const unsigned read_only:1; - const unsigned null_terminated:1; - const u32 mask; - const u32 value; - const char * name; - const char * value_name; - -}; - -struct aironet4500_RID_names{ - struct aironet4500_RID rid; - char *name; -}; - -struct aironet4500_RID_names_values{ - struct aironet4500_RID rid; - char *name; - u32 mask; -}; - -struct awc_rid_dir{ - const struct aironet4500_rid_selector * selector; - const int size; - const struct aironet4500_RID * rids; - struct net_device * dev ; - void * buff; - int bufflen; // just checking -}; - -extern int awc_nof_rids; -extern struct awc_rid_dir awc_rids[]; - - - - - -struct awc_private { - dev_node_t node; // somewhere back in times PCMCIA needed that - - int dummy_test; // left for cleanup - // card rid inmemory copy - struct awc_config config; // card RID mirrors - struct awc_config general_config; // - struct awc_SSIDs SSIDs; - struct awc_fixed_APs fixed_APs; - struct awc_driver_name driver_name; - struct awc_enc_trans enc_trans; - struct awc_cap capabilities; - struct awc_status status; - struct awc_AP AP; - struct awc_Statistics_32 statistics; - struct awc_Statistics_32 statistics_delta; - struct awc_Statistics_32 statistics_delta_clear; - struct awc_Statistics_16 statistics16; - struct awc_Statistics_16 statistics16_delta; - struct awc_Statistics_16 statistics16_delta_clear; - struct awc_wep_key wep_volatile; - struct awc_wep_key wep_nonvolatile; - struct awc_modulation modulation; - - // here are just references to rids - struct awc_rid_dir rid_dir[AWC_NOF_RIDS]; - int rids_read; - - - struct awc_bap bap0; - struct awc_bap bap1; - int sleeping_bap; - - struct awc_fid_queue tx_small_ready; - struct awc_fid_queue tx_large_ready; - struct awc_fid_queue tx_post_process; - struct awc_fid_queue tx_in_transmit; - spinlock_t queues_lock; - - struct awc_fid_queue rx_ready; - struct awc_fid_queue rx_post_process; - - - - struct semaphore tx_buff_semaphore; - volatile int tx_buffs_in_use; - volatile int tx_small_buffs_in_use; - volatile int tx_buffs_total; - volatile int tx_small_buffs_total; - int large_buff_mem; - int small_buff_no; - - volatile int mac_enabled; - u16 link_status; - u8 link_status_changed; - - volatile int ejected; - volatile int work_running; - volatile int work_active; - volatile long tx_chain_active; - volatile u16 enabled_interrupts; - volatile u16 waiting_interrupts; - volatile int interrupt_count; - - // Command serialize stuff -//changed to spinlock struct semaphore command_semaphore; - spinlock_t both_bap_spinlock; // on SMP, card should theorethically live without that - unsigned long both_bap_spinlock_flags; - spinlock_t bap_setup_spinlock; // on SMP, card should theoretically live without that - unsigned long bap_setup_spinlock_flags; - spinlock_t command_issuing_spinlock; - unsigned long command_issuing_spinlock_flags; - spinlock_t interrupt_spinlock; - - volatile int unlock_command_postponed; - struct awc_command cmd; - long long async_command_start; - volatile int command_semaphore_on; - struct work_struct work; - volatile int process_tx_results; - - u8 p2p[6]; - u8 bssid[6]; - int p2p_uc; - int p2p_found; - int p802_11_send; - int simple_bridge; - int force_rts_on_shorter; - int force_tx_rate; - int ip_tos_reliability_rts; - int ip_tos_troughput_no_retries; - int full_stats; - int debug; - - struct net_device_stats stats; - - struct ctl_table * proc_table; - - void * bus; - int card_type; -}; - -extern int awc_init(struct net_device * dev); -extern void awc_reset(struct net_device *dev); -extern int awc_config(struct net_device *dev); -extern int awc_open(struct net_device *dev); -extern void awc_tx_timeout(struct net_device *dev); -extern int awc_start_xmit(struct sk_buff *, struct net_device *); -extern void awc_interrupt(int irq, void *dev_id, struct pt_regs *regs); -extern struct net_device_stats * awc_get_stats(struct net_device *dev); -extern void awc_set_multicast_list(struct net_device *dev); -extern int awc_change_mtu(struct net_device *dev, int new_mtu); -extern int awc_close(struct net_device *dev); -extern int awc_private_init(struct net_device * dev); -extern int awc_register_proc(int (*awc_proc_set_device) (int),int (*awc_proc_unset_device)(int)); -extern int awc_unregister_proc(void); -extern int (* awc_proc_set_fun) (int) ; -extern int (* awc_proc_unset_fun) (int) ; -extern int awc_interrupt_process(struct net_device * dev); -extern int awc_readrid(struct net_device * dev, struct aironet4500_RID * rid, void *pBuf ); -extern int awc_writerid(struct net_device * dev, struct aironet4500_RID * rid, void *pBuf); -extern int awc_readrid_dir(struct net_device * dev, struct awc_rid_dir * rid ); -extern int awc_writerid_dir(struct net_device * dev, struct awc_rid_dir * rid); -extern int awc_tx_alloc(struct net_device * dev) ; -extern int awc_tx_dealloc(struct net_device * dev); -extern struct awc_fid *awc_tx_fid_lookup(struct net_device * dev, u16 fid); -extern int awc_issue_soft_reset(struct net_device * dev); -extern int awc_issue_noop(struct net_device * dev); -extern int awc_dump_registers(struct net_device * dev); -extern unsigned short awc_issue_command_and_block(struct awc_command * cmd); -extern int awc_enable_MAC(struct net_device * dev); -extern int awc_disable_MAC(struct net_device * dev); -extern int awc_read_all_rids(struct net_device * dev); -extern int awc_write_all_rids(struct net_device * dev); -extern int awc_receive_packet(struct net_device * dev); -extern int awc_transmit_packet(struct net_device * dev, struct awc_fid * tx_buff) ; -extern int awc_tx_complete_check(struct net_device * dev); -extern int awc_interrupt_process(struct net_device * dev); -extern void awc_work(struct net_device *dev); -extern int awc_802_11_find_copy_path(struct net_device * dev, struct awc_fid * rx_buff); -extern void awc_802_11_router_rx(struct net_device * dev,struct awc_fid * rx_buff); -extern int awc_802_11_tx_find_path_and_post(struct net_device * dev, struct sk_buff * skb); -extern void awc_802_11_after_tx_packet_to_card_write(struct net_device * dev, struct awc_fid * tx_buff); -extern void awc_802_11_after_failed_tx_packet_to_card_write(struct net_device * dev,struct awc_fid * tx_buff); -extern void awc_802_11_after_tx_complete(struct net_device * dev, struct awc_fid * tx_buff); -extern void awc_802_11_failed_rx_copy(struct net_device * dev,struct awc_fid * rx_buff); -extern int awc_tx_alloc(struct net_device * dev) ; -extern int awc_tx_dealloc_fid(struct net_device * dev,struct awc_fid * fid); -extern int awc_tx_dealloc(struct net_device * dev); -extern struct awc_fid * - awc_tx_fid_lookup_and_remove(struct net_device * dev, u16 fid_handle); -extern int awc_queues_init(struct net_device * dev); -extern int awc_queues_destroy(struct net_device * dev); -extern int awc_rids_setup(struct net_device * dev); - - - -extern int awc_debug; -extern int bap_sleep ; -extern int bap_sleep_after_setup ; -extern int sleep_before_command ; -extern int bap_sleep_before_write; -extern int sleep_in_command ; -extern int both_bap_lock; -extern int bap_setup_spinlock; -extern int tx_queue_len ; -extern int tx_rate; -extern int awc_full_stats; - -#define MAX_AWCS 4 -extern struct net_device * aironet4500_devices[MAX_AWCS]; - -#define AWC_DEBUG 1 - -#ifdef AWC_DEBUG - #define DEBUG(a,args...) if (awc_debug & a) printk( args) - #define AWC_ENTRY_EXIT_DEBUG(a) if (awc_debug & 8) printk( a) -#else - #define DEBUG(a, args...) - #define AWC_ENTRY_EXIT_DEBUG(a) -#endif - -#endif /* AIRONET4500_H */ diff --git a/drivers/net/aironet4500_card.c b/drivers/net/aironet4500_card.c deleted file mode 100644 index 3899ff69d367..000000000000 --- a/drivers/net/aironet4500_card.c +++ /dev/null @@ -1,1019 +0,0 @@ -/* - * Aironet 4500 PCI-ISA-i365 driver - * - * Elmer Joandi, Januar 1999 - * Copyright GPL - * - * - * Revision 0.1 ,started 30.12.1998 - * - * Revision 0.2, Feb 27, 2000 - * Jeff Garzik - softnet, cleanups - * - */ -#ifdef MODULE -static const char *awc_version = -"aironet4500_cards.c v0.2 Feb 27, 2000 Elmer Joandi, elmer@ylenurme.ee.\n"; -#endif - -#include <linux/delay.h> -#include <linux/netdevice.h> -#include <linux/etherdevice.h> -#include <linux/config.h> -#include <linux/if_arp.h> -#include <linux/init.h> -#include <linux/ioport.h> -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/skbuff.h> -#include <linux/slab.h> -#include <linux/string.h> -#include <linux/timer.h> -#include <linux/interrupt.h> -#include <linux/in.h> -#include <linux/version.h> - -#include <asm/io.h> -#include <asm/system.h> -#include <asm/bitops.h> - -#include "aironet4500.h" - -#define PCI_VENDOR_ID_AIRONET 0x14b9 -#define PCI_DEVICE_AIRONET_4800_1 0x1 -#define PCI_DEVICE_AIRONET_4800 0x4500 -#define PCI_DEVICE_AIRONET_4500 0x4800 -#define AIRONET4X00_IO_SIZE 0x40 -#define AIRONET4X00_CIS_SIZE 0x300 -#define AIRONET4X00_MEM_SIZE 0x300 - -#define AIRONET4500_PCI 1 -#define AIRONET4500_PNP 2 -#define AIRONET4500_ISA 3 -#define AIRONET4500_365 4 - - -#ifdef CONFIG_AIRONET4500_PCI - -#include <linux/pci.h> - -static struct pci_device_id aironet4500_card_pci_tbl[] __devinitdata = { - { PCI_VENDOR_ID_AIRONET, PCI_DEVICE_AIRONET_4800_1, PCI_ANY_ID, PCI_ANY_ID, }, - { PCI_VENDOR_ID_AIRONET, PCI_DEVICE_AIRONET_4800, PCI_ANY_ID, PCI_ANY_ID, }, - { PCI_VENDOR_ID_AIRONET, PCI_DEVICE_AIRONET_4500, PCI_ANY_ID, PCI_ANY_ID, }, - { } /* Terminating entry */ -}; -MODULE_DEVICE_TABLE(pci, aironet4500_card_pci_tbl); -MODULE_LICENSE("GPL"); - - -static int awc_pci_init(struct net_device * dev, struct pci_dev *pdev, - int ioaddr, int cis_addr, int mem_addr,u8 pci_irq_line) ; - - -int awc4500_pci_probe(struct net_device *dev) -{ - int cards_found = 0; - u8 pci_irq_line = 0; -// int p; - struct pci_dev *pdev = NULL; - - if (!pci_present()) - return -1; - - while ((pdev = pci_find_class (PCI_CLASS_NETWORK_OTHER << 8, pdev))) { - u16 pci_command, new_command; - u32 pci_memaddr; - u32 pci_ioaddr; - u32 pci_cisaddr; - - if (pdev->vendor != PCI_VENDOR_ID_AIRONET) - continue; - if ((pdev->device != PCI_DEVICE_AIRONET_4800_1) && - (pdev->device != PCI_DEVICE_AIRONET_4800) && - (pdev->device != PCI_DEVICE_AIRONET_4500)) - continue; - - if (pci_enable_device(pdev)) - continue; - - pci_irq_line = pdev->irq; - pci_memaddr = pci_resource_start (pdev, 0); - pci_cisaddr = pci_resource_start (pdev, 1); - pci_ioaddr = pci_resource_start (pdev, 2); - -// printk("\n pci capabilities %x and ptr %x \n",pci_caps,pci_caps_ptr); - /* Remove I/O space marker in bit 0. */ - -// if (check_region(pci_ioaddr, AIRONET4X00_IO_SIZE) || -// check_region(pci_cisaddr, AIRONET4X00_CIS_SIZE) || -// check_region(pci_memaddr, AIRONET4X00_MEM_SIZE)) { -// printk(KERN_ERR "aironet4X00 mem addrs not available for maping \n"); -// continue; -// } - if (!request_region(pci_ioaddr, AIRONET4X00_IO_SIZE, "aironet4x00 ioaddr")) - continue; -// request_region(pci_cisaddr, AIRONET4X00_CIS_SIZE, "aironet4x00 cis"); -// request_region(pci_memaddr, AIRONET4X00_MEM_SIZE, "aironet4x00 mem"); - - mdelay(10); - - pci_read_config_word(pdev, PCI_COMMAND, &pci_command); - new_command = pci_command | PCI_COMMAND_SERR; - if (pci_command != new_command) - pci_write_config_word(pdev, PCI_COMMAND, new_command); - - -/* if (device == PCI_DEVICE_AIRONET_4800) - pci_write_config_dword(pdev, 0x40, 0x00000000); - - udelay(1000); -*/ - if (pdev->device == PCI_DEVICE_AIRONET_4800) - pci_write_config_dword(pdev, 0x40, 0x40000000); - - if (awc_pci_init(dev, pdev, pci_ioaddr,pci_cisaddr,pci_memaddr,pci_irq_line)){ - printk(KERN_ERR "awc4800 pci init failed \n"); - break; - } - dev = 0; - cards_found++; - } - - return cards_found ? 0 : -ENODEV; -} - - -static int awc_pci_init(struct net_device * dev, struct pci_dev *pdev, - int ioaddr, int cis_addr, int mem_addr, u8 pci_irq_line) { - - int i, allocd_dev = 0; - - if (!dev) { - dev = init_etherdev(NULL, 0); - if (!dev) - return -ENOMEM; - allocd_dev = 1; - } - dev->priv = kmalloc(sizeof(struct awc_private),GFP_KERNEL ); - if (!dev->priv) { - if (allocd_dev) { - unregister_netdev(dev); - kfree(dev); - } - return -ENOMEM; - } - memset(dev->priv,0,sizeof(struct awc_private)); - if (!dev->priv) { - printk(KERN_CRIT "aironet4x00: could not allocate device private, some unstability may follow\n"); - if (allocd_dev) { - unregister_netdev(dev); - kfree(dev); - } - return -ENOMEM; - }; - -// ether_setup(dev); - -// dev->tx_queue_len = tx_queue_len; - - dev->hard_start_xmit = &awc_start_xmit; -// dev->set_config = &awc_config_misiganes,aga mitte awc_config; - dev->get_stats = &awc_get_stats; -// dev->set_multicast_list = &awc_set_multicast_list; - dev->change_mtu = awc_change_mtu; - dev->init = &awc_init; - dev->open = &awc_open; - dev->stop = &awc_close; - dev->base_addr = ioaddr; - dev->irq = pci_irq_line; - dev->tx_timeout = &awc_tx_timeout; - dev->watchdog_timeo = AWC_TX_TIMEOUT; - - - i = request_irq(dev->irq,awc_interrupt, SA_SHIRQ | SA_INTERRUPT, dev->name, dev); - if (i) { - kfree(dev->priv); - dev->priv = NULL; - if (allocd_dev) { - unregister_netdev(dev); - kfree(dev); - } - return i; - } - - awc_private_init( dev); - awc_init(dev); - - i=0; - while (aironet4500_devices[i] && i < MAX_AWCS-1) i++; - if (!aironet4500_devices[i]){ - aironet4500_devices[i]=dev; - ((struct awc_private *) - aironet4500_devices[i]->priv)->card_type = AIRONET4500_PCI; - - if (awc_proc_set_fun) - awc_proc_set_fun(i); - } - -// if (register_netdev(dev) != 0) { -// printk(KERN_NOTICE "awc_cs: register_netdev() failed\n"); -// goto failed; -// } - - return 0; -// failed: -// return -1; - -} - -#ifdef MODULE -static void awc_pci_release(void) { - -// long flags; - int i=0; - - DEBUG(0, "awc_detach \n"); - - i=0; - while ( i < MAX_AWCS) { - if (!aironet4500_devices[i]) - {i++; continue;}; - if (((struct awc_private *)aironet4500_devices[i]->priv)->card_type != AIRONET4500_PCI) - {i++; continue;} - - if (awc_proc_unset_fun) - awc_proc_unset_fun(i); - release_region(aironet4500_devices[i]->base_addr, AIRONET4X00_IO_SIZE); -// release_region(pci_cisaddr, AIRONET4X00_CIS_SIZE, "aironet4x00 cis"); -// release_region(pci_memaddr, AIRONET4X00_MEM_SIZE, "aironet4x00 mem"); - - unregister_netdev(aironet4500_devices[i]); - free_irq(aironet4500_devices[i]->irq,aironet4500_devices[i]); - kfree(aironet4500_devices[i]->priv); - kfree(aironet4500_devices[i]); - - aironet4500_devices[i]=0; - - - i++; - } - - -} - - -#endif //MODULE - - -#endif /* CONFIG_AIRONET4500_PCI */ - -#ifdef CONFIG_AIRONET4500_PNP - -#include <linux/isapnp.h> -#define AIRONET4X00_IO_SIZE 0x40 - -#define isapnp_logdev pnp_dev -#define isapnp_dev pnp_card -#define isapnp_find_device pnp_find_card -#define isapnp_find_logdev pnp_find_dev -#define PNP_BUS card -#define PNP_BUS_NUMBER number -#define PNP_DEV_NUMBER number - - -int awc4500_pnp_hw_reset(struct net_device *dev){ - - struct isapnp_logdev *logdev; - - DEBUG(0, "awc_pnp_reset \n"); - - if (!dev->priv ) { - printk("awc4500 no dev->priv in hw_reset\n"); - return -1; - }; - - logdev = ((struct isapnp_logdev *) ((struct awc_private *)dev->priv)->bus); - - if (!logdev ) { - printk("awc4500 no pnp logdev in hw_reset\n"); - return -1; - }; - - pnp_disable_dev(logdev); - - udelay(100); - - if (pnp_activate_dev(logdev, NULL) < 0) { - printk("%s cfg begin failed in hw_reset for csn %x devnum %x \n", - dev->name, logdev->PNP_BUS->PNP_BUS_NUMBER, logdev->PNP_DEV_NUMBER); - return -EAGAIN; - } - - return 0; -} - -int awc4500_pnp_probe(struct net_device *dev) -{ - int isa_index = 0; - int isa_irq_line = 0; - int isa_ioaddr = 0; - int card = 0; - int i=0; - struct isapnp_dev * pnp_dev ; - struct isapnp_logdev *logdev; - - while (1) { - - pnp_dev = isapnp_find_device( - ISAPNP_VENDOR('A','W','L'), - ISAPNP_DEVICE(1), - 0); - - if (!pnp_dev) break; - - isa_index++; - - logdev = isapnp_find_logdev(pnp_dev, ISAPNP_VENDOR('A','W','L'), - ISAPNP_FUNCTION(1), - 0); - if (!logdev){ - printk("No logical device found on Aironet board \n"); - return -ENODEV; - } - if (pnp_device_attach(logdev) < 0) { - printk("pnp_device_attach failed for csn %x devnum %x \n", - logdev->PNP_BUS->PNP_BUS_NUMBER, logdev->PNP_DEV_NUMBER); - return -EAGAIN; - } - if (pnp_activate_dev(logdev, NULL) < 0) { - printk("pnp_activate_dev failed for csn %x devnum %x \n", - logdev->PNP_BUS->PNP_BUS_NUMBER, logdev->PNP_DEV_NUMBER); - pnp_device_detach(logdev); - return -EIO; - } - - isa_irq_line = pnp_irq(logdev, 0); - isa_ioaddr = pnp_port_start(logdev, 0); - request_region(isa_ioaddr, AIRONET4X00_IO_SIZE, "aironet4x00 ioaddr"); - - if (!dev) { - dev = init_etherdev(NULL, 0); - if (!dev) { - release_region(isa_ioaddr, AIRONET4X00_IO_SIZE); - pnp_device_detach(logdev); - return -ENOMEM; - } - } - dev->priv = kmalloc(sizeof(struct awc_private),GFP_KERNEL ); - memset(dev->priv,0,sizeof(struct awc_private)); - if (!dev->priv) { - printk(KERN_CRIT "aironet4x00: could not allocate device private, some unstability may follow\n"); - return -1; - }; - ((struct awc_private *)dev->priv)->bus = logdev; - - // ether_setup(dev); - - // dev->tx_queue_len = tx_queue_len; - - dev->hard_start_xmit = &awc_start_xmit; - // dev->set_config = &awc_config_misiganes,aga mitte awc_config; - dev->get_stats = &awc_get_stats; - // dev->set_multicast_list = &awc_set_multicast_list; - dev->change_mtu = awc_change_mtu; - dev->init = &awc_init; - dev->open = &awc_open; - dev->stop = &awc_close; - dev->base_addr = isa_ioaddr; - dev->irq = isa_irq_line; - dev->tx_timeout = &awc_tx_timeout; - dev->watchdog_timeo = AWC_TX_TIMEOUT; - - netif_start_queue (dev); - - request_irq(dev->irq,awc_interrupt , SA_SHIRQ | SA_INTERRUPT ,"Aironet 4X00",dev); - - awc_private_init( dev); - - ((struct awc_private *)dev->priv)->bus = logdev; - - cli(); - if ( awc_init(dev) ){ - printk("card not found at irq %x io %lx\n",dev->irq, dev->base_addr); - if (card==0){ - sti(); - return -1; - } - sti(); - break; - } - udelay(10); - sti(); - i=0; - while (aironet4500_devices[i] && i < MAX_AWCS-1) i++; - if (!aironet4500_devices[i] && i < MAX_AWCS-1 ){ - aironet4500_devices[i]=dev; - - ((struct awc_private *) - aironet4500_devices[i]->priv)->card_type = AIRONET4500_PNP; - - if (awc_proc_set_fun) - awc_proc_set_fun(i); - } else { - printk(KERN_CRIT "Out of resources (MAX_AWCS) \n"); - return -1; - } - - card++; - } - - if (card == 0) return -ENODEV; - return 0; -} - -#ifdef MODULE -static void awc_pnp_release(void) { - -// long flags; - int i=0; - struct isapnp_logdev *logdev; - - DEBUG(0, "awc_detach \n"); - - i=0; - while ( i < MAX_AWCS) { - if (!aironet4500_devices[i]) - {i++; continue;} - if (((struct awc_private *)aironet4500_devices[i]->priv)->card_type != AIRONET4500_PNP) - {i++; continue;} - - logdev = ((struct isapnp_logdev *) ((struct awc_private *)aironet4500_devices[i]->priv)->bus); - - if (!logdev ) - printk("awc4500 no pnp logdev in pnp_release\n"); - - if (awc_proc_unset_fun) - awc_proc_unset_fun(i); - pnp_device_detach(logdev); - - release_region(aironet4500_devices[i]->base_addr, AIRONET4X00_IO_SIZE); -// release_region(isa_cisaddr, AIRONET4X00_CIS_SIZE, "aironet4x00 cis"); -// release_region(isa_memaddr, AIRONET4X00_MEM_SIZE, "aironet4x00 mem"); - - unregister_netdev(aironet4500_devices[i]); - free_irq(aironet4500_devices[i]->irq,aironet4500_devices[i]); - kfree(aironet4500_devices[i]->priv); - kfree(aironet4500_devices[i]); - - aironet4500_devices[i]=0; - - - i++; - } - - -} - -static struct isapnp_device_id id_table[] = { - { ISAPNP_ANY_ID, ISAPNP_ANY_ID, - ISAPNP_VENDOR('A','W','L'), ISAPNP_DEVICE(1), 0 }, - {0} -}; - -MODULE_DEVICE_TABLE(isapnp, id_table); - -#endif //MODULE -#endif /* CONFIG_AIRONET4500_PNP */ - -#ifdef CONFIG_AIRONET4500_ISA - -static int irq[] = {0,0,0,0,0}; -static int io[] = {0,0,0,0,0}; - -/* - EXPORT_SYMBOL(irq); - EXPORT_SYMBOL(io); -*/ -MODULE_PARM(irq,"i"); -MODULE_PARM_DESC(irq,"Aironet 4x00 ISA non-PNP irqs,required"); -MODULE_PARM(io,"i"); -MODULE_PARM_DESC(io,"Aironet 4x00 ISA non-PNP ioports,required"); - - - -int awc4500_isa_probe(struct net_device *dev) -{ -// int cards_found = 0; -// static int isa_index; /* Static, for multiple probe calls. */ - int isa_irq_line = 0; - int isa_ioaddr = 0; -// int p; - int card = 0; - int i=0; - - if (! io[0] || ! irq[0]){ - -// printk(" Both irq and io params must be supplied for ISA mode !!!\n"); - return -ENODEV; - } - - printk(KERN_WARNING " Aironet ISA Card in non-PNP(ISA) mode sometimes feels bad on interrupt \n"); - printk(KERN_WARNING " Use aironet4500_pnp if any problems(i.e. card malfunctioning). \n"); - printk(KERN_WARNING " Note that this isa probe is not friendly... must give exact parameters \n"); - - while (irq[card] != 0){ - - isa_ioaddr = io[card]; - isa_irq_line = irq[card]; - - request_region(isa_ioaddr, AIRONET4X00_IO_SIZE, "aironet4x00 ioaddr"); - - if (!dev) { - dev = init_etherdev(NULL, 0); - if (!dev) { - release_region(isa_ioaddr, AIRONET4X00_IO_SIZE); - return (card == 0) ? -ENOMEM : 0; - } - } - dev->priv = kmalloc(sizeof(struct awc_private),GFP_KERNEL ); - memset(dev->priv,0,sizeof(struct awc_private)); - if (!dev->priv) { - printk(KERN_CRIT "aironet4x00: could not allocate device private, some unstability may follow\n"); - return -1; - }; - - // ether_setup(dev); - - // dev->tx_queue_len = tx_queue_len; - - dev->hard_start_xmit = &awc_start_xmit; - // dev->set_config = &awc_config_misiganes,aga mitte awc_config; - dev->get_stats = &awc_get_stats; - // dev->set_multicast_list = &awc_set_multicast_list; - dev->change_mtu = awc_change_mtu; - dev->init = &awc_init; - dev->open = &awc_open; - dev->stop = &awc_close; - dev->base_addr = isa_ioaddr; - dev->irq = isa_irq_line; - dev->tx_timeout = &awc_tx_timeout; - dev->watchdog_timeo = AWC_TX_TIMEOUT; - - request_irq(dev->irq,awc_interrupt ,SA_INTERRUPT ,"Aironet 4X00",dev); - - awc_private_init( dev); - if ( awc_init(dev) ){ - printk("card not found at irq %x mem %x\n",irq[card],io[card]); - if (card==0) - return -1; - break; - } - - i=0; - while (aironet4500_devices[i] && i < MAX_AWCS-1) i++; - if (!aironet4500_devices[i]){ - aironet4500_devices[i]=dev; - ((struct awc_private *) - aironet4500_devices[i]->priv)->card_type = AIRONET4500_ISA; - - if (awc_proc_set_fun) - awc_proc_set_fun(i); - } - - card++; - } - if (card == 0 ) { - return -ENODEV; - }; - return 0; -} - -#ifdef MODULE -static void awc_isa_release(void) { - -// long flags; - int i=0; - - DEBUG(0, "awc_detach \n"); - - i=0; - while ( i < MAX_AWCS) { - - if (!aironet4500_devices[i]) - {i++; continue;} - if (((struct awc_private *)aironet4500_devices[i]->priv)->card_type != AIRONET4500_ISA) - {i++; continue;} - - if (awc_proc_unset_fun) - awc_proc_unset_fun(i); - release_region(aironet4500_devices[i]->base_addr, AIRONET4X00_IO_SIZE); -// release_region(isa_cisaddr, AIRONET4X00_CIS_SIZE, "aironet4x00 cis"); -// release_region(isa_memaddr, AIRONET4X00_MEM_SIZE, "aironet4x00 mem"); - - unregister_netdev(aironet4500_devices[i]); - free_irq(aironet4500_devices[i]->irq,aironet4500_devices[i]); - kfree(aironet4500_devices[i]->priv); - kfree(aironet4500_devices[i]); - - aironet4500_devices[i]=0; - - - i++; - } - - -} - -#endif //MODULE - -#endif /* CONFIG_AIRONET4500_ISA */ - -#ifdef CONFIG_AIRONET4500_I365 - -#define port_range 0x40 - -int awc_i365_offset_ports[] = {0x3e0,0x3e0,0x3e2,0x3e2}; -int awc_i365_data_ports [] = {0x3e1,0x3e1,0x3e3,0x3e3}; -int awc_i365_irq[] = {5,5,11,12}; -int awc_i365_io[] = {0x140,0x100,0x400,0x440}; -int awc_i365_sockets = 0; - -struct i365_socket { - int offset_port ; - int data_port; - int socket; - int irq; - int io; - int manufacturer; - int product; -}; - -inline u8 i365_in (struct i365_socket * s, int offset) { - outb(offset + (s->socket % 2)* 0x40, s->offset_port); - return inb(s->data_port); -}; - -inline void i365_out (struct i365_socket * s, int offset,int data){ - outb(offset + (s->socket % 2)* 0x40 ,s->offset_port); - outb((data & 0xff),s->data_port) ; - -}; - -void awc_i365_card_release(struct i365_socket * s){ - - i365_out(s, 0x5, 0); // clearing ints - i365_out(s, 0x6, 0x20); // mem 16 bits - i365_out(s, 0x7, 0); // clear IO - i365_out(s, 0x3, 0); // gen ctrl reset + mem mode - i365_out(s, 0x2, 0); // reset power - i365_out(s, 0x2, i365_in(s, 0x2) & 0x7f ); // cardenable off - i365_out(s, 0x2, 0); // remove power - - -}; -int awc_i365_probe_once(struct i365_socket * s ){ - - - int caps=i365_in(s, 0); - int ret; - unsigned long jiff; -// short rev = 0x3000; - unsigned char cis [0x3e3]; - unsigned char * mem = phys_to_virt(0xd000); - int i; - int port ; - - DEBUG(1," i365 control ID %x \n", caps); - - if (caps & 0xC){ - return 1; - }; - - ret = i365_in(s, 0x1); - - if ((ret & 0xC0) != 0xC0){ - printk("card in socket %d port %x not in known state, %x \n", - s->socket, s->offset_port, ret ); - return -1; - }; - - - awc_i365_card_release(s); - - - mdelay(100); - - i365_out(s, 0x2, 0x10 ); // power enable - mdelay(200); - - i365_out(s, 0x2, 0x10 | 0x01 | 0x04 | 0x80); //power enable - - mdelay(250); - - if (!s->irq) - s->irq = 11; - - i365_out(s, 0x3, 0x40 | 0x20 | s->irq); - - jiff = jiffies; - - while (jiffies-jiff < HZ ) - if (i365_in(s,0x1) & 0x20) - break; - - if (! (i365_in(s,0x1) & 0x20) ){ - printk("irq enable timeout on socket %x \n", s->socket); - return -1; - }; - - i365_out(s,0x10,0xd0); - i365_out(s,0x11,0x0); - i365_out(s,0x12,0xd0); - i365_out(s,0x13,0x0); - i365_out(s,0x14,0x30 ); - i365_out(s,0x15,0x3f | 0x40); // enab mem reg bit - i365_out(s,0x06,0x01); // enab mem - - mdelay(10); - - cis[0] = 0x45; - -// memcpy_toio( 0xd3e0, &(cis[0]),0x1); - -// mem[0x3e0] = 0x0; -// mem[0] = 0x45; - - mem[0x3e0] = 0x45; - - mdelay(10); - - memcpy_fromio(cis,0xD000, 0x3e0); - - for (i = 0; i <= 0x3e2; i++) - printk("%02x", mem[i]); - for (i = 0; i <= 0x3e2; i++) - printk("%c", mem[i]); - - i=0; - while (i < 0x3e0){ - if (cis[i] == 0xff) - break; - if (cis[i] != 0x20 ){ - i = i + 2 + cis[i+1]; - continue; - }else { - s->manufacturer = cis[i+2] | (cis[i+3]<<8); - s->product = cis[i+4] | (cis[i+5]<<8); - break; - }; - i++; - }; - - DEBUG(1,"socket %x manufacturer %x product %x \n", - s->socket, s->manufacturer,s->product); - - i365_out(s,0x07, 0x1 | 0x2); // enable io 16bit - mdelay(1); - port = s->io; - i365_out(s,0x08, port & 0xff); - i365_out(s,0x09, (port & 0xff00)/ 0x100); - i365_out(s,0x0A, (port+port_range) & 0xff); - i365_out(s,0x0B, ((port+port_range) & 0xff00) /0x100); - - i365_out(s,0x06, 0x40); // enable io window - - mdelay(1); - - i365_out(s,0x3e0,0x45); - - outw(0x10, s->io); - - jiff = jiffies; - while (!(inw(s->io + 0x30) & 0x10)){ - - if (jiffies - jiff > HZ ){ - - printk("timed out waitin for command ack \n"); - break; - } - }; - - - outw(0x10, s->io + 0x34); - mdelay(10); - - return 0; - -}; - - -static int awc_i365_init(struct i365_socket * s) { - - struct net_device * dev; - int i; - - - dev = init_etherdev(0, sizeof(struct awc_private) ); - -// dev->tx_queue_len = tx_queue_len; - ether_setup(dev); - - dev->hard_start_xmit = &awc_start_xmit; -// dev->set_config = &awc_config_misiganes,aga mitte awc_config; - dev->get_stats = &awc_get_stats; - dev->set_multicast_list = &awc_set_multicast_list; - - dev->init = &awc_init; - dev->open = &awc_open; - dev->stop = &awc_close; - dev->irq = s->irq; - dev->base_addr = s->io; - dev->tx_timeout = &awc_tx_timeout; - dev->watchdog_timeo = AWC_TX_TIMEOUT; - - - awc_private_init( dev); - - i=0; - while (aironet4500_devices[i] && i < MAX_AWCS-1) i++; - if (!aironet4500_devices[i]){ - aironet4500_devices[i]=dev; - - ((struct awc_private *) - aironet4500_devices[i]->priv)->card_type = AIRONET4500_365; - - if (awc_proc_set_fun) - awc_proc_set_fun(i); - } - - if (register_netdev(dev) != 0) { - printk(KERN_NOTICE "awc_cs: register_netdev() failed\n"); - goto failed; - } - - return 0; - - failed: - return -1; -} - - -static void awc_i365_release(void) { - -// long flags; - int i=0; - - DEBUG(0, "awc_detach \n"); - - i=0; - while ( i < MAX_AWCS) { - - if (!aironet4500_devices[i]) - {i++; continue;} - - if (((struct awc_private *)aironet4500_devices[i]->priv)->card_type != AIRONET4500_365) - {i++; continue;} - - if (awc_proc_unset_fun) - awc_proc_unset_fun(i); - - unregister_netdev(aironet4500_devices[i]); - - //kfree(aironet4500_devices[i]->priv); - kfree(aironet4500_devices[i]); - - aironet4500_devices[i]=0; - - - i++; - } - - -} - - - - - - - -int awc_i365_probe(void) { - - int i = 1; - int k = 0; - int ret = 0; - int found=0; - - struct i365_socket s; - /* Always emit the version, before any failure. */ - - if (!awc_i365_sockets) { - printk(" awc i82635 4x00: use bitfiel opts awc_i365_sockets=0x3 <- (1|2) to probe sockets 0 and 1\n"); - return -1; - }; - - while (k < 4){ - if (i & awc_i365_sockets){ - - s.offset_port = awc_i365_offset_ports[k]; - s.data_port = awc_i365_data_ports[k]; - s.socket = k; - s.manufacturer = 0; - s.product = 0; - s.irq = awc_i365_irq[k]; - s.io = awc_i365_io[k]; - - ret = awc_i365_probe_once(&s); - if (!ret){ - if (awc_i365_init(&s)) - goto failed; - else found++; - } else if (ret == -1) - goto failed; - }; - k++; - i *=2; - }; - - if (!found){ - printk("no aironet 4x00 cards found\n"); - return -1; - } - return 0; - -failed: - awc_i365_release(); - return -1; - - -} - -#endif /* CONFIG_AIRONET4500_I365 */ - -#ifdef MODULE -int init_module(void) -{ - int found = 0; - - printk("%s\n ", awc_version); - -#ifdef CONFIG_AIRONET4500_PCI - if (awc4500_pci_probe(NULL) == -ENODEV){ -// printk("PCI 4X00 aironet cards not found\n"); - } else { - found++; -// printk("PCI 4X00 found some cards \n"); - } -#endif -#ifdef CONFIG_AIRONET4500_PNP - if (awc4500_pnp_probe(NULL) == -ENODEV){ -// printk("PNP 4X00 aironet cards not found\n"); - } else { - found++; -// printk("PNP 4X00 found some cards \n"); - } -#endif -#ifdef CONFIG_AIRONET4500_365 - if ( awc_i365_probe() == -1) { -// printk("PCMCIA 4X00 aironet cards not found for i365(without card services) initialization\n"); - } else { - found++ ; -// printk("PCMCIA 4X00 found some cards, take care, this code is not supposed to work yet \n"); - } -#endif -#ifdef CONFIG_AIRONET4500_ISA - if (awc4500_isa_probe(NULL) == -ENODEV){ -// printk("ISA 4X00 aironet ISA-bus non-PNP-mode cards not found\n"); - } else { - found++; -// printk("ISA 4X00 found some cards \n"); - } -#endif - if (!found) { - printk(KERN_ERR "No Aironet 4X00 cards were found. Note that for ISA \n cards you should use either automatic PNP mode or \n ISA mode with both io and irq param \n Aironet is also afraid of: being second PNP controller(by slot), having anything(brandname bios weirdnesses) in range 0x100-0x180 and maybe around 0xd0000\n If you PNP type card does not get found, try non-PNP switch before complainig. \n"); - return -1; - } - return 0; - - -} - -void cleanup_module(void) -{ - DEBUG(0, "awc_cs: unloading %c ",'\n'); -#ifdef CONFIG_AIRONET4500_PCI - awc_pci_release(); -#endif -#ifdef CONFIG_AIRONET4500_PNP - awc_pnp_release(); -#endif -#ifdef CONFIG_AIRONET4500_365 - awc_i365_release(); -#endif -#ifdef CONFIG_AIRONET4500_ISA - awc_isa_release(); -#endif - -} -#endif diff --git a/drivers/net/aironet4500_core.c b/drivers/net/aironet4500_core.c deleted file mode 100644 index c2f98efe836a..000000000000 --- a/drivers/net/aironet4500_core.c +++ /dev/null @@ -1,3234 +0,0 @@ -/* - * Aironet 4500/4800 driver core - * - * Elmer Joandi, Januar 1999 - * Copyright: GPL - * - * - * Revision 0.1 ,started 30.12.1998 - * - * - */ - /* CHANGELOG: - march 99, stable version 2.0 - august 99, stable version 2.2 - november 99, integration with 2.3 - 17.12.99: finally, got SMP near-correct. - timing issues remain- on SMP box its 15% slower on tcp - 10.03.00 looks like softnet take us back to normal on SMP - */ - -#include <linux/delay.h> -#include <linux/module.h> -#include <linux/init.h> -#include <linux/config.h> -#include <linux/kernel.h> -#include <linux/workqueue.h> -#include <linux/netdevice.h> -#include <linux/etherdevice.h> -#include <linux/skbuff.h> -#include <linux/if_arp.h> -#include <linux/ioport.h> -#include <linux/ip.h> -#include <linux/time.h> - -#include <asm/io.h> -#include <asm/bitops.h> -#include <asm/system.h> -#include <asm/byteorder.h> -#include <asm/irq.h> - -#include "aironet4500.h" - - -int bap_sleep = 10 ; -int bap_sleep_after_setup = 1; -int sleep_before_command = 1; -int bap_sleep_before_write= 1; -int sleep_in_command = 1; -int both_bap_lock; /* activated at awc_init in this */ -int bap_setup_spinlock; /* file if numcpu >1 */ - -EXPORT_SYMBOL(bap_sleep); -EXPORT_SYMBOL(bap_sleep_after_setup); -EXPORT_SYMBOL(sleep_before_command); -EXPORT_SYMBOL(bap_sleep_before_write); -EXPORT_SYMBOL(sleep_in_command); -EXPORT_SYMBOL(both_bap_lock); -EXPORT_SYMBOL(bap_setup_spinlock); - -struct awc_strings awc_status_error_codes[]=awc_reply_error_strings; -struct awc_strings awc_command_names[]=awc_command_name_strings; -struct awc_strings awc_link_status_names[]=awc_link_status_strings; -struct awc_strings awc_rid_names[]=aironet4500_RID_Select_strings; -struct awc_strings awc_link_failure_reason_names[]=IEEE_802_11_LINK_STATUS_FAILURE_REASON_STRINGS; - -const char * awc_print_string( struct awc_strings* strings, int code){ - - struct awc_strings * str = strings; - int i = 0; - while (str[i].string != NULL){ - if (str[i].par == (code & str[i].mask )){ - return str[i].string; - }; - i++; - }; - return "UNKNOWN"; -}; - -int awc_dump_registers(struct net_device * dev){ - -#ifdef AWC_DEBUG - int i; -#endif - int status= inw(dev->base_addr +4*2); - int r1= inw(dev->base_addr +5*2); - int r2= inw(dev->base_addr +6*2); - int r3= inw(dev->base_addr +7*2); - - printk(KERN_ERR "Command %s , result: %s, at memblk %x(RID %s) , offset %x \n", - awc_print_string(awc_command_names,status), - awc_print_string(awc_status_error_codes,r1), - r2, awc_print_string(awc_rid_names,r2), - r3); - -#ifdef AWC_DEBUG - printk(KERN_ERR "%s aironet register dump ",dev->name ); - - - for (i=0; i < 32; i++){ - printk("%4x ", inw(dev->base_addr + i*2 ) ); - if ( (i+1)%8 == 0){ - printk("\n"); - printk(KERN_ERR "%02x",(i+1)*2); - } - }; - printk(KERN_ERR " \n"); -#endif - return 0; -}; - -/****************************** COMMAND ******************/ - - -inline -int awc_command_busy_clear_wait(struct net_device * dev){ -// long long jiff = jiffies; - u16 active_interrupts; - int cnt= 0; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_command_busy_clear_wait "); - - while (awc_command_busy(dev->base_addr)){ - if (cnt > 1000 ){ - printk(KERN_ERR "awc command busy too long, clearing\n"); - awc_dump_registers(dev); - awc_event_ack_ClrStckCmdBsy(dev->base_addr); - break; - }; - if (((struct awc_private*) dev->priv)->ejected) - return -1; - cnt++; - udelay(10); - } - - cnt = 0; - while (awc_command_busy(dev->base_addr)){ - //if (jiffies - jiff > (HZ/3)){ - if (cnt > 30000 ){ - printk(KERN_CRIT "awc command busy WAY too long, clearing\n"); - awc_dump_registers(dev); - awc_event_ack_ClrStckCmdBsy(dev->base_addr); - active_interrupts = awc_event_status(dev->base_addr); - awc_event_ack(dev->base_addr, active_interrupts); - - AWC_ENTRY_EXIT_DEBUG("BAD exit\n "); - return -1 ; - - }; - if (((struct awc_private*) dev->priv)->ejected) - return -1; - cnt++; - udelay(10); - } - - - AWC_ENTRY_EXIT_DEBUG(" exit\n "); - - return 0; - - -}; - - - -inline unsigned short -awc_issue_command_and_block(struct awc_command * cmd){ - - int ticks; - long long jiff; - u16 enabled_interrupts; - int cnt = 0; -// unsigned long flags; - - jiff = jiffies; - - - AWC_ENTRY_EXIT_DEBUG(" entry awc_issue_command_and_block "); - - AWC_LOCK_COMMAND_ISSUING(cmd->priv); - - if (awc_command_busy_clear_wait(cmd->dev)) goto final; - - if (cmd->priv->sleeping_bap) udelay(sleep_before_command); - - awc4500wout(cmd->port,cmd->command,cmd->par0,cmd->par1,cmd->par2); -// awc_dump_registers(cmd->dev); - - - if (cmd->priv->sleeping_bap) udelay(sleep_in_command); - - enabled_interrupts = awc_ints_enabled(cmd->dev->base_addr); - awc_ints_enable(cmd->dev->base_addr, enabled_interrupts & ~0x10); - if(cmd->priv->enabled_interrupts & 0x10) - cmd->priv->enabled_interrupts &= ~0x10; - - - while ( awc_command_read(cmd->port) == cmd->command) { - udelay(1); - awc_command_write(cmd->port, cmd->command); - //if ((jiffies - jiff) > 2){ - if (cnt > 2000 ){ - printk(" long wait with commmand reg busy in blocking command \n"); - awc_dump_registers(cmd->dev); - goto final; - }; - if (cmd->priv->ejected) - goto final; - cnt++; - udelay(10); - - }; - AWC_ENTRY_EXIT_DEBUG(" issued " ); - - ticks = 0; - while ( awc_event_status_Cmd(cmd->port) == 0) { - ticks++; - if (ticks > 100000){ - printk(" long wait with commmand reg busy \n"); - awc_dump_registers(cmd->dev); - goto final; - }; - if (ticks > 500){ - DEBUG(1, " long wait after issue 10mks * %d ", ticks ); - //printk(" long wait with command reg busy about ticks\n"); - // sti(); - } - if (cmd->priv->ejected) - goto final; - udelay(10); - } - if (cmd->priv->sleeping_bap) udelay(sleep_in_command); - - awc_read_response(cmd); - AWC_ENTRY_EXIT_DEBUG(" resp read \n"); - - if (awc_command_busy(cmd->port)) - awc_event_ack_ClrStckCmdBsy(cmd->port); - - awc_event_ack_Cmd(cmd->port); - if (cmd->priv->sleeping_bap) udelay(sleep_in_command); - - if (cmd->status & 0xff00){ - printk(KERN_ERR " bad response to command %s, parameter %x \n",awc_print_string(awc_command_names, cmd->command),cmd->par0); - awc_dump_registers(cmd->dev); - goto final; - } - - AWC_UNLOCK_COMMAND_ISSUING(cmd->priv); - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - udelay(1); - return 0; -final: - AWC_UNLOCK_COMMAND_ISSUING(cmd->priv); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; -}; - - -inline -unsigned short -awc_issue_command(struct awc_command * cmd){ - - -// long long jiff = jiffies; -// unsigned short enabled_ints; - int cnt = 0; -// int i=0; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_issue_command"); - - if (!cmd){ - printk(KERN_CRIT "cmd == NULL in awc_issue_command\n"); - return -1; - - } - if (!cmd->dev){ - printk(KERN_CRIT "cmd->dev == NULL in awc_issue_command\n"); - return -1; - - } - - AWC_LOCK_COMMAND_ISSUING(cmd->priv); - - if(awc_command_busy_clear_wait(cmd->dev)) goto final; - - if(!cmd->priv->enabled_interrupts & 0x10){ - cmd->priv->enabled_interrupts |= 0x10; - awc_ints_enable(cmd->port, cmd->priv->enabled_interrupts ); - } - - cmd->priv->async_command_start = jiffies; - cmd->priv->command_semaphore_on++; - - - awc4500wout(cmd->port,cmd->command,cmd->par0,cmd->par1,cmd->par2); - - while ( awc_command_read(cmd->port) == cmd->command) { - - awc_command_write(cmd->port, cmd->command); - //if ((jiffies - jiff) > 2){ - if (cnt > 2000) { - printk(" long wait with commmand reg busy in async command \n"); - awc_dump_registers(cmd->dev); - goto final; - }; - if (cmd->priv->ejected) - goto final; - cnt++; - udelay(10); - }; - - cmd->priv->cmd = *cmd; - - - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; - final: - AWC_UNLOCK_COMMAND_ISSUING(cmd->priv); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; - -}; - -inline -unsigned short -awc_issue_command_no_ack(struct net_device * dev, - u16 com, u16 par1, u16 par2, u16 par3){ - - struct awc_private * priv = (struct awc_private *)dev->priv; - int cnt = 0; - long long jiff; - jiff = jiffies; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_issue_command_no_ack "); - - - AWC_LOCK_COMMAND_ISSUING(priv); - - if (awc_command_busy_clear_wait(dev)) { - printk("aironet4x00 no_ack command (reset) with stuck card \n"); - } - - awc4500wout(dev->base_addr,com, par1, par2,par3); - - udelay(10); - while ( awc_event_status_Cmd(dev->base_addr) == 0) { - if (awc_command_read(dev->base_addr) == com) { - awc_command_write(dev->base_addr, com); - } - //if ((jiffies - jiff) > 2){ - if (cnt > 2000) { - printk(" long wait with commmand reg busy in noack command %d par %d %d %d\n",com,par1,par2,par3); - awc_dump_registers(dev); - goto final; - }; - if (priv->ejected) - goto final; - udelay(10); - cnt++; - } - - if (awc_command_busy(dev->base_addr)) - awc_event_ack_ClrStckCmdBsy(dev->base_addr); - - AWC_UNLOCK_COMMAND_ISSUING(priv); - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; -final: - AWC_UNLOCK_COMMAND_ISSUING(priv); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; -}; - - -/******************************** BAP *************************/ - -// inline // too long for inline -int awc_bap_setup(struct awc_command * cmd) { - - int status; - long long jiff; - unsigned long flags; - int cleared = 0; - int cycles = 0; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_bap_setup "); - - if ( cmd->priv->sleeping_bap) - udelay(bap_sleep); - - if (cmd->priv->ejected) - return -1; - - if (!cmd->bap || !(cmd->lock_state & (AWC_BAP_SEMALOCKED |AWC_BAP_LOCKED))) - DEBUG(1,"no bap or bap not locked cmd %d !!", cmd->command); - - if (bap_setup_spinlock) - spin_lock_irqsave(&cmd->priv->bap_setup_spinlock,cmd->priv->bap_setup_spinlock_flags); - status = AWC_IN(cmd->bap->offset); - - if (status & ~0x2000 ){ - WAIT61x3; - status = AWC_IN(cmd->bap->offset); - } - - if (status & ~0x2000 ){ - WAIT61x3; - AWC_IN(cmd->dev->base_addr + 0x26); - AWC_OUT(cmd->dev->base_addr + 0x26, 0); - WAIT61x3; - udelay(60); - #ifdef AWC_DEBUG - printk("b"); - #endif - status = AWC_IN(cmd->bap->offset); - } - - - if (status & 0xC000){ - printk(KERN_ERR "bap entered with err or busy bit set %x \n",status); - if (cmd->bap->lock != 1) - printk(KERN_ERR "bap lock bad same time %x\n",cmd->bap->lock); - awc_dump_registers(cmd->dev); - // AWC_OUT(cmd->bap->offset, 0x800); - } - - save_flags(flags); - cli(); - - AWC_OUT(cmd->bap->select, cmd->rid); - WAIT61x3; - AWC_OUT(cmd->bap->offset, cmd->offset); - - restore_flags(flags); - - WAIT61x3; - - jiff = jiffies; - - while (1) { - cycles++; - status = AWC_IN(cmd->bap->offset); - if ( cmd->priv->sleeping_bap) - udelay(bap_sleep); - if (cmd->priv->ejected) - goto ejected_unlock; - udelay(1); - if (cycles > 10000) { - printk(KERN_CRIT "deadlock in bap\n"); - goto return_AWC_ERROR; - }; - status = AWC_IN(cmd->bap->offset); - if (status & AWC_BAP_BUSY) { - if (cycles % 100 == 99 ) { - save_flags(flags); - cli(); - if (!cleared){ - AWC_IN(cmd->dev->base_addr + 0x26); - AWC_OUT(cmd->dev->base_addr + 0x26, 0); - WAIT61x3; - cleared = 1; - } - AWC_OUT(cmd->bap->select, cmd->rid); - WAIT61x3; - AWC_OUT(cmd->bap->offset, cmd->offset); - restore_flags(flags); - #ifdef AWC_DEBUG - printk("B"); - #endif - - if ( cmd->priv->sleeping_bap) - udelay(bap_sleep); - else udelay(30); - //restart_timeout(); - } - if (jiffies - jiff > 1 ) { - AWC_ENTRY_EXIT_DEBUG(" BAD BUSY exit \n"); - awc_dump_registers(cmd->dev); - goto return_AWC_ERROR; - } - continue; - } - if (status & AWC_BAP_DONE) { - WAIT61x3; WAIT61x3; WAIT61x3; - - // if ((status & 0xfff) != cmd->offset) - // printk(KERN_ERR "awcPBD %x ",status); - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - if (cmd->priv->sleeping_bap) - udelay(bap_sleep_after_setup); - - // success - goto return_AWC_SUCCESS; - } - - if (status & AWC_BAP_ERR) { - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - // invalid rid or offset - printk(KERN_ERR "bap setup error bit set for rid %x offset %x \n",cmd->rid,cmd->offset); - awc_dump_registers(cmd->dev); - goto return_AWC_ERROR; - } - if ( cmd->priv->sleeping_bap) - udelay(bap_sleep); - else udelay(1); - // -- awc missed it, try again - - save_flags(flags); - cli(); - AWC_OUT(cmd->bap->select, cmd->rid); - WAIT61x3; - AWC_OUT(cmd->bap->offset, cmd->offset); - WAIT61x3; - restore_flags(flags); - - if (jiffies - jiff > HZ) - if (! (status &(AWC_BAP_ERR |AWC_BAP_DONE |AWC_BAP_BUSY))){ - printk("aironet4500: bap setup lock without any status bits set"); - awc_dump_registers(cmd->dev); - goto return_AWC_ERROR; - - }; - - } - - AWC_ENTRY_EXIT_DEBUG(" WE MUST NOT BE HERE exit \n"); - -ejected_unlock: - if (bap_setup_spinlock) - spin_unlock_irqrestore(&cmd->priv->bap_setup_spinlock,cmd->priv->bap_setup_spinlock_flags); - AWC_ENTRY_EXIT_DEBUG(" ejected_unlock_exit \n"); - return -1; - -return_AWC_ERROR: - if (bap_setup_spinlock) - spin_unlock_irqrestore(&cmd->priv->bap_setup_spinlock,cmd->priv->bap_setup_spinlock_flags); - AWC_ENTRY_EXIT_DEBUG(" AWC_ERROR_exit \n"); - return AWC_ERROR; - -return_AWC_SUCCESS: - if (bap_setup_spinlock) - spin_unlock_irqrestore(&cmd->priv->bap_setup_spinlock,cmd->priv->bap_setup_spinlock_flags); - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return AWC_SUCCESS; -} - - - // requires call to awc_bap_setup() first -inline -int -awc_bap_read(struct awc_command * cmd) { - register u16 len; - register u16 * buff = (u16 *) cmd->buff; - register u16 port= cmd->bap->data; - - - AWC_ENTRY_EXIT_DEBUG(" entry awc_bap_read "); - if (!cmd->bap && !(cmd->lock_state & (AWC_BAP_SEMALOCKED |AWC_BAP_LOCKED))) - DEBUG(0,"no bap or bap not locked %d !!", cmd->command); - cmd->len = (cmd->len + 1) & (~1); // round up to even value - len = cmd->len / 2; - if (cmd->priv->ejected) - return -1; - - - if (cmd->priv->sleeping_bap) - udelay(bap_sleep_before_write); - - if (!cmd->priv->sleeping_bap) - while ( len-- > 0) - *buff++ = AWC_IN(port); - else - while ( len-- > 0){ - *buff++ = AWC_IN(port); - } - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - if (cmd->priv->ejected) - return -1; - - return AWC_SUCCESS; -} - - // requires call to awc_bap_setup() first -inline -int -awc_bap_write(struct awc_command * cmd){ - register u16 len; - register u16 * buff = (u16 *) cmd->buff; - register u16 port= cmd->bap->data; - - - AWC_ENTRY_EXIT_DEBUG(" entry awc_bap_write "); - if (!cmd->bap && !(cmd->lock_state & (AWC_BAP_SEMALOCKED |AWC_BAP_LOCKED))) - DEBUG(0,"no bap or bap not locked %d !!", cmd->command); - - cmd->len = (cmd->len + 1) & (~1); // round up to even value - len = cmd->len / 2; - - if (cmd->priv->ejected) - return -1; - - if (cmd->priv->sleeping_bap) - udelay(bap_sleep_before_write); - - - if (!cmd->priv->sleeping_bap) - while (len-- > 0) - AWC_OUT(port, *buff++); - else - while ( len-- > 0){ - AWC_OUT(port, *buff++); - } - if (cmd->priv->ejected) - return -1; - - - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - - return AWC_SUCCESS; -} - - - - -/***************************** RID READ/WRITE ********************/ - -const struct aironet4500_rid_selector aironet4500_RID_Select_General_Config =(const struct aironet4500_rid_selector){ 0xFF10, 1,0,0, "General Configuration" }; // See notes General Configuration Many configuration items. -const struct aironet4500_rid_selector aironet4500_RID_Select_SSID_list =(const struct aironet4500_rid_selector){ 0xFF11, 1,0,0, "Valid SSID list" }; // See notes Valid SSID list List of SSIDs which the station may associate to. -const struct aironet4500_rid_selector aironet4500_RID_Select_AP_list =(const struct aironet4500_rid_selector){ 0xFF12, 1,0,0, "Valid AP list" }; // See notes Valid AP list List of APs which the station may associate to. -const struct aironet4500_rid_selector aironet4500_RID_Select_Driver_name =(const struct aironet4500_rid_selector){ 0xFF13, 1,0,0, "Driver name" }; // See notes Driver name The name and version of the driver (for debugging) -const struct aironet4500_rid_selector aironet4500_RID_Select_Encapsulation =(const struct aironet4500_rid_selector){ 0xFF14, 1,0,0, "Ethernet Protocol" }; // See notes Ethernet Protocol Rules for encapsulating ethernet payloads onto 802.11. -const struct aironet4500_rid_selector aironet4500_RID_Select_WEP_volatile =(const struct aironet4500_rid_selector){ 0xFF15, 1,0,0, "WEP key volatile" }; // -const struct aironet4500_rid_selector aironet4500_RID_Select_WEP_nonvolatile =(const struct aironet4500_rid_selector){ 0xFF16, 1,0,0, "WEP key non-volatile" }; // -const struct aironet4500_rid_selector aironet4500_RID_Select_Modulation =(const struct aironet4500_rid_selector){ 0xFF17, 1,0,0, "Modulation" }; // -const struct aironet4500_rid_selector aironet4500_RID_Select_Active_Config =(const struct aironet4500_rid_selector){ 0xFF20, 0,1,1, "Actual Configuration" }; // Read only Actual Configuration This has the same format as the General Configuration. -const struct aironet4500_rid_selector aironet4500_RID_Select_Capabilities =(const struct aironet4500_rid_selector){ 0xFF00, 0,1,0, "Capabilities" }; // Read Only Capabilities PC4500 Information -const struct aironet4500_rid_selector aironet4500_RID_Select_AP_Info =(const struct aironet4500_rid_selector){ 0xFF01, 0,1,1, "AP Info" }; // Read Only AP Info Access Point Information -const struct aironet4500_rid_selector aironet4500_RID_Select_Radio_Info =(const struct aironet4500_rid_selector){ 0xFF02, 0,1,1, "Radio Info" }; // Read Only Radio Info Radio Information -- note radio specific -const struct aironet4500_rid_selector aironet4500_RID_Select_Status =(const struct aironet4500_rid_selector){ 0xFF50, 0,1,1, "Status" }; // Read Only Status PC4500 Current Status Information -const struct aironet4500_rid_selector aironet4500_RID_Select_16_stats =(const struct aironet4500_rid_selector){ 0xFF60, 0,1,1, "Cumulative 16-bit Statistics" }; // Read Only 16-bit Statistics Cumulative 16-bit Statistics -const struct aironet4500_rid_selector aironet4500_RID_Select_16_stats_delta =(const struct aironet4500_rid_selector){ 0xFF61, 0,1,1, "Delta 16-bit Statistics" }; // Read Only 16-bit Statistics Delta 16-bit Statistics (since last clear) -const struct aironet4500_rid_selector aironet4500_RID_Select_16_stats_clear =(const struct aironet4500_rid_selector){ 0xFF62, 0,1,1, "Delta 16-bit Statistics and Clear" }; // Read Only / 16-bit Statistics Delta 16-bit Statistics and Clear -const struct aironet4500_rid_selector aironet4500_RID_Select_32_stats =(const struct aironet4500_rid_selector){ 0xFF68, 0,1,1, "Cumulative 32-bit Statistics" }; // Read Only 32-bit Statistics Cumulative 32-bit Statistics -const struct aironet4500_rid_selector aironet4500_RID_Select_32_stats_delta =(const struct aironet4500_rid_selector){ 0xFF69, 0,1,1, "Delta 32-bit Statistics" }; // Read Only 32-bit Statistics Delta 32-bit Statistics (since last clear) -const struct aironet4500_rid_selector aironet4500_RID_Select_32_stats_clear =(const struct aironet4500_rid_selector){ 0xFF6A, 0,1,1, "Delta 32-bit Statistics and Clear" }; // Read Only / 32-bit Statistics Delta 32-bit Statistics and Clear - -EXPORT_SYMBOL(aironet4500_RID_Select_General_Config); -EXPORT_SYMBOL(aironet4500_RID_Select_SSID_list); -EXPORT_SYMBOL(aironet4500_RID_Select_AP_list); -EXPORT_SYMBOL(aironet4500_RID_Select_Driver_name); -EXPORT_SYMBOL(aironet4500_RID_Select_Encapsulation); -EXPORT_SYMBOL(aironet4500_RID_Select_WEP_volatile); -EXPORT_SYMBOL(aironet4500_RID_Select_WEP_nonvolatile); -EXPORT_SYMBOL(aironet4500_RID_Select_Modulation); -EXPORT_SYMBOL(aironet4500_RID_Select_Active_Config); -EXPORT_SYMBOL(aironet4500_RID_Select_Capabilities); -EXPORT_SYMBOL(aironet4500_RID_Select_AP_Info); -EXPORT_SYMBOL(aironet4500_RID_Select_Radio_Info); -EXPORT_SYMBOL(aironet4500_RID_Select_Status); -EXPORT_SYMBOL(aironet4500_RID_Select_16_stats); -EXPORT_SYMBOL(aironet4500_RID_Select_16_stats_delta); -EXPORT_SYMBOL(aironet4500_RID_Select_16_stats_clear); -EXPORT_SYMBOL(aironet4500_RID_Select_32_stats); -EXPORT_SYMBOL(aironet4500_RID_Select_32_stats_delta); -EXPORT_SYMBOL(aironet4500_RID_Select_32_stats_clear); - - -struct awc_rid_dir awc_rids_temp[]={ - // following MUST be consistent with awc_rids_setup !!! - {&aironet4500_RID_Select_General_Config, 0x100 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_SSID_list, 0x68 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_AP_list, 0x20 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_Driver_name, 0x12 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_Encapsulation, 0x22 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_Active_Config, 0x100 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_Capabilities, 0x80 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_Status, 0x6c , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_AP_Info, 0x06 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_32_stats, 0x184 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_32_stats_delta, 0x184 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_32_stats_clear, 0x184 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_WEP_volatile, 0x1c , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_WEP_nonvolatile, 0x1c , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_Modulation, 0x04 , NULL, NULL, NULL,0 }, - -#ifdef AWC_USE_16BIT_STATS - {&aironet4500_RID_Select_16_stats, 0xC2 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_16_stats_delta, 0xC2 , NULL, NULL, NULL,0 }, - {&aironet4500_RID_Select_16_stats_clear, 0xC2 , NULL, NULL, NULL,0 }, -#else - {NULL},{NULL},{NULL}, -#endif - - {0} - - -}; - - - -int -awc_readrid(struct net_device * dev, struct aironet4500_RID * rid, void *pBuf ){ - struct awc_command cmd; - - int sleep_state ; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_readrid "); - if (!rid) return -1; - if (!rid->selector) return -1; - AWC_INIT_COMMAND(AWC_NOT_CLI,cmd,dev,0x21, rid->selector->selector, - rid->selector->selector, rid->offset, (rid->bits / 8),pBuf); - - sleep_state = cmd.priv->sleeping_bap ; - cmd.priv->sleeping_bap = 1; - udelay(500); - AWC_BAP_LOCK_NOT_CLI(cmd); - if (awc_issue_command_and_block(&cmd)) goto final; - udelay(1); - if (awc_bap_setup(&cmd)) goto final; - udelay(1); - if (awc_bap_read(&cmd)) goto final; - cmd.priv->sleeping_bap = sleep_state; - - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; - final: - cmd.priv->sleeping_bap = sleep_state; - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; -} - -int -awc_writerid(struct net_device * dev, struct aironet4500_RID * rid, void *pBuf){ - - struct awc_command cmd; - int sleep_state ; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_writerid "); - - - AWC_INIT_COMMAND(AWC_NOT_CLI,cmd,dev,0x21, rid->selector->selector, - rid->selector->selector,rid->offset, rid->bits/8,pBuf); - - sleep_state = cmd.priv->sleeping_bap ; - cmd.priv->sleeping_bap = 1; - - udelay(500); - AWC_BAP_LOCK_NOT_CLI(cmd); - if (awc_issue_command_and_block(&cmd)) goto final; - udelay(10); - if (awc_bap_setup(&cmd)) goto final; - udelay(10); - if (awc_bap_write(&cmd)) goto final; - udelay(10); - cmd.command=0x121; - if (awc_issue_command_and_block(&cmd)) goto final; - cmd.priv->sleeping_bap = sleep_state; - - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; - final: - cmd.priv->sleeping_bap = sleep_state; - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; -} - -int -awc_readrid_dir(struct net_device * dev, struct awc_rid_dir * rid ){ - struct awc_command cmd; - int sleep_state; - - AWC_ENTRY_EXIT_DEBUG(" entry awcreadrid_dir "); - - - AWC_INIT_COMMAND(AWC_NOT_CLI,cmd,dev,0x21, rid->selector->selector, - rid->selector->selector,0, rid->bufflen,rid->buff); - - sleep_state = cmd.priv->sleeping_bap ; - cmd.priv->sleeping_bap = 1; - - udelay(500); - - AWC_BAP_LOCK_NOT_CLI(cmd); - if (awc_issue_command_and_block(&cmd)) goto final; - - if (awc_bap_setup(&cmd)) goto final; - if (awc_bap_read(&cmd)) goto final; - cmd.priv->sleeping_bap = sleep_state; - - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; - final: - cmd.priv->sleeping_bap = sleep_state; - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; -} - -int -awc_writerid_dir(struct net_device * dev, struct awc_rid_dir * rid){ - - struct awc_command cmd; - int sleep_state ; - - - AWC_ENTRY_EXIT_DEBUG(" entry awc_writerid_dir "); - - - - AWC_INIT_COMMAND(AWC_NOT_CLI,cmd,dev,0x21, rid->selector->selector, - rid->selector->selector,0, rid->bufflen,((char *)rid->buff)); - - sleep_state = cmd.priv->sleeping_bap ; - cmd.priv->sleeping_bap = 1; - - udelay(500); - - AWC_BAP_LOCK_NOT_CLI(cmd); - - if (awc_issue_command_and_block(&cmd)) goto final; - if (awc_bap_setup(&cmd)) goto final; - if (awc_bap_write(&cmd)) goto final; - cmd.priv->sleeping_bap = sleep_state; - - cmd.command=0x121; - udelay(500); - if (awc_issue_command_and_block(&cmd)) goto final; - - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; - final: - cmd.priv->sleeping_bap = sleep_state; - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; -} - -EXPORT_SYMBOL(awc_readrid); -EXPORT_SYMBOL(awc_writerid); -EXPORT_SYMBOL(awc_readrid_dir); -EXPORT_SYMBOL(awc_writerid_dir); - -/***************************** STARTUP *******************/ - - -inline -int -awc_issue_blocking_command(struct net_device * dev,u16 comm){ - - struct awc_command cmd; -// struct awc_private * priv = (struct awc_private *)dev->priv; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_issue_blocking_command "); - - AWC_INIT_COMMAND(AWC_NOT_CLI,cmd,dev,comm,0, 0, 0, 0 ,0 ); - - AWC_BAP_LOCK_NOT_CLI(cmd); - - if (awc_issue_command_and_block(&cmd)) - goto final; - - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; - final: - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; - -}; - -int -awc_issue_soft_reset(struct net_device * dev){ - - u16 status ; -// int i= 0; - -/* outw(inw(dev->base_addr + 0x30), dev->base_addr + 0x32); - udelay(10); - outw(inw(dev->base_addr + 0x30), dev->base_addr + 0x34); - - for (i=0; i< 32; i++) - outw(0,dev->base_addr + i*2); - udelay(100); - outw(0x6,dev->base_addr + 0x34); - udelay(100); - outw(0x6,dev->base_addr + 0x34); - outw(0x6,dev->base_addr + 0x34); - WAIT61x3; - AWC_IN(dev->base_addr + 0x26); - AWC_OUT(dev->base_addr + 0x26, 0); - WAIT61x3; - udelay(60); - - - outw(0x4, dev->base_addr); - udelay(1000); - WAIT61x3; - AWC_IN(dev->base_addr + 0x26); - AWC_OUT(dev->base_addr + 0x26, 0); - WAIT61x3; - udelay(60); -*/ - - status = awc_issue_command_no_ack(dev, AWC_COMMAND_SOFT_RESET,0,0,0); - -// awc_command_busy_clear_wait(dev); - - return status; -}; - -int -awc_issue_noop(struct net_device * dev){ - int retval; - AWC_OUT(dev->base_addr + 0x28, 0); - AWC_OUT(dev->base_addr + 0x2A, 0); - udelay(1000); - retval= awc_issue_blocking_command(dev, AWC_COMMAND_NOOP); - udelay(1000); - return retval; -}; - -EXPORT_SYMBOL(awc_enable_MAC); - -int -awc_enable_MAC(struct net_device * dev){ - - struct awc_private * priv = (struct awc_private *)dev->priv; - AWC_ENTRY_EXIT_DEBUG(" entry awc_enable_MAC "); - - if (priv->mac_enabled){ - - AWC_ENTRY_EXIT_DEBUG(" mac already enabled exit \n"); - return 0; - } - udelay(500); - if (awc_issue_blocking_command(dev, AWC_COMMAND_ENABLE)){ - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; - } - udelay(500); - - priv->mac_enabled = 1; - - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; -}; - -EXPORT_SYMBOL(awc_disable_MAC); -int -awc_disable_MAC(struct net_device * dev){ - - struct awc_private * priv = (struct awc_private *)dev->priv; - AWC_ENTRY_EXIT_DEBUG(" entry awc_disable_MAC "); - - if (!priv->mac_enabled){ - AWC_ENTRY_EXIT_DEBUG(" mac allready disabled exit \n"); - return 0; - } - udelay(1000); - if (awc_issue_blocking_command(dev, AWC_COMMAND_DISABLE)){ - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; - } - udelay(1000); - priv->mac_enabled = 0; - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; -}; - - - -int -awc_read_all_rids(struct net_device * dev){ - - struct awc_private * priv = (struct awc_private *)dev->priv; - int status,i; - AWC_ENTRY_EXIT_DEBUG(" entry awc_read_all_rids "); - - for (i=0; i< AWC_NOF_RIDS && priv->rid_dir[i].selector ; i++){ - status = awc_readrid_dir(dev,&priv->rid_dir[i]); - udelay(50); - if (status) return status; - - } - priv->rids_read = 1; - - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; -} - -int -awc_write_all_rids(struct net_device * dev){ - - struct awc_private * priv = (struct awc_private *)dev->priv; - int i,status ; - AWC_ENTRY_EXIT_DEBUG(" entry awc_write_all_rids "); - - for (i=0;i < 5 && i< AWC_NOF_RIDS && priv->rid_dir[i].selector ; i++){ - status = awc_writerid_dir(dev,&priv->rid_dir[i]); - udelay(10); - if(status) return status; - } - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; -} - -/************************** FID QUEUES ****************************/ -/**************************** TX ALLOC / DEALLOC ***************/ - - - -int awc_tx_alloc(struct net_device * dev) { - - struct awc_command cmd; - int k=0; - int tot=0; - struct awc_fid * fid = NULL; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_tx_alloc "); - - - AWC_INIT_COMMAND(AWC_NOT_CLI,cmd,dev,0x0A,0, 0,0,0,NULL); - cmd.par0 = dev->mtu + AWC_TX_HEAD_SIZE + 8 ; - - DEBUG(32,"about to allocate %x bytes ",cmd.priv->large_buff_mem); - DEBUG(32,"in %x large buffers ",cmd.priv->large_buff_mem / (dev->mtu + AWC_TX_HEAD_SIZE + 8) ); - - k=0;tot=0; - AWC_BAP_LOCK_NOT_CLI(cmd); - - while (k < cmd.priv->large_buff_mem / (dev->mtu + AWC_TX_HEAD_SIZE + 8) ) { - - fid = kmalloc(sizeof(struct awc_fid),GFP_KERNEL ); - if (!fid) goto final; - memset(fid, 0, sizeof(struct awc_fid)); - - if (awc_issue_command_and_block(&cmd)) goto final; - - while ( awc_event_status_Alloc(cmd.port) == 0) ; - fid->u.tx.fid = awc_Tx_Allocated_Fid(cmd.port); - fid->u.tx.fid_size = dev->mtu + AWC_TX_HEAD_SIZE ; - - DEBUG(32,"allocated large tx fid %x ",fid->u.tx.fid); - if(fid->u.tx.fid == 0 - || cmd.status != 0xA){ - printk(KERN_ERR "%s bad tx_alloc\n",dev->name); - fid->busy =1; - goto final; - } else { - fid->busy =0; - tot++; - } - awc_event_ack_Alloc(cmd.port); - - // shoudlnt goto final after that - awc_fid_queue_push_tail(&cmd.priv->tx_large_ready,fid); - - k++; - } - cmd.priv->tx_buffs_total = tot; - DEBUG(32,"allocated %d large tx buffs\n",tot); - - cmd.par0 = AWC_TX_ALLOC_SMALL_SIZE ; - k =0; tot = 0; - - while (k < cmd.priv->small_buff_no) { - - fid = kmalloc(sizeof(struct awc_fid),GFP_KERNEL ); - if (!fid) goto final; - memset(fid, 0, sizeof(struct awc_fid)); - - cmd.par0 = AWC_TX_ALLOC_SMALL_SIZE ; - - if (awc_issue_command_and_block(&cmd)) goto final; - - while ( awc_event_status_Alloc(cmd.port) == 0) ; - fid->u.tx.fid = awc_Tx_Allocated_Fid(cmd.port); - fid->u.tx.fid_size = AWC_TX_ALLOC_SMALL_SIZE; - - DEBUG(32,"allocated large tx fid %x ",fid->u.tx.fid); - if(fid->u.tx.fid == 0 - || cmd.status != 0xA){ - printk(KERN_ERR "%s bad tx_alloc\n",dev->name); - fid->busy =1; - goto final; - } else { - fid->busy =0; - tot++; - } - awc_event_ack_Alloc(cmd.port); - - // shoudlnt goto final after that - awc_fid_queue_push_tail(&cmd.priv->tx_small_ready,fid); - - k++; - } - - cmd.priv->tx_small_buffs_total = tot; - DEBUG(32,"allocated %d small tx buffs\n",tot); - - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; - - final: - if (fid ) - kfree(fid); - printk(KERN_CRIT "%s awc tx prealloc failed \n",dev->name); - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; - -}; - -int -awc_tx_dealloc_fid(struct net_device * dev,struct awc_fid * fid){ - - struct awc_command cmd; - int fid_handle = 0; - - AWC_INIT_COMMAND(AWC_NOT_CLI,cmd,dev,0x0C,0, 0,0,0,NULL); - - AWC_BAP_LOCK_NOT_CLI(cmd); - - if (fid->u.tx.fid){ - fid_handle = cmd.par0 = fid->u.tx.fid; - fid->u.tx.fid = 0; - fid->busy =0; - kfree(fid); - - if (!cmd.priv->ejected) - if (awc_issue_command_and_block(&cmd)) goto final; - //awc_event_ack_Alloc(cmd.port); - } - - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; - - final: - printk(KERN_ERR "awc_tx_dealloc failed for fid %x \n",fid_handle); - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; - - -}; - -int -awc_tx_dealloc(struct net_device * dev){ - - struct awc_private * priv = (struct awc_private *)dev->priv; - - - -// int k=0; - struct awc_fid * fid; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_tx_dealloc "); - - while (NULL != (fid = awc_fid_queue_pop_head(&priv->tx_large_ready))) - awc_tx_dealloc_fid(dev,fid); - while (NULL != (fid = awc_fid_queue_pop_head(&priv->tx_small_ready))) - awc_tx_dealloc_fid(dev,fid); - while (NULL != (fid = awc_fid_queue_pop_head(&priv->tx_post_process))) - awc_tx_dealloc_fid(dev,fid); - while (NULL != (fid = awc_fid_queue_pop_head(&priv->tx_in_transmit))) - awc_tx_dealloc_fid(dev,fid); - - return 0; - -}; - - - -inline struct awc_fid * -awc_tx_fid_lookup_and_remove(struct net_device * dev, u16 fid_handle){ - - struct awc_private * priv = (struct awc_private *)dev->priv; -// int k = 0; - unsigned long flags; - struct awc_fid * fid = NULL; - int cnt=0; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_tx_fid_lookup "); - - spin_lock_irqsave(&(priv->queues_lock),flags); - - - fid = priv->tx_in_transmit.head; - cnt = 0; - while (fid){ - if (fid->u.tx.fid == fid_handle){ - awc_fid_queue_remove(&priv->tx_in_transmit, fid); - spin_unlock_irqrestore(&(priv->queues_lock),flags); - return fid; - } - fid = fid->next; - // printk("iT\n"); - if (cnt++ > 200) { - // printk("bbb in awc_fid_queue\n"); - spin_unlock_irqrestore(&(priv->queues_lock),flags); - return 0; - }; - }; - - cnt=0; - fid = priv->tx_post_process.head; - while (fid){ - if (fid->u.tx.fid == fid_handle){ - awc_fid_queue_remove(&priv->tx_post_process, fid); - spin_unlock_irqrestore(&(priv->queues_lock),flags); - return fid; - } - fid = fid->next; - // printk("pp\n"); - if (cnt++ > 200) { - // printk("bbb in awc_fid_queue\n"); - spin_unlock_irqrestore(&(priv->queues_lock),flags); - return 0; - }; - - }; - - cnt=0; - fid = priv->tx_large_ready.head; - while (fid){ - if (fid->u.tx.fid == fid_handle){ - awc_fid_queue_remove(&priv->tx_large_ready, fid); - spin_unlock_irqrestore(&(priv->queues_lock),flags); - return fid; - } - fid = fid->next; - // printk("lr\n"); - if (cnt++ > 200) { - // printk("bbb in awc_fid_queue\n"); - spin_unlock_irqrestore(&(priv->queues_lock),flags); - return 0; - }; - - }; - cnt=0; - fid = priv->tx_small_ready.head; - while (fid){ - if (fid->u.tx.fid == fid_handle){ - awc_fid_queue_remove(&priv->tx_small_ready, fid); - spin_unlock_irqrestore(&(priv->queues_lock),flags); - return fid; - } - fid = fid->next; - // printk("sr\n"); - if (cnt++ > 200) { - // printk("bbb in awc_fid_queue\n"); - spin_unlock_irqrestore(&(priv->queues_lock),flags); - return 0; - }; - - }; - - spin_unlock_irqrestore(&(priv->queues_lock),flags); - - printk(KERN_ERR "%s tx fid %x not found \n",dev->name, fid_handle); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return NULL; -} - - - - - -int -awc_queues_init(struct net_device * dev){ - struct awc_private * priv = (struct awc_private *)dev->priv; - struct awc_fid * fid = NULL; - int retv =0; - int k = 0; - - awc_fid_queue_init(&priv->tx_in_transmit); - awc_fid_queue_init(&priv->tx_post_process); - awc_fid_queue_init(&priv->tx_large_ready); - awc_fid_queue_init(&priv->tx_small_ready); - awc_fid_queue_init(&priv->rx_ready); - awc_fid_queue_init(&priv->rx_post_process); - - retv = awc_tx_alloc(dev); - - k = 0; - while (k < AWC_RX_BUFFS){ - fid = kmalloc(sizeof(struct awc_fid),GFP_KERNEL); - if (!fid) return -1; - awc_fid_queue_push_tail(&priv->rx_ready,fid); - k++; - }; - - if (retv) return retv; - - return 0; -}; - - -int -awc_queues_destroy(struct net_device * dev){ - struct awc_private * priv = (struct awc_private *)dev->priv; - struct awc_fid * fid = NULL; - int retv =0; - - - - while (NULL != (fid = awc_fid_queue_pop_head(&priv->rx_ready))){ - kfree(fid); - } - while (NULL != (fid = awc_fid_queue_pop_head(&priv->rx_post_process))){ - kfree(fid); - } - - retv = awc_tx_dealloc(dev); - - return retv; -}; - - - -/****************************** 802.11router ******************/ -inline int -awc_802_11_copy_path_skb(struct net_device * dev, struct awc_fid * rx_buff){ - - struct awc_private * priv = (struct awc_private * )dev->priv; - - AWC_ENTRY_EXIT_DEBUG("awc_802_11_copy_path_skb"); - - if (rx_buff->pkt_len < 22 ) rx_buff->pkt_len = 22; - -// if (!rx_buff->skb) - rx_buff->skb = dev_alloc_skb(rx_buff->pkt_len + 12 +2); - - - if (rx_buff->skb == NULL) { - printk(KERN_CRIT "couldnt alloc rx_buff->skb in rx event \n"); - priv->stats.rx_dropped++; - return -1; - } - rx_buff->type |= p80211copy_path_skb; - - rx_buff->skb->dev = dev; - -// skb_reserve(rx_buff->skb, rx_buff->pkt_len + 12 ); - - rx_buff->u.rx.payload = skb_put(rx_buff->skb, rx_buff->pkt_len + 12 ) ; - rx_buff->u.rx.payload = ((char *)rx_buff->u.rx.payload ) +12; - - AWC_ENTRY_EXIT_DEBUG("exit\n"); - - return 0; - - -}; - - -int -awc_802_11_find_copy_path(struct net_device * dev, struct awc_fid * rx_buff){ - -// struct awc_private * priv = (struct awc_private * )dev->priv; -// u8 is_802_3 = 0; -// int i = 0; - - rx_buff->type =0; - - return awc_802_11_copy_path_skb(dev,rx_buff); -}; - - -/* called from INTERRUPT context, - - must deliver the packet to where it was meant by - awc_802_11_find_copy_path - - SHOULD be efficient and - queue the packet if operations take longer - -*/ - - -int parse_not_8023; - -void -awc_802_11_router_rx(struct net_device * dev,struct awc_fid * rx_buff){ - - struct awc_private * priv = (struct awc_private * )dev->priv; - struct sk_buff * skb = rx_buff->skb; - u8 * payload = rx_buff->u.rx.payload; -// u8 * p802_3_macs_place = payload -12; - u16 pkt_len = rx_buff->pkt_len; - struct ieee_802_11_802_1H_header * bridge = NULL; - struct ieee_802_11_snap_header * snap = NULL; - struct ieee_802_11_802_1H_header * bridge_tmp; - struct ieee_802_11_snap_header * snap_tmp; - - u16 ptr = 0; - u16 len; - - AWC_ENTRY_EXIT_DEBUG("awc_802_11_router_rx"); - -// if (rx_buff->type & p80211_8023) - rx_buff->mac = rx_buff->u.rx.ieee_802_3.dst_mac; -// else -// rx_buff->mac = rx_buff->u.rx.ieee_802_11.mac1; - - if ( rx_buff->u.rx.ieee_802_11.frame_control == 0x8 ) - memcpy(priv->bssid,rx_buff->u.rx.ieee_802_11.mac3,6); - - while ((ptr < pkt_len - 1 ) && payload && parse_not_8023){ - - bridge_tmp = (struct ieee_802_11_802_1H_header*) &payload[ptr]; - snap_tmp = (struct ieee_802_11_snap_header*) &payload[ptr]; - len = ntohs( *((u16*)&payload[ptr]) ); - - - - if ( len < 0x5DC) { // not a protocol - - if ( len != pkt_len-2 - ptr){ - printk(KERN_ERR "%s bad encapsulation lenght %x at pkt offset %x \n",dev->name,len,ptr); - goto bad_packet; - } - DEBUG(1,"parisng packet of size %x\n",len); - ptr +=2; - continue; - } - - DEBUG(1,"parisng packet of proto %x\n",len); - - if (snap_tmp->dsap == 0xaa && snap_tmp->ssap == 0xaa && - pkt_len - ptr > sizeof(struct ieee_802_11_snap_header) ){ - - DEBUG(0x200,"%s SNAP ",dev->name); - if (snap_tmp->ctrl != 0x03){ - printk(KERN_ERR "%s unknown snap ctrl %x \n",dev->name,snap_tmp->ctrl); - goto bad_packet; - }; - if (snap_tmp->oui[0] == 0 && // LLC RFC1042 - snap_tmp->oui[1] == 0 && - snap_tmp->oui[2] == 0 ){ - snap = snap_tmp; - ptr += sizeof(struct ieee_802_11_snap_header); - DEBUG(0x200,"%s LLC RFC1042 \n",dev->name); - continue; - } - if (snap_tmp->oui[0] == 0 && // LLC 802.1H - snap_tmp->oui[1] == 0 && - snap_tmp->oui[2] == 0x78){ - snap = snap_tmp; - DEBUG(0x200,"%s LLC 802.1H \n",dev->name); - ptr += sizeof(struct ieee_802_11_snap_header); - continue; - }; - if (snap_tmp->oui[0] == 0x00 && // 802.1H itself - snap_tmp->oui[1] == 0x40 && - snap_tmp->oui[2] == 0x96){ - ptr += sizeof(struct ieee_802_11_802_1H_header); - if (ptr >= pkt_len){ - goto bad_packet; - DEBUG(1,"%s invalid packet len in 802.1H SNAP OUI check \n",dev->name); - } - DEBUG(0x200,"%s OUI 004096 \n",dev->name); - DEBUG(0x200," 802.1H uknown1 %x ",ntohs(bridge_tmp->unknown1)); - DEBUG(0x200," 802.1H uknw type %x \n",0xf000 & ntohs(bridge_tmp->unknown2)); - DEBUG(0x200," 802.1H payloadsize %x \n",0x0fff & ntohs(bridge_tmp->unknown2)); - - //goto bad_packet; // TODO - - bridge = bridge_tmp; - if (bridge_tmp->unknown1 == 0x0000 && - ((ntohs(bridge_tmp->unknown2) & 0xf000) == 0x1000 ) ){ - rx_buff->type |= p80211_8021H; - rx_buff->mac = &payload[ptr]; - DEBUG(0x200," 802.1H DATA packet of size %x\n",0xf000 & ntohs(bridge_tmp->unknown2) ); - memcpy(priv->p2p,rx_buff->u.rx.ieee_802_11.mac2, 6); - ptr +=12; - continue; - }; - DEBUG(0x200,"%s droping unknown 004096 packet \n ",dev->name); - goto bad_packet; - - - } - goto bad_packet; - } - if ( len > 0x5DC){ - // packet without linklevel header for us - - if ( len == 0x8000 || len == 0x8006){ - - DEBUG(0x200,"Non IP packet %x \n",ntohs(len)); - - }; - goto good_packet; - - }; - - goto good_packet; - } - - good_packet: - - if (ptr > pkt_len) goto bad_packet; - - if ( rx_buff->mac != (payload + ptr -12) ) - memcpy( payload +ptr -12, rx_buff->mac , 12); - - - - if (!payload || !skb || !rx_buff->skb || !rx_buff->u.rx.payload) - return ; - //skb->ip_summed = CHECKSUM_NONE; - skb->data = payload + ptr -12; - skb->len += ptr ; - - rx_buff->skb->protocol = eth_type_trans(rx_buff->skb,dev); - DEBUG(0x200,"eth_type_trans decided: %x\n",rx_buff->skb->protocol); - rx_buff->skb = NULL; - rx_buff->u.rx.payload = NULL; - priv->stats.rx_packets++; - priv->stats.rx_bytes += skb->len; - - netif_rx(skb); - dev->last_rx = jiffies; - AWC_ENTRY_EXIT_DEBUG("exit\n"); - return ; - - bad_packet: - DEBUG(0x200,"%s packet dropped in packet hdr parse \n ",dev->name); - if (rx_buff->skb && (rx_buff->type & p80211copy_path_skb)){ - - dev_kfree_skb_irq(rx_buff->skb); - rx_buff->skb = NULL; - rx_buff->u.rx.payload = NULL; - }; - - AWC_ENTRY_EXIT_DEBUG("exit\n"); - -}; - -void -awc_802_11_failed_rx_copy(struct net_device * dev,struct awc_fid * rx_buff){ - struct awc_private * priv = (struct awc_private * )dev->priv; - - - AWC_ENTRY_EXIT_DEBUG("awc_802_11_failed_rx_copy"); - if (rx_buff->skb) - dev_kfree_skb_irq(rx_buff->skb); - rx_buff->skb = NULL; - rx_buff->u.rx.payload = NULL; - priv->stats.rx_errors++; - - - AWC_ENTRY_EXIT_DEBUG("exit\n"); -}; - -/* - called from kernel->driver tx routine - must decide where and how to post the packet - must post the packet to wherever it decides - either copy to card or enqueue to destination queue - -*/ - - -int -awc_802_11_tx_find_path_and_post(struct net_device * dev, - struct sk_buff * skb){ - - - struct awc_private * priv = (struct awc_private * )dev->priv; - int i; - int len = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; /* check min length*/ - struct awc_fid * fid = NULL; -// u16 saved_fid ; - u16 p2p_direct =priv->p2p_found; - struct iphdr * ip_hdr; - //buffer = skb->data; - - AWC_ENTRY_EXIT_DEBUG("awc_802_11_tx_find_path_and_post"); - - // netif_stop_queue(dev); - DOWN(&priv->tx_buff_semaphore); - if (len > dev->mtu + 16 ) { - printk(KERN_ERR "%s packet size too large %d \n",dev->name, len); - goto final; - } - - if (len + AWC_TX_HEAD_SIZE < AWC_TX_ALLOC_SMALL_SIZE ) - fid = awc_fid_queue_pop_head(&priv->tx_small_ready); - - if (!fid) - fid = awc_fid_queue_pop_head(&priv->tx_large_ready); - - if (!fid) { - DEBUG(32,"%s buffs in use \n",dev->name); - goto no_space; - } -/* - if (fid->u.tx.fid_size < len + AWC_TX_HEAD_SIZE){ - awc_fid_queue_push_tail(&priv->tx_small_ready, fid); - fid = awc_fid_queue_pop_head(&priv->tx_large_ready); - } -*/ - if (!fid) { - DEBUG(32,"%s buffs in use \n",dev->name); - goto no_space; - } - - if (fid->u.tx.fid_size < len + AWC_TX_HEAD_SIZE - 14){ - printk(KERN_ERR "found too small tx fid size %d, pktlen %d \n",fid->u.tx.fid_size, len); - } - memset(&fid->u.tx.radio_tx, 0,sizeof(struct aironet4500_radio_tx_header)); - memset(&fid->u.tx.ieee_802_11, 0,sizeof(struct ieee_802_11_header)); - memset(&fid->u.tx.ieee_802_3, 0,sizeof(struct ieee_802_3_header)); - fid->u.tx.payload =NULL; - fid->u.tx.gap_length =0; - fid->busy = 1; - - - priv->tx_buffs_in_use++; - DEBUG(32,"found large buff %x \n",fid->u.tx.fid); - -/* - fid->type |= p80211_llc_snap; - fid->snap.dsap = 0xaa; - fid->snap.ssap = 0xaa; - fid->snap.ctrl = 0x03; - fid->snap.oui[0] = 0x0; - fid->snap.oui[1] = 0x0; - fid->snap.oui[2] = 0x0; -*/ - fid->skb = skb; - - - if (priv->p2p_uc && !priv->p2p_found){ // we go without encapsulation to neighbour; - - for (i=0; i < 6; i++) - if (priv->p2p[i] != skb->data[i]){ - p2p_direct = 1; - break; - } - }; - - if (priv->force_tx_rate == 2 || priv->force_tx_rate == 4 || - priv->force_tx_rate== 11 || priv->force_tx_rate == 22){ - fid->u.tx.radio_tx.tx_bit_rate = priv->force_tx_rate; - } else if (priv->force_tx_rate != 0 ) { - printk(KERN_ERR "wrong force_tx_rate=%d changed to default \n", priv->force_tx_rate); - priv->force_tx_rate = 0; - }; - fid->u.tx.radio_tx.TX_Control = - aironet4500_tx_control_tx_ok_event_enable | - aironet4500_tx_control_tx_fail_event_enable | - aironet4500_tx_control_no_release; - - if (len < priv->force_rts_on_shorter){ - fid->u.tx.radio_tx.TX_Control |= - aironet4500_tx_control_use_rts; - }; - - ip_hdr = (struct iphdr * ) ((( char * ) skb->data) + 14); - if (ip_hdr && skb->data[12] == 0x80 ){ - if (ip_hdr->tos & IPTOS_RELIABILITY && priv->ip_tos_reliability_rts) - fid->u.tx.radio_tx.TX_Control |= - aironet4500_tx_control_use_rts; - if (ip_hdr->tos & IPTOS_THROUGHPUT && priv->ip_tos_troughput_no_retries) - fid->u.tx.radio_tx.TX_Control |= - aironet4500_tx_control_no_retries; - }; - - if (priv->p802_11_send || memcmp(dev->dev_addr, skb->data +6, 6) ){ - fid->u.tx.radio_tx.TX_Control |= - aironet4500_tx_control_header_type_802_11; - DEBUG(0x200,"%s bridging, forcing 802_11 send \n ",dev->name); - } - - - if (!priv->p2p_uc || p2p_direct) { - if ((fid->u.tx.radio_tx.TX_Control & - aironet4500_tx_control_header_type_802_11 )){ - - // including 802.3 header into 802.11 packet - fid->u.tx.radio_tx.PayloadLength = len -12; - fid->u.tx.ieee_802_3.payload_length = len -12 ; - fid->pkt_len = len -12; - fid->u.tx.payload = skb->data +12; - - if (priv->simple_bridge){ - memcpy(fid->u.tx.ieee_802_11.mac1,skb->data,6); - memcpy(fid->u.tx.ieee_802_11.mac2,skb->data +6,6); - memcpy(fid->u.tx.ieee_802_11.mac3,priv->status.CurrentBssid ,6); - memset(fid->u.tx.ieee_802_11.mac4,0,6); - fid->u.tx.ieee_802_11.frame_control = 0x8; - fid->u.tx.ieee_802_11.gapLen=6; - } else { - memcpy(fid->u.tx.ieee_802_11.mac1,skb->data,6); - memcpy(fid->u.tx.ieee_802_11.mac2,dev->dev_addr,6); - memcpy(fid->u.tx.ieee_802_11.mac3,skb->data +6 ,6); - memset(fid->u.tx.ieee_802_11.mac4,0 ,6); - fid->u.tx.ieee_802_11.frame_control = 0x108; - fid->u.tx.ieee_802_11.gapLen=6; - } - } else { // plain old 802.3, with hdr copied - fid->u.tx.radio_tx.PayloadLength = len -12; - fid->u.tx.ieee_802_3.payload_length = len -12; - fid->pkt_len = len - 12; - fid->u.tx.payload = skb->data +12; - }; - memcpy(fid->u.tx.ieee_802_3.dst_mac,skb->data, 12); - DEBUG(0x200,"%s tx simply 802.3 type \n ",dev->name); - - } else {// 802.1H bridgeing - fid->type |= p80211_8021H; - fid->bridge_size = len + sizeof(fid->bridge) ; - fid->bridge.dsap = 0xaa; - fid->bridge.ssap = 0xaa; - fid->bridge.ctrl = 0x03; - fid->bridge.oui[0] = 0x0; - fid->bridge.oui[1] = 0x40; - fid->bridge.oui[2] = 0x96; - fid->bridge.unknown1= 0x0000; - fid->bridge.unknown2= htons((len) & 0x1000); - fid->u.tx.radio_tx.PayloadLength = fid->bridge_size + 2; - fid->u.tx.ieee_802_3.payload_length = fid->u.tx.radio_tx.PayloadLength ; - - - fid->u.tx.payload = skb->data +12; - if ((fid->u.tx.radio_tx.TX_Control & - aironet4500_tx_control_header_type_802_11 )){ - - memcpy(fid->u.tx.ieee_802_11.mac1,priv->p2p,6); - memcpy(fid->u.tx.ieee_802_11.mac2,skb->data +6,6); - memcpy(fid->u.tx.ieee_802_11.mac3,priv->bssid ,6); - memset(fid->u.tx.ieee_802_11.mac4,0,6); - fid->u.tx.ieee_802_11.gapLen=6; - - fid->u.tx.ieee_802_11.frame_control = 0x8; - } - memcpy(fid->u.tx.ieee_802_3.dst_mac,priv->p2p, 6); - memcpy(fid->u.tx.ieee_802_3.src_mac,dev->dev_addr, 6); - fid->u.tx.payload = skb->data + 2 + sizeof(fid->bridge); - fid->pkt_len = len ; - - DEBUG(0x200,"%s tx simply 802.1H type \n ",dev->name); - - }; - - priv->stats.tx_bytes += fid->u.tx.ieee_802_3.payload_length; - priv->stats.tx_packets++; - - - awc_fid_queue_push_tail(&priv->tx_in_transmit,fid); - udelay(1); - awc_transmit_packet(dev,fid); - if (priv->tx_large_ready.size <= 2 || priv->tx_small_ready.size <= 2 ){ - if (netif_running(dev)) - netif_stop_queue(dev); - } else { - if (netif_running(dev)) - netif_wake_queue(dev); - } - UP(&priv->tx_buff_semaphore); - AWC_ENTRY_EXIT_DEBUG("exit\n"); - return 0; - - - no_space: - DEBUG(32,"%s tx buffs not found \n ",dev->name); - #ifdef AWC_DEBUG -// printk("s"); - #endif - netif_stop_queue (dev); //weell, here it must be set anyway and before - //priv->stats.tx_fifo_errors++; - UP(&priv->tx_buff_semaphore); - AWC_ENTRY_EXIT_DEBUG("NoSpaceExit\n"); - return 1 ; - final: - priv->stats.tx_errors++; - UP(&priv->tx_buff_semaphore); - if (!netif_running(dev)) - netif_start_queue(dev); - dev_kfree_skb(skb); - AWC_ENTRY_EXIT_DEBUG("BADExit\n"); - return -1; - -}; - -/* - called from low level driver->card tx copy routine - probably wants to free skbuf if failed transmits won't be - resubmitted to another device (if more than one path) - or tried again (if tx buffer in card needs to be filled again) -*/ - - -void -awc_802_11_after_tx_packet_to_card_write(struct net_device * dev, - struct awc_fid * tx_buff){ - - - AWC_ENTRY_EXIT_DEBUG("awc_802_11_after_tx_packet_to_card_write"); - - if (!tx_buff){ - DEBUG(1,"%s no damn tx_buff in awc_802_11_after_tx_packet_to_card_write \n",dev->name); - }; - - if(tx_buff->skb){ - dev_kfree_skb(tx_buff->skb); - tx_buff->skb = NULL; - } - - AWC_ENTRY_EXIT_DEBUG("exit\n"); -}; - -/* - called from low level driver->card tx copy routine - probably wants to free skbuf if failed writes won't be - resubmitted to another device (if more than one path) - or tried again (if tx buffer in card needs to be filled again) -*/ - -void -awc_802_11_after_failed_tx_packet_to_card_write(struct net_device * dev, - struct awc_fid * tx_buff){ - struct awc_private * priv = (struct awc_private *)dev->priv; - - - AWC_ENTRY_EXIT_DEBUG("awc_802_11_after_failed_tx_packet_to_card_write"); - - if (!tx_buff){ - DEBUG(1,"%s no damn tx_buff in awc_802_11_after_failed_tx_packet_to_card_write \n",dev->name); - }; - - if(tx_buff->skb){ - dev_kfree_skb(tx_buff->skb); - tx_buff->skb = NULL; - tx_buff->busy =0; - printk(KERN_ERR "%s packet to card write failed \n",dev->name); - } - - awc_fid_queue_remove(&priv->tx_in_transmit,tx_buff); - - if (tx_buff->u.tx.fid_size <= AWC_TX_ALLOC_SMALL_SIZE) - awc_fid_queue_push_tail(&priv->tx_small_ready,tx_buff); - else - awc_fid_queue_push_tail(&priv->tx_large_ready,tx_buff); - - AWC_ENTRY_EXIT_DEBUG("exit\n"); - -}; - -inline void -awc_802_11_after_tx_complete(struct net_device * dev, struct awc_fid * tx_buff){ - - struct awc_private * priv = (struct awc_private *)dev->priv; - - AWC_ENTRY_EXIT_DEBUG("awc_802_11_after_tx_complete"); - - DEBUG(32,"tx complete status %x \n ",tx_buff->u.tx.radio_tx.Status); - - #ifdef AWC_DEBUG - if (tx_buff->u.tx.radio_tx.Status) - printk("tf%x ",tx_buff->u.tx.radio_tx.Status); - #endif - if (tx_buff->u.tx.fid_size <= AWC_TX_ALLOC_SMALL_SIZE){ - awc_fid_queue_push_tail(&priv->tx_small_ready,tx_buff); - priv->tx_small_buffs_in_use--; - } else { - awc_fid_queue_push_tail(&priv->tx_large_ready,tx_buff); - priv->tx_buffs_in_use--; - } - - tx_buff->busy = 0; -// netif_wake_queue (dev); - - AWC_ENTRY_EXIT_DEBUG("exit\n"); -}; - - - - -/******************************** R X ***********************/ - - - -inline int -awc_receive_packet(struct net_device * dev){ - - struct awc_command cmd; - u16 Fid; -// struct sk_buff *skb = NULL; - struct awc_fid * rx_buff; - - - struct awc_private * priv ; - int i; - - priv= (struct awc_private *)dev->priv; - rx_buff = priv->rx_ready.head ; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_receive_packet "); - - Fid = awc_Rx_Fid(dev->base_addr); - - DEBUG(128," RX FID %x \n",Fid); - - if (!Fid){ - printk(KERN_CRIT "No RxFid when rx event \n"); - return -1; - } - - - - if (!rx_buff){ - printk(KERN_CRIT "No rx_buff in rx event \n"); - return -1; - } - - rx_buff->type = 0; - - - AWC_INIT_COMMAND(AWC_CLI,cmd,dev,0,0, - Fid, 0, 0x14 , &(rx_buff->u.rx.radio_rx)); - - -// header reading , order is important - AWC_BAP_LOCK_UNDER_CLI(cmd); - - if (awc_bap_setup(&cmd)) goto final; - if (awc_bap_read(&cmd)) goto final; - - DEBUG(128, "rx receive radio header, length %x \n",rx_buff->u.rx.radio_rx.PayloadLength); - - cmd.buff = &(rx_buff->u.rx.ieee_802_11); - cmd.len = 0x20; - - if (awc_bap_read(&cmd)) goto final; - - DEBUG(128, "rx receive 802_11 header, framecontrol %x \n",rx_buff->u.rx.ieee_802_11.frame_control); - - if (rx_buff->u.rx.ieee_802_11.gapLen > 8) { - printk(KERN_ERR "%s: 802.11 gap lenght huge %d \n",dev->name,rx_buff->u.rx.ieee_802_11.gapLen); - goto final; - } - DEBUG(128,"SeqCtl %x, 802_11 macs: ",rx_buff->u.rx.ieee_802_11.SeqCtl); - if (awc_debug & 0x7000){ - DEBUG(0x7000, " %s mac1 ",dev->name); for (i = 0; i < 6; i++) DEBUG(0x7000, "%02x:",((unsigned char)rx_buff->u.rx.ieee_802_11.mac1[i] )) ; - DEBUG(0x7000, " %s mac2 ",dev->name); for (i = 0; i < 6; i++) DEBUG(0x7000, "%02x:",((unsigned char)rx_buff->u.rx.ieee_802_11.mac2[i] )) ; - DEBUG(0x7000, " %s mac3 ",dev->name); for (i = 0; i < 6; i++) DEBUG(0x7000, "%02x:",((unsigned char)rx_buff->u.rx.ieee_802_11.mac3[i] )) ; - DEBUG(0x7000, " %s mac4 ",dev->name); for (i = 0; i < 6; i++) DEBUG(0x7000, "%02x:",((unsigned char)rx_buff->u.rx.ieee_802_11.mac4[i] )) ; - } - DEBUG(128,"\n GapLen %d ",rx_buff->u.rx.ieee_802_11.gapLen ); - - if (rx_buff->u.rx.ieee_802_11.gapLen > 0) { - cmd.buff = rx_buff->u.rx.ieee_802_11.gap; - cmd.len = rx_buff->u.rx.ieee_802_11.gapLen; - if (awc_bap_read(&cmd)) goto final; - DEBUG(128, "rx receive gap header , gap length %x \n",rx_buff->u.rx.gap_length); - } - for (i = 0; i < rx_buff->u.rx.ieee_802_11.gapLen ; i++) DEBUG(128,"%x",((unsigned char)rx_buff->u.rx.ieee_802_11.gap[i] )) ; - - - if ( !(priv->config.ReceiveMode & RXMODE_DISABLE_802_3_HEADER ) - ){ - cmd.buff = &(rx_buff->u.rx.ieee_802_3); - cmd.len = 0x10; - rx_buff->type |= p80211_8023; - if (awc_bap_read(&cmd)) goto final; - DEBUG(128, "rx receive 802_3 header, payload length %x \n",rx_buff->u.rx.ieee_802_3.payload_length); - DEBUG(128,"\n 802_3 status %x ",rx_buff->u.rx.ieee_802_3.status ); - DEBUG(128," RX payloadLen %x, dst,src: ",rx_buff->u.rx.ieee_802_3.payload_length); - if (awc_debug & 0x7000){ - for (i = 0; i < 6; i++) printk("%02x:",((unsigned char)rx_buff->u.rx.ieee_802_3.dst_mac[i] )) ; - for (i = 0; i < 6; i++) printk("%02x:",((unsigned char)rx_buff->u.rx.ieee_802_3.src_mac[i] )) ; - } - }; - - rx_buff->pkt_len = rx_buff->u.rx.radio_rx.PayloadLength; - - if (priv->config.OperatingMode & MODE_LLC_HOST) - rx_buff->type |= p80211_llc_snap; - - - if (awc_802_11_find_copy_path(dev,rx_buff)) goto final; - - - if (rx_buff->u.rx.payload ){ - cmd.buff = rx_buff->u.rx.payload; - cmd.len = rx_buff->pkt_len; - if (awc_bap_read(&cmd)) goto final; - DEBUG(128, "rx payload read %x \n",rx_buff->u.rx.ieee_802_3.payload_length); - }; - - AWC_RELEASE_COMMAND(cmd); - - DEBUG(128,"\n payload hdr %x ",rx_buff->u.rx.ieee_802_3.status ); - if (awc_debug && rx_buff->u.rx.payload) - for (i = 0; i < 20; i++) DEBUG(128,"%x",((unsigned char)rx_buff->u.rx.payload[i] )) ; - DEBUG(128,"%c",'\n'); - - awc_802_11_router_rx(dev,rx_buff); - - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; - final: - - awc_802_11_failed_rx_copy(dev,rx_buff); - // if (skb) dev_kfree_skb(skb, FREE_WRITE); - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; - -}; - - -int -awc_transmit_packet(struct net_device * dev, struct awc_fid * tx_buff) { - - struct awc_command cmd; - u16 size ; -// unsigned long flags; - int i; - struct awc_private * priv= (struct awc_private *)dev->priv; - - AWC_ENTRY_EXIT_DEBUG(" entry awc_transmit_packet "); - - if (priv->link_status_changed ){ - priv->link_status_changed =0; - awc_readrid_dir(dev,&priv->rid_dir[7]); - } - - - AWC_INIT_COMMAND(AWC_NOT_CLI,cmd,dev,0xB, tx_buff->u.tx.fid, - tx_buff->u.tx.fid, 0, 0x14 , &(tx_buff->u.tx.radio_tx)); - - AWC_BAP_LOCK_NOT_CLI(cmd); - -#ifdef AWC_BY_BOOK -#warning By books is bad, AWC_BY_BOOK -#error cli sti bad here - if ( !(tx_buff->type &(p80211_llc_snap|p80211_8021H) ) - && !(tx_buff->u.tx.radio_tx.TX_Control & - aironet4500_tx_control_header_type_802_11 )){ - - cmd.buff=&(tx_buff->u.tx.radio_tx.TX_Control); - cmd.len = 0x2 ; - cmd.offset = 0x8; - save_flags(flags); - cli(); - if (awc_bap_setup(&cmd)) goto final; - if (awc_bap_write(&cmd)) goto final; - - cmd.buff=&(tx_buff->u.tx.ieee_802_3.payload_length); - cmd.len = 14; - cmd.offset = 0x36; - if (awc_bap_setup(&cmd)) goto final; - if (awc_bap_write(&cmd)) goto final; - restore_flags(flags); - - } else { -#endif - - if (awc_bap_setup(&cmd)) goto final; - if (awc_bap_write(&cmd)) goto final; - - DEBUG(64," wrote radio tx header for fid %x \n",tx_buff->u.tx.fid); - - // 802.11 - cmd.buff=&(tx_buff->u.tx.ieee_802_11); - cmd.len = 0x20; - if (awc_bap_write(&cmd)) goto final; - - // Gap - if (tx_buff->u.tx.ieee_802_11.gapLen) { - cmd.buff=&(tx_buff->u.tx.ieee_802_11.gap); - cmd.len = tx_buff->u.tx.ieee_802_11.gapLen; - if (awc_bap_write(&cmd)) goto final; - } - // 802.3 - if ( ! (tx_buff->u.tx.radio_tx.TX_Control & - aironet4500_tx_control_header_type_802_11 )){ - - cmd.buff=&(tx_buff->u.tx.ieee_802_3); - if (awc_debug & 0x7000){ - printk("%s TX dst ",dev->name); - for (i=0; i < 6; i++) printk ("%02x:",(unsigned char) tx_buff->u.tx.ieee_802_3.dst_mac[i]); - printk(" src "); - for (i=0; i < 6; i++) printk ("%02x:",(unsigned char) tx_buff->u.tx.ieee_802_3.src_mac[i]); - printk(" \n "); - } - cmd.len = 0x10; - if (awc_bap_write(&cmd)) goto final; - }; - - if (tx_buff->type & p80211_llc_snap) { - cmd.buff= & tx_buff->snap; - cmd.len = sizeof(tx_buff->snap); - if (awc_bap_write(&cmd)) goto final; - }; - - if (tx_buff->type & p80211_8021H) { - size = htons(tx_buff->bridge_size); - // size = tx_buff->bridge_size;// to seasure raw speed of f** UC - cmd.buff= & size; - cmd.len = 2 ; - if (awc_bap_write(&cmd)) goto final; - - cmd.buff= & tx_buff->bridge; - cmd.len = sizeof(tx_buff->bridge); - if (awc_bap_write(&cmd)) goto final; - }; - -#ifdef AWC_BY_BOOK - - } -#endif - cmd.buff= tx_buff->u.tx.payload; - cmd.len = tx_buff->pkt_len; - - if (awc_bap_write(&cmd)) goto final; - AWC_RELEASE_COMMAND(cmd); -// locking probs, these two lines below and above, swithc order - if (awc_issue_command_and_block(&cmd)) goto final_unlocked; - - - tx_buff->transmit_start_time = jiffies; - awc_802_11_after_tx_packet_to_card_write(dev,tx_buff); - // issue the transmit command - - - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; - final: - awc_802_11_after_failed_tx_packet_to_card_write(dev,tx_buff); - printk(KERN_CRIT "%s awc tx command failed \n",dev->name); - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; - - final_unlocked: - awc_802_11_after_failed_tx_packet_to_card_write(dev,tx_buff); - printk(KERN_CRIT "%s awc tx command failed \n",dev->name); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; - -} - - -inline int -awc_tx_complete_check(struct net_device * dev){ - - struct awc_fid * fid; - struct awc_command cmd; - - - AWC_ENTRY_EXIT_DEBUG(" entry awc_tx_complete_check "); - - - - fid = awc_fid_queue_pop_head(&((struct awc_private *)dev->priv)->tx_post_process); - - if (!fid) { - printk("awc_tx_complete_check with empty queue \n "); - return -1; - } - - DEBUG(64," tx_complete fid %x \n",fid->u.tx.fid); - - AWC_INIT_COMMAND(AWC_NOT_CLI,cmd,dev,0,0, fid->u.tx.fid, - 0, 0x14 , &(fid->u.tx.radio_tx)); - - fid->state |= awc_tx_fid_complete_read; - - AWC_BAP_LOCK_NOT_CLI(cmd); - if (awc_bap_setup(&cmd)) goto final; - if (awc_bap_read(&cmd)) goto final; - AWC_RELEASE_COMMAND(cmd); - - awc_802_11_after_tx_complete(dev,fid); - - - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - return 0; - - final: - awc_802_11_after_tx_complete(dev,fid); - printk(KERN_ERR "%s awc_tx_complete_check failed \n",dev->name); - AWC_RELEASE_COMMAND(cmd); - AWC_ENTRY_EXIT_DEBUG(" BAD exit \n"); - return -1; ; -} - - -#define AWC_QUEUE_BH {\ - if (!priv->work_active && !priv->work_running){\ - priv->work_active = 1;\ - schedule_work(&priv->work); \ - }\ - } - - -void -awc_bh(struct net_device *dev){ - - struct awc_private * priv = (struct awc_private *)dev->priv; - int active_interrupts; - int enabled_interrupts; -// u16 tx_status; - int multi_ints = 0; -// u16 tx_fid = 0; -// unsigned long flags; - - DEBUG(8, "awc_bh awoken on jiffie %ld \n",jiffies); - - priv->work_running = 1; - - active_interrupts = awc_event_status(dev->base_addr); - - enabled_interrupts = awc_ints_enabled(dev->base_addr); - - DEBUG(8, "awc_bh active ints %x \n",active_interrupts); - - if (test_and_set_bit( 0, (void *) &priv->tx_chain_active) ) { -// printk(KERN_ERR "tx chain active in bh \n"); -// schedule_work(&priv->work); - goto bad_end; - } -start: - if (active_interrupts == 0xffff){ - - printk(KERN_CRIT "%s device ejected in interrupt, disabling\n",dev->name); - netif_device_detach (dev); - if (priv->command_semaphore_on){ - priv->command_semaphore_on--; - AWC_UNLOCK_COMMAND_ISSUING(priv); - } - priv->tx_chain_active =0; - goto bad_end; - - } - - if (priv->unlock_command_postponed ){ - - priv->unlock_command_postponed-- ; - if( priv->command_semaphore_on ){ - - awc_read_response((&priv->cmd)); - priv->async_command_start = 0; - if (priv->command_semaphore_on){ - - priv->command_semaphore_on--; - AWC_UNLOCK_COMMAND_ISSUING(priv); - } - } - }; - -/* if ( active_interrupts & 0x1 ){ - awc_receive_packet(dev) ; - awc_event_ack_Rx(dev->base_addr); - priv->waiting_interrupts &= ~0x1; - } -*/ - while (priv->tx_post_process.size) - if (awc_tx_complete_check(dev)) break; - - active_interrupts = awc_event_status(dev->base_addr); - - if (priv->command_semaphore_on || priv->tx_post_process.size){ - if (multi_ints++ < 10000){ - goto start; - } - }; - priv->work_active = 0; - priv->work_running = 0; - - priv->tx_chain_active = 0; - - - - bad_end: -// if (!priv->tx_chain_active) -// wake_up(&priv->tx_chain_wait_queue); - - priv->work_running = 0; - priv->work_active = 0; - return ; -}; - - -inline int -awc_interrupt_process(struct net_device * dev){ - - struct awc_private * priv ; - int active_interrupts; - int enabled_interrupts; - u16 tx_status; - int multi_ints = 0; - u16 tx_fid = 0; -// u16 ints_to_ack =0; - struct awc_fid * fid = NULL; -// int interrupt_reenter = 0; -// unsigned long flags; - -// save_flags(flags); -// cli(); - // here we need it, because on 2.3 SMP there are truly parallel irqs - disable_irq(dev->irq); - - DEBUG(2," entering interrupt handler %s ",dev->name); - - if (!dev) { - printk(KERN_ERR "No dev in interrupt \n"); - goto bad_end; - }; - - priv = (struct awc_private *)dev->priv; - - if (!priv) { - printk(KERN_ERR "No PRIV in interrupt \n"); - goto bad_end; - }; - - - enabled_interrupts = awc_ints_enabled(dev->base_addr); - active_interrupts = awc_event_status(dev->base_addr); - - DEBUG(2,"entry: processing interrupts waiting %x \n",priv->waiting_interrupts); - DEBUG(2,"entry: processing interrupts active %x \n",active_interrupts); - DEBUG(2,"entry: processing interrupts enabled %x \n",enabled_interrupts); -// printk("ikka interruptis\n"); - - - priv->interrupt_count++; - if (priv->interrupt_count > 1 ) - printk(" interrupt count on\n "); - - - - if (priv->waiting_interrupts & active_interrupts) - printk(KERN_ERR "double interrupt waiting %x active %x \n", - priv->waiting_interrupts, active_interrupts); - - // priv->waiting_interrupts |= active_interrupts; - - - - - -start: - DEBUG(2,"Start processing int, times %d\n",multi_ints); - - if (active_interrupts == 0xffff){ - - printk(KERN_CRIT "%s device ejected, got interrupt, disabling\n",dev->name); - //priv-> - netif_device_detach (dev); - priv->ejected = 1; - if (priv->work_active || priv->work_running){ - priv->interrupt_count--; - goto bad_end; - } else if (priv->command_semaphore_on){ - - printk(KERN_ERR "ejected, last BH fired \n"); - - AWC_QUEUE_BH; - } - priv->interrupt_count--; - goto bad_end; - } - - - - if (active_interrupts & 0x100 ){ - awc_event_ack_Awaken(dev->base_addr); - udelay(10); - DEBUG(1,"%s device awoke \n",dev->name); - priv->waiting_interrupts &= ~0x100; - }; - if (active_interrupts & 0x80 ){ - - priv->link_status = awc_Link_Status(dev->base_addr); - DEBUG(1,"link status changed %x \n",priv->link_status); - awc_event_ack_Link(dev->base_addr); - priv->waiting_interrupts &= ~0x80; - if(priv->link_status == 0x400) - printk(KERN_INFO "%s Associated\n",dev->name ); - else { - printk(KERN_INFO "%s Link status change : %s \n",dev->name, awc_print_string(awc_link_status_names, priv->link_status) ); - if ( priv->link_status & 0x8100 || - priv->link_status & 0x0100 || - priv->link_status & 0x8200 || - priv->link_status & 0x8400 || - priv->link_status & 0x0300 ) - printk(KERN_INFO "%s Link status change reason : %s \n",dev->name, awc_print_string(awc_link_failure_reason_names, priv->link_status & 0xff) ); - - } - }; - - - if (active_interrupts & 0x10 & enabled_interrupts ){ - -// printk(KERN_ERR "cmd int shouldnt be active in interrupt routine\n"); - - awc_event_ack_Cmd(priv->cmd.port); - - if ( priv->enabled_interrupts & 0x10) - priv->enabled_interrupts &= ~0x10; - - enabled_interrupts = awc_ints_enabled(dev->base_addr); - - if (enabled_interrupts & 0x10){ - awc_ints_enable(dev->base_addr, enabled_interrupts & ~0x10); - } - - if (priv->command_semaphore_on){ - priv->unlock_command_postponed++; - - AWC_QUEUE_BH; - } - } - - if ((active_interrupts & 0x10) && !(0x10 & enabled_interrupts) ){ - -// printk(KERN_ERR "%s: aironet4500: cmd int shouldnt be active in interrupt routine\n",dev->name); - - //awc_event_ack_Cmd(priv->cmd.port); - } - - -// active_interrupts = awc_event_status(dev->base_addr); - - tx_status = active_interrupts & 0x6 ; - - - - if (tx_status) { - - tx_fid = awc_Tx_Compl_Fid(dev->base_addr); - if (!tx_fid){ - udelay(10); - tx_fid = awc_Tx_Compl_Fid(dev->base_addr); - } - if (!tx_fid) - printk(KERN_ERR "No tx fid when tx int active\n"); - - fid = awc_tx_fid_lookup_and_remove(dev, tx_fid); - - if (fid) { - if (priv->process_tx_results) { - awc_fid_queue_push_tail(&priv->tx_post_process,fid); - AWC_QUEUE_BH; - }else { - if (fid->u.tx.fid_size <= AWC_TX_ALLOC_SMALL_SIZE) - awc_fid_queue_push_tail(&priv->tx_small_ready,fid); - else - awc_fid_queue_push_tail(&priv->tx_large_ready,fid); - netif_wake_queue (dev); - } - } else - printk(KERN_ERR "awc fid %x not found\n",tx_fid); - - - if (tx_status & 2){ - awc_event_ack_Tx(dev->base_addr); - priv->stats.tx_packets++; - priv->waiting_interrupts &= ~0x2; - } - if (tx_status & 4){ - priv->stats.tx_errors++; - awc_event_ack_TxExc(dev->base_addr); - priv->waiting_interrupts &= ~0x4; - } - if ((tx_status&6) == 6) - printk(KERN_NOTICE "%s: both tx and txExc up\n",dev->name); - - - } - -// active_interrupts = awc_event_status(dev->base_addr); - - if ( active_interrupts & 0x1 ){ - awc_receive_packet(dev); - awc_event_ack_Rx(dev->base_addr); - priv->waiting_interrupts &= ~0x1; - } - - active_interrupts = awc_event_status(dev->base_addr); - - if ((active_interrupts & 0x7) && - !priv->work_active && - !priv->work_running ){ - if (multi_ints++ < 5) - goto start; - } - if (multi_ints >=5 ) - printk(KERN_ERR "%s multi_ints > 5 interrupts still active %x\n",dev->name,active_interrupts); - - - priv->interrupt_count--; - - awc_ints_enable(dev->base_addr, 0x0000); - - - DEBUG(0x8, " enabling ints in interrupt_process %x \n", - priv->enabled_interrupts & ~priv->waiting_interrupts); - - - - AWC_ENTRY_EXIT_DEBUG(" exit \n"); - - awc_ints_enable(dev->base_addr, - priv->enabled_interrupts); - -//end_here: - - enable_irq(dev->irq); -// restore_flags(flags); - - return 0; - -bad_end: - AWC_ENTRY_EXIT_DEBUG(" bad_end exit \n"); - enable_irq(dev->irq); -// restore_flags(flags); - return -1; - - -}; - -static const char *aironet4500_core_version = -"aironet4500.c v0.1 1/1/99 Elmer Joandi, elmer@ylenurme.ee.\n"; - -struct net_device * aironet4500_devices[MAX_AWCS]; - -int awc_debug; // 0xffffff; -static int p802_11_send; // 1 - -static int awc_process_tx_results; -int tx_queue_len = 10; -int tx_rate; -int channel = 5; -//static int tx_full_rate; -int max_mtu = 2312; -int adhoc; -int large_buff_mem = 1700 * 10; -int small_buff_no = 20; -int awc_full_stats; -char SSID[33]; -int master; -int slave; -int awc_simple_bridge; -// int debug =0; - -#if LINUX_VERSION_CODE >= 0x20100 - -MODULE_PARM(awc_debug,"i"); -MODULE_PARM(tx_rate,"i"); -MODULE_PARM(channel,"i"); -//MODULE_PARM(tx_full_rate,"i"); -MODULE_PARM(adhoc,"i"); -MODULE_PARM(master,"i"); -MODULE_PARM(slave,"i"); -MODULE_PARM(awc_simple_bridge,"i"); -MODULE_PARM(max_mtu,"i"); -MODULE_PARM(large_buff_mem,"i"); -MODULE_PARM(small_buff_no,"i"); -MODULE_PARM(SSID,"c33"); -MODULE_PARM_DESC(awc_debug,"Aironet debug mask"); -MODULE_PARM_DESC(channel,"Aironet "); -MODULE_PARM_DESC(adhoc,"Aironet Access Points not available (0-1)"); -MODULE_PARM_DESC(master,"Aironet is Adhoc master (creates network sync) (0-1)"); -MODULE_PARM_DESC(slave,"Aironet is Adhoc slave (0-1)"); -MODULE_PARM_DESC(max_mtu,"Aironet MTU limit (256-2312)"); -#endif -MODULE_LICENSE("GPL"); - - -/*EXPORT_SYMBOL(tx_queue_len); -EXPORT_SYMBOL(awc_debug); - */ -EXPORT_SYMBOL(awc_init); -EXPORT_SYMBOL(awc_open); -EXPORT_SYMBOL(awc_close); -EXPORT_SYMBOL(awc_reset); -EXPORT_SYMBOL(awc_config); - -EXPORT_SYMBOL(aironet4500_devices); -EXPORT_SYMBOL(awc_debug); -//EXPORT_SYMBOL(); - -EXPORT_SYMBOL(awc_private_init); -EXPORT_SYMBOL(awc_tx_timeout); -EXPORT_SYMBOL(awc_start_xmit); -EXPORT_SYMBOL(awc_interrupt); -EXPORT_SYMBOL(awc_get_stats); -EXPORT_SYMBOL(awc_change_mtu); -EXPORT_SYMBOL(awc_set_multicast_list); - -EXPORT_SYMBOL(awc_proc_set_fun); -EXPORT_SYMBOL(awc_proc_unset_fun); -EXPORT_SYMBOL(awc_register_proc); -EXPORT_SYMBOL(awc_unregister_proc); - - -/*************************** RESET INIT CONFIG ***********************/ - - - void awc_reset(struct net_device *dev) -{ - - long long jiff; - - DEBUG(2, " awc_reset dev %p \n", dev); - DEBUG(2, "%s: awc_reset \n", dev->name); - - awc_issue_soft_reset(dev); - - jiff = jiffies; - udelay(1000); - while (awc_command_read(dev->base_addr)){ - udelay(1000); - if (jiffies - jiff > 5*HZ){ - printk(KERN_CRIT "%s bad reset\n",dev->name); - break; - } - }; - -} - - int awc_config(struct net_device *dev) -{ -// struct awc_private *priv = (struct awc_private *)dev->priv; - - DEBUG(2, "%s: awc_config \n", dev->name); - - - if( awc_disable_MAC(dev)) goto final; - udelay(100); - if( awc_write_all_rids(dev) ) goto final; - udelay(100); - if( awc_enable_MAC(dev)) goto final; - - return 0; - final: - return -1; -} - - -char name[] = "ElmerLinux"; - - int awc_init(struct net_device *dev){ - struct awc_private *priv = (struct awc_private *)dev->priv; - int i; - const char * radioType; - - DEBUG(2, "%s: awc_init \n", dev->name); - - /* both_bap_lock decreases performance about 15% - * but without it card gets screwed up - */ -#ifdef CONFIG_SMP - both_bap_lock = 1; - bap_setup_spinlock = 1; -#endif - //awc_dump_registers(dev); - - if (adhoc & !max_mtu) - max_mtu= 2250; - else if (!max_mtu) - max_mtu= 1500; - - priv->sleeping_bap = 1; - - - priv->enabled_interrupts = awc_ints_enabled(dev->base_addr); - - if( awc_issue_noop(dev) ) goto final; - - awc_ints_enable(dev->base_addr,0); - - if( awc_disable_MAC(dev) ) goto final; - - -// awc_rids_setup(dev); - i=0; - while ( i < AWC_NOF_RIDS){ - if (awc_rids_temp[i].selector) - memcpy(&priv->rid_dir[i],&awc_rids_temp[i],sizeof(priv->rid_dir[0]) ); - else priv->rid_dir[i].selector = NULL; - i++; - } - - // following MUST be consistent with awc_rids in count and ordrering !!! - priv->rid_dir[0].buff = &priv->config; // card RID mirrors - priv->rid_dir[1].buff = &priv->SSIDs; - priv->rid_dir[2].buff = &priv->fixed_APs; - priv->rid_dir[3].buff = &priv->driver_name; - priv->rid_dir[4].buff = &priv->enc_trans; - priv->rid_dir[5].buff = &priv->general_config; // - priv->rid_dir[6].buff = &priv->capabilities; - priv->rid_dir[7].buff = &priv->status; - priv->rid_dir[8].buff = &priv->AP; - priv->rid_dir[9].buff = &priv->statistics; - priv->rid_dir[10].buff = &priv->statistics_delta; - priv->rid_dir[11].buff = &priv->statistics_delta_clear; - priv->rid_dir[12].buff = &priv->wep_volatile; - priv->rid_dir[13].buff = &priv->wep_nonvolatile; - priv->rid_dir[14].buff = &priv->modulation; - - priv->rid_dir[15].buff = &priv->statistics16; - priv->rid_dir[16].buff = &priv->statistics16_delta; - priv->rid_dir[17].buff = &priv->statistics16_delta_clear; - - priv->rid_dir[0].bufflen = sizeof(priv->config); // card RID mirrors - priv->rid_dir[1].bufflen = sizeof(priv->SSIDs); - priv->rid_dir[2].bufflen = sizeof(priv->fixed_APs); - priv->rid_dir[3].bufflen = sizeof(priv->driver_name); - priv->rid_dir[4].bufflen = sizeof(priv->enc_trans); - priv->rid_dir[5].bufflen = sizeof(priv->general_config); // - priv->rid_dir[6].bufflen = sizeof(priv->capabilities); - priv->rid_dir[7].bufflen = sizeof(priv->status); - priv->rid_dir[8].bufflen = sizeof(priv->AP); - priv->rid_dir[9].bufflen = sizeof(priv->statistics); - priv->rid_dir[10].bufflen = sizeof(priv->statistics_delta); - priv->rid_dir[11].bufflen = sizeof(priv->statistics_delta_clear); - priv->rid_dir[12].bufflen = sizeof(priv->wep_volatile); - priv->rid_dir[13].bufflen = sizeof(priv->wep_nonvolatile); - priv->rid_dir[14].bufflen = sizeof(priv->modulation); - - priv->rid_dir[15].bufflen = sizeof(priv->statistics16); - priv->rid_dir[16].bufflen = sizeof(priv->statistics16_delta); - priv->rid_dir[17].bufflen = sizeof(priv->statistics16_delta_clear); - - - if( awc_read_all_rids(dev) ) goto final; - - - priv->config.OperatingMode = 0;// MODE_LLC_HOST; - DEBUG(1,"ReceiveMode %x \n",priv->config.ReceiveMode); - // priv->config.ReceiveMode = RXMODE_DISABLE_802_3_HEADER; - - if (!adhoc) - priv->config.OperatingMode = MODE_STA_ESS; -// priv->config.OperatingMode = MODE_AP; -// Setting rates does not work with new hardware, use force_tx_rate via proc -// priv->config.Rates[0] =0x82; -// priv->config.Rates[1] =0x4; -// priv->config.Rates[2] =tx_full_rate; -// priv->config.Rates[3] =0; -// priv->config.Rates[4] =0; -// priv->config.Rates[5] =0; -// priv->config.Rates[6] =0; -// priv->config.Rates[7] =0; - priv->config.Channel = channel; - if (adhoc && master){ - priv->config.JoinNetTimeout = 0x1;//0 is facotry default - } else if (adhoc && slave){ - // by spec 0xffff, but, this causes immediate bad behaviour - // firmware behvaiour changed somehere around ver 2?? - priv->config.JoinNetTimeout = 0x7fff; - }; -// priv->config.AuthenticationType = 1; - priv->config.Stationary =1; -// priv->config.ScanMode = 1; -// priv->config.LinkLossDelay = 100; - priv->config.FragmentThreshold = 1700; - priv->config.RtsThreshold = 1700; - memcpy(priv->config.NodeName, name, 10); - - DEBUG(1,"%s supported Rates \n",dev->name); - for (i=0; i< 8; i++) - DEBUG(1,"%x ",priv->capabilities.SupportedRates[i]); - DEBUG(1,"%c",'\n'); - DEBUG(1,"%s default Rates \n",dev->name); - for (i=0; i< 8; i++) - DEBUG(1,"%x ",priv->config.Rates[i]); - DEBUG(1,"%c",'\n'); - - - // here we go, bad aironet - memset(&priv->SSIDs,0,sizeof(priv->SSIDs)); - - spin_lock_init(&priv->queues_lock); - priv->SSIDs.ridLen =0; - if (!SSID) { - priv->SSIDs.SSID[0].SSID[0] ='a'; - priv->SSIDs.SSID[0].SSID[1] ='b'; - priv->SSIDs.SSID[0].SSID[2] ='c'; - priv->SSIDs.SSID[0].lenght =3; - } else { - int sidlen = strlen(SSID); - memcpy(priv->SSIDs.SSID[0].SSID,SSID,sidlen); - priv->SSIDs.SSID[0].lenght = sidlen; - }; - - priv->SSIDs.SSID[1].lenght =0; - priv->SSIDs.SSID[1].SSID[0] =0; - priv->SSIDs.SSID[1].SSID[1] =0; - priv->SSIDs.SSID[2].lenght =0; - priv->SSIDs.SSID[2].SSID[0] =0; - priv->SSIDs.SSID[2].SSID[1] =0; - - -// priv->enc_trans.rules[0].etherType= 0x0008; -// priv->enc_trans.rules[0].Action = 1; - - memcpy( priv->config.StationMacAddress, - priv->capabilities.FactoryAddress, 6 ); - - memcpy(dev->dev_addr, priv->config.StationMacAddress, 6); - - DEBUG(2, "%s: awc_init success \n", dev->name); - - if (priv->capabilities.RadioType == 1) radioType = "802.11 Frequency Hoping"; - else if (priv->capabilities.RadioType == 2) radioType = "802.11 Direct Sequence"; - else if (priv->capabilities.RadioType == 4) radioType = "LM2000"; - else radioType = "Multiple Radio Types"; - - printk("%s: %s %s found @ 0x%lx irq %d firmwareVersion %d \n",dev->name, - priv->capabilities.ProductName,radioType, - dev->base_addr,dev->irq, - priv->capabilities.SoftwareVersion); - - return 0; - final: - printk(KERN_ERR "aironet init failed \n"); - return -ENODEV; - - }; - -int awc_private_init(struct net_device * dev){ - struct awc_private * priv = (struct awc_private *) dev->priv; - int i = 0; - - DEBUG(2, "%s: awc_private_init \n", dev->name); - - - memset(priv, 0, sizeof(struct awc_private)); - - spin_lock_init(&priv->queues_lock); - - priv->bap0.select = dev->base_addr + awc_Select0_register; - priv->bap0.offset = dev->base_addr + awc_Offset0_register; - priv->bap0.data = dev->base_addr + awc_Data0_register; - priv->bap0.lock = 0; - priv->bap0.status = 0; - spin_lock_init(&priv->bap0.spinlock); - init_MUTEX(&priv->bap0.sem); - priv->bap1.select = dev->base_addr + awc_Select1_register; - priv->bap1.offset = dev->base_addr + awc_Offset1_register; - priv->bap1.data = dev->base_addr + awc_Data1_register; - priv->bap1.lock = 0; - priv->bap1.status = 0; - spin_lock_init(&priv->bap1.spinlock); - init_MUTEX(&priv->bap1.sem); - priv->sleeping_bap = 1; - -//spinlock now init_MUTEX(&priv->command_semaphore); - spin_lock_init(&priv->command_issuing_spinlock); - spin_lock_init(&priv->both_bap_spinlock); - spin_lock_init(&priv->bap_setup_spinlock); - spin_lock_init(&priv->interrupt_spinlock); - - priv->command_semaphore_on = 0; - priv->unlock_command_postponed = 0; - INIT_WORK(&priv->work, (void *)(void *)awc_work, dev); - priv->work_running = 0; - priv->work_active = 0; - priv->tx_chain_active = 0; - priv->enabled_interrupts= 0x00; - priv->waiting_interrupts= 0x00; - - - init_MUTEX(&priv->tx_buff_semaphore); - priv->tx_buffs_in_use = 0; - priv->tx_small_buffs_in_use = 0; - priv->mac_enabled =0; - priv->link_status =0; - priv->large_buff_mem = large_buff_mem; - if (priv->large_buff_mem < max_mtu + AWC_TX_HEAD_SIZE + 10 ) - priv->large_buff_mem = max_mtu + AWC_TX_HEAD_SIZE + 10; - priv->small_buff_no = small_buff_no; - if (priv->small_buff_no < 1 ) - priv->small_buff_no = 1 ; - - priv->process_tx_results = awc_process_tx_results; - - //init_waitqueue(&priv->tx_chain_wait_queue); - - for (i=0; i< 6 ; i++ ) { - priv->p2p[i] = 0xff; - priv->bssid[i] =0; - } -// priv->p2p_uc =1; - priv->p2p_found =0; - - priv->p802_11_send =p802_11_send; - priv->full_stats = awc_full_stats; - priv->simple_bridge = awc_simple_bridge; - priv->force_rts_on_shorter = 0; - priv->force_tx_rate = tx_rate; - priv->ip_tos_reliability_rts = 0; - priv->ip_tos_troughput_no_retries = 0 ; - - priv->ejected =0; - priv->interrupt_count =0; - - return 0; - -}; - -/**************************** OPEN CLOSE **********************/ - - - int awc_open(struct net_device *dev) -{ - struct awc_private *priv = (struct awc_private *)dev->priv; - - - - DEBUG(2, "%s: awc_open \n", dev->name); - - if( awc_queues_init(dev) ) goto final; - if( awc_config(dev) ) goto final; - - memcpy(dev->dev_addr, priv->config.StationMacAddress, 6); - - priv->enabled_interrupts = 0x87; - awc_ints_enable(dev->base_addr,priv->enabled_interrupts); - -// priv->p8022_client = register_8022_client; -// priv->snap_client = register_snap_client; - DEBUG(2, "%s: opened \n", dev->name); - - priv->sleeping_bap = 0; - - - MOD_INC_USE_COUNT; -// kernel_thread(awc_thread,dev,0); - - netif_start_queue (dev); - return 0; /* Always succeed */ - - final: - netif_device_detach (dev); - printk(KERN_ERR "aironet open failed \n"); - return -1; -} - - - int awc_close(struct net_device *dev) -{ - struct awc_private * priv = (struct awc_private *) dev->priv; - - DEBUG(2, "%s: closing device.\n", dev->name); - - netif_stop_queue (dev); - - awc_disable_MAC(dev); - awc_queues_destroy(dev); - - awc_reset(dev); - - mdelay(10); - - AWC_LOCK_COMMAND_ISSUING(priv); - - MOD_DEC_USE_COUNT; - - AWC_UNLOCK_COMMAND_ISSUING(priv); - - return 0; -} - - - -/****************************** TX RX STUFF ******************/ - - - -void awc_tx_timeout (struct net_device *dev) -{ - struct awc_private *priv = (struct awc_private *) dev->priv; - struct awc_fid * fid; - int cnt; - unsigned long flags; - - DEBUG (2, "%s: awc_tx_timeout \n", dev->name); - - printk (KERN_NOTICE "%s: Transmit timed out , buffs %d %d, queues tx %d pp %d lrg %d sm %d \n ", - dev->name, priv->tx_small_buffs_total, priv->tx_buffs_total, - priv->tx_in_transmit.size, priv->tx_post_process.size, - priv->tx_large_ready.size, priv->tx_small_ready.size); - priv->stats.tx_errors++; - - save_flags(flags); - cli(); - fid = priv->tx_in_transmit.head; - cnt = 0; - while (fid) { // removing all fids older that that - if (jiffies - fid->transmit_start_time > (HZ)) { - // printk(KERN_ERR "%s staled tx_buff found, age %uld jiffies\n",dev->name, - // jiffies - fid->transmit_start_time ); - awc_fid_queue_remove (&priv->tx_in_transmit, fid); - if (fid->u.tx.fid_size <= AWC_TX_ALLOC_SMALL_SIZE) - awc_fid_queue_push_tail (&priv->tx_small_ready, fid); - else - awc_fid_queue_push_tail (&priv->tx_large_ready, fid); - } - fid = fid->next; - if (cnt++ > 200) { - printk ("bbb in awc_fid_queue\n"); - restore_flags(flags); - return; - }; - - } - restore_flags(flags); - dev->trans_start = jiffies; - netif_wake_queue (dev); -} - - -long long last_tx_q_hack; -int direction = 1; - -int awc_start_xmit(struct sk_buff *skb, struct net_device *dev) { - - struct awc_private *priv = (struct awc_private *)dev->priv; - int retval = 0; -// unsigned long flags; - - DEBUG(2, "%s: awc_start_xmit \n", dev->name); - - - if (!dev) { - DEBUG(1, " xmit dev=NULL, jiffie %ld \n",jiffies); - return -1; - }; - - if (!skb) { - DEBUG(1, " xmit skb=NULL, jiffie %ld \n",jiffies); - return -1; - }; - -// if (test_and_set_bit( 0, (void *) &priv->tx_chain_active) ) { -// netif_start_queue (dev); -// return 1; -// } - - dev->trans_start = jiffies; - retval = awc_802_11_tx_find_path_and_post(dev,skb); - priv->tx_chain_active = 0; -// wake_up_interruptible(&priv->tx_chain_wait_queue); - -// if (!dev->tbusy) dev_tint(dev); - return retval; -} - -void awc_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - struct net_device *dev = dev_id; - struct awc_private *priv; - unsigned long flags; - -// if ((dev == NULL)) return; - - priv = (struct awc_private *)dev->priv; - - - - - DEBUG(2, "%s: awc_interrupt \n", dev->name); - spin_lock_irqsave(&priv->interrupt_spinlock, flags); - - awc_interrupt_process(dev); - - spin_unlock_irqrestore(&priv->interrupt_spinlock, flags); -} - - - -/************************ STATS, MULTICAST & STUFF ****************/ - - - - struct net_device_stats *awc_get_stats(struct net_device *dev) -{ - struct awc_private *priv = (struct awc_private *)dev->priv; -// unsigned long flags; -// int cnt = 0; -// int unlocked_stats_in_interrupt=0; - - DEBUG(2, "%s: awc_get_stats \n", dev->name); - - if (!netif_running(dev)) { - return 0; - } -// save_flags(flags); -// cli(); - if (awc_full_stats) - awc_readrid_dir(dev, &priv->rid_dir[9]); -// restore_flags(flags); - - // the very following is the very wrong very probably - if (awc_full_stats){ - priv->stats.rx_bytes = priv->statistics.HostRxBytes; - priv->stats.tx_bytes = priv->statistics.HostTxBytes; - priv->stats.rx_fifo_errors = priv->statistics.RxOverrunErr ; - priv->stats.rx_crc_errors = priv->statistics.RxPlcpCrcErr + priv->statistics.RxMacCrcErr ; - priv->stats.rx_frame_errors = priv->statistics.RxPlcpFormat ; - priv->stats.rx_length_errors = priv->statistics.RxPlcpLength ; - priv->stats.rx_missed_errors = priv->statistics.RxAged ; - priv->stats.rx_over_errors = priv->statistics.RxOverrunErr ; - - priv->stats.collisions = priv->statistics.TxSinColl; - priv->stats.tx_aborted_errors = priv->statistics.TxAged ; - priv->stats.tx_fifo_errors = priv->statistics.HostTxFail ; - priv->stats.tx_window_errors = priv->statistics.TxMulColl ; - priv->stats.tx_heartbeat_errors = priv->statistics.DefersProt +priv->statistics.DefersEngy ; - priv->stats.tx_carrier_errors = priv->statistics.RetryLong +priv->statistics.RetryShort ; - priv->stats.multicast = priv->statistics.HostRxMc; - } - - -// printk("rx_packets %d\n",priv->stats.rx_packets); - return &(priv->stats); -} - - -int awc_change_mtu(struct net_device *dev, int new_mtu){ - -// struct awc_private *priv = (struct awc_private *)dev->priv; - unsigned long flags; - - if ((new_mtu < 256 ) || (new_mtu > 2312) || (max_mtu && new_mtu > max_mtu) ) - return -EINVAL; - - if (netif_running(dev)) { - printk("PLEASE, ifconfig %s down for mtu change\n",dev->name); - - }; - if (dev->mtu != new_mtu) { - save_flags(flags); - cli(); - netif_stop_queue(dev); - awc_disable_MAC(dev); - restore_flags(flags); - - awc_tx_dealloc(dev); - dev->mtu = new_mtu; - awc_tx_alloc(dev); - awc_enable_MAC(dev); - netif_start_queue(dev); - - printk("%s mtu has been changed to %d \n ",dev->name,dev->mtu); - - } - - return 0; - -}; - - - void -awc_set_multicast_list(struct net_device *dev) { -// int ioaddr = dev->base_addr; - -/* if (dev->flags & IFF_PROMISC) - promisc - else if (dev->mc_count || (dev->flags & IFF_ALLMULTI)) - allmulti - else - normal - */ - - -} - - - -int (* awc_proc_set_fun) (int); -int (* awc_proc_unset_fun) (int); - - -int awc_register_proc(int (*awc_proc_set_device)(int),int (*awc_proc_unset_device)(int)){ - - AWC_ENTRY_EXIT_DEBUG("awc_register_proc"); - awc_proc_set_fun = awc_proc_set_device; - awc_proc_unset_fun = awc_proc_unset_device; - AWC_ENTRY_EXIT_DEBUG("exit"); - return 0; -}; - -int awc_unregister_proc(void){ - - AWC_ENTRY_EXIT_DEBUG("awc_unregister_proc"); - - awc_proc_set_fun = NULL; - awc_proc_unset_fun = NULL; - AWC_ENTRY_EXIT_DEBUG("exit"); - return 0; -}; - -static int aironet_core_init(void) -{ -// unsigned long flags; - - - printk(KERN_INFO"%s", aironet4500_core_version); - return 0; - - -} - -static void aironet_core_exit(void) -{ - printk(KERN_INFO "aironet4500 unloading core module \n"); - -} - -module_init(aironet_core_init); -module_exit(aironet_core_exit); - diff --git a/drivers/net/aironet4500_proc.c b/drivers/net/aironet4500_proc.c deleted file mode 100644 index a25c28bc5b48..000000000000 --- a/drivers/net/aironet4500_proc.c +++ /dev/null @@ -1,719 +0,0 @@ -/* - * Aironet 4500 /proc interface - * - * Elmer Joandi, Januar 1999 - * Copyright GPL - * - * - * Revision 0.1 ,started 30.12.1998 - * - * - */ -#include <linux/config.h> -#include <linux/netdevice.h> -#include <linux/etherdevice.h> -#include <linux/module.h> -#include <linux/if_arp.h> -#include <linux/init.h> -#include <linux/ioport.h> -#include <linux/kernel.h> -#include <linux/version.h> -#include <linux/skbuff.h> -#include <linux/slab.h> -#include <linux/string.h> -#include <linux/timer.h> -#include <linux/interrupt.h> -#include <linux/in.h> - -#include <asm/io.h> -#include <asm/system.h> -#include <asm/bitops.h> - -#ifdef CONFIG_PROC_FS - -#include <linux/sysctl.h> -#include <linux/fs.h> - -#include "aironet4500.h" -#include "aironet4500_rid.c" - - -#define AWC_STR_SIZE 0x2ff0 -#define DEV_AWC_INFO 1 -#define DEV_AWC 1 - -static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED; - -struct awc_proc_private{ - struct ctl_table_header * sysctl_header; - struct ctl_table * proc_table; - struct ctl_table proc_table_device_root[2]; - struct ctl_table proc_table_sys_root[2]; - char proc_name[10]; -}; -static char awc_drive_info[AWC_STR_SIZE]="Zcom \n\0"; -static char awc_proc_buff[AWC_STR_SIZE]; -static int awc_int_buff; -static struct awc_proc_private awc_proc_priv[MAX_AWCS]; - -extern int awc_proc_unset_device(int device_number); - -int awc_proc_format_array(int write,char * buff, size_t * len, struct awc_rid_dir * rid_dir, struct aironet4500_RID * rid){ - - u8 * data = rid_dir->buff + rid->offset; - int pos = 0; - int null_past = 0; - int hex = ((rid->mask == 0xff) && (rid->value == 0x0 )); - int string = ((rid->mask == 0) && (rid->value == 0 )); - u32 val =0; - int bytes = (rid->bits / 8); - int ch =0; - int i,k; - int array_len = rid->array; - int nullX = 0; - - - AWC_ENTRY_EXIT_DEBUG("awc_proc_format_array"); - - if (rid->bits %8 ) bytes +=1; - - if (bytes > 4 && rid->array == 1){ - array_len = bytes; - bytes = 1; - hex = 1; - }; - if (bytes < 1 || bytes > 4){ - printk(KERN_ERR " weird number of bytes %d in aironet rid \n",bytes); - return -1; - }; - DEBUG(0x20000,"awc proc array bytes %d",bytes); - DEBUG(0x20000," hex %d",hex); - DEBUG(0x20000," string %d",string); - - DEBUG(0x20000," array_len %d \n",array_len); - DEBUG(0x20000," offset %d \n",rid->offset); - - if (!write){ - for (i=0; i < array_len ; i++){ - - if (bytes <= 1 ) val = data[i*bytes]; - else if (bytes <= 2 ) val = *((u16 *)&data[i*bytes]); - else if (bytes <= 4 ) val = *((u32 *)&data[i*bytes]); - - if (rid->null_terminated && !val) - null_past =1; - - if (hex && !string) - for (k=0; k <bytes; k++) - pos += sprintf(buff+pos, "%02x",(unsigned char ) data[i*bytes +k]); - else if (string) - pos += sprintf(buff+pos, "%c",val); - else pos += sprintf(buff+pos, "%c",val); - - DEBUG(0x20000, "awcproc %x %x \n",data[i], val); - }; - - } else { - for (i=0; i < array_len ; i++){ - - DEBUG(0x20000, "awcproc %x %x \n",data[i], buff[i]); - - if (hex && ! string){ - - val = 0; - - for (k=0; k < bytes; k++){ - val <<= 8; - ch = *(buff + 2*i*bytes +k + nullX); - if (ch >= '0' && ch <='9') - ch -= '0'; - if (ch >= 'A' && ch <='F') - ch -= 'A'+ 0xA; - if (ch >= 'a' && ch <='f') - ch -= 'a'+ 0xA; - val += ch <<4; - k++; - - ch = *(buff + 2*i*bytes +k + nullX); - if (val == 0 && (ch == 'X' || ch == 'x')){ - nullX=2; - val = 0; - k = -1; - continue; - }; - if (ch >= '0' && ch <='9') - ch -= '0'; - if (ch >= 'A' && ch <='F') - ch -= 'A'+ 0xA; - if (ch >= 'a' && ch <='f') - ch -= 'a'+ 0xA; - - val += ch; - if (i*bytes > *len ) - val = 0; - } - if (rid->bits <=8 ) data[i*bytes] = val; - else if (rid->bits <=16 ) *((u16 *)&data[i*bytes]) = val; - else if (rid->bits <=32 ) *((u32 *)&data[i*bytes]) = val; - if (!val) null_past=1; - - } else { - for (k=0; k < bytes; k++){ - data[i*bytes +k] = *(buff + i*bytes +k); - if (i*bytes +k > *len || !data[i*bytes +k]) - null_past = 1;; - } - - } - if (null_past){ - if (rid->bits <=8 ) data[i*bytes] = 0; - else if (rid->bits <=16 ) *((u16 *)&data[i*bytes]) = 0; - else if (rid->bits <=32 ) *((u32 *)&data[i*bytes]) = 0; - } - - } - - }; - - -// *len = pos; - - AWC_ENTRY_EXIT_DEBUG("awc_proc_format_array"); - return 0; -}; - - -int awc_proc_format_bits(int write,u32 * buff, size_t* lenp, struct awc_rid_dir * rid_dir, struct aironet4500_RID * rid){ - - u8 * data = rid_dir->buff + rid->offset; - u32 val = 0; - int not_bool = 0; - - AWC_ENTRY_EXIT_DEBUG("awc_proc_format_bits"); - - if ((rid->bits == 8 && rid->mask == 0xff) || - (rid->bits == 16 && rid->mask == 0xffff) || - (rid->bits == 32 && rid->mask == 0xffffffff) ) - not_bool = 1; - - if (rid->bits <=8 ) val = *data; - else if (rid->bits <=16 ) val = *((u16 *)data); - else if (rid->bits <=32 ) val = *((u32 *)data); - - DEBUG(0x20000,"awc proc int enter data %x \n",val); - DEBUG(0x20000,"awc proc int enter buff %x \n",*buff); - DEBUG(0x20000,"awc proc int enter intbuff %x \n",awc_int_buff); - DEBUG(0x20000,"awc proc int enter lenp %x \n",*lenp); - - - - if (!write){ - if (rid->mask) - val &= rid->mask; - - if (!not_bool && rid->mask && - ((val & rid->mask) == (rid->value & rid->mask))) - *buff = 1; - else if (!not_bool) *buff = 0; - else *buff = val; - } else { - if (not_bool){ - val &= ~rid->mask; - val |= (*buff & rid->mask); - } else { - if (*buff){ - val &= ~rid->mask; - if (rid->value) - val |= rid->mask & rid->value; - else val |= rid->mask & ~rid->value; - } else val &= ~rid->mask; - }; - if (rid->bits == 8) *data = val & 0xff; - if (rid->bits == 16) *((u16*)data) = val &0xffff; - if (rid->bits == 32) *((u32*)data) = val &0xffffffff; - - } - DEBUG(0x20000,"awc proc int buff %x \n",awc_int_buff); - if (rid->bits <=8 ) val = *data; - else if (rid->bits <=16 ) val = *((u16 *)data); - else if (rid->bits <=32 ) val = *((u32 *)data); - - DEBUG(0x20000,"awc proc int data %x \n",val); - -// both of them are crazy -// *lenp = sizeof(int); -// *lenp += 1; - - AWC_ENTRY_EXIT_DEBUG("exit"); - return 0; - -}; - -int awc_proc_fun(ctl_table *ctl, int write, struct file * filp, - void *buffer, size_t *lenp) -{ - int retv =-1; - struct awc_private *priv = NULL; - unsigned long flags; -// int device_number = (int ) ctl->extra1; - - struct awc_rid_dir * rid_dir; - - struct net_device * dev= NULL; - struct aironet4500_RID * rid = (struct aironet4500_RID * ) ctl->extra2; - - - AWC_ENTRY_EXIT_DEBUG("awc_proc_fun"); - - if (!write && filp) - if (filp->f_pos){ -// printk(KERN_CRIT "Oversize read\n"); - *lenp = 0;// hack against reading til eof - return 0; - } - - MOD_INC_USE_COUNT; - - rid_dir = ((struct awc_rid_dir *)ctl->extra1); - dev = rid_dir->dev; - - if (!dev){ - printk(KERN_ERR " NO device here \n"); - goto final; - } - - if(ctl->procname == NULL || awc_drive_info == NULL ){ - printk(KERN_WARNING " procname is NULL in sysctl_table or awc_mib_info is NULL \n at awc module\n "); - MOD_DEC_USE_COUNT; - return -1; - } - priv = (struct awc_private * ) dev->priv; - - if ((rid->selector->read_only || rid->read_only) && write){ - printk(KERN_ERR "This value is read-only \n"); - goto final; - }; - - if (!write && rid->selector->may_change) { - spin_lock_irqsave(&driver_lock, flags); - awc_readrid(dev,rid,rid_dir->buff + rid->offset); - spin_unlock_irqrestore(&driver_lock, flags); - }; - - if (rid->array > 1 || rid->bits > 32){ - if (write){ - retv = proc_dostring(ctl, write, filp, buffer, lenp); - if (retv) goto final; - retv = awc_proc_format_array(write, awc_proc_buff, lenp, rid_dir, rid); - if (retv) goto final; - } else { - retv = awc_proc_format_array(write, awc_proc_buff, lenp, rid_dir, rid); - if (retv) goto final; - retv = proc_dostring(ctl, write, filp, buffer, lenp); - if (retv) goto final; - } - } else { - if (write){ - retv = proc_dointvec(ctl, write, filp, buffer, lenp); - if (retv) goto final; - retv = awc_proc_format_bits(write, &awc_int_buff, lenp, rid_dir, rid); - if (retv) goto final; - } else { - retv = awc_proc_format_bits(write, &awc_int_buff, lenp,rid_dir, rid); - if (retv) goto final; - retv = proc_dointvec(ctl, write, filp, buffer, lenp); - if (retv) goto final; - } - } - if (write) { - spin_lock_irqsave(&driver_lock, flags); - - if (rid->selector->MAC_Disable_at_write){ - awc_disable_MAC(dev); - }; - awc_writerid(dev,rid,rid_dir->buff + rid->offset); - if (rid->selector->MAC_Disable_at_write){ - awc_enable_MAC(dev); - }; - spin_lock_irqsave(&driver_lock, flags); - }; - - DEBUG(0x20000,"awc proc ret %x \n",retv); - DEBUG(0x20000,"awc proc lenp %x \n",*lenp); - - MOD_DEC_USE_COUNT; - return retv; - -final: - - AWC_ENTRY_EXIT_DEBUG("exit"); - MOD_DEC_USE_COUNT; - return -1 ; -} - - -char conf_reset_result[200]; - - -ctl_table awc_exdev_table[] = { - { - .ctl_name = 0, - .maxlen = 0, - .mode = 0400, - }, - { .ctl_name = 0 } -}; -ctl_table awc_exroot_table[] = { - { - .ctl_name = 254, - .procname = "aironet4500", - .maxlen = 0, - .mode = 0555, - }, - { .ctl_name = 0 } -}; - -ctl_table awc_driver_proc_table[] = { - { - .ctl_name = 1, - .procname = "debug", - .data = &awc_debug, - .maxlen = sizeof(awc_debug), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 2, - .procname = "bap_sleep", - .data = &bap_sleep, - .maxlen = sizeof(bap_sleep), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 3, - .procname = "bap_sleep_after_setup", - .data = &bap_sleep_after_setup, - .maxlen = sizeof(bap_sleep_after_setup), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 4, - .procname = "sleep_before_command", - .data = &sleep_before_command, - .maxlen = sizeof(sleep_before_command), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 5, - .procname = "bap_sleep_before_write", - .data = &bap_sleep_before_write, - .maxlen = sizeof(bap_sleep_before_write), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 6, - .procname = "sleep_in_command", - .data = &sleep_in_command, - .maxlen = sizeof(sleep_in_command), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 7, - .procname = "both_bap_lock", - .data = &both_bap_lock, - .maxlen = sizeof(both_bap_lock), - .mode = 0600, - .proc_handler = proc_dointvec - }, - { - .ctl_name = 8, - .procname = "bap_setup_spinlock", - .data = &bap_setup_spinlock, - .maxlen = sizeof(bap_setup_spinlock), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { .ctl_name = 0 } -}; - -ctl_table awc_driver_level_ctable[] = { - { - .ctl_name = 1, - .procname = "force_rts_on_shorter", - .maxlen = sizeof(int), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 2, - .procname = "force_tx_rate", - .maxlen = sizeof(int), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 3, - .procname = "ip_tos_reliability_rts", - .maxlen = sizeof(int), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 4, - .procname = "ip_tos_troughput_no_retries", - .maxlen = sizeof(int), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 5, - .procname = "debug", - .maxlen = sizeof(int), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 6, - .procname = "simple_bridge", - .maxlen = sizeof(int), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 7, - .procname = "p802_11_send", - .maxlen = sizeof(int), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { - .ctl_name = 8, - .procname = "full_stats", - .maxlen = sizeof(int), - .mode = 0600, - .proc_handler = proc_dointvec, - }, - { .ctl_name = 0 } -}; - -ctl_table awc_root_table[] = { - { - .ctl_name = 254, - .procname = "aironet4500", - .maxlen = 0, - .mode = 0555, - .child = awc_driver_proc_table, - }, - { .ctl_name = 0 } -}; - -struct ctl_table_header * awc_driver_sysctl_header; - -const char awc_procname[]= "awc5"; - - -int awc_proc_set_device(int device_number){ - int group =0; - int rid = 0; - struct awc_private * priv; - ctl_table * tmp_table_ptr; - - AWC_ENTRY_EXIT_DEBUG("awc_proc_set_device"); - if (!aironet4500_devices[device_number] || (awc_nof_rids <=0 )) return -1 ; - priv = (struct awc_private * )aironet4500_devices[device_number]->priv; - - awc_rids_setup(aironet4500_devices[device_number]); - - memcpy(&(awc_proc_priv[device_number].proc_table_sys_root[0]), awc_exroot_table,sizeof(struct ctl_table)*2); - awc_proc_priv[device_number].proc_table_sys_root[0].ctl_name = 254 - device_number; - memcpy(awc_proc_priv[device_number].proc_table_device_root, awc_exdev_table,sizeof(awc_exdev_table) ); - awc_proc_priv[device_number].proc_table_device_root[0].ctl_name = device_number+1; - - awc_proc_priv[device_number].proc_table_sys_root->child = awc_proc_priv[device_number].proc_table_device_root; - memcpy(awc_proc_priv[device_number].proc_name,(struct NET_DEVICE * )aironet4500_devices[device_number]->name,5); - awc_proc_priv[device_number].proc_name[4]=0; - // awc_proc_priv[device_number].proc_name[3]=48+device_number; - awc_proc_priv[device_number].proc_table_device_root[0].procname = &(awc_proc_priv[device_number].proc_name[0]); - awc_proc_priv[device_number].proc_table = kmalloc(sizeof(struct ctl_table) * (awc_nof_rids+2),GFP_KERNEL); - if (!awc_proc_priv[device_number].proc_table){ - printk(KERN_CRIT "Out of memory on aironet4500_proc huge table alloc \n"); - return -1; - } - awc_proc_priv[device_number].proc_table_device_root[0].child=awc_proc_priv[device_number].proc_table; - - - if (awc_debug) printk("device %d of %d proc interface setup ",device_number, awc_nof_rids); - - - while (awc_rids[group].selector && group < awc_nof_rids){ - if (awc_debug & 0x20000) - printk(KERN_CRIT "ridgroup %s size %d \n", awc_rids[group].selector->name,awc_rids[group].size); - - awc_proc_priv[device_number].proc_table[group].ctl_name = group +1; - awc_proc_priv[device_number].proc_table[group+1].ctl_name = 0; - awc_proc_priv[device_number].proc_table[group].procname = awc_rids[group].selector->name; - awc_proc_priv[device_number].proc_table[group].data = awc_proc_buff; - awc_proc_priv[device_number].proc_table[group].maxlen = sizeof(awc_proc_buff) -1; - awc_proc_priv[device_number].proc_table[group].mode = 0600; - awc_proc_priv[device_number].proc_table[group].child = kmalloc(sizeof(struct ctl_table) * (awc_rids[group].size +2), GFP_KERNEL); - awc_proc_priv[device_number].proc_table[group].proc_handler = NULL; - awc_proc_priv[device_number].proc_table[group].strategy = NULL; - awc_proc_priv[device_number].proc_table[group].de = NULL; - awc_proc_priv[device_number].proc_table[group].extra1 = NULL; - awc_proc_priv[device_number].proc_table[group].extra2 = NULL; - if (!awc_proc_priv[device_number].proc_table[group].child) { - awc_proc_priv[device_number].proc_table[group].ctl_name = 0; - printk(KERN_CRIT "Out of memory on aironet4500_proc huge table alloc \n"); - return 0; - } - rid=0; - while (awc_rids[group].rids[rid].selector && (rid < awc_rids[group].size -1)){ - -// DEBUG(0x20000,"rid %s \n", awc_rids[group].rids[rid].name); - - awc_proc_priv[device_number].proc_table[group].child[rid].ctl_name = rid +1; - awc_proc_priv[device_number].proc_table[group].child[rid+1].ctl_name = 0; - awc_proc_priv[device_number].proc_table[group].child[rid].procname = awc_rids[group].rids[rid].name; - if (awc_rids[group].rids[rid].array > 1 || - awc_rids[group].rids[rid].bits > 32 ){ - awc_proc_priv[device_number].proc_table[group].child[rid].data = awc_proc_buff; - awc_proc_priv[device_number].proc_table[group].child[rid].maxlen = sizeof(awc_proc_buff) -1; - } else { - awc_proc_priv[device_number].proc_table[group].child[rid].data = &awc_int_buff; - awc_proc_priv[device_number].proc_table[group].child[rid].maxlen = sizeof(awc_int_buff); - - } - if ( awc_rids[group].rids[rid].read_only || - awc_rids[group].rids[rid].selector->read_only ) - awc_proc_priv[device_number].proc_table[group].child[rid].mode = 0400; - else - awc_proc_priv[device_number].proc_table[group].child[rid].mode = 0600; - awc_proc_priv[device_number].proc_table[group].child[rid].child = NULL; - awc_proc_priv[device_number].proc_table[group].child[rid].proc_handler = awc_proc_fun; - awc_proc_priv[device_number].proc_table[group].child[rid].strategy = NULL; - awc_proc_priv[device_number].proc_table[group].child[rid].de = NULL; - awc_proc_priv[device_number].proc_table[group].child[rid].extra1 = (void *) &(((struct awc_private* )aironet4500_devices[device_number]->priv)->rid_dir[group]); - awc_proc_priv[device_number].proc_table[group].child[rid].extra2 = (void *) &(awc_rids[group].rids[rid]); - - rid++; - } - - group++; - - }; -// here are driver-level params dir - awc_proc_priv[device_number].proc_table[group].ctl_name = group +1; - awc_proc_priv[device_number].proc_table[group+1].ctl_name = 0; - awc_proc_priv[device_number].proc_table[group].procname = "driver-level"; - awc_proc_priv[device_number].proc_table[group].data = awc_proc_buff; - awc_proc_priv[device_number].proc_table[group].maxlen = sizeof(awc_proc_buff) -1; - awc_proc_priv[device_number].proc_table[group].mode = 0600; - awc_proc_priv[device_number].proc_table[group].child = kmalloc(sizeof(awc_driver_level_ctable) , GFP_KERNEL); - awc_proc_priv[device_number].proc_table[group].proc_handler = NULL; - awc_proc_priv[device_number].proc_table[group].strategy = NULL; - awc_proc_priv[device_number].proc_table[group].de = NULL; - awc_proc_priv[device_number].proc_table[group].extra1 = NULL; - awc_proc_priv[device_number].proc_table[group].extra2 = NULL; - if (!awc_proc_priv[device_number].proc_table[group].child) { - awc_proc_priv[device_number].proc_table[group].ctl_name = 0; - printk(KERN_CRIT "Out of memory on aironet4500_proc huge table alloc \n"); - return 0; - } - - - tmp_table_ptr = awc_proc_priv[device_number].proc_table[group].child; - memcpy(tmp_table_ptr,awc_driver_level_ctable,sizeof(awc_driver_level_ctable)); - - - tmp_table_ptr[0].data = - &(priv->force_rts_on_shorter); - tmp_table_ptr[1].data = &priv->force_tx_rate; - tmp_table_ptr[2].data = (void *) &priv->ip_tos_reliability_rts; - tmp_table_ptr[3].data = (void *) &priv->ip_tos_troughput_no_retries; - tmp_table_ptr[4].data = (void *) &priv->debug; - tmp_table_ptr[5].data = (void *) &priv->simple_bridge; - tmp_table_ptr[6].data = (void *) &priv->p802_11_send; - tmp_table_ptr[7].data = (void *) &priv->full_stats; - - - awc_proc_priv[device_number].sysctl_header = - register_sysctl_table(awc_proc_priv[device_number].proc_table_sys_root,0); - - AWC_ENTRY_EXIT_DEBUG("exit"); - - if (awc_proc_priv[device_number].sysctl_header) - return 0; - return 1; - -}; - -int awc_proc_unset_device(int device_number){ - int k; - - AWC_ENTRY_EXIT_DEBUG("awc_proc_unset_device"); - if (awc_proc_priv[device_number].sysctl_header){ - unregister_sysctl_table(awc_proc_priv[device_number].sysctl_header); - awc_proc_priv[device_number].sysctl_header = NULL; - } - if (awc_proc_priv[device_number].proc_table){ - for (k=0; awc_proc_priv[device_number].proc_table[k].ctl_name ; k++ ){ - if (awc_proc_priv[device_number].proc_table[k].child) - kfree(awc_proc_priv[device_number].proc_table[k].child); - } - kfree(awc_proc_priv[device_number].proc_table); - awc_proc_priv[device_number].proc_table = NULL; - } - if (awc_proc_priv[device_number].proc_table_device_root[0].ctl_name) - awc_proc_priv[device_number].proc_table_device_root[0].ctl_name = 0; - if (awc_proc_priv[device_number].proc_table_sys_root[0].ctl_name) - awc_proc_priv[device_number].proc_table_sys_root[0].ctl_name = 0; - - AWC_ENTRY_EXIT_DEBUG("exit"); - return 0; -}; - -static int aironet_proc_init(void) { - int i=0; - - AWC_ENTRY_EXIT_DEBUG("init_module"); - - - for (i=0; i < MAX_AWCS; i++){ - awc_proc_set_device(i); - } - - awc_register_proc(awc_proc_set_device, awc_proc_unset_device); - - awc_driver_sysctl_header = register_sysctl_table(awc_root_table,0); - - AWC_ENTRY_EXIT_DEBUG("exit"); - return 0; - -}; - -static void aironet_proc_exit(void){ - - int i=0; - AWC_ENTRY_EXIT_DEBUG("cleanup_module"); - awc_unregister_proc(); - for (i=0; i < MAX_AWCS; i++){ - awc_proc_unset_device(i); - } - if (awc_driver_sysctl_header) - unregister_sysctl_table(awc_driver_sysctl_header); - AWC_ENTRY_EXIT_DEBUG("exit"); -}; - -module_init(aironet_proc_init); -module_exit(aironet_proc_exit); - -#else -#error awc driver needs CONFIG_PROC_FS - -#endif // whole proc system styff -MODULE_LICENSE("GPL"); diff --git a/drivers/net/aironet4500_rid.c b/drivers/net/aironet4500_rid.c deleted file mode 100644 index 6a71a26ba347..000000000000 --- a/drivers/net/aironet4500_rid.c +++ /dev/null @@ -1,2205 +0,0 @@ -/* - * Aironet 4500 Pcmcia driver - * - * Elmer Joandi, Januar 1999 - * Copyright Elmer Joandi, all rights restricted - * - * - * Revision 0.1 ,started 30.12.1998 - * - * - */ - -#include <linux/module.h> -#include <linux/kernel.h> - -#include "aironet4500.h" - - - -#define awc_RID_gen_RidLen {(const struct aironet4500_rid_selector *)&aironet4500_RID_Select_General_Config,0x0000, 8,1,1,1,0, 0xffffffff,0x0000, "Length of RID" } -#define awc_RID_gen_OperatingMode_adhoc {&aironet4500_RID_Select_General_Config,0x0002,16,1,1,0,0, 0x00000003,0x0000,"Opmode IBSS Adhoc operation" } // Without AP -#define awc_RID_gen_OperatingMode_Infrastructure {&aironet4500_RID_Select_General_Config,0x0002,16,1,1,0,0, 0x00000003,0x0001,"Opmode Infrastructure Station operation" }// With AP -#define awc_RID_gen_OperatingMode_AP {&aironet4500_RID_Select_General_Config,0x0002,16,1,1,0,0, 0x00000003,0x0002,"Opmode Access Point" } // Aironet doesn't release info on use -#define awc_RID_gen_OperatingMode_AP_and_repeater {&aironet4500_RID_Select_General_Config,0x0002,16,1,1,0,0, 0x00000003,0x0003,"Opmode Access Point and Repeater" } // no info -#define awc_RID_gen_OperatingMode_No_payload_modify {&aironet4500_RID_Select_General_Config,0x0002,16,1,1,0,0, 0x00000100,0x0100,"Opmode Payload without modify" } -#define awc_RID_gen_OperatingMode_LLC_802_3_convert {&aironet4500_RID_Select_General_Config,0x0002,16,1,1,0,0, 0x00000100,0x0000,"Opmode LLC -> 802.3 convert" } -#define awc_RID_gen_OperatingMode_proprietary_ext {&aironet4500_RID_Select_General_Config,0x0002,16,1,1,0,0, 0x00000200,0x0200,"Opmode Aironet Extentsions enabled" } // neened for 11Mbps -#define awc_RID_gen_OperatingMode_no_proprietary_ext {&aironet4500_RID_Select_General_Config,0x0002,16,1,1,0,0,0x00000200,0x0000,"Opmode Aironet Extentsions disabled" } -#define awc_RID_gen_OperatingMode_AP_ext {&aironet4500_RID_Select_General_Config,0x0002,16,1,1,0,0, 0x00000400,0x0400,"Opmode AP Extentsions enabled" } // no info -#define awc_RID_gen_OperatingMode_no_AP_ext {&aironet4500_RID_Select_General_Config,0x0002,16,1,1,0,0, 0x00000400,0x0000,"Opmode AP Extentsions disabled" } -#define awc_RID_gen_ReceiveMode {&aironet4500_RID_Select_General_Config,0x0004,16,1,1,0,0,0x0000ffff,0x0000,"RX Mode"} -#define awc_RID_gen_ReceiveMode_BMA {&aironet4500_RID_Select_General_Config,0x0004,16,1,1,0,0,0x0000000f,0x0000,"RX Mode BC MC ADDR"} -#define awc_RID_gen_ReceiveMode_BA {&aironet4500_RID_Select_General_Config,0x0004,16,1,1,0,0,0x0000000f,0x0001,"RX Mode BC ADDR"} -#define awc_RID_gen_ReceiveMode_A {&aironet4500_RID_Select_General_Config,0x0004,16,1,1,0,0,0x0000000f,0x0002,"RX Mode ADDR"} -#define awc_RID_gen_ReceiveMode_802_11_monitor {&aironet4500_RID_Select_General_Config,0x0004,16,1,1,0,0,0x0000000f,0x0003,"RX Mode 802.11 Monitor current BSSID"} -#define awc_RID_gen_ReceiveMode_802_11_any_monitor {&aironet4500_RID_Select_General_Config,0x0004,16,1,1,0,0,0x0000000f,0x0004,"RX Mode 802.11 Monitor any BSSID"} -#define awc_RID_gen_ReceiveMode_LAN_monitor {&aironet4500_RID_Select_General_Config,0x0004,16,1,1,0,0,0x0000000f,0x0005,"RX Mode LAN Monitor current BSSID"} -#define awc_RID_gen_ReceiveMode_802_3_hdr_disable {&aironet4500_RID_Select_General_Config,0x0004,16,1,1,0,0,0x00000100,0x0100,"RX Mode Disable RX 802.3 Header"} -#define awc_RID_gen_ReceiveMode_802_3_hdr_enable {&aironet4500_RID_Select_General_Config,0x0004,16,1,1,0,0,0x00000100,0x0000,"RX Mode Enable RX 802.3 header"} -#define awc_RID_gen_Fragmentation_threshold {&aironet4500_RID_Select_General_Config,0x0006,16,1,1,0,0,0x0000ffff,0x0000,"Fragmentation Threshold"} // treshold of packet size starting to be fragmented -#define awc_RID_gen_RTS_threshold {&aironet4500_RID_Select_General_Config,0x0008,16,1,1,0,0,0xffff,0x0000,"RTS Threshold"} // packet size, larger ones get sent with RTS/CTS -#define awc_RID_gen_Station_Mac_Id {&aironet4500_RID_Select_General_Config,0x000A, 8,6,1,0,0,0xff,0,"Station MAC Id"} -#define awc_RID_gen_Supported_rates {&aironet4500_RID_Select_General_Config,0x0010, 8,8,1,0,1,0xff,0x00,"Supported Rates"} // Hex encoded 500kbps -#define awc_RID_gen_Basic_Rate {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0x80,0x80,"Basic Rate"} // if 0x80 bit is set -#define awc_RID_gen_Rate_500kbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0x7f,0x01,"Rate 500kbps"} -#define awc_RID_gen_Rate_1Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0x7f,0x02,"Rate 1Mbps"} -#define awc_RID_gen_Rate_2Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0x7f,0x04,"Rate 2Mbps"} -#define awc_RID_gen_Rate_4Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0x7f,0x08,"Rate 4Mbps"} -#define awc_RID_gen_Rate_5Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0x7f,0x0B,"Rate 5.5Mbps"} -#define awc_RID_gen_Rate_10Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0x7f,0x14,"Rate 10Mbps"} -#define awc_RID_gen_Rate_11Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0x7f,0x16,"Rate 11Mbps"} -#define awc_RID_gen_BasicRate_500kbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0xff,0x81,"BasicRate 500kbps"} -#define awc_RID_gen_BasicRate_1Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0xff,0x82,"BasicRate 1Mbps"} -#define awc_RID_gen_BasicRate_2Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0xff,0x84,"BasicRate 2Mbps"} -#define awc_RID_gen_BasicRate_4Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0xff,0x88,"BasicRate 4Mbps"} -#define awc_RID_gen_BasicRate_5Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0xff,0x8B,"BasicRate 5.5Mbps"} -#define awc_RID_gen_BasicRate_10Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0xff,0x94,"BasicRate 10Mbps"} -#define awc_RID_gen_BasicRate_11Mbps {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0xff,0x96,"BasicRate 11Mbps"} - - -#define awc_RID_gen_Long_retry_limit {&aironet4500_RID_Select_General_Config,0x0018,16, 1,1,0,0,0xffff,0,"Short Retry Limit"} -#define awc_RID_gen_Short_retry_limit {&aironet4500_RID_Select_General_Config,0x001A,16, 1,1,0,0,0xffff,0,"Long Retry Limit"} -#define awc_RID_gen_Tx_MSDU_lifetime {&aironet4500_RID_Select_General_Config,0x001C,16, 1,1000,0,0,0xffff,0,"TX MSDU Lifetime"} -#define awc_RID_gen_Rx_MSDU_lifetime {&aironet4500_RID_Select_General_Config,0x001E,16, 1,1000,0,0,0xffff,0,"RX MSDU Lifetime"} -#define awc_RID_gen_Stationary {&aironet4500_RID_Select_General_Config,0x0020,16, 1,1,0,0,0xffff,0,"Stationary"} -#define awc_RID_gen_BC_MC_Ordering {&aironet4500_RID_Select_General_Config,0x0022,16, 1,1,0,0,0xffff,0,"Strictly order Bcast and Mcast"} -#define awc_RID_gen_Device_type {&aironet4500_RID_Select_General_Config,0x0024,16, 1,1,1,0,0xffff,0x00,"Radio Type"} -#define awc_RID_gen_Reserved_0x0026 {&aironet4500_RID_Select_General_Config,0x0026, 8,10,1,0,0,0xff,0,"Reserved0x28"} - - -//SCANNING/ASSOCIATING -#define awc_RID_gen_ScanMode awc_def_gen_RID(0x0030,"ScanMode", 16,0xf,0, NULL) -#define awc_RID_gen_ScanMode_Active awc_def_gen_RID(0x0030,"ScanMode Active", 16,0xf,0, "Active") -#define awc_RID_gen_ScanMode_Passive awc_def_gen_RID(0x0030,"ScanMode Passive", 16,0xf,1, "Passive") -#define awc_RID_gen_ScanMode_Aironet_ext awc_def_gen_RID(0x0030,"ScanMode Aironet Ext", 16,0xf,2, "Aironet Ext") -#define awc_RID_gen_ProbeDelay awc_def_gen_RID(0x0032,"ProbeDelay", 16,0xffff,0," msek") // Time ms to wait after switching to a channel for clear channel assessment. -#define awc_RID_gen_ProbeEnergyTimeout awc_def_gen_RID(0x0034,"ProbeEnergyTimeout", 16,0xffff,0,"msek") // Time to wait for energy after an active probe. -#define awc_RID_gen_ProbeResponseTimeout awc_def_gen_RID(0x0036,"ProbeResponseTimeout", 16,0xffff,0,"msek") // Time to wait for a probe response after energy detected. -#define awc_RID_gen_BeaconListenTimeout awc_def_gen_RID(0x0038,"BeaconListenTimeout", 16,0xffff,0,"msek") // 0 default 40 Time to listen for a beacon on each channel. -#define awc_RID_gen_IbssJoinNetTimeout awc_def_gen_RID(0x003A,"IbssJoinNetTimeout", 16,0xffff,0,"msek") // 0 default 10000 IBSS: Time to scan for an IBSS before forming a -#define awc_RID_gen_AuthenticationTimeout awc_def_gen_RID(0x003C,"AuthenticationTimeout",16,0xffff,0,"msek") // 0 default 2000 Time limit after which an authentication sequence will -#define awc_RID_gen_AuthenticationType awc_def_gen_RID(0x003E,"AuthenticationType", 16,0xffff,0,NULL) // 0 default 1 (open) // Selects the desired authentication and privacy methods. -#define awc_RID_gen_AuthenticationType_None awc_def_gen_RID(0x003E,"AuthenticationType None", 16,0xffff,0,"None") // 0x00 = None -#define awc_RID_gen_AuthenticationType_Open awc_def_gen_RID(0x003E,"AuthenticationType Open", 16,0xffff,1,"Open") // 0x01 = Open -#define awc_RID_gen_AuthenticationType_Shared awc_def_gen_RID(0x003E,"AuthenticationType Shared-Key", 16,0xffff,2,"Shared-Key") // 0x02 = Shared-Key -#define awc_RID_gen_AuthenticationType_Exclude_Open awc_def_gen_RID(0x003E,"AuthenticationType Exclude Open", 16,0xffff,4,"Exclude Open") // 0x04 = Exclude Unencrypted -#define awc_RID_gen_AssociationTimeout awc_def_gen_RID(0x0040,"AssociationTimeout", 16,0xffff,0,"msek") // 0 default 2000 ESS: Time limit after which an association sequence -#define awc_RID_gen_SpecifiedAPtimeout awc_def_gen_RID(0x0042,"SpecifiedAPtimeout", 16,0xffff,0,"msek") // 0 default 10000 0 selects the factory default [~10 sec]. -#define awc_RID_gen_OfflineScanInterval awc_def_gen_RID(0x0044,"OfflineScanInterval", 16,0xffff,0,"msek") // 0 0 0 disables offline scanning.(kus) The time period between offline scans. -#define awc_RID_gen_OfflineScanDuration awc_def_gen_RID(0x0046,"OfflineScanDuration", 16,0xffff,0,"msek") // 0 0 0 disables offline scanning. // (kus) The duration of an offline scan. -#define awc_RID_gen_LinkLossDelay awc_def_gen_RID(0x0048,"LinkLossDelay", 16,0xffff,0,"msek") // 0 0 Time to delay before reporting a loss of association -#define awc_RID_gen_MaxBeaconLostTime awc_def_gen_RID(0x004A,"MaxBeaconLostTime", 16,0xffff,0,"msek") // 0 default 500 If no beacons are received for this time period, the unit -#define awc_RID_gen_RefreshInterval awc_def_gen_RID(0x004C,"RefreshInterval", 16,0xffff,0,"msek") // 0 default 10000 At the specified interval, the station will send a refresh -//POWER SAVE OPERATION -#define awc_RID_gen_PowerSaveMode awc_def_gen_RID(0x0050,"PowerSaveMode", 16,0xffff,0,NULL) // 0 0Note, for IBSS there is only one PSP mode and it is only enabled if the ATIMwindow is non-zero. -#define awc_RID_gen_PowerSaveMode_CAM awc_def_gen_RID(0x0050,"PowerSaveMode CAM", 16,0x000f,0,"CAM") // 0 = CAM -#define awc_RID_gen_PowerSaveMode_PSP awc_def_gen_RID(0x0050,"PowerSaveMode PSP", 16,0x000f,1,"PSP") // 1 = PSP -#define awc_RID_gen_PowerSaveMode_Fast_PSP awc_def_gen_RID(0x0050,"PowerSaveMode Fast PSP", 16,0x000f,2,"Fast PSP") //2 = PSP-CAM [FASTPSP] -#define awc_RID_gen_SleepForDTIMs awc_def_gen_RID(0x0052,"SleepForDTIMs", 16,0xffff,0,"DTIMs") // 0 0If non-zero, the station may sleep through DTIMs; this -#define awc_RID_gen_ListenInterval awc_def_gen_RID(0x0054,"ListenInterval", 16,0xffff,0,"msek") // 0 default 200 kus Maximum time to awaken for TIMs. 0 selects factory -#define awc_RID_gen_FastListenInterval awc_def_gen_RID(0x0056,"FastListenInterval", 16,0xffff,0,"msek") // 0 default 100 kus The listen interval to be used immediately after -#define awc_RID_gen_ListenDecay awc_def_gen_RID(0x0058,"ListenDecay", 16,0xffff,0,"times") // 0 default 2Number of times to use the current listen interval -#define awc_RID_gen_FastListenDelay awc_def_gen_RID(0x005A,"FastListenDelay", 16,0xffff,0,"msek") // 0 default 200 kus Time interval to delay before going to fast listen -#define awc_RID_gen_Reserved0x005C awc_def_gen_RID(0x005C,"Reserved0x005C", 32,0xffffffff,0,"") // -//ADHOC (or AP) OPERATION -#define awc_RID_gen_BeaconPeriod awc_def_gen_RID(0x0060,"BeaconPeriod", 16,0xffff,0,"msek") // 0 default 100 0 selects the factory default of [~100 ms]. (kus) -#define awc_RID_gen_AtimDuration awc_def_gen_RID(0x0062,"AtimDuration", 16,0xffff,0,"msek") // 0 default 5 kus The time period reserved for ATIMs immediately after (kus) the beacon. 0xFFFF will disable the ATIM window; power save mode will not operate.This parameter only applies to adhoc/IBSS. -#define awc_RID_gen_Reserved0x0064 awc_def_gen_RID(0x0064,"Reserved64", 16,0xffff,0,"") // 0 0Reserved for future use -#define awc_RID_gen_DSChannel awc_def_gen_RID(0x0066,"DSChannel", 16,0xffff,0,"") // 0 default 1The desired operating channel. ()refer to 802.11) For North America, a Channel of 0 is 2412 MHz. -#define awc_RID_gen_Reserved0x0068 awc_def_gen_RID(0x0068,"Reserved68", 16,0xffff,0,"") // 0 0Reserved for future use -#define awc_RID_gen_DTIM_Period awc_def_gen_RID(0x006A,"DTIM Period", 16,0xffff,0,"") // 0 default 1Selects how often a beacon is a DTIM for APs -#define awc_RID_gen_Reserved0x0006C awc_def_gen_RID(0x006C,"Reserved6C", 32,0xffffffff,0,"") // 0's0's Reserved for future use -//RADIO OPERATION -#define awc_RID_gen_RadioSpreadType awc_def_gen_RID(0x0070,"RadioSpreadType", 16,0xffff,0,NULL) // 0 default 0Selects the radio operational mode. By default, this will -#define awc_RID_gen_RadioSpreadType_FH awc_def_gen_RID(0x0070,"RadioSpreadType FH", 16,0xffff,0,"FH") //0 = 802.11 FH Radio (Default) -#define awc_RID_gen_RadioSpreadType_DS awc_def_gen_RID(0x0070,"RadioSpreadType DS", 16,0xffff,1,"DS") //1 = 802.11 DS Radio -#define awc_RID_gen_RadioSpreadType_LM awc_def_gen_RID(0x0070,"RadioSpreadType LM2000", 16,0xffff,2,"LM2000") //2 = LM2000 (Legacy) DS Radio -#define awc_RID_gen_TX_antenna_Diversity awc_def_gen_RID(0x0072,"TX antenna Diversity", 16,0xff00,0,NULL) // 0 default 0x0303 This field is bit-mapped to select the operational -#define awc_RID_gen_TX_antenna_Diversity_default awc_def_gen_RID(0x0072,"TX antenna Diversity Default", 16,0xff00,0x0000,"Default") // 0 = Diversity as programmed at the factory -#define awc_RID_gen_TX_antenna_Diversity_1 awc_def_gen_RID(0x0072,"TX antenna Diversity Antenna 1", 16,0xff00,0x0100,"Antenna 1") // 1 = Antenna 1 only -#define awc_RID_gen_TX_antenna_Diversity_2 awc_def_gen_RID(0x0072,"TX antenna Diversity Antenna 2", 16,0xff00,0x0200,"Antenna 2") // 2 = Antenna 2 only -#define awc_RID_gen_TX_antenna_Diversity_both awc_def_gen_RID(0x0072,"TX antenna Diversity both antennas", 16,0xff00,0x0300,"both antennas") // 3 = Antennas 1 and 2 are active -#define awc_RID_gen_RX_antenna_Diversity awc_def_gen_RID(0x0072,"RX antenna Diversity", 16,0x00ff,0,NULL) // 0 default 0x0303 This field is bit-mapped to select the operational -#define awc_RID_gen_RX_antenna_Diversity_default awc_def_gen_RID(0x0072,"RX antenna Diversity Default", 16,0x00ff,0,"Default") // 0 = Diversity as programmed at the factory -#define awc_RID_gen_RX_antenna_Diversity_1 awc_def_gen_RID(0x0072,"RX antenna Diversity Antenna 1", 16,0x00ff,1,"Antenna 1") // 1 = Antenna 1 only -#define awc_RID_gen_RX_antenna_Diversity_2 awc_def_gen_RID(0x0072,"RX antenna Diversity Antenna 2", 16,0x00ff,2,"Antenna 2") // 2 = Antenna 2 only -#define awc_RID_gen_RX_antenna_Diversity_both awc_def_gen_RID(0x0072,"RX antenna Diversity both antennas", 16,0x00ff,3,"both antennas") // -#define awc_RID_gen_TransmitPower awc_def_gen_RID(0x0074,"TransmitPower", 16,0xffff,0,"mW (rounded up, btw)") // 0 default 250 or 0 selects the default (maximum power allowed for the -#define awc_RID_gen_RSSIthreshold awc_def_gen_RID(0x0076,"RSSIthreshold", 16,0xffff,0,"units") // 0 default 0 RSSI threshold. 0 selects factory default. -#define awc_RID_gen_Modulation awc_def_gen_RID(0x0078,"Modulation", 8,0xff,0,"") // modulation type -#define awc_RID_gen_Reserved0x0079 awc_def_gen_RID(0x0079,"Reserved0x0079", 56,0xff,0,"") // 0's0's reserved for future radio specific parameters - - -//AIRONET EXTENSIONS -#define awc_RID_gen_NodeName awc_def_gen_RID(0x0080,"NodeName", 128,0,0,"") // 0 0 Station name. -#define awc_RID_gen_ARLThreshold awc_def_gen_RID(0x0090,"ARLThreshold", 16,0xffff,0,"times") // 0 default 0xFFFF 0 selects the factory defaults. (which for now is -#define awc_RID_gen_ARLDecay awc_def_gen_RID(0x0092,"ARLDecay", 16,0xffff,0,"times") // 0 default 0xFFFF 0 selects the factory defaults. (which for now is -#define awc_RID_gen_ARLDelay awc_def_gen_RID(0x0094,"ARLDelay", 16,0xffff,0,"times") // 0 default 0xFFFF 0 selects the factory defaults. (which for now is -#define awc_RID_gen_Unused0x0096 awc_def_gen_RID(0x0096,"Reserved0x96", 16,0xffff,0,"") // -#define awc_RID_gen_MagicPacketAction awc_def_gen_RID(0x0098,"MagicPacketAction", 8,0xff,0," hell knows what") // 0 0 0 selects no action to be taken on a magic packet and" -#define awc_RID_gen_MagicPacketControl awc_def_gen_RID(0x0099,"MagicPacketControl", 8,0xff,0," hell know what") // 0 0 0 will disable the magic packet mode command" - - -#define awc_RID_act_RidLen {&aironet4500_RID_Select_Active_Config,0x0000, 8,1,1,1,0, 0xffffffff,0x0000, "Length of RID" } -#define awc_RID_act_OperatingMode_adhoc {&aironet4500_RID_Select_Active_Config,0x0002,16,1,1,0,0, 0x00000003,0x0000,"Opmode IBSS Adhoc operation" } -#define awc_RID_act_OperatingMode_Infrastructure {&aironet4500_RID_Select_Active_Config,0x0002,16,1,1,0,0, 0x00000003,0x0001,"Opmode Infrastructure Station operation" } -#define awc_RID_act_OperatingMode_AP {&aironet4500_RID_Select_Active_Config,0x0002,16,1,1,0,0, 0x00000003,0x0002,"Opmode Access Point" } -#define awc_RID_act_OperatingMode_AP_and_repeater {&aironet4500_RID_Select_Active_Config,0x0002,16,1,1,0,0, 0x00000003,0x0003,"Opmode Access Point and Repeater" } -#define awc_RID_act_OperatingMode_No_payload_modify {&aironet4500_RID_Select_Active_Config,0x0002,16,1,1,0,0, 0x00000100,0x0100,"Opmode Payload without modify" } -#define awc_RID_act_OperatingMode_LLC_802_3_convert {&aironet4500_RID_Select_Active_Config,0x0002,16,1,1,0,0, 0x00000100,0x0000,"Opmode LLC -> 802.3 convert" } -#define awc_RID_act_OperatingMode_proprietary_ext {&aironet4500_RID_Select_Active_Config,0x0002,16,1,1,0,0, 0x00000200,0x0200,"Opmode Aironet Extentsions enabled" } -#define awc_RID_act_OperatingMode_no_proprietary_ext {&aironet4500_RID_Select_Active_Config,0x0002,16,1,1,0,0,0x00000200,0x0000,"Opmode Aironet Extentsions disabled" } -#define awc_RID_act_OperatingMode_AP_ext {&aironet4500_RID_Select_Active_Config,0x0002,16,1,1,0,0, 0x00000400,0x0400,"Opmode AP Extentsions enabled" } -#define awc_RID_act_OperatingMode_no_AP_ext {&aironet4500_RID_Select_Active_Config,0x0002,16,1,1,0,0, 0x00000400,0x0000,"Opmode AP Extentsions disabled" } -#define awc_RID_act_ReceiveMode {&aironet4500_RID_Select_Active_Config,0x0004,16,1,1,0,0,0xffffffff,0x0000,"RX Mode"} -#define awc_RID_act_ReceiveMode_BMA {&aironet4500_RID_Select_Active_Config,0x0004,16,1,1,0,0,0x0000000f,0x0000,"RX Mode BC MC ADDR"} -#define awc_RID_act_ReceiveMode_BA {&aironet4500_RID_Select_Active_Config,0x0004,16,1,1,0,0,0x0000000f,0x0001,"RX Mode BC ADDR"} -#define awc_RID_act_ReceiveMode_A {&aironet4500_RID_Select_Active_Config,0x0004,16,1,1,0,0,0x0000000f,0x0002,"RX Mode ADDR"} -#define awc_RID_act_ReceiveMode_802_11_monitor {&aironet4500_RID_Select_Active_Config,0x0004,16,1,1,0,0,0x0000000f,0x0003,"RX Mode 802.11 Monitor current BSSID"} -#define awc_RID_act_ReceiveMode_802_11_any_monitor {&aironet4500_RID_Select_Active_Config,0x0004,16,1,1,0,0,0x0000000f,0x0004,"RX Mode 802.11 Monitor any BSSID"} -#define awc_RID_act_ReceiveMode_LAN_monitor {&aironet4500_RID_Select_Active_Config,0x0004,16,1,1,0,0,0x0000000f,0x0005,"RX Mode LAN Monitor current BSSID"} -#define awc_RID_act_ReceiveMode_802_3_hdr_disable {&aironet4500_RID_Select_Active_Config,0x0004,16,1,1,0,0,0x00000100,0x0100,"RX Mode Disable RX 802.3 Header"} -#define awc_RID_act_ReceiveMode_802_3_hdr_enable {&aironet4500_RID_Select_Active_Config,0x0004,16,1,1,0,0,0x00000100,0x0000,"RX Mode Enable RX 802.3 header"} -#define awc_RID_act_Fragmentation_threshold {&aironet4500_RID_Select_Active_Config,0x0006,16,1,1,0,0,0x0000ffff,0x0000,"Fragmentation Threshold"} -#define awc_RID_act_RTS_threshold {&aironet4500_RID_Select_Active_Config,0x0008,16,1,1,0,0,0xffff,0x0000,"RTS Threshold"} -#define awc_RID_act_Station_Mac_Id {&aironet4500_RID_Select_Active_Config,0x000A, 8,6,1,0,0,0xff,0,"Station MAC Id"} -#define awc_RID_act_Supported_rates {&aironet4500_RID_Select_Active_Config,0x0010, 8,8,1,0,1,0xff,0x00,"Supported Rates"} -#define awc_RID_act_Basic_Rate {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0x80,0x80,"Basic Rate"} -#define awc_RID_act_Rate_500kbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0x7f,0x01,"Rate 500kbps"} -#define awc_RID_act_Rate_1Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0x7f,0x02,"Rate 1Mbps"} -#define awc_RID_act_Rate_2Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0x7f,0x04,"Rate 2Mbps"} -#define awc_RID_act_Rate_4Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0x7f,0x08,"Rate 4Mbps"} -#define awc_RID_act_Rate_5Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0x7f,0x0B,"Rate 5.5Mbps"} -#define awc_RID_act_Rate_10Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0x7f,0x14,"Rate 10Mbps"} -#define awc_RID_act_Rate_11Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0x7f,0x16,"Rate 11Mbps"} -#define awc_RID_act_BasicRate_500kbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0xff,0x81,"BasicRate 500kbps"} -#define awc_RID_act_BasicRate_1Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0xff,0x82,"BasicRate 1Mbps"} -#define awc_RID_act_BasicRate_2Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0xff,0x84,"BasicRate 2Mbps"} -#define awc_RID_act_BasicRate_4Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0xff,0x88,"BasicRate 4Mbps"} -#define awc_RID_act_BasicRate_5Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0xff,0x8B,"BasicRate 5.5Mbps"} -#define awc_RID_act_BasicRate_10Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0xff,0x94,"BasicRate 10Mbps"} -#define awc_RID_act_BasicRate_11Mbps {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0xff,0x96,"BasicRate 11Mbps"} - - -#define awc_RID_act_Long_retry_limit {&aironet4500_RID_Select_Active_Config,0x0018,16, 1,1,0,0,0xffff,0,"Short Retry Limit"} -#define awc_RID_act_Short_retry_limit {&aironet4500_RID_Select_Active_Config,0x001A,16, 1,1,0,0,0xffff,0,"Long Retry Limit"} -#define awc_RID_act_Tx_MSDU_lifetime {&aironet4500_RID_Select_Active_Config,0x001C,16, 1,1000,0,0,0xffff,0,"TX MSDU Lifetime"} -#define awc_RID_act_Rx_MSDU_lifetime {&aironet4500_RID_Select_Active_Config,0x001E,16, 1,1000,0,0,0xffff,0,"RX MSDU Lifetime"} -#define awc_RID_act_Stationary {&aironet4500_RID_Select_Active_Config,0x0020,16, 1,1,0,0,0xffff,0,"Stationary"} -#define awc_RID_act_BC_MC_Ordering {&aironet4500_RID_Select_Active_Config,0x0022,16, 1,1,0,0,0xffff,0,"Strictly order Bcast and Mcast"} -#define awc_RID_act_Device_type {&aironet4500_RID_Select_Active_Config,0x0024,16, 1,1,1,0,0xffff,0x0065,"Radio Type PC4500"} -#define awc_RID_act_Reserved_0x0026 {&aironet4500_RID_Select_Active_Config,0x0026, 8,10,1,0,0,0xff,0,"Reserved0x28"} - - -//SCANNING/ASSOCIATING -#define awc_RID_act_ScanMode awc_def_act_RID(0x0030,"ScanMode", 16,0xf,0, NULL) -#define awc_RID_act_ScanMode_Active awc_def_act_RID(0x0030,"ScanMode Active", 16,0xf,0, "Active") -#define awc_RID_act_ScanMode_Passive awc_def_act_RID(0x0030,"ScanMode Passive", 16,0xf,1, "Passive") -#define awc_RID_act_ScanMode_Aironet_ext awc_def_act_RID(0x0030,"ScanMode Aironet Ext", 16,0xf,2, "Aironet Ext") -#define awc_RID_act_ProbeDelay awc_def_act_RID(0x0032,"ProbeDelay", 16,0xffff,0," msek") // Time ms to wait after switching to a channel for clear channel assessment. -#define awc_RID_act_ProbeEnergyTimeout awc_def_act_RID(0x0034,"ProbeEnergyTimeout", 16,0xffff,0,"msek") // Time to wait for energy after an active probe. -#define awc_RID_act_ProbeResponseTimeout awc_def_act_RID(0x0036,"ProbeResponseTimeout", 16,0xffff,0,"msek") // Time to wait for a probe response after energy detected. -#define awc_RID_act_BeaconListenTimeout awc_def_act_RID(0x0038,"BeaconListenTimeout", 16,0xffff,0,"msek") // 0 default 40 Time to listen for a beacon on each channel. -#define awc_RID_act_IbssJoinNetTimeout awc_def_act_RID(0x003A,"IbssJoinNetTimeout", 16,0xffff,0,"msek") // 0 default 10000 IBSS: Time to scan for an IBSS before forming a -#define awc_RID_act_AuthenticationTimeout awc_def_act_RID(0x003C,"AuthenticationTimeout",16,0xffff,0,"msek") // 0 default 2000 Time limit after which an authentication sequence will -#define awc_RID_act_AuthenticationType awc_def_act_RID(0x003E,"AuthenticationType", 16,0xffff,0,NULL) // 0 default 1 (open) // Selects the desired authentication and privacy methods. -#define awc_RID_act_AuthenticationType_None awc_def_act_RID(0x003E,"AuthenticationType None", 16,0xffff,0,"None") // 0x00 = None -#define awc_RID_act_AuthenticationType_Open awc_def_act_RID(0x003E,"AuthenticationType Open", 16,0xffff,1,"Open") // 0x01 = Open -#define awc_RID_act_AuthenticationType_Shared awc_def_act_RID(0x003E,"AuthenticationType Shared-Key", 16,0xffff,2,"Shared-Key") // 0x02 = Shared-Key -#define awc_RID_act_AuthenticationType_Exclude_Open awc_def_act_RID(0x003E,"AuthenticationType Exclude Open", 16,0xffff,4,"Exclude Open") // 0x04 = Exclude Unencrypted -#define awc_RID_act_AssociationTimeout awc_def_act_RID(0x0040,"AssociationTimeout", 16,0xffff,0,"msek") // 0 default 2000 ESS: Time limit after which an association sequence -#define awc_RID_act_SpecifiedAPtimeout awc_def_act_RID(0x0042,"SpecifiedAPtimeout", 16,0xffff,0,"msek") // 0 default 10000 0 selects the factory default [~10 sec]. -#define awc_RID_act_OfflineScanInterval awc_def_act_RID(0x0044,"OfflineScanInterval", 16,0xffff,0,"msek") // 0 0 0 disables offline scanning.(kus) The time period between offline scans. -#define awc_RID_act_OfflineScanDuration awc_def_act_RID(0x0046,"OfflineScanDuration", 16,0xffff,0,"msek") // 0 0 0 disables offline scanning. // (kus) The duration of an offline scan. -#define awc_RID_act_LinkLossDelay awc_def_act_RID(0x0048,"LinkLossDelay", 16,0xffff,0,"msek") // 0 0 Time to delay before reporting a loss of association -#define awc_RID_act_MaxBeaconLostTime awc_def_act_RID(0x004A,"MaxBeaconLostTime", 16,0xffff,0,"msek") // 0 default 500 If no beacons are received for this time period, the unit -#define awc_RID_act_RefreshInterval awc_def_act_RID(0x004C,"RefreshInterval", 16,0xffff,0,"msek") // 0 default 10000 At the specified interval, the station will send a refresh -//POWER SAVE OPERATION -#define awc_RID_act_PowerSaveMode awc_def_act_RID(0x0050,"PowerSaveMode", 16,0xffff,0,NULL) // 0 0Note, for IBSS there is only one PSP mode and it is only enabled if the ATIMwindow is non-zero. -#define awc_RID_act_PowerSaveMode_CAM awc_def_act_RID(0x0050,"PowerSaveMode CAM", 16,0x000f,0,"CAM") // 0 = CAM -#define awc_RID_act_PowerSaveMode_PSP awc_def_act_RID(0x0050,"PowerSaveMode PSP", 16,0x000f,1,"PSP") // 1 = PSP -#define awc_RID_act_PowerSaveMode_Fast_PSP awc_def_act_RID(0x0050,"PowerSaveMode Fast PSP", 16,0x000f,2,"Fast PSP") //2 = PSP-CAM [FASTPSP] -#define awc_RID_act_SleepForDTIMs awc_def_act_RID(0x0052,"SleepForDTIMs", 16,0xffff,0,"DTIMs") // 0 0If non-zero, the station may sleep through DTIMs; this -#define awc_RID_act_ListenInterval awc_def_act_RID(0x0054,"ListenInterval", 16,0xffff,0,"msek") // 0 default 200 kus Maximum time to awaken for TIMs. 0 selects factory -#define awc_RID_act_FastListenInterval awc_def_act_RID(0x0056,"FastListenInterval", 16,0xffff,0,"msek") // 0 default 100 kus The listen interval to be used immediately after -#define awc_RID_act_ListenDecay awc_def_act_RID(0x0058,"ListenDecay", 16,0xffff,0,"times") // 0 default 2Number of times to use the current listen interval -#define awc_RID_act_FastListenDelay awc_def_act_RID(0x005A,"FastListenDelay", 16,0xffff,0,"msek") // 0 default 200 kus Time interval to delay before going to fast listen -#define awc_RID_act_Reserved0x005C awc_def_act_RID(0x005C,"Reserved0x005C", 32,0,0,"") // -//ADHOC (or AP) OPERATION -#define awc_RID_act_BeaconPeriod awc_def_act_RID(0x0060,"BeaconPeriod", 16,0xffff,0,"msek") // 0 default 100 0 selects the factory default of [~100 ms]. (kus) -#define awc_RID_act_AtimDuration awc_def_act_RID(0x0062,"AtimDuration", 16,0xffff,0,"msek") // 0 default 5 kus The time period reserved for ATIMs immediately after (kus) the beacon. 0xFFFF will disable the ATIM window; power save mode will not operate.This parameter only applies to adhoc/IBSS. -#define awc_RID_act_Reserved0x0064 awc_def_act_RID(0x0064,"Reserved64", 16,0xffff,0,"") // 0 0Reserved for future use -#define awc_RID_act_DSChannel awc_def_act_RID(0x0066,"DSChannel", 16,0xffff,0,"") // 0 default 1The desired operating channel. ()refer to 802.11) For North America, a Channel of 0 is 2412 MHz. -#define awc_RID_act_Reserved0x0068 awc_def_act_RID(0x0068,"Reserved68", 16,0xffff,0,"") // 0 0Reserved for future use -#define awc_RID_act_DTIM_Period awc_def_act_RID(0x006A,"DTIM Period", 16,0xffff,0,"") // 0 default 1Selects how often a beacon is a DTIM for APs -#define awc_RID_act_Reserved0x0006C awc_def_act_RID(0x006C,"Reserved6C", 32,0xffffffff,0,"") // 0's0's Reserved for future use -//RADIO OPERATION -#define awc_RID_act_RadioSpreadType awc_def_act_RID(0x0070,"RadioSpreadType", 16,0xffff,0,NULL) // 0 default 0Selects the radio operational mode. By default, this will -#define awc_RID_act_RadioSpreadType_FH awc_def_act_RID(0x0070,"RadioSpreadType FH", 16,0xffff,0,"FH") //0 = 802.11 FH Radio (Default) -#define awc_RID_act_RadioSpreadType_DS awc_def_act_RID(0x0070,"RadioSpreadType DS", 16,0xffff,1,"DS") //1 = 802.11 DS Radio -#define awc_RID_act_RadioSpreadType_LM awc_def_act_RID(0x0070,"RadioSpreadType LM2000", 16,0xffff,2,"LM2000") //2 = LM2000 (Legacy) DS Radio -#define awc_RID_act_TX_antenna_Diversity awc_def_act_RID(0x0072,"TX antenna Diversity", 16,0xff00,0,NULL) // 0 default 0x0303 This field is bit-mapped to select the operational -#define awc_RID_act_TX_antenna_Diversity_default awc_def_act_RID(0x0072,"TX antenna Diversity Default", 16,0xff00,0x0000,"Default") // 0 = Diversity as programmed at the factory -#define awc_RID_act_TX_antenna_Diversity_1 awc_def_act_RID(0x0072,"TX antenna Diversity Antenna 1", 16,0xff00,0x0100,"Antenna 1") // 1 = Antenna 1 only -#define awc_RID_act_TX_antenna_Diversity_2 awc_def_act_RID(0x0072,"TX antenna Diversity Antenna 2", 16,0xff00,0x0200,"Antenna 2") // 2 = Antenna 2 only -#define awc_RID_act_TX_antenna_Diversity_both awc_def_act_RID(0x0072,"TX antenna Diversity both antennas", 16,0xff00,0x0300,"both antennas") // 3 = Antennas 1 and 2 are active -#define awc_RID_act_RX_antenna_Diversity awc_def_act_RID(0x0072,"RX antenna Diversity", 16,0x00ff,0,NULL) // 0 default 0x0303 This field is bit-mapped to select the operational -#define awc_RID_act_RX_antenna_Diversity_default awc_def_act_RID(0x0072,"RX antenna Diversity Default", 16,0x00ff,0,"Default") // 0 = Diversity as programmed at the factory -#define awc_RID_act_RX_antenna_Diversity_1 awc_def_act_RID(0x0072,"RX antenna Diversity Antenna 1", 16,0x00ff,1,"Antenna 1") // 1 = Antenna 1 only -#define awc_RID_act_RX_antenna_Diversity_2 awc_def_act_RID(0x0072,"RX antenna Diversity Antenna 2", 16,0x00ff,2,"Antenna 2") // 2 = Antenna 2 only -#define awc_RID_act_RX_antenna_Diversity_both awc_def_act_RID(0x0072,"RX antenna Diversity both antennas", 16,0x00ff,3,"both antennas") // -#define awc_RID_act_TransmitPower awc_def_act_RID(0x0074,"TransmitPower", 16,0xffff,0,"mW (rounded up, btw)") // 0 default 250 or 0 selects the default (maximum power allowed for the -#define awc_RID_act_RSSIthreshold awc_def_act_RID(0x0076,"RSSIthreshold", 16,0xffff,0,"units") // 0 default 0 RSSI threshold. 0 selects factory default. -#define awc_RID_act_Reserved0x0078 awc_def_act_RID(0x0078,"Reserved0x0078", 64,0,0,"") // 0's0's reserved for future radio specific parameters -#define awc_RID_act_Modulation awc_def_act_RID(0x0078,"Modulation", 8,0xff,0,"") // modulation type -#define awc_RID_act_Reserved0x0079 awc_def_act_RID(0x0079,"Reserved0x0079", 56,0xff,0,"") // 0's0's reserved for future radio specific parameters - -//AIRONET EXTENSIONS -#define awc_RID_act_NodeName awc_def_act_RID(0x0080,"NodeName", 128,0,0,"") // 0 0 Station name. -#define awc_RID_act_ARLThreshold awc_def_act_RID(0x0090,"ARLThreshold", 16,0xffff,0,"times") // 0 default 0xFFFF 0 selects the factory defaults. (which for now is -#define awc_RID_act_ARLDecay awc_def_act_RID(0x0092,"ARLDecay", 16,0xffff,0,"times") // 0 default 0xFFFF 0 selects the factory defaults. (which for now is -#define awc_RID_act_ARLDelay awc_def_act_RID(0x0094,"ARLDelay", 16,0xffff,0,"times") // 0 default 0xFFFF 0 selects the factory defaults. (which for now is -#define awc_RID_act_Unused0x0096 awc_def_act_RID(0x0096,"Reserved0x96", 16,0xffff,0,"") // -#define awc_RID_act_MagicPacketAction awc_def_act_RID(0x0098,"MagicPacketAction", 8,0xff,0," hell knows what") // 0 0 0 selects no action to be taken on a magic packet and" -#define awc_RID_act_MagicPacketControl awc_def_act_RID(0x0099,"MagicPacketControl", 8,0xff,0," hell know what") // 0 0 0 will disable the magic packet mode command" - - - -// *************************** SSID RID - - - -#define awc_RID_SSID_RidLen awc_def_SSID_RID(0x0000,"RidLen", 16,0xffff,0,"") //RidLen ",16,0xffff,,"") // read-only Length of this RID including the length field 0x68 -#define awc_RID_SSID_Accept_any awc_def_SSID_RID(0x0002,"Accept Any SSID", 16,0xffff,0,"Accept ANY SSID") // -#define awc_RID_SSIDlen1 awc_def_SSID_RID(0x0002,"SSIDlen1", 16,0xffff,0,"") // 7 The length of the SSID1 byte string. -#define awc_RID_SSID1 awc_def_SSID_RID(0x0004,"SSID1", 255,0,0,"") // "tsunami" The identifier uniquely identifying the wireless system. -#define awc_RID_SSIDlen2 awc_def_SSID_RID(0x0024,"SSIDlen2", 16,0xffff,0,"") // 0 The length of the SSID2 byte string. -#define awc_RID_SSID2 awc_def_SSID_RID(0x0026,"SSID2", 255,0,0,"") // -#define awc_RID_SSIDlen3 awc_def_SSID_RID(0x0046,"SSIDlen3", 16,0xffff,0,"") // 0 The length of the SSID3 byte string. -#define awc_RID_SSID3 awc_def_SSID_RID(0x0048,"SSID3", 255,0,0,"") // -#define awc_RID_SSID1hex awc_def_SSID_RID(0x0004,"SSID1hex", 255,0xff,0,"") -#define awc_RID_SSID2hex awc_def_SSID_RID(0x0026,"SSID2hex", 255,0xff,0,"") -#define awc_RID_SSID3hex awc_def_SSID_RID(0x0048,"SSID3hex", 255,0xff,0,"") - -// AP list - -#define awc_RID_AP_List_RidLen awc_def_AP_List_RID(0x0000,"RidLen", 16,0xffff,0,"") // read-only Length of this RID including the length field -#define awc_RID_AP_List_SpecifiedAP1 awc_def_AP_List_RID(0x0002,"SpecifiedAP1", 48,0xff,0,"") // 0 Specifies the MAC address of an access point to attempt to associate to first, before looking for other Access Points -#define awc_RID_AP_List_SpecifiedAP2 awc_def_AP_List_RID(0x0008,"SpecifiedAP2", 48,0xff,0,"") // 0 Allows for a secondary AP to associate to if the radio cannot associate to the primary AP. -#define awc_RID_AP_List_SpecifiedAP3 awc_def_AP_List_RID(0x000E,"SpecifiedAP3", 48,0xff,0,"") // 0 Allows for a third option when specifying a list of APs. -#define awc_RID_AP_List_SpecifiedAP4 awc_def_AP_List_RID(0x0014,"SpecifiedAP4", 48,0xff,0,"") // 0 Allows for a fourth option when specifying a list of APs. - -// Driver Name - -#define awc_RID_Dname_RidLen awc_def_Dname_RID(0x0000,"RidLen", 16,0xffff,0,"") // read-only Length of this RID including the length field -#define awc_RID_Dname_DriverName awc_def_Dname_RID(0x0002,"DriverName", 128,0,0,"") // The driver name and version can be written here for debugging support - - -// Encapsulation Transformations RID - -#define awc_RID_Enc_RidLen awc_def_Enc_RID(0x0000,"RidLen", 16,0xffff,0,"") // read-only Length of this RID including the length field -#define awc_RID_Enc_EtherType1 awc_def_Enc_RID(0x0002,"EtherType1", 16,0xffff,0,"") // 0 Note, the ethertype values are in network transmission order. So IP (0x800) is actually (0x0008). Zero ends the list and selects the default action. -#define awc_RID_Enc_Action_RX_1 awc_def_Enc_RID(0x0004,"RX Action 1", 16,0x0001,0,NULL) // 0 This field is bit encoded as follows: -#define awc_RID_Enc_Action_RX_1_RFC_1042 awc_def_Enc_RID(0x0004,"RX Action 1", 16,0x0001,1,"RX RFC1042") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_RX_1_802_11 awc_def_Enc_RID(0x0004,"RX Action 1", 16,0x0001,0,"RX 802.11") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_TX_1 awc_def_Enc_RID(0x0004,"TX Action 1", 16,0x0002,0,NULL) // -#define awc_RID_Enc_Action_TX_1_RFC_1042 awc_def_Enc_RID(0x0004,"TX Action 1", 16,0x0002,1,"TX 802.11" ) // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_Action_TX_1_802_11 awc_def_Enc_RID(0x0004,"Tx Action 1", 16,0x0002,0,"TX RFC1042") // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_EtherType2 awc_def_Enc_RID(0x0006,"EtherType2", 16,0xffff,0,"") // 0 Note, the ethertype values are in network transmission order. So IP (0x800) is actually (0x0008). Zero ends the list and selects the default action. -#define awc_RID_Enc_Action_RX_2 awc_def_Enc_RID(0x0008,"RX Action 2", 16,0x0001,0,NULL) // 0 This field is bit encoded as follows: -#define awc_RID_Enc_Action_RX_2_RFC_1042 awc_def_Enc_RID(0x0008,"RX Action 2", 16,0x0001,1,"RX RFC1042") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_RX_2_802_11 awc_def_Enc_RID(0x0008,"RX Action 2", 16,0x0001,0,"RX 802.11") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_TX_2 awc_def_Enc_RID(0x0008,"TX Action 2", 16,0x0002,0,NULL) // -#define awc_RID_Enc_Action_TX_2_RFC_1042 awc_def_Enc_RID(0x0008,"TX Action 2", 16,0x0002,1,"TX 802.11" ) // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_Action_TX_2_802_11 awc_def_Enc_RID(0x0008,"Tx Action 2", 16,0x0002,0,"TX RFC1042") // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_EtherType3 awc_def_Enc_RID(0x000A,"EtherType3", 16,0xffff,0,"") // 0 Note, the ethertype values are in network transmission order. So IP (0x800) is actually (0x0008). Zero ends the list and selects the default action. -#define awc_RID_Enc_Action_RX_3 awc_def_Enc_RID(0x000C,"RX Action 3", 16,0x0001,0,NULL) // 0 This field is bit encoded as follows: -#define awc_RID_Enc_Action_RX_3_RFC_1042 awc_def_Enc_RID(0x000C,"RX Action 3", 16,0x0001,1,"RX RFC1042") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_RX_3_802_11 awc_def_Enc_RID(0x000C,"RX Action 3", 16,0x0001,0,"RX 802.11") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_TX_3_ awc_def_Enc_RID(0x000C,"TX Action 3", 16,0x0002,0,NULL) // -#define awc_RID_Enc_Action_TX_3_RFC_1042 awc_def_Enc_RID(0x000C,"TX Action 3", 16,0x0002,1,"TX 802.11" ) // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_Action_TX_3_802_11 awc_def_Enc_RID(0x000C,"Tx Action 3", 16,0x0002,0,"TX RFC1042") // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_EtherType4 awc_def_Enc_RID(0x000E,"EtherType4", 16,0xffff,0,"") // 0 Note, the ethertype values are in network transmission order. So IP (0x800) is actually (0x0008). Zero ends the list and selects the default action. -#define awc_RID_Enc_Action_RX_4 awc_def_Enc_RID(0x0010,"RX Action 4", 16,0x0001,0,NULL) // 0 This field is bit encoded as follows: -#define awc_RID_Enc_Action_RX_4_RFC_1042 awc_def_Enc_RID(0x0010,"RX Action 4", 16,0x0001,1,"RX RFC1042") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_RX_4_802_11 awc_def_Enc_RID(0x0010,"RX Action 4", 16,0x0001,0,"RX 802.11") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_TX_4 awc_def_Enc_RID(0x0010,"TX Action 4", 16,0x0002,0,NULL) // -#define awc_RID_Enc_Action_TX_4_RFC_1042 awc_def_Enc_RID(0x0010,"TX Action 4", 16,0x0002,1,"TX 802.11" ) // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_Action_TX_4_802_11 awc_def_Enc_RID(0x0010,"Tx Action 4", 16,0x0002,0,"TX RFC1042") // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_EtherType5 awc_def_Enc_RID(0x0012,"EtherType5", 16,0xffff,0,"") // 0 Note, the ethertype values are in network transmission order. So IP (0x800) is actually (0x0008). Zero ends the list and selects the default action. -#define awc_RID_Enc_Action_RX_5 awc_def_Enc_RID(0x0014,"RX Action 5", 16,0x0001,0,NULL) // 0 This field is bit encoded as follows: -#define awc_RID_Enc_Action_RX_5_RFC_1042 awc_def_Enc_RID(0x0014,"RX Action 5", 16,0x0001,1,"RX RFC1042") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_RX_5_802_11 awc_def_Enc_RID(0x0014,"RX Action 5", 16,0x0001,0,"RX 802.11") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_TX_5 awc_def_Enc_RID(0x0014,"TX Action 5", 16,0x0002,0,NULL) // -#define awc_RID_Enc_Action_TX_5_RFC_1042 awc_def_Enc_RID(0x0014,"TX Action 5", 16,0x0002,1,"TX 802.11" ) // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_Action_TX_5_802_11 awc_def_Enc_RID(0x0014,"Tx Action 5", 16,0x0002,0,"TX RFC1042") // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_EtherType6 awc_def_Enc_RID(0x0016,"EtherType6", 16,0xffff,0,"") // 0 Note, the ethertype values are in network transmission order. So IP (0x800) is actually (0x0008). Zero ends the list and selects the default action. -#define awc_RID_Enc_Action_RX_6 awc_def_Enc_RID(0x0018,"RX Action 6", 16,0x0001,0,NULL) // 0 This field is bit encoded as follows: -#define awc_RID_Enc_Action_RX_6_RFC_1042 awc_def_Enc_RID(0x0018,"RX Action 6", 16,0x0001,1,"RX RFC1042") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_RX_6_802_11 awc_def_Enc_RID(0x0018,"RX Action 6", 16,0x0001,0,"RX 802.11") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_TX_6 awc_def_Enc_RID(0x0018,"TX Action 6", 16,0x0002,0,NULL) // -#define awc_RID_Enc_Action_TX_6_RFC_1042 awc_def_Enc_RID(0x0018,"TX Action 6", 16,0x0002,1,"TX 802.11" ) // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_Action_TX_6_802_11 awc_def_Enc_RID(0x0018,"Tx Action 6", 16,0x0002,0,"TX RFC1042") // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_EtherType7 awc_def_Enc_RID(0x001A,"EtherType7", 16,0xffff,0,"") // 0 Note, the ethertype values are in network transmission order. So IP (0x800) is actually (0x0008). Zero ends the list and selects the default action. -#define awc_RID_Enc_Action_RX_7 awc_def_Enc_RID(0x001C,"RX Action 8", 16,0x0001,0,NULL) // 0 This field is bit encoded as follows: -#define awc_RID_Enc_Action_RX_7_RFC_1042 awc_def_Enc_RID(0x001C,"RX Action 7", 16,0x0001,1,"RX RFC1042") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_RX_7_802_11 awc_def_Enc_RID(0x001C,"RX Action 7", 16,0x0001,0,"RX 802.11") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_TX_7 awc_def_Enc_RID(0x001C,"TX Action 7", 16,0x0002,0,NULL) // -#define awc_RID_Enc_Action_TX_7_RFC_1042 awc_def_Enc_RID(0x001C,"TX Action 7", 16,0x0002,1,"TX 802.11" ) // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_Action_TX_7_802_11 awc_def_Enc_RID(0x001C,"Tx Action 7", 16,0x0002,0,"TX RFC1042") // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_EtherType8 awc_def_Enc_RID(0x001E,"EtherType7", 16,0xffff,0,"") // 0 Note, the ethertype values are in network transmission order. So IP (0x800) is actually (0x0008). Zero ends the list and selects the default action. -#define awc_RID_Enc_Action_RX_8 awc_def_Enc_RID(0x0020,"RX Action 8", 16,0x0001,0,NULL) // 0 This field is bit encoded as follows: -#define awc_RID_Enc_Action_RX_8_RFC_1042 awc_def_Enc_RID(0x0020,"RX Action 8", 16,0x0001,1,"RX RFC1042") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_RX_8_802_11 awc_def_Enc_RID(0x0020,"RX Action 8", 16,0x0001,0,"RX 802.11") // bit 0 (0x0001) 1=RFC1042 is kept for receive packets. -#define awc_RID_Enc_Action_TX_8 awc_def_Enc_RID(0x0020,"TX Action 8", 16,0x0002,0,NULL) // -#define awc_RID_Enc_Action_TX_8_RFC_1042 awc_def_Enc_RID(0x0020,"TX Action 8", 16,0x0002,1,"TX 802.11" ) // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. -#define awc_RID_Enc_Action_TX_8_802_11 awc_def_Enc_RID(0x0020,"Tx Action 8", 16,0x0002,0,"TX RFC1042") // bit 1 (0x0002) 0=RFC1042 is used for transmit encapsulation. 1=802.1H is used for transmit encapsulation. - - -// WEP Key volatile -#define awc_RID_WEPv_RidLen awc_def_WEPv_RID(0x0000,"RidLen", 16,0xffff,0,"") // read-only Length of this RID including the length field -#define awc_RID_WEPv_KeyIndex awc_def_WEPv_RID(0x0002,"KeyIndex", 16,0xffff,0,"Index to list of keys") -#define awc_RID_WEPv_Address awc_def_WEPv_RID(0x0004,"Address", 48,0xff,0,"mac address related to keys") -#define awc_RID_WEPv_KeyLen awc_def_WEPv_RID(0x000A,"KeyLen", 16,0xffff,0,"Key Length (0 and 5 are valid)") -#define awc_RID_WEPv_Key awc_def_WEPv_RID(0x000C,"Key", 128,0xff,0,"Key itself in hex coding") -#define awc_RID_WEPv_KeyAscii awc_def_WEPv_RID(0x000C,"KeyAscii", 128,0,0,"Key itself in ascii coding") - -// WEP Key non-volatile -#define awc_RID_WEPnv_RidLen awc_def_WEPnv_RID(0x0000,"RidLen", 16,0xffff,0,"") // read-only Length of this RID including the length field -#define awc_RID_WEPnv_KeyIndex awc_def_WEPnv_RID(0x0002,"KeyIndex", 16,0xffff,0,"Index to list of keys") -#define awc_RID_WEPnv_Address awc_def_WEPnv_RID(0x0004,"Address", 48,0xff,0,"mac address related to keys") -#define awc_RID_WEPnv_KeyLen awc_def_WEPnv_RID(0x000A,"KeyLen", 16,0xffff,0,"Key Length (0 and 5 are valid)") -#define awc_RID_WEPnv_Key awc_def_WEPnv_RID(0x000C,"Key", 128,0xff,0,"Key itself in hex coding") -#define awc_RID_WEPnv_KeyAscii awc_def_WEPnv_RID(0x000C,"KeyAscii", 128,0,0,"Key itself in ascii coding") - -// Modulation -#define awc_RID_Modulation_RidLen awc_def_Modulation_RID(0x0000,"RidLen", 16,0xffff,0,"") // read-only Length of this RID including the length field -#define awc_RID_Modulation_Modulation awc_def_Modulation_RID(0x0002,"Modulation", 16,0xffff,0,"Modulation") - - -// Capabilities RID -#define awc_RID_Cap_RidLen awc_def_Cap_RID(0x0000,"RidLen", 16,0xffff,0,"") // read-only Length of this RID including the length field -#define awc_RID_Cap_OUI awc_def_Cap_RID(0x0002,"OUI", 24,0xffff,0,"") // 0x00 0x40 This field will give the manufacturer OUI (fourth byte always zero). -#define awc_RID_Cap_ProductNum awc_def_Cap_RID(0x0006,"ProductNum", 24,0xffff,0,"") // 0x0004 This field will give the product number. -#define awc_RID_Cap_ManufacturerName awc_def_Cap_RID(0x0008,"ManufacturerName", 255,0,0,"") // ASCIIz encoding of manufacturer name. -#define awc_RID_Cap_ProductName awc_def_Cap_RID(0x0028,"ProductName", 128,0,0,"") // PC4500 ASCIIz encoding of product name. -#define awc_RID_Cap_ProductVersion awc_def_Cap_RID(0x0038,"ProductVersion", 64,0,0,"") // . ASCIIz encoding of product (firmware?) version. -#define awc_RID_Cap_FactoryAddress awc_def_Cap_RID(0x0040,"FactoryAddress", 48,0xff,0,"") // This field will contain the OEM assigned IEEE address. If there is no OEM address assigned, the Aironet assigned IEEE Address will be returned in this field. -#define awc_RID_Cap_AironetAddress awc_def_Cap_RID(0x0046,"AironetAddress", 48,0xff,0,"") // This field will contain the Aironet factory assigned IEEE address. -#define awc_RID_Cap_RadioSpreadType_DS awc_def_Cap_RID(0x004C,"RadioType_FH", 16,0x0001,1,"") // 0x01 = 802.11 FH -#define awc_RID_Cap_RadioSpreadType_FH awc_def_Cap_RID(0x004C,"RadioType_DS", 16,0x0002,2,"") // 0x02 = 802.11 DS -#define awc_RID_Cap_RadioSpreadType_Legacy awc_def_Cap_RID(0x004C,"RadioType_Legacy", 16,0x0004,4,"") // 0x04 = LM2000 (Legacy) DS // Note, more than one bit may be set for radios supporting multiple modes of operation. -#define awc_RID_Cap_RegDomain awc_def_Cap_RID(0x004E,"RegDomain", 16,0xffff,0,"") // This field indicates the registration domain/country The values as assigned by 802.11 will be used. -#define awc_RID_Cap_Callid awc_def_Cap_RID(0x0050,"Callid", 48,0xff,0,"") // This field indicates the callid assigned to the unit (if RegDomain is Japan) Each nibble will contain one decimal digit of the 12 digit callid. (Note, this is not the encoded format). -#define awc_RID_Cap_SupportedRates awc_def_Cap_RID(0x0056,"SupportedRates", 64,0xff,0,"") // 0x02, 0x04, This field will indicate the 802.11 supported rates as specified in the rates. -#define awc_RID_Cap_RxDiversity awc_def_Cap_RID(0x005E,"RxDiversity", 8 ,0xff,0,"") // 0x03 This field will indicate the number of antennas supported as a bit mask. -#define awc_RID_Cap_TxDiversity awc_def_Cap_RID(0x005F,"TxDiversity", 8 ,0xff,0,"") // 0x03 This field will indicate the number of antennas supported as a bit mask. -#define awc_RID_Cap_TxPowerLevels awc_def_Cap_RID(0x0060,"TxPowerLevels", 128,0xff,0,"") // 250 This table indicates the supported transmit power levels. (values are in mW) Zero terminates the list. Note, this may be further restricted depending on country selected. -#define awc_RID_Cap_HardwareVersion awc_def_Cap_RID(0x0070,"HardwareVersion", 16,0xffff,0,"") // 0 This indicates the revision of hardware. -#define awc_RID_Cap_HardwareCapabilit awc_def_Cap_RID(0x0072,"HardwareCapabilit", 16,0xffff,0,"") // 0 This is a bit-mapped field indicating harware capabilities. No bits have been assigned yet. Initially this is zero. -#define awc_RID_Cap_TemperatureRange awc_def_Cap_RID(0x0074,"TemperatureRange", 16,0xffff,0,"") // 0 This indicates the temperature range capability. -#define awc_RID_Cap_SoftwareVersion awc_def_Cap_RID(0x0076,"SoftwareVersion", 16,0xffff,0,"") // 0 This indicates the revision of software. -#define awc_RID_Cap_SoftwareVersion_major awc_def_Cap_RID(0x0076,"SoftwareVersion major", 16,0xff00,0,"") // The upper byte indicates the major version and the -#define awc_RID_Cap_SoftwareVersion_minor awc_def_Cap_RID(0x0076,"SoftwareVersion minor", 16,0x00ff,0,"") // lower byte the minor version. -#define awc_RID_Cap_SoftwareSubVersion awc_def_Cap_RID(0x0078,"SoftwareSubVersio", 16,0xffff,0,"") // 0 This indicates the sub-revision of software. -#define awc_RID_Cap_InterfaceVersion awc_def_Cap_RID(0x007A,"InterfaceVersion", 16,0xffff,0,"") // 0 This indicates the revision of the interface. This will be bumped whenever there are incompatible modifications made to the interfac This may be bumped on first release to ensure that "unreleased" utilities/drivers become unusable. -#define awc_RID_Cap_SoftwareCapabilities awc_def_Cap_RID(0x007C,"SoftwareCapabiliti", 160,0xff,0,"") // 0 This field gives a bit mapped indication of capabilities. No capability bits have yet been assigned. -#define awc_RID_Cap_BootBlockVersion awc_def_Cap_RID(0x007E,"BootBlockVersion ", 16,0xffff,0,"") // This indicates the revision of bootblock software. The upper byte indicates the major version and the lower byte the minor version. Note, BCD encoding is used. (version 2.11 would be 0x0211.) - - -// Status RID - -#define awc_RID_Status_RidLen awc_def_Stat_RID( 0x0000,"RidLen", 16,0xffff,0,"") // Length of this RID including the length field -#define awc_RID_Status_MacAddress awc_def_Stat_RID( 0x0002,"MacAddress", 48,0xff,0,"") // The MAC address in use by the station. -#define awc_RID_Status_OperationalMode awc_def_Stat_RID( 0x0008,"OperationalMode", 16,0xffff,0,NULL) // Bit-mapped. -#define awc_RID_Status_Configured awc_def_Stat_RID( 0x0008,"OperationalMode Configured", 16,0x0001,1,"Configured") // -#define awc_RID_Status_MAC_Enabled awc_def_Stat_RID( 0x0008,"OperationalMode MAC Enabled", 16,0x0002,2,"MAC Enabled") // -#define awc_RID_Status_Receive_Enabled awc_def_Stat_RID( 0x0008,"OperationalMode Receive Enabled", 16,0x0004,4,"Receive Enabled") // -#define awc_RID_Status_In_Sync awc_def_Stat_RID( 0x0008,"OperationalMode In Sync with cell", 16,0x0010,10,"In Sync with cell") // -#define awc_RID_Status_Associated awc_def_Stat_RID( 0x0008,"OperationalMode Associated", 16,0x0020,20,"Associated") // -#define awc_RID_Status_Error awc_def_Stat_RID( 0x0008,"OperationalMode Error", 16,0x8000,0x8000,"Error") // -#define awc_RID_Status_ErrorCode awc_def_Stat_RID( 0x000A,"ErrorCode", 16,0xffff,0,"") // Non-zero if an error state has been entered -#define awc_RID_Status_CurrentSignalQuality awc_def_Stat_RID( 0x000C,"CurrentSignalQuality",16,0xffff,0,"") // A measure of the current signal quality. -#define awc_RID_Status_SSIDlength awc_def_Stat_RID( 0x000E,"SSIDlength", 16,0xffff,0,"") // This length of the following SSID. -#define awc_RID_Status_SSID awc_def_Stat_RID( 0x0010,"SSID", 255,0,0,"") // The SSID that is currently in effect. -#define awc_RID_Status_ApName awc_def_Stat_RID( 0x0030,"ApName", 128,0,0,"") // The name of the current BSSID (ESS mode only) -#define awc_RID_Status_CurrentBssid awc_def_Stat_RID( 0x0040,"CurrentBssid", 48,0xff,0,"") // BSSID that is currently in effect. -#define awc_RID_Status_PreviousBssid1 awc_def_Stat_RID( 0x0046,"PreviousBssid1", 48,0xff,0,"") // A former BSSID. -#define awc_RID_Status_PreviousBssid2 awc_def_Stat_RID( 0x004C,"PreviousBssid2", 48,0xff,0,"") // A former BSSID. -#define awc_RID_Status_PreviousBssid3 awc_def_Stat_RID( 0x0052,"PreviousBssid3", 48,0xff,0,"") // A former BSSID. -#define awc_RID_Status_BeaconPeriod awc_def_Stat_RID( 0x0058,"BeaconPeriod", 16,0xffff,0,"msek") // (kus) The current beacon period. -#define awc_RID_Status_DtimPeriod awc_def_Stat_RID( 0x005A,"DtimPeriod", 16,0xffff,0,"units") // The current DTIM period (number of beacons between DTIMs). -#define awc_RID_Status_AtimDuration awc_def_Stat_RID( 0x005C,"AtimDuration", 16,0xffff,0,"msek") // (kus) The current ATIM window duration. Adhoc/Ibss only -#define awc_RID_Status_HopPeriod awc_def_Stat_RID( 0x005E,"HopPeriod", 16,0xffff,0,"msek") // (kus) The current hopping period. -#define awc_RID_Status_ChannelSet awc_def_Stat_RID( 0x0060,"ChannelSet", 16,0xffff,0,"Set") // The current channel set. -#define awc_RID_Status_Channel awc_def_Stat_RID( 0x0062,"Channel", 16,0xffff,0," ") // The current operating channel. -#define awc_RID_Status_HopsToBackbone awc_def_Stat_RID( 0x0064,"HopsToBackbone", 16,0xffff,0,"hops") // 0 indicates a backbone association. -#define awc_RID_Status_ApTotalLoad awc_def_Stat_RID( 0x0066,"ApTotalLoad", 16,0xffff,0,"units") // Total load including broadcast/multicast from backbone. This is the value extracted from the Aironet element. -#define awc_RID_Status_OurGeneratedLoad awc_def_Stat_RID( 0x0068,"OurGeneratedLoad", 16,0xffff,0,"units") // Total load generated by our station (transmitted and received). Excludes received broadcast/multicast traffic. -#define awc_RID_Status_AccumulatedArl awc_def_Stat_RID( 0x006A,"AccumulatedArl", 16,0xffff,0,"units") // - -// AP RID - -#define awc_RID_AP_16RidLen awc_def_AP_RID(0x0000,"RidLen", 16,0xffff,0,"") // 0x06, read-only Length of this RID including the length field -#define awc_RID_AP_TIM_addr awc_def_AP_RID(0x0002,"TIM Addr", 16,0xffff,0,"") // Read only The "Traffic Indication Map" is updated by the host via -#define awc_RID_AP_Airo_addr awc_def_AP_RID(0x0004,"Airo Addr", 16,0xffff,0,"") // Read only The "Aironet Information Element" is updated by the host via the AUX I/O ports. This is the address of the Aironet Element. - - -// Statistics RID - -#define awc_RID_Stats_RidLen awc_def_Stats_RID(0x0000,0x0000,"RidLen", "Length of the RID including the length field.") -#define awc_RID_Stats_RxOverrunErr awc_def_Stats_RID(0x0002,0x0004,"Stats_RxOverrunErr", "Receive overruns -- No buffer available to handle the receive. (result is that the packet is never received)") -#define awc_RID_Stats_RxPlcpCrcErr awc_def_Stats_RID(0x0004,0x0008,"Stats_RxPlcpCrcErr", "PLCP header checksum errors (CRC16).") -#define awc_RID_Stats_RxPlcpFormat awc_def_Stats_RID(0x0006,0x000C,"Stats_RxPlcpFormat", "PLCP format errors.") -#define awc_RID_Stats_RxPlcpLength awc_def_Stats_RID(0x0008,0x0010,"Stats_RxPlcpLength", "PLCP length is incorrect.") -#define awc_RID_Stats_RxMacCrcErr awc_def_Stats_RID(0x000A,0x0014,"Stats_RxMacCrcErr", "Count of MAC CRC32 errors.") -#define awc_RID_Stats_RxMacCrcOk awc_def_Stats_RID(0x000C,0x0018,"Stats_RxMacCrcOk", "Count of MAC CRC32 received correctly.") -#define awc_RID_Stats_RxWepErr awc_def_Stats_RID(0x000E,0x001C,"Stats_RxWepErr", "Count of all WEP ICV checks that failed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats_RxWepOk awc_def_Stats_RID(0x0010,0x0020,"Stats_RxWepOk", "Count of all WEP ICV checks that passed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats_RetryLong awc_def_Stats_RID(0x0012,0x0024,"Stats_RetryLongCount", "of all long retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats_RetryShort awc_def_Stats_RID(0x0014,0x0028,"Stats_RetryShort", "Count of all short retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats_MaxRetries awc_def_Stats_RID(0x0016,0x002C,"Stats_MaxRetries", "Count of number of packets that max-retried -- ie were never ACK-d.") -#define awc_RID_Stats_NoAck awc_def_Stats_RID(0x0018,0x0030,"Stats_NoAck", "Count of number of times that ACK was not received.") -#define awc_RID_Stats_NoCts awc_def_Stats_RID(0x001A,0x0034,"Stats_NoCts", "Count of number of timer that CTS was not received.") -#define awc_RID_Stats_RxAck awc_def_Stats_RID(0x001C,0x0038,"Stats_RxAck", "Count of number of expected ACKs that were received.") -#define awc_RID_Stats_RxCts awc_def_Stats_RID(0x001E,0x003C,"Stats_RxCts", "Count of number of expected CTSs that were received.") -#define awc_RID_Stats_TxAck awc_def_Stats_RID(0x0020,0x0040,"Stats_TxAck", "Count of number of ACKs transmitted.") -#define awc_RID_Stats_TxRts awc_def_Stats_RID(0x0022,0x0044,"Stats_TxRts", "Count of number of RTSs transmitted.") -#define awc_RID_Stats_TxCts awc_def_Stats_RID(0x0024,0x0048,"Stats_TxCts", "Count of number of CTSs transmitted.") -#define awc_RID_Stats_TxMc awc_def_Stats_RID(0x0026,0x004C,"Stats_TxMc", " LMAC count of multicast packets sent (uses 802.11 Address1).") -#define awc_RID_Stats_TxBc awc_def_Stats_RID(0x0028,0x0050,"Stats_TxBc", " LMAC count of broadcast packets sent (uses 802.11") -#define awc_RID_Stats_TxUcFrags awc_def_Stats_RID(0x002A,0x0054,"Stats_TxUcFragsLMAC", " count of ALL unicast fragments and whole packets sent (uses 802.11 Address1).") -#define awc_RID_Stats_TxUcPackets awc_def_Stats_RID(0x002C,0x0058,"Stats_TxUcPackets", "LMAC count of unicast packets that were ACKd (uses 802.11 Address 1).") -#define awc_RID_Stats_TxBeacon awc_def_Stats_RID(0x002E,0x005C,"Stats_TxBeacon", " Count of beacon packets transmitted.") -#define awc_RID_Stats_RxBeacon awc_def_Stats_RID(0x0030,0x0060,"Stats_RxBeacon", " Count of beacon packets received matching our BSSID.") -#define awc_RID_Stats_TxSinColl awc_def_Stats_RID(0x0032,0x0064,"Stats_TxSinCollTransmit"," single collisions. **") -#define awc_RID_Stats_TxMulColl awc_def_Stats_RID(0x0034,0x0068,"Stats_TxMulCollTransmit"," multiple collisions. **") -#define awc_RID_Stats_DefersNo awc_def_Stats_RID(0x0036,0x006C,"Stats_DefersNo Transmit"," frames sent with no deferral. **") -#define awc_RID_Stats_DefersProt awc_def_Stats_RID(0x0038,0x0070,"Stats_DefersProt", " Transmit frames deferred due to protocol.") -#define awc_RID_Stats_DefersEngy awc_def_Stats_RID(0x003A,0x0074,"Stats_DefersEngy", " Transmit frames deferred due to energy detect.") -#define awc_RID_Stats_DupFram awc_def_Stats_RID(0x003C,0x0078,"Stats_DupFram", " Duplicate receive frames and fragments.") -#define awc_RID_Stats_RxFragDisc awc_def_Stats_RID(0x003E,0x007C,"Stats_RxFragDisc", " Received partial frames. (each tally could indicate the discarding of one or more fragments)") -#define awc_RID_Stats_TxAged awc_def_Stats_RID(0x0040,0x0080,"Stats_TxAged", " Transmit packets exceeding maximum transmit lifetime. **") -#define awc_RID_Stats_RxAged awc_def_Stats_RID(0x0042,0x0084,"Stats_RxAgedReceive", " packets exceeding maximum receive lifetime. **") -#define awc_RID_Stats_LostSync_Max awc_def_Stats_RID(0x0044,0x0088,"Stats_LostSync_Max", " Lost sync with our cell due to maximum retries occuring. Retry") -#define awc_RID_Stats_LostSync_Mis awc_def_Stats_RID(0x0046,0x008C,"Stats_LostSync_Mis", "Lost sync with our cell due to missing too many beacons. sedBeacons") -#define awc_RID_Stats_LostSync_Arl awc_def_Stats_RID(0x0048,0x0090,"Stats_LostSync_Arl", "Lost sync with our cell due to Average Retry Level being Exceeded exceeded.") -#define awc_RID_Stats_LostSync_Dea awc_def_Stats_RID(0x004A,0x0094,"Stats_LostSync_Dea", "Lost sync with our cell due to being deauthenticated.,thed") -#define awc_RID_Stats_LostSync_Disa awc_def_Stats_RID(0x004C,0x0098,"Stats_LostSync_Disa", " Lost sync with our cell due to being disassociated. ssoced") -#define awc_RID_Stats_LostSync_Tsf awc_def_Stats_RID(0x004E,0x009C,"Stats_LostSync_Tsf", "Lost sync with our cell due to excessive change in TSF Timingtiming.") -#define awc_RID_Stats_HostTxMc awc_def_Stats_RID(0x0050,0x00A0,"Stats_HostTxMc", "Count of multicast packets sent by the host.") -#define awc_RID_Stats_HostTxBc awc_def_Stats_RID(0x0052,0x00A4,"Stats_HostTxBc", "Count of broadcast packets sent by the host.") -#define awc_RID_Stats_HostTxUc awc_def_Stats_RID(0x0054,0x00A8,"Stats_HostTxUc", "Count of unicast packets sent by the host.") -#define awc_RID_Stats_HostTxFail awc_def_Stats_RID(0x0056,0x00AC,"Stats_HostTxFail", " Count of host transmitted packets which failed.") -#define awc_RID_Stats_HostRxMc awc_def_Stats_RID(0x0058,0x00B0,"Stats_HostRxMc", "Count of host received multicast packets.") -#define awc_RID_Stats_HostRxBc awc_def_Stats_RID(0x005A,0x00B4,"Stats_HostRxBc", "Count of host received broadcast packets.") -#define awc_RID_Stats_HostRxUc awc_def_Stats_RID(0x005C,0x00B8,"Stats_HostRxUc", "Count of host received unicast packets.") -#define awc_RID_Stats_HostRxDiscar awc_def_Stats_RID(0x005E,0x00BC,"Stats_HostRxDiscar", "Count of host received packets discarded due to:\n Host not enabling receive.\n Host failing to dequeue receive packets quickly.\n Packets being discarded due to magic packet mode.") -#define awc_RID_Stats_HmacTxMc awc_def_Stats_RID(0x0060,0x00C0,"Stats_HmacTxMc", "Count of internally generated multicast (DA) packets.") -#define awc_RID_Stats_HmacTxBc awc_def_Stats_RID(0x0062,0x00C4,"Stats_HmacTxBc", "Count of internally generated broadcast (DA) packets.") -#define awc_RID_Stats_HmacTxUc awc_def_Stats_RID(0x0064,0x00C8,"Stats_HmacTxUc", "Count of internally generated unicast (DA) packets.") -#define awc_RID_Stats_HmacTxFail awc_def_Stats_RID(0x0066,0x00CC,"Stats_HmacTxFail", " Count of internally generated transmit packets that failed.") -#define awc_RID_Stats_HmacRxMc awc_def_Stats_RID(0x0068,0x00D0,"Stats_HmacRxMc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats_HmacRxBc awc_def_Stats_RID(0x006A,0x00D4,"Stats_HmacRxBc", "Count of internally received broadcast (DA) packets.") -#define awc_RID_Stats_HmacRxUc awc_def_Stats_RID(0x006C,0x00D8,"Stats_HmacRxUc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats_HmacRxDisca awc_def_Stats_RID(0x006E,0x00DC,"Stats_HmacRxDisca", " Count of internally received packets that were discarded (usually because the destination address is not for the host).") -#define awc_RID_Stats_HmacRxAcce awc_def_Stats_RID(0x0070,0x00E0,"Stats_HmacRxAcce", " Count of internally received packets that were accepted") -#define awc_RID_Stats_SsidMismatch awc_def_Stats_RID(0x0072,0x00E4,"Stats_SsidMismatch", " Count of SSID mismatches.") -#define awc_RID_Stats_ApMismatch awc_def_Stats_RID(0x0074,0x00E8,"Stats_ApMismatch", " Count of specified AP mismatches.") -#define awc_RID_Stats_RatesMismatc awc_def_Stats_RID(0x0076,0x00EC,"Stats_RatesMismatc", " Count of rate mismatches.") -#define awc_RID_Stats_AuthReject awc_def_Stats_RID(0x0078,0x00F0,"Stats_AuthReject", " Count of authentication rejections.") -#define awc_RID_Stats_AuthTimeout awc_def_Stats_RID(0x007A,0x00F4,"Stats_AuthTimeout", " Count of authentication timeouts.") -#define awc_RID_Stats_AssocReject awc_def_Stats_RID(0x007C,0x00F8,"Stats_AssocReject", " Count of association rejections.") -#define awc_RID_Stats_AssocTimeout awc_def_Stats_RID(0x007E,0x00FC,"Stats_AssocTimeout", " Count of association timeouts.") -#define awc_RID_Stats_NewReason awc_def_Stats_RID(0x0080,0x0100,"Stats_NewReason", "Count of reason/status codes of greater than 19. (Values of 0 = successful are not counted)") -#define awc_RID_Stats_AuthFail_1 awc_def_Stats_RID(0x0082,0x0104,"Stats_AuthFail_1", "Unspecified reason.") -#define awc_RID_Stats_AuthFail_2 awc_def_Stats_RID(0x0084,0x0108,"Stats_AuthFail_2", "Previous authentication no longer valid.") -#define awc_RID_Stats_AuthFail_3 awc_def_Stats_RID(0x0086,0x010C,"Stats_AuthFail_3", "Deauthenticated because sending station is leaving (has left) IBSS or ESS.") -#define awc_RID_Stats_AuthFail_4 awc_def_Stats_RID(0x0088,0x0110,"Stats_AuthFail_4", "Disassociated due to inactivity") -#define awc_RID_Stats_AuthFail_5 awc_def_Stats_RID(0x008A,0x0114,"Stats_AuthFail_5", "Disassociated because AP is unable to handle all currently associated stations.") -#define awc_RID_Stats_AuthFail_6 awc_def_Stats_RID(0x008C,0x0118,"Stats_AuthFail_6", "Class 2 Frame received from non-Authenticated station.") -#define awc_RID_Stats_AuthFail_7 awc_def_Stats_RID(0x008E,0x011C,"Stats_AuthFail_7", "Class 3 Frame received from non-Associated station.") -#define awc_RID_Stats_AuthFail_8 awc_def_Stats_RID(0x0090,0x0120,"Stats_AuthFail_8", "Disassociated because sending station is leaving (has left)") -#define awc_RID_Stats_AuthFail_9 awc_def_Stats_RID(0x0092,0x0124,"Stats_AuthFail_9", "Station requesting (Re)Association is not Authenticated") -#define awc_RID_Stats_AuthFail_10 awc_def_Stats_RID(0x0094,0x0128,"Stats_AuthFail_10", "Cannot support all requested capabilities in the Capability") -#define awc_RID_Stats_AuthFail_11 awc_def_Stats_RID(0x0096,0x012C,"Stats_AuthFail_11", "Reassociation denied due to inability to confirm") -#define awc_RID_Stats_AuthFail_12 awc_def_Stats_RID(0x0098,0x0130,"Stats_AuthFail_12", "Association denied due to reason outside the scope of the 802.11") -#define awc_RID_Stats_AuthFail_13 awc_def_Stats_RID(0x009A,0x0134,"Stats_AuthFail_13", "Responding station does not support the specified Auth Alogorithm") -#define awc_RID_Stats_AuthFail_14 awc_def_Stats_RID(0x009C,0x0138,"Stats_AuthFail_14", "Received an out of sequence Authentication Frame.") -#define awc_RID_Stats_AuthFail_15 awc_def_Stats_RID(0x009E,0x013C,"Stats_AuthFail_15", "Authentication rejected due to challenge failure.") -#define awc_RID_Stats_AuthFail_16 awc_def_Stats_RID(0x00A0,0x0140,"Stats_AuthFail_16", "Authentication rejected due to timeout waiting for next frame in sequence.") -#define awc_RID_Stats_AuthFail_17 awc_def_Stats_RID(0x00A2,0x0144,"Stats_AuthFail_17", "Association denied because AP is unable to handle additional associated stations.") -#define awc_RID_Stats_AuthFail_18 awc_def_Stats_RID(0x00A4,0x0148,"Stats_AuthFail_18", "Association denied due to requesting station not supportingall basic rates.") -#define awc_RID_Stats_AuthFail_19 awc_def_Stats_RID(0x00A6,0x014C,"Stats_AuthFail_19", "Reserved") -#define awc_RID_Stats_RxMan awc_def_Stats_RID(0x00A8,0x0150,"Stats_RxMan", " Count of management packets received and handled.") -#define awc_RID_Stats_TxMan awc_def_Stats_RID(0x00AA,0x0154,"Stats_TxMan", " Count of management packets transmitted.") -#define awc_RID_Stats_RxRefresh awc_def_Stats_RID(0x00AC,0x0158,"Stats_RxRefresh", " Count of null data packets received.") -#define awc_RID_Stats_TxRefresh awc_def_Stats_RID(0x00AE,0x015C,"Stats_TxRefresh", " Count of null data packets transmitted.") -#define awc_RID_Stats_RxPoll awc_def_Stats_RID(0x00B0,0x0160,"Stats_RxPoll", "Count of PS-Poll packets received.") -#define awc_RID_Stats_TxPoll awc_def_Stats_RID(0x00B2,0x0164,"Stats_TxPoll", "Count of PS-Poll packets transmitted.") -#define awc_RID_Stats_HostRetries awc_def_Stats_RID(0x00B4,0x0168,"Stats_HostRetries", " Count of long and short retries used to transmit host packets (does not include first attempt).") -#define awc_RID_Stats_LostSync_HostReq awc_def_Stats_RID(0x00B6,0x016C,"Stats_LostSync_HostReq","Lost sync with our cell due to host request.") -#define awc_RID_Stats_HostTxBytes awc_def_Stats_RID(0x00B8,0x0170,"Stats_HostTxBytes", " Count of bytes transferred from the host.") -#define awc_RID_Stats_HostRxBytes awc_def_Stats_RID(0x00BA,0x0174,"Stats_HostRxBytes", " Count of bytes transferred to the host.") -#define awc_RID_Stats_ElapsedUsec awc_def_Stats_RID(0x00BC,0x0178,"Stats_ElapsedUsec", " Total time since power up (or clear) in microseconds.") -#define awc_RID_Stats_ElapsedSec awc_def_Stats_RID(0x00BE,0x017C,"Stats_ElapsedSec", " Total time since power up (or clear) in seconds.") -#define awc_RID_Stats_LostSyncBett awc_def_Stats_RID(0x00C0,0x0180,"Stats_LostSyncBett", "Lost Sync to switch to a better access point") - - - -#define awc_RID_Stats_delta_RidLen awc_def_Stats_delta_RID(0x0000,0x0000,"RidLen", "Length of the RID including the length field.") -#define awc_RID_Stats_delta_RxOverrunErr awc_def_Stats_delta_RID(0x0002,0x0004,"Stats_RxOverrunErr", "Receive overruns -- No buffer available to handle the receive. (result is that the packet is never received)") -#define awc_RID_Stats_delta_RxPlcpCrcErr awc_def_Stats_delta_RID(0x0004,0x0008,"Stats_RxPlcpCrcErr", "PLCP header checksum errors (CRC16).") -#define awc_RID_Stats_delta_RxPlcpFormat awc_def_Stats_delta_RID(0x0006,0x000C,"Stats_RxPlcpFormat", "PLCP format errors.") -#define awc_RID_Stats_delta_RxPlcpLength awc_def_Stats_delta_RID(0x0008,0x0010,"Stats_RxPlcpLength", "PLCP length is incorrect.") -#define awc_RID_Stats_delta_RxMacCrcErr awc_def_Stats_delta_RID(0x000A,0x0014,"Stats_RxMacCrcErr", "Count of MAC CRC32 errors.") -#define awc_RID_Stats_delta_RxMacCrcOk awc_def_Stats_delta_RID(0x000C,0x0018,"Stats_RxMacCrcOk", "Count of MAC CRC32 received correctly.") -#define awc_RID_Stats_delta_RxWepErr awc_def_Stats_delta_RID(0x000E,0x001C,"Stats_RxWepErr", "Count of all WEP ICV checks that failed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats_delta_RxWepOk awc_def_Stats_delta_RID(0x0010,0x0020,"Stats_RxWepOk", "Count of all WEP ICV checks that passed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats_delta_RetryLong awc_def_Stats_delta_RID(0x0012,0x0024,"Stats_RetryLongCount", "of all long retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats_delta_RetryShort awc_def_Stats_delta_RID(0x0014,0x0028,"Stats_RetryShort", "Count of all short retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats_delta_MaxRetries awc_def_Stats_delta_RID(0x0016,0x002C,"Stats_MaxRetries", "Count of number of packets that max-retried -- ie were never ACKd.") -#define awc_RID_Stats_delta_NoAck awc_def_Stats_delta_RID(0x0018,0x0030,"Stats_NoAck", "Count of number of times that ACK was not received.") -#define awc_RID_Stats_delta_NoCts awc_def_Stats_delta_RID(0x001A,0x0034,"Stats_NoCts", "Count of number of timer that CTS was not received.") -#define awc_RID_Stats_delta_RxAck awc_def_Stats_delta_RID(0x001C,0x0038,"Stats_RxAck", "Count of number of expected ACKs that were received.") -#define awc_RID_Stats_delta_RxCts awc_def_Stats_delta_RID(0x001E,0x003C,"Stats_RxCts", "Count of number of expected CTSs that were received.") -#define awc_RID_Stats_delta_TxAck awc_def_Stats_delta_RID(0x0020,0x0040,"Stats_TxAck", "Count of number of ACKs transmitted.") -#define awc_RID_Stats_delta_TxRts awc_def_Stats_delta_RID(0x0022,0x0044,"Stats_TxRts", "Count of number of RTSs transmitted.") -#define awc_RID_Stats_delta_TxCts awc_def_Stats_delta_RID(0x0024,0x0048,"Stats_TxCts", "Count of number of CTSs transmitted.") -#define awc_RID_Stats_delta_TxMc awc_def_Stats_delta_RID(0x0026,0x004C,"Stats_TxMc", " LMAC count of multicast packets sent (uses 802.11 Address1).") -#define awc_RID_Stats_delta_TxBc awc_def_Stats_delta_RID(0x0028,0x0050,"Stats_TxBc", " LMAC count of broadcast packets sent (uses 802.11") -#define awc_RID_Stats_delta_TxUcFrags awc_def_Stats_delta_RID(0x002A,0x0054,"Stats_TxUcFragsLMAC", " count of ALL unicast fragments and whole packets sent (uses 802.11 Address1).") -#define awc_RID_Stats_delta_TxUcPackets awc_def_Stats_delta_RID(0x002C,0x0058,"Stats_TxUcPackets", "LMAC count of unicast packets that were ACKd (uses 802.11 Address 1).") -#define awc_RID_Stats_delta_TxBeacon awc_def_Stats_delta_RID(0x002E,0x005C,"Stats_TxBeacon", " Count of beacon packets transmitted.") -#define awc_RID_Stats_delta_RxBeacon awc_def_Stats_delta_RID(0x0030,0x0060,"Stats_RxBeacon", " Count of beacon packets received matching our BSSID.") -#define awc_RID_Stats_delta_TxSinColl awc_def_Stats_delta_RID(0x0032,0x0064,"Stats_TxSinCollTransmit"," single collisions. **") -#define awc_RID_Stats_delta_TxMulColl awc_def_Stats_delta_RID(0x0034,0x0068,"Stats_TxMulCollTransmit"," multiple collisions. **") -#define awc_RID_Stats_delta_DefersNo awc_def_Stats_delta_RID(0x0036,0x006C,"Stats_DefersNo Transmit"," frames sent with no deferral. **") -#define awc_RID_Stats_delta_DefersProt awc_def_Stats_delta_RID(0x0038,0x0070,"Stats_DefersProt", " Transmit frames deferred due to protocol.") -#define awc_RID_Stats_delta_DefersEngy awc_def_Stats_delta_RID(0x003A,0x0074,"Stats_DefersEngy", " Transmit frames deferred due to energy detect.") -#define awc_RID_Stats_delta_DupFram awc_def_Stats_delta_RID(0x003C,0x0078,"Stats_DupFram", " Duplicate receive frames and fragments.") -#define awc_RID_Stats_delta_RxFragDisc awc_def_Stats_delta_RID(0x003E,0x007C,"Stats_RxFragDisc", " Received partial frames. (each tally could indicate the discarding of one or more fragments)") -#define awc_RID_Stats_delta_TxAged awc_def_Stats_delta_RID(0x0040,0x0080,"Stats_TxAged", " Transmit packets exceeding maximum transmit lifetime. **") -#define awc_RID_Stats_delta_RxAged awc_def_Stats_delta_RID(0x0042,0x0084,"Stats_RxAgedReceive", " packets exceeding maximum receive lifetime. **") -#define awc_RID_Stats_delta_LostSync_Max awc_def_Stats_delta_RID(0x0044,0x0088,"Stats_LostSync_Max", " Lost sync with our cell due to maximum retries occuring. Retry") -#define awc_RID_Stats_delta_LostSync_Mis awc_def_Stats_delta_RID(0x0046,0x008C,"Stats_LostSync_Mis", "Lost sync with our cell due to missing too many beacons. sedBeacons") -#define awc_RID_Stats_delta_LostSync_Arl awc_def_Stats_delta_RID(0x0048,0x0090,"Stats_LostSync_Arl", "Lost sync with our cell due to Average Retry Level being Exceeded exceeded.") -#define awc_RID_Stats_delta_LostSync_Dea awc_def_Stats_delta_RID(0x004A,0x0094,"Stats_LostSync_Dea", "Lost sync with our cell due to being deauthenticated.,thed") -#define awc_RID_Stats_delta_LostSync_Disa awc_def_Stats_delta_RID(0x004C,0x0098,"Stats_LostSync_Disa", " Lost sync with our cell due to being disassociated. ssoced") -#define awc_RID_Stats_delta_LostSync_Tsf awc_def_Stats_delta_RID(0x004E,0x009C,"Stats_LostSync_Tsf", "Lost sync with our cell due to excessive change in TSF Timingtiming.") -#define awc_RID_Stats_delta_HostTxMc awc_def_Stats_delta_RID(0x0050,0x00A0,"Stats_HostTxMc", "Count of multicast packets sent by the host.") -#define awc_RID_Stats_delta_HostTxBc awc_def_Stats_delta_RID(0x0052,0x00A4,"Stats_HostTxBc", "Count of broadcast packets sent by the host.") -#define awc_RID_Stats_delta_HostTxUc awc_def_Stats_delta_RID(0x0054,0x00A8,"Stats_HostTxUc", "Count of unicast packets sent by the host.") -#define awc_RID_Stats_delta_HostTxFail awc_def_Stats_delta_RID(0x0056,0x00AC,"Stats_HostTxFail", " Count of host transmitted packets which failed.") -#define awc_RID_Stats_delta_HostRxMc awc_def_Stats_delta_RID(0x0058,0x00B0,"Stats_HostRxMc", "Count of host received multicast packets.") -#define awc_RID_Stats_delta_HostRxBc awc_def_Stats_delta_RID(0x005A,0x00B4,"Stats_HostRxBc", "Count of host received broadcast packets.") -#define awc_RID_Stats_delta_HostRxUc awc_def_Stats_delta_RID(0x005C,0x00B8,"Stats_HostRxUc", "Count of host received unicast packets.") -#define awc_RID_Stats_delta_HostRxDiscar awc_def_Stats_delta_RID(0x005E,0x00BC,"Stats_HostRxDiscar", "Count of host received packets discarded due to:\n Host not enabling receive.\n Host failing to dequeue receive packets quickly.\n Packets being discarded due to magic packet mode.") -#define awc_RID_Stats_delta_HmacTxMc awc_def_Stats_delta_RID(0x0060,0x00C0,"Stats_HmacTxMc", "Count of internally generated multicast (DA) packets.") -#define awc_RID_Stats_delta_HmacTxBc awc_def_Stats_delta_RID(0x0062,0x00C4,"Stats_HmacTxBc", "Count of internally generated broadcast (DA) packets.") -#define awc_RID_Stats_delta_HmacTxUc awc_def_Stats_delta_RID(0x0064,0x00C8,"Stats_HmacTxUc", "Count of internally generated unicast (DA) packets.") -#define awc_RID_Stats_delta_HmacTxFail awc_def_Stats_delta_RID(0x0066,0x00CC,"Stats_HmacTxFail", " Count of internally generated transmit packets that failed.") -#define awc_RID_Stats_delta_HmacRxMc awc_def_Stats_delta_RID(0x0068,0x00D0,"Stats_HmacRxMc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats_delta_HmacRxBc awc_def_Stats_delta_RID(0x006A,0x00D4,"Stats_HmacRxBc", "Count of internally received broadcast (DA) packets.") -#define awc_RID_Stats_delta_HmacRxUc awc_def_Stats_delta_RID(0x006C,0x00D8,"Stats_HmacRxUc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats_delta_HmacRxDisca awc_def_Stats_delta_RID(0x006E,0x00DC,"Stats_HmacRxDisca", " Count of internally received packets that were discarded (usually because the destination address is not for the host).") -#define awc_RID_Stats_delta_HmacRxAcce awc_def_Stats_delta_RID(0x0070,0x00E0,"Stats_HmacRxAcce", " Count of internally received packets that were accepted") -#define awc_RID_Stats_delta_SsidMismatch awc_def_Stats_delta_RID(0x0072,0x00E4,"Stats_SsidMismatch", " Count of SSID mismatches.") -#define awc_RID_Stats_delta_ApMismatch awc_def_Stats_delta_RID(0x0074,0x00E8,"Stats_ApMismatch", " Count of specified AP mismatches.") -#define awc_RID_Stats_delta_RatesMismatc awc_def_Stats_delta_RID(0x0076,0x00EC,"Stats_RatesMismatc", " Count of rate mismatches.") -#define awc_RID_Stats_delta_AuthReject awc_def_Stats_delta_RID(0x0078,0x00F0,"Stats_AuthReject", " Count of authentication rejections.") -#define awc_RID_Stats_delta_AuthTimeout awc_def_Stats_delta_RID(0x007A,0x00F4,"Stats_AuthTimeout", " Count of authentication timeouts.") -#define awc_RID_Stats_delta_AssocReject awc_def_Stats_delta_RID(0x007C,0x00F8,"Stats_AssocReject", " Count of association rejections.") -#define awc_RID_Stats_delta_AssocTimeout awc_def_Stats_delta_RID(0x007E,0x00FC,"Stats_AssocTimeout", " Count of association timeouts.") -#define awc_RID_Stats_delta_NewReason awc_def_Stats_delta_RID(0x0080,0x0100,"Stats_NewReason", "Count of reason/status codes of greater than 19. (Values of 0 = successful are not counted)") -#define awc_RID_Stats_delta_AuthFail_1 awc_def_Stats_delta_RID(0x0082,0x0104,"Stats_AuthFail_1", "Unspecified reason.") -#define awc_RID_Stats_delta_AuthFail_2 awc_def_Stats_delta_RID(0x0084,0x0108,"Stats_AuthFail_2", "Previous authentication no longer valid.") -#define awc_RID_Stats_delta_AuthFail_3 awc_def_Stats_delta_RID(0x0086,0x010C,"Stats_AuthFail_3", "Deauthenticated because sending station is leaving (has left) IBSS or ESS.") -#define awc_RID_Stats_delta_AuthFail_4 awc_def_Stats_delta_RID(0x0088,0x0110,"Stats_AuthFail_4", "Disassociated due to inactivity") -#define awc_RID_Stats_delta_AuthFail_5 awc_def_Stats_delta_RID(0x008A,0x0114,"Stats_AuthFail_5", "Disassociated because AP is unable to handle all currently associated stations.") -#define awc_RID_Stats_delta_AuthFail_6 awc_def_Stats_delta_RID(0x008C,0x0118,"Stats_AuthFail_6", "Class 2 Frame received from non-Authenticated station.") -#define awc_RID_Stats_delta_AuthFail_7 awc_def_Stats_delta_RID(0x008E,0x011C,"Stats_AuthFail_7", "Class 3 Frame received from non-Associated station.") -#define awc_RID_Stats_delta_AuthFail_8 awc_def_Stats_delta_RID(0x0090,0x0120,"Stats_AuthFail_8", "Disassociated because sending station is leaving (has left)") -#define awc_RID_Stats_delta_AuthFail_9 awc_def_Stats_delta_RID(0x0092,0x0124,"Stats_AuthFail_9", "Station requesting (Re)Association is not Authenticated") -#define awc_RID_Stats_delta_AuthFail_10 awc_def_Stats_delta_RID(0x0094,0x0128,"Stats_AuthFail_10", "Cannot support all requested capabilities in the Capability") -#define awc_RID_Stats_delta_AuthFail_11 awc_def_Stats_delta_RID(0x0096,0x012C,"Stats_AuthFail_11", "Reassociation denied due to inability to confirm") -#define awc_RID_Stats_delta_AuthFail_12 awc_def_Stats_delta_RID(0x0098,0x0130,"Stats_AuthFail_12", "Association denied due to reason outside the scope of the 802.11") -#define awc_RID_Stats_delta_AuthFail_13 awc_def_Stats_delta_RID(0x009A,0x0134,"Stats_AuthFail_13", "Responding station does not support the specified Auth Alogorithm") -#define awc_RID_Stats_delta_AuthFail_14 awc_def_Stats_delta_RID(0x009C,0x0138,"Stats_AuthFail_14", "Received an out of sequence Authentication Frame.") -#define awc_RID_Stats_delta_AuthFail_15 awc_def_Stats_delta_RID(0x009E,0x013C,"Stats_AuthFail_15", "Authentication rejected due to challenge failure.") -#define awc_RID_Stats_delta_AuthFail_16 awc_def_Stats_delta_RID(0x00A0,0x0140,"Stats_AuthFail_16", "Authentication rejected due to timeout waiting for next frame in sequence.") -#define awc_RID_Stats_delta_AuthFail_17 awc_def_Stats_delta_RID(0x00A2,0x0144,"Stats_AuthFail_17", "Association denied because AP is unable to handle additional associated stations.") -#define awc_RID_Stats_delta_AuthFail_18 awc_def_Stats_delta_RID(0x00A4,0x0148,"Stats_AuthFail_18", "Association denied due to requesting station not supportingall basic rates.") -#define awc_RID_Stats_delta_AuthFail_19 awc_def_Stats_delta_RID(0x00A6,0x014C,"Stats_AuthFail_19", "Reserved") -#define awc_RID_Stats_delta_RxMan awc_def_Stats_delta_RID(0x00A8,0x0150,"Stats_RxMan", " Count of management packets received and handled.") -#define awc_RID_Stats_delta_TxMan awc_def_Stats_delta_RID(0x00AA,0x0154,"Stats_TxMan", " Count of management packets transmitted.") -#define awc_RID_Stats_delta_RxRefresh awc_def_Stats_delta_RID(0x00AC,0x0158,"Stats_RxRefresh", " Count of null data packets received.") -#define awc_RID_Stats_delta_TxRefresh awc_def_Stats_delta_RID(0x00AE,0x015C,"Stats_TxRefresh", " Count of null data packets transmitted.") -#define awc_RID_Stats_delta_RxPoll awc_def_Stats_delta_RID(0x00B0,0x0160,"Stats_RxPoll", "Count of PS-Poll packets received.") -#define awc_RID_Stats_delta_TxPoll awc_def_Stats_delta_RID(0x00B2,0x0164,"Stats_TxPoll", "Count of PS-Poll packets transmitted.") -#define awc_RID_Stats_delta_HostRetries awc_def_Stats_delta_RID(0x00B4,0x0168,"Stats_HostRetries", " Count of long and short retries used to transmit host packets (does not include first attempt).") -#define awc_RID_Stats_delta_LostSync_HostReq awc_def_Stats_delta_RID(0x00B6,0x016C,"Stats_LostSync_HostReq","Lost sync with our cell due to host request.") -#define awc_RID_Stats_delta_HostTxBytes awc_def_Stats_delta_RID(0x00B8,0x0170,"Stats_HostTxBytes", " Count of bytes transferred from the host.") -#define awc_RID_Stats_delta_HostRxBytes awc_def_Stats_delta_RID(0x00BA,0x0174,"Stats_HostRxBytes", " Count of bytes transferred to the host.") -#define awc_RID_Stats_delta_ElapsedUsec awc_def_Stats_delta_RID(0x00BC,0x0178,"Stats_ElapsedUsec", " Total time since power up (or clear) in microseconds.") -#define awc_RID_Stats_delta_ElapsedSec awc_def_Stats_delta_RID(0x00BE,0x017C,"Stats_ElapsedSec", " Total time since power up (or clear) in seconds.") -#define awc_RID_Stats_delta_LostSyncBett awc_def_Stats_delta_RID(0x00C0,0x0180,"Stats_LostSyncBett", "Lost Sync to switch to a better access point") - - - -#define awc_RID_Stats_clear_RidLen awc_def_Stats_clear_RID(0x0000,0x0000,"RidLen", "Length of the RID including the length field.") -#define awc_RID_Stats_clear_RxOverrunErr awc_def_Stats_clear_RID(0x0002,0x0004,"Stats_RxOverrunErr", "Receive overruns -- No buffer available to handle the receive. (result is that the packet is never received)") -#define awc_RID_Stats_clear_RxPlcpCrcErr awc_def_Stats_clear_RID(0x0004,0x0008,"Stats_RxPlcpCrcErr", "PLCP header checksum errors (CRC16).") -#define awc_RID_Stats_clear_RxPlcpFormat awc_def_Stats_clear_RID(0x0006,0x000C,"Stats_RxPlcpFormat", "PLCP format errors.") -#define awc_RID_Stats_clear_RxPlcpLength awc_def_Stats_clear_RID(0x0008,0x0010,"Stats_RxPlcpLength", "PLCP length is incorrect.") -#define awc_RID_Stats_clear_RxMacCrcErr awc_def_Stats_clear_RID(0x000A,0x0014,"Stats_RxMacCrcErr", "Count of MAC CRC32 errors.") -#define awc_RID_Stats_clear_RxMacCrcOk awc_def_Stats_clear_RID(0x000C,0x0018,"Stats_RxMacCrcOk", "Count of MAC CRC32 received correctly.") -#define awc_RID_Stats_clear_RxWepErr awc_def_Stats_clear_RID(0x000E,0x001C,"Stats_RxWepErr", "Count of all WEP ICV checks that failed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats_clear_RxWepOk awc_def_Stats_clear_RID(0x0010,0x0020,"Stats_RxWepOk", "Count of all WEP ICV checks that passed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats_clear_RetryLong awc_def_Stats_clear_RID(0x0012,0x0024,"Stats_RetryLongCount", "of all long retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats_clear_RetryShort awc_def_Stats_clear_RID(0x0014,0x0028,"Stats_RetryShort", "Count of all short retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats_clear_MaxRetries awc_def_Stats_clear_RID(0x0016,0x002C,"Stats_MaxRetries", "Count of number of packets that max-retried -- ie were never ACKd.") -#define awc_RID_Stats_clear_NoAck awc_def_Stats_clear_RID(0x0018,0x0030,"Stats_NoAck", "Count of number of times that ACK was not received.") -#define awc_RID_Stats_clear_NoCts awc_def_Stats_clear_RID(0x001A,0x0034,"Stats_NoCts", "Count of number of timer that CTS was not received.") -#define awc_RID_Stats_clear_RxAck awc_def_Stats_clear_RID(0x001C,0x0038,"Stats_RxAck", "Count of number of expected ACKs that were received.") -#define awc_RID_Stats_clear_RxCts awc_def_Stats_clear_RID(0x001E,0x003C,"Stats_RxCts", "Count of number of expected CTSs that were received.") -#define awc_RID_Stats_clear_TxAck awc_def_Stats_clear_RID(0x0020,0x0040,"Stats_TxAck", "Count of number of ACKs transmitted.") -#define awc_RID_Stats_clear_TxRts awc_def_Stats_clear_RID(0x0022,0x0044,"Stats_TxRts", "Count of number of RTSs transmitted.") -#define awc_RID_Stats_clear_TxCts awc_def_Stats_clear_RID(0x0024,0x0048,"Stats_TxCts", "Count of number of CTSs transmitted.") -#define awc_RID_Stats_clear_TxMc awc_def_Stats_clear_RID(0x0026,0x004C,"Stats_TxMc", " LMAC count of multicast packets sent (uses 802.11 Address1).") -#define awc_RID_Stats_clear_TxBc awc_def_Stats_clear_RID(0x0028,0x0050,"Stats_TxBc", " LMAC count of broadcast packets sent (uses 802.11") -#define awc_RID_Stats_clear_TxUcFrags awc_def_Stats_clear_RID(0x002A,0x0054,"Stats_TxUcFragsLMAC", " count of ALL unicast fragments and whole packets sent (uses 802.11 Address1).") -#define awc_RID_Stats_clear_TxUcPackets awc_def_Stats_clear_RID(0x002C,0x0058,"Stats_TxUcPackets", "LMAC count of unicast packets that were ACKd (uses 802.11 Address 1).") -#define awc_RID_Stats_clear_TxBeacon awc_def_Stats_clear_RID(0x002E,0x005C,"Stats_TxBeacon", " Count of beacon packets transmitted.") -#define awc_RID_Stats_clear_RxBeacon awc_def_Stats_clear_RID(0x0030,0x0060,"Stats_RxBeacon", " Count of beacon packets received matching our BSSID.") -#define awc_RID_Stats_clear_TxSinColl awc_def_Stats_clear_RID(0x0032,0x0064,"Stats_TxSinCollTransmit"," single collisions. **") -#define awc_RID_Stats_clear_TxMulColl awc_def_Stats_clear_RID(0x0034,0x0068,"Stats_TxMulCollTransmit"," multiple collisions. **") -#define awc_RID_Stats_clear_DefersNo awc_def_Stats_clear_RID(0x0036,0x006C,"Stats_DefersNo Transmit"," frames sent with no deferral. **") -#define awc_RID_Stats_clear_DefersProt awc_def_Stats_clear_RID(0x0038,0x0070,"Stats_DefersProt", " Transmit frames deferred due to protocol.") -#define awc_RID_Stats_clear_DefersEngy awc_def_Stats_clear_RID(0x003A,0x0074,"Stats_DefersEngy", " Transmit frames deferred due to energy detect.") -#define awc_RID_Stats_clear_DupFram awc_def_Stats_clear_RID(0x003C,0x0078,"Stats_DupFram", " Duplicate receive frames and fragments.") -#define awc_RID_Stats_clear_RxFragDisc awc_def_Stats_clear_RID(0x003E,0x007C,"Stats_RxFragDisc", " Received partial frames. (each tally could indicate the discarding of one or more fragments)") -#define awc_RID_Stats_clear_TxAged awc_def_Stats_clear_RID(0x0040,0x0080,"Stats_TxAged", " Transmit packets exceeding maximum transmit lifetime. **") -#define awc_RID_Stats_clear_RxAged awc_def_Stats_clear_RID(0x0042,0x0084,"Stats_RxAgedReceive", " packets exceeding maximum receive lifetime. **") -#define awc_RID_Stats_clear_LostSync_Max awc_def_Stats_clear_RID(0x0044,0x0088,"Stats_LostSync_Max", " Lost sync with our cell due to maximum retries occuring. Retry") -#define awc_RID_Stats_clear_LostSync_Mis awc_def_Stats_clear_RID(0x0046,0x008C,"Stats_LostSync_Mis", "Lost sync with our cell due to missing too many beacons. sedBeacons") -#define awc_RID_Stats_clear_LostSync_Arl awc_def_Stats_clear_RID(0x0048,0x0090,"Stats_LostSync_Arl", "Lost sync with our cell due to Average Retry Level being Exceeded exceeded.") -#define awc_RID_Stats_clear_LostSync_Dea awc_def_Stats_clear_RID(0x004A,0x0094,"Stats_LostSync_Dea", "Lost sync with our cell due to being deauthenticated.,thed") -#define awc_RID_Stats_clear_LostSync_Disa awc_def_Stats_clear_RID(0x004C,0x0098,"Stats_LostSync_Disa", " Lost sync with our cell due to being disassociated. ssoced") -#define awc_RID_Stats_clear_LostSync_Tsf awc_def_Stats_clear_RID(0x004E,0x009C,"Stats_LostSync_Tsf", "Lost sync with our cell due to excessive change in TSF Timingtiming.") -#define awc_RID_Stats_clear_HostTxMc awc_def_Stats_clear_RID(0x0050,0x00A0,"Stats_HostTxMc", "Count of multicast packets sent by the host.") -#define awc_RID_Stats_clear_HostTxBc awc_def_Stats_clear_RID(0x0052,0x00A4,"Stats_HostTxBc", "Count of broadcast packets sent by the host.") -#define awc_RID_Stats_clear_HostTxUc awc_def_Stats_clear_RID(0x0054,0x00A8,"Stats_HostTxUc", "Count of unicast packets sent by the host.") -#define awc_RID_Stats_clear_HostTxFail awc_def_Stats_clear_RID(0x0056,0x00AC,"Stats_HostTxFail", " Count of host transmitted packets which failed.") -#define awc_RID_Stats_clear_HostRxMc awc_def_Stats_clear_RID(0x0058,0x00B0,"Stats_HostRxMc", "Count of host received multicast packets.") -#define awc_RID_Stats_clear_HostRxBc awc_def_Stats_clear_RID(0x005A,0x00B4,"Stats_HostRxBc", "Count of host received broadcast packets.") -#define awc_RID_Stats_clear_HostRxUc awc_def_Stats_clear_RID(0x005C,0x00B8,"Stats_HostRxUc", "Count of host received unicast packets.") -#define awc_RID_Stats_clear_HostRxDiscar awc_def_Stats_clear_RID(0x005E,0x00BC,"Stats_HostRxDiscar", "Count of host received packets discarded due to:\n Host not enabling receive.\n Host failing to dequeue receive packets quickly.\n Packets being discarded due to magic packet mode.") -#define awc_RID_Stats_clear_HmacTxMc awc_def_Stats_clear_RID(0x0060,0x00C0,"Stats_HmacTxMc", "Count of internally generated multicast (DA) packets.") -#define awc_RID_Stats_clear_HmacTxBc awc_def_Stats_clear_RID(0x0062,0x00C4,"Stats_HmacTxBc", "Count of internally generated broadcast (DA) packets.") -#define awc_RID_Stats_clear_HmacTxUc awc_def_Stats_clear_RID(0x0064,0x00C8,"Stats_HmacTxUc", "Count of internally generated unicast (DA) packets.") -#define awc_RID_Stats_clear_HmacTxFail awc_def_Stats_clear_RID(0x0066,0x00CC,"Stats_HmacTxFail", " Count of internally generated transmit packets that failed.") -#define awc_RID_Stats_clear_HmacRxMc awc_def_Stats_clear_RID(0x0068,0x00D0,"Stats_HmacRxMc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats_clear_HmacRxBc awc_def_Stats_clear_RID(0x006A,0x00D4,"Stats_HmacRxBc", "Count of internally received broadcast (DA) packets.") -#define awc_RID_Stats_clear_HmacRxUc awc_def_Stats_clear_RID(0x006C,0x00D8,"Stats_HmacRxUc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats_clear_HmacRxDisca awc_def_Stats_clear_RID(0x006E,0x00DC,"Stats_HmacRxDisca", " Count of internally received packets that were discarded (usually because the destination address is not for the host).") -#define awc_RID_Stats_clear_HmacRxAcce awc_def_Stats_clear_RID(0x0070,0x00E0,"Stats_HmacRxAcce", " Count of internally received packets that were accepted") -#define awc_RID_Stats_clear_SsidMismatch awc_def_Stats_clear_RID(0x0072,0x00E4,"Stats_SsidMismatch", " Count of SSID mismatches.") -#define awc_RID_Stats_clear_ApMismatch awc_def_Stats_clear_RID(0x0074,0x00E8,"Stats_ApMismatch", " Count of specified AP mismatches.") -#define awc_RID_Stats_clear_RatesMismatc awc_def_Stats_clear_RID(0x0076,0x00EC,"Stats_RatesMismatc", " Count of rate mismatches.") -#define awc_RID_Stats_clear_AuthReject awc_def_Stats_clear_RID(0x0078,0x00F0,"Stats_AuthReject", " Count of authentication rejections.") -#define awc_RID_Stats_clear_AuthTimeout awc_def_Stats_clear_RID(0x007A,0x00F4,"Stats_AuthTimeout", " Count of authentication timeouts.") -#define awc_RID_Stats_clear_AssocReject awc_def_Stats_clear_RID(0x007C,0x00F8,"Stats_AssocReject", " Count of association rejections.") -#define awc_RID_Stats_clear_AssocTimeout awc_def_Stats_clear_RID(0x007E,0x00FC,"Stats_AssocTimeout", " Count of association timeouts.") -#define awc_RID_Stats_clear_NewReason awc_def_Stats_clear_RID(0x0080,0x0100,"Stats_NewReason", "Count of reason/status codes of greater than 19. (Values of 0 = successful are not counted)") -#define awc_RID_Stats_clear_AuthFail_1 awc_def_Stats_clear_RID(0x0082,0x0104,"Stats_AuthFail_1", "Unspecified reason.") -#define awc_RID_Stats_clear_AuthFail_2 awc_def_Stats_clear_RID(0x0084,0x0108,"Stats_AuthFail_2", "Previous authentication no longer valid.") -#define awc_RID_Stats_clear_AuthFail_3 awc_def_Stats_clear_RID(0x0086,0x010C,"Stats_AuthFail_3", "Deauthenticated because sending station is leaving (has left) IBSS or ESS.") -#define awc_RID_Stats_clear_AuthFail_4 awc_def_Stats_clear_RID(0x0088,0x0110,"Stats_AuthFail_4", "Disassociated due to inactivity") -#define awc_RID_Stats_clear_AuthFail_5 awc_def_Stats_clear_RID(0x008A,0x0114,"Stats_AuthFail_5", "Disassociated because AP is unable to handle all currently associated stations.") -#define awc_RID_Stats_clear_AuthFail_6 awc_def_Stats_clear_RID(0x008C,0x0118,"Stats_AuthFail_6", "Class 2 Frame received from non-Authenticated station.") -#define awc_RID_Stats_clear_AuthFail_7 awc_def_Stats_clear_RID(0x008E,0x011C,"Stats_AuthFail_7", "Class 3 Frame received from non-Associated station.") -#define awc_RID_Stats_clear_AuthFail_8 awc_def_Stats_clear_RID(0x0090,0x0120,"Stats_AuthFail_8", "Disassociated because sending station is leaving (has left)") -#define awc_RID_Stats_clear_AuthFail_9 awc_def_Stats_clear_RID(0x0092,0x0124,"Stats_AuthFail_9", "Station requesting (Re)Association is not Authenticated") -#define awc_RID_Stats_clear_AuthFail_10 awc_def_Stats_clear_RID(0x0094,0x0128,"Stats_AuthFail_10", "Cannot support all requested capabilities in the Capability") -#define awc_RID_Stats_clear_AuthFail_11 awc_def_Stats_clear_RID(0x0096,0x012C,"Stats_AuthFail_11", "Reassociation denied due to inability to confirm") -#define awc_RID_Stats_clear_AuthFail_12 awc_def_Stats_clear_RID(0x0098,0x0130,"Stats_AuthFail_12", "Association denied due to reason outside the scope of the 802.11") -#define awc_RID_Stats_clear_AuthFail_13 awc_def_Stats_clear_RID(0x009A,0x0134,"Stats_AuthFail_13", "Responding station does not support the specified Auth Alogorithm") -#define awc_RID_Stats_clear_AuthFail_14 awc_def_Stats_clear_RID(0x009C,0x0138,"Stats_AuthFail_14", "Received an out of sequence Authentication Frame.") -#define awc_RID_Stats_clear_AuthFail_15 awc_def_Stats_clear_RID(0x009E,0x013C,"Stats_AuthFail_15", "Authentication rejected due to challenge failure.") -#define awc_RID_Stats_clear_AuthFail_16 awc_def_Stats_clear_RID(0x00A0,0x0140,"Stats_AuthFail_16", "Authentication rejected due to timeout waiting for next frame in sequence.") -#define awc_RID_Stats_clear_AuthFail_17 awc_def_Stats_clear_RID(0x00A2,0x0144,"Stats_AuthFail_17", "Association denied because AP is unable to handle additional associated stations.") -#define awc_RID_Stats_clear_AuthFail_18 awc_def_Stats_clear_RID(0x00A4,0x0148,"Stats_AuthFail_18", "Association denied due to requesting station not supportingall basic rates.") -#define awc_RID_Stats_clear_AuthFail_19 awc_def_Stats_clear_RID(0x00A6,0x014C,"Stats_AuthFail_19", "Reserved") -#define awc_RID_Stats_clear_RxMan awc_def_Stats_clear_RID(0x00A8,0x0150,"Stats_RxMan", " Count of management packets received and handled.") -#define awc_RID_Stats_clear_TxMan awc_def_Stats_clear_RID(0x00AA,0x0154,"Stats_TxMan", " Count of management packets transmitted.") -#define awc_RID_Stats_clear_RxRefresh awc_def_Stats_clear_RID(0x00AC,0x0158,"Stats_RxRefresh", " Count of null data packets received.") -#define awc_RID_Stats_clear_TxRefresh awc_def_Stats_clear_RID(0x00AE,0x015C,"Stats_TxRefresh", " Count of null data packets transmitted.") -#define awc_RID_Stats_clear_RxPoll awc_def_Stats_clear_RID(0x00B0,0x0160,"Stats_RxPoll", "Count of PS-Poll packets received.") -#define awc_RID_Stats_clear_TxPoll awc_def_Stats_clear_RID(0x00B2,0x0164,"Stats_TxPoll", "Count of PS-Poll packets transmitted.") -#define awc_RID_Stats_clear_HostRetries awc_def_Stats_clear_RID(0x00B4,0x0168,"Stats_HostRetries", " Count of long and short retries used to transmit host packets (does not include first attempt).") -#define awc_RID_Stats_clear_LostSync_HostReq awc_def_Stats_clear_RID(0x00B6,0x016C,"Stats_LostSync_HostReq","Lost sync with our cell due to host request.") -#define awc_RID_Stats_clear_HostTxBytes awc_def_Stats_clear_RID(0x00B8,0x0170,"Stats_HostTxBytes", " Count of bytes transferred from the host.") -#define awc_RID_Stats_clear_HostRxBytes awc_def_Stats_clear_RID(0x00BA,0x0174,"Stats_HostRxBytes", " Count of bytes transferred to the host.") -#define awc_RID_Stats_clear_ElapsedUsec awc_def_Stats_clear_RID(0x00BC,0x0178,"Stats_ElapsedUsec", " Total time since power up (or clear) in microseconds.") -#define awc_RID_Stats_clear_ElapsedSec awc_def_Stats_clear_RID(0x00BE,0x017C,"Stats_ElapsedSec", " Total time since power up (or clear) in seconds.") -#define awc_RID_Stats_clear_LostSyncBett awc_def_Stats_clear_RID(0x00C0,0x0180,"Stats_LostSyncBett", "Lost Sync to switch to a better access point") - - - -#define awc_RID_Stats16_RidLen awc_def_Stats16_RID(0x0000,0x0000,"RidLen", "Length of the RID including the length field.") -#define awc_RID_Stats16_RxOverrunErr awc_def_Stats16_RID(0x0002,0x0004,"Stats_RxOverrunErr", "Receive overruns -- No buffer available to handle the receive. (result is that the packet is never received)") -#define awc_RID_Stats16_RxPlcpCrcErr awc_def_Stats16_RID(0x0004,0x0008,"Stats_RxPlcpCrcErr", "PLCP header checksum errors (CRC16).") -#define awc_RID_Stats16_RxPlcpFormat awc_def_Stats16_RID(0x0006,0x000C,"Stats_RxPlcpFormat", "PLCP format errors.") -#define awc_RID_Stats16_RxPlcpLength awc_def_Stats16_RID(0x0008,0x0010,"Stats_RxPlcpLength", "PLCP length is incorrect.") -#define awc_RID_Stats16_RxMacCrcErr awc_def_Stats16_RID(0x000A,0x0014,"Stats_RxMacCrcErr", "Count of MAC CRC32 errors.") -#define awc_RID_Stats16_RxMacCrcOk awc_def_Stats16_RID(0x000C,0x0018,"Stats_RxMacCrcOk", "Count of MAC CRC32 received correctly.") -#define awc_RID_Stats16_RxWepErr awc_def_Stats16_RID(0x000E,0x001C,"Stats_RxWepErr", "Count of all WEP ICV checks that failed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats16_RxWepOk awc_def_Stats16_RID(0x0010,0x0020,"Stats_RxWepOk", "Count of all WEP ICV checks that passed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats16_RetryLong awc_def_Stats16_RID(0x0012,0x0024,"Stats_RetryLongCount", "of all long retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats16_RetryShort awc_def_Stats16_RID(0x0014,0x0028,"Stats_RetryShort", "Count of all short retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats16_MaxRetries awc_def_Stats16_RID(0x0016,0x002C,"Stats_MaxRetries", "Count of number of packets that max-retried -- ie were never ACKd.") -#define awc_RID_Stats16_NoAck awc_def_Stats16_RID(0x0018,0x0030,"Stats_NoAck", "Count of number of times that ACK was not received.") -#define awc_RID_Stats16_NoCts awc_def_Stats16_RID(0x001A,0x0034,"Stats_NoCts", "Count of number of timer that CTS was not received.") -#define awc_RID_Stats16_RxAck awc_def_Stats16_RID(0x001C,0x0038,"Stats_RxAck", "Count of number of expected ACKs that were received.") -#define awc_RID_Stats16_RxCts awc_def_Stats16_RID(0x001E,0x003C,"Stats_RxCts", "Count of number of expected CTSs that were received.") -#define awc_RID_Stats16_TxAck awc_def_Stats16_RID(0x0020,0x0040,"Stats_TxAck", "Count of number of ACKs transmitted.") -#define awc_RID_Stats16_TxRts awc_def_Stats16_RID(0x0022,0x0044,"Stats_TxRts", "Count of number of RTSs transmitted.") -#define awc_RID_Stats16_TxCts awc_def_Stats16_RID(0x0024,0x0048,"Stats_TxCts", "Count of number of CTSs transmitted.") -#define awc_RID_Stats16_TxMc awc_def_Stats16_RID(0x0026,0x004C,"Stats_TxMc", " LMAC count of multicast packets sent (uses 802.11 Address1).") -#define awc_RID_Stats16_TxBc awc_def_Stats16_RID(0x0028,0x0050,"Stats_TxBc", " LMAC count of broadcast packets sent (uses 802.11") -#define awc_RID_Stats16_TxUcFrags awc_def_Stats16_RID(0x002A,0x0054,"Stats_TxUcFragsLMAC", " count of ALL unicast fragments and whole packets sent (uses 802.11 Address1).") -#define awc_RID_Stats16_TxUcPackets awc_def_Stats16_RID(0x002C,0x0058,"Stats_TxUcPackets", "LMAC count of unicast packets that were ACKd (uses 802.11 Address 1).") -#define awc_RID_Stats16_TxBeacon awc_def_Stats16_RID(0x002E,0x005C,"Stats_TxBeacon", " Count of beacon packets transmitted.") -#define awc_RID_Stats16_RxBeacon awc_def_Stats16_RID(0x0030,0x0060,"Stats_RxBeacon", " Count of beacon packets received matching our BSSID.") -#define awc_RID_Stats16_TxSinColl awc_def_Stats16_RID(0x0032,0x0064,"Stats_TxSinCollTransmit"," single collisions. **") -#define awc_RID_Stats16_TxMulColl awc_def_Stats16_RID(0x0034,0x0068,"Stats_TxMulCollTransmit"," multiple collisions. **") -#define awc_RID_Stats16_DefersNo awc_def_Stats16_RID(0x0036,0x006C,"Stats_DefersNo Transmit"," frames sent with no deferral. **") -#define awc_RID_Stats16_DefersProt awc_def_Stats16_RID(0x0038,0x0070,"Stats_DefersProt", " Transmit frames deferred due to protocol.") -#define awc_RID_Stats16_DefersEngy awc_def_Stats16_RID(0x003A,0x0074,"Stats_DefersEngy", " Transmit frames deferred due to energy detect.") -#define awc_RID_Stats16_DupFram awc_def_Stats16_RID(0x003C,0x0078,"Stats_DupFram", " Duplicate receive frames and fragments.") -#define awc_RID_Stats16_RxFragDisc awc_def_Stats16_RID(0x003E,0x007C,"Stats_RxFragDisc", " Received partial frames. (each tally could indicate the discarding of one or more fragments)") -#define awc_RID_Stats16_TxAged awc_def_Stats16_RID(0x0040,0x0080,"Stats_TxAged", " Transmit packets exceeding maximum transmit lifetime. **") -#define awc_RID_Stats16_RxAged awc_def_Stats16_RID(0x0042,0x0084,"Stats_RxAgedReceive", " packets exceeding maximum receive lifetime. **") -#define awc_RID_Stats16_LostSync_Max awc_def_Stats16_RID(0x0044,0x0088,"Stats_LostSync_Max", " Lost sync with our cell due to maximum retries occuring. Retry") -#define awc_RID_Stats16_LostSync_Mis awc_def_Stats16_RID(0x0046,0x008C,"Stats_LostSync_Mis", "Lost sync with our cell due to missing too many beacons. sedBeacons") -#define awc_RID_Stats16_LostSync_Arl awc_def_Stats16_RID(0x0048,0x0090,"Stats_LostSync_Arl", "Lost sync with our cell due to Average Retry Level being Exceeded exceeded.") -#define awc_RID_Stats16_LostSync_Dea awc_def_Stats16_RID(0x004A,0x0094,"Stats_LostSync_Dea", "Lost sync with our cell due to being deauthenticated.,thed") -#define awc_RID_Stats16_LostSync_Disa awc_def_Stats16_RID(0x004C,0x0098,"Stats_LostSync_Disa", " Lost sync with our cell due to being disassociated. ssoced") -#define awc_RID_Stats16_LostSync_Tsf awc_def_Stats16_RID(0x004E,0x009C,"Stats_LostSync_Tsf", "Lost sync with our cell due to excessive change in TSF Timingtiming.") -#define awc_RID_Stats16_HostTxMc awc_def_Stats16_RID(0x0050,0x00A0,"Stats_HostTxMc", "Count of multicast packets sent by the host.") -#define awc_RID_Stats16_HostTxBc awc_def_Stats16_RID(0x0052,0x00A4,"Stats_HostTxBc", "Count of broadcast packets sent by the host.") -#define awc_RID_Stats16_HostTxUc awc_def_Stats16_RID(0x0054,0x00A8,"Stats_HostTxUc", "Count of unicast packets sent by the host.") -#define awc_RID_Stats16_HostTxFail awc_def_Stats16_RID(0x0056,0x00AC,"Stats_HostTxFail", " Count of host transmitted packets which failed.") -#define awc_RID_Stats16_HostRxMc awc_def_Stats16_RID(0x0058,0x00B0,"Stats_HostRxMc", "Count of host received multicast packets.") -#define awc_RID_Stats16_HostRxBc awc_def_Stats16_RID(0x005A,0x00B4,"Stats_HostRxBc", "Count of host received broadcast packets.") -#define awc_RID_Stats16_HostRxUc awc_def_Stats16_RID(0x005C,0x00B8,"Stats_HostRxUc", "Count of host received unicast packets.") -#define awc_RID_Stats16_HostRxDiscar awc_def_Stats16_RID(0x005E,0x00BC,"Stats_HostRxDiscar", "Count of host received packets discarded due to:\n Host not enabling receive.\n Host failing to dequeue receive packets quickly.\n Packets being discarded due to magic packet mode.") -#define awc_RID_Stats16_HmacTxMc awc_def_Stats16_RID(0x0060,0x00C0,"Stats_HmacTxMc", "Count of internally generated multicast (DA) packets.") -#define awc_RID_Stats16_HmacTxBc awc_def_Stats16_RID(0x0062,0x00C4,"Stats_HmacTxBc", "Count of internally generated broadcast (DA) packets.") -#define awc_RID_Stats16_HmacTxUc awc_def_Stats16_RID(0x0064,0x00C8,"Stats_HmacTxUc", "Count of internally generated unicast (DA) packets.") -#define awc_RID_Stats16_HmacTxFail awc_def_Stats16_RID(0x0066,0x00CC,"Stats_HmacTxFail", " Count of internally generated transmit packets that failed.") -#define awc_RID_Stats16_HmacRxMc awc_def_Stats16_RID(0x0068,0x00D0,"Stats_HmacRxMc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats16_HmacRxBc awc_def_Stats16_RID(0x006A,0x00D4,"Stats_HmacRxBc", "Count of internally received broadcast (DA) packets.") -#define awc_RID_Stats16_HmacRxUc awc_def_Stats16_RID(0x006C,0x00D8,"Stats_HmacRxUc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats16_HmacRxDisca awc_def_Stats16_RID(0x006E,0x00DC,"Stats_HmacRxDisca", " Count of internally received packets that were discarded (usually because the destination address is not for the host).") -#define awc_RID_Stats16_HmacRxAcce awc_def_Stats16_RID(0x0070,0x00E0,"Stats_HmacRxAcce", " Count of internally received packets that were accepted") -#define awc_RID_Stats16_SsidMismatch awc_def_Stats16_RID(0x0072,0x00E4,"Stats_SsidMismatch", " Count of SSID mismatches.") -#define awc_RID_Stats16_ApMismatch awc_def_Stats16_RID(0x0074,0x00E8,"Stats_ApMismatch", " Count of specified AP mismatches.") -#define awc_RID_Stats16_RatesMismatc awc_def_Stats16_RID(0x0076,0x00EC,"Stats_RatesMismatc", " Count of rate mismatches.") -#define awc_RID_Stats16_AuthReject awc_def_Stats16_RID(0x0078,0x00F0,"Stats_AuthReject", " Count of authentication rejections.") -#define awc_RID_Stats16_AuthTimeout awc_def_Stats16_RID(0x007A,0x00F4,"Stats_AuthTimeout", " Count of authentication timeouts.") -#define awc_RID_Stats16_AssocReject awc_def_Stats16_RID(0x007C,0x00F8,"Stats_AssocReject", " Count of association rejections.") -#define awc_RID_Stats16_AssocTimeout awc_def_Stats16_RID(0x007E,0x00FC,"Stats_AssocTimeout", " Count of association timeouts.") -#define awc_RID_Stats16_NewReason awc_def_Stats16_RID(0x0080,0x0100,"Stats_NewReason", "Count of reason/status codes of greater than 19. (Values of 0 = successful are not counted)") -#define awc_RID_Stats16_AuthFail_1 awc_def_Stats16_RID(0x0082,0x0104,"Stats_AuthFail_1", "Unspecified reason.") -#define awc_RID_Stats16_AuthFail_2 awc_def_Stats16_RID(0x0084,0x0108,"Stats_AuthFail_2", "Previous authentication no longer valid.") -#define awc_RID_Stats16_AuthFail_3 awc_def_Stats16_RID(0x0086,0x010C,"Stats_AuthFail_3", "Deauthenticated because sending station is leaving (has left) IBSS or ESS.") -#define awc_RID_Stats16_AuthFail_4 awc_def_Stats16_RID(0x0088,0x0110,"Stats_AuthFail_4", "Disassociated due to inactivity") -#define awc_RID_Stats16_AuthFail_5 awc_def_Stats16_RID(0x008A,0x0114,"Stats_AuthFail_5", "Disassociated because AP is unable to handle all currently associated stations.") -#define awc_RID_Stats16_AuthFail_6 awc_def_Stats16_RID(0x008C,0x0118,"Stats_AuthFail_6", "Class 2 Frame received from non-Authenticated station.") -#define awc_RID_Stats16_AuthFail_7 awc_def_Stats16_RID(0x008E,0x011C,"Stats_AuthFail_7", "Class 3 Frame received from non-Associated station.") -#define awc_RID_Stats16_AuthFail_8 awc_def_Stats16_RID(0x0090,0x0120,"Stats_AuthFail_8", "Disassociated because sending station is leaving (has left)") -#define awc_RID_Stats16_AuthFail_9 awc_def_Stats16_RID(0x0092,0x0124,"Stats_AuthFail_9", "Station requesting (Re)Association is not Authenticated") -#define awc_RID_Stats16_AuthFail_10 awc_def_Stats16_RID(0x0094,0x0128,"Stats_AuthFail_10", "Cannot support all requested capabilities in the Capability") -#define awc_RID_Stats16_AuthFail_11 awc_def_Stats16_RID(0x0096,0x012C,"Stats_AuthFail_11", "Reassociation denied due to inability to confirm") -#define awc_RID_Stats16_AuthFail_12 awc_def_Stats16_RID(0x0098,0x0130,"Stats_AuthFail_12", "Association denied due to reason outside the scope of the 802.11") -#define awc_RID_Stats16_AuthFail_13 awc_def_Stats16_RID(0x009A,0x0134,"Stats_AuthFail_13", "Responding station does not support the specified Auth Alogorithm") -#define awc_RID_Stats16_AuthFail_14 awc_def_Stats16_RID(0x009C,0x0138,"Stats_AuthFail_14", "Received an out of sequence Authentication Frame.") -#define awc_RID_Stats16_AuthFail_15 awc_def_Stats16_RID(0x009E,0x013C,"Stats_AuthFail_15", "Authentication rejected due to challenge failure.") -#define awc_RID_Stats16_AuthFail_16 awc_def_Stats16_RID(0x00A0,0x0140,"Stats_AuthFail_16", "Authentication rejected due to timeout waiting for next frame in sequence.") -#define awc_RID_Stats16_AuthFail_17 awc_def_Stats16_RID(0x00A2,0x0144,"Stats_AuthFail_17", "Association denied because AP is unable to handle additional associated stations.") -#define awc_RID_Stats16_AuthFail_18 awc_def_Stats16_RID(0x00A4,0x0148,"Stats_AuthFail_18", "Association denied due to requesting station not supportingall basic rates.") -#define awc_RID_Stats16_AuthFail_19 awc_def_Stats16_RID(0x00A6,0x014C,"Stats_AuthFail_19", "Reserved") -#define awc_RID_Stats16_RxMan awc_def_Stats16_RID(0x00A8,0x0150,"Stats_RxMan", " Count of management packets received and handled.") -#define awc_RID_Stats16_TxMan awc_def_Stats16_RID(0x00AA,0x0154,"Stats_TxMan", " Count of management packets transmitted.") -#define awc_RID_Stats16_RxRefresh awc_def_Stats16_RID(0x00AC,0x0158,"Stats_RxRefresh", " Count of null data packets received.") -#define awc_RID_Stats16_TxRefresh awc_def_Stats16_RID(0x00AE,0x015C,"Stats_TxRefresh", " Count of null data packets transmitted.") -#define awc_RID_Stats16_RxPoll awc_def_Stats16_RID(0x00B0,0x0160,"Stats_RxPoll", "Count of PS-Poll packets received.") -#define awc_RID_Stats16_TxPoll awc_def_Stats16_RID(0x00B2,0x0164,"Stats_TxPoll", "Count of PS-Poll packets transmitted.") -#define awc_RID_Stats16_HostRetries awc_def_Stats16_RID(0x00B4,0x0168,"Stats_HostRetries", " Count of long and short retries used to transmit host packets (does not include first attempt).") -#define awc_RID_Stats16_LostSync_HostReq awc_def_Stats16_RID(0x00B6,0x016C,"Stats_LostSync_HostReq","Lost sync with our cell due to host request.") -#define awc_RID_Stats16_HostTxBytes awc_def_Stats16_RID(0x00B8,0x0170,"Stats_HostTxBytes", " Count of bytes transferred from the host.") -#define awc_RID_Stats16_HostRxBytes awc_def_Stats16_RID(0x00BA,0x0174,"Stats_HostRxBytes", " Count of bytes transferred to the host.") -#define awc_RID_Stats16_ElapsedUsec awc_def_Stats16_RID(0x00BC,0x0178,"Stats_ElapsedUsec", " Total time since power up (or clear) in microseconds.") -#define awc_RID_Stats16_ElapsedSec awc_def_Stats16_RID(0x00BE,0x017C,"Stats_ElapsedSec", " Total time since power up (or clear) in seconds.") -#define awc_RID_Stats16_LostSyncBett awc_def_Stats16_RID(0x00C0,0x0180,"Stats_LostSyncBett", "Lost Sync to switch to a better access point") - - - -#define awc_RID_Stats16_delta_RidLen awc_def_Stats16_delta_RID(0x0000,0x0000,"RidLen", "Length of the RID including the length field.") -#define awc_RID_Stats16_delta_RxOverrunErr awc_def_Stats16_delta_RID(0x0002,0x0004,"Stats_RxOverrunErr", "Receive overruns -- No buffer available to handle the receive. (result is that the packet is never received)") -#define awc_RID_Stats16_delta_RxPlcpCrcErr awc_def_Stats16_delta_RID(0x0004,0x0008,"Stats_RxPlcpCrcErr", "PLCP header checksum errors (CRC16).") -#define awc_RID_Stats16_delta_RxPlcpFormat awc_def_Stats16_delta_RID(0x0006,0x000C,"Stats_RxPlcpFormat", "PLCP format errors.") -#define awc_RID_Stats16_delta_RxPlcpLength awc_def_Stats16_delta_RID(0x0008,0x0010,"Stats_RxPlcpLength", "PLCP length is incorrect.") -#define awc_RID_Stats16_delta_RxMacCrcErr awc_def_Stats16_delta_RID(0x000A,0x0014,"Stats_RxMacCrcErr", "Count of MAC CRC32 errors.") -#define awc_RID_Stats16_delta_RxMacCrcOk awc_def_Stats16_delta_RID(0x000C,0x0018,"Stats_RxMacCrcOk", "Count of MAC CRC32 received correctly.") -#define awc_RID_Stats16_delta_RxWepErr awc_def_Stats16_delta_RID(0x000E,0x001C,"Stats_RxWepErr", "Count of all WEP ICV checks that failed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats16_delta_RxWepOk awc_def_Stats16_delta_RID(0x0010,0x0020,"Stats_RxWepOk", "Count of all WEP ICV checks that passed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats16_delta_RetryLong awc_def_Stats16_delta_RID(0x0012,0x0024,"Stats_RetryLongCount", "of all long retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats16_delta_RetryShort awc_def_Stats16_delta_RID(0x0014,0x0028,"Stats_RetryShort", "Count of all short retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats16_delta_MaxRetries awc_def_Stats16_delta_RID(0x0016,0x002C,"Stats_MaxRetries", "Count of number of packets that max-retried -- ie were never ACKd.") -#define awc_RID_Stats16_delta_NoAck awc_def_Stats16_delta_RID(0x0018,0x0030,"Stats_NoAck", "Count of number of times that ACK was not received.") -#define awc_RID_Stats16_delta_NoCts awc_def_Stats16_delta_RID(0x001A,0x0034,"Stats_NoCts", "Count of number of timer that CTS was not received.") -#define awc_RID_Stats16_delta_RxAck awc_def_Stats16_delta_RID(0x001C,0x0038,"Stats_RxAck", "Count of number of expected ACKs that were received.") -#define awc_RID_Stats16_delta_RxCts awc_def_Stats16_delta_RID(0x001E,0x003C,"Stats_RxCts", "Count of number of expected CTSs that were received.") -#define awc_RID_Stats16_delta_TxAck awc_def_Stats16_delta_RID(0x0020,0x0040,"Stats_TxAck", "Count of number of ACKs transmitted.") -#define awc_RID_Stats16_delta_TxRts awc_def_Stats16_delta_RID(0x0022,0x0044,"Stats_TxRts", "Count of number of RTSs transmitted.") -#define awc_RID_Stats16_delta_TxCts awc_def_Stats16_delta_RID(0x0024,0x0048,"Stats_TxCts", "Count of number of CTSs transmitted.") -#define awc_RID_Stats16_delta_TxMc awc_def_Stats16_delta_RID(0x0026,0x004C,"Stats_TxMc", " LMAC count of multicast packets sent (uses 802.11 Address1).") -#define awc_RID_Stats16_delta_TxBc awc_def_Stats16_delta_RID(0x0028,0x0050,"Stats_TxBc", " LMAC count of broadcast packets sent (uses 802.11") -#define awc_RID_Stats16_delta_TxUcFrags awc_def_Stats16_delta_RID(0x002A,0x0054,"Stats_TxUcFragsLMAC", " count of ALL unicast fragments and whole packets sent (uses 802.11 Address1).") -#define awc_RID_Stats16_delta_TxUcPackets awc_def_Stats16_delta_RID(0x002C,0x0058,"Stats_TxUcPackets", "LMAC count of unicast packets that were ACKd (uses 802.11 Address 1).") -#define awc_RID_Stats16_delta_TxBeacon awc_def_Stats16_delta_RID(0x002E,0x005C,"Stats_TxBeacon", " Count of beacon packets transmitted.") -#define awc_RID_Stats16_delta_RxBeacon awc_def_Stats16_delta_RID(0x0030,0x0060,"Stats_RxBeacon", " Count of beacon packets received matching our BSSID.") -#define awc_RID_Stats16_delta_TxSinColl awc_def_Stats16_delta_RID(0x0032,0x0064,"Stats_TxSinCollTransmit"," single collisions. **") -#define awc_RID_Stats16_delta_TxMulColl awc_def_Stats16_delta_RID(0x0034,0x0068,"Stats_TxMulCollTransmit"," multiple collisions. **") -#define awc_RID_Stats16_delta_DefersNo awc_def_Stats16_delta_RID(0x0036,0x006C,"Stats_DefersNo Transmit"," frames sent with no deferral. **") -#define awc_RID_Stats16_delta_DefersProt awc_def_Stats16_delta_RID(0x0038,0x0070,"Stats_DefersProt", " Transmit frames deferred due to protocol.") -#define awc_RID_Stats16_delta_DefersEngy awc_def_Stats16_delta_RID(0x003A,0x0074,"Stats_DefersEngy", " Transmit frames deferred due to energy detect.") -#define awc_RID_Stats16_delta_DupFram awc_def_Stats16_delta_RID(0x003C,0x0078,"Stats_DupFram", " Duplicate receive frames and fragments.") -#define awc_RID_Stats16_delta_RxFragDisc awc_def_Stats16_delta_RID(0x003E,0x007C,"Stats_RxFragDisc", " Received partial frames. (each tally could indicate the discarding of one or more fragments)") -#define awc_RID_Stats16_delta_TxAged awc_def_Stats16_delta_RID(0x0040,0x0080,"Stats_TxAged", " Transmit packets exceeding maximum transmit lifetime. **") -#define awc_RID_Stats16_delta_RxAged awc_def_Stats16_delta_RID(0x0042,0x0084,"Stats_RxAgedReceive", " packets exceeding maximum receive lifetime. **") -#define awc_RID_Stats16_delta_LostSync_Max awc_def_Stats16_delta_RID(0x0044,0x0088,"Stats_LostSync_Max", " Lost sync with our cell due to maximum retries occuring. Retry") -#define awc_RID_Stats16_delta_LostSync_Mis awc_def_Stats16_delta_RID(0x0046,0x008C,"Stats_LostSync_Mis", "Lost sync with our cell due to missing too many beacons. sedBeacons") -#define awc_RID_Stats16_delta_LostSync_Arl awc_def_Stats16_delta_RID(0x0048,0x0090,"Stats_LostSync_Arl", "Lost sync with our cell due to Average Retry Level being Exceeded exceeded.") -#define awc_RID_Stats16_delta_LostSync_Dea awc_def_Stats16_delta_RID(0x004A,0x0094,"Stats_LostSync_Dea", "Lost sync with our cell due to being deauthenticated.,thed") -#define awc_RID_Stats16_delta_LostSync_Disa awc_def_Stats16_delta_RID(0x004C,0x0098,"Stats_LostSync_Disa", " Lost sync with our cell due to being disassociated. ssoced") -#define awc_RID_Stats16_delta_LostSync_Tsf awc_def_Stats16_delta_RID(0x004E,0x009C,"Stats_LostSync_Tsf", "Lost sync with our cell due to excessive change in TSF Timingtiming.") -#define awc_RID_Stats16_delta_HostTxMc awc_def_Stats16_delta_RID(0x0050,0x00A0,"Stats_HostTxMc", "Count of multicast packets sent by the host.") -#define awc_RID_Stats16_delta_HostTxBc awc_def_Stats16_delta_RID(0x0052,0x00A4,"Stats_HostTxBc", "Count of broadcast packets sent by the host.") -#define awc_RID_Stats16_delta_HostTxUc awc_def_Stats16_delta_RID(0x0054,0x00A8,"Stats_HostTxUc", "Count of unicast packets sent by the host.") -#define awc_RID_Stats16_delta_HostTxFail awc_def_Stats16_delta_RID(0x0056,0x00AC,"Stats_HostTxFail", " Count of host transmitted packets which failed.") -#define awc_RID_Stats16_delta_HostRxMc awc_def_Stats16_delta_RID(0x0058,0x00B0,"Stats_HostRxMc", "Count of host received multicast packets.") -#define awc_RID_Stats16_delta_HostRxBc awc_def_Stats16_delta_RID(0x005A,0x00B4,"Stats_HostRxBc", "Count of host received broadcast packets.") -#define awc_RID_Stats16_delta_HostRxUc awc_def_Stats16_delta_RID(0x005C,0x00B8,"Stats_HostRxUc", "Count of host received unicast packets.") -#define awc_RID_Stats16_delta_HostRxDiscar awc_def_Stats16_delta_RID(0x005E,0x00BC,"Stats_HostRxDiscar", "Count of host received packets discarded due to:\n Host not enabling receive.\n Host failing to dequeue receive packets quickly.\n Packets being discarded due to magic packet mode.") -#define awc_RID_Stats16_delta_HmacTxMc awc_def_Stats16_delta_RID(0x0060,0x00C0,"Stats_HmacTxMc", "Count of internally generated multicast (DA) packets.") -#define awc_RID_Stats16_delta_HmacTxBc awc_def_Stats16_delta_RID(0x0062,0x00C4,"Stats_HmacTxBc", "Count of internally generated broadcast (DA) packets.") -#define awc_RID_Stats16_delta_HmacTxUc awc_def_Stats16_delta_RID(0x0064,0x00C8,"Stats_HmacTxUc", "Count of internally generated unicast (DA) packets.") -#define awc_RID_Stats16_delta_HmacTxFail awc_def_Stats16_delta_RID(0x0066,0x00CC,"Stats_HmacTxFail", " Count of internally generated transmit packets that failed.") -#define awc_RID_Stats16_delta_HmacRxMc awc_def_Stats16_delta_RID(0x0068,0x00D0,"Stats_HmacRxMc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats16_delta_HmacRxBc awc_def_Stats16_delta_RID(0x006A,0x00D4,"Stats_HmacRxBc", "Count of internally received broadcast (DA) packets.") -#define awc_RID_Stats16_delta_HmacRxUc awc_def_Stats16_delta_RID(0x006C,0x00D8,"Stats_HmacRxUc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats16_delta_HmacRxDisca awc_def_Stats16_delta_RID(0x006E,0x00DC,"Stats_HmacRxDisca", " Count of internally received packets that were discarded (usually because the destination address is not for the host).") -#define awc_RID_Stats16_delta_HmacRxAcce awc_def_Stats16_delta_RID(0x0070,0x00E0,"Stats_HmacRxAcce", " Count of internally received packets that were accepted") -#define awc_RID_Stats16_delta_SsidMismatch awc_def_Stats16_delta_RID(0x0072,0x00E4,"Stats_SsidMismatch", " Count of SSID mismatches.") -#define awc_RID_Stats16_delta_ApMismatch awc_def_Stats16_delta_RID(0x0074,0x00E8,"Stats_ApMismatch", " Count of specified AP mismatches.") -#define awc_RID_Stats16_delta_RatesMismatc awc_def_Stats16_delta_RID(0x0076,0x00EC,"Stats_RatesMismatc", " Count of rate mismatches.") -#define awc_RID_Stats16_delta_AuthReject awc_def_Stats16_delta_RID(0x0078,0x00F0,"Stats_AuthReject", " Count of authentication rejections.") -#define awc_RID_Stats16_delta_AuthTimeout awc_def_Stats16_delta_RID(0x007A,0x00F4,"Stats_AuthTimeout", " Count of authentication timeouts.") -#define awc_RID_Stats16_delta_AssocReject awc_def_Stats16_delta_RID(0x007C,0x00F8,"Stats_AssocReject", " Count of association rejections.") -#define awc_RID_Stats16_delta_AssocTimeout awc_def_Stats16_delta_RID(0x007E,0x00FC,"Stats_AssocTimeout", " Count of association timeouts.") -#define awc_RID_Stats16_delta_NewReason awc_def_Stats16_delta_RID(0x0080,0x0100,"Stats_NewReason", "Count of reason/status codes of greater than 19. (Values of 0 = successful are not counted)") -#define awc_RID_Stats16_delta_AuthFail_1 awc_def_Stats16_delta_RID(0x0082,0x0104,"Stats_AuthFail_1", "Unspecified reason.") -#define awc_RID_Stats16_delta_AuthFail_2 awc_def_Stats16_delta_RID(0x0084,0x0108,"Stats_AuthFail_2", "Previous authentication no longer valid.") -#define awc_RID_Stats16_delta_AuthFail_3 awc_def_Stats16_delta_RID(0x0086,0x010C,"Stats_AuthFail_3", "Deauthenticated because sending station is leaving (has left) IBSS or ESS.") -#define awc_RID_Stats16_delta_AuthFail_4 awc_def_Stats16_delta_RID(0x0088,0x0110,"Stats_AuthFail_4", "Disassociated due to inactivity") -#define awc_RID_Stats16_delta_AuthFail_5 awc_def_Stats16_delta_RID(0x008A,0x0114,"Stats_AuthFail_5", "Disassociated because AP is unable to handle all currently associated stations.") -#define awc_RID_Stats16_delta_AuthFail_6 awc_def_Stats16_delta_RID(0x008C,0x0118,"Stats_AuthFail_6", "Class 2 Frame received from non-Authenticated station.") -#define awc_RID_Stats16_delta_AuthFail_7 awc_def_Stats16_delta_RID(0x008E,0x011C,"Stats_AuthFail_7", "Class 3 Frame received from non-Associated station.") -#define awc_RID_Stats16_delta_AuthFail_8 awc_def_Stats16_delta_RID(0x0090,0x0120,"Stats_AuthFail_8", "Disassociated because sending station is leaving (has left)") -#define awc_RID_Stats16_delta_AuthFail_9 awc_def_Stats16_delta_RID(0x0092,0x0124,"Stats_AuthFail_9", "Station requesting (Re)Association is not Authenticated") -#define awc_RID_Stats16_delta_AuthFail_10 awc_def_Stats16_delta_RID(0x0094,0x0128,"Stats_AuthFail_10", "Cannot support all requested capabilities in the Capability") -#define awc_RID_Stats16_delta_AuthFail_11 awc_def_Stats16_delta_RID(0x0096,0x012C,"Stats_AuthFail_11", "Reassociation denied due to inability to confirm") -#define awc_RID_Stats16_delta_AuthFail_12 awc_def_Stats16_delta_RID(0x0098,0x0130,"Stats_AuthFail_12", "Association denied due to reason outside the scope of the 802.11") -#define awc_RID_Stats16_delta_AuthFail_13 awc_def_Stats16_delta_RID(0x009A,0x0134,"Stats_AuthFail_13", "Responding station does not support the specified Auth Alogorithm") -#define awc_RID_Stats16_delta_AuthFail_14 awc_def_Stats16_delta_RID(0x009C,0x0138,"Stats_AuthFail_14", "Received an out of sequence Authentication Frame.") -#define awc_RID_Stats16_delta_AuthFail_15 awc_def_Stats16_delta_RID(0x009E,0x013C,"Stats_AuthFail_15", "Authentication rejected due to challenge failure.") -#define awc_RID_Stats16_delta_AuthFail_16 awc_def_Stats16_delta_RID(0x00A0,0x0140,"Stats_AuthFail_16", "Authentication rejected due to timeout waiting for next frame in sequence.") -#define awc_RID_Stats16_delta_AuthFail_17 awc_def_Stats16_delta_RID(0x00A2,0x0144,"Stats_AuthFail_17", "Association denied because AP is unable to handle additional associated stations.") -#define awc_RID_Stats16_delta_AuthFail_18 awc_def_Stats16_delta_RID(0x00A4,0x0148,"Stats_AuthFail_18", "Association denied due to requesting station not supportingall basic rates.") -#define awc_RID_Stats16_delta_AuthFail_19 awc_def_Stats16_delta_RID(0x00A6,0x014C,"Stats_AuthFail_19", "Reserved") -#define awc_RID_Stats16_delta_RxMan awc_def_Stats16_delta_RID(0x00A8,0x0150,"Stats_RxMan", " Count of management packets received and handled.") -#define awc_RID_Stats16_delta_TxMan awc_def_Stats16_delta_RID(0x00AA,0x0154,"Stats_TxMan", " Count of management packets transmitted.") -#define awc_RID_Stats16_delta_RxRefresh awc_def_Stats16_delta_RID(0x00AC,0x0158,"Stats_RxRefresh", " Count of null data packets received.") -#define awc_RID_Stats16_delta_TxRefresh awc_def_Stats16_delta_RID(0x00AE,0x015C,"Stats_TxRefresh", " Count of null data packets transmitted.") -#define awc_RID_Stats16_delta_RxPoll awc_def_Stats16_delta_RID(0x00B0,0x0160,"Stats_RxPoll", "Count of PS-Poll packets received.") -#define awc_RID_Stats16_delta_TxPoll awc_def_Stats16_delta_RID(0x00B2,0x0164,"Stats_TxPoll", "Count of PS-Poll packets transmitted.") -#define awc_RID_Stats16_delta_HostRetries awc_def_Stats16_delta_RID(0x00B4,0x0168,"Stats_HostRetries", " Count of long and short retries used to transmit host packets (does not include first attempt).") -#define awc_RID_Stats16_delta_LostSync_HostReq awc_def_Stats16_delta_RID(0x00B6,0x016C,"Stats_LostSync_HostReq","Lost sync with our cell due to host request.") -#define awc_RID_Stats16_delta_HostTxBytes awc_def_Stats16_delta_RID(0x00B8,0x0170,"Stats_HostTxBytes", " Count of bytes transferred from the host.") -#define awc_RID_Stats16_delta_HostRxBytes awc_def_Stats16_delta_RID(0x00BA,0x0174,"Stats_HostRxBytes", " Count of bytes transferred to the host.") -#define awc_RID_Stats16_delta_ElapsedUsec awc_def_Stats16_delta_RID(0x00BC,0x0178,"Stats_ElapsedUsec", " Total time since power up (or clear) in microseconds.") -#define awc_RID_Stats16_delta_ElapsedSec awc_def_Stats16_delta_RID(0x00BE,0x017C,"Stats_ElapsedSec", " Total time since power up (or clear) in seconds.") -#define awc_RID_Stats16_delta_LostSyncBett awc_def_Stats16_delta_RID(0x00C0,0x0180,"Stats_LostSyncBett", "Lost Sync to switch to a better access point") - - -#define awc_RID_Stats16_clear_RidLen awc_def_Stats16_clear_RID(0x0000,0x0000,"RidLen", "Length of the RID including the length field.") -#define awc_RID_Stats16_clear_RxOverrunErr awc_def_Stats16_clear_RID(0x0002,0x0004,"Stats_RxOverrunErr", "Receive overruns -- No buffer available to handle the receive. (result is that the packet is never received)") -#define awc_RID_Stats16_clear_RxPlcpCrcErr awc_def_Stats16_clear_RID(0x0004,0x0008,"Stats_RxPlcpCrcErr", "PLCP header checksum errors (CRC16).") -#define awc_RID_Stats16_clear_RxPlcpFormat awc_def_Stats16_clear_RID(0x0006,0x000C,"Stats_RxPlcpFormat", "PLCP format errors.") -#define awc_RID_Stats16_clear_RxPlcpLength awc_def_Stats16_clear_RID(0x0008,0x0010,"Stats_RxPlcpLength", "PLCP length is incorrect.") -#define awc_RID_Stats16_clear_RxMacCrcErr awc_def_Stats16_clear_RID(0x000A,0x0014,"Stats_RxMacCrcErr", "Count of MAC CRC32 errors.") -#define awc_RID_Stats16_clear_RxMacCrcOk awc_def_Stats16_clear_RID(0x000C,0x0018,"Stats_RxMacCrcOk", "Count of MAC CRC32 received correctly.") -#define awc_RID_Stats16_clear_RxWepErr awc_def_Stats16_clear_RID(0x000E,0x001C,"Stats_RxWepErr", "Count of all WEP ICV checks that failed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats16_clear_RxWepOk awc_def_Stats16_clear_RID(0x0010,0x0020,"Stats_RxWepOk", "Count of all WEP ICV checks that passed. (this value is included in Stats_RxMacCrcOk)") -#define awc_RID_Stats16_clear_RetryLong awc_def_Stats16_clear_RID(0x0012,0x0024,"Stats_RetryLongCount", "of all long retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats16_clear_RetryShort awc_def_Stats16_clear_RID(0x0014,0x0028,"Stats_RetryShort", "Count of all short retries. (Does not include first attempt for a packet).") -#define awc_RID_Stats16_clear_MaxRetries awc_def_Stats16_clear_RID(0x0016,0x002C,"Stats_MaxRetries", "Count of number of packets that max-retried -- ie were never ACKd.") -#define awc_RID_Stats16_clear_NoAck awc_def_Stats16_clear_RID(0x0018,0x0030,"Stats_NoAck", "Count of number of times that ACK was not received.") -#define awc_RID_Stats16_clear_NoCts awc_def_Stats16_clear_RID(0x001A,0x0034,"Stats_NoCts", "Count of number of timer that CTS was not received.") -#define awc_RID_Stats16_clear_RxAck awc_def_Stats16_clear_RID(0x001C,0x0038,"Stats_RxAck", "Count of number of expected ACKs that were received.") -#define awc_RID_Stats16_clear_RxCts awc_def_Stats16_clear_RID(0x001E,0x003C,"Stats_RxCts", "Count of number of expected CTSs that were received.") -#define awc_RID_Stats16_clear_TxAck awc_def_Stats16_clear_RID(0x0020,0x0040,"Stats_TxAck", "Count of number of ACKs transmitted.") -#define awc_RID_Stats16_clear_TxRts awc_def_Stats16_clear_RID(0x0022,0x0044,"Stats_TxRts", "Count of number of RTSs transmitted.") -#define awc_RID_Stats16_clear_TxCts awc_def_Stats16_clear_RID(0x0024,0x0048,"Stats_TxCts", "Count of number of CTSs transmitted.") -#define awc_RID_Stats16_clear_TxMc awc_def_Stats16_clear_RID(0x0026,0x004C,"Stats_TxMc", " LMAC count of multicast packets sent (uses 802.11 Address1).") -#define awc_RID_Stats16_clear_TxBc awc_def_Stats16_clear_RID(0x0028,0x0050,"Stats_TxBc", " LMAC count of broadcast packets sent (uses 802.11") -#define awc_RID_Stats16_clear_TxUcFrags awc_def_Stats16_clear_RID(0x002A,0x0054,"Stats_TxUcFragsLMAC", " count of ALL unicast fragments and whole packets sent (uses 802.11 Address1).") -#define awc_RID_Stats16_clear_TxUcPackets awc_def_Stats16_clear_RID(0x002C,0x0058,"Stats_TxUcPackets", "LMAC count of unicast packets that were ACKd (uses 802.11 Address 1).") -#define awc_RID_Stats16_clear_TxBeacon awc_def_Stats16_clear_RID(0x002E,0x005C,"Stats_TxBeacon", " Count of beacon packets transmitted.") -#define awc_RID_Stats16_clear_RxBeacon awc_def_Stats16_clear_RID(0x0030,0x0060,"Stats_RxBeacon", " Count of beacon packets received matching our BSSID.") -#define awc_RID_Stats16_clear_TxSinColl awc_def_Stats16_clear_RID(0x0032,0x0064,"Stats_TxSinCollTransmit"," single collisions. **") -#define awc_RID_Stats16_clear_TxMulColl awc_def_Stats16_clear_RID(0x0034,0x0068,"Stats_TxMulCollTransmit"," multiple collisions. **") -#define awc_RID_Stats16_clear_DefersNo awc_def_Stats16_clear_RID(0x0036,0x006C,"Stats_DefersNo Transmit"," frames sent with no deferral. **") -#define awc_RID_Stats16_clear_DefersProt awc_def_Stats16_clear_RID(0x0038,0x0070,"Stats_DefersProt", " Transmit frames deferred due to protocol.") -#define awc_RID_Stats16_clear_DefersEngy awc_def_Stats16_clear_RID(0x003A,0x0074,"Stats_DefersEngy", " Transmit frames deferred due to energy detect.") -#define awc_RID_Stats16_clear_DupFram awc_def_Stats16_clear_RID(0x003C,0x0078,"Stats_DupFram", " Duplicate receive frames and fragments.") -#define awc_RID_Stats16_clear_RxFragDisc awc_def_Stats16_clear_RID(0x003E,0x007C,"Stats_RxFragDisc", " Received partial frames. (each tally could indicate the discarding of one or more fragments)") -#define awc_RID_Stats16_clear_TxAged awc_def_Stats16_clear_RID(0x0040,0x0080,"Stats_TxAged", " Transmit packets exceeding maximum transmit lifetime. **") -#define awc_RID_Stats16_clear_RxAged awc_def_Stats16_clear_RID(0x0042,0x0084,"Stats_RxAgedReceive", " packets exceeding maximum receive lifetime. **") -#define awc_RID_Stats16_clear_LostSync_Max awc_def_Stats16_clear_RID(0x0044,0x0088,"Stats_LostSync_Max", " Lost sync with our cell due to maximum retries occuring. Retry") -#define awc_RID_Stats16_clear_LostSync_Mis awc_def_Stats16_clear_RID(0x0046,0x008C,"Stats_LostSync_Mis", "Lost sync with our cell due to missing too many beacons. sedBeacons") -#define awc_RID_Stats16_clear_LostSync_Arl awc_def_Stats16_clear_RID(0x0048,0x0090,"Stats_LostSync_Arl", "Lost sync with our cell due to Average Retry Level being Exceeded exceeded.") -#define awc_RID_Stats16_clear_LostSync_Dea awc_def_Stats16_clear_RID(0x004A,0x0094,"Stats_LostSync_Dea", "Lost sync with our cell due to being deauthenticated.,thed") -#define awc_RID_Stats16_clear_LostSync_Disa awc_def_Stats16_clear_RID(0x004C,0x0098,"Stats_LostSync_Disa", " Lost sync with our cell due to being disassociated. ssoced") -#define awc_RID_Stats16_clear_LostSync_Tsf awc_def_Stats16_clear_RID(0x004E,0x009C,"Stats_LostSync_Tsf", "Lost sync with our cell due to excessive change in TSF Timingtiming.") -#define awc_RID_Stats16_clear_HostTxMc awc_def_Stats16_clear_RID(0x0050,0x00A0,"Stats_HostTxMc", "Count of multicast packets sent by the host.") -#define awc_RID_Stats16_clear_HostTxBc awc_def_Stats16_clear_RID(0x0052,0x00A4,"Stats_HostTxBc", "Count of broadcast packets sent by the host.") -#define awc_RID_Stats16_clear_HostTxUc awc_def_Stats16_clear_RID(0x0054,0x00A8,"Stats_HostTxUc", "Count of unicast packets sent by the host.") -#define awc_RID_Stats16_clear_HostTxFail awc_def_Stats16_clear_RID(0x0056,0x00AC,"Stats_HostTxFail", " Count of host transmitted packets which failed.") -#define awc_RID_Stats16_clear_HostRxMc awc_def_Stats16_clear_RID(0x0058,0x00B0,"Stats_HostRxMc", "Count of host received multicast packets.") -#define awc_RID_Stats16_clear_HostRxBc awc_def_Stats16_clear_RID(0x005A,0x00B4,"Stats_HostRxBc", "Count of host received broadcast packets.") -#define awc_RID_Stats16_clear_HostRxUc awc_def_Stats16_clear_RID(0x005C,0x00B8,"Stats_HostRxUc", "Count of host received unicast packets.") -#define awc_RID_Stats16_clear_HostRxDiscar awc_def_Stats16_clear_RID(0x005E,0x00BC,"Stats_HostRxDiscar", "Count of host received packets discarded due to:\n Host not enabling receive.\n Host failing to dequeue receive packets quickly.\n Packets being discarded due to magic packet mode.") -#define awc_RID_Stats16_clear_HmacTxMc awc_def_Stats16_clear_RID(0x0060,0x00C0,"Stats_HmacTxMc", "Count of internally generated multicast (DA) packets.") -#define awc_RID_Stats16_clear_HmacTxBc awc_def_Stats16_clear_RID(0x0062,0x00C4,"Stats_HmacTxBc", "Count of internally generated broadcast (DA) packets.") -#define awc_RID_Stats16_clear_HmacTxUc awc_def_Stats16_clear_RID(0x0064,0x00C8,"Stats_HmacTxUc", "Count of internally generated unicast (DA) packets.") -#define awc_RID_Stats16_clear_HmacTxFail awc_def_Stats16_clear_RID(0x0066,0x00CC,"Stats_HmacTxFail", " Count of internally generated transmit packets that failed.") -#define awc_RID_Stats16_clear_HmacRxMc awc_def_Stats16_clear_RID(0x0068,0x00D0,"Stats_HmacRxMc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats16_clear_HmacRxBc awc_def_Stats16_clear_RID(0x006A,0x00D4,"Stats_HmacRxBc", "Count of internally received broadcast (DA) packets.") -#define awc_RID_Stats16_clear_HmacRxUc awc_def_Stats16_clear_RID(0x006C,0x00D8,"Stats_HmacRxUc", "Count of internally received multicast (DA) packets.") -#define awc_RID_Stats16_clear_HmacRxDisca awc_def_Stats16_clear_RID(0x006E,0x00DC,"Stats_HmacRxDisca", " Count of internally received packets that were discarded (usually because the destination address is not for the host).") -#define awc_RID_Stats16_clear_HmacRxAcce awc_def_Stats16_clear_RID(0x0070,0x00E0,"Stats_HmacRxAcce", " Count of internally received packets that were accepted") -#define awc_RID_Stats16_clear_SsidMismatch awc_def_Stats16_clear_RID(0x0072,0x00E4,"Stats_SsidMismatch", " Count of SSID mismatches.") -#define awc_RID_Stats16_clear_ApMismatch awc_def_Stats16_clear_RID(0x0074,0x00E8,"Stats_ApMismatch", " Count of specified AP mismatches.") -#define awc_RID_Stats16_clear_RatesMismatc awc_def_Stats16_clear_RID(0x0076,0x00EC,"Stats_RatesMismatc", " Count of rate mismatches.") -#define awc_RID_Stats16_clear_AuthReject awc_def_Stats16_clear_RID(0x0078,0x00F0,"Stats_AuthReject", " Count of authentication rejections.") -#define awc_RID_Stats16_clear_AuthTimeout awc_def_Stats16_clear_RID(0x007A,0x00F4,"Stats_AuthTimeout", " Count of authentication timeouts.") -#define awc_RID_Stats16_clear_AssocReject awc_def_Stats16_clear_RID(0x007C,0x00F8,"Stats_AssocReject", " Count of association rejections.") -#define awc_RID_Stats16_clear_AssocTimeout awc_def_Stats16_clear_RID(0x007E,0x00FC,"Stats_AssocTimeout", " Count of association timeouts.") -#define awc_RID_Stats16_clear_NewReason awc_def_Stats16_clear_RID(0x0080,0x0100,"Stats_NewReason", "Count of reason/status codes of greater than 19. (Values of 0 = successful are not counted)") -#define awc_RID_Stats16_clear_AuthFail_1 awc_def_Stats16_clear_RID(0x0082,0x0104,"Stats_AuthFail_1", "Unspecified reason.") -#define awc_RID_Stats16_clear_AuthFail_2 awc_def_Stats16_clear_RID(0x0084,0x0108,"Stats_AuthFail_2", "Previous authentication no longer valid.") -#define awc_RID_Stats16_clear_AuthFail_3 awc_def_Stats16_clear_RID(0x0086,0x010C,"Stats_AuthFail_3", "Deauthenticated because sending station is leaving (has left) IBSS or ESS.") -#define awc_RID_Stats16_clear_AuthFail_4 awc_def_Stats16_clear_RID(0x0088,0x0110,"Stats_AuthFail_4", "Disassociated due to inactivity") -#define awc_RID_Stats16_clear_AuthFail_5 awc_def_Stats16_clear_RID(0x008A,0x0114,"Stats_AuthFail_5", "Disassociated because AP is unable to handle all currently associated stations.") -#define awc_RID_Stats16_clear_AuthFail_6 awc_def_Stats16_clear_RID(0x008C,0x0118,"Stats_AuthFail_6", "Class 2 Frame received from non-Authenticated station.") -#define awc_RID_Stats16_clear_AuthFail_7 awc_def_Stats16_clear_RID(0x008E,0x011C,"Stats_AuthFail_7", "Class 3 Frame received from non-Associated station.") -#define awc_RID_Stats16_clear_AuthFail_8 awc_def_Stats16_clear_RID(0x0090,0x0120,"Stats_AuthFail_8", "Disassociated because sending station is leaving (has left) " ) -#define awc_RID_Stats16_clear_AuthFail_9 awc_def_Stats16_clear_RID(0x0092,0x0124,"Stats_AuthFail_9", "Station requesting (Re)Association is not Authenticated") -#define awc_RID_Stats16_clear_AuthFail_10 awc_def_Stats16_clear_RID(0x0094,0x0128,"Stats_AuthFail_10", "Cannot support all requested capabilities in the Capability") -#define awc_RID_Stats16_clear_AuthFail_11 awc_def_Stats16_clear_RID(0x0096,0x012C,"Stats_AuthFail_11", "Reassociation denied due to inability to confirm") -#define awc_RID_Stats16_clear_AuthFail_12 awc_def_Stats16_clear_RID(0x0098,0x0130,"Stats_AuthFail_12", "Association denied due to reason outside the scope of the 802.11") -#define awc_RID_Stats16_clear_AuthFail_13 awc_def_Stats16_clear_RID(0x009A,0x0134,"Stats_AuthFail_13", "Responding station does not support the specified Auth Alogorithm") -#define awc_RID_Stats16_clear_AuthFail_14 awc_def_Stats16_clear_RID(0x009C,0x0138,"Stats_AuthFail_14", "Received an out of sequence Authentication Frame.") -#define awc_RID_Stats16_clear_AuthFail_15 awc_def_Stats16_clear_RID(0x009E,0x013C,"Stats_AuthFail_15", "Authentication rejected due to challenge failure.") -#define awc_RID_Stats16_clear_AuthFail_16 awc_def_Stats16_clear_RID(0x00A0,0x0140,"Stats_AuthFail_16", "Authentication rejected due to timeout waiting for next frame in sequence.") -#define awc_RID_Stats16_clear_AuthFail_17 awc_def_Stats16_clear_RID(0x00A2,0x0144,"Stats_AuthFail_17", "Association denied because AP is unable to handle additional associated stations.") -#define awc_RID_Stats16_clear_AuthFail_18 awc_def_Stats16_clear_RID(0x00A4,0x0148,"Stats_AuthFail_18", "Association denied due to requesting station not supportingall basic rates.") -#define awc_RID_Stats16_clear_AuthFail_19 awc_def_Stats16_clear_RID(0x00A6,0x014C,"Stats_AuthFail_19", "Reserved") -#define awc_RID_Stats16_clear_RxMan awc_def_Stats16_clear_RID(0x00A8,0x0150,"Stats_RxMan", " Count of management packets received and handled.") -#define awc_RID_Stats16_clear_TxMan awc_def_Stats16_clear_RID(0x00AA,0x0154,"Stats_TxMan", " Count of management packets transmitted.") -#define awc_RID_Stats16_clear_RxRefresh awc_def_Stats16_clear_RID(0x00AC,0x0158,"Stats_RxRefresh", " Count of null data packets received.") -#define awc_RID_Stats16_clear_TxRefresh awc_def_Stats16_clear_RID(0x00AE,0x015C,"Stats_TxRefresh", " Count of null data packets transmitted.") -#define awc_RID_Stats16_clear_RxPoll awc_def_Stats16_clear_RID(0x00B0,0x0160,"Stats_RxPoll", "Count of PS-Poll packets received.") -#define awc_RID_Stats16_clear_TxPoll awc_def_Stats16_clear_RID(0x00B2,0x0164,"Stats_TxPoll", "Count of PS-Poll packets transmitted.") -#define awc_RID_Stats16_clear_HostRetries awc_def_Stats16_clear_RID(0x00B4,0x0168,"Stats_HostRetries", " Count of long and short retries used to transmit host packets (does not include first attempt).") -#define awc_RID_Stats16_clear_LostSync_HostReq awc_def_Stats16_clear_RID(0x00B6,0x016C,"Stats_LostSync_HostReq","Lost sync with our cell due to host request.") -#define awc_RID_Stats16_clear_HostTxBytes awc_def_Stats16_clear_RID(0x00B8,0x0170,"Stats_HostTxBytes", " Count of bytes transferred from the host.") -#define awc_RID_Stats16_clear_HostRxBytes awc_def_Stats16_clear_RID(0x00BA,0x0174,"Stats_HostRxBytes", " Count of bytes transferred to the host.") -#define awc_RID_Stats16_clear_ElapsedUsec awc_def_Stats16_clear_RID(0x00BC,0x0178,"Stats_ElapsedUsec", " Total time since power up (or clear) in microseconds.") -#define awc_RID_Stats16_clear_ElapsedSec awc_def_Stats16_clear_RID(0x00BE,0x017C,"Stats_ElapsedSec", " Total time since power up (or clear) in seconds.") -#define awc_RID_Stats16_clear_LostSyncBett awc_def_Stats16_clear_RID(0x00C0,0x0180,"Stats_LostSyncBett", "Lost Sync to switch to a better access point") -/* -const struct aironet4500_rid_selector aironet4500_RID_Select_General_Config =(const struct aironet4500_rid_selector){ 0xFF10, 1,0,0, "General Configuration" }; // See notes General Configuration Many configuration items. -const struct aironet4500_rid_selector aironet4500_RID_Select_SSID_list =(const struct aironet4500_rid_selector){ 0xFF11, 1,0,0, "Valid SSID list" }; // See notes Valid SSID list List of SSIDs which the station may associate to. -const struct aironet4500_rid_selector aironet4500_RID_Select_AP_list =(const struct aironet4500_rid_selector){ 0xFF12, 1,0,0, "Valid AP list" }; // See notes Valid AP list List of APs which the station may associate to. -const struct aironet4500_rid_selector aironet4500_RID_Select_Driver_name =(const struct aironet4500_rid_selector){ 0xFF13, 1,0,0, "Driver name" }; // See notes Driver name The name and version of the driver (for debugging) -const struct aironet4500_rid_selector aironet4500_RID_Select_Encapsulation =(const struct aironet4500_rid_selector){ 0xFF14, 1,0,0, "Ethernet Protocol" }; // See notes Ethernet Protocol Rules for encapsulating ethernet payloads onto 802.11. -const struct aironet4500_rid_selector aironet4500_RID_Select_WEP_volatile =(const struct aironet4500_rid_selector){ 0xFF15, 1,0,0, "WEP key volatile" }; // -const struct aironet4500_rid_selector aironet4500_RID_Select_WEP_nonvolatile =(const struct aironet4500_rid_selector){ 0xFF16, 1,0,0, "WEP key non-volatile" }; // -const struct aironet4500_rid_selector aironet4500_RID_Select_Modulation =(const struct aironet4500_rid_selector){ 0xFF17, 1,0,0, "Modulation" }; // -const struct aironet4500_rid_selector aironet4500_RID_Select_Active_Config =(const struct aironet4500_rid_selector){ 0xFF20, 0,1,1, "Actual Configuration" }; // Read only Actual Configuration This has the same format as the General Configuration. -const struct aironet4500_rid_selector aironet4500_RID_Select_Capabilities =(const struct aironet4500_rid_selector){ 0xFF00, 0,1,0, "Capabilities" }; // Read Only Capabilities PC4500 Information -const struct aironet4500_rid_selector aironet4500_RID_Select_AP_Info =(const struct aironet4500_rid_selector){ 0xFF01, 0,1,1, "AP Info" }; // Read Only AP Info Access Point Information -const struct aironet4500_rid_selector aironet4500_RID_Select_Radio_Info =(const struct aironet4500_rid_selector){ 0xFF02, 0,1,1, "Radio Info" }; // Read Only Radio Info Radio Information -- note radio specific -const struct aironet4500_rid_selector aironet4500_RID_Select_Status =(const struct aironet4500_rid_selector){ 0xFF50, 0,1,1, "Status" }; // Read Only Status PC4500 Current Status Information -const struct aironet4500_rid_selector aironet4500_RID_Select_16_stats =(const struct aironet4500_rid_selector){ 0xFF60, 0,1,1, "Cumulative 16-bit Statistics" }; // Read Only 16-bit Statistics Cumulative 16-bit Statistics -const struct aironet4500_rid_selector aironet4500_RID_Select_16_stats_delta =(const struct aironet4500_rid_selector){ 0xFF61, 0,1,1, "Delta 16-bit Statistics" }; // Read Only 16-bit Statistics Delta 16-bit Statistics (since last clear) -const struct aironet4500_rid_selector aironet4500_RID_Select_16_stats_clear =(const struct aironet4500_rid_selector){ 0xFF62, 0,1,1, "Delta 16-bit Statistics and Clear" }; // Read Only / 16-bit Statistics Delta 16-bit Statistics and Clear -const struct aironet4500_rid_selector aironet4500_RID_Select_32_stats =(const struct aironet4500_rid_selector){ 0xFF68, 0,1,1, "Cumulative 32-bit Statistics" }; // Read Only 32-bit Statistics Cumulative 32-bit Statistics -const struct aironet4500_rid_selector aironet4500_RID_Select_32_stats_delta =(const struct aironet4500_rid_selector){ 0xFF69, 0,1,1, "Delta 32-bit Statistics" }; // Read Only 32-bit Statistics Delta 32-bit Statistics (since last clear) -const struct aironet4500_rid_selector aironet4500_RID_Select_32_stats_clear =(const struct aironet4500_rid_selector){ 0xFF6A, 0,1,1, "Delta 32-bit Statistics and Clear" }; // Read Only / 32-bit Statistics Delta 32-bit Statistics and Clear -*/ - -struct aironet4500_RID awc_gen_RID[] ={ - awc_RID_gen_RidLen, - awc_RID_gen_OperatingMode_adhoc, - awc_RID_gen_OperatingMode_Infrastructure, - awc_RID_gen_OperatingMode_AP, - awc_RID_gen_OperatingMode_AP_and_repeater, - awc_RID_gen_OperatingMode_No_payload_modify, - awc_RID_gen_OperatingMode_LLC_802_3_convert, - awc_RID_gen_OperatingMode_proprietary_ext, - awc_RID_gen_OperatingMode_no_proprietary_ext, - awc_RID_gen_OperatingMode_AP_ext, - awc_RID_gen_OperatingMode_no_AP_ext, - awc_RID_gen_ReceiveMode, - awc_RID_gen_ReceiveMode_BMA, - awc_RID_gen_ReceiveMode_BA, - awc_RID_gen_ReceiveMode_A, - awc_RID_gen_ReceiveMode_802_11_monitor, - awc_RID_gen_ReceiveMode_802_11_any_monitor, - awc_RID_gen_ReceiveMode_LAN_monitor, - awc_RID_gen_ReceiveMode_802_3_hdr_disable, - awc_RID_gen_ReceiveMode_802_3_hdr_enable, - awc_RID_gen_Fragmentation_threshold, - awc_RID_gen_RTS_threshold, - awc_RID_gen_Station_Mac_Id, - awc_RID_gen_Supported_rates, - awc_RID_gen_Basic_Rate, - awc_RID_gen_Rate_500kbps, - awc_RID_gen_Rate_1Mbps, - awc_RID_gen_Rate_2Mbps, - awc_RID_gen_Rate_4Mbps, - awc_RID_gen_Rate_5Mbps, - awc_RID_gen_Rate_10Mbps, - awc_RID_gen_Rate_11Mbps, - awc_RID_gen_BasicRate_500kbps, - awc_RID_gen_BasicRate_1Mbps, - awc_RID_gen_BasicRate_2Mbps, - awc_RID_gen_BasicRate_4Mbps, - awc_RID_gen_BasicRate_5Mbps, - awc_RID_gen_BasicRate_10Mbps, - awc_RID_gen_BasicRate_11Mbps, - awc_RID_gen_Long_retry_limit, - awc_RID_gen_Short_retry_limit, - awc_RID_gen_Tx_MSDU_lifetime, - awc_RID_gen_Rx_MSDU_lifetime, - awc_RID_gen_Stationary, - awc_RID_gen_BC_MC_Ordering, - awc_RID_gen_Device_type, - awc_RID_gen_Reserved_0x0026, - awc_RID_gen_ScanMode, - awc_RID_gen_ScanMode_Active, - awc_RID_gen_ScanMode_Passive, - awc_RID_gen_ScanMode_Aironet_ext, - awc_RID_gen_ProbeDelay, - awc_RID_gen_ProbeEnergyTimeout, - awc_RID_gen_ProbeResponseTimeout, - awc_RID_gen_BeaconListenTimeout, - awc_RID_gen_IbssJoinNetTimeout, - awc_RID_gen_AuthenticationTimeout, - awc_RID_gen_AuthenticationType, - awc_RID_gen_AuthenticationType_None, - awc_RID_gen_AuthenticationType_Open, - awc_RID_gen_AuthenticationType_Shared, - awc_RID_gen_AuthenticationType_Exclude_Open, - awc_RID_gen_AssociationTimeout, - awc_RID_gen_SpecifiedAPtimeout, - awc_RID_gen_OfflineScanInterval, - awc_RID_gen_OfflineScanDuration, - awc_RID_gen_LinkLossDelay, - awc_RID_gen_MaxBeaconLostTime, - awc_RID_gen_RefreshInterval, - awc_RID_gen_PowerSaveMode, - awc_RID_gen_PowerSaveMode_CAM, - awc_RID_gen_PowerSaveMode_PSP, - awc_RID_gen_PowerSaveMode_Fast_PSP, - awc_RID_gen_SleepForDTIMs, - awc_RID_gen_ListenInterval, - awc_RID_gen_FastListenInterval, - awc_RID_gen_ListenDecay, - awc_RID_gen_FastListenDelay, - awc_RID_gen_Reserved0x005C, - awc_RID_gen_BeaconPeriod, - awc_RID_gen_AtimDuration, - awc_RID_gen_Reserved0x0064, - awc_RID_gen_DSChannel, - awc_RID_gen_Reserved0x0068, - awc_RID_gen_DTIM_Period, - awc_RID_gen_Reserved0x0006C, - awc_RID_gen_RadioSpreadType, - awc_RID_gen_RadioSpreadType_FH, - awc_RID_gen_RadioSpreadType_DS, - awc_RID_gen_RadioSpreadType_LM, - awc_RID_gen_TX_antenna_Diversity, - awc_RID_gen_TX_antenna_Diversity_default, - awc_RID_gen_TX_antenna_Diversity_1, - awc_RID_gen_TX_antenna_Diversity_2, - awc_RID_gen_TX_antenna_Diversity_both, - awc_RID_gen_RX_antenna_Diversity, - awc_RID_gen_RX_antenna_Diversity_default, - awc_RID_gen_RX_antenna_Diversity_1, - awc_RID_gen_RX_antenna_Diversity_2, - awc_RID_gen_RX_antenna_Diversity_both, - awc_RID_gen_TransmitPower, - awc_RID_gen_RSSIthreshold, - awc_RID_gen_Modulation, - awc_RID_gen_Reserved0x0079, - awc_RID_gen_NodeName, - awc_RID_gen_ARLThreshold, - awc_RID_gen_ARLDecay, - awc_RID_gen_ARLDelay, - awc_RID_gen_Unused0x0096, - awc_RID_gen_MagicPacketAction, - awc_RID_gen_MagicPacketControl, - {0} -}; - -struct aironet4500_RID awc_act_RID[]={ - awc_RID_act_RidLen, - awc_RID_act_OperatingMode_adhoc, - awc_RID_act_OperatingMode_Infrastructure, - awc_RID_act_OperatingMode_AP, - awc_RID_act_OperatingMode_AP_and_repeater, - awc_RID_act_OperatingMode_No_payload_modify, - awc_RID_act_OperatingMode_LLC_802_3_convert, - awc_RID_act_OperatingMode_proprietary_ext, - awc_RID_act_OperatingMode_no_proprietary_ext, - awc_RID_act_OperatingMode_AP_ext, - awc_RID_act_OperatingMode_no_AP_ext, - awc_RID_act_ReceiveMode, - awc_RID_act_ReceiveMode_BMA, - awc_RID_act_ReceiveMode_BA, - awc_RID_act_ReceiveMode_A, - awc_RID_act_ReceiveMode_802_11_monitor, - awc_RID_act_ReceiveMode_802_11_any_monitor, - awc_RID_act_ReceiveMode_LAN_monitor, - awc_RID_act_ReceiveMode_802_3_hdr_disable, - awc_RID_act_ReceiveMode_802_3_hdr_enable, - awc_RID_act_Fragmentation_threshold, - awc_RID_act_RTS_threshold, - awc_RID_act_Station_Mac_Id, - awc_RID_act_Supported_rates, - awc_RID_act_Basic_Rate, - awc_RID_act_Rate_500kbps, - awc_RID_act_Rate_1Mbps, - awc_RID_act_Rate_2Mbps, - awc_RID_act_Rate_4Mbps, - awc_RID_act_Rate_5Mbps, - awc_RID_act_Rate_10Mbps, - awc_RID_act_Rate_11Mbps, - awc_RID_act_BasicRate_500kbps, - awc_RID_act_BasicRate_1Mbps, - awc_RID_act_BasicRate_2Mbps, - awc_RID_act_BasicRate_4Mbps, - awc_RID_act_BasicRate_5Mbps, - awc_RID_act_BasicRate_10Mbps, - awc_RID_act_BasicRate_11Mbps, - awc_RID_act_Long_retry_limit, - awc_RID_act_Short_retry_limit, - awc_RID_act_Tx_MSDU_lifetime, - awc_RID_act_Rx_MSDU_lifetime, - awc_RID_act_Stationary, - awc_RID_act_BC_MC_Ordering, - awc_RID_act_Device_type, - awc_RID_act_Reserved_0x0026, - awc_RID_act_ScanMode, - awc_RID_act_ScanMode_Active, - awc_RID_act_ScanMode_Passive, - awc_RID_act_ScanMode_Aironet_ext, - awc_RID_act_ProbeDelay, - awc_RID_act_ProbeEnergyTimeout, - awc_RID_act_ProbeResponseTimeout, - awc_RID_act_BeaconListenTimeout, - awc_RID_act_IbssJoinNetTimeout, - awc_RID_act_AuthenticationTimeout, - awc_RID_act_AuthenticationType, - awc_RID_act_AuthenticationType_None, - awc_RID_act_AuthenticationType_Open, - awc_RID_act_AuthenticationType_Shared, - awc_RID_act_AuthenticationType_Exclude_Open, - awc_RID_act_AssociationTimeout, - awc_RID_act_SpecifiedAPtimeout, - awc_RID_act_OfflineScanInterval, - awc_RID_act_OfflineScanDuration, - awc_RID_act_LinkLossDelay, - awc_RID_act_MaxBeaconLostTime, - awc_RID_act_RefreshInterval, - awc_RID_act_PowerSaveMode, - awc_RID_act_PowerSaveMode_CAM, - awc_RID_act_PowerSaveMode_PSP, - awc_RID_act_PowerSaveMode_Fast_PSP, - awc_RID_act_SleepForDTIMs, - awc_RID_act_ListenInterval, - awc_RID_act_FastListenInterval, - awc_RID_act_ListenDecay, - awc_RID_act_FastListenDelay, - awc_RID_act_Reserved0x005C, - awc_RID_act_BeaconPeriod, - awc_RID_act_AtimDuration, - awc_RID_act_Reserved0x0064, - awc_RID_act_DSChannel, - awc_RID_act_Reserved0x0068, - awc_RID_act_DTIM_Period, - awc_RID_act_Reserved0x0006C, - awc_RID_act_RadioSpreadType, - awc_RID_act_RadioSpreadType_FH, - awc_RID_act_RadioSpreadType_DS, - awc_RID_act_RadioSpreadType_LM, - awc_RID_act_TX_antenna_Diversity, - awc_RID_act_TX_antenna_Diversity_default, - awc_RID_act_TX_antenna_Diversity_1, - awc_RID_act_TX_antenna_Diversity_2, - awc_RID_act_TX_antenna_Diversity_both, - awc_RID_act_RX_antenna_Diversity, - awc_RID_act_RX_antenna_Diversity_default, - awc_RID_act_RX_antenna_Diversity_1, - awc_RID_act_RX_antenna_Diversity_2, - awc_RID_act_RX_antenna_Diversity_both, - awc_RID_act_TransmitPower, - awc_RID_act_RSSIthreshold, - awc_RID_act_Modulation, - awc_RID_act_Reserved0x0079, - awc_RID_act_NodeName, - awc_RID_act_ARLThreshold, - awc_RID_act_ARLDecay, - awc_RID_act_ARLDelay, - awc_RID_act_Unused0x0096, - awc_RID_act_MagicPacketAction, - awc_RID_act_MagicPacketControl, - {0} -}; - - - -struct aironet4500_RID awc_SSID_RID[]={ - awc_RID_SSID_RidLen, - awc_RID_SSID_Accept_any, - awc_RID_SSIDlen1, - awc_RID_SSID1, - awc_RID_SSIDlen2, - awc_RID_SSID2, - awc_RID_SSIDlen3, - awc_RID_SSID3, - awc_RID_SSID1hex, - awc_RID_SSID2hex, - awc_RID_SSID3hex, - {0} -}; - - -struct aironet4500_RID awc_AP_List_RID[]={ - awc_RID_AP_List_RidLen, - awc_RID_AP_List_SpecifiedAP1, - awc_RID_AP_List_SpecifiedAP2, - awc_RID_AP_List_SpecifiedAP3, - awc_RID_AP_List_SpecifiedAP4, - {0} -}; - - -struct aironet4500_RID awc_Dname_RID[]={ - awc_RID_Dname_RidLen, - awc_RID_Dname_DriverName, - {0} -}; - - - - -struct aironet4500_RID awc_enc_RID[]={ - awc_RID_Enc_RidLen, - awc_RID_Enc_EtherType1, - awc_RID_Enc_Action_RX_1, - awc_RID_Enc_Action_RX_1_RFC_1042, - awc_RID_Enc_Action_RX_1_802_11, - awc_RID_Enc_Action_TX_1, - awc_RID_Enc_Action_TX_1_RFC_1042, - awc_RID_Enc_Action_TX_1_802_11, - awc_RID_Enc_EtherType2, - awc_RID_Enc_Action_RX_2, - awc_RID_Enc_Action_RX_2_RFC_1042, - awc_RID_Enc_Action_RX_2_802_11, - awc_RID_Enc_Action_TX_2, - awc_RID_Enc_Action_TX_2_RFC_1042, - awc_RID_Enc_Action_TX_2_802_11, - awc_RID_Enc_EtherType3, - awc_RID_Enc_Action_RX_3, - awc_RID_Enc_Action_RX_3_RFC_1042, - awc_RID_Enc_Action_RX_3_802_11, - awc_RID_Enc_Action_TX_3_, - awc_RID_Enc_Action_TX_3_RFC_1042, - awc_RID_Enc_Action_TX_3_802_11, - awc_RID_Enc_EtherType4, - awc_RID_Enc_Action_RX_4, - awc_RID_Enc_Action_RX_4_RFC_1042, - awc_RID_Enc_Action_RX_4_802_11, - awc_RID_Enc_Action_TX_4, - awc_RID_Enc_Action_TX_4_RFC_1042, - awc_RID_Enc_Action_TX_4_802_11, - awc_RID_Enc_EtherType5, - awc_RID_Enc_Action_RX_5, - awc_RID_Enc_Action_RX_5_RFC_1042, - awc_RID_Enc_Action_RX_5_802_11, - awc_RID_Enc_Action_TX_5, - awc_RID_Enc_Action_TX_5_RFC_1042, - awc_RID_Enc_Action_TX_5_802_11, - awc_RID_Enc_EtherType6, - awc_RID_Enc_Action_RX_6, - awc_RID_Enc_Action_RX_6_RFC_1042, - awc_RID_Enc_Action_RX_6_802_11, - awc_RID_Enc_Action_TX_6, - awc_RID_Enc_Action_TX_6_RFC_1042, - awc_RID_Enc_Action_TX_6_802_11, - awc_RID_Enc_EtherType7, - awc_RID_Enc_Action_RX_7, - awc_RID_Enc_Action_RX_7_RFC_1042, - awc_RID_Enc_Action_RX_7_802_11, - awc_RID_Enc_Action_TX_7, - awc_RID_Enc_Action_TX_7_RFC_1042, - awc_RID_Enc_Action_TX_7_802_11, - awc_RID_Enc_EtherType8, - awc_RID_Enc_Action_RX_8, - awc_RID_Enc_Action_RX_8_RFC_1042, - awc_RID_Enc_Action_RX_8_802_11, - awc_RID_Enc_Action_TX_8, - awc_RID_Enc_Action_TX_8_RFC_1042, - awc_RID_Enc_Action_TX_8_802_11, - {0} -}; - -struct aironet4500_RID awc_WEPv_RID[]={ - awc_RID_WEPv_RidLen, - awc_RID_WEPv_KeyIndex, - awc_RID_WEPv_Address, - awc_RID_WEPv_KeyLen, - awc_RID_WEPv_Key, - awc_RID_WEPv_KeyAscii, - {0} -}; - -struct aironet4500_RID awc_WEPnv_RID[]={ - awc_RID_WEPnv_RidLen, - awc_RID_WEPnv_KeyIndex, - awc_RID_WEPnv_Address, - awc_RID_WEPnv_KeyLen, - awc_RID_WEPnv_Key, - awc_RID_WEPnv_KeyAscii, - {0} -}; - -struct aironet4500_RID awc_Modulation_RID[]={ - awc_RID_Modulation_RidLen, - awc_RID_Modulation_Modulation, - {0} -}; - - - -struct aironet4500_RID awc_Cap_RID[]={ - awc_RID_Cap_RidLen, - awc_RID_Cap_OUI, - awc_RID_Cap_ProductNum, - awc_RID_Cap_ManufacturerName, - awc_RID_Cap_ProductName, - awc_RID_Cap_ProductVersion, - awc_RID_Cap_FactoryAddress, - awc_RID_Cap_AironetAddress, - awc_RID_Cap_RadioSpreadType_DS, - awc_RID_Cap_RadioSpreadType_FH, - awc_RID_Cap_RadioSpreadType_Legacy, - awc_RID_Cap_RegDomain, - awc_RID_Cap_Callid, - awc_RID_Cap_SupportedRates, - awc_RID_Cap_RxDiversity, - awc_RID_Cap_TxDiversity, - awc_RID_Cap_TxPowerLevels, - awc_RID_Cap_HardwareVersion, - awc_RID_Cap_HardwareCapabilit, - awc_RID_Cap_TemperatureRange, - awc_RID_Cap_SoftwareVersion, - awc_RID_Cap_SoftwareVersion_major, - awc_RID_Cap_SoftwareVersion_minor, - awc_RID_Cap_SoftwareSubVersion, - awc_RID_Cap_InterfaceVersion, - awc_RID_Cap_SoftwareCapabilities, - awc_RID_Cap_BootBlockVersion, - {0} -}; - - -struct aironet4500_RID awc_Status_RID[]={ - awc_RID_Status_RidLen, - awc_RID_Status_MacAddress, - awc_RID_Status_OperationalMode, - awc_RID_Status_Configured, - awc_RID_Status_MAC_Enabled, - awc_RID_Status_Receive_Enabled, - awc_RID_Status_In_Sync, - awc_RID_Status_Associated, - awc_RID_Status_Error, - awc_RID_Status_ErrorCode, - awc_RID_Status_CurrentSignalQuality, - awc_RID_Status_SSIDlength, - awc_RID_Status_SSID, - awc_RID_Status_ApName, - awc_RID_Status_CurrentBssid, - awc_RID_Status_PreviousBssid1, - awc_RID_Status_PreviousBssid2, - awc_RID_Status_PreviousBssid3, - awc_RID_Status_BeaconPeriod, - awc_RID_Status_DtimPeriod, - awc_RID_Status_AtimDuration, - awc_RID_Status_HopPeriod, - awc_RID_Status_ChannelSet, - awc_RID_Status_Channel, - awc_RID_Status_HopsToBackbone, - awc_RID_Status_ApTotalLoad, - awc_RID_Status_OurGeneratedLoad, - awc_RID_Status_AccumulatedArl, - {0} -}; - - -struct aironet4500_RID awc_AP_RID[]={ - awc_RID_AP_16RidLen, - awc_RID_AP_TIM_addr, - awc_RID_AP_Airo_addr, - {0} -}; - - -struct aironet4500_RID awc_Stats_RID[]={ - awc_RID_Stats_RidLen, - awc_RID_Stats_RxOverrunErr, - awc_RID_Stats_RxPlcpCrcErr, - awc_RID_Stats_RxPlcpFormat, - awc_RID_Stats_RxPlcpLength, - awc_RID_Stats_RxMacCrcErr, - awc_RID_Stats_RxMacCrcOk, - awc_RID_Stats_RxWepErr, - awc_RID_Stats_RxWepOk, - awc_RID_Stats_RetryLong, - awc_RID_Stats_RetryShort, - awc_RID_Stats_MaxRetries, - awc_RID_Stats_NoAck, - awc_RID_Stats_NoCts, - awc_RID_Stats_RxAck, - awc_RID_Stats_RxCts, - awc_RID_Stats_TxAck, - awc_RID_Stats_TxRts, - awc_RID_Stats_TxCts, - awc_RID_Stats_TxMc, - awc_RID_Stats_TxBc, - awc_RID_Stats_TxUcFrags, - awc_RID_Stats_TxUcPackets, - awc_RID_Stats_TxBeacon, - awc_RID_Stats_RxBeacon, - awc_RID_Stats_TxSinColl, - awc_RID_Stats_TxMulColl, - awc_RID_Stats_DefersNo, - awc_RID_Stats_DefersProt, - awc_RID_Stats_DefersEngy, - awc_RID_Stats_DupFram, - awc_RID_Stats_RxFragDisc, - awc_RID_Stats_TxAged, - awc_RID_Stats_RxAged, - awc_RID_Stats_LostSync_Max, - awc_RID_Stats_LostSync_Mis, - awc_RID_Stats_LostSync_Arl, - awc_RID_Stats_LostSync_Dea, - awc_RID_Stats_LostSync_Disa, - awc_RID_Stats_LostSync_Tsf, - awc_RID_Stats_HostTxMc, - awc_RID_Stats_HostTxBc, - awc_RID_Stats_HostTxUc, - awc_RID_Stats_HostTxFail, - awc_RID_Stats_HostRxMc, - awc_RID_Stats_HostRxBc, - awc_RID_Stats_HostRxUc, - awc_RID_Stats_HostRxDiscar, - awc_RID_Stats_HmacTxMc, - awc_RID_Stats_HmacTxBc, - awc_RID_Stats_HmacTxUc, - awc_RID_Stats_HmacTxFail, - awc_RID_Stats_HmacRxMc, - awc_RID_Stats_HmacRxBc, - awc_RID_Stats_HmacRxUc, - awc_RID_Stats_HmacRxDisca, - awc_RID_Stats_HmacRxAcce, - awc_RID_Stats_SsidMismatch, - awc_RID_Stats_ApMismatch, - awc_RID_Stats_RatesMismatc, - awc_RID_Stats_AuthReject, - awc_RID_Stats_AuthTimeout, - awc_RID_Stats_AssocReject, - awc_RID_Stats_AssocTimeout, - awc_RID_Stats_NewReason, - awc_RID_Stats_AuthFail_1, - awc_RID_Stats_AuthFail_2, - awc_RID_Stats_AuthFail_3, - awc_RID_Stats_AuthFail_4, - awc_RID_Stats_AuthFail_5, - awc_RID_Stats_AuthFail_6, - awc_RID_Stats_AuthFail_7, - awc_RID_Stats_AuthFail_8, - awc_RID_Stats_AuthFail_9, - awc_RID_Stats_AuthFail_10, - awc_RID_Stats_AuthFail_11, - awc_RID_Stats_AuthFail_12, - awc_RID_Stats_AuthFail_13, - awc_RID_Stats_AuthFail_14, - awc_RID_Stats_AuthFail_15, - awc_RID_Stats_AuthFail_16, - awc_RID_Stats_AuthFail_17, - awc_RID_Stats_AuthFail_18, - awc_RID_Stats_AuthFail_19, - awc_RID_Stats_RxMan, - awc_RID_Stats_TxMan, - awc_RID_Stats_RxRefresh, - awc_RID_Stats_TxRefresh, - awc_RID_Stats_RxPoll, - awc_RID_Stats_TxPoll, - awc_RID_Stats_HostRetries, - awc_RID_Stats_LostSync_HostReq, - awc_RID_Stats_HostTxBytes, - awc_RID_Stats_HostRxBytes, - awc_RID_Stats_ElapsedUsec, - awc_RID_Stats_ElapsedSec, - awc_RID_Stats_LostSyncBett, - {0} -}; - - - -struct aironet4500_RID awc_Stats_delta_RID[]={ - awc_RID_Stats_delta_RidLen, - awc_RID_Stats_delta_RxOverrunErr, - awc_RID_Stats_delta_RxPlcpCrcErr, - awc_RID_Stats_delta_RxPlcpFormat, - awc_RID_Stats_delta_RxPlcpLength, - awc_RID_Stats_delta_RxMacCrcErr, - awc_RID_Stats_delta_RxMacCrcOk, - awc_RID_Stats_delta_RxWepErr, - awc_RID_Stats_delta_RxWepOk, - awc_RID_Stats_delta_RetryLong, - awc_RID_Stats_delta_RetryShort, - awc_RID_Stats_delta_MaxRetries, - awc_RID_Stats_delta_NoAck, - awc_RID_Stats_delta_NoCts, - awc_RID_Stats_delta_RxAck, - awc_RID_Stats_delta_RxCts, - awc_RID_Stats_delta_TxAck, - awc_RID_Stats_delta_TxRts, - awc_RID_Stats_delta_TxCts, - awc_RID_Stats_delta_TxMc, - awc_RID_Stats_delta_TxBc, - awc_RID_Stats_delta_TxUcFrags, - awc_RID_Stats_delta_TxUcPackets, - awc_RID_Stats_delta_TxBeacon, - awc_RID_Stats_delta_RxBeacon, - awc_RID_Stats_delta_TxSinColl, - awc_RID_Stats_delta_TxMulColl, - awc_RID_Stats_delta_DefersNo, - awc_RID_Stats_delta_DefersProt, - awc_RID_Stats_delta_DefersEngy, - awc_RID_Stats_delta_DupFram, - awc_RID_Stats_delta_RxFragDisc, - awc_RID_Stats_delta_TxAged, - awc_RID_Stats_delta_RxAged, - awc_RID_Stats_delta_LostSync_Max, - awc_RID_Stats_delta_LostSync_Mis, - awc_RID_Stats_delta_LostSync_Arl, - awc_RID_Stats_delta_LostSync_Dea, - awc_RID_Stats_delta_LostSync_Disa, - awc_RID_Stats_delta_LostSync_Tsf, - awc_RID_Stats_delta_HostTxMc, - awc_RID_Stats_delta_HostTxBc, - awc_RID_Stats_delta_HostTxUc, - awc_RID_Stats_delta_HostTxFail, - awc_RID_Stats_delta_HostRxMc, - awc_RID_Stats_delta_HostRxBc, - awc_RID_Stats_delta_HostRxUc, - awc_RID_Stats_delta_HostRxDiscar, - awc_RID_Stats_delta_HmacTxMc, - awc_RID_Stats_delta_HmacTxBc, - awc_RID_Stats_delta_HmacTxUc, - awc_RID_Stats_delta_HmacTxFail, - awc_RID_Stats_delta_HmacRxMc, - awc_RID_Stats_delta_HmacRxBc, - awc_RID_Stats_delta_HmacRxUc, - awc_RID_Stats_delta_HmacRxDisca, - awc_RID_Stats_delta_HmacRxAcce, - awc_RID_Stats_delta_SsidMismatch, - awc_RID_Stats_delta_ApMismatch, - awc_RID_Stats_delta_RatesMismatc, - awc_RID_Stats_delta_AuthReject, - awc_RID_Stats_delta_AuthTimeout, - awc_RID_Stats_delta_AssocReject, - awc_RID_Stats_delta_AssocTimeout, - awc_RID_Stats_delta_NewReason, - awc_RID_Stats_delta_AuthFail_1, - awc_RID_Stats_delta_AuthFail_2, - awc_RID_Stats_delta_AuthFail_3, - awc_RID_Stats_delta_AuthFail_4, - awc_RID_Stats_delta_AuthFail_5, - awc_RID_Stats_delta_AuthFail_6, - awc_RID_Stats_delta_AuthFail_7, - awc_RID_Stats_delta_AuthFail_8, - awc_RID_Stats_delta_AuthFail_9, - awc_RID_Stats_delta_AuthFail_10, - awc_RID_Stats_delta_AuthFail_11, - awc_RID_Stats_delta_AuthFail_12, - awc_RID_Stats_delta_AuthFail_13, - awc_RID_Stats_delta_AuthFail_14, - awc_RID_Stats_delta_AuthFail_15, - awc_RID_Stats_delta_AuthFail_16, - awc_RID_Stats_delta_AuthFail_17, - awc_RID_Stats_delta_AuthFail_18, - awc_RID_Stats_delta_AuthFail_19, - awc_RID_Stats_delta_RxMan, - awc_RID_Stats_delta_TxMan, - awc_RID_Stats_delta_RxRefresh, - awc_RID_Stats_delta_TxRefresh, - awc_RID_Stats_delta_RxPoll, - awc_RID_Stats_delta_TxPoll, - awc_RID_Stats_delta_HostRetries, - awc_RID_Stats_delta_LostSync_HostReq, - awc_RID_Stats_delta_HostTxBytes, - awc_RID_Stats_delta_HostRxBytes, - awc_RID_Stats_delta_ElapsedUsec, - awc_RID_Stats_delta_ElapsedSec, - awc_RID_Stats_delta_LostSyncBett, - {0} -}; - -struct aironet4500_RID awc_Stats_clear_RID[]={ - awc_RID_Stats_clear_RidLen, - awc_RID_Stats_clear_RxOverrunErr, - awc_RID_Stats_clear_RxPlcpCrcErr, - awc_RID_Stats_clear_RxPlcpFormat, - awc_RID_Stats_clear_RxPlcpLength, - awc_RID_Stats_clear_RxMacCrcErr, - awc_RID_Stats_clear_RxMacCrcOk, - awc_RID_Stats_clear_RxWepErr, - awc_RID_Stats_clear_RxWepOk, - awc_RID_Stats_clear_RetryLong, - awc_RID_Stats_clear_RetryShort, - awc_RID_Stats_clear_MaxRetries, - awc_RID_Stats_clear_NoAck, - awc_RID_Stats_clear_NoCts, - awc_RID_Stats_clear_RxAck, - awc_RID_Stats_clear_RxCts, - awc_RID_Stats_clear_TxAck, - awc_RID_Stats_clear_TxRts, - awc_RID_Stats_clear_TxCts, - awc_RID_Stats_clear_TxMc, - awc_RID_Stats_clear_TxBc, - awc_RID_Stats_clear_TxUcFrags, - awc_RID_Stats_clear_TxUcPackets, - awc_RID_Stats_clear_TxBeacon, - awc_RID_Stats_clear_RxBeacon, - awc_RID_Stats_clear_TxSinColl, - awc_RID_Stats_clear_TxMulColl, - awc_RID_Stats_clear_DefersNo, - awc_RID_Stats_clear_DefersProt, - awc_RID_Stats_clear_DefersEngy, - awc_RID_Stats_clear_DupFram, - awc_RID_Stats_clear_RxFragDisc, - awc_RID_Stats_clear_TxAged, - awc_RID_Stats_clear_RxAged, - awc_RID_Stats_clear_LostSync_Max, - awc_RID_Stats_clear_LostSync_Mis, - awc_RID_Stats_clear_LostSync_Arl, - awc_RID_Stats_clear_LostSync_Dea, - awc_RID_Stats_clear_LostSync_Disa, - awc_RID_Stats_clear_LostSync_Tsf, - awc_RID_Stats_clear_HostTxMc, - awc_RID_Stats_clear_HostTxBc, - awc_RID_Stats_clear_HostTxUc, - awc_RID_Stats_clear_HostTxFail, - awc_RID_Stats_clear_HostRxMc, - awc_RID_Stats_clear_HostRxBc, - awc_RID_Stats_clear_HostRxUc, - awc_RID_Stats_clear_HostRxDiscar, - awc_RID_Stats_clear_HmacTxMc, - awc_RID_Stats_clear_HmacTxBc, - awc_RID_Stats_clear_HmacTxUc, - awc_RID_Stats_clear_HmacTxFail, - awc_RID_Stats_clear_HmacRxMc, - awc_RID_Stats_clear_HmacRxBc, - awc_RID_Stats_clear_HmacRxUc, - awc_RID_Stats_clear_HmacRxDisca, - awc_RID_Stats_clear_HmacRxAcce, - awc_RID_Stats_clear_SsidMismatch, - awc_RID_Stats_clear_ApMismatch, - awc_RID_Stats_clear_RatesMismatc, - awc_RID_Stats_clear_AuthReject, - awc_RID_Stats_clear_AuthTimeout, - awc_RID_Stats_clear_AssocReject, - awc_RID_Stats_clear_AssocTimeout, - awc_RID_Stats_clear_NewReason, - awc_RID_Stats_clear_AuthFail_1, - awc_RID_Stats_clear_AuthFail_2, - awc_RID_Stats_clear_AuthFail_3, - awc_RID_Stats_clear_AuthFail_4, - awc_RID_Stats_clear_AuthFail_5, - awc_RID_Stats_clear_AuthFail_6, - awc_RID_Stats_clear_AuthFail_7, - awc_RID_Stats_clear_AuthFail_8, - awc_RID_Stats_clear_AuthFail_9, - awc_RID_Stats_clear_AuthFail_10, - awc_RID_Stats_clear_AuthFail_11, - awc_RID_Stats_clear_AuthFail_12, - awc_RID_Stats_clear_AuthFail_13, - awc_RID_Stats_clear_AuthFail_14, - awc_RID_Stats_clear_AuthFail_15, - awc_RID_Stats_clear_AuthFail_16, - awc_RID_Stats_clear_AuthFail_17, - awc_RID_Stats_clear_AuthFail_18, - awc_RID_Stats_clear_AuthFail_19, - awc_RID_Stats_clear_RxMan, - awc_RID_Stats_clear_TxMan, - awc_RID_Stats_clear_RxRefresh, - awc_RID_Stats_clear_TxRefresh, - awc_RID_Stats_clear_RxPoll, - awc_RID_Stats_clear_TxPoll, - awc_RID_Stats_clear_HostRetries, - awc_RID_Stats_clear_LostSync_HostReq, - awc_RID_Stats_clear_HostTxBytes, - awc_RID_Stats_clear_HostRxBytes, - awc_RID_Stats_clear_ElapsedUsec, - awc_RID_Stats_clear_ElapsedSec, - awc_RID_Stats_clear_LostSyncBett, - {0} -}; -#ifdef AWC_USE_16BIT_STATS -struct aironet4500_RID awc_Stats16_RID[]={ - awc_RID_Stats16_RidLen, - awc_RID_Stats16_RxOverrunErr, - awc_RID_Stats16_RxPlcpCrcErr, - awc_RID_Stats16_RxPlcpFormat, - awc_RID_Stats16_RxPlcpLength, - awc_RID_Stats16_RxMacCrcErr, - awc_RID_Stats16_RxMacCrcOk, - awc_RID_Stats16_RxWepErr, - awc_RID_Stats16_RxWepOk, - awc_RID_Stats16_RetryLong, - awc_RID_Stats16_RetryShort, - awc_RID_Stats16_MaxRetries, - awc_RID_Stats16_NoAck, - awc_RID_Stats16_NoCts, - awc_RID_Stats16_RxAck, - awc_RID_Stats16_RxCts, - awc_RID_Stats16_TxAck, - awc_RID_Stats16_TxRts, - awc_RID_Stats16_TxCts, - awc_RID_Stats16_TxMc, - awc_RID_Stats16_TxBc, - awc_RID_Stats16_TxUcFrags, - awc_RID_Stats16_TxUcPackets, - awc_RID_Stats16_TxBeacon, - awc_RID_Stats16_RxBeacon, - awc_RID_Stats16_TxSinColl, - awc_RID_Stats16_TxMulColl, - awc_RID_Stats16_DefersNo, - awc_RID_Stats16_DefersProt, - awc_RID_Stats16_DefersEngy, - awc_RID_Stats16_DupFram, - awc_RID_Stats16_RxFragDisc, - awc_RID_Stats16_TxAged, - awc_RID_Stats16_RxAged, - awc_RID_Stats16_LostSync_Max, - awc_RID_Stats16_LostSync_Mis, - awc_RID_Stats16_LostSync_Arl, - awc_RID_Stats16_LostSync_Dea, - awc_RID_Stats16_LostSync_Disa, - awc_RID_Stats16_LostSync_Tsf, - awc_RID_Stats16_HostTxMc, - awc_RID_Stats16_HostTxBc, - awc_RID_Stats16_HostTxUc, - awc_RID_Stats16_HostTxFail, - awc_RID_Stats16_HostRxMc, - awc_RID_Stats16_HostRxBc, - awc_RID_Stats16_HostRxUc, - awc_RID_Stats16_HostRxDiscar, - awc_RID_Stats16_HmacTxMc, - awc_RID_Stats16_HmacTxBc, - awc_RID_Stats16_HmacTxUc, - awc_RID_Stats16_HmacTxFail, - awc_RID_Stats16_HmacRxMc, - awc_RID_Stats16_HmacRxBc, - awc_RID_Stats16_HmacRxUc, - awc_RID_Stats16_HmacRxDisca, - awc_RID_Stats16_HmacRxAcce, - awc_RID_Stats16_SsidMismatch, - awc_RID_Stats16_ApMismatch, - awc_RID_Stats16_RatesMismatc, - awc_RID_Stats16_AuthReject, - awc_RID_Stats16_AuthTimeout, - awc_RID_Stats16_AssocReject, - awc_RID_Stats16_AssocTimeout, - awc_RID_Stats16_NewReason, - awc_RID_Stats16_AuthFail_1, - awc_RID_Stats16_AuthFail_2, - awc_RID_Stats16_AuthFail_3, - awc_RID_Stats16_AuthFail_4, - awc_RID_Stats16_AuthFail_5, - awc_RID_Stats16_AuthFail_6, - awc_RID_Stats16_AuthFail_7, - awc_RID_Stats16_AuthFail_8, - awc_RID_Stats16_AuthFail_9, - awc_RID_Stats16_AuthFail_10, - awc_RID_Stats16_AuthFail_11, - awc_RID_Stats16_AuthFail_12, - awc_RID_Stats16_AuthFail_13, - awc_RID_Stats16_AuthFail_14, - awc_RID_Stats16_AuthFail_15, - awc_RID_Stats16_AuthFail_16, - awc_RID_Stats16_AuthFail_17, - awc_RID_Stats16_AuthFail_18, - awc_RID_Stats16_AuthFail_19, - awc_RID_Stats16_RxMan, - awc_RID_Stats16_TxMan, - awc_RID_Stats16_RxRefresh, - awc_RID_Stats16_TxRefresh, - awc_RID_Stats16_RxPoll, - awc_RID_Stats16_TxPoll, - awc_RID_Stats16_HostRetries, - awc_RID_Stats16_LostSync_HostReq, - awc_RID_Stats16_HostTxBytes, - awc_RID_Stats16_HostRxBytes, - awc_RID_Stats16_ElapsedUsec, - awc_RID_Stats16_ElapsedSec, - awc_RID_Stats16_LostSyncBett, - {0} -}; - -struct aironet4500_RID awc_Stats16_delta_RID[]={ - awc_RID_Stats16_delta_RidLen, - awc_RID_Stats16_delta_RxOverrunErr, - awc_RID_Stats16_delta_RxPlcpCrcErr, - awc_RID_Stats16_delta_RxPlcpFormat, - awc_RID_Stats16_delta_RxPlcpLength, - awc_RID_Stats16_delta_RxMacCrcErr, - awc_RID_Stats16_delta_RxMacCrcOk, - awc_RID_Stats16_delta_RxWepErr, - awc_RID_Stats16_delta_RxWepOk, - awc_RID_Stats16_delta_RetryLong, - awc_RID_Stats16_delta_RetryShort, - awc_RID_Stats16_delta_MaxRetries, - awc_RID_Stats16_delta_NoAck, - awc_RID_Stats16_delta_NoCts, - awc_RID_Stats16_delta_RxAck, - awc_RID_Stats16_delta_RxCts, - awc_RID_Stats16_delta_TxAck, - awc_RID_Stats16_delta_TxRts, - awc_RID_Stats16_delta_TxCts, - awc_RID_Stats16_delta_TxMc, - awc_RID_Stats16_delta_TxBc, - awc_RID_Stats16_delta_TxUcFrags, - awc_RID_Stats16_delta_TxUcPackets, - awc_RID_Stats16_delta_TxBeacon, - awc_RID_Stats16_delta_RxBeacon, - awc_RID_Stats16_delta_TxSinColl, - awc_RID_Stats16_delta_TxMulColl, - awc_RID_Stats16_delta_DefersNo, - awc_RID_Stats16_delta_DefersProt, - awc_RID_Stats16_delta_DefersEngy, - awc_RID_Stats16_delta_DupFram, - awc_RID_Stats16_delta_RxFragDisc, - awc_RID_Stats16_delta_TxAged, - awc_RID_Stats16_delta_RxAged, - awc_RID_Stats16_delta_LostSync_Max, - awc_RID_Stats16_delta_LostSync_Mis, - awc_RID_Stats16_delta_LostSync_Arl, - awc_RID_Stats16_delta_LostSync_Dea, - awc_RID_Stats16_delta_LostSync_Disa, - awc_RID_Stats16_delta_LostSync_Tsf, - awc_RID_Stats16_delta_HostTxMc, - awc_RID_Stats16_delta_HostTxBc, - awc_RID_Stats16_delta_HostTxUc, - awc_RID_Stats16_delta_HostTxFail, - awc_RID_Stats16_delta_HostRxMc, - awc_RID_Stats16_delta_HostRxBc, - awc_RID_Stats16_delta_HostRxUc, - awc_RID_Stats16_delta_HostRxDiscar, - awc_RID_Stats16_delta_HmacTxMc, - awc_RID_Stats16_delta_HmacTxBc, - awc_RID_Stats16_delta_HmacTxUc, - awc_RID_Stats16_delta_HmacTxFail, - awc_RID_Stats16_delta_HmacRxMc, - awc_RID_Stats16_delta_HmacRxBc, - awc_RID_Stats16_delta_HmacRxUc, - awc_RID_Stats16_delta_HmacRxDisca, - awc_RID_Stats16_delta_HmacRxAcce, - awc_RID_Stats16_delta_SsidMismatch, - awc_RID_Stats16_delta_ApMismatch, - awc_RID_Stats16_delta_RatesMismatc, - awc_RID_Stats16_delta_AuthReject, - awc_RID_Stats16_delta_AuthTimeout, - awc_RID_Stats16_delta_AssocReject, - awc_RID_Stats16_delta_AssocTimeout, - awc_RID_Stats16_delta_NewReason, - awc_RID_Stats16_delta_AuthFail_1, - awc_RID_Stats16_delta_AuthFail_2, - awc_RID_Stats16_delta_AuthFail_3, - awc_RID_Stats16_delta_AuthFail_4, - awc_RID_Stats16_delta_AuthFail_5, - awc_RID_Stats16_delta_AuthFail_6, - awc_RID_Stats16_delta_AuthFail_7, - awc_RID_Stats16_delta_AuthFail_8, - awc_RID_Stats16_delta_AuthFail_9, - awc_RID_Stats16_delta_AuthFail_10, - awc_RID_Stats16_delta_AuthFail_11, - awc_RID_Stats16_delta_AuthFail_12, - awc_RID_Stats16_delta_AuthFail_13, - awc_RID_Stats16_delta_AuthFail_14, - awc_RID_Stats16_delta_AuthFail_15, - awc_RID_Stats16_delta_AuthFail_16, - awc_RID_Stats16_delta_AuthFail_17, - awc_RID_Stats16_delta_AuthFail_18, - awc_RID_Stats16_delta_AuthFail_19, - awc_RID_Stats16_delta_RxMan, - awc_RID_Stats16_delta_TxMan, - awc_RID_Stats16_delta_RxRefresh, - awc_RID_Stats16_delta_TxRefresh, - awc_RID_Stats16_delta_RxPoll, - awc_RID_Stats16_delta_TxPoll, - awc_RID_Stats16_delta_HostRetries, - awc_RID_Stats16_delta_LostSync_HostReq, - awc_RID_Stats16_delta_HostTxBytes, - awc_RID_Stats16_delta_HostRxBytes, - awc_RID_Stats16_delta_ElapsedUsec, - awc_RID_Stats16_delta_ElapsedSec, - awc_RID_Stats16_delta_LostSyncBett, - {0} -}; - -struct aironet4500_RID awc_Stats16_clear_RID[]={ - awc_RID_Stats16_clear_RidLen, - awc_RID_Stats16_clear_RxOverrunErr, - awc_RID_Stats16_clear_RxPlcpCrcErr, - awc_RID_Stats16_clear_RxPlcpFormat, - awc_RID_Stats16_clear_RxPlcpLength, - awc_RID_Stats16_clear_RxMacCrcErr, - awc_RID_Stats16_clear_RxMacCrcOk, - awc_RID_Stats16_clear_RxWepErr, - awc_RID_Stats16_clear_RxWepOk, - awc_RID_Stats16_clear_RetryLong, - awc_RID_Stats16_clear_RetryShort, - awc_RID_Stats16_clear_MaxRetries, - awc_RID_Stats16_clear_NoAck, - awc_RID_Stats16_clear_NoCts, - awc_RID_Stats16_clear_RxAck, - awc_RID_Stats16_clear_RxCts, - awc_RID_Stats16_clear_TxAck, - awc_RID_Stats16_clear_TxRts, - awc_RID_Stats16_clear_TxCts, - awc_RID_Stats16_clear_TxMc, - awc_RID_Stats16_clear_TxBc, - awc_RID_Stats16_clear_TxUcFrags, - awc_RID_Stats16_clear_TxUcPackets, - awc_RID_Stats16_clear_TxBeacon, - awc_RID_Stats16_clear_RxBeacon, - awc_RID_Stats16_clear_TxSinColl, - awc_RID_Stats16_clear_TxMulColl, - awc_RID_Stats16_clear_DefersNo, - awc_RID_Stats16_clear_DefersProt, - awc_RID_Stats16_clear_DefersEngy, - awc_RID_Stats16_clear_DupFram, - awc_RID_Stats16_clear_RxFragDisc, - awc_RID_Stats16_clear_TxAged, - awc_RID_Stats16_clear_RxAged, - awc_RID_Stats16_clear_LostSync_Max, - awc_RID_Stats16_clear_LostSync_Mis, - awc_RID_Stats16_clear_LostSync_Arl, - awc_RID_Stats16_clear_LostSync_Dea, - awc_RID_Stats16_clear_LostSync_Disa, - awc_RID_Stats16_clear_LostSync_Tsf, - awc_RID_Stats16_clear_HostTxMc, - awc_RID_Stats16_clear_HostTxBc, - awc_RID_Stats16_clear_HostTxUc, - awc_RID_Stats16_clear_HostTxFail, - awc_RID_Stats16_clear_HostRxMc, - awc_RID_Stats16_clear_HostRxBc, - awc_RID_Stats16_clear_HostRxUc, - awc_RID_Stats16_clear_HostRxDiscar, - awc_RID_Stats16_clear_HmacTxMc, - awc_RID_Stats16_clear_HmacTxBc, - awc_RID_Stats16_clear_HmacTxUc, - awc_RID_Stats16_clear_HmacTxFail, - awc_RID_Stats16_clear_HmacRxMc, - awc_RID_Stats16_clear_HmacRxBc, - awc_RID_Stats16_clear_HmacRxUc, - awc_RID_Stats16_clear_HmacRxDisca, - awc_RID_Stats16_clear_HmacRxAcce, - awc_RID_Stats16_clear_SsidMismatch, - awc_RID_Stats16_clear_ApMismatch, - awc_RID_Stats16_clear_RatesMismatc, - awc_RID_Stats16_clear_AuthReject, - awc_RID_Stats16_clear_AuthTimeout, - awc_RID_Stats16_clear_AssocReject, - awc_RID_Stats16_clear_AssocTimeout, - awc_RID_Stats16_clear_NewReason, - awc_RID_Stats16_clear_AuthFail_1, - awc_RID_Stats16_clear_AuthFail_2, - awc_RID_Stats16_clear_AuthFail_3, - awc_RID_Stats16_clear_AuthFail_4, - awc_RID_Stats16_clear_AuthFail_5, - awc_RID_Stats16_clear_AuthFail_6, - awc_RID_Stats16_clear_AuthFail_7, - awc_RID_Stats16_clear_AuthFail_8, - awc_RID_Stats16_clear_AuthFail_9, - awc_RID_Stats16_clear_AuthFail_10, - awc_RID_Stats16_clear_AuthFail_11, - awc_RID_Stats16_clear_AuthFail_12, - awc_RID_Stats16_clear_AuthFail_13, - awc_RID_Stats16_clear_AuthFail_14, - awc_RID_Stats16_clear_AuthFail_15, - awc_RID_Stats16_clear_AuthFail_16, - awc_RID_Stats16_clear_AuthFail_17, - awc_RID_Stats16_clear_AuthFail_18, - awc_RID_Stats16_clear_AuthFail_19, - awc_RID_Stats16_clear_RxMan, - awc_RID_Stats16_clear_TxMan, - awc_RID_Stats16_clear_RxRefresh, - awc_RID_Stats16_clear_TxRefresh, - awc_RID_Stats16_clear_RxPoll, - awc_RID_Stats16_clear_TxPoll, - awc_RID_Stats16_clear_HostRetries, - awc_RID_Stats16_clear_LostSync_HostReq, - awc_RID_Stats16_clear_HostTxBytes, - awc_RID_Stats16_clear_HostRxBytes, - awc_RID_Stats16_clear_ElapsedUsec, - awc_RID_Stats16_clear_ElapsedSec, - awc_RID_Stats16_clear_LostSyncBett, - {0} -}; - -#endif - -struct awc_rid_dir awc_rids[]={ - // following MUST be consistent with awc_rids_setup !!! - {&aironet4500_RID_Select_General_Config,sizeof(awc_gen_RID) / sizeof(struct aironet4500_RID) ,awc_gen_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_SSID_list, sizeof(awc_SSID_RID) / sizeof(struct aironet4500_RID) , awc_SSID_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_AP_list, sizeof(awc_AP_List_RID) / sizeof(struct aironet4500_RID) , awc_AP_List_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_Driver_name, sizeof(awc_Dname_RID) / sizeof(struct aironet4500_RID) , awc_Dname_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_Encapsulation, sizeof(awc_enc_RID) / sizeof(struct aironet4500_RID) , awc_enc_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_Active_Config, sizeof(awc_act_RID) / sizeof(struct aironet4500_RID) , awc_act_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_Capabilities, sizeof(awc_Cap_RID) / sizeof(struct aironet4500_RID) , awc_Cap_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_Status, sizeof(awc_Status_RID) / sizeof(struct aironet4500_RID) , awc_Status_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_AP_Info, sizeof(awc_AP_RID) / sizeof(struct aironet4500_RID) , awc_AP_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_32_stats, sizeof(awc_Stats_RID) / sizeof(struct aironet4500_RID) , awc_Stats_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_32_stats_delta, sizeof(awc_Stats_delta_RID) / sizeof(struct aironet4500_RID) , awc_Stats_delta_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_32_stats_clear, sizeof(awc_Stats_clear_RID) / sizeof(struct aironet4500_RID) , awc_Stats_clear_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_WEP_volatile, sizeof(awc_WEPv_RID) / sizeof(struct aironet4500_RID) , awc_WEPv_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_WEP_nonvolatile, sizeof(awc_WEPnv_RID) / sizeof(struct aironet4500_RID) , awc_WEPnv_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_Modulation, sizeof(awc_Modulation_RID) / sizeof(struct aironet4500_RID) , awc_Modulation_RID , NULL, NULL,0 }, - -#ifdef AWC_USE_16BIT_STATS - {&aironet4500_RID_Select_16_stats, sizeof(awc_Stats16_RID) / sizeof(struct aironet4500_RID) , awc_Stats16_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_16_stats_delta, sizeof(awc_Stats16_delta_RID) / sizeof(struct aironet4500_RID) , awc_Stats16_delta_RID , NULL, NULL,0 }, - {&aironet4500_RID_Select_16_stats_clear, sizeof(awc_Stats16_clear_RID) / sizeof(struct aironet4500_RID) , awc_Stats16_clear_RID , NULL, NULL,0 }, -#else - {NULL},{NULL},{NULL}, -#endif - - {0} - - -}; - - -int awc_nof_rids = (sizeof(awc_rids) / sizeof(struct awc_rid_dir)) -1; - - -int awc_rids_setup(struct net_device * dev){ - - struct awc_private * priv = (struct awc_private *) dev->priv; - int i=0; - while ( i < AWC_NOF_RIDS){ - if (awc_rids[i].selector) - memcpy(&priv->rid_dir[i],&awc_rids[i],sizeof(priv->rid_dir[0]) ); - else priv->rid_dir[i].selector = NULL; - i++; - } - for (i=0; i< AWC_NOF_RIDS && i < awc_nof_rids; i++){ - priv->rid_dir[i].dev = dev; - }; - - // following MUST be consistent with awc_rids !!! - priv->rid_dir[0].buff = &priv->config; // card RID mirrors - priv->rid_dir[1].buff = &priv->SSIDs; - priv->rid_dir[2].buff = &priv->fixed_APs; - priv->rid_dir[3].buff = &priv->driver_name; - priv->rid_dir[4].buff = &priv->enc_trans; - priv->rid_dir[5].buff = &priv->general_config; // - priv->rid_dir[6].buff = &priv->capabilities; - priv->rid_dir[7].buff = &priv->status; - priv->rid_dir[8].buff = &priv->AP; - priv->rid_dir[9].buff = &priv->statistics; - priv->rid_dir[10].buff = &priv->statistics_delta; - priv->rid_dir[11].buff = &priv->statistics_delta_clear; - priv->rid_dir[12].buff = &priv->wep_volatile; - priv->rid_dir[13].buff = &priv->wep_nonvolatile; - priv->rid_dir[14].buff = &priv->modulation; - - priv->rid_dir[15].buff = &priv->statistics16; - priv->rid_dir[16].buff = &priv->statistics16_delta; - priv->rid_dir[17].buff = &priv->statistics16_delta_clear; - - priv->rid_dir[0].bufflen = sizeof(priv->config); // card RID mirrors - priv->rid_dir[1].bufflen = sizeof(priv->SSIDs); - priv->rid_dir[2].bufflen = sizeof(priv->fixed_APs); - priv->rid_dir[3].bufflen = sizeof(priv->driver_name); - priv->rid_dir[4].bufflen = sizeof(priv->enc_trans); - priv->rid_dir[5].bufflen = sizeof(priv->general_config); // - priv->rid_dir[6].bufflen = sizeof(priv->capabilities); - priv->rid_dir[7].bufflen = sizeof(priv->status); - priv->rid_dir[8].bufflen = sizeof(priv->AP); - priv->rid_dir[9].bufflen = sizeof(priv->statistics); - priv->rid_dir[10].bufflen = sizeof(priv->statistics_delta); - priv->rid_dir[11].bufflen = sizeof(priv->statistics_delta_clear); - priv->rid_dir[12].bufflen = sizeof(priv->wep_volatile); - priv->rid_dir[13].bufflen = sizeof(priv->wep_nonvolatile); - priv->rid_dir[14].bufflen = sizeof(priv->modulation); - - priv->rid_dir[15].bufflen = sizeof(priv->statistics16); - priv->rid_dir[16].bufflen = sizeof(priv->statistics16_delta); - priv->rid_dir[17].bufflen = sizeof(priv->statistics16_delta_clear); - - return 0; - -}; - - - - - diff --git a/drivers/net/pcmcia/Kconfig b/drivers/net/pcmcia/Kconfig index 0de8e557a624..6694fadeaae6 100644 --- a/drivers/net/pcmcia/Kconfig +++ b/drivers/net/pcmcia/Kconfig @@ -153,34 +153,6 @@ config PCMCIA_IBMTR The module will be called ibmtr_cs. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -config NET_PCMCIA_RADIO - bool "Pcmcia Wireless LAN" - depends on NET_PCMCIA - help - Say Y here if you would like to use a PCMCIA (PC-card) device to - connect to a wireless local area network. Then say Y to the driver - for your particular card below. - - To use your PC-cards, you will need supporting software from David - Hinds' pcmcia-cs package (see the file <file:Documentation/Changes> - for location). You also want to check out the PCMCIA-HOWTO, - available from <http://www.linuxdoc.org/docs.html#howto>. - -config PCMCIA_RAYCS - tristate "Aviator/Raytheon 2.4MHz wireless support" - depends on NET_PCMCIA_RADIO && PCMCIA - ---help--- - Say Y here if you intend to attach an Aviator/Raytheon PCMCIA - (PC-card) wireless Ethernet networking card to your computer. - Please read the file <file:Documentation/networking/ray_cs.txt> for - details. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called ray_cs. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. If - unsure, say N. - config AIRONET4500_CS tristate "Aironet 4500/4800 PCMCIA support" depends on NET_PCMCIA_RADIO && AIRONET4500 && PCMCIA diff --git a/drivers/net/pcmcia/Makefile b/drivers/net/pcmcia/Makefile index 98404b743a85..50457c8a41cd 100644 --- a/drivers/net/pcmcia/Makefile +++ b/drivers/net/pcmcia/Makefile @@ -14,7 +14,6 @@ obj-$(CONFIG_ARCNET_COM20020_CS)+= com20020_cs.o obj-$(CONFIG_PCMCIA_AXNET) += axnet_cs.o # 16-bit wireless client drivers -obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o obj-$(CONFIG_AIRONET4500_CS) += aironet4500_cs.o obj-$(CONFIG_PCMCIA_IBMTR) += ibmtr_cs.o diff --git a/drivers/net/setup.c b/drivers/net/setup.c index bad7cf3382ad..fff386a67e43 100644 --- a/drivers/net/setup.c +++ b/drivers/net/setup.c @@ -14,10 +14,6 @@ extern int x25_asy_init_ctrl_dev(void); extern int dmascc_init(void); -extern int awc4500_pci_probe(void); -extern int awc4500_isa_probe(void); -extern int awc4500_pnp_probe(void); -extern int awc4500_365_probe(void); extern int arcnet_init(void); extern int scc_enet_init(void); extern int fec_enet_init(void); @@ -80,23 +76,6 @@ static struct net_probe pci_probes[] __initdata = { #endif /* -* -* Wireless non-HAM -* -*/ -#ifdef CONFIG_AIRONET4500_NONCS - -#ifdef CONFIG_AIRONET4500_PCI - {awc4500_pci_probe,0}, -#endif - -#ifdef CONFIG_AIRONET4500_PNP - {awc4500_pnp_probe,0}, -#endif - -#endif - -/* * Token Ring Drivers */ #ifdef CONFIG_MADGEMC diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index 62aa29d77b8a..03a0ac178846 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig @@ -1,6 +1,73 @@ # # Wireless LAN device configuration # + +menu "Wireless LAN (non-hamradio)" + depends on NETDEVICES + +config NET_RADIO + bool "Wireless LAN (non-hamradio)" + ---help--- + Support for wireless LANs and everything having to do with radio, + but not with amateur radio or FM broadcasting. + + Saying Y here also enables the Wireless Extensions (creates + /proc/net/wireless and enables ifconfig access). The Wireless + Extension is a generic API allowing a driver to expose to the user + space configuration and statistics specific to common Wireless LANs. + The beauty of it is that a single set of tool can support all the + variations of Wireless LANs, regardless of their type (as long as + the driver supports Wireless Extension). Another advantage is that + these parameters may be changed on the fly without restarting the + driver (or Linux). If you wish to use Wireless Extensions with + wireless PCMCIA (PC-) cards, you need to say Y here; you can fetch + the tools from + <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>. + + Some user-level drivers for scarab devices which don't require + special kernel support are available from + <ftp://shadow.cabi.net/pub/Linux/>. + +config STRIP + tristate "STRIP (Metricom starmode radio IP)" + depends on NET_RADIO && INET + ---help--- + Say Y if you have a Metricom radio and intend to use Starmode Radio + IP. STRIP is a radio protocol developed for the MosquitoNet project + (on the WWW at <http://mosquitonet.stanford.edu/>) to send Internet + traffic using Metricom radios. Metricom radios are small, battery + powered, 100kbit/sec packet radio transceivers, about the size and + weight of a cellular telephone. (You may also have heard them called + "Metricom modems" but we avoid the term "modem" because it misleads + many people into thinking that you can plug a Metricom modem into a + phone line and use it as a modem.) + + You can use STRIP on any Linux machine with a serial port, although + it is obviously most useful for people with laptop computers. If you + think you might get a Metricom radio in the future, there is no harm + in saying Y to STRIP now, except that it makes the kernel a bit + bigger. + + You can also compile this as a module ( = code which can be inserted + in and removed from the running kernel whenever you want), say M + here and read <file:Documentation/modules.txt>. The module will be + called strip. + +config ARLAN + tristate "Aironet Arlan 655 & IC2200 DS support" + depends on NET_RADIO && ISA + ---help--- + Aironet makes Arlan, a class of wireless LAN adapters. These use the + www.Telxon.com chip, which is also used on several similar cards. + This driver is tested on the 655 and IC2200 series cards. Look at + <http://www.ylenurme.ee/~elmer/655/> for the latest information. + + The driver is built as two modules, arlan and arlan-proc. The latter + is the /proc interface and is not needed most of time. + + On some computers the card ends up in non-valid state after some + time. Use a ping-reset script to clear it. + comment "Wireless ISA/PCI cards support" depends on NET_RADIO && (ISA || PCI || ALL_PPC || PCMCIA) @@ -182,9 +249,39 @@ config AIRO_CS for location). You also want to check out the PCMCIA-HOWTO, available from <http://www.linuxdoc.org/docs.html#howto>. +config NET_PCMCIA_RADIO + bool "PCMCIA Wireless LAN" + depends on NET_PCMCIA + help + Say Y here if you would like to use a PCMCIA (PC-card) device to + connect to a wireless local area network. Then say Y to the driver + for your particular card below. + + To use your PC-cards, you will need supporting software from David + Hinds' pcmcia-cs package (see the file <file:Documentation/Changes> + for location). You also want to check out the PCMCIA-HOWTO, + available from <http://www.linuxdoc.org/docs.html#howto>. + +config PCMCIA_RAYCS + tristate "Aviator/Raytheon 2.4MHz wireless support" + depends on NET_PCMCIA_RADIO && PCMCIA + ---help--- + Say Y here if you intend to attach an Aviator/Raytheon PCMCIA + (PC-card) wireless Ethernet networking card to your computer. + Please read the file <file:Documentation/networking/ray_cs.txt> for + details. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called ray_cs. If you want to compile it as a + module, say M here and read <file:Documentation/modules.txt>. If + unsure, say N. + # yes, this works even when no drivers are selected config NET_WIRELESS bool depends on NET_RADIO && (ISA || PCI || ALL_PPC || PCMCIA) default y +endmenu + diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile index 090523148210..cf040c6579dd 100644 --- a/drivers/net/wireless/Makefile +++ b/drivers/net/wireless/Makefile @@ -2,6 +2,9 @@ # Makefile for the Linux Wireless network device drivers. # +obj-$(CONFIG_STRIP) += strip.o +obj-$(CONFIG_ARLAN) += arlan.o arlan-proc.o + # Obsolete cards obj-$(CONFIG_WAVELAN) += wavelan.o obj-$(CONFIG_PCMCIA_NETWAVE) += netwave_cs.o @@ -15,3 +18,7 @@ obj-$(CONFIG_PCI_HERMES) += orinoco_pci.o obj-$(CONFIG_AIRO) += airo.o obj-$(CONFIG_AIRO_CS) += airo_cs.o airo.o + +# 16-bit wireless PCMCIA client drivers +obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o + diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index ec86ccb3bfda..43fe33074421 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -4002,6 +4002,10 @@ static int __devinit airo_pci_probe(struct pci_dev *pdev, { struct net_device *dev; + if (pci_enable_device(pdev)) + return -ENODEV; + pci_set_master(pdev); + dev = init_airo_card(pdev->irq, pdev->resource[2].start, 0); if (!dev) return -ENODEV; diff --git a/drivers/net/arlan-proc.c b/drivers/net/wireless/arlan-proc.c index a69e86af4dff..a69e86af4dff 100644 --- a/drivers/net/arlan-proc.c +++ b/drivers/net/wireless/arlan-proc.c diff --git a/drivers/net/arlan.c b/drivers/net/wireless/arlan.c index e92b7725746f..e92b7725746f 100644 --- a/drivers/net/arlan.c +++ b/drivers/net/wireless/arlan.c diff --git a/drivers/net/arlan.h b/drivers/net/wireless/arlan.h index 198583664a35..198583664a35 100644 --- a/drivers/net/arlan.h +++ b/drivers/net/wireless/arlan.h diff --git a/drivers/net/pcmcia/ray_cs.c b/drivers/net/wireless/ray_cs.c index cc9d6559a9c3..cc9d6559a9c3 100644 --- a/drivers/net/pcmcia/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c diff --git a/drivers/net/pcmcia/ray_cs.h b/drivers/net/wireless/ray_cs.h index 6d4985061764..6d4985061764 100644 --- a/drivers/net/pcmcia/ray_cs.h +++ b/drivers/net/wireless/ray_cs.h diff --git a/drivers/net/pcmcia/rayctl.h b/drivers/net/wireless/rayctl.h index 49d9b267bc0f..49d9b267bc0f 100644 --- a/drivers/net/pcmcia/rayctl.h +++ b/drivers/net/wireless/rayctl.h diff --git a/drivers/net/strip.c b/drivers/net/wireless/strip.c index 9ee3562c285c..9ee3562c285c 100644 --- a/drivers/net/strip.c +++ b/drivers/net/wireless/strip.c diff --git a/drivers/usb/Makefile.lib b/drivers/usb/Makefile.lib new file mode 100644 index 000000000000..78bfdd1ad89c --- /dev/null +++ b/drivers/usb/Makefile.lib @@ -0,0 +1,3 @@ +obj-$(CONFIG_USB_CATC) += crc32.o +obj-$(CONFIG_USB_SPEEDTOUCH) += crc32.o +obj-$(CONFIG_USB_USBNET) += crc32.o diff --git a/drivers/usb/class/Makefile.lib b/drivers/usb/class/Makefile.lib deleted file mode 100644 index 891c91821ce8..000000000000 --- a/drivers/usb/class/Makefile.lib +++ /dev/null @@ -1 +0,0 @@ -obj-$(CONFIG_USB_CATC) += crc32.o diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index d388c48e5756..5cd38d761590 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -606,6 +606,7 @@ static int acm_probe (struct usb_interface *intf, if (!acm->ctrlurb) { err("out of memory"); kfree(acm); + kfree(buf); return -ENOMEM; } acm->readurb = usb_alloc_urb(0, GFP_KERNEL); @@ -613,6 +614,7 @@ static int acm_probe (struct usb_interface *intf, err("out of memory"); usb_free_urb(acm->ctrlurb); kfree(acm); + kfree(buf); return -ENOMEM; } acm->writeurb = usb_alloc_urb(0, GFP_KERNEL); @@ -621,6 +623,7 @@ static int acm_probe (struct usb_interface *intf, usb_free_urb(acm->readurb); usb_free_urb(acm->ctrlurb); kfree(acm); + kfree(buf); return -ENOMEM; } diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 53d1f410dcf7..9088123c0d3e 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -219,16 +219,25 @@ static void sg_complete (struct urb *urb, struct pt_regs *regs) spin_lock_irqsave (&io->lock, flags); /* In 2.5 we require hcds' endpoint queues not to progress after fault - * reports, until the competion callback (this!) returns. That lets + * reports, until the completion callback (this!) returns. That lets * device driver code (like this routine) unlink queued urbs first, * if it needs to, since the HC won't work on them at all. So it's * not possible for page N+1 to overwrite page N, and so on. + * + * That's only for "hard" faults; "soft" faults (unlinks) sometimes + * complete before the HCD can get requests away from hardware, + * though never during cleanup after a hard fault. */ - if (io->status && urb->actual_length) { - err ("driver for bus %s dev %s ep %d-%s corrupted data!", - io->dev->bus->bus_name, io->dev->devpath, + if (io->status + && (io->status != -ECONNRESET + || urb->status != -ECONNRESET) + && urb->actual_length) { + dev_err (io->dev->bus->controller, + "dev %s ep%d%s scatterlist error %d/%d\n", + io->dev->devpath, usb_pipeendpoint (urb->pipe), - usb_pipein (urb->pipe) ? "in" : "out"); + usb_pipein (urb->pipe) ? "in" : "out", + urb->status, io->status); // BUG (); } diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index dd125b117124..263111a8b170 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -195,7 +195,7 @@ int usb_submit_urb(struct urb *urb, int mem_flags) if (!urb || urb->hcpriv || !urb->complete) return -EINVAL; - if (!(dev = urb->dev) || !dev->bus || dev->devnum <= 0) + if (!(dev = urb->dev) || !dev->present || !dev->bus || dev->devnum <= 0) return -ENODEV; if (!(op = dev->bus->op) || !op->submit_urb) return -ENODEV; @@ -376,7 +376,7 @@ int usb_submit_urb(struct urb *urb, int mem_flags) */ int usb_unlink_urb(struct urb *urb) { - if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op) + if (urb && urb->dev && urb->dev->present && urb->dev->bus && urb->dev->bus->op) return urb->dev->bus->op->unlink_urb(urb); else return -ENODEV; diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index f1643fff1d7b..2d9e552ca177 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -679,6 +679,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus) memset(dev, 0, sizeof(*dev)); device_initialize(&dev->dev); + dev->present = 1; usb_bus_get(bus); @@ -854,6 +855,10 @@ void usb_disconnect(struct usb_device **pdev) } device_unregister(&dev->dev); + /* mark the device as not present so any further urb submissions for + * this device will fail. */ + dev->present = 0; + /* Decrement the reference count, it'll auto free everything when */ /* it hits 0 which could very well be now */ usb_put_dev(dev); diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 6e4b5eebcf1a..e8bb202b014d 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -37,7 +37,7 @@ #include <linux/timer.h> #include <linux/list.h> #include <linux/interrupt.h> - +#include <linux/reboot.h> #include <linux/usb.h> #include <linux/version.h> @@ -306,6 +306,19 @@ static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap) return 0; } +static int +ehci_reboot (struct notifier_block *self, unsigned long code, void *null) +{ + struct ehci_hcd *ehci; + + ehci = container_of (self, struct ehci_hcd, reboot_notifier); + + /* make BIOS/etc use companion controller during reboot */ + writel (0, &ehci->regs->configured_flag); + return 0; +} + + /* called by khubd or root hub init threads */ static int ehci_start (struct usb_hcd *hcd) @@ -464,6 +477,9 @@ done2: * are explicitly handed to companion controller(s), so no TT is * involved with the root hub. */ + ehci->reboot_notifier.notifier_call = ehci_reboot; + register_reboot_notifier (&ehci->reboot_notifier); + ehci->hcd.state = USB_STATE_READY; writel (FLAG_CF, &ehci->regs->configured_flag); readl (&ehci->regs->command); /* unblock posted write */ @@ -520,6 +536,7 @@ static void ehci_stop (struct usb_hcd *hcd) /* let companion controllers work when we aren't */ writel (0, &ehci->regs->configured_flag); + unregister_reboot_notifier (&ehci->reboot_notifier); remove_debug_files (ehci); diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index baf6bb611676..4e2fcee685f1 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -81,8 +81,10 @@ struct ehci_hcd { /* one per controller */ struct pci_pool *sitd_pool; /* sitd per split iso urb */ struct timer_list watchdog; + struct notifier_block reboot_notifier; unsigned stamp; + /* irq statistics */ #ifdef EHCI_STATS struct ehci_stats stats; # define COUNT(x) do { (x)++; } while (0) diff --git a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig index f8def99890eb..8c2de8d2db95 100644 --- a/drivers/usb/input/Kconfig +++ b/drivers/usb/input/Kconfig @@ -163,11 +163,10 @@ config USB_POWERMATE tristate "Griffin PowerMate and Contour Jog support" depends on USB && INPUT ---help--- - Say Y here if you want to use Griffin PowerMate or Contour Jog devices. - These are stainless steel dials which can measure clockwise and - anticlockwise rotation. The dial also acts as a pushbutton. The base - contains an LED which can be instructed to pulse or to switch to a - particular intensity. + Say Y here if you want to use Griffin PowerMate or Contour Jog devices. + These are aluminum dials which can measure clockwise and anticlockwise + rotation. The dial also acts as a pushbutton. The base contains an LED + which can be instructed to pulse or to switch to a particular intensity. You can download userspace tools from http://sowerbutts.com/powermate/ diff --git a/drivers/usb/input/usbkbd.c b/drivers/usb/input/usbkbd.c index f9d89466c4a3..0ce3e79d0891 100644 --- a/drivers/usb/input/usbkbd.c +++ b/drivers/usb/input/usbkbd.c @@ -355,7 +355,7 @@ static struct usb_device_id usb_kbd_id_table [] = { MODULE_DEVICE_TABLE (usb, usb_kbd_id_table); static struct usb_driver usb_kbd_driver = { - .name = "keyboard", + .name = "usbkbd", .probe = usb_kbd_probe, .disconnect = usb_kbd_disconnect, .id_table = usb_kbd_id_table, diff --git a/drivers/usb/input/usbmouse.c b/drivers/usb/input/usbmouse.c index 5cad58bd5e38..f583ba2ae8b5 100644 --- a/drivers/usb/input/usbmouse.c +++ b/drivers/usb/input/usbmouse.c @@ -238,7 +238,7 @@ static struct usb_device_id usb_mouse_id_table [] = { MODULE_DEVICE_TABLE (usb, usb_mouse_id_table); static struct usb_driver usb_mouse_driver = { - .name = "usb_mouse", + .name = "usbmouse", .probe = usb_mouse_probe, .disconnect = usb_mouse_disconnect, .id_table = usb_mouse_id_table, diff --git a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c index 6d3c093afa1d..3f2305bf964b 100644 --- a/drivers/usb/media/ov511.c +++ b/drivers/usb/media/ov511.c @@ -1,7 +1,7 @@ /* * OmniVision OV511 Camera-to-USB Bridge Driver * - * Copyright (c) 1999-2002 Mark W. McClelland + * Copyright (c) 1999-2003 Mark W. McClelland * Original decompression code Copyright 1998-2000 OmniVision Technologies * Many improvements by Bret Wallach <bwallac1@san.rr.com> * Color fixes by by Orion Sky Lawlor <olawlor@acm.org> (2/26/2000) @@ -60,7 +60,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.63 for Linux 2.5" +#define DRIVER_VERSION "v1.64 for Linux 2.5" #define EMAIL "mark@alpha.dyndns.org" #define DRIVER_AUTHOR "Mark McClelland <mark@alpha.dyndns.org> & Bret Wallach \ & Orion Sky Lawlor <olawlor@acm.org> & Kevin Moore & Charl P. Botha \ @@ -137,7 +137,7 @@ MODULE_PARM_DESC(snapshot, "Enable snapshot mode"); MODULE_PARM(cams, "i"); MODULE_PARM_DESC(cams, "Number of simultaneous cameras"); MODULE_PARM(compress, "i"); -MODULE_PARM_DESC(compress, "Turn on compression (not reliable yet)"); +MODULE_PARM_DESC(compress, "Turn on compression"); MODULE_PARM(testpat, "i"); MODULE_PARM_DESC(testpat, "Replace image with vertical bar testpattern (only partially working)"); @@ -1349,6 +1349,13 @@ ov51x_restart(struct usb_ov511 *ov) return 0; } +/* Sleeps until no frames are active. Returns !0 if got signal */ +static int +ov51x_wait_frames_inactive(struct usb_ov511 *ov) +{ + return wait_event_interruptible(ov->wq, ov->curframe < 0); +} + /* Resets the hardware snapshot button */ static void ov51x_clear_snapshot(struct usb_ov511 *ov) @@ -2121,7 +2128,7 @@ sensor_get_exposure(struct usb_ov511 *ov, unsigned char *val) return 0; } -#endif /* CONFIG_PROC_FS && CONFIG_VIDEO_PROC_FS */ +#endif /* CONFIG_VIDEO_PROC_FS */ /* Turns on or off the LED. Only has an effect with OV511+/OV518(+) */ static void @@ -2486,8 +2493,6 @@ mode_init_ov_sensor_regs(struct usb_ov511 *ov, int width, int height, /******** Clock programming ********/ - // FIXME: Test this with OV6630 - /* The OV6620 needs special handling. This prevents the * severe banding that normally occurs */ if (ov->sensor == SEN_OV6620 || ov->sensor == SEN_OV6630) @@ -2995,6 +3000,7 @@ ov51x_set_default_params(struct usb_ov511 *ov) ov->frame[i].format = force_palette; else ov->frame[i].format = VIDEO_PALETTE_YUV420; + ov->frame[i].depth = get_depth(ov->frame[i].format); } @@ -3577,12 +3583,8 @@ ov511_move_data(struct usb_ov511 *ov, unsigned char *in, int n) if (frame->scanstate == STATE_LINES) { int nextf; - frame->grabstate = FRAME_DONE; // FIXME: Is this right? - - if (waitqueue_active(&frame->wq)) { - frame->grabstate = FRAME_DONE; - wake_up_interruptible(&frame->wq); - } + frame->grabstate = FRAME_DONE; + wake_up_interruptible(&frame->wq); /* If next frame is ready or grabbing, * point to it */ @@ -3747,12 +3749,8 @@ eof: if (frame->scanstate == STATE_LINES) { int nextf; - frame->grabstate = FRAME_DONE; // FIXME: Is this right? - - if (waitqueue_active(&frame->wq)) { - frame->grabstate = FRAME_DONE; - wake_up_interruptible(&frame->wq); - } + frame->grabstate = FRAME_DONE; + wake_up_interruptible(&frame->wq); /* If next frame is ready or grabbing, * point to it */ @@ -4228,7 +4226,7 @@ error: } static void -ov51x_dealloc(struct usb_ov511 *ov, int now) +ov51x_dealloc(struct usb_ov511 *ov) { PDEBUG(4, "entered"); down(&ov->buf_lock); @@ -4258,10 +4256,6 @@ ov51x_v4l1_open(struct inode *inode, struct file *file) if (ov->user) goto out; - err = ov51x_alloc(ov); - if (err < 0) - goto out; - ov->sub_flag = 0; /* In case app doesn't set them... */ @@ -4283,9 +4277,13 @@ ov51x_v4l1_open(struct inode *inode, struct file *file) goto out; } + err = ov51x_alloc(ov); + if (err < 0) + goto out; + err = ov51x_init_isoc(ov); if (err) { - ov51x_dealloc(ov, 0); + ov51x_dealloc(ov); goto out; } @@ -4319,7 +4317,7 @@ ov51x_v4l1_close(struct inode *inode, struct file *file) ov51x_led_control(ov, 0); if (ov->dev) - ov51x_dealloc(ov, 0); + ov51x_dealloc(ov); up(&ov->lock); @@ -4331,7 +4329,7 @@ ov51x_v4l1_close(struct inode *inode, struct file *file) ov->cbuf = NULL; up(&ov->cbuf_lock); - ov51x_dealloc(ov, 1); + ov51x_dealloc(ov); kfree(ov); ov = NULL; } @@ -4449,7 +4447,7 @@ ov51x_v4l1_ioctl_internal(struct inode *inode, struct file *file, case VIDIOCSPICT: { struct video_picture *p = arg; - int i; + int i, rc; PDEBUG(4, "VIDIOCSPICT"); @@ -4469,10 +4467,9 @@ ov51x_v4l1_ioctl_internal(struct inode *inode, struct file *file, if (p->palette != ov->frame[0].format) { PDEBUG(4, "Detected format change"); - /* If we're collecting previous frame wait - before changing modes */ - interruptible_sleep_on(&ov->wq); - if (signal_pending(current)) return -EINTR; + rc = ov51x_wait_frames_inactive(ov); + if (rc) + return rc; mode_init_regs(ov, ov->frame[0].width, ov->frame[0].height, p->palette, ov->sub_flag); @@ -4530,7 +4527,7 @@ ov51x_v4l1_ioctl_internal(struct inode *inode, struct file *file, case VIDIOCSWIN: { struct video_window *vw = arg; - int i, result; + int i, rc; PDEBUG(4, "VIDIOCSWIN: %dx%d", vw->width, vw->height); @@ -4545,15 +4542,14 @@ ov51x_v4l1_ioctl_internal(struct inode *inode, struct file *file, return -EINVAL; #endif - /* If we're collecting previous frame wait - before changing modes */ - interruptible_sleep_on(&ov->wq); - if (signal_pending(current)) return -EINTR; + rc = ov51x_wait_frames_inactive(ov); + if (rc) + return rc; - result = mode_init_regs(ov, vw->width, vw->height, + rc = mode_init_regs(ov, vw->width, vw->height, ov->frame[0].format, ov->sub_flag); - if (result < 0) - return result; + if (rc < 0) + return rc; for (i = 0; i < OV511_NUMFRAMES; i++) { ov->frame[i].width = vw->width; @@ -4600,7 +4596,7 @@ ov51x_v4l1_ioctl_internal(struct inode *inode, struct file *file, case VIDIOCMCAPTURE: { struct video_mmap *vm = arg; - int ret, depth; + int rc, depth; unsigned int f = vm->frame; PDEBUG(4, "VIDIOCMCAPTURE: frame: %d, %dx%d, %s", f, vm->width, @@ -4642,14 +4638,14 @@ ov51x_v4l1_ioctl_internal(struct inode *inode, struct file *file, (ov->frame[f].depth != depth)) { PDEBUG(4, "VIDIOCMCAPTURE: change in image parameters"); - /* If we're collecting previous frame wait - before changing modes */ - interruptible_sleep_on(&ov->wq); - if (signal_pending(current)) return -EINTR; - ret = mode_init_regs(ov, vm->width, vm->height, + rc = ov51x_wait_frames_inactive(ov); + if (rc) + return rc; + + rc = mode_init_regs(ov, vm->width, vm->height, vm->format, ov->sub_flag); #if 0 - if (ret < 0) { + if (rc < 0) { PDEBUG(1, "Got error while initializing regs "); return ret; } @@ -4702,18 +4698,15 @@ redo: return rc; if (frame->grabstate == FRAME_ERROR) { - int ret; - - if ((ret = ov51x_new_frame(ov, fnum)) < 0) - return ret; + if ((rc = ov51x_new_frame(ov, fnum)) < 0) + return rc; goto redo; } /* Fall through */ case FRAME_DONE: if (ov->snap_enabled && !frame->snapshot) { - int ret; - if ((ret = ov51x_new_frame(ov, fnum)) < 0) - return ret; + if ((rc = ov51x_new_frame(ov, fnum)) < 0) + return rc; goto redo; } @@ -6089,7 +6082,6 @@ error: return -EBUSY; } - /**************************************************************************** * * USB routines @@ -6097,11 +6089,10 @@ error: ***************************************************************************/ static int -ov51x_probe(struct usb_interface *intf, - const struct usb_device_id *id) +ov51x_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct usb_device *dev = interface_to_usbdev(intf); - struct usb_interface_descriptor *interface; + struct usb_interface_descriptor *idesc; struct usb_ov511 *ov; int i; int registered = 0; @@ -6112,12 +6103,11 @@ ov51x_probe(struct usb_interface *intf, if (dev->descriptor.bNumConfigurations != 1) return -ENODEV; - interface = &intf->altsetting[0].desc; + idesc = &intf->altsetting[0].desc; - /* Checking vendor/product should be enough, but what the hell */ - if (interface->bInterfaceClass != 0xFF) + if (idesc->bInterfaceClass != 0xFF) return -ENODEV; - if (interface->bInterfaceSubClass != 0x00) + if (idesc->bInterfaceSubClass != 0x00) return -ENODEV; if ((ov = kmalloc(sizeof(*ov), GFP_KERNEL)) == NULL) { @@ -6128,7 +6118,7 @@ ov51x_probe(struct usb_interface *intf, memset(ov, 0, sizeof(*ov)); ov->dev = dev; - ov->iface = interface->bInterfaceNumber; + ov->iface = idesc->bInterfaceNumber; ov->led_policy = led; ov->compress = compress; ov->lightfreq = lightfreq; @@ -6272,7 +6262,7 @@ error_dealloc: error_out: err("Camera initialization failed"); - return -ENOMEM; + return -EIO; } static void @@ -6284,6 +6274,7 @@ ov51x_disconnect(struct usb_interface *intf) PDEBUG(3, ""); usb_set_intfdata (intf, NULL); + if (!ov) return; @@ -6298,10 +6289,9 @@ ov51x_disconnect(struct usb_interface *intf) /* This will cause the process to request another frame */ for (n = 0; n < OV511_NUMFRAMES; n++) - if (waitqueue_active(&ov->frame[n].wq)) - wake_up_interruptible(&ov->frame[n].wq); - if (waitqueue_active(&ov->wq)) - wake_up_interruptible(&ov->wq); + wake_up_interruptible(&ov->frame[n].wq); + + wake_up_interruptible(&ov->wq); ov->streaming = 0; ov51x_unlink_isoc(ov); @@ -6317,7 +6307,7 @@ ov51x_disconnect(struct usb_interface *intf) ov->cbuf = NULL; up(&ov->cbuf_lock); - ov51x_dealloc(ov, 1); + ov51x_dealloc(ov); kfree(ov); ov = NULL; } @@ -6333,7 +6323,6 @@ static struct usb_driver ov511_driver = { .disconnect = ov51x_disconnect }; - /**************************************************************************** * * Module routines diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index 200f9a4c5c65..8c34f538a59a 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig @@ -96,6 +96,15 @@ config USB_LCD config USB_SPEEDTOUCH tristate "Alcatel Speedtouch ADSL USB Modem" depends on USB && ATM + help + Say Y here if you have an Alcatel SpeedTouch USB or SpeedTouch 330 + modem. In order to use your modem you will need to install some user + space tools, see <http://www.linux-usb.org/SpeedTouch/> for details. + + This code is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called speedtch. If you want to compile it as + a module, say M here and read <file:Documentation/modules.txt>. config USB_TEST tristate "USB testing driver (DEVELOPMENT)" diff --git a/drivers/usb/misc/atmsar.c b/drivers/usb/misc/atmsar.c index fce7041d51a2..e9afd62768c8 100644 --- a/drivers/usb/misc/atmsar.c +++ b/drivers/usb/misc/atmsar.c @@ -71,6 +71,7 @@ * */ +#include <linux/crc32.h> #include "atmsar.h" /*********************** @@ -113,200 +114,22 @@ *dest++ = (unsigned char) (header >> 8); \ *dest++ = (unsigned char) (header & 0xff); -/* - * CRC Routines from net/wan/sbni.c) - * table generated by Rocksoft^tm Model CRC Algorithm Table Generation Program V1.0 - */ -#define CRC32_REMAINDER CBF43926 -#define CRC32_INITIAL 0xffffffff -#define CRC32(c,crc) (crc32tab[((size_t)(crc>>24) ^ (c)) & 0xff] ^ (((crc) << 8))) -unsigned long crc32tab[256] = { - 0x00000000L, 0x04C11DB7L, 0x09823B6EL, 0x0D4326D9L, - 0x130476DCL, 0x17C56B6BL, 0x1A864DB2L, 0x1E475005L, - 0x2608EDB8L, 0x22C9F00FL, 0x2F8AD6D6L, 0x2B4BCB61L, - 0x350C9B64L, 0x31CD86D3L, 0x3C8EA00AL, 0x384FBDBDL, - 0x4C11DB70L, 0x48D0C6C7L, 0x4593E01EL, 0x4152FDA9L, - 0x5F15ADACL, 0x5BD4B01BL, 0x569796C2L, 0x52568B75L, - 0x6A1936C8L, 0x6ED82B7FL, 0x639B0DA6L, 0x675A1011L, - 0x791D4014L, 0x7DDC5DA3L, 0x709F7B7AL, 0x745E66CDL, - 0x9823B6E0L, 0x9CE2AB57L, 0x91A18D8EL, 0x95609039L, - 0x8B27C03CL, 0x8FE6DD8BL, 0x82A5FB52L, 0x8664E6E5L, - 0xBE2B5B58L, 0xBAEA46EFL, 0xB7A96036L, 0xB3687D81L, - 0xAD2F2D84L, 0xA9EE3033L, 0xA4AD16EAL, 0xA06C0B5DL, - 0xD4326D90L, 0xD0F37027L, 0xDDB056FEL, 0xD9714B49L, - 0xC7361B4CL, 0xC3F706FBL, 0xCEB42022L, 0xCA753D95L, - 0xF23A8028L, 0xF6FB9D9FL, 0xFBB8BB46L, 0xFF79A6F1L, - 0xE13EF6F4L, 0xE5FFEB43L, 0xE8BCCD9AL, 0xEC7DD02DL, - 0x34867077L, 0x30476DC0L, 0x3D044B19L, 0x39C556AEL, - 0x278206ABL, 0x23431B1CL, 0x2E003DC5L, 0x2AC12072L, - 0x128E9DCFL, 0x164F8078L, 0x1B0CA6A1L, 0x1FCDBB16L, - 0x018AEB13L, 0x054BF6A4L, 0x0808D07DL, 0x0CC9CDCAL, - 0x7897AB07L, 0x7C56B6B0L, 0x71159069L, 0x75D48DDEL, - 0x6B93DDDBL, 0x6F52C06CL, 0x6211E6B5L, 0x66D0FB02L, - 0x5E9F46BFL, 0x5A5E5B08L, 0x571D7DD1L, 0x53DC6066L, - 0x4D9B3063L, 0x495A2DD4L, 0x44190B0DL, 0x40D816BAL, - 0xACA5C697L, 0xA864DB20L, 0xA527FDF9L, 0xA1E6E04EL, - 0xBFA1B04BL, 0xBB60ADFCL, 0xB6238B25L, 0xB2E29692L, - 0x8AAD2B2FL, 0x8E6C3698L, 0x832F1041L, 0x87EE0DF6L, - 0x99A95DF3L, 0x9D684044L, 0x902B669DL, 0x94EA7B2AL, - 0xE0B41DE7L, 0xE4750050L, 0xE9362689L, 0xEDF73B3EL, - 0xF3B06B3BL, 0xF771768CL, 0xFA325055L, 0xFEF34DE2L, - 0xC6BCF05FL, 0xC27DEDE8L, 0xCF3ECB31L, 0xCBFFD686L, - 0xD5B88683L, 0xD1799B34L, 0xDC3ABDEDL, 0xD8FBA05AL, - 0x690CE0EEL, 0x6DCDFD59L, 0x608EDB80L, 0x644FC637L, - 0x7A089632L, 0x7EC98B85L, 0x738AAD5CL, 0x774BB0EBL, - 0x4F040D56L, 0x4BC510E1L, 0x46863638L, 0x42472B8FL, - 0x5C007B8AL, 0x58C1663DL, 0x558240E4L, 0x51435D53L, - 0x251D3B9EL, 0x21DC2629L, 0x2C9F00F0L, 0x285E1D47L, - 0x36194D42L, 0x32D850F5L, 0x3F9B762CL, 0x3B5A6B9BL, - 0x0315D626L, 0x07D4CB91L, 0x0A97ED48L, 0x0E56F0FFL, - 0x1011A0FAL, 0x14D0BD4DL, 0x19939B94L, 0x1D528623L, - 0xF12F560EL, 0xF5EE4BB9L, 0xF8AD6D60L, 0xFC6C70D7L, - 0xE22B20D2L, 0xE6EA3D65L, 0xEBA91BBCL, 0xEF68060BL, - 0xD727BBB6L, 0xD3E6A601L, 0xDEA580D8L, 0xDA649D6FL, - 0xC423CD6AL, 0xC0E2D0DDL, 0xCDA1F604L, 0xC960EBB3L, - 0xBD3E8D7EL, 0xB9FF90C9L, 0xB4BCB610L, 0xB07DABA7L, - 0xAE3AFBA2L, 0xAAFBE615L, 0xA7B8C0CCL, 0xA379DD7BL, - 0x9B3660C6L, 0x9FF77D71L, 0x92B45BA8L, 0x9675461FL, - 0x8832161AL, 0x8CF30BADL, 0x81B02D74L, 0x857130C3L, - 0x5D8A9099L, 0x594B8D2EL, 0x5408ABF7L, 0x50C9B640L, - 0x4E8EE645L, 0x4A4FFBF2L, 0x470CDD2BL, 0x43CDC09CL, - 0x7B827D21L, 0x7F436096L, 0x7200464FL, 0x76C15BF8L, - 0x68860BFDL, 0x6C47164AL, 0x61043093L, 0x65C52D24L, - 0x119B4BE9L, 0x155A565EL, 0x18197087L, 0x1CD86D30L, - 0x029F3D35L, 0x065E2082L, 0x0B1D065BL, 0x0FDC1BECL, - 0x3793A651L, 0x3352BBE6L, 0x3E119D3FL, 0x3AD08088L, - 0x2497D08DL, 0x2056CD3AL, 0x2D15EBE3L, 0x29D4F654L, - 0xC5A92679L, 0xC1683BCEL, 0xCC2B1D17L, 0xC8EA00A0L, - 0xD6AD50A5L, 0xD26C4D12L, 0xDF2F6BCBL, 0xDBEE767CL, - 0xE3A1CBC1L, 0xE760D676L, 0xEA23F0AFL, 0xEEE2ED18L, - 0xF0A5BD1DL, 0xF464A0AAL, 0xF9278673L, 0xFDE69BC4L, - 0x89B8FD09L, 0x8D79E0BEL, 0x803AC667L, 0x84FBDBD0L, - 0x9ABC8BD5L, 0x9E7D9662L, 0x933EB0BBL, 0x97FFAD0CL, - 0xAFB010B1L, 0xAB710D06L, 0xA6322BDFL, 0xA2F33668L, - 0xBCB4666DL, 0xB8757BDAL, 0xB5365D03L, 0xB1F740B4L -}; - -#ifdef CRCASM - -unsigned long calc_crc (char *mem, int len, unsigned initial) -{ - unsigned crc, dummy_len; - __asm__ ("xorl %%eax,%%eax\n\t" "1:\n\t" "movl %%edx,%%eax\n\t" "shrl $16,%%eax\n\t" "lodsb\n\t" "xorb %%ah,%%al\n\t" "andl $255,%%eax\n\t" "shll $8,%%edx\n\t" "xorl (%%edi,%%eax,4),%%edx\n\t" "loop 1b":"=d" (crc), - "=c" - (dummy_len) - : "S" (mem), "D" (&crc32tab[0]), "1" (len), "0" (initial) - : "eax"); - return crc; -} - -#else - -unsigned long calc_crc (char *mem, int len, unsigned initial) -{ - unsigned crc; - crc = initial; - - for (; len; mem++, len--) { - crc = CRC32 (*mem, crc); - } - return (crc); -} -#endif - -#define crc32( crc, mem, len) calc_crc(mem, len, crc); - -/* initialization routines. not used at the moment - * I will avoid these as long as possible !! - */ - -int open_atmsar (void) -{ - return 0; -} - -int remove_atmsar (void) -{ - return 0; -} - -/* ATOMIC version of alloc_tx */ -struct sk_buff *atmsar_alloc_skb_wrapper (struct atm_vcc *vcc, unsigned int size) -{ - struct sk_buff *skb; - - if (atomic_read (&vcc->tx_inuse) && !atm_may_send (vcc, size)) { - PDEBUG ("Sorry: tx_inuse = %d, size = %d, sndbuf = %d\n", - atomic_read (&vcc->tx_inuse), size, vcc->sk->sndbuf); - return NULL; - } - skb = alloc_skb (size, GFP_ATOMIC); - if (!skb) - return NULL; - atomic_add (skb->truesize + ATM_PDU_OVHD, &vcc->tx_inuse); - return skb; -} - -struct sk_buff *atmsar_alloc_tx (struct atmsar_vcc_data *vcc, unsigned int size) -{ - struct sk_buff *tmp = NULL; - int bufsize = 0; - - switch (vcc->type) { - case ATMSAR_TYPE_AAL0: - /* reserving adequate headroom */ - bufsize = - size + (((size / 48) + 1) * ((vcc->flags & ATMSAR_USE_53BYTE_CELL) ? 5 : 4)); - break; - case ATMSAR_TYPE_AAL1: - /* reserving adequate headroom */ - bufsize = - size + (((size / 47) + 1) * ((vcc->flags & ATMSAR_USE_53BYTE_CELL) ? 5 : 4)); - break; - case ATMSAR_TYPE_AAL2: - case ATMSAR_TYPE_AAL34: - /* not supported */ - break; - case ATMSAR_TYPE_AAL5: - /* reserving adequate tailroom */ - bufsize = size + (((size + 8 + 47) / 48) * 48); - break; - } - - PDEBUG ("Requested size %d, Allocating size %d\n", size, bufsize); - tmp = vcc->alloc_tx (vcc->vcc, bufsize); - skb_put (tmp, bufsize); - - return tmp; -} struct atmsar_vcc_data *atmsar_open (struct atmsar_vcc_data **list, struct atm_vcc *vcc, uint type, ushort vpi, ushort vci, unchar pti, unchar gfc, uint flags) { struct atmsar_vcc_data *new; + if (!vcc) + return NULL; + new = kmalloc (sizeof (struct atmsar_vcc_data), GFP_KERNEL); if (!new) return NULL; - if (!vcc) - return NULL; - memset (new, 0, sizeof (struct atmsar_vcc_data)); new->vcc = vcc; -/* - * This gives problems with the ATM layer alloc_tx(). - * It is not usable from interrupt context and for - * some reason this is used in interrupt context - * with br2684.c - * - if (vcc->alloc_tx) - new->alloc_tx = vcc->alloc_tx; - else -*/ - new->alloc_tx = atmsar_alloc_skb_wrapper; - new->stats = vcc->stats; new->type = type; new->next = NULL; @@ -375,216 +198,6 @@ void atmsar_close (struct atmsar_vcc_data **list, struct atmsar_vcc_data *vcc) kfree (vcc); } -/*********************** - ** - ** ENCODE FUNCTIONS - ** - ***********************/ - -/* encapsulate in an AAL5 frame, which is then split into ATM cells */ -unsigned int atmsar_encode (struct atmsar_vcc_data *ctx, char *source, char *target, unsigned int pdu_length) -{ - unsigned int num_cells = (pdu_length + ATM_AAL5_TRAILER + ATM_CELL_PAYLOAD - 1) / ATM_CELL_PAYLOAD; - unsigned int num_pdu_cells = pdu_length / ATM_CELL_PAYLOAD + 1; - unsigned int aal5_length = num_cells * ATM_CELL_PAYLOAD; - unsigned int zero_padding = aal5_length - pdu_length - ATM_AAL5_TRAILER; - unsigned int final_length = num_cells * ATM_CELL_SIZE; - unsigned char aal5_trailer [ATM_AAL5_TRAILER]; - unsigned char cell_header [ATM_CELL_HEADER]; - u32 crc; - int i; - - PDEBUG ("atmsar_encode entered\n"); - - PDEBUG ("pdu_length %d, num_cells %d, num_pdu_cells %d, aal5_length %d, zero_padding %d, final_length %d\n", pdu_length, num_cells, num_pdu_cells, aal5_length, zero_padding, final_length); - - PDEBUG ("source 0x=%p, target 0x%p\n", source, target); - - aal5_trailer [0] = 0; /* UU = 0 */ - aal5_trailer [1] = 0; /* CPI = 0 */ - aal5_trailer [2] = pdu_length >> 8; - aal5_trailer [3] = pdu_length; - - crc = crc32 (~0, source, pdu_length); - for (i = 0; i < zero_padding; i++) - crc = CRC32 (0, crc); - crc = crc32 (crc, aal5_trailer, 4); - crc = ~crc; - - aal5_trailer [4] = crc >> 24; - aal5_trailer [5] = crc >> 16; - aal5_trailer [6] = crc >> 8; - aal5_trailer [7] = crc; - - cell_header [0] = ctx->atmHeader >> 24; - cell_header [1] = ctx->atmHeader >> 16; - cell_header [2] = ctx->atmHeader >> 8; - cell_header [3] = ctx->atmHeader; - cell_header [4] = 0xec; - - for (i = 1; i < num_pdu_cells; i++) { - memcpy (target, cell_header, ATM_CELL_HEADER); - target += ATM_CELL_HEADER; - memcpy (target, source, ATM_CELL_PAYLOAD); - target += ATM_CELL_PAYLOAD; - source += ATM_CELL_PAYLOAD; - PDEBUG ("source 0x=%p, target 0x%p\n", source, target); - } - memcpy (target, cell_header, ATM_CELL_HEADER); - target += ATM_CELL_HEADER; - memcpy (target, source, pdu_length % ATM_CELL_PAYLOAD); - target += pdu_length % ATM_CELL_PAYLOAD; - if (num_pdu_cells < num_cells) { - memset (target, 0, zero_padding + ATM_AAL5_TRAILER - ATM_CELL_PAYLOAD); - target += zero_padding + ATM_AAL5_TRAILER - ATM_CELL_PAYLOAD; - memcpy (target, cell_header, ATM_CELL_HEADER); - target += ATM_CELL_HEADER; - zero_padding = ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER; - } - memset (target, 0, zero_padding); - target += zero_padding; - memcpy (target, aal5_trailer, ATM_AAL5_TRAILER); - - /* set pti bit in last cell */ - *(target + ATM_AAL5_TRAILER + 3 - ATM_CELL_SIZE) |= 0x2; - - /* update stats */ - if (ctx->stats) - atomic_inc (&ctx->stats->tx); - - if (ctx->stats && (ctx->type <= ATMSAR_TYPE_AAL1)) - atomic_add (num_cells, &(ctx->stats->tx)); - - return final_length; -} - -struct sk_buff *atmsar_encode_rawcell (struct atmsar_vcc_data *ctx, struct sk_buff *skb) -{ - int number_of_cells = (skb->len) / 48; - int total_length = number_of_cells * (ctx->flags & ATMSAR_USE_53BYTE_CELL ? 53 : 52); - unsigned char *source; - unsigned char *target; - struct sk_buff *out = NULL; - int i; - - PDEBUG ("atmsar_encode_rawcell (0x%p, 0x%p) called\n", ctx, skb); - - if (skb_cloned (skb) - || (skb_headroom (skb) < - (number_of_cells * (ctx->flags & ATMSAR_USE_53BYTE_CELL ? 5 : 4)))) { - PDEBUG - ("atmsar_encode_rawcell allocating new skb. ctx->alloc_tx = 0x%p, ctx->vcc = 0x%p\n", - ctx->alloc_tx, ctx->vcc); - /* get new skb */ - out = ctx->alloc_tx (ctx->vcc, total_length); - if (!out) - return NULL; - - skb_put (out, total_length); - source = skb->data; - target = out->data; - } else { - PDEBUG ("atmsar_encode_rawcell: sufficient headroom\n"); - source = skb->data; - skb_push (skb, number_of_cells * ((ctx->flags & ATMSAR_USE_53BYTE_CELL) ? 5 : 4)); - target = skb->data; - out = skb; - } - - PDEBUG ("source 0x=%p, target 0x%p\n", source, target); - - if (ctx->flags & ATMSAR_USE_53BYTE_CELL) { - for (i = 0; i < number_of_cells; i++) { - ADD_HEADER (target, ctx->atmHeader); - *target++ = (char) 0xEC; - memcpy (target, source, 48); - target += 48; - source += 48; - PDEBUG ("source 0x=%p, target 0x%p\n", source, target); - } - } else { - for (i = 0; i < number_of_cells; i++) { - ADD_HEADER (target, ctx->atmHeader); - memcpy (target, source, 48); - target += 48; - source += 48; - PDEBUG ("source 0x=%p, target 0x%p\n", source, target); - }; - } - - if (ctx->flags & ATMSAR_SET_PTI) { - /* setting pti bit in last cell */ - *(target - (ctx->flags & ATMSAR_USE_53BYTE_CELL ? 50 : 49)) |= 0x2; - } - - /* update stats */ - if (ctx->stats && (ctx->type <= ATMSAR_TYPE_AAL1)) - atomic_add (number_of_cells, &(ctx->stats->tx)); - - PDEBUG ("atmsar_encode_rawcell return 0x%p (length %d)\n", out, out->len); - return out; -} - -struct sk_buff *atmsar_encode_aal5 (struct atmsar_vcc_data *ctx, struct sk_buff *skb) -{ - int length, pdu_length; - unsigned char *trailer; - unsigned char *pad; - uint crc = 0xffffffff; - - PDEBUG ("atmsar_encode_aal5 (0x%p, 0x%p) called\n", ctx, skb); - - /* determine aal5 length */ - pdu_length = skb->len; - length = ((pdu_length + 8 + 47) / 48) * 48; - - if (skb_tailroom (skb) < (length - pdu_length)) { - struct sk_buff *out; - PDEBUG - ("atmsar_encode_aal5 allocating new skb. ctx->alloc_tx = 0x%p, ctx->vcc = 0x%p\n", - ctx->alloc_tx, ctx->vcc); - /* get new skb */ - out = ctx->alloc_tx (ctx->vcc, length); - if (!out) - return NULL; - - PDEBUG ("out->data = 0x%p\n", out->data); - PDEBUG ("atmsar_encode_aal5 pdu length %d, allocated length %d\n", skb->len, - length); - memcpy (out->data, skb->data, skb->len); - skb_put (out, skb->len); - - skb = out; - } - - PDEBUG ("skb->data = 0x%p\n", skb->data); - /* note end of pdu and add length */ - pad = skb_put (skb, length - pdu_length); - trailer = skb->tail - 8; - - PDEBUG ("trailer = 0x%p\n", trailer); - - /* zero padding space */ - memset (pad, 0, length - pdu_length - 8); - - /* add trailer */ - *trailer++ = (unsigned char) 0; /* UU = 0 */ - *trailer++ = (unsigned char) 0; /* CPI = 0 */ - *trailer++ = (unsigned char) (pdu_length >> 8); - *trailer++ = (unsigned char) (pdu_length & 0xff); - crc = ~crc32 (crc, skb->data, length - 4); - *trailer++ = (unsigned char) (crc >> 24); - *trailer++ = (unsigned char) (crc >> 16); - *trailer++ = (unsigned char) (crc >> 8); - *trailer++ = (unsigned char) (crc & 0xff); - - /* update stats */ - if (ctx->stats) - atomic_inc (&ctx->stats->tx); - - PDEBUG ("atmsar_encode_aal5 return 0x%p (length %d)\n", skb, skb->len); - return skb; -} /*********************** ** @@ -745,7 +358,7 @@ struct sk_buff *atmsar_decode_aal5 (struct atmsar_vcc_data *ctx, struct sk_buff skb_pull (skb, skb->len - pdu_length); } - crc = ~crc32 (crc, skb->data, pdu_length - 4); + crc = ~crc32_be (crc, skb->data, pdu_length - 4); /* check crc */ if (pdu_crc != crc) { diff --git a/drivers/usb/misc/atmsar.h b/drivers/usb/misc/atmsar.h index 63836a0464c1..29727e784b72 100644 --- a/drivers/usb/misc/atmsar.h +++ b/drivers/usb/misc/atmsar.h @@ -58,7 +58,6 @@ struct atmsar_vcc_data { int type; /* connection specific non-atmsar data */ - struct sk_buff *(*alloc_tx) (struct atm_vcc * vcc, unsigned int size); struct atm_vcc *vcc; struct k_atm_aal_stats *stats; unsigned short mtu; /* max is actually 65k for AAL5... */ @@ -81,15 +80,8 @@ extern struct atmsar_vcc_data *atmsar_open (struct atmsar_vcc_data **list, struc unchar gfc, uint flags); extern void atmsar_close (struct atmsar_vcc_data **list, struct atmsar_vcc_data *vcc); -extern struct sk_buff *atmsar_encode_rawcell (struct atmsar_vcc_data *ctx, struct sk_buff *skb); -extern struct sk_buff *atmsar_encode_aal5 (struct atmsar_vcc_data *ctx, struct sk_buff *skb); - struct sk_buff *atmsar_decode_rawcell (struct atmsar_vcc_data *list, struct sk_buff *skb, struct atmsar_vcc_data **ctx); struct sk_buff *atmsar_decode_aal5 (struct atmsar_vcc_data *ctx, struct sk_buff *skb); -struct sk_buff *atmsar_alloc_tx (struct atmsar_vcc_data *vcc, unsigned int size); - -unsigned int atmsar_encode (struct atmsar_vcc_data *ctx, char *source, char *target, unsigned int pdu_length); - #endif /* _ATMSAR_H_ */ diff --git a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c index 3a82d5934388..e919212c8c48 100644 --- a/drivers/usb/misc/speedtouch.c +++ b/drivers/usb/misc/speedtouch.c @@ -61,6 +61,7 @@ #include <linux/interrupt.h> #include <linux/atm.h> #include <linux/atmdev.h> +#include <linux/crc32.h> #include "atmsar.h" /* @@ -69,14 +70,15 @@ */ #ifdef DEBUG -#define PDEBUG(arg...) printk(KERN_DEBUG "SpeedTouch USB: " arg) +#define PDEBUG(arg...) printk(KERN_DEBUG __FILE__ ": " arg) #else #define PDEBUG(arg...) #endif #ifdef DEBUG_PACKET -#define PACKETDEBUG(arg...) udsl_print_packet ( arg ) +static int udsl_print_packet (const unsigned char *data, int len); +#define PACKETDEBUG(arg...) udsl_print_packet (arg) #else #define PACKETDEBUG(arg...) #endif @@ -88,15 +90,14 @@ #define SPEEDTOUCH_VENDORID 0x06b9 #define SPEEDTOUCH_PRODUCTID 0x4061 -#define UDSL_OBUF_SIZE 32768 -#define UDSL_MINOR 48 #define UDSL_NUMBER_RCV_URBS 1 #define UDSL_NUMBER_SND_URBS 1 -#define UDSL_RECEIVE_BUFFER_SIZE 64*53 +#define UDSL_NUMBER_SND_BUFS (2*UDSL_NUMBER_SND_URBS) +#define UDSL_RCV_BUFFER_SIZE (1*64) /* ATM cells */ +#define UDSL_SND_BUFFER_SIZE (1*64) /* ATM cells */ /* max should be (1500 IP mtu + 2 ppp bytes + 32 * 5 cellheader overhead) for * PPPoA and (1500 + 14 + 32*5 cellheader overhead) for PPPoE */ #define UDSL_MAX_AAL5_MRU 2048 -#define UDSL_SEND_CONTEXTS 8 #define UDSL_IOCTL_START 1 #define UDSL_IOCTL_STOP 2 @@ -126,13 +127,31 @@ struct udsl_receiver { struct udsl_instance_data *instance; }; -struct udsl_usb_send_data_context { +struct udsl_send_buffer { + struct list_head list; + unsigned char *base; + unsigned char *free_start; + unsigned int free_cells; +}; + +struct udsl_sender { + struct list_head list; + struct udsl_send_buffer *buffer; struct urb *urb; - struct sk_buff *skb; - struct atm_vcc *vcc; struct udsl_instance_data *instance; }; +struct udsl_control { + struct atm_skb_data atm_data; + unsigned int num_cells; + unsigned int num_entire; + unsigned char cell_header [ATM_CELL_HEADER]; + unsigned int pdu_padding; + unsigned char aal5_trailer [ATM_AAL5_TRAILER]; +}; + +#define UDSL_SKB(x) ((struct udsl_control *)(x)->cb) + /* * UDSL main driver data */ @@ -142,13 +161,10 @@ struct udsl_instance_data { /* usb device part */ struct usb_device *usb_dev; - struct sk_buff_head sndqueue; - struct udsl_usb_send_data_context send_ctx [UDSL_NUMBER_SND_URBS]; int firmware_loaded; /* atm device part */ struct atm_dev *atm_dev; - struct atmsar_vcc_data *atmsar_vcc_list; /* receiving */ @@ -161,18 +177,30 @@ struct udsl_instance_data { struct list_head completed_receivers; struct tasklet_struct receive_tasklet; -}; -static const char udsl_driver_name [] = "Alcatel SpeedTouch USB"; + /* sending */ + struct udsl_sender all_senders [UDSL_NUMBER_SND_URBS]; + struct udsl_send_buffer all_buffers [UDSL_NUMBER_SND_BUFS]; -#ifdef DEBUG_PACKET -static int udsl_print_packet (const unsigned char *data, int len); -#endif + struct sk_buff_head sndqueue; + + spinlock_t send_lock; + struct list_head spare_senders; + struct list_head spare_buffers; + + struct tasklet_struct send_tasklet; + struct sk_buff *current_skb; /* being emptied */ + struct udsl_send_buffer *current_buffer; /* being filled */ + struct list_head filled_buffers; +}; + +static const char udsl_driver_name [] = "speedtch"; /* * atm driver prototypes and stuctures */ +static void udsl_atm_dev_close (struct atm_dev *dev); static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci); static void udsl_atm_close (struct atm_vcc *vcc); static int udsl_atm_ioctl (struct atm_dev *dev, unsigned int cmd, void *arg); @@ -180,6 +208,7 @@ static int udsl_atm_send (struct atm_vcc *vcc, struct sk_buff *skb); static int udsl_atm_proc_read (struct atm_dev *atm_dev, loff_t *pos, char *page); static struct atmdev_ops udsl_atm_devops = { + .dev_close = udsl_atm_dev_close, .open = udsl_atm_open, .close = udsl_atm_close, .ioctl = udsl_atm_ioctl, @@ -187,20 +216,13 @@ static struct atmdev_ops udsl_atm_devops = { .proc_read = udsl_atm_proc_read, }; -struct udsl_atm_dev_data { - struct atmsar_vcc_data *atmsar_vcc; -}; - /* * usb driver prototypes and structures */ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_id *id); static void udsl_usb_disconnect (struct usb_interface *intf); -static int udsl_usb_send_data (struct udsl_instance_data *instance, struct atm_vcc *vcc, - struct sk_buff *skb); static int udsl_usb_ioctl (struct usb_interface *intf, unsigned int code, void *user_data); -static int udsl_usb_cancelsends (struct udsl_instance_data *instance, struct atm_vcc *vcc); static struct usb_driver udsl_usb_driver = { .name = udsl_driver_name, @@ -211,6 +233,86 @@ static struct usb_driver udsl_usb_driver = { }; +/************* +** encode ** +*************/ + +static void udsl_groom_skb (struct atm_vcc *vcc, struct sk_buff *skb) { + struct udsl_control *ctrl = UDSL_SKB (skb); + unsigned int i, zero_padding; + unsigned char zero = 0; + u32 crc; + + ctrl->atm_data.vcc = vcc; + ctrl->cell_header [0] = vcc->vpi >> 4; + ctrl->cell_header [1] = (vcc->vpi << 4) | (vcc->vci >> 12); + ctrl->cell_header [2] = vcc->vci >> 4; + ctrl->cell_header [3] = vcc->vci << 4; + ctrl->cell_header [4] = 0xec; + + ctrl->num_cells = (skb->len + ATM_AAL5_TRAILER + ATM_CELL_PAYLOAD - 1) / ATM_CELL_PAYLOAD; + ctrl->num_entire = skb->len / ATM_CELL_PAYLOAD; + + zero_padding = ctrl->num_cells * ATM_CELL_PAYLOAD - skb->len - ATM_AAL5_TRAILER; + + if (ctrl->num_entire + 1 < ctrl->num_cells) + ctrl->pdu_padding = zero_padding - (ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER); + else + ctrl->pdu_padding = zero_padding; + + ctrl->aal5_trailer [0] = 0; /* UU = 0 */ + ctrl->aal5_trailer [1] = 0; /* CPI = 0 */ + ctrl->aal5_trailer [2] = skb->len >> 8; + ctrl->aal5_trailer [3] = skb->len; + + crc = crc32_be (~0, skb->data, skb->len); + for (i = 0; i < zero_padding; i++) + crc = crc32_be (crc, &zero, 1); + crc = crc32_be (crc, ctrl->aal5_trailer, 4); + crc = ~crc; + + ctrl->aal5_trailer [4] = crc >> 24; + ctrl->aal5_trailer [5] = crc >> 16; + ctrl->aal5_trailer [6] = crc >> 8; + ctrl->aal5_trailer [7] = crc; +} + +static char *udsl_write_cell (struct sk_buff *skb, char *target) { + struct udsl_control *ctrl = UDSL_SKB (skb); + + ctrl->num_cells--; + + memcpy (target, ctrl->cell_header, ATM_CELL_HEADER); + target += ATM_CELL_HEADER; + + if (ctrl->num_entire) { + ctrl->num_entire--; + memcpy (target, skb->data, ATM_CELL_PAYLOAD); + target += ATM_CELL_PAYLOAD; + __skb_pull (skb, ATM_CELL_PAYLOAD); + return target; + } + + memcpy (target, skb->data, skb->len); + target += skb->len; + __skb_pull (skb, skb->len); + + memset (target, 0, ctrl->pdu_padding); + target += ctrl->pdu_padding; + + if (ctrl->num_cells) { + ctrl->pdu_padding = ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER; + } else { + memcpy (target, ctrl->aal5_trailer, ATM_AAL5_TRAILER); + target += ATM_AAL5_TRAILER; + /* set pti bit in last cell */ + *(target + 3 - ATM_CELL_SIZE) |= 0x2; + } + + return target; +} + + /************** ** receive ** **************/ @@ -221,19 +323,18 @@ static void udsl_complete_receive (struct urb *urb, struct pt_regs *regs) struct udsl_receiver *rcv; unsigned long flags; - PDEBUG ("udsl_complete_receive entered\n"); - if (!urb || !(rcv = urb->context) || !(instance = rcv->instance)) { PDEBUG ("udsl_complete_receive: bad urb!\n"); return; } + PDEBUG ("udsl_complete_receive entered (urb 0x%p, status %d)\n", urb, urb->status); + + tasklet_schedule (&instance->receive_tasklet); /* may not be in_interrupt() */ spin_lock_irqsave (&instance->completed_receivers_lock, flags); list_add_tail (&rcv->list, &instance->completed_receivers); spin_unlock_irqrestore (&instance->completed_receivers_lock, flags); - PDEBUG ("udsl_complete_receive: scheduling tasklet\n"); - tasklet_schedule (&instance->receive_tasklet); } static void udsl_process_receive (unsigned long data) @@ -246,6 +347,7 @@ static void udsl_process_receive (unsigned long data) struct urb *urb; struct atmsar_vcc_data *atmsar_vcc = NULL; struct sk_buff *new = NULL, *tmp = NULL; + int err; PDEBUG ("udsl_process_receive entered\n"); @@ -315,12 +417,12 @@ static void udsl_process_receive (unsigned long data) instance->usb_dev, usb_rcvbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_IN), (unsigned char *) rcv->skb->data, - UDSL_RECEIVE_BUFFER_SIZE, + UDSL_RCV_BUFFER_SIZE * ATM_CELL_SIZE, udsl_complete_receive, rcv); - if (!usb_submit_urb (urb, GFP_ATOMIC)) + if (!(err = usb_submit_urb (urb, GFP_ATOMIC))) break; - PDEBUG ("udsl_process_receive: submission failed\n"); + PDEBUG ("udsl_process_receive: submission failed (%d)\n", err); /* fall through */ default: /* error or urb unlinked */ PDEBUG ("udsl_process_receive: adding to spare_receivers\n"); @@ -358,7 +460,7 @@ static void udsl_fire_receivers (struct udsl_instance_data *instance) instance->usb_dev, usb_rcvbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_IN), (unsigned char *) rcv->skb->data, - UDSL_RECEIVE_BUFFER_SIZE, + UDSL_RCV_BUFFER_SIZE * ATM_CELL_SIZE, udsl_complete_receive, rcv); @@ -374,6 +476,210 @@ static void udsl_fire_receivers (struct udsl_instance_data *instance) } +/*********** +** send ** +***********/ + +static void udsl_complete_send (struct urb *urb, struct pt_regs *regs) +{ + struct udsl_instance_data *instance; + struct udsl_sender *snd; + unsigned long flags; + + if (!urb || !(snd = urb->context) || !(instance = snd->instance)) { + PDEBUG ("udsl_complete_send: bad urb!\n"); + return; + } + + PDEBUG ("udsl_complete_send entered (urb 0x%p, status %d)\n", urb, urb->status); + + tasklet_schedule (&instance->send_tasklet); + /* may not be in_interrupt() */ + spin_lock_irqsave (&instance->send_lock, flags); + list_add (&snd->list, &instance->spare_senders); + list_add (&snd->buffer->list, &instance->spare_buffers); + spin_unlock_irqrestore (&instance->send_lock, flags); +} + +static void udsl_process_send (unsigned long data) +{ + struct udsl_send_buffer *buf; + unsigned int cells_to_write; + int err; + unsigned long flags; + unsigned int i; + struct udsl_instance_data *instance = (struct udsl_instance_data *) data; + struct sk_buff *skb; + struct udsl_sender *snd; + unsigned char *target; + + PDEBUG ("udsl_process_send entered\n"); + +made_progress: + spin_lock_irqsave (&instance->send_lock, flags); + while (!list_empty (&instance->spare_senders)) { + if (!list_empty (&instance->filled_buffers)) { + buf = list_entry (instance->filled_buffers.next, struct udsl_send_buffer, list); + list_del (&buf->list); + PDEBUG ("sending filled buffer (0x%p)\n", buf); + } else if ((buf = instance->current_buffer)) { + instance->current_buffer = NULL; + PDEBUG ("sending current buffer (0x%p)\n", buf); + } else /* all buffers empty */ + break; + + snd = list_entry (instance->spare_senders.next, struct udsl_sender, list); + list_del (&snd->list); + spin_unlock_irqrestore (&instance->send_lock, flags); + + snd->buffer = buf; + usb_fill_bulk_urb (snd->urb, + instance->usb_dev, + usb_sndbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_OUT), + buf->base, + (UDSL_SND_BUFFER_SIZE - buf->free_cells) * ATM_CELL_SIZE, + udsl_complete_send, + snd); + + PDEBUG ("submitting urb 0x%p, contains %d cells\n", snd->urb, UDSL_SND_BUFFER_SIZE - buf->free_cells); + + if ((err = usb_submit_urb(snd->urb, GFP_ATOMIC)) < 0) { + PDEBUG ("submission failed (%d)!\n", err); + spin_lock_irqsave (&instance->send_lock, flags); + list_add (&snd->list, &instance->spare_senders); + spin_unlock_irqrestore (&instance->send_lock, flags); + list_add (&buf->list, &instance->filled_buffers); + return; + } + + spin_lock_irqsave (&instance->send_lock, flags); + } /* while */ + spin_unlock_irqrestore (&instance->send_lock, flags); + + if (!instance->current_skb && !(instance->current_skb = skb_dequeue (&instance->sndqueue))) { + PDEBUG ("done - no more skbs\n"); + return; + } + + skb = instance->current_skb; + + if (!(buf = instance->current_buffer)) { + spin_lock_irqsave (&instance->send_lock, flags); + if (list_empty (&instance->spare_buffers)) { + instance->current_buffer = NULL; + spin_unlock_irqrestore (&instance->send_lock, flags); + PDEBUG ("done - no more buffers\n"); + return; + } + buf = list_entry (instance->spare_buffers.next, struct udsl_send_buffer, list); + list_del (&buf->list); + spin_unlock_irqrestore (&instance->send_lock, flags); + + buf->free_start = buf->base; + buf->free_cells = UDSL_SND_BUFFER_SIZE; + + instance->current_buffer = buf; + } + + cells_to_write = min (buf->free_cells, UDSL_SKB (skb)->num_cells); + target = buf->free_start; + + PDEBUG ("writing %u cells from skb 0x%p to buffer 0x%p\n", cells_to_write, skb, buf); + + for (i = 0; i < cells_to_write; i++) + target = udsl_write_cell (skb, target); + + buf->free_start = target; + if (!(buf->free_cells -= cells_to_write)) { + list_add_tail (&buf->list, &instance->filled_buffers); + instance->current_buffer = NULL; + PDEBUG ("queued filled buffer\n"); + } + + PDEBUG ("buffer contains %d cells, %d left\n", UDSL_SND_BUFFER_SIZE - buf->free_cells, buf->free_cells); + + if (!UDSL_SKB (skb)->num_cells) { + struct atm_vcc *vcc = UDSL_SKB (skb)->atm_data.vcc; + + PDEBUG ("discarding empty skb\n"); + if (vcc->pop) + vcc->pop (vcc, skb); + else + kfree_skb (skb); + instance->current_skb = NULL; + + if (vcc->stats) + atomic_inc (&vcc->stats->tx); + } + + goto made_progress; +} + +static void udsl_cancel_send (struct udsl_instance_data *instance, struct atm_vcc *vcc) +{ + unsigned long flags; + struct sk_buff *skb, *n; + + PDEBUG ("udsl_cancel_send entered\n"); + spin_lock_irqsave (&instance->sndqueue.lock, flags); + for (skb = instance->sndqueue.next, n = skb->next; skb != (struct sk_buff *)&instance->sndqueue; skb = n, n = skb->next) + if (UDSL_SKB (skb)->atm_data.vcc == vcc) { + PDEBUG ("popping skb 0x%p\n", skb); + __skb_unlink (skb, &instance->sndqueue); + if (vcc->pop) + vcc->pop (vcc, skb); + else + kfree_skb (skb); + } + spin_unlock_irqrestore (&instance->sndqueue.lock, flags); + + tasklet_disable (&instance->send_tasklet); + if ((skb = instance->current_skb) && (UDSL_SKB (skb)->atm_data.vcc == vcc)) { + PDEBUG ("popping current skb (0x%p)\n", skb); + instance->current_skb = NULL; + if (vcc->pop) + vcc->pop (vcc, skb); + else + kfree_skb (skb); + } + tasklet_enable (&instance->send_tasklet); + PDEBUG ("udsl_cancel_send done\n"); +} + +static int udsl_atm_send (struct atm_vcc *vcc, struct sk_buff *skb) +{ + struct udsl_instance_data *instance = vcc->dev->dev_data; + + PDEBUG ("udsl_atm_send called (skb 0x%p, len %u)\n", skb, skb->len); + + if (!instance) { + PDEBUG ("NULL instance!\n"); + return -EINVAL; + } + + if (!instance->firmware_loaded) + return -EAGAIN; + + if (vcc->qos.aal != ATM_AAL5) { + PDEBUG ("unsupported ATM type %d!\n", vcc->qos.aal); + return -EINVAL; + } + + if (skb->len > ATM_MAX_AAL5_PDU) { + PDEBUG ("packet too long (%d vs %d)!\n", skb->len, ATM_MAX_AAL5_PDU); + return -EINVAL; + } + + PACKETDEBUG (skb->data, skb->len); + + udsl_groom_skb (vcc, skb); + skb_queue_tail (&instance->sndqueue, skb); + tasklet_schedule (&instance->send_tasklet); + + return 0; +} + + /************ ** ATM ** ************/ @@ -384,24 +690,21 @@ static void udsl_fire_receivers (struct udsl_instance_data *instance) * ****************************************************************************/ -static void udsl_atm_stopdevice (struct udsl_instance_data *instance) +static void udsl_atm_dev_close (struct atm_dev *dev) { - struct atm_vcc *walk; - struct atm_dev *atm_dev; + struct udsl_instance_data *instance = dev->dev_data; - if (!instance->atm_dev) + if (!instance) { + PDEBUG ("udsl_atm_dev_close: NULL instance!\n"); return; + } - atm_dev = instance->atm_dev; - - atm_dev->signal = ATM_PHY_SIG_LOST; - walk = atm_dev->vccs; - shutdown_atm_dev (atm_dev); - - for (; walk; walk = walk->next) - wake_up (&walk->sleep); + PDEBUG ("udsl_atm_dev_close: queue has %u elements\n", instance->sndqueue.qlen); - instance->atm_dev = NULL; + PDEBUG ("udsl_atm_dev_close: killing tasklet\n"); + tasklet_kill (&instance->send_tasklet); + PDEBUG ("udsl_atm_dev_close: freeing instance\n"); + kfree (instance); } @@ -410,17 +713,6 @@ static void udsl_atm_stopdevice (struct udsl_instance_data *instance) * ATM helper functions * ****************************************************************************/ -static struct sk_buff *udsl_atm_alloc_tx (struct atm_vcc *vcc, unsigned int size) -{ - struct atmsar_vcc_data *atmsar_vcc = - ((struct udsl_atm_dev_data *) vcc->dev_data)->atmsar_vcc; - if (atmsar_vcc) - return atmsar_alloc_tx (atmsar_vcc, size); - - printk (KERN_INFO - "SpeedTouch USB: udsl_atm_alloc_tx could not find correct alloc_tx function !\n"); - return NULL; -} static int udsl_atm_proc_read (struct atm_dev *atm_dev, loff_t *pos, char *page) { @@ -439,14 +731,6 @@ static int udsl_atm_proc_read (struct atm_dev *atm_dev, loff_t *pos, char *page) atm_dev->esi[3], atm_dev->esi[4], atm_dev->esi[5]); if (!left--) - return sprintf (page, "AAL0: tx %d ( %d err ), rx %d ( %d err, %d drop )\n", - atomic_read (&atm_dev->stats.aal0.tx), - atomic_read (&atm_dev->stats.aal0.tx_err), - atomic_read (&atm_dev->stats.aal0.rx), - atomic_read (&atm_dev->stats.aal0.rx_err), - atomic_read (&atm_dev->stats.aal0.rx_drop)); - - if (!left--) return sprintf (page, "AAL5: tx %d ( %d err ), rx %d ( %d err, %d drop )\n", atomic_read (&atm_dev->stats.aal5.tx), atomic_read (&atm_dev->stats.aal5.tx_err), @@ -460,67 +744,12 @@ static int udsl_atm_proc_read (struct atm_dev *atm_dev, loff_t *pos, char *page) /*************************************************************************** * -* ATM DATA functions -* -****************************************************************************/ -static int udsl_atm_send (struct atm_vcc *vcc, struct sk_buff *skb) -{ - struct udsl_atm_dev_data *dev_data = vcc->dev_data; - struct udsl_instance_data *instance = vcc->dev->dev_data; - struct sk_buff *new = NULL; - int err; - - PDEBUG ("udsl_atm_send called\n"); - - if (!dev_data || !instance) { - PDEBUG ("NULL data!\n"); - return -EINVAL; - } - - if (!instance->firmware_loaded) - return -EAGAIN; - - switch (vcc->qos.aal) { - case ATM_AAL5: - new = atmsar_encode_aal5 (dev_data->atmsar_vcc, skb); - if (!new) - goto nomem; - if (new != skb) { - vcc->pop (vcc, skb); - skb = new; - } - new = atmsar_encode_rawcell (dev_data->atmsar_vcc, skb); - if (!new) - goto nomem; - if (new != skb) { - vcc->pop (vcc, skb); - skb = new; - } - err = udsl_usb_send_data (instance, vcc, skb); - PDEBUG ("udsl_atm_send successfull (%d)\n", err); - return err; - break; - default: - return -EINVAL; - } - - PDEBUG ("udsl_atm_send unsuccessfull\n"); - return 0; - nomem: - vcc->pop (vcc, skb); - return -ENOMEM; -} - - -/*************************************************************************** -* * SAR driver entries * ****************************************************************************/ static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci) { - struct udsl_atm_dev_data *dev_data; struct udsl_instance_data *instance = vcc->dev->dev_data; PDEBUG ("udsl_atm_open called\n"); @@ -535,15 +764,12 @@ static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci) return -EINVAL; MOD_INC_USE_COUNT; - dev_data = kmalloc (sizeof (struct udsl_atm_dev_data), GFP_KERNEL); - if (!dev_data) - return -ENOMEM; - dev_data->atmsar_vcc = + vcc->dev_data = atmsar_open (&(instance->atmsar_vcc_list), vcc, ATMSAR_TYPE_AAL5, vpi, vci, 0, 0, ATMSAR_USE_53BYTE_CELL | ATMSAR_SET_PTI); - if (!dev_data->atmsar_vcc) { - kfree (dev_data); + if (!vcc->dev_data) { + MOD_DEC_USE_COUNT; return -ENOMEM; /* this is the only reason atmsar_open can fail... */ } @@ -552,10 +778,8 @@ static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci) set_bit (ATM_VF_ADDR, &vcc->flags); set_bit (ATM_VF_PARTIAL, &vcc->flags); set_bit (ATM_VF_READY, &vcc->flags); - vcc->dev_data = dev_data; - vcc->alloc_tx = udsl_atm_alloc_tx; - dev_data->atmsar_vcc->mtu = UDSL_MAX_AAL5_MRU; + ((struct atmsar_vcc_data *)vcc->dev_data)->mtu = UDSL_MAX_AAL5_MRU; if (instance->firmware_loaded) udsl_fire_receivers (instance); @@ -566,22 +790,20 @@ static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci) static void udsl_atm_close (struct atm_vcc *vcc) { - struct udsl_atm_dev_data *dev_data = vcc->dev_data; struct udsl_instance_data *instance = vcc->dev->dev_data; PDEBUG ("udsl_atm_close called\n"); - if (!dev_data || !instance) { - PDEBUG ("NULL data!\n"); + if (!instance) { + PDEBUG ("NULL instance!\n"); return; } /* freeing resources */ /* cancel all sends on this vcc */ - udsl_usb_cancelsends (instance, vcc); + udsl_cancel_send (instance, vcc); - atmsar_close (&(instance->atmsar_vcc_list), dev_data->atmsar_vcc); - kfree (dev_data); + atmsar_close (&(instance->atmsar_vcc_list), vcc->dev_data); vcc->dev_data = NULL; clear_bit (ATM_VF_PARTIAL, &vcc->flags); @@ -611,131 +833,6 @@ static int udsl_atm_ioctl (struct atm_dev *dev, unsigned int cmd, void *arg) ** USB ** ************/ -/*************************************************************************** -* -* usb data functions -* -****************************************************************************/ - -struct udsl_cb { - struct atm_vcc *vcc; -}; - -static void udsl_usb_send_data_complete (struct urb *urb, struct pt_regs *regs) -{ - struct udsl_usb_send_data_context *ctx = urb->context; - struct udsl_instance_data *instance = ctx->instance; - int err; - - PDEBUG ("udsl_usb_send_data_completion (vcc = %p, skb = %p, status %d)\n", ctx->vcc, - ctx->skb, urb->status); - - ctx->vcc->pop (ctx->vcc, ctx->skb); - - if (!(ctx->skb = skb_dequeue (&(instance->sndqueue)))) - return; - - /* submit next skb */ - ctx->vcc = ((struct udsl_cb *) (ctx->skb->cb))->vcc; - usb_fill_bulk_urb (urb, - instance->usb_dev, - usb_sndbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_OUT), - (unsigned char *) ctx->skb->data, - ctx->skb->len, udsl_usb_send_data_complete, ctx); - - err = usb_submit_urb (urb, GFP_ATOMIC); - - PDEBUG ("udsl_usb_send_data_completion (send packet %p with length %d), retval = %d\n", - ctx->skb, ctx->skb->len, err); -} - -static int udsl_usb_cancelsends (struct udsl_instance_data *instance, struct atm_vcc *vcc) -{ - int i; - - for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) { - if (!instance->send_ctx[i].skb) - continue; - if (instance->send_ctx[i].vcc == vcc) { - usb_unlink_urb (instance->send_ctx[i].urb); - usb_free_urb (instance->send_ctx[i].urb); - instance->send_ctx[i].vcc->pop (instance->send_ctx[i].vcc, - instance->send_ctx[i].skb); - instance->send_ctx[i].skb = NULL; - } - } - - return 0; -} - -/**** send ******/ -static int udsl_usb_send_data (struct udsl_instance_data *instance, struct atm_vcc *vcc, - struct sk_buff *skb) -{ - int err, i; - struct urb *urb; - unsigned long flags; - - PDEBUG ("udsl_usb_send_data entered, sending packet %p with length %d\n", skb, skb->len); - - PACKETDEBUG (skb->data, skb->len); - - spin_lock_irqsave (&instance->sndqueue.lock, flags); - ((struct udsl_cb *) skb->cb)->vcc = vcc; - - /* we are already queueing */ - if (!skb_queue_empty (&instance->sndqueue)) { - __skb_queue_tail (&instance->sndqueue, skb); - spin_unlock_irqrestore (&instance->sndqueue.lock, flags); - PDEBUG ("udsl_usb_send_data: already queing, skb (0x%p) queued\n", skb); - return 0; - } - - for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) - if (instance->send_ctx[i].skb == NULL) - break; - - /* we must start queueing */ - if (i == UDSL_NUMBER_SND_URBS) { - __skb_queue_tail (&instance->sndqueue, skb); - spin_unlock_irqrestore (&instance->sndqueue.lock, flags); - PDEBUG ("udsl_usb_send_data: skb (0x%p) queued\n", skb); - return 0; - } - - /* init context */ - urb = instance->send_ctx[i].urb; - instance->send_ctx[i].skb = skb; - instance->send_ctx[i].vcc = vcc; - instance->send_ctx[i].instance = instance; - - spin_unlock_irqrestore (&instance->sndqueue.lock, flags); - - /* submit packet */ - usb_fill_bulk_urb (urb, - instance->usb_dev, - usb_sndbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_OUT), - (unsigned char *) skb->data, - skb->len, - udsl_usb_send_data_complete, &(instance->send_ctx[i]) - ); - - err = usb_submit_urb (urb, GFP_KERNEL); - - if (err != 0) - skb_unlink (skb); - - PDEBUG ("udsl_usb_send_data done (retval = %d)\n", err); - return err; -} - - -/*************************************************************************** -* -* usb driver entries -* -****************************************************************************/ - static int udsl_usb_ioctl (struct usb_interface *intf, unsigned int code, void *user_data) { struct udsl_instance_data *instance = usb_get_intfdata (intf); @@ -752,7 +849,7 @@ static int udsl_usb_ioctl (struct usb_interface *intf, unsigned int code, void * instance->atm_dev->signal = ATM_PHY_SIG_FOUND; down (&instance->serialize); /* vs self */ if (!instance->firmware_loaded) { - usb_set_interface (instance->usb_dev, 1, 2); + usb_set_interface (instance->usb_dev, 1, 1); instance->firmware_loaded = 1; } up (&instance->serialize); @@ -773,7 +870,7 @@ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_i struct udsl_instance_data *instance; unsigned char mac_str [13]; unsigned char mac [6]; - int i, err; + int i; PDEBUG ("Trying device with Vendor=0x%x, Product=0x%x, ifnum %d\n", dev->descriptor.idVendor, dev->descriptor.idProduct, ifnum); @@ -788,8 +885,7 @@ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_i /* instance init */ if (!(instance = kmalloc (sizeof (struct udsl_instance_data), GFP_KERNEL))) { PDEBUG ("No memory for Instance data!\n"); - err = -ENOMEM; - goto fail_instance; + return -ENOMEM; } memset (instance, 0, sizeof (struct udsl_instance_data)); @@ -808,46 +904,63 @@ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_i skb_queue_head_init (&instance->sndqueue); - /* receive urb init */ + spin_lock_init (&instance->send_lock); + INIT_LIST_HEAD (&instance->spare_senders); + INIT_LIST_HEAD (&instance->spare_buffers); + + tasklet_init (&instance->send_tasklet, udsl_process_send, (unsigned long) instance); + INIT_LIST_HEAD (&instance->filled_buffers); + + /* receive init */ for (i = 0; i < UDSL_NUMBER_RCV_URBS; i++) { struct udsl_receiver *rcv = &(instance->all_receivers[i]); - if (!(rcv->skb = dev_alloc_skb (UDSL_RECEIVE_BUFFER_SIZE))) { + if (!(rcv->skb = dev_alloc_skb (UDSL_RCV_BUFFER_SIZE * ATM_CELL_SIZE))) { PDEBUG ("No memory for skb %d!\n", i); - err = -ENOMEM; - goto fail_urbs; + goto fail; } if (!(rcv->urb = usb_alloc_urb (0, GFP_KERNEL))) { PDEBUG ("No memory for receive urb %d!\n", i); - err = -ENOMEM; - goto fail_urbs; + goto fail; } rcv->instance = instance; list_add (&rcv->list, &instance->spare_receivers); - PDEBUG ("skb->truesize = %d (asked for %d)\n", rcv->skb->truesize, UDSL_RECEIVE_BUFFER_SIZE); + PDEBUG ("skb->truesize = %d (asked for %d)\n", rcv->skb->truesize, UDSL_RCV_BUFFER_SIZE * ATM_CELL_SIZE); } + /* send init */ for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) { - struct udsl_usb_send_data_context *snd = &(instance->send_ctx[i]); + struct udsl_sender *snd = &(instance->all_senders[i]); if (!(snd->urb = usb_alloc_urb (0, GFP_KERNEL))) { PDEBUG ("No memory for send urb %d!\n", i); - err = -ENOMEM; - goto fail_urbs; + goto fail; } snd->instance = instance; + + list_add (&snd->list, &instance->spare_senders); + } + + for (i = 0; i < UDSL_NUMBER_SND_BUFS; i++) { + struct udsl_send_buffer *buf = &(instance->all_buffers[i]); + + if (!(buf->base = kmalloc (UDSL_SND_BUFFER_SIZE * ATM_CELL_SIZE, GFP_KERNEL))) { + PDEBUG ("No memory for send buffer %d!\n", i); + goto fail; + } + + list_add (&buf->list, &instance->spare_buffers); } /* atm init */ if (!(instance->atm_dev = atm_dev_register (udsl_driver_name, &udsl_atm_devops, -1, 0))) { PDEBUG ("failed to register ATM device!\n"); - err = -ENOMEM; - goto fail_atm; + goto fail; } instance->atm_dev->ci_range.vpi_bits = ATM_CI_MAX; @@ -874,27 +987,25 @@ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_i return 0; -fail_atm: -fail_urbs: - for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) { - struct udsl_usb_send_data_context *snd = &(instance->send_ctx[i]); +fail: + for (i = 0; i < UDSL_NUMBER_SND_BUFS; i++) + kfree (instance->all_buffers[i].base); - if (snd->urb) - usb_free_urb (snd->urb); - } + for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) + usb_free_urb (instance->all_senders[i].urb); for (i = 0; i < UDSL_NUMBER_RCV_URBS; i++) { struct udsl_receiver *rcv = &(instance->all_receivers[i]); + usb_free_urb (rcv->urb); + if (rcv->skb) kfree_skb (rcv->skb); - - if (rcv->urb) - usb_free_urb (rcv->urb); } + kfree (instance); -fail_instance: - return err; + + return -ENOMEM; } static void udsl_usb_disconnect (struct usb_interface *intf) @@ -903,7 +1014,7 @@ static void udsl_usb_disconnect (struct usb_interface *intf) struct list_head *pos; unsigned long flags; unsigned int count = 0; - int i; + int result, i; PDEBUG ("disconnecting\n"); @@ -916,8 +1027,9 @@ static void udsl_usb_disconnect (struct usb_interface *intf) tasklet_disable (&instance->receive_tasklet); + /* receive finalize */ down (&instance->serialize); /* vs udsl_fire_receivers */ - /* no need to take the spinlock - receive_tasklet is not running */ + /* no need to take the spinlock */ list_for_each (pos, &instance->spare_receivers) if (++count > UDSL_NUMBER_RCV_URBS) panic (__FILE__ ": memory corruption detected at line %d!\n", __LINE__); @@ -929,7 +1041,8 @@ static void udsl_usb_disconnect (struct usb_interface *intf) count = UDSL_NUMBER_RCV_URBS - count; for (i = 0; i < UDSL_NUMBER_RCV_URBS; i++) - usb_unlink_urb (instance->all_receivers[i].urb); + if ((result = usb_unlink_urb (instance->all_receivers[i].urb)) < 0) + PDEBUG ("udsl_usb_disconnect: usb_unlink_urb on receive urb %d returned %d\n", i, result); /* wait for completion handlers to finish */ do { @@ -946,12 +1059,11 @@ static void udsl_usb_disconnect (struct usb_interface *intf) if (completed == count) break; - /* not all urbs completed */ yield (); } while (1); - PDEBUG ("udsl_usb_disconnect: flushing %u completed receivers\n", count); - /* no need to take the spinlock - no completion handlers running */ + PDEBUG ("udsl_usb_disconnect: flushing\n"); + /* no need to take the spinlock */ INIT_LIST_HEAD (&instance->completed_receivers); tasklet_enable (&instance->receive_tasklet); @@ -965,25 +1077,48 @@ static void udsl_usb_disconnect (struct usb_interface *intf) kfree_skb (rcv->skb); } - for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) { - struct udsl_usb_send_data_context *ctx = &(instance->send_ctx[i]); + /* send finalize */ + tasklet_disable (&instance->send_tasklet); - usb_unlink_urb (ctx->urb); + for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) + if ((result = usb_unlink_urb (instance->all_senders[i].urb)) < 0) + PDEBUG ("udsl_usb_disconnect: usb_unlink_urb on send urb %d returned %d\n", i, result); + + /* wait for completion handlers to finish */ + do { + count = 0; + spin_lock_irqsave (&instance->send_lock, flags); + list_for_each (pos, &instance->spare_senders) + if (++count > UDSL_NUMBER_SND_URBS) + panic (__FILE__ ": memory corruption detected at line %d!\n", __LINE__); + spin_unlock_irqrestore (&instance->send_lock, flags); - if (ctx->skb) - ctx->vcc->pop (ctx->vcc, ctx->skb); - ctx->skb = NULL; + PDEBUG ("udsl_usb_disconnect: found %u spare senders\n", count); - usb_free_urb (ctx->urb); + if (count == UDSL_NUMBER_SND_URBS) + break; - } + yield (); + } while (1); + PDEBUG ("udsl_usb_disconnect: flushing\n"); + /* no need to take the spinlock */ + INIT_LIST_HEAD (&instance->spare_senders); + INIT_LIST_HEAD (&instance->spare_buffers); + instance->current_buffer = NULL; - /* removing atm device */ - if (instance->atm_dev) - udsl_atm_stopdevice (instance); + tasklet_enable (&instance->send_tasklet); - kfree (instance); + PDEBUG ("udsl_usb_disconnect: freeing senders\n"); + for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) + usb_free_urb (instance->all_senders[i].urb); + + PDEBUG ("udsl_usb_disconnect: freeing buffers\n"); + for (i = 0; i < UDSL_NUMBER_SND_BUFS; i++) + kfree (instance->all_buffers[i].base); + + /* atm finalize */ + shutdown_atm_dev (instance->atm_dev); } @@ -995,8 +1130,15 @@ static void udsl_usb_disconnect (struct usb_interface *intf) static int __init udsl_usb_init (void) { + struct sk_buff *skb; /* dummy for sizeof */ + PDEBUG ("udsl_usb_init: driver version " DRIVER_VERSION "\n"); + if (sizeof (struct udsl_control) > sizeof (skb->cb)) { + printk (KERN_ERR __FILE__ ": unusable with this kernel!\n"); + return -EIO; + } + return usb_register (&udsl_usb_driver); } diff --git a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c index a67307b3c566..f00f98ba0873 100644 --- a/drivers/usb/net/kaweth.c +++ b/drivers/usb/net/kaweth.c @@ -130,6 +130,7 @@ static struct usb_device_id usb_klsi_table[] = { { USB_DEVICE(0x03e8, 0x0008) }, /* AOX Endpoints USB Ethernet */ { USB_DEVICE(0x04bb, 0x0901) }, /* I-O DATA USB-ET/T */ { USB_DEVICE(0x0506, 0x03e8) }, /* 3Com 3C19250 */ + { USB_DEVICE(0x0506, 0x11f8) }, /* 3Com 3C460 */ { USB_DEVICE(0x0557, 0x2002) }, /* ATEN USB Ethernet */ { USB_DEVICE(0x0557, 0x4000) }, /* D-Link DSB-650C */ { USB_DEVICE(0x0565, 0x0002) }, /* Peracom Enet */ @@ -712,7 +713,7 @@ static void kaweth_usb_transmit_complete(struct urb *urb, struct pt_regs *regs) static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net) { struct kaweth_device *kaweth = net->priv; - char *private_header; + u16 *private_header; int res; @@ -744,7 +745,7 @@ static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net) } private_header = __skb_push(skb, 2); - *private_header = cpu_to_le16(skb->len); + *private_header = cpu_to_le16(skb->len-2); kaweth->tx_skb = skb; usb_fill_bulk_urb(kaweth->tx_urb, diff --git a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h index 3a9fcb7be035..4c3301b62c1c 100644 --- a/drivers/usb/net/pegasus.h +++ b/drivers/usb/net/pegasus.h @@ -133,6 +133,7 @@ struct usb_eth_dev { #define VENDOR_LANEED 0x056e #define VENDOR_LINKSYS 0x066b #define VENDOR_MELCO 0x0411 +#define VENDOR_MOBILITY 0x1342 #define VENDOR_NETGEAR 0x0846 #define VENDOR_SMARTBRIDGES 0x08d1 #define VENDOR_SMC 0x0707 @@ -167,7 +168,7 @@ PEGASUS_DEV( "USB 10/100 Fast Ethernet", VENDOR_ABOCOM, 0x200c, PEGASUS_DEV( "Accton USB 10/100 Ethernet Adapter", VENDOR_ACCTON, 0x1046, DEFAULT_GPIO_RESET ) PEGASUS_DEV( "SpeedStream USB 10/100 Ethernet", VENDOR_ACCTON, 0x5046, - DEFAULT_GPIO_RESET ) + DEFAULT_GPIO_RESET | PEGASUS_II ) PEGASUS_DEV( "ADMtek ADM8511 \"Pegasus II\" USB Ethernet", VENDOR_ADMTEK, 0x8511, DEFAULT_GPIO_RESET | PEGASUS_II ) @@ -215,6 +216,8 @@ PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1, DEFAULT_GPIO_RESET ) PEGASUS_DEV( "GOLDPFEIL USB Adapter", VENDOR_ELCON, 0x0002, DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA ) +PEGASUS_DEV( "EasiDock Ethernet", VENDOR_MOBILITY, 0x0304, + DEFAULT_GPIO_RESET ) PEGASUS_DEV( "Elsa Micolink USB2Ethernet", VENDOR_ELSA, 0x3000, DEFAULT_GPIO_RESET ) PEGASUS_DEV( "Hawking UF100 10/100 Ethernet", VENDOR_HAWKING, 0x400c, diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig index 55717383b997..ed274bf1724d 100644 --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig @@ -297,10 +297,14 @@ config USB_SERIAL_KEYSPAN_USA19W config USB_SERIAL_KEYSPAN_USA19QW bool "USB Keyspan USA-19QW Firmware" depends on USB_SERIAL_KEYSPAN + help + Say Y here to include firmware for the USA-19QW converter. config USB_SERIAL_KEYSPAN_USA19QI bool "USB Keyspan USA-19QI Firmware" depends on USB_SERIAL_KEYSPAN + help + Say Y here to include firmware for the USA-19QI converter. config USB_SERIAL_KEYSPAN_USA49W bool "USB Keyspan USA-49W Firmware" diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index ca9547b39d4c..778ba16c57f0 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c @@ -141,7 +141,6 @@ static int __init usb_console_setup(struct console *co, char *options) } port = &serial->port[0]; - down (&port->sem); port->tty = NULL; info->port = port; @@ -158,8 +157,6 @@ static int __init usb_console_setup(struct console *co, char *options) port->open_count = 0; } - up (&port->sem); - if (retval) { err ("could not open USB console port"); return retval; @@ -208,8 +205,6 @@ static void usb_console_write(struct console *co, const char *buf, unsigned coun if (count == 0) return; - down (&port->sem); - dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count); if (!port->open_count) { @@ -224,7 +219,6 @@ static void usb_console_write(struct console *co, const char *buf, unsigned coun retval = usb_serial_generic_write(port, 0, buf, count); exit: - up (&port->sem); dbg("%s - return value (if we had one): %d", __FUNCTION__, retval); } diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 10f84fc41d71..142b4b946c2d 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -391,7 +391,11 @@ static LIST_HEAD(usb_serial_driver_list); struct usb_serial *usb_serial_get_by_minor (unsigned int minor) { - return serial_table[minor]; + struct usb_serial *serial = serial_table[minor]; + + if (serial) + kobject_get (&serial->kobj); + return serial; } static struct usb_serial *get_free_serial (struct usb_serial *serial, int num_ports, unsigned int *minor) @@ -468,7 +472,6 @@ static int serial_open (struct tty_struct *tty, struct file * filp) port = &serial->port[portNumber]; tty->driver_data = port; - down (&port->sem); port->tty = tty; /* lock this module before we call it, @@ -492,8 +495,6 @@ static int serial_open (struct tty_struct *tty, struct file * filp) } } bailout: - - up (&port->sem); return retval; } @@ -516,6 +517,7 @@ static void __serial_close(struct usb_serial_port *port, struct file *filp) } module_put(port->serial->type->owner); + kobject_put(&port->serial->kobj); } static void serial_close(struct tty_struct *tty, struct file * filp) @@ -526,16 +528,12 @@ static void serial_close(struct tty_struct *tty, struct file * filp) if (!serial) return; - down (&port->sem); - dbg("%s - port %d", __FUNCTION__, port->number); /* if disconnect beat us to the punch here, there's nothing to do */ if (tty->driver_data) { __serial_close(port, filp); } - - up (&port->sem); } static int serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count) @@ -547,8 +545,6 @@ static int serial_write (struct tty_struct * tty, int from_user, const unsigned if (!serial) return -ENODEV; - down (&port->sem); - dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count); if (!port->open_count) { @@ -563,7 +559,6 @@ static int serial_write (struct tty_struct * tty, int from_user, const unsigned retval = usb_serial_generic_write(port, from_user, buf, count); exit: - up (&port->sem); return retval; } @@ -576,8 +571,6 @@ static int serial_write_room (struct tty_struct *tty) if (!serial) return -ENODEV; - down (&port->sem); - dbg("%s - port %d", __FUNCTION__, port->number); if (!port->open_count) { @@ -592,7 +585,6 @@ static int serial_write_room (struct tty_struct *tty) retval = usb_serial_generic_write_room(port); exit: - up (&port->sem); return retval; } @@ -605,8 +597,6 @@ static int serial_chars_in_buffer (struct tty_struct *tty) if (!serial) return -ENODEV; - down (&port->sem); - dbg("%s = port %d", __FUNCTION__, port->number); if (!port->open_count) { @@ -621,7 +611,6 @@ static int serial_chars_in_buffer (struct tty_struct *tty) retval = usb_serial_generic_chars_in_buffer(port); exit: - up (&port->sem); return retval; } @@ -633,8 +622,6 @@ static void serial_throttle (struct tty_struct * tty) if (!serial) return; - down (&port->sem); - dbg("%s - port %d", __FUNCTION__, port->number); if (!port->open_count) { @@ -647,7 +634,6 @@ static void serial_throttle (struct tty_struct * tty) serial->type->throttle(port); exit: - up (&port->sem); } static void serial_unthrottle (struct tty_struct * tty) @@ -658,8 +644,6 @@ static void serial_unthrottle (struct tty_struct * tty) if (!serial) return; - down (&port->sem); - dbg("%s - port %d", __FUNCTION__, port->number); if (!port->open_count) { @@ -672,7 +656,6 @@ static void serial_unthrottle (struct tty_struct * tty) serial->type->unthrottle(port); exit: - up (&port->sem); } static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg) @@ -684,8 +667,6 @@ static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned in if (!serial) return -ENODEV; - down (&port->sem); - dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); if (!port->open_count) { @@ -700,7 +681,6 @@ static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned in retval = -ENOIOCTLCMD; exit: - up (&port->sem); return retval; } @@ -712,8 +692,6 @@ static void serial_set_termios (struct tty_struct *tty, struct termios * old) if (!serial) return; - down (&port->sem); - dbg("%s - port %d", __FUNCTION__, port->number); if (!port->open_count) { @@ -726,7 +704,6 @@ static void serial_set_termios (struct tty_struct *tty, struct termios * old) serial->type->set_termios(port, old); exit: - up (&port->sem); } static void serial_break (struct tty_struct *tty, int break_state) @@ -737,8 +714,6 @@ static void serial_break (struct tty_struct *tty, int break_state) if (!serial) return; - down (&port->sem); - dbg("%s - port %d", __FUNCTION__, port->number); if (!port->open_count) { @@ -751,7 +726,6 @@ static void serial_break (struct tty_struct *tty, int break_state) serial->type->break_ctl(port, break_state); exit: - up (&port->sem); } static void serial_shutdown (struct usb_serial *serial) @@ -797,6 +771,7 @@ static int serial_read_proc (char *page, char **start, off_t off, int count, int begin += length; length = 0; } + kobject_put(&serial->kobj); } *eof = 1; done: @@ -833,6 +808,75 @@ void usb_serial_port_softint(void *private) wake_up_interruptible(&tty->write_wait); } +static void destroy_serial (struct kobject *kobj) +{ + struct usb_serial *serial; + struct usb_serial_port *port; + int i; + + dbg ("%s", __FUNCTION__); + + serial = to_usb_serial(kobj); + + /* fail all future close/read/write/ioctl/etc calls */ + for (i = 0; i < serial->num_ports; ++i) { + port = &serial->port[i]; + if (port->tty != NULL) { + port->tty->driver_data = NULL; + while (port->open_count > 0) { + __serial_close(port, NULL); + } + } + } + + serial_shutdown (serial); + + for (i = 0; i < serial->num_ports; ++i) + device_unregister(&serial->port[i].dev); + + for (i = 0; i < serial->num_ports; ++i) + serial->port[i].open_count = 0; + + for (i = 0; i < serial->num_bulk_in; ++i) { + port = &serial->port[i]; + if (port->read_urb) { + usb_unlink_urb (port->read_urb); + usb_free_urb (port->read_urb); + } + if (port->bulk_in_buffer) + kfree (port->bulk_in_buffer); + } + for (i = 0; i < serial->num_bulk_out; ++i) { + port = &serial->port[i]; + if (port->write_urb) { + usb_unlink_urb (port->write_urb); + usb_free_urb (port->write_urb); + } + if (port->bulk_out_buffer) + kfree (port->bulk_out_buffer); + } + for (i = 0; i < serial->num_interrupt_in; ++i) { + port = &serial->port[i]; + if (port->interrupt_in_urb) { + usb_unlink_urb (port->interrupt_in_urb); + usb_free_urb (port->interrupt_in_urb); + } + if (port->interrupt_in_buffer) + kfree (port->interrupt_in_buffer); + } + /* return the minor range that this device had */ + return_serial (serial); + + usb_put_dev(serial->dev); + + /* free up any memory that we allocated */ + kfree (serial); +} + +static struct kobj_type usb_serial_kobj_type = { + .release = destroy_serial, +}; + static struct usb_serial * create_serial (struct usb_device *dev, struct usb_interface *interface, struct usb_serial_device_type *type) @@ -845,12 +889,16 @@ static struct usb_serial * create_serial (struct usb_device *dev, return NULL; } memset (serial, 0, sizeof(*serial)); - serial->dev = dev; + serial->dev = usb_get_dev(dev); serial->type = type; serial->interface = interface; serial->vendor = dev->descriptor.idVendor; serial->product = dev->descriptor.idProduct; + /* initialize the kobject portion of the usb_device */ + kobject_init(&serial->kobj); + serial->kobj.ktype = &usb_serial_kobj_type; + return serial; } @@ -1113,7 +1161,6 @@ int usb_serial_probe(struct usb_interface *interface, port->serial = serial; port->magic = USB_SERIAL_PORT_MAGIC; INIT_WORK(&port->work, usb_serial_port_softint, port); - init_MUTEX (&port->sem); } /* if this device type has an attach function, call it */ @@ -1189,67 +1236,14 @@ void usb_serial_disconnect(struct usb_interface *interface) { struct usb_serial *serial = usb_get_intfdata (interface); struct device *dev = &interface->dev; - struct usb_serial_port *port; - int i; dbg ("%s", __FUNCTION__); usb_set_intfdata (interface, NULL); if (serial) { - /* fail all future close/read/write/ioctl/etc calls */ - for (i = 0; i < serial->num_ports; ++i) { - port = &serial->port[i]; - down (&port->sem); - if (port->tty != NULL) { - port->tty->driver_data = NULL; - while (port->open_count > 0) { - __serial_close(port, NULL); - } - } - up (&port->sem); - } - - serial->dev = NULL; - serial_shutdown (serial); - - for (i = 0; i < serial->num_ports; ++i) - device_unregister(&serial->port[i].dev); - - for (i = 0; i < serial->num_ports; ++i) - serial->port[i].open_count = 0; - - for (i = 0; i < serial->num_bulk_in; ++i) { - port = &serial->port[i]; - if (port->read_urb) { - usb_unlink_urb (port->read_urb); - usb_free_urb (port->read_urb); - } - if (port->bulk_in_buffer) - kfree (port->bulk_in_buffer); - } - for (i = 0; i < serial->num_bulk_out; ++i) { - port = &serial->port[i]; - if (port->write_urb) { - usb_unlink_urb (port->write_urb); - usb_free_urb (port->write_urb); - } - if (port->bulk_out_buffer) - kfree (port->bulk_out_buffer); - } - for (i = 0; i < serial->num_interrupt_in; ++i) { - port = &serial->port[i]; - if (port->interrupt_in_urb) { - usb_unlink_urb (port->interrupt_in_urb); - usb_free_urb (port->interrupt_in_urb); - } - if (port->interrupt_in_buffer) - kfree (port->interrupt_in_buffer); - } - /* return the minor range that this device had */ - return_serial (serial); - - /* free up any memory that we allocated */ - kfree (serial); + /* let the last holder of this object + * cause it to be cleaned up */ + kobject_put (&serial->kobj); } dev_info(dev, "device disconnected\n"); } diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h index 24066abe925a..78175b05171d 100644 --- a/drivers/usb/serial/usb-serial.h +++ b/drivers/usb/serial/usb-serial.h @@ -89,7 +89,6 @@ * @write_wait: a wait_queue_head_t used by the port. * @work: work queue entry for the line discipline waking up. * @open_count: number of times this port has been opened. - * @sem: struct semaphore used to lock this structure. * * This structure is used by the usb-serial core and drivers for the specific * ports of a device. @@ -116,7 +115,6 @@ struct usb_serial_port { wait_queue_head_t write_wait; struct work_struct work; int open_count; - struct semaphore sem; struct device dev; }; #define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev) @@ -164,8 +162,10 @@ struct usb_serial { __u16 vendor; __u16 product; struct usb_serial_port port[MAX_NUM_PORTS]; + struct kobject kobj; void * private; }; +#define to_usb_serial(d) container_of(d, struct usb_serial, kobj) #define NUM_DONT_CARE (-1) diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index 528153c77e0b..cb365a3cb9c1 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c @@ -314,7 +314,7 @@ static int interpret_urb_result(struct us_data *us, unsigned int pipe, return USB_STOR_XFER_ERROR; /* the transfer was cancelled, presumably by an abort */ - case -ENODEV: + case -ECONNRESET: US_DEBUGP("-- transfer cancelled\n"); return USB_STOR_XFER_ERROR; diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 6336994b843e..04302a4a26cb 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef _ACCONFIG_H diff --git a/include/acpi/acdebug.h b/include/acpi/acdebug.h index c7d80590fc4f..cd2b474ec837 100644 --- a/include/acpi/acdebug.h +++ b/include/acpi/acdebug.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACDEBUG_H__ diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h index d007aba08056..08c29f006827 100644 --- a/include/acpi/acdispat.h +++ b/include/acpi/acdispat.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/include/acpi/acevents.h b/include/acpi/acevents.h index ab3949ab1849..1a4b232179e8 100644 --- a/include/acpi/acevents.h +++ b/include/acpi/acevents.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACEVENTS_H__ @@ -72,8 +91,12 @@ acpi_status acpi_ev_init_global_lock_handler ( void); -u32 -acpi_ev_get_gpe_register_index ( +struct acpi_gpe_register_info * +acpi_ev_get_gpe_register_info ( + u32 gpe_number); + +struct acpi_gpe_number_info * +acpi_ev_get_gpe_number_info ( u32 gpe_number); u32 diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index f531a805732c..cc0bb192980c 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACEXCEP_H__ diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h index a52f1ce5dba7..b6713c925987 100644 --- a/include/acpi/acglobal.h +++ b/include/acpi/acglobal.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACGLOBAL_H__ diff --git a/include/acpi/achware.h b/include/acpi/achware.h index 4916993043ab..af0240db7963 100644 --- a/include/acpi/achware.h +++ b/include/acpi/achware.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACHWARE_H__ diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h index cd0060827d79..502bd03e2452 100644 --- a/include/acpi/acinterp.h +++ b/include/acpi/acinterp.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACINTERP_H__ diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 1e3e9640af28..2ab9bee98a31 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACLOCAL_H__ diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index 4d7a45733589..09a34a479859 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACMACROS_H__ diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h index af362fbac444..e809068247ff 100644 --- a/include/acpi/acnamesp.h +++ b/include/acpi/acnamesp.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACNAMESP_H__ diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index 72d3ca520ab9..23276fe5ebbd 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h @@ -6,21 +6,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef _ACOBJECT_H diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 1fceaeb259e1..7dfc3b4aed07 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACOUTPUT_H__ diff --git a/include/acpi/acparser.h b/include/acpi/acparser.h index 4c91fd4c54fd..cbe5b7b4dd24 100644 --- a/include/acpi/acparser.h +++ b/include/acpi/acparser.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ diff --git a/include/acpi/acpi.h b/include/acpi/acpi.h index 0ff594041762..bf2e3fe89e18 100644 --- a/include/acpi/acpi.h +++ b/include/acpi/acpi.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACPI_H__ @@ -30,21 +49,21 @@ * We put them here because we don't want to duplicate them * in the rest of the source code again and again. */ -#include <acpi/acconfig.h> /* Configuration constants */ -#include <acpi/platform/acenv.h> /* Target environment specific items */ -#include <acpi/actypes.h> /* Fundamental common data types */ -#include <acpi/acexcep.h> /* ACPI exception codes */ -#include <acpi/acmacros.h> /* C macros */ -#include <acpi/actbl.h> /* ACPI table definitions */ -#include <acpi/aclocal.h> /* Internal data types */ -#include <acpi/acoutput.h> /* Error output and Debug macros */ -#include <acpi/acpiosxf.h> /* Interfaces to the ACPI-to-OS layer*/ -#include <acpi/acpixf.h> /* ACPI core subsystem external interfaces */ -#include <acpi/acobject.h> /* ACPI internal object */ -#include <acpi/acstruct.h> /* Common structures */ -#include <acpi/acglobal.h> /* All global variables */ -#include <acpi/achware.h> /* Hardware defines and interfaces */ -#include <acpi/acutils.h> /* Utility interfaces */ +#include "acconfig.h" /* Configuration constants */ +#include "platform/acenv.h" /* Target environment specific items */ +#include "actypes.h" /* Fundamental common data types */ +#include "acexcep.h" /* ACPI exception codes */ +#include "acmacros.h" /* C macros */ +#include "actbl.h" /* ACPI table definitions */ +#include "aclocal.h" /* Internal data types */ +#include "acoutput.h" /* Error output and Debug macros */ +#include "acpiosxf.h" /* Interfaces to the ACPI-to-OS layer*/ +#include "acpixf.h" /* ACPI core subsystem external interfaces */ +#include "acobject.h" /* ACPI internal object */ +#include "acstruct.h" /* Common structures */ +#include "acglobal.h" /* All global variables */ +#include "achware.h" /* Hardware defines and interfaces */ +#include "acutils.h" /* Utility interfaces */ #endif /* __ACPI_H__ */ diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index eb83f2d9ffb9..fe7f23107e14 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h @@ -9,28 +9,47 @@ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACPIOSXF_H__ #define __ACPIOSXF_H__ -#include <acpi/platform/acenv.h> -#include <acpi/actypes.h> +#include "platform/acenv.h" +#include "actypes.h" /* Priorities for acpi_os_queue_for_execution */ @@ -93,6 +112,11 @@ acpi_os_get_root_pointer ( struct acpi_pointer *address); acpi_status +acpi_os_predefined_override ( + const struct acpi_predefined_names *init_val, + acpi_string *new_val); + +acpi_status acpi_os_table_override ( struct acpi_table_header *existing_table, struct acpi_table_header **new_table); diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 5207858ee7db..581cf961fb35 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -6,29 +6,48 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACXFACE_H__ #define __ACXFACE_H__ -#include <acpi/actypes.h> -#include <acpi/actbl.h> +#include "actypes.h" +#include "actbl.h" /* diff --git a/include/acpi/acresrc.h b/include/acpi/acresrc.h index 342d1a4be573..fa2e298d6c0a 100644 --- a/include/acpi/acresrc.h +++ b/include/acpi/acresrc.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACRESRC_H__ diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h index 66764cb48002..afa98e3828fd 100644 --- a/include/acpi/acstruct.h +++ b/include/acpi/acstruct.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACSTRUCT_H__ diff --git a/include/acpi/actables.h b/include/acpi/actables.h index 685ea7a36421..32fe58c16dd7 100644 --- a/include/acpi/actables.h +++ b/include/acpi/actables.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACTABLES_H__ diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index aee343bef781..56282d0bf1fb 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACTBL_H__ diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index aad526a5ab92..91e5ba7cdd50 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACTBL1_H__ diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index a5410ffd54a0..65a762b49d8f 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACTBL2_H__ diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 16a213377ec2..75c73b293dac 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACTYPES_H__ @@ -877,6 +896,8 @@ struct acpi_mem_space_context #define ACPI_ISA_ONLY_RANGES (u8) 0x02 #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) +#define ACPI_SPARSE_TRANSLATION (u8) 0x03 + /* * IO Port Descriptor Decode */ @@ -1026,7 +1047,7 @@ struct acpi_memory_attribute struct acpi_io_attribute { u16 range_attribute; - u16 reserved; + u16 translation_attribute; }; struct acpi_bus_attribute diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index 8ef73e7a3889..114793ddf698 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef _ACUTILS_H diff --git a/include/acpi/amlcode.h b/include/acpi/amlcode.h index f11d7338a58c..ca436cfd150e 100644 --- a/include/acpi/amlcode.h +++ b/include/acpi/amlcode.h @@ -7,21 +7,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __AMLCODE_H__ @@ -192,6 +211,7 @@ * Argument types for the AML Parser * Each field in the arg_types u32 is 5 bits, allowing for a maximum of 6 arguments. * There can be up to 31 unique argument types + * Zero is reserved as end-of-list indicator */ #define ARGP_BYTEDATA 0x01 @@ -218,38 +238,47 @@ * Each field in the arg_types u32 is 5 bits, allowing for a maximum of 6 arguments. * There can be up to 31 unique argument types (0 is end-of-arg-list indicator) * - * Note: If and when 5 bits becomes insufficient, it would probably be best + * Note1: These values are completely independent from the ACPI_TYPEs + * i.e., ARGI_INTEGER != ACPI_TYPE_INTEGER + * + * Note2: If and when 5 bits becomes insufficient, it would probably be best * to convert to a 6-byte array of argument types, allowing 8 bits per argument. */ -/* "Standard" ACPI types are 1-15 (0x0F) */ - -#define ARGI_INTEGER ACPI_TYPE_INTEGER /* 1 */ -#define ARGI_STRING ACPI_TYPE_STRING /* 2 */ -#define ARGI_BUFFER ACPI_TYPE_BUFFER /* 3 */ -#define ARGI_PACKAGE ACPI_TYPE_PACKAGE /* 4 */ -#define ARGI_EVENT ACPI_TYPE_EVENT -#define ARGI_MUTEX ACPI_TYPE_MUTEX -#define ARGI_REGION ACPI_TYPE_REGION -#define ARGI_DDBHANDLE ACPI_TYPE_DDB_HANDLE - -/* Custom types are 0x10 through 0x1F */ - -#define ARGI_IF 0x10 -#define ARGI_ANYOBJECT 0x11 -#define ARGI_ANYTYPE 0x12 -#define ARGI_COMPUTEDATA 0x13 /* Buffer, String, or Integer */ -#define ARGI_DATAOBJECT 0x14 /* Buffer, String, package or reference to a Node - Used only by size_of operator*/ -#define ARGI_COMPLEXOBJ 0x15 /* Buffer, String, or package (Used by INDEX op only) */ -#define ARGI_INTEGER_REF 0x16 -#define ARGI_OBJECT_REF 0x17 -#define ARGI_DEVICE_REF 0x18 -#define ARGI_REFERENCE 0x19 -#define ARGI_TARGETREF 0x1A /* Target, subject to implicit conversion */ -#define ARGI_FIXED_TARGET 0x1B /* Target, no implicit conversion */ -#define ARGI_SIMPLE_TARGET 0x1C /* Name, Local, Arg -- no implicit conversion */ -#define ARGI_BUFFERSTRING 0x1D -#define ARGI_REF_OR_STRING 0x1E /* Reference or String (Used by DEREFOF op only) */ +/* Single, simple types */ + +#define ARGI_ANYTYPE 0x01 /* Don't care */ +#define ARGI_PACKAGE 0x02 +#define ARGI_EVENT 0x03 +#define ARGI_MUTEX 0x04 +#define ARGI_DDBHANDLE 0x05 + +/* Interchangeable types (via implicit conversion) */ + +#define ARGI_INTEGER 0x06 +#define ARGI_STRING 0x07 +#define ARGI_BUFFER 0x08 +#define ARGI_BUFFER_OR_STRING 0x09 /* Used by MID op only */ +#define ARGI_COMPUTEDATA 0x0A /* Buffer, String, or Integer */ + +/* Reference objects */ + +#define ARGI_INTEGER_REF 0x0B +#define ARGI_OBJECT_REF 0x0C +#define ARGI_DEVICE_REF 0x0D +#define ARGI_REFERENCE 0x0E +#define ARGI_TARGETREF 0x0F /* Target, subject to implicit conversion */ +#define ARGI_FIXED_TARGET 0x10 /* Target, no implicit conversion */ +#define ARGI_SIMPLE_TARGET 0x11 /* Name, Local, Arg -- no implicit conversion */ + +/* Multiple/complex types */ + +#define ARGI_DATAOBJECT 0x12 /* Buffer, String, package or reference to a Node - Used only by size_of operator*/ +#define ARGI_COMPLEXOBJ 0x13 /* Buffer, String, or package (Used by INDEX op only) */ +#define ARGI_REF_OR_STRING 0x14 /* Reference or String (Used by DEREFOF op only) */ +#define ARGI_REGION_OR_FIELD 0x15 /* Used by LOAD op only */ + +/* Note: types above can expand to 0x1F maximum */ #define ARGI_INVALID_OPCODE 0xFFFFFFFF diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index ce9a83213717..f7294f3216a9 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACENV_H__ @@ -98,7 +117,7 @@ /*! [Begin] no source code translation */ #if defined(__linux__) -#include <acpi/platform/aclinux.h> +#include "aclinux.h" #elif defined(_AED_EFI) #include "acefi.h" diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 5c04f01f4b42..5c47f1fb28fe 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACGCC_H__ diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 33409830eb75..670d057823b3 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -5,21 +5,40 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2003, R. Byron Moore + * Copyright (C) 2000 - 2003, R. Byron Moore + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACLINUX_H__ @@ -54,11 +73,11 @@ #include <unistd.h> #if defined(__ia64__) || defined(__x86_64__) -#define ACPI_MACHINE_WIDTH 64 +#define ACPI_MACHINE_WIDTH 64 #define COMPILER_DEPENDENT_INT64 long #define COMPILER_DEPENDENT_UINT64 unsigned long #else -#define ACPI_MACHINE_WIDTH 32 +#define ACPI_MACHINE_WIDTH 32 #define COMPILER_DEPENDENT_INT64 long long #define COMPILER_DEPENDENT_UINT64 unsigned long long #define ACPI_USE_NATIVE_DIVIDE diff --git a/include/asm-i386/delay.h b/include/asm-i386/delay.h index c7d218492964..72930c7109bb 100644 --- a/include/asm-i386/delay.h +++ b/include/asm-i386/delay.h @@ -8,13 +8,19 @@ */ extern void __bad_udelay(void); +extern void __bad_ndelay(void); extern void __udelay(unsigned long usecs); +extern void __ndelay(unsigned long nsecs); extern void __const_udelay(unsigned long usecs); extern void __delay(unsigned long loops); #define udelay(n) (__builtin_constant_p(n) ? \ ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \ __udelay(n)) + +#define ndelay(n) (__builtin_constant_p(n) ? \ + ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ + __ndelay(n)) #endif /* defined(_I386_DELAY_H) */ diff --git a/include/linux/usb.h b/include/linux/usb.h index b0873cc6d8e1..52d7070ffa42 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -17,6 +17,7 @@ #include <linux/device.h> /* for struct device */ #include <linux/fs.h> /* for struct file_operations */ #include <linux/completion.h> /* for struct completion */ +#include <linux/sched.h> /* for current && schedule_timeout */ static __inline__ void wait_ms(unsigned int ms) @@ -239,6 +240,7 @@ struct usb_device { int have_langid; /* whether string_langid is valid yet */ int string_langid; /* language ID for strings */ + int present; /* if device is present or not */ void *hcpriv; /* Host Controller private data */ diff --git a/lib/Makefile b/lib/Makefile index 1db48cd15344..24e6b3adc098 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -25,7 +25,7 @@ obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/ obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/ include $(TOPDIR)/drivers/net/Makefile.lib -include $(TOPDIR)/drivers/usb/class/Makefile.lib +include $(TOPDIR)/drivers/usb/Makefile.lib include $(TOPDIR)/fs/Makefile.lib include $(TOPDIR)/net/bluetooth/bnep/Makefile.lib |
