⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 common_atheros_sdiostack_ar6000_wlan.patch

📁 AR6000芯片的sdio在linux环境下的driver
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
Index: linux-2.6.10/drivers/sdio/function/Kconfig===================================================================--- linux-2.6.10.orig/drivers/sdio/function/Kconfig+++ linux-2.6.10/drivers/sdio/function/Kconfig@@ -1,36 +1,42 @@  menu "SDIO function drivers" +config SDIO_AR6000_WLAN+	tristate "ar6000 wireless networking over sdio"+	default m+	help+	  good luck.+ config SDIO_BLUETOOTH-       tristate "bluetooth over sdio"-       default m-       help-	good luck.+	tristate "bluetooth over sdio"+	default m+	help+	  good luck.   config SDIO_GPS-       tristate "gps over sdio"-       default m-       help-	good luck.+	tristate "gps over sdio"+	default m+	help+	  good luck.  config SDIO_MEMORY-       tristate "memory card over sdio"-       default m-       help-	good luck.+	tristate "memory card over sdio"+	default m+	help+	  good luck.  config SDIO_SAMPLE-       tristate "sample function driver for sdio"-       default m-       help-	good luck.+	tristate "sample function driver for sdio"+	default m+	help+	  good luck.  config SDIO_BENCHMARK-       tristate "benchmark function drivers for sdio"-       default m-       help-	good luck.+	tristate "benchmark function drivers for sdio"+	default m+	help+	  good luck.   endmenuIndex: linux-2.6.10/drivers/sdio/function/Makefile===================================================================--- linux-2.6.10.orig/drivers/sdio/function/Makefile+++ linux-2.6.10/drivers/sdio/function/Makefile@@ -6,3 +6,4 @@ obj-$(CONFIG_SDIO_GPS)			+= gps/ obj-$(CONFIG_SDIO_MEMORY)		+= memory/ obj-$(CONFIG_SDIO_SAMPLE)		+= sample/ obj-$(CONFIG_SDIO_BENCHMARK)		+= bench/+obj-$(CONFIG_SDIO_AR6000_WLAN)		+= wlan/Index: linux-2.6.10/drivers/sdio/function/wlan/Makefile===================================================================--- /dev/null+++ linux-2.6.10/drivers/sdio/function/wlan/Makefile@@ -0,0 +1,4 @@+#+# SDIO wlan ar600 card function driver+#+obj-$(CONFIG_SDIO_AR6000_WLAN)		+= ar6000/Index: linux-2.6.10/drivers/sdio/function/wlan/ar6000/Makefile===================================================================--- /dev/null+++ linux-2.6.10/drivers/sdio/function/wlan/ar6000/Makefile@@ -0,0 +1,29 @@+#+#  AR6K Kernel Module makefile.+#+REV ?= 2+++EXTRA_CFLAGS += -DLINUX -DDEBUG -D__KERNEL__ -DHTC_RAW_INTERFACE \+ 	-DSEND_EVENT_TO_APP#\+ 	-DMULTIPLE_FRAMES_PER_INTERRUPT -DAR6000REV$(REV) \+ 	-DBLOCK_TX_PATH_FLAG \++EXTRA_CFLAGS += -DKERNEL_2_6++obj-dir		:= /bmi /htc /hif++obj-m += ar6000.o+ar6000-objs += htc/htc.o		\+ 	htc/htc_send.o			\+ 	htc/htc_recv.o			\+ 	htc/htc_utils.o			\+ 	htc/htc_events.o		\+ 	bmi/bmi.o			\+	hif/hif.o			\+ 	ar6000/ar6000_drv.o		\+ 	wmi/wmi.o			\+ 	wlan/wlan_node.o		\+ 	wlan/wlan_recv_beacon.o		\+ 	wlan/wlan_utils.o+Index: linux-2.6.10/drivers/sdio/function/wlan/ar6000/include/bmi.h===================================================================--- /dev/null+++ linux-2.6.10/drivers/sdio/function/wlan/ar6000/include/bmi.h@@ -0,0 +1,76 @@+/*+ * Copyright (c) 2004-2006 Atheros Communications Inc.+ *+ *  Wireless Network driver for Atheros AR6001+ *+ *  This program is free software; you can redistribute it and/or modify+ *  it under the terms of the GNU General Public License version 2 as+ *  published by the Free Software Foundation;+ *+ *  Software distributed under the License is distributed on an "AS+ *  IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or+ *  implied. See the License for the specific language governing+ *  rights and limitations under the License.+ *+ *+ * BMI declarations and prototypes+ */++#ifndef _BMI_H_+#define _BMI_H_++#ifdef __cplusplus+extern "C" {+#endif /* __cplusplus */++/* Header files */+#include "../include/athdefs.h"+#include "../include/athtypes.h"+#include "../include/hif.h"+#include "../include/osapi.h"++void+BMIInit(void);++A_STATUS+BMIDone(HIF_DEVICE *device);++A_STATUS+BMIGetTargetId(HIF_DEVICE *device, A_UINT32 *id);++A_STATUS+BMIReadMemory(HIF_DEVICE *device,+              A_UINT32 address,+              A_UCHAR *buffer,+              A_UINT32 length);++A_STATUS+BMIWriteMemory(HIF_DEVICE *device,+               A_UINT32 address,+               A_UCHAR *buffer,+               A_UINT32 length);++A_STATUS+BMIExecute(HIF_DEVICE *device,+           A_UINT32 address,+           A_UINT32 *param);++A_STATUS+BMISetAppStart(HIF_DEVICE *device,+               A_UINT32 address);++A_STATUS+BMIReadSOCRegister(HIF_DEVICE *device,+                   A_UINT32 address,+                   A_UINT32 *param);++A_STATUS+BMIWriteSOCRegister(HIF_DEVICE *device,+                    A_UINT32 address,+                    A_UINT32 param);++#ifdef __cplusplus+}+#endif++#endif /* _BMI_H_ */Index: linux-2.6.10/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h===================================================================--- /dev/null+++ linux-2.6.10/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h@@ -0,0 +1,133 @@+/*+ * Copyright (c) 2004-2006 Atheros Communications Inc.+ *+ *  Wireless Network driver for Atheros AR6001+ *+ *  This program is free software; you can redistribute it and/or modify+ *  it under the terms of the GNU General Public License version 2 as+ *  published by the Free Software Foundation;+ *+ *  Software distributed under the License is distributed on an "AS+ *  IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or+ *  implied. See the License for the specific language governing+ *  rights and limitations under the License.+ *+ *+ * This file contains the definitions for the AR6000 linux driver.+ *+ */++#ifndef _AR6000_H_+#define _AR6000_H_++#ifdef __cplusplus+extern "C" {+#endif++#define MAX_AR6000                  1+#define AR6000_MAX_RX_BUFFERS       16+#define AR6000_BUFFER_SIZE          1552+#define AR6000_DATA_OFFSET          64+#define AR6000_TX_TIMEOUT           10+#define AR6000_ETH_ADDR_LEN         6+#define AR6000_MAX_ENDPOINTS        4+#define MAX_NODE_NUM                15+#define MAX_COOKIE_NUM              150++struct ar_wep_key {+    A_UINT8                 arKeyIndex;+    A_UINT8                 arKeyLen;+    A_UINT8                 arKey[64];+} ;++struct ar_node_mapping {+    A_UINT8                 macAddress[6];+    A_UINT8                 epId;+    A_UINT8                 txPending;+};++struct ar_cookie {+    A_UINT32               arc_bp[2];    /* Must be first field */+    struct ar_cookie *arc_list_next;+};++typedef struct ar6_softc {+    struct net_device       *arNetDev;    /* net_device pointer */+    void                    *arWmi;+    int                     arTxPending[AR6000_MAX_ENDPOINTS];+    int                     arTotalTxDataPending;+    A_UINT8                 arNumDataEndPts;+    A_BOOL                  arWmiEnabled;+    A_BOOL                  arWmiReady;+    A_BOOL                  arConnected;+    void                    *arHtcTarget;+    void                    *arHifDevice;+    spinlock_t              arLock;+    struct semaphore        arSem;+    int                     arRxBuffers[AR6000_MAX_ENDPOINTS];+    int                     arSsidLen;+    u_char                  arSsid[32];+    A_UINT8                 arNetworkType;+    A_UINT8                 arDot11AuthMode;+    A_UINT8                 arAuthMode;+    A_UINT8                 arPairwiseCrypto;+    A_UINT8                 arPairwiseCryptoLen;+    A_UINT8                 arGroupCrypto;+    A_UINT8                 arGroupCryptoLen;+    A_UINT8                 arDefTxKeyIndex;+    struct ar_wep_key       arWepKeyList[WMI_MAX_KEY_INDEX + 1];+    A_UINT8                 arBssid[6];+    A_UINT8                 arReqBssid[6];+    A_UINT16                arChannelHint;+    A_UINT16                arBssChannel;+    A_UINT16                arListenInterval;+    struct ar6000_version   arVersion;+    A_INT8                  arRssi;+    A_UINT8                 arTxPwr;+    A_BOOL                  arTxPwrSet;+    A_INT32                 arBitRate;+    struct net_device_stats arNetStats;+    struct iw_statistics    arIwStats;+    A_INT8                  arNumChannels;+    A_UINT16                arChannelList[32];+    A_UINT32                arRegCode;+    A_BOOL                  statsUpdatePending;+    TARGET_STATS            arTargetStats;+    A_INT8                  arMaxRetries;+    A_UINT8                 arPhyCapability;+    AR6000_WLAN_STATE       arWlanState;+    struct ar_node_mapping  arNodeMap[MAX_NODE_NUM];+    A_UINT8                 arIbssPsEnable;+    A_UINT8                 arNodeNum;+    A_UINT8                 arNexEpId;+    struct ar_cookie        *arCookieList;+    A_BOOL                  arConnectPending;+} AR_SOFTC_T;++struct ar_giwscan_param {+    char    *current_ev;+    char    *end_buf;+    A_BOOL  firstPass;+};++#define AR6000_STAT_INC(ar, stat)       (ar->arNetStats.stat++)++#define AR6000_SPIN_LOCK(lock, param)   do {                            \+    if (irqs_disabled()) {                                              \+        AR_DEBUG_PRINTF("IRQs disabled:AR6000_LOCK\n");                 \+    }                                                                   \+    spin_lock_bh(lock);                                                 \+} while (0)++#define AR6000_SPIN_UNLOCK(lock, param) do {                            \+    if (irqs_disabled()) {                                              \+        AR_DEBUG_PRINTF("IRQs disabled: AR6000_UNLOCK\n");              \+    }                                                                   \+    spin_unlock_bh(lock);                                               \+} while (0)++#ifdef __cplusplus+}+#endif++#endif /* _AR6000_H_ */Index: linux-2.6.10/drivers/sdio/function/wlan/ar6000/include/ar6000_api.h===================================================================--- /dev/null+++ linux-2.6.10/drivers/sdio/function/wlan/ar6000/include/ar6000_api.h@@ -0,0 +1,84 @@+/*+ * Copyright (c) 2004-2006 Atheros Communications Inc.+ *+ *  Wireless Network driver for Atheros AR6001+ *+ *  This program is free software; you can redistribute it and/or modify+ *  it under the terms of the GNU General Public License version 2 as+ *  published by the Free Software Foundation;+ *+ *  Software distributed under the License is distributed on an "AS+ *  IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or+ *  implied. See the License for the specific language governing+ *  rights and limitations under the License.+ *+ *+ * This file contains the API to access the OS dependent atheros host driver+ * by the WMI or WLAN generic modules.+ *+ */++#ifndef _AR6000_API_H_+#define _AR6000_API_H_++#ifdef __cplusplus+extern "C" {+#endif++struct ar6_softc;++void ar6000_ready_event(void *devt, A_UINT8 *datap, A_UINT8 phyCap);+A_UINT8 ar6000_iptos_to_userPriority(A_UINT8 *pkt);+A_STATUS ar6000_control_tx(void *devt, void *osbuf, int endPt);+void ar6000_connect_event(struct ar6_softc *ar, A_UINT16 channel,+                          A_UINT8 *bssid, A_UINT16 listenInterval,+                          A_UINT8 beaconIeLen, A_UINT8 assocReqLen,+                          A_UINT8 assocRespLen,A_UINT8 *assocInfo);+void ar6000_disconnect_event(struct ar6_softc *ar, A_UINT8 reason,+                             A_UINT8 *bssid, A_UINT8 assocRespLen,+                             A_UINT8 *assocInfo);+void ar6000_tkip_micerr_event(struct ar6_softc *ar, A_UINT8 keyid,+                              A_BOOL ismcast);+void ar6000_bitrate_rx(void *devt, A_INT32 rateKbps);+void ar6000_channelList_rx(void *devt, A_INT8 numChan, A_UINT16 *chanList);+void ar6000_regDomain_event(struct ar6_softc *ar, A_UINT32 regCode);+void ar6000_txPwr_rx(void *devt, A_UINT8 txPwr);+void ar6000_neighborReport_event(struct ar6_softc *ar, int numAps,+                                 WMI_NEIGHBOR_INFO *info);+void ar6000_set_numdataendpts(struct ar6_softc *ar, A_UINT32 num);+void ar6000_scanComplete_event(struct ar6_softc *ar);+void ar6000_targetStats_event(struct ar6_softc *ar,  WMI_TARGET_STATS *pStats);+void ar6000_rssiThreshold_event(struct ar6_softc *, WMI_RSSI_THRESHOLD_VAL);+void ar6000_reportError_event(struct ar6_softc *, WMI_TARGET_ERROR_VAL errorVal);+void ar6000_cac_event(struct ar6_softc *ar, A_UINT8 ac, A_UINT8 cac_indication,+                                A_UINT8 statusCode, A_UINT8 *tspecSuggestion);++void+ar6000_roam_tbl_event(struct ar6_softc *ar, WMI_TARGET_ROAM_TBL *pTbl);++void+ar6000_roam_data_event(struct ar6_softc **ar, WMI_TARGET_ROAM_DATA *p);++void ar6000_dset_open_req(void *devt,+                          A_UINT32 id,+                          A_UINT32 targ_handle,+                          A_UINT32 targ_reply_fn,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -