/* * OS Abstraction Layer * * Copyright 2007, Broadcom Corporation * All Rights Reserved. * * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. * $Id: osl.h,v 1.1.1.1 2008/07/21 09:14:16 james26_jang Exp $ */ #ifndef _osl_h_ #define _osl_h_ /* osl handle type forward declaration */ typedef struct osl_info osl_t; typedef struct osl_dmainfo osldma_t; #define OSL_PKTTAG_SZ 32 /* Size of PktTag */ /* Drivers use PKTFREESETCB to register a callback function when a packet is freed by OSL */ typedef void (*pktfree_cb_fn_t)(void *ctx, void *pkt, unsigned int status); #if defined(PCBIOS) #include #elif defined(linux) #include #elif defined(NDIS) #include #elif defined(_CFE_) #include #elif defined(_MINOSL_) #include #elif defined(MACOSX) #include #elif defined(__NetBSD__) #include #elif defined(EFI) #include #else #error "Unsupported OSL requested" #endif /* handy */ #define SET_REG(osh, r, mask, val) W_REG((osh), (r), ((R_REG((osh), r) & ~(mask)) | (val))) #endif /* _osl_h_ */