资源简介
bcm博通系列无线网卡驱动源码,可以在任意Linux发行版编译安装,本人在bcm43142上实现
![](http://www.nz998.com/pic/55795.jpg)
代码片段和文件信息
/*
* Linux OS Independent layer
*
* Copyright (C) 2015 Broadcom Corporation. All Rights Reserved.
*
* Permission to use copy modify and/or distribute this software for any
* purpose with or without fee is hereby granted provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED “AS IS“ AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL DIRECT INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE DATA OR PROFITS WHETHER IN AN ACTION
* OF CONTRACT NEGLIGENCE OR OTHER TORTIOUS ACTION ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $Id: linux_osl.c 383331 2013-02-06 10:27:24Z $
*/
#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;
struct osl_info {
osl_pubinfo_t pub;
uint magic;
void *pdev;
atomic_t malloced;
atomic_t pktalloced;
uint failed;
uint bustype;
bcm_mem_link_t *dbgmem_list;
spinlock_t dbgmem_lock;
spinlock_t pktalloc_lock;
};
#define OSL_PKTTAG_CLEAR(p) \
do { \
struct sk_buff *s = (struct sk_buff *)(p); \
ASSERT(OSL_PKTTAG_SZ == 32); \
*(uint32 *)(&s->cb[0]) = 0; *(uint32 *)(&s->cb[4]) = 0; \
*(uint32 *)(&s->cb[8]) = 0; *(uint32 *)(&s->cb[12]) = 0; \
*(uint32 *)(&s->cb[16]) = 0; *(uint32 *)(&s->cb[20]) = 0; \
*(uint32 *)(&s->cb[24]) = 0; *(uint32 *)(&s->cb[28]) = 0; \
} while (0)
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
-ENODEV
-EINVAL
-ENODATA
-EINVAL
#if BCME_LAST != -43
#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];
}
extern uint8* dhd_os_prealloc(void *osh int section int size);
osl_t *
osl_attach(void *pdev uint b
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-04-11 20:12 hybrid-v35_64-nodebug-pcoem-6_30_223_271\
目录 0 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\lib\
文件 12381 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\lib\LICENSE.txt
文件 7350128 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\lib\wlc_hybrid.o_shipped
文件 5154 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\Makefile
目录 0 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\
目录 0 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\common\
目录 0 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\common\include\
目录 0 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\common\include\proto\
文件 88473 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\common\include\proto\802.11.h
文件 1353 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\common\include\proto\802.1d.h
文件 1799 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\common\include\proto\bcmeth.h
文件 9729 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\common\include\proto\bcmevent.h
文件 5578 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\common\include\proto\bcmip.h
文件 4928 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\common\include\proto\ethernet.h
文件 5943 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\common\include\proto\ieee80211_radiotap.h
文件 4299 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\common\include\proto\wpa.h
目录 0 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\
目录 0 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\bcmcrypto\
文件 1244 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\bcmcrypto\tkhash.h
文件 3906 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\bcmdefs.h
文件 6912 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\bcmendian.h
文件 20860 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\bcmutils.h
文件 1225 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\epivers.h
文件 15007 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\linuxver.h
文件 13381 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\linux_osl.h
文件 3755 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\osl.h
文件 1568 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\packed_section_end.h
文件 1782 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\packed_section_start.h
文件 2600 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\pcicfg.h
文件 15311 2015-09-19 06:47 hybrid-v35_64-nodebug-pcoem-6_30_223_271\src\include\siutils.h
............此处省略24个文件信息
- 上一篇:echarts地图飞线实现
- 下一篇:xPath的API
相关资源
- 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程序
- Linux命令大全离线版&在线版
- 操作系统共享内存实验
- dos 下运行Linux 命令--gnu_utils
- linux 0.12内核源代码
- linux简易shell C实现
- linux实验报告及心得体会
- 基于GTK的Linux环境下的简易任务管理器
- linux扫雷游戏代码
- CAN Linux驱动代码
- Linux系统教材
- intel 82579LM 网卡驱动Linux系统版 v1.9.
- SA1110处理器掌上电脑液晶显示器设计
- 基于Linux的串口服务器设计
- Windows下访问LINUX的利器-SSH
评论
共有 条评论