#if defined (OSDEBUG) && defined (NDEBUG) # undef NDEBUG #endif/* * defs.h * Copyright (C) 2002, AVM GmbH. All rights reserved. * * This Software is free software. You can redistribute and/or * modify such free software under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * The free software 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this Software; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA, or see * http://www.opensource.org/licenses/lgpl-license.html * * Contact: AVM GmbH, Alt-Moabit 95, 10559 Berlin, Germany, email: info@avm.de */ #ifndef __have_defs_h__ #define __have_defs_h__ #ifndef LINUX_VERSION_CODE # include #endif #ifndef TRUE # define TRUE (1==1) # define FALSE (1==0) #endif /*---------------------------------------------------------------------------*\ \*---------------------------------------------------------------------------*/ #if defined (__fcclassic__) # define PRODUCT_LOGO "AVM FRITZ!Card Classic" # define INTERFACE "isa" #elif defined (__fcpnp__) # define PRODUCT_LOGO "AVM FRITZ!Card PnP" # define INTERFACE "pnp" #elif defined (__fcpcmcia__) # define PRODUCT_LOGO "AVM FRITZ!Card PCMCIA" # define INTERFACE "pcmcia" #elif defined (__fcpci__) # define PRODUCT_LOGO "AVM FRITZ!Card PCI" # define INTERFACE "pci" #endif #define DRIVER_LOGO PRODUCT_LOGO " driver" #define SHORT_LOGO "fritz-" INTERFACE #define REV_DEFAULT "0.5.2" /*---------------------------------------------------------------------------*\ \*---------------------------------------------------------------------------*/ #if defined (OSDEBUG) && defined (NDEBUG) #define UNUSED_ARG(x) (x)=(x) /*---------------------------------------------------------------------------*\ \*---------------------------------------------------------------------------*/ #define KB 1024 #define MIN_LIB_HEAP_SIZE (64 * KB) #define MAX_LIB_HEAP_SIZE (600 * KB) /*---------------------------------------------------------------------------*\ \*---------------------------------------------------------------------------*/ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 13) # define GET_PCI_BASE(d, r) (d)->base_address[r] #else # define GET_PCI_BASE(d, r) (d)->resource[r].start #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 43) # define KFREE_SKB(x) dev_kfree_skb(x) #else # include # define KFREE_SKB(x) dev_kfree_skb_any(x) #endif #if defined (CONFIG_ISAPNP_MODULE) && !defined (CONFIG_ISAPNP) #define CONFIG_ISAPNP #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 23) typedef void irqreturn_t; #define IRQ_NONE #define IRQ_HANDLED #define IRQ_RETVAL(x) #endif #endif