资源简介
博通无线网卡驱动,我的空间有篇文章介绍如何安装,不会的请参考
代码片段和文件信息
/*
* 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
- 上一篇:基于深度学习的路网短时交通流预测_焦琴琴
- 下一篇:达内电信计费系统静态页面展示
相关资源
- 联想y470无线网卡驱动 for 32位64位
- uboot到linux logo显示不间断 补丁
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- ubuntu9.10 可加载内核模块和字符设备驱
- MP3文件ID3v2ID3v2APEv2标签读取
- 操作系统实验——虚存管理实验
- linux下的发包工具sendip
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
- linux下用多进程同步方法解决生产者
- Linux 操作系统实验(全)
- Linux From Scratch 中文手册
- linux 网络实验 ftp程序
- wireless系列工具源码,附iwpriviwlistiw
- Linux命令大全离线版&在线版
- 操作系统共享内存实验
- dos 下运行Linux 命令--gnu_utils
- linux 0.12内核源代码
- linux简易shell C实现
- linux实验报告及心得体会
- 基于GTK的Linux环境下的简易任务管理器
- linux扫雷游戏代码
- CAN Linux驱动代码
- Linux系统教材
- intel 82579LM 网卡驱动Linux系统版 v1.9.
- SA1110处理器掌上电脑液晶显示器设计
评论
共有 条评论