亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ar6000_drv.c

?? Linux下SDIO設備的驅動程序
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* * 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 driver is a pseudo ethernet driver to access the Atheros AR6000 * WLAN Device */static const char athId[] __attribute__ ((unused)) = "$Id: //depot/sw/releases/etnaGPL1.1/host/os/linux/ar6000_drv.c#2 $";#include <linux/module.h>#include <linux/config.h>#include <linux/version.h>#include <linux/init.h>#include <linux/kernel.h>#include <linux/spinlock.h>#include <linux/skbuff.h>#include <linux/if_ether.h>#include <linux/netdevice.h>#include <linux/etherdevice.h>#include <net/iw_handler.h>#include <linux/if_arp.h>#include <linux/ip.h>#include <linux/rtnetlink.h>#include <linux/netdevice.h>#include <asm/semaphore.h>#include <linux/wireless.h>#include "../include/athdefs.h"#include "../include/athtypes.h"#include "../include/osapi.h"#include "../include/htc.h"#include "../include/wmi.h"#include "../include/athdrv.h"#include "ar6000_drv.h"#include "../include/bmi.h"#include "../include/ieee80211.h"#include "../include/ieee80211_ioctl.h"#include "../include/wlan_api.h"#include "../include/wmi_api.h"#include "../include/dset_api.h"#include "../include/app/dset.h"#include "../include/gpio_api.h"#include "../include/AR6000_gpio.h"#include "../include/host_version.h"#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)#include <asm/uaccess.h>#include <linux/rtnetlink.h>#endif#include "../include/hw/mbox_host_reg.h"#include "../include/hw/mc_reg.h"#include "../include/hw/mbox_reg.h"#include "../include/hw/rtc_reg.h"MODULE_LICENSE("Dual BSD/GPL");#if defined (SPI)#define CONTROL_PADCONF_AA12 0x00E8unsigned int awake_gpio = 17;unsigned int awake_gpio_pad_conf_offset = CONTROL_PADCONF_AA12;unsigned int awake_gpio_pad_conf_byte = 1;unsigned int awake_gpio_pad_mode_value = 0x3;#endifint bmienable = 0;unsigned int bypasswmi = 0;unsigned int debuglevel = 0;int tspecCompliance = CCX_V4_COMPLIANCE;unsigned int busspeedlow = 0;unsigned int onebitmode = 0;unsigned int skipflash = 0;#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)module_param(bmienable, int, 0644);module_param(bypasswmi, int, 0644);module_param(debuglevel, int, 0644);module_param(tspecCompliance, int, 0644);module_param(onebitmode, int, 0644);module_param(busspeedlow, int, 0644);module_param(skipflash, int, 0644);#else#define __user/* for linux 2.4 and lower */MODULE_PARM(bmienable,"i");MODULE_PARM(bypasswmi,"i");MODULE_PARM(debuglevel, "i");MODULE_PARM(onebitmode,"i");MODULE_PARM(busspeedlow, "i");MODULE_PARM(skipflash, "i");#if defined SPIMODULE_PARM(awake_gpio, "i");MODULE_PARM_DESC(awake_gpio, "Awake GPIO pin");MODULE_PARM(awake_gpio_pad_conf_offset, "i");MODULE_PARM_DESC(awake_gpio_pad_conf_offset,                 "Awake GPIO pin pad config offset");MODULE_PARM(awake_gpio_pad_conf_byte, "i");MODULE_PARM_DESC(awake_gpio_pad_conf_byte,                 "Awake GPIO pin pad byte number");MODULE_PARM(awake_gpio_pad_mode_value, "i");MODULE_PARM_DESC(awake_gpio_pad_mode_value,                 "Awake GPIO pin mode value");#endif#endif#define MAX_ALLOWED_TXQ_DEPTH   (HTC_DATA_REQUEST_RING_BUFFER_SIZE - 2)static int txFlowCtrlThresh[HTC_MAILBOX_NUM_MAX]        = {0 * (MAX_ALLOWED_TXQ_DEPTH - 1),           1 * (MAX_ALLOWED_TXQ_DEPTH - 1),           2 * (MAX_ALLOWED_TXQ_DEPTH - 1),           3 * (MAX_ALLOWED_TXQ_DEPTH - 1)};#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)/* in 2.6.10 and later this is now a pointer to a uint */unsigned int _mboxnum = HTC_MAILBOX_NUM_MAX;#define mboxnum &_mboxnum#elseunsigned int mboxnum = HTC_MAILBOX_NUM_MAX;#endif#ifdef DEBUGint debugdriver = 1;unsigned int debughtc = 128;unsigned int debugbmi = 1;unsigned int debughif = 1;unsigned int txcreditsavailable[HTC_MAILBOX_NUM_MAX] = {0};unsigned int txcreditsconsumed[HTC_MAILBOX_NUM_MAX] = {0};unsigned int txcreditintrenable[HTC_MAILBOX_NUM_MAX] = {0};unsigned int txcreditintrenableaggregate[HTC_MAILBOX_NUM_MAX] = {0};#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)module_param(debugdriver, int, 0644);module_param(debughtc, int, 0644);module_param(debugbmi, int, 0644);module_param(debughif, int, 0644);module_param_array(txcreditsavailable, int, mboxnum, 0644);module_param_array(txcreditsconsumed, int, mboxnum, 0644);module_param_array(txcreditintrenable, int, mboxnum, 0644);module_param_array(txcreditintrenableaggregate, int, mboxnum, 0644);#else/* linux 2.4 and lower */MODULE_PARM(debugdriver, "i");MODULE_PARM(debughtc, "i");MODULE_PARM(debugbmi, "i");MODULE_PARM(debughif, "i");MODULE_PARM(txcreditsavailable, "0-3i");MODULE_PARM(txcreditsconsumed, "0-3i");MODULE_PARM(txcreditintrenable, "0-3i");MODULE_PARM(txcreditintrenableaggregate, "0-3i");#endif#endif /* DEBUG */unsigned int tx_attempt[HTC_MAILBOX_NUM_MAX] = {0};unsigned int tx_post[HTC_MAILBOX_NUM_MAX] = {0};unsigned int tx_complete[HTC_MAILBOX_NUM_MAX] = {0};#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)module_param_array(tx_attempt, int, mboxnum, 0644);module_param_array(tx_post, int, mboxnum, 0644);module_param_array(tx_complete, int, mboxnum, 0644);#elseMODULE_PARM(tx_attempt, "0-3i");MODULE_PARM(tx_post, "0-3i");MODULE_PARM(tx_complete, "0-3i");#endif#ifdef BLOCK_TX_PATH_FLAGint blocktx = 0;#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)module_param(blocktx, int, 0644);#elseMODULE_PARM(blocktx, "i");#endif#endif /* BLOCK_TX_PATH_FLAG */#ifdef DEBUG#define AR_DEBUG_PRINTF(args...)        if (debugdriver) printk(args);#define AR_DEBUG2_PRINTF(args...)        if (debugdriver >= 2) printk(args);#else#define AR_DEBUG_PRINTF(args...)#define AR_DEBUG2_PRINTF(args...)#endif/* Function declarations */static int ar6000_init_module(void);static void ar6000_cleanup_module(void);static int ar6000_init(struct net_device *dev);static int ar6000_open(struct net_device *dev);static int ar6000_close(struct net_device *dev);static void ar6000_init_control_info(AR_SOFTC_T *ar);static void ar6000_init_profile_info(AR_SOFTC_T *ar);static int ar6000_data_tx(struct sk_buff *skb, struct net_device *dev);static int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);static void ar6000_destroy(struct net_device *dev);static struct net_device_stats *ar6000_get_stats(struct net_device *dev);static struct iw_statistics * ar6000_get_iwstats(struct net_device *dev);static void ar6000_ioctl_iwsetup(struct iw_handler_def *def);static int ar6000_ioctl_set_channelParams(struct net_device *dev,                                          struct ifreq *rq);static int ar6000_ioctl_set_probedSsid(struct net_device *dev,                                       struct ifreq *rq);static int ar6000_ioctl_set_badAp(struct net_device *dev, struct ifreq *rq);static int ar6000_ioctl_get_qos_queue(struct net_device *dev, struct ifreq *rq);static int ar6000_ioctl_delete_qos(struct net_device *dev, struct ifreq *rq);static int ar6000_ioctl_create_qos(struct net_device *dev, struct ifreq *rq);static int ar6000_ioctl_set_link_threshold(struct net_device *dev, struct ifreq *rq);static int ar6000_ioctl_get_target_stats(struct net_device *dev, struct ifreq *rq);static int ar6000_ioctl_set_error_report_bitmask(struct net_device *dev, struct ifreq *rq);static int ar6000_ioctl_set_access_params(struct net_device *dev,                                          struct ifreq *rq);static int ar6000_ioctl_set_disconnect_timeout(struct net_device *dev,                                               struct ifreq *rq);static int ar6000_xioctl_set_voice_pkt_size(struct net_device *dev, char * userdata);static int ar6000_xioctl_set_max_sp_len(struct net_device *dev, char * userdata);static int ar6000_ioctl_get_roam_tbl(struct net_device *dev,                                               struct ifreq *rq);static int ar6000_ioctl_get_roam_data(struct net_device *dev, struct ifreq *rq);static int ar6000_ioctl_set_roam_ctrl(struct net_device *dev, char *userdata);static int ar6000_ioctl_set_powersave_timers(struct net_device *dev, char *userdata);static int ar6000_ioctl_get_power_mode(struct net_device *dev,                                       struct ifreq *rq);#ifdef HTC_RAW_INTERFACEstatic void ar6000_htc_raw_read_cb(HTC_TARGET *htcTarget,                                   HTC_ENDPOINT_ID endPointId,                                   HTC_EVENT_ID evId,                                   HTC_EVENT_INFO *evInfo,                                   void *arg);static void ar6000_htc_raw_unread_cb(HTC_TARGET *htcTarget,                                     HTC_ENDPOINT_ID endPointId,                                     HTC_EVENT_ID evId,                                     HTC_EVENT_INFO *evInfo,                                     void *arg);static void ar6000_htc_raw_write_cb(HTC_TARGET *htcTarget,                                    HTC_ENDPOINT_ID endPointId,                                    HTC_EVENT_ID evId,                                    HTC_EVENT_INFO *evInfo,                                    void *arg);static int ar6000_htc_raw_open(HTC_TARGET *htcTarget);static int ar6000_htc_raw_close(HTC_TARGET *htcTarget);static ssize_t ar6000_htc_raw_read(HTC_TARGET *htcTarget,                                   HTC_ENDPOINT_ID endPointId,                                   char __user *buffer, size_t count);static ssize_t ar6000_htc_raw_write(HTC_TARGET *htcTarget,                                    HTC_ENDPOINT_ID endPointId,                                    char __user *buffer, size_t count);#endif /* HTC_RAW_INTERFACE */static void ar6000_install_static_wep_keys(AR_SOFTC_T *ar);static int ar6000_ioctl_addpmkid(struct net_device *dev,                                 struct iw_request_info *info, void *w, char *extra);#if CONFIG_HOST_DSET_SUPPORTstatic void ar6000_dset_init(void);static int ar6000_ioctl_wait_dset_req(struct net_device *dev, struct ifreq *rq);static int ar6000_ioctl_dset_open_reply(struct net_device *dev,                                        struct ifreq *rq);static int ar6000_ioctl_dset_data_reply(struct net_device *dev,                                        struct ifreq *rq);#endif /* CONFIG_HOST_DSET_SUPPORT */#if CONFIG_HOST_GPIO_SUPPORTstatic void ar6000_gpio_init(void);A_STATUS ar6000_gpio_output_set(struct net_device *dev,                                A_UINT32 set_mask,                                A_UINT32 clear_mask,                                A_UINT32 enable_mask,                                A_UINT32 disable_mask);static A_STATUS ar6000_gpio_input_get(struct net_device *dev);static A_STATUS ar6000_gpio_register_set(struct net_device *dev,                                         A_UINT32 gpioreg_id,                                         A_UINT32 value);static A_STATUS ar6000_gpio_register_get(struct net_device *dev,                                         A_UINT32 gpioreg_id);static A_STATUS ar6000_gpio_intr_ack(struct net_device *dev,                                     A_UINT32 ack_mask);#endif /* CONFIG_HOST_GPIO_SUPPORT *//* * HTC event handlers */static void ar6000_avail_ev(HTC_TARGET *htcTarget, HTC_ENDPOINT_ID eid,                            HTC_EVENT_ID id, HTC_EVENT_INFO *evInfo, void *arg);static void ar6000_unavail_ev(HTC_TARGET *htcTarget, HTC_ENDPOINT_ID eid,                            HTC_EVENT_ID id, HTC_EVENT_INFO *evInfo, void *arg);static void ar6000_rx(HTC_TARGET *htcTarget, HTC_ENDPOINT_ID eid,                      HTC_EVENT_ID id, HTC_EVENT_INFO *evInfo, void *arg);static void ar6000_rx_refill(HTC_TARGET *htcTarget, HTC_ENDPOINT_ID eid,                      HTC_EVENT_ID id, HTC_EVENT_INFO *evInfo, void *arg);static void ar6000_tx_complete(HTC_TARGET *htcTarget, HTC_ENDPOINT_ID eid,                      HTC_EVENT_ID id, HTC_EVENT_INFO *evInfo, void *arg);/* * Static variables */static struct net_device *ar6000_devices[MAX_AR6000];static struct iw_handler_def ath_iw_handler_def;static DECLARE_WAIT_QUEUE_HEAD(arEvent);static A_UINT8 bcast_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};static A_UINT8 null_mac[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0};#if CONFIG_HOST_GPIO_SUPPORTstruct ar6000_gpio_intr_wait_cmd_s  gpio_intr_results;/* gpio_reg_results and gpio_data_available are protected by arSem */static struct ar6000_gpio_register_cmd_s gpio_reg_results;static A_BOOL gpio_data_available; /* Requested GPIO data available */static A_BOOL gpio_intr_available; /* GPIO interrupt info available */static A_BOOL gpio_ack_received;   /* GPIO ack was received */#endif /* CONFIG_HOST_GPIO_SUPPORT *//* * adhoc PS support */static void ar6000_cookie_init(AR_SOFTC_T *ar);static void ar6000_cookie_cleanup(AR_SOFTC_T *ar);static void ar6000_free_cookie(AR_SOFTC_T *ar, struct ar_cookie * cookie);static struct ar_cookie *ar6000_alloc_cookie(AR_SOFTC_T *ar);static struct ar_cookie s_ar_cookie_mem[MAX_COOKIE_NUM];static int __initar6000_init_module(void){    static int probed = 0;    A_STATUS status;    if (probed) {        return -ENODEV;    }    probed++;#if CONFIG_HOST_DSET_SUPPORT    ar6000_dset_init();#endif /* CONFIG_HOST_DSET_SUPPORT */#if CONFIG_HOST_GPIO_SUPPORT    ar6000_gpio_init();#endif /* CONFIG_HOST_GPIO_SUPPORT */    status = HTCInit();    if(status != A_OK)        return -ENODEV;    HTCEventReg(NULL, ENDPOINT_UNUSED, HTC_TARGET_AVAILABLE,                ar6000_avail_ev, NULL);    HTCEventReg(NULL, ENDPOINT_UNUSED, HTC_TARGET_UNAVAILABLE,                ar6000_unavail_ev, NULL);    return 0;}static void __exitar6000_cleanup_module(void){    int i = 0;    struct net_device *ar6000_netdev;    for (i=0; i < MAX_AR6000; i++) {        if (ar6000_devices[i] != NULL) {            ar6000_netdev = ar6000_devices[i];            ar6000_devices[i] = NULL;            ar6000_destroy(ar6000_netdev);        }    }    /* This will unregister with the SDIO bus driver */    HTCShutDown(NULL);    AR_DEBUG_PRINTF("ar6000_cleanup: success\n");}/* * Write to the AR6000 through its diagnostic window. * No cooperation from the Target is required for this. */A_STATUSar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data){    HIF_REQUEST request;    A_STATUS status;    HIF_FRAME_REQUEST(&request,                      HIF_WRITE,                      HIF_EXTENDED_IO,                      HIF_SYNCHRONOUS,                      HIF_BYTE_BASIS,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91丝袜国产在线播放| 欧美日韩一区成人| 欧美日韩的一区二区| 欧美国产日本韩| 亚洲va欧美va人人爽午夜| 国产一区不卡视频| 欧洲亚洲国产日韩| 国产精品超碰97尤物18| 国产在线视频精品一区| 91精品国产综合久久久久久漫画 | 99久久精品国产毛片| 欧美一区二区三区日韩| 亚洲资源在线观看| 99久久久免费精品国产一区二区| 久久看人人爽人人| 美腿丝袜在线亚洲一区| 3d动漫精品啪啪1区2区免费| 亚洲激情图片小说视频| eeuss影院一区二区三区| 久久久亚洲精品石原莉奈| 青青草97国产精品免费观看无弹窗版| 91在线你懂得| 国产精品蜜臀在线观看| 成人在线一区二区三区| 久久精品男人的天堂| 国精产品一区一区三区mba视频 | 久久国产尿小便嘘嘘尿| 欧美色老头old∨ideo| 亚洲蜜桃精久久久久久久| 福利电影一区二区| 国产日韩欧美不卡| 国产一区福利在线| 国产欧美精品一区二区三区四区| 国模少妇一区二区三区| 国产日产欧美一区二区三区| 国产成人av电影在线播放| 欧美国产成人精品| 成人avav影音| 亚洲婷婷综合色高清在线| 色欧美日韩亚洲| 日一区二区三区| 欧美日韩国产综合一区二区三区| 五月婷婷综合激情| 欧美一区二视频| 国产米奇在线777精品观看| 亚洲精品一区二区三区蜜桃下载| 国产精品一区二区你懂的| 国产女人18毛片水真多成人如厕| 成人av午夜电影| 一区二区三区日韩| 欧美一区二区视频在线观看2020 | 天堂精品中文字幕在线| 日韩一区二区三区视频在线| 国产原创一区二区| 中文字幕亚洲精品在线观看 | 国产亚洲成av人在线观看导航| 国产剧情一区在线| 综合电影一区二区三区| 555夜色666亚洲国产免| 国产酒店精品激情| 夜夜揉揉日日人人青青一国产精品 | 国产一区二区三区久久悠悠色av | 成人av影院在线| 亚洲午夜激情网站| 精品国产成人系列| av中文字幕亚洲| 日本欧美肥老太交大片| 国产精品白丝在线| 精品国产一区二区三区忘忧草 | 久久亚洲一区二区三区明星换脸 | 久久久久九九视频| 色婷婷久久99综合精品jk白丝| 五月婷婷综合激情| 国产精品成人免费在线| 日韩视频一区在线观看| 色综合中文字幕| 韩国中文字幕2020精品| 亚洲一区影音先锋| 国产欧美日韩精品在线| 日韩三级免费观看| 色美美综合视频| 国产精品一区二区久久不卡| 亚洲成人1区2区| 欧美高清在线一区| 欧美成人官网二区| 欧美三级日韩在线| 本田岬高潮一区二区三区| 久久99国产乱子伦精品免费| 亚洲一线二线三线久久久| 欧美激情综合五月色丁香 | **欧美大码日韩| 精品粉嫩aⅴ一区二区三区四区| 在线观看一区日韩| 成人av在线资源网站| 国产麻豆一精品一av一免费 | 水野朝阳av一区二区三区| 国产精品久久久久精k8 | 久久婷婷色综合| 91精品国产综合久久福利| 在线亚洲一区观看| 91视频国产资源| 成人免费毛片嘿嘿连载视频| 国产一区啦啦啦在线观看| 久久99在线观看| 日本 国产 欧美色综合| 日韩av一区二区三区四区| 午夜精品久久久久久久99水蜜桃| 一区二区免费看| 亚洲精品日韩综合观看成人91| 国产三级一区二区| 久久久久9999亚洲精品| 久久久亚洲午夜电影| 国产亚洲一区二区在线观看| 久久免费看少妇高潮| 久久免费的精品国产v∧| 久久人人爽人人爽| 欧美激情中文不卡| 国产精品久久网站| 亚洲日本在线看| 一区二区三区四区高清精品免费观看 | 亚洲激情一二三区| 亚洲成人久久影院| 日韩1区2区日韩1区2区| 久久97超碰国产精品超碰| 激情综合色综合久久| 国产精品自拍在线| proumb性欧美在线观看| av一二三不卡影片| 欧美性欧美巨大黑白大战| 欧美精品一二三区| 欧美不卡在线视频| 中文字幕av免费专区久久| 国产亚洲福利社区一区| 国产精品黄色在线观看| 一区二区日韩电影| 麻豆国产精品一区二区三区 | 亚洲最大成人网4388xx| 亚洲永久免费av| 毛片av一区二区| 国产成人免费视频网站高清观看视频| 成人久久18免费网站麻豆 | 婷婷亚洲久悠悠色悠在线播放| 久久狠狠亚洲综合| 91偷拍与自偷拍精品| 这里只有精品免费| 国产欧美精品国产国产专区| 亚洲精品免费在线观看| 日本成人超碰在线观看| 懂色av一区二区在线播放| 一本大道久久精品懂色aⅴ| 制服丝袜成人动漫| 国产精品国产三级国产专播品爱网| 亚洲免费视频中文字幕| 久99久精品视频免费观看| 中文字幕亚洲欧美在线不卡| 亚洲欧美另类小说| 日韩av中文字幕一区二区| 成人性视频网站| 欧美精品第1页| 国产精品麻豆一区二区| 日韩电影在线一区二区| 99riav久久精品riav| 2欧美一区二区三区在线观看视频| 亚洲天堂a在线| 精品系列免费在线观看| 色视频一区二区| 国产精品美女久久久久久久久 | 中文成人av在线| 日本大胆欧美人术艺术动态| 97久久久精品综合88久久| 久久久影院官网| 另类的小说在线视频另类成人小视频在线 | 亚洲人成人一区二区在线观看| 91精品福利视频| 91在线小视频| 欧美一区二区三区四区高清| 国产精品久久毛片av大全日韩| 免费看日韩精品| 欧美性大战久久久久久久蜜臀| 国产丝袜在线精品| 美女国产一区二区| 欧美三级欧美一级| 亚洲欧美日韩精品久久久久| 国产福利一区二区三区视频| 日韩精品一区二区三区四区 | 日韩三级视频在线看| 亚洲综合视频在线| 91在线视频官网| 中文字幕一区二区三区在线不卡 | 成人激情午夜影院| 久久综合av免费| 九色综合国产一区二区三区| 国产成人亚洲综合a∨婷婷| 国产精品美女久久久久久久网站| 麻豆一区二区99久久久久| 欧美日韩另类一区| 亚洲一区二区三区四区的| 91视视频在线观看入口直接观看www| 久久午夜羞羞影院免费观看| 国产最新精品精品你懂的|