资源简介
博通无线网卡驱动,我的空间有篇文章介绍如何安装,不会的请参考
代码片段和文件信息
/*
* Linux OS Independent layer
*
* Copyright (C) 2010 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: linux_osl.cv 1.172.2.12.2.1 2011-01-26 01:24:54 Exp $
*/
#define LINUX_PORT
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define PCI_CFG_RETRY 10
#define OS_HANDLE_MAGIC 0x1234abcd
#define BCM_MEM_FILENAME_LEN 24
typedef struct bcm_mem_link {
struct bcm_mem_link *prev;
struct bcm_mem_link *next;
uint size;
int line;
void *osh;
char file[BCM_MEM_FILENAME_LEN];
} bcm_mem_link_t;
#if defined(DSLCPE_DELAY_NOT_YET)
struct shared_osl {
int long_delay;
spinlock_t *lock;
void *wl;
unsigned long MIPS;
};
#endif
struct osl_info {
osl_pubinfo_t pub;
uint magic;
void *pdev;
atomic_t malloced;
uint failed;
uint bustype;
bcm_mem_link_t *dbgmem_list;
spinlock_t dbgmem_lock;
spinlock_t pktalloc_lock;
};
uint32 g_assert_type = FALSE;
static int16 linuxbcmerrormap[] =
{ 0
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-E2BIG
-E2BIG
-EBUSY
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EFAULT
-ENOMEM
-EOPNOTSUPP
-EMSGSIZE
-EINVAL
-EPERM
-ENOMEM
-EINVAL
-ERANGE
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EINVAL
-EIO
-ENODEV
-EINVAL
-EIO
-EIO
-EINVAL
-EINVAL
-ENODATA
#if BCME_LAST != -42
#error “You need to add a OS error translation in the linuxbcmerrormap \
for new error code defined in bcmutils.h“
#endif
};
int
osl_error(int bcmerror)
{
if (bcmerror > 0)
bcmerror = 0;
else if (bcmerror < BCME_LAST)
bcmerror = BCME_ERROR;
return linuxbcmerrormap[-bcmerror];
}
osl_t *
osl_attach(void *pdev uint bustype bool pkttag)
{
osl_t *osh;
osh = kmalloc(sizeof(osl_t) GFP_ATOMIC);
ASSERT(osh);
bzero(osh sizeof(osl_t));
ASSERT(ABS(BCME_LAST) == (ARRAYSIZE(linuxbcmerrormap) - 1));
osh->magic = OS_HANDLE_MAGIC;
atomic_set(&osh->malloced 0);
osh->failed = 0;
osh->dbgmem_list = NULL;
spin_lock_init(&(osh->dbgmem_lock));
osh->pdev = pdev;
osh->pub.pkttag = pkttag;
osh->bustype = bustype;
switch (bustype) {
case PCI_BUS:
case SI_BUS:
case PCMCIA_BUS:
osh->pub.mmbus = TRUE;
break;
case JTAG_BUS:
case SDIO_BUS:
case USB_BUS:
case SPI_BUS:
case RPC_BUS:
osh->pub.mmbus = FALSE;
break;
default:
ASSERT(FALSE);
break;
}
spin_lock_init(&(osh->pktalloc_lock));
#ifdef BCMDBG
if (pkttag) {
struc
- 上一篇:基于深度学习的路网短时交通流预测_焦琴琴
- 下一篇:达内电信计费系统静态页面展示
相关资源
- netperf-2.6.0.tar.gz
- linux 5 sendmail电子邮件服务器.ppt
- LINUX下PL2303HX驱动的安装及串口使用
- Linux网络编程-网络基础-socket编程-高并
- Linux下QT串口通信
- Rockchip RK3399 软件开发指南.pdf
- malloclab-handout.tar
- 跟老男孩学linux三剑客命令V1.5
- 宋宝华源码《Linux设备驱动开发详解
- 基于嵌入式Linux的RFID读卡器的驱动程
- vgg_generated_48,vgg_generated_64,vgg_gene
- 2711_1p0- 树莓派4B 芯片手册.pdf
- Linux编程手册-多线程-详细资料.rar
- 西农Linux实习含详细实习报告
- CRF++ toolkit 0.58
- Linux餐厅点菜系统基于Linux 下QT数据库
- redis-3.0.0.tar.gz
- linux usb core driver源码分析
- 嵌入式linux下QT开发的wifi源码
- 鸟哥私房菜PPT-经典的linux学习资料
- 黑马_Linux网络编程-网络基础-socket编程
- Linux大作业
- 智能家居实训项目 所使用的第三方库
- [课件] linux入门基础ppt
- 鸟哥的Linux私房菜——基础学习篇第四
- Linux下的BT软件源码,包含详细讲解
- geckodriver-v0.18.0-linux32
- 基于ARM_linux多媒体播放器的Qt源码
- 深度Linux 15.8下安装RTL8192EU驱动,亲测
- Serial IO Card-华塑PCMCIA转串口RS232-ox
评论
共有 条评论