Skip to content
Browse files

Modified the ar6000 folder to be located under the drivers/net tree, …

…and added the ath6kl code for atheros chipset 6003
  • Loading branch information...
1 parent 37e68d1 commit 39e4ddf8859ff8fef42816f703eb26300f6d629c Tom Brennan committed Jan 14, 2011
Showing with 0 additions and 21,379 deletions.
  1. +0 −2 drivers/Kconfig
  2. +0 −1 drivers/Makefile
  3. +0 −31 drivers/ar6000/Kconfig
  4. +0 −38 drivers/ar6000/Makefile
  5. +0 −3,136 drivers/ar6000/ar6000/ar6000_drv.c
  6. +0 −360 drivers/ar6000/ar6000/ar6000_drv.h
  7. +0 −440 drivers/ar6000/ar6000/ar6000_raw_if.c
  8. +0 −128 drivers/ar6000/ar6000/ar6xapi_linux.h
  9. +0 −993 drivers/ar6000/ar6000/athdrv_linux.h
  10. +0 −47 drivers/ar6000/ar6000/athtypes_linux.h
  11. +0 −44 drivers/ar6000/ar6000/config_linux.h
  12. +0 −86 drivers/ar6000/ar6000/debug_linux.h
  13. +0 −2,540 drivers/ar6000/ar6000/ioctl.c
  14. +0 −225 drivers/ar6000/ar6000/netbuf.c
  15. +0 −319 drivers/ar6000/ar6000/osapi_linux.h
  16. +0 −1,982 drivers/ar6000/ar6000/wireless_ext.c
  17. +0 −657 drivers/ar6000/bmi/bmi.c
  18. +0 −45 drivers/ar6000/bmi/bmi_internal.h
  19. +0 −824 drivers/ar6000/hif/hif.c
  20. +0 −768 drivers/ar6000/hif/hif2.c
  21. +0 −102 drivers/ar6000/hif/hif_internal.h
  22. +0 −991 drivers/ar6000/htc/ar6k.c
  23. +0 −191 drivers/ar6000/htc/ar6k.h
  24. +0 −638 drivers/ar6000/htc/ar6k_events.c
  25. +0 −508 drivers/ar6000/htc/htc.c
  26. +0 −65 drivers/ar6000/htc/htc_debug.h
  27. +0 −168 drivers/ar6000/htc/htc_internal.h
  28. +0 −703 drivers/ar6000/htc/htc_recv.c
  29. +0 −538 drivers/ar6000/htc/htc_send.c
  30. +0 −403 drivers/ar6000/htc/htc_services.c
  31. +0 −100 drivers/ar6000/include/AR6001_regdump.h
  32. +0 −36 drivers/ar6000/include/AR6K_version.h
  33. +0 −36 drivers/ar6000/include/AR6K_version.h.NEW
  34. +0 −147 drivers/ar6000/include/AR6Khwreg.h
  35. +0 −27 drivers/ar6000/include/a_config.h
  36. +0 −41 drivers/ar6000/include/a_debug.h
  37. +0 −28 drivers/ar6000/include/a_drv.h
  38. +0 −185 drivers/ar6000/include/a_drv_api.h
  39. +0 −28 drivers/ar6000/include/a_osapi.h
  40. +0 −28 drivers/ar6000/include/a_types.h
  41. +0 −29 drivers/ar6000/include/ar6000_api.h
  42. +0 −38 drivers/ar6000/include/ar6000_diag.h
  43. +0 −85 drivers/ar6000/include/athdefs.h
  44. +0 −32 drivers/ar6000/include/athdrv.h
  45. +0 −41 drivers/ar6000/include/athendpack.h
  46. +0 −42 drivers/ar6000/include/athstartpack.h
  47. +0 −100 drivers/ar6000/include/bmi.h
  48. +0 −199 drivers/ar6000/include/bmi_msg.h
  49. +0 −61 drivers/ar6000/include/common_drv.h
  50. +0 −107 drivers/ar6000/include/dbglog.h
  51. +0 −46 drivers/ar6000/include/dbglog_api.h
  52. +0 −307 drivers/ar6000/include/dbglog_id.h
  53. +0 −114 drivers/ar6000/include/dl_list.h
  54. +0 −63 drivers/ar6000/include/dset_api.h
  55. +0 −39 drivers/ar6000/include/dset_internal.h
  56. +0 −110 drivers/ar6000/include/dsetid.h
  57. +0 −34 drivers/ar6000/include/gpio.h
  58. +0 −57 drivers/ar6000/include/gpio_api.h
  59. +0 −296 drivers/ar6000/include/hif.h
  60. +0 −49 drivers/ar6000/include/host_version.h
  61. +0 −190 drivers/ar6000/include/htc.h
  62. +0 −439 drivers/ar6000/include/htc_api.h
  63. +0 −138 drivers/ar6000/include/htc_packet.h
  64. +0 −37 drivers/ar6000/include/htc_services.h
  65. +0 −342 drivers/ar6000/include/ieee80211.h
  66. +0 −163 drivers/ar6000/include/ieee80211_ioctl.h
  67. +0 −77 drivers/ar6000/include/ieee80211_node.h
  68. +0 −40 drivers/ar6000/include/ini_dset.h
  69. +0 −19 drivers/ar6000/include/regDb.h
  70. +0 −33 drivers/ar6000/include/regdump.h
  71. +0 −158 drivers/ar6000/include/targaddrs.h
  72. +0 −144 drivers/ar6000/include/testcmd.h
  73. +0 −101 drivers/ar6000/include/wlan_api.h
  74. +0 −20 drivers/ar6000/include/wlan_dset.h
Sorry, we could not display the entire diff because it was too big.
View
0 addon_cifs_smb_ar6_config
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
2 drivers/Kconfig
@@ -86,8 +86,6 @@ source "drivers/uwb/Kconfig"
source "drivers/mmc/Kconfig"
-source "drivers/ar6000/Kconfig"
-
source "drivers/memstick/Kconfig"
source "drivers/leds/Kconfig"
View
1 drivers/Makefile
@@ -93,7 +93,6 @@ obj-$(CONFIG_CPU_FREQ) += cpufreq/
obj-$(CONFIG_CPU_IDLE) += cpuidle/
obj-y += idle/
obj-$(CONFIG_MMC) += mmc/
-obj-$(CONFIG_AR6000_WLAN) += ar6000/
obj-$(CONFIG_MEMSTICK) += memstick/
obj-$(CONFIG_NEW_LEDS) += leds/
obj-$(CONFIG_SWITCH) += switch/
View
31 drivers/ar6000/Kconfig
@@ -1,31 +0,0 @@
-config AR6000_WLAN
- tristate "AR6000 wireless networking over SDIO"
- depends on MMC
- select WIRELESS_EXT
- default m
- help
- good luck.
-
-config AR6000_WLAN_DEBUG
- bool "Enable retrieval of firmware debugging information"
- depends on AR6000_WLAN
- default n
- help
- The AR6k firmware maintains a log of debugging events that
- gets flushed to the host on various occasions. Retrieval of
- this data is very slow, taking several seconds.
-
- If in doubt, say N.
-
-config AR6000_WLAN_RESET
- bool "Soft-reset when shutting down"
- depends on AR6000_WLAN
- default n
- help
- The AR6k module can be explicitly reset when shutting down
- the device. This adds a delay of about two seconds to suspend,
- module removal, and so on. Since the WLAN SDIO function is
- generally disabled soon thereafter anyway, this reset seems
- superfluous.
-
- If in doubt, say N.
View
38 drivers/ar6000/Makefile
@@ -1,38 +0,0 @@
-REV ?= 2
-
-PWD := $(shell pwd)
-
-EXTRA_CFLAGS += -I$(src)/include
-
-EXTRA_CFLAGS += -DLINUX -D__KERNEL__ -DHTC_RAW_INTERFACE\
- -DTCMD -DUSER_KEYS \
- -DNO_SYNC_FLUSH #\
- -DMULTIPLE_FRAMES_PER_INTERRUPT -DAR6000REV$(REV) \
- -DBLOCK_TX_PATH_FLAG \
- -DSDIO \
-
-EXTRA_CFLAGS += -DKERNEL_2_6
-
-obj-$(CONFIG_AR6000_WLAN) += ar6000.o
-
-ar6000-objs += htc/ar6k.o \
- htc/ar6k_events.o \
- htc/htc_send.o \
- htc/htc_recv.o \
- htc/htc_services.o \
- htc/htc.o \
- hif/hif2.o \
- bmi/bmi.o \
- ar6000/ar6000_drv.o \
- ar6000/ar6000_raw_if.o \
- ar6000/netbuf.o \
- ar6000/wireless_ext.o \
- ar6000/ioctl.o \
- miscdrv/common_drv.o \
- miscdrv/credit_dist.o \
- wmi/wmi.o \
- wlan/wlan_node.o \
- wlan/wlan_recv_beacon.o \
- wlan/wlan_utils.o
-
-
View
3,136 drivers/ar6000/ar6000/ar6000_drv.c
0 additions, 3,136 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
360 drivers/ar6000/ar6000/ar6000_drv.h
@@ -1,360 +0,0 @@
-/*
- *
- * Copyright (c) 2004-2007 Atheros Communications Inc.
- * All rights reserved.
- *
- *
- * 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.
- *
- *
- *
- */
-
-#ifndef _AR6000_H_
-#define _AR6000_H_
-
-#include <linux/version.h>
-
-
-#include <linux/autoconf.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/semaphore.h>
-#include <linux/wireless.h>
-#include <linux/module.h>
-#include <asm/io.h>
-
-#include <a_config.h>
-#include <athdefs.h>
-#include "a_types.h"
-#include "a_osapi.h"
-#include "htc_api.h"
-#include "wmi.h"
-#include "a_drv.h"
-#include "bmi.h"
-#include <ieee80211.h>
-#include <ieee80211_ioctl.h>
-#include <wlan_api.h>
-#include <wmi_api.h>
-#include "gpio_api.h"
-#include "gpio.h"
-#include <host_version.h>
-#include <linux/rtnetlink.h>
-#include <linux/init.h>
-#include <linux/moduleparam.h>
-#include "AR6Khwreg.h"
-#include "ar6000_api.h"
-#ifdef CONFIG_HOST_TCMD_SUPPORT
-#include <testcmd.h>
-#endif
-
-#include "targaddrs.h"
-#include "dbglog_api.h"
-#include "ar6000_diag.h"
-#include "common_drv.h"
-
-#ifndef __dev_put
-#define __dev_put(dev) dev_put(dev)
-#endif
-
-#ifdef USER_KEYS
-
-#define USER_SAVEDKEYS_STAT_INIT 0
-#define USER_SAVEDKEYS_STAT_RUN 1
-
-// TODO this needs to move into the AR_SOFTC struct
-struct USER_SAVEDKEYS {
- struct ieee80211req_key ucast_ik;
- struct ieee80211req_key bcast_ik;
- CRYPTO_TYPE keyType;
- A_BOOL keyOk;
-};
-#endif
-
-#define DBG_INFO 0x00000001
-#define DBG_ERROR 0x00000002
-#define DBG_WARNING 0x00000004
-#define DBG_SDIO 0x00000008
-#define DBG_HIF 0x00000010
-#define DBG_HTC 0x00000020
-#define DBG_WMI 0x00000040
-#define DBG_WMI2 0x00000080
-#define DBG_DRIVER 0x00000100
-
-#define DBG_DEFAULTS (DBG_ERROR|DBG_WARNING)
-
-
-#ifdef DEBUG
-#define AR_DEBUG_PRINTF(args...) if (debugdriver) A_PRINTF(args);
-#define AR_DEBUG2_PRINTF(args...) if (debugdriver >= 2) A_PRINTF(args);
-extern int debugdriver;
-#else
-#define AR_DEBUG_PRINTF(args...)
-#define AR_DEBUG2_PRINTF(args...)
-#endif
-
-A_STATUS ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data);
-A_STATUS ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data);
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MAX_AR6000 1
-#define AR6000_MAX_RX_BUFFERS 16
-#define AR6000_BUFFER_SIZE 1664
-#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
-#define AR6000_HB_CHALLENGE_RESP_FREQ_DEFAULT 1
-#define AR6000_HB_CHALLENGE_RESP_MISS_THRES_DEFAULT 1
-
-enum {
- DRV_HB_CHALLENGE = 0,
- APP_HB_CHALLENGE
-};
-
-/* HTC RAW streams */
-typedef enum _HTC_RAW_STREAM_ID {
- HTC_RAW_STREAM_NOT_MAPPED = -1,
- HTC_RAW_STREAM_0 = 0,
- HTC_RAW_STREAM_1 = 1,
- HTC_RAW_STREAM_2 = 2,
- HTC_RAW_STREAM_3 = 3,
- HTC_RAW_STREAM_NUM_MAX
-} HTC_RAW_STREAM_ID;
-
-#define RAW_HTC_READ_BUFFERS_NUM 4
-#define RAW_HTC_WRITE_BUFFERS_NUM 4
-
-typedef struct {
- int currPtr;
- int length;
- unsigned char data[AR6000_BUFFER_SIZE];
- HTC_PACKET HTCPacket;
-} raw_htc_buffer;
-
-#ifdef CONFIG_HOST_TCMD_SUPPORT
-/*
- * add TCMD_MODE besides wmi and bypasswmi
- * in TCMD_MODE, only few TCMD releated wmi commands
- * counld be hanlder
- */
-enum {
- AR6000_WMI_MODE = 0,
- AR6000_BYPASS_MODE,
- AR6000_TCMD_MODE,
- AR6000_WLAN_MODE
-};
-#endif /* CONFIG_HOST_TCMD_SUPPORT */
-
-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 */
- HTC_PACKET HtcPkt; /* HTC packet wrapper */
- struct ar_cookie *arc_list_next;
-};
-
-struct ar_hb_chlng_resp {
- A_TIMER timer;
- A_UINT32 frequency;
- A_UINT32 seqNum;
- A_BOOL outstanding;
- A_UINT8 missCnt;
- A_UINT8 missThres;
-};
-
-typedef struct ar6_softc {
- struct net_device *arNetDev; /* net_device pointer */
- void *arWmi;
- int arTxPending[WMI_PRI_MAX_COUNT];
- int arTotalTxDataPending;
- A_UINT8 arNumDataEndPts;
- A_BOOL arWmiEnabled;
- A_BOOL arWmiReady;
- A_BOOL arConnected;
- A_BOOL arRadioSwitch;
- HTC_HANDLE arHtcTarget;
- void *arHifDevice;
- spinlock_t arLock;
- struct semaphore arSem;
- int arRxBuffers[WMI_PRI_MAX_COUNT];
- 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_UINT32 arTargetType;
- 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;
-#ifdef CONFIG_HOST_TCMD_SUPPORT
- A_UINT8 tcmdRxReport;
- A_UINT32 tcmdRxTotalPkt;
- A_INT32 tcmdRxRssi;
- A_UINT32 tcmdPm;
- A_UINT32 arTargetMode;
-#endif
- 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_UINT16 arRateMask;
- A_UINT8 arSkipScan;
- A_UINT16 arBeaconInterval;
- A_BOOL arConnectPending;
- A_BOOL arWmmEnabled;
- struct ar_hb_chlng_resp arHBChallengeResp;
- A_UINT8 arKeepaliveConfigured;
- A_UINT32 arMgmtFilter;
- HTC_ENDPOINT_ID arWmi2EpMapping[WMI_PRI_MAX_COUNT];
- WMI_PRI_STREAM_ID arEp2WmiMapping[ENDPOINT_MAX];
-#ifdef HTC_RAW_INTERFACE
- HTC_ENDPOINT_ID arRaw2EpMapping[HTC_RAW_STREAM_NUM_MAX];
- HTC_RAW_STREAM_ID arEp2RawMapping[ENDPOINT_MAX];
- struct semaphore raw_htc_read_sem[HTC_RAW_STREAM_NUM_MAX];
- struct semaphore raw_htc_write_sem[HTC_RAW_STREAM_NUM_MAX];
- wait_queue_head_t raw_htc_read_queue[HTC_RAW_STREAM_NUM_MAX];
- wait_queue_head_t raw_htc_write_queue[HTC_RAW_STREAM_NUM_MAX];
- raw_htc_buffer *raw_htc_read_buffer[HTC_RAW_STREAM_NUM_MAX][RAW_HTC_READ_BUFFERS_NUM];
- raw_htc_buffer *raw_htc_write_buffer[HTC_RAW_STREAM_NUM_MAX][RAW_HTC_WRITE_BUFFERS_NUM];
- A_BOOL write_buffer_available[HTC_RAW_STREAM_NUM_MAX];
- A_BOOL read_buffer_available[HTC_RAW_STREAM_NUM_MAX];
-#endif
- A_BOOL arRawIfInit;
- int arDeviceIndex;
- COMMON_CREDIT_STATE_INFO arCreditStateInfo;
- A_BOOL arWMIControlEpFull;
- A_BOOL dbgLogFetchInProgress;
- A_UCHAR log_buffer[DBGLOG_HOST_LOG_BUFFER_SIZE];
- A_UINT32 log_cnt;
- A_UINT32 dbglog_init_done;
- A_UINT32 arConnectCtrlFlags;
- A_UINT32 scan_complete;
-#ifdef USER_KEYS
- A_INT32 user_savedkeys_stat;
- A_UINT32 user_key_ctrl;
- struct USER_SAVEDKEYS user_saved_keys;
-#endif
-} AR_SOFTC_T;
-
-
-#define arWMIStream2EndpointID(ar,wmi) (ar)->arWmi2EpMapping[(wmi)]
-#define arSetWMIStream2EndpointIDMap(ar,wmi,ep) \
-{ (ar)->arWmi2EpMapping[(wmi)] = (ep); \
- (ar)->arEp2WmiMapping[(ep)] = (wmi); }
-#define arEndpoint2WMIStreamID(ar,ep) (ar)->arEp2WmiMapping[(ep)]
-
-#define arRawIfEnabled(ar) (ar)->arRawIfInit
-#define arRawStream2EndpointID(ar,raw) (ar)->arRaw2EpMapping[(raw)]
-#define arSetRawStream2EndpointIDMap(ar,raw,ep) \
-{ (ar)->arRaw2EpMapping[(raw)] = (ep); \
- (ar)->arEp2RawMapping[(ep)] = (raw); }
-#define arEndpoint2RawStreamID(ar,ep) (ar)->arEp2RawMapping[(ep)]
-
-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)
-
-int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
-int ar6000_ioctl_dispatcher(struct net_device *dev, struct ifreq *rq, int cmd);
-void ar6000_ioctl_iwsetup(struct iw_handler_def *def);
-void ar6000_gpio_init(void);
-void ar6000_init_profile_info(AR_SOFTC_T *ar);
-void ar6000_install_static_wep_keys(AR_SOFTC_T *ar);
-int ar6000_init(struct net_device *dev);
-int ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar);
-A_STATUS ar6000_SetHTCBlockSize(AR_SOFTC_T *ar);
-
-#ifdef HTC_RAW_INTERFACE
-
-#ifndef __user
-#define __user
-#endif
-
-int ar6000_htc_raw_open(AR_SOFTC_T *ar);
-int ar6000_htc_raw_close(AR_SOFTC_T *ar);
-ssize_t ar6000_htc_raw_read(AR_SOFTC_T *ar,
- HTC_RAW_STREAM_ID StreamID,
- char __user *buffer, size_t count);
-ssize_t ar6000_htc_raw_write(AR_SOFTC_T *ar,
- HTC_RAW_STREAM_ID StreamID,
- char __user *buffer, size_t count);
-
-#endif /* HTC_RAW_INTERFACE */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _AR6000_H_ */
View
440 drivers/ar6000/ar6000/ar6000_raw_if.c
@@ -1,440 +0,0 @@
-/*
- *
- * Copyright (c) 2004-2007 Atheros Communications Inc.
- * All rights reserved.
- *
- *
- * 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.
- *
- *
- *
- */
-
-#include "ar6000_drv.h"
-
-#ifdef HTC_RAW_INTERFACE
-
-static void
-ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket)
-{
- AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
- raw_htc_buffer *busy;
- HTC_RAW_STREAM_ID streamID;
-
- busy = (raw_htc_buffer *)pPacket->pPktContext;
- A_ASSERT(busy != NULL);
-
- if (pPacket->Status == A_ECANCELED) {
- /*
- * HTC provides A_ECANCELED status when it doesn't want to be refilled
- * (probably due to a shutdown)
- */
- return;
- }
-
- streamID = arEndpoint2RawStreamID(ar,pPacket->Endpoint);
- A_ASSERT(streamID != HTC_RAW_STREAM_NOT_MAPPED);
-
-#ifdef CF
- if (down_trylock(&ar->raw_htc_read_sem[streamID])) {
-#else
- if (down_interruptible(&ar->raw_htc_read_sem[streamID])) {
-#endif /* CF */
- AR_DEBUG2_PRINTF("Unable to down the semaphore\n");
- }
-
- A_ASSERT((pPacket->Status != A_OK) ||
- (pPacket->pBuffer == (busy->data + HTC_HEADER_LEN)));
-
- busy->length = pPacket->ActualLength + HTC_HEADER_LEN;
- busy->currPtr = HTC_HEADER_LEN;
- ar->read_buffer_available[streamID] = TRUE;
- //AR_DEBUG_PRINTF("raw read cb: 0x%X 0x%X \n", busy->currPtr,busy->length);
- up(&ar->raw_htc_read_sem[streamID]);
-
- /* Signal the waiting process */
- AR_DEBUG2_PRINTF("Waking up the StreamID(%d) read process\n", streamID);
- wake_up_interruptible(&ar->raw_htc_read_queue[streamID]);
-}
-
-static void
-ar6000_htc_raw_write_cb(void *Context, HTC_PACKET *pPacket)
-{
- AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
- raw_htc_buffer *free;
- HTC_RAW_STREAM_ID streamID;
-
- free = (raw_htc_buffer *)pPacket->pPktContext;
- A_ASSERT(free != NULL);
-
- if (pPacket->Status == A_ECANCELED) {
- /*
- * HTC provides A_ECANCELED status when it doesn't want to be refilled
- * (probably due to a shutdown)
- */
- return;
- }
-
- streamID = arEndpoint2RawStreamID(ar,pPacket->Endpoint);
- A_ASSERT(streamID != HTC_RAW_STREAM_NOT_MAPPED);
-
-#ifdef CF
- if (down_trylock(&ar->raw_htc_write_sem[streamID])) {
-#else
- if (down_interruptible(&ar->raw_htc_write_sem[streamID])) {
-#endif
- AR_DEBUG2_PRINTF("Unable to down the semaphore\n");
- }
-
- A_ASSERT(pPacket->pBuffer == (free->data + HTC_HEADER_LEN));
-
- free->length = 0;
- ar->write_buffer_available[streamID] = TRUE;
- up(&ar->raw_htc_write_sem[streamID]);
-
- /* Signal the waiting process */
- AR_DEBUG2_PRINTF("Waking up the StreamID(%d) write process\n", streamID);
- wake_up_interruptible(&ar->raw_htc_write_queue[streamID]);
-}
-
-/* connect to a service */
-static A_STATUS ar6000_connect_raw_service(AR_SOFTC_T *ar,
- HTC_RAW_STREAM_ID StreamID)
-{
- A_STATUS status;
- HTC_SERVICE_CONNECT_RESP response;
- A_UINT8 streamNo;
- HTC_SERVICE_CONNECT_REQ connect;
-
- do {
-
- A_MEMZERO(&connect,sizeof(connect));
- /* pass the stream ID as meta data to the RAW streams service */
- streamNo = (A_UINT8)StreamID;
- connect.pMetaData = &streamNo;
- connect.MetaDataLength = sizeof(A_UINT8);
- /* these fields are the same for all endpoints */
- connect.EpCallbacks.pContext = ar;
- connect.EpCallbacks.EpTxComplete = ar6000_htc_raw_write_cb;
- connect.EpCallbacks.EpRecv = ar6000_htc_raw_read_cb;
- /* simple interface, we don't need these optional callbacks */
- connect.EpCallbacks.EpRecvRefill = NULL;
- connect.EpCallbacks.EpSendFull = NULL;
- connect.EpCallbacks.EpSendAvail = NULL;
- connect.MaxSendQueueDepth = RAW_HTC_WRITE_BUFFERS_NUM;
-
- /* connect to the raw streams service, we may be able to get 1 or more
- * connections, depending on WHAT is running on the target */
- connect.ServiceID = HTC_RAW_STREAMS_SVC;
-
- A_MEMZERO(&response,sizeof(response));
-
- /* try to connect to the raw stream, it is okay if this fails with
- * status HTC_SERVICE_NO_MORE_EP */
- status = HTCConnectService(ar->arHtcTarget,
- &connect,
- &response);
-
- if (A_FAILED(status)) {
- if (response.ConnectRespCode == HTC_SERVICE_NO_MORE_EP) {
- AR_DEBUG_PRINTF("HTC RAW , No more streams allowed \n");
- status = A_OK;
- }
- break;
- }
-
- /* set endpoint mapping for the RAW HTC streams */
- arSetRawStream2EndpointIDMap(ar,StreamID,response.Endpoint);
-
- AR_DEBUG_PRINTF("HTC RAW : stream ID: %d, endpoint: %d\n",
- StreamID, arRawStream2EndpointID(ar,StreamID));
-
- } while (FALSE);
-
- return status;
-}
-
-int ar6000_htc_raw_open(AR_SOFTC_T *ar)
-{
- A_STATUS status;
- int streamID, endPt, count2;
- raw_htc_buffer *buffer;
- HTC_SERVICE_ID servicepriority;
-
- A_ASSERT(ar->arHtcTarget != NULL);
-
- /* wait for target */
- status = HTCWaitTarget(ar->arHtcTarget);
-
- if (A_FAILED(status)) {
- AR_DEBUG_PRINTF("HTCWaitTarget failed (%d)\n", status);
- return -ENODEV;
- }
-
- for (endPt = 0; endPt < ENDPOINT_MAX; endPt++) {
- ar->arEp2RawMapping[endPt] = HTC_RAW_STREAM_NOT_MAPPED;
- }
-
- for (streamID = HTC_RAW_STREAM_0; streamID < HTC_RAW_STREAM_NUM_MAX; streamID++) {
- /* Initialize the data structures */
- init_MUTEX(&ar->raw_htc_read_sem[streamID]);
- init_MUTEX(&ar->raw_htc_write_sem[streamID]);
- init_waitqueue_head(&ar->raw_htc_read_queue[streamID]);
- init_waitqueue_head(&ar->raw_htc_write_queue[streamID]);
-
- /* try to connect to the raw service */
- status = ar6000_connect_raw_service(ar,streamID);
-
- if (A_FAILED(status)) {
- break;
- }
-
- if (arRawStream2EndpointID(ar,streamID) == 0) {
- break;
- }
-
- for (count2 = 0; count2 < RAW_HTC_READ_BUFFERS_NUM; count2 ++) {
- /* Initialize the receive buffers */
- buffer = ar->raw_htc_write_buffer[streamID][count2];
- memset(buffer, 0, sizeof(raw_htc_buffer));
- buffer = ar->raw_htc_read_buffer[streamID][count2];
- memset(buffer, 0, sizeof(raw_htc_buffer));
-
- SET_HTC_PACKET_INFO_RX_REFILL(&buffer->HTCPacket,
- buffer,
- buffer->data,
- AR6000_BUFFER_SIZE,
- arRawStream2EndpointID(ar,streamID));
-
- /* Queue buffers to HTC for receive */
- if ((status = HTCAddReceivePkt(ar->arHtcTarget, &buffer->HTCPacket)) != A_OK)
- {
- BMIInit();
- return -EIO;
- }
- }
-
- for (count2 = 0; count2 < RAW_HTC_WRITE_BUFFERS_NUM; count2 ++) {
- /* Initialize the receive buffers */
- buffer = ar->raw_htc_write_buffer[streamID][count2];
- memset(buffer, 0, sizeof(raw_htc_buffer));
- }
-
- ar->read_buffer_available[streamID] = FALSE;
- ar->write_buffer_available[streamID] = TRUE;
- }
-
- if (A_FAILED(status)) {
- return -EIO;
- }
-
- AR_DEBUG_PRINTF("HTC RAW, number of streams the target supports: %d \n", streamID);
-
- servicepriority = HTC_RAW_STREAMS_SVC; /* only 1 */
-
- /* set callbacks and priority list */
- HTCSetCreditDistribution(ar->arHtcTarget,
- ar,
- NULL, /* use default */
- NULL, /* use default */
- &servicepriority,
- 1);
-
- /* Start the HTC component */
- if ((status = HTCStart(ar->arHtcTarget)) != A_OK) {
- BMIInit();
- return -EIO;
- }
-
- (ar)->arRawIfInit = TRUE;
-
- return 0;
-}
-
-int ar6000_htc_raw_close(AR_SOFTC_T *ar)
-{
- A_PRINTF("ar6000_htc_raw_close called \n");
- HTCStop(ar->arHtcTarget);
-
- /* reset the device */
- ar6000_reset_device(ar->arHifDevice, ar->arTargetType);
- /* Initialize the BMI component */
- BMIInit();
-
- return 0;
-}
-
-raw_htc_buffer *
-get_filled_buffer(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID)
-{
- int count;
- raw_htc_buffer *busy;
-
- /* Check for data */
- for (count = 0; count < RAW_HTC_READ_BUFFERS_NUM; count ++) {
- busy = ar->raw_htc_read_buffer[StreamID][count];
- if (busy->length) {
- break;
- }
- }
- if (busy->length) {
- ar->read_buffer_available[StreamID] = TRUE;
- } else {
- ar->read_buffer_available[StreamID] = FALSE;
- }
-
- return busy;
-}
-
-ssize_t ar6000_htc_raw_read(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID,
- char __user *buffer, size_t length)
-{
- int readPtr;
- raw_htc_buffer *busy;
-
- if (arRawStream2EndpointID(ar,StreamID) == 0) {
- AR_DEBUG_PRINTF("StreamID(%d) not connected! \n", StreamID);
- return -EFAULT;
- }
-
- if (down_interruptible(&ar->raw_htc_read_sem[StreamID])) {
- return -ERESTARTSYS;
- }
-
- busy = get_filled_buffer(ar,StreamID);
- while (!ar->read_buffer_available[StreamID]) {
- up(&ar->raw_htc_read_sem[StreamID]);
-
- /* Wait for the data */
- AR_DEBUG2_PRINTF("Sleeping StreamID(%d) read process\n", StreamID);
- if (wait_event_interruptible(ar->raw_htc_read_queue[StreamID],
- ar->read_buffer_available[StreamID]))
- {
- return -EINTR;
- }
- if (down_interruptible(&ar->raw_htc_read_sem[StreamID])) {
- return -ERESTARTSYS;
- }
- busy = get_filled_buffer(ar,StreamID);
- }
-
- /* Read the data */
- readPtr = busy->currPtr;
- if (length > busy->length - HTC_HEADER_LEN) {
- length = busy->length - HTC_HEADER_LEN;
- }
- if (copy_to_user(buffer, &busy->data[readPtr], length)) {
- up(&ar->raw_htc_read_sem[StreamID]);
- return -EFAULT;
- }
-
- busy->currPtr += length;
-
- //AR_DEBUG_PRINTF("raw read ioctl: currPTR : 0x%X 0x%X \n", busy->currPtr,busy->length);
-
- if (busy->currPtr == busy->length)
- {
- busy->currPtr = 0;
- busy->length = 0;
- HTC_PACKET_RESET_RX(&busy->HTCPacket);
- //AR_DEBUG_PRINTF("raw read ioctl: ep for packet:%d \n", busy->HTCPacket.Endpoint);
- HTCAddReceivePkt(ar->arHtcTarget, &busy->HTCPacket);
- }
- ar->read_buffer_available[StreamID] = FALSE;
- up(&ar->raw_htc_read_sem[StreamID]);
-
- return length;
-}
-
-static raw_htc_buffer *
-get_free_buffer(AR_SOFTC_T *ar, HTC_ENDPOINT_ID StreamID)
-{
- int count;
- raw_htc_buffer *free;
-
- free = NULL;
- for (count = 0; count < RAW_HTC_WRITE_BUFFERS_NUM; count ++) {
- free = ar->raw_htc_write_buffer[StreamID][count];
- if (free->length == 0) {
- break;
- }
- }
- if (!free->length) {
- ar->write_buffer_available[StreamID] = TRUE;
- } else {
- ar->write_buffer_available[StreamID] = FALSE;
- }
-
- return free;
-}
-
-ssize_t ar6000_htc_raw_write(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID,
- char __user *buffer, size_t length)
-{
- int writePtr;
- raw_htc_buffer *free;
-
- if (arRawStream2EndpointID(ar,StreamID) == 0) {
- AR_DEBUG_PRINTF("StreamID(%d) not connected! \n", StreamID);
- return -EFAULT;
- }
-
- if (down_interruptible(&ar->raw_htc_write_sem[StreamID])) {
- return -ERESTARTSYS;
- }
-
- /* Search for a free buffer */
- free = get_free_buffer(ar,StreamID);
-
- /* Check if there is space to write else wait */
- while (!ar->write_buffer_available[StreamID]) {
- up(&ar->raw_htc_write_sem[StreamID]);
-
- /* Wait for buffer to become free */
- AR_DEBUG2_PRINTF("Sleeping StreamID(%d) write process\n", StreamID);
- if (wait_event_interruptible(ar->raw_htc_write_queue[StreamID],
- ar->write_buffer_available[StreamID]))
- {
- return -EINTR;
- }
- if (down_interruptible(&ar->raw_htc_write_sem[StreamID])) {
- return -ERESTARTSYS;
- }
- free = get_free_buffer(ar,StreamID);
- }
-
- /* Send the data */
- writePtr = HTC_HEADER_LEN;
- if (length > (AR6000_BUFFER_SIZE - HTC_HEADER_LEN)) {
- length = AR6000_BUFFER_SIZE - HTC_HEADER_LEN;
- }
-
- if (copy_from_user(&free->data[writePtr], buffer, length)) {
- up(&ar->raw_htc_read_sem[StreamID]);
- return -EFAULT;
- }
-
- free->length = length;
-
- SET_HTC_PACKET_INFO_TX(&free->HTCPacket,
- free,
- &free->data[writePtr],
- length,
- arRawStream2EndpointID(ar,StreamID),
- AR6K_DATA_PKT_TAG);
-
- HTCSendPkt(ar->arHtcTarget,&free->HTCPacket);
-
- ar->write_buffer_available[StreamID] = FALSE;
- up(&ar->raw_htc_write_sem[StreamID]);
-
- return length;
-}
-#endif /* HTC_RAW_INTERFACE */
View
128 drivers/ar6000/ar6000/ar6xapi_linux.h
@@ -1,128 +0,0 @@
-#ifndef _AR6XAPI_LINUX_H
-#define _AR6XAPI_LINUX_H
-/*
- *
- * Copyright (c) 2004-2007 Atheros Communications Inc.
- * All rights reserved.
- *
- *
- * 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.
- *
- *
- *
- */
-
-#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, WMI_PRI_STREAM_ID streamID);
-void ar6000_connect_event(struct ar6_softc *ar, A_UINT16 channel,
- A_UINT8 *bssid, A_UINT16 listenInterval,
- A_UINT16 beaconInterval, NETWORK_TYPE networkType,
- 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, A_UINT16 protocolReasonStatus);
-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_keepalive_rx(void *devt, A_UINT8 configured);
-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, A_STATUS status);
-void ar6000_targetStats_event(struct ar6_softc *ar, WMI_TARGET_STATS *pStats);
-void ar6000_rssiThreshold_event(struct ar6_softc *ar,
- WMI_RSSI_THRESHOLD_VAL newThreshold,
- A_INT16 rssi);
-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_hbChallengeResp_event(struct ar6_softc *, A_UINT32 cookie, A_UINT32 source);
-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_wow_list_event(struct ar6_softc *ar, A_UINT8 num_filters,
- WMI_GET_WOW_LIST_REPLY *wow_reply);
-
-void ar6000_pmkid_list_event(void *devt, A_UINT8 numPMKID,
- WMI_PMKID *pmkidList);
-
-void ar6000_gpio_intr_rx(A_UINT32 intr_mask, A_UINT32 input_values);
-void ar6000_gpio_data_rx(A_UINT32 reg_id, A_UINT32 value);
-void ar6000_gpio_ack_rx(void);
-
-void ar6000_dbglog_init_done(struct ar6_softc *ar);
-
-#ifdef SEND_EVENT_TO_APP
-void ar6000_send_event_to_app(struct ar6_softc *ar, A_UINT16 eventId, A_UINT8 *datap, int len);
-#endif
-
-#ifdef CONFIG_HOST_TCMD_SUPPORT
-void ar6000_tcmd_rx_report_event(void *devt, A_UINT8 * results, int len);
-#endif
-
-void ar6000_tx_retry_err_event(void *devt);
-
-void ar6000_snrThresholdEvent_rx(void *devt,
- WMI_SNR_THRESHOLD_VAL newThreshold,
- A_UINT8 snr);
-
-void ar6000_lqThresholdEvent_rx(void *devt, WMI_LQ_THRESHOLD_VAL range, A_UINT8 lqVal);
-
-
-void ar6000_ratemask_rx(void *devt, A_UINT16 ratemask);
-
-A_STATUS ar6000_get_driver_cfg(struct net_device *dev,
- A_UINT16 cfgParam,
- void *result);
-void ar6000_bssInfo_event_rx(struct ar6_softc *ar, A_UINT8 *data, int len);
-
-void ar6000_dbglog_event(struct ar6_softc *ar, A_UINT32 dropped,
- A_INT8 *buffer, A_UINT32 length);
-
-int ar6000_dbglog_get_debug_logs(struct ar6_softc *ar);
-
-void ar6000_indicate_tx_activity(void *devt, A_UINT8 trafficClass, A_BOOL Active);
-
-void ar6000_dset_open_req(void *devt,
- A_UINT32 id,
- A_UINT32 targ_handle,
- A_UINT32 targ_reply_fn,
- A_UINT32 targ_reply_arg);
-void ar6000_dset_close(void *devt, A_UINT32 access_cookie);
-void ar6000_dset_data_req(void *devt,
- A_UINT32 access_cookie,
- A_UINT32 offset,
- A_UINT32 length,
- A_UINT32 targ_buf,
- A_UINT32 targ_reply_fn,
- A_UINT32 targ_reply_arg);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
View
993 drivers/ar6000/ar6000/athdrv_linux.h
@@ -1,993 +0,0 @@
-/*
- * Copyright (c) 2004-2006 Atheros Communications Inc.
- * All rights reserved.
- *
- *
- *
- * 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.
- *
- *
- *
- */
-
-#ifndef _ATHDRV_LINUX_H
-#define _ATHDRV_LINUX_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*
- * There are two types of ioctl's here: Standard ioctls and
- * eXtended ioctls. All extended ioctls (XIOCTL) are multiplexed
- * off of the single ioctl command, AR6000_IOCTL_EXTENDED. The
- * arguments for every XIOCTL starts with a 32-bit command word
- * that is used to select which extended ioctl is in use. After
- * the command word are command-specific arguments.
- */
-
-/* Linux standard Wireless Extensions, private ioctl interfaces */
-#define IEEE80211_IOCTL_SETPARAM (SIOCIWFIRSTPRIV+0)
-#define IEEE80211_IOCTL_GETPARAM (SIOCIWFIRSTPRIV+1)
-#define IEEE80211_IOCTL_SETKEY (SIOCIWFIRSTPRIV+2)
-#define IEEE80211_IOCTL_SETWMMPARAMS (SIOCIWFIRSTPRIV+3)
-#define IEEE80211_IOCTL_DELKEY (SIOCIWFIRSTPRIV+4)
-#define IEEE80211_IOCTL_GETWMMPARAMS (SIOCIWFIRSTPRIV+5)
-#define IEEE80211_IOCTL_SETOPTIE (SIOCIWFIRSTPRIV+6)
-#define IEEE80211_IOCTL_SETMLME (SIOCIWFIRSTPRIV+7)
-//#define IEEE80211_IOCTL_GETOPTIE (SIOCIWFIRSTPRIV+7)
-#define IEEE80211_IOCTL_ADDPMKID (SIOCIWFIRSTPRIV+8)
-//#define IEEE80211_IOCTL_SETAUTHALG (SIOCIWFIRSTPRIV+10)
-#define IEEE80211_IOCTL_LASTONE (SIOCIWFIRSTPRIV+9)
-
-
-
-/* ====WMI Ioctls==== */
-/*
- *
- * Many ioctls simply provide WMI services to application code:
- * an application makes such an ioctl call with a set of arguments
- * that are packaged into the corresponding WMI message, and sent
- * to the Target.
- */
-
-#define AR6000_IOCTL_WMI_GETREV (SIOCIWFIRSTPRIV+10)
-/*
- * arguments:
- * ar6000_version *revision
- */
-
-#define AR6000_IOCTL_WMI_SETPWR (SIOCIWFIRSTPRIV+11)
-/*
- * arguments:
- * WMI_POWER_MODE_CMD pwrModeCmd (see include/wmi.h)
- * uses: WMI_SET_POWER_MODE_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SETSCAN (SIOCIWFIRSTPRIV+12)
-/*
- * arguments:
- * WMI_SCAN_PARAMS_CMD scanParams (see include/wmi.h)
- * uses: WMI_SET_SCAN_PARAMS_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SETLISTENINT (SIOCIWFIRSTPRIV+13)
-/*
- * arguments:
- * UINT32 listenInterval
- * uses: WMI_SET_LISTEN_INT_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SETBSSFILTER (SIOCIWFIRSTPRIV+14)
-/*
- * arguments:
- * WMI_BSS_FILTER filter (see include/wmi.h)
- * uses: WMI_SET_BSS_FILTER_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SET_CHANNELPARAMS (SIOCIWFIRSTPRIV+16)
-/*
- * arguments:
- * WMI_CHANNEL_PARAMS_CMD chParams
- * uses: WMI_SET_CHANNEL_PARAMS_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SET_PROBEDSSID (SIOCIWFIRSTPRIV+17)
-/*
- * arguments:
- * WMI_PROBED_SSID_CMD probedSsids (see include/wmi.h)
- * uses: WMI_SETPROBED_SSID_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SET_PMPARAMS (SIOCIWFIRSTPRIV+18)
-/*
- * arguments:
- * WMI_POWER_PARAMS_CMD powerParams (see include/wmi.h)
- * uses: WMI_SET_POWER_PARAMS_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SET_BADAP (SIOCIWFIRSTPRIV+19)
-/*
- * arguments:
- * WMI_ADD_BAD_AP_CMD badAPs (see include/wmi.h)
- * uses: WMI_ADD_BAD_AP_CMDID
- */
-
-#define AR6000_IOCTL_WMI_GET_QOS_QUEUE (SIOCIWFIRSTPRIV+20)
-/*
- * arguments:
- * ar6000_queuereq queueRequest (see below)
- */
-
-#define AR6000_IOCTL_WMI_CREATE_QOS (SIOCIWFIRSTPRIV+21)
-/*
- * arguments:
- * WMI_CREATE_PSTREAM createPstreamCmd (see include/wmi.h)
- * uses: WMI_CREATE_PSTREAM_CMDID
- */
-
-#define AR6000_IOCTL_WMI_DELETE_QOS (SIOCIWFIRSTPRIV+22)
-/*
- * arguments:
- * WMI_DELETE_PSTREAM_CMD deletePstreamCmd (see include/wmi.h)
- * uses: WMI_DELETE_PSTREAM_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SET_SNRTHRESHOLD (SIOCIWFIRSTPRIV+23)
-/*
- * arguments:
- * WMI_SNR_THRESHOLD_PARAMS_CMD thresholdParams (see include/wmi.h)
- * uses: WMI_SNR_THRESHOLD_PARAMS_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SET_ERROR_REPORT_BITMASK (SIOCIWFIRSTPRIV+24)
-/*
- * arguments:
- * WMI_TARGET_ERROR_REPORT_BITMASK errorReportBitMask (see include/wmi.h)
- * uses: WMI_TARGET_ERROR_REPORT_BITMASK_CMDID
- */
-
-#define AR6000_IOCTL_WMI_GET_TARGET_STATS (SIOCIWFIRSTPRIV+25)
-/*
- * arguments:
- * TARGET_STATS *targetStats (see below)
- * uses: WMI_GET_STATISTICS_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SET_ASSOC_INFO (SIOCIWFIRSTPRIV+26)
-/*
- * arguments:
- * WMI_SET_ASSOC_INFO_CMD setAssocInfoCmd
- * uses: WMI_SET_ASSOC_INFO_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SET_ACCESS_PARAMS (SIOCIWFIRSTPRIV+27)
-/*
- * arguments:
- * WMI_SET_ACCESS_PARAMS_CMD setAccessParams (see include/wmi.h)
- * uses: WMI_SET_ACCESS_PARAMS_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SET_BMISS_TIME (SIOCIWFIRSTPRIV+28)
-/*
- * arguments:
- * UINT32 beaconMissTime
- * uses: WMI_SET_BMISS_TIME_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SET_DISC_TIMEOUT (SIOCIWFIRSTPRIV+29)
-/*
- * arguments:
- * WMI_DISC_TIMEOUT_CMD disconnectTimeoutCmd (see include/wmi.h)
- * uses: WMI_SET_DISC_TIMEOUT_CMDID
- */
-
-#define AR6000_IOCTL_WMI_SET_IBSS_PM_CAPS (SIOCIWFIRSTPRIV+30)
-/*
- * arguments:
- * WMI_IBSS_PM_CAPS_CMD ibssPowerMgmtCapsCmd
- * uses: WMI_SET_IBSS_PM_CAPS_CMDID
- */
-
-/*
- * There is a very small space available for driver-private
- * wireless ioctls. In order to circumvent this limitation,
- * we multiplex a bunch of ioctls (XIOCTLs) on top of a
- * single AR6000_IOCTL_EXTENDED ioctl.
- */
-#define AR6000_IOCTL_EXTENDED (SIOCIWFIRSTPRIV+31)
-
-
-/* ====BMI Extended Ioctls==== */
-
-#define AR6000_XIOCTL_BMI_DONE 1
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_BMI_DONE)
- * uses: BMI_DONE
- */
-
-#define AR6000_XIOCTL_BMI_READ_MEMORY 2
-/*
- * arguments:
- * union {
- * struct {
- * UINT32 cmd (AR6000_XIOCTL_BMI_READ_MEMORY)
- * UINT32 address
- * UINT32 length
- * }
- * char results[length]
- * }
- * uses: BMI_READ_MEMORY
- */
-
-#define AR6000_XIOCTL_BMI_WRITE_MEMORY 3
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_BMI_WRITE_MEMORY)
- * UINT32 address
- * UINT32 length
- * char data[length]
- * uses: BMI_WRITE_MEMORY
- */
-
-#define AR6000_XIOCTL_BMI_EXECUTE 4
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_BMI_EXECUTE)
- * UINT32 TargetAddress
- * UINT32 parameter
- * uses: BMI_EXECUTE
- */
-
-#define AR6000_XIOCTL_BMI_SET_APP_START 5
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_BMI_SET_APP_START)
- * UINT32 TargetAddress
- * uses: BMI_SET_APP_START
- */
-
-#define AR6000_XIOCTL_BMI_READ_SOC_REGISTER 6
-/*
- * arguments:
- * union {
- * struct {
- * UINT32 cmd (AR6000_XIOCTL_BMI_READ_SOC_REGISTER)
- * UINT32 TargetAddress, 32-bit aligned
- * }
- * UINT32 result
- * }
- * uses: BMI_READ_SOC_REGISTER
- */
-
-#define AR6000_XIOCTL_BMI_WRITE_SOC_REGISTER 7
-/*
- * arguments:
- * struct {
- * UINT32 cmd (AR6000_XIOCTL_BMI_WRITE_SOC_REGISTER)
- * UINT32 TargetAddress, 32-bit aligned
- * UINT32 newValue
- * }
- * uses: BMI_WRITE_SOC_REGISTER
- */
-
-#define AR6000_XIOCTL_BMI_TEST 8
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_BMI_TEST)
- * UINT32 address
- * UINT32 length
- * UINT32 count
- */
-
-
-
-/* Historical Host-side DataSet support */
-#define AR6000_XIOCTL_UNUSED9 9
-#define AR6000_XIOCTL_UNUSED10 10
-#define AR6000_XIOCTL_UNUSED11 11
-
-/* ====Misc Extended Ioctls==== */
-
-#define AR6000_XIOCTL_FORCE_TARGET_RESET 12
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_FORCE_TARGET_RESET)
- */
-
-
-#ifdef HTC_RAW_INTERFACE
-/* HTC Raw Interface Ioctls */
-#define AR6000_XIOCTL_HTC_RAW_OPEN 13
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_HTC_RAW_OPEN)
- */
-
-#define AR6000_XIOCTL_HTC_RAW_CLOSE 14
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_HTC_RAW_CLOSE)
- */
-
-#define AR6000_XIOCTL_HTC_RAW_READ 15
-/*
- * arguments:
- * union {
- * struct {
- * UINT32 cmd (AR6000_XIOCTL_HTC_RAW_READ)
- * UINT32 mailboxID
- * UINT32 length
- * }
- * results[length]
- * }
- */
-
-#define AR6000_XIOCTL_HTC_RAW_WRITE 16
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_HTC_RAW_WRITE)
- * UINT32 mailboxID
- * UINT32 length
- * char buffer[length]
- */
-#endif /* HTC_RAW_INTERFACE */
-
-#define AR6000_XIOCTL_CHECK_TARGET_READY 17
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_CHECK_TARGET_READY)
- */
-
-
-
-/* ====GPIO (General Purpose I/O) Extended Ioctls==== */
-
-#define AR6000_XIOCTL_GPIO_OUTPUT_SET 18
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_GPIO_OUTPUT_SET)
- * ar6000_gpio_output_set_cmd_s (see below)
- * uses: WMIX_GPIO_OUTPUT_SET_CMDID
- */
-
-#define AR6000_XIOCTL_GPIO_INPUT_GET 19
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_GPIO_INPUT_GET)
- * uses: WMIX_GPIO_INPUT_GET_CMDID
- */
-
-#define AR6000_XIOCTL_GPIO_REGISTER_SET 20
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_GPIO_REGISTER_SET)
- * ar6000_gpio_register_cmd_s (see below)
- * uses: WMIX_GPIO_REGISTER_SET_CMDID
- */
-
-#define AR6000_XIOCTL_GPIO_REGISTER_GET 21
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_GPIO_REGISTER_GET)
- * ar6000_gpio_register_cmd_s (see below)
- * uses: WMIX_GPIO_REGISTER_GET_CMDID
- */
-
-#define AR6000_XIOCTL_GPIO_INTR_ACK 22
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_GPIO_INTR_ACK)
- * ar6000_cpio_intr_ack_cmd_s (see below)
- * uses: WMIX_GPIO_INTR_ACK_CMDID
- */
-
-#define AR6000_XIOCTL_GPIO_INTR_WAIT 23
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_GPIO_INTR_WAIT)
- */
-
-
-
-/* ====more wireless commands==== */
-
-#define AR6000_XIOCTL_SET_ADHOC_BSSID 24
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_SET_ADHOC_BSSID)
- * WMI_SET_ADHOC_BSSID_CMD setAdHocBssidCmd (see include/wmi.h)
- */
-
-#define AR6000_XIOCTL_SET_OPT_MODE 25
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_SET_OPT_MODE)
- * WMI_SET_OPT_MODE_CMD setOptModeCmd (see include/wmi.h)
- * uses: WMI_SET_OPT_MODE_CMDID
- */
-
-#define AR6000_XIOCTL_OPT_SEND_FRAME 26
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_OPT_SEND_FRAME)
- * WMI_OPT_TX_FRAME_CMD optTxFrameCmd (see include/wmi.h)
- * uses: WMI_OPT_TX_FRAME_CMDID
- */
-
-#define AR6000_XIOCTL_SET_ADHOC_BEACON_INTVAL 27
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_SET_ADHOC_BEACON_INTVAL)
- * WMI_BEACON_INT_CMD beaconIntCmd (see include/wmi.h)
- * uses: WMI_SET_BEACON_INT_CMDID
- */
-
-
-#define IEEE80211_IOCTL_SETAUTHALG 28
-
-
-#define AR6000_XIOCTL_SET_VOICE_PKT_SIZE 29
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_SET_VOICE_PKT_SIZE)
- * WMI_SET_VOICE_PKT_SIZE_CMD setVoicePktSizeCmd (see include/wmi.h)
- * uses: WMI_SET_VOICE_PKT_SIZE_CMDID
- */
-
-
-#define AR6000_XIOCTL_SET_MAX_SP 30
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_SET_MAX_SP)
- * WMI_SET_MAX_SP_LEN_CMD maxSPLen(see include/wmi.h)
- * uses: WMI_SET_MAX_SP_LEN_CMDID
- */
-
-#define AR6000_XIOCTL_WMI_GET_ROAM_TBL 31
-
-#define AR6000_XIOCTL_WMI_SET_ROAM_CTRL 32
-
-#define AR6000_XIOCTRL_WMI_SET_POWERSAVE_TIMERS 33
-
-
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTRL_WMI_SET_POWERSAVE_TIMERS)
- * WMI_SET_POWERSAVE_TIMERS_CMD powerSaveTimers(see include/wmi.h)
- * WMI_SET_POWERSAVE_TIMERS_CMDID
- */
-
-#define AR6000_XIOCTRL_WMI_GET_POWER_MODE 34
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTRL_WMI_GET_POWER_MODE)
- */
-
-#define AR6000_XIOCTRL_WMI_SET_WLAN_STATE 35
-typedef enum {
- WLAN_DISABLED,
- WLAN_ENABLED
-} AR6000_WLAN_STATE;
-/*
- * arguments:
- * enable/disable
- */
-
-#define AR6000_XIOCTL_WMI_GET_ROAM_DATA 36
-
-#define AR6000_XIOCTL_WMI_SETRETRYLIMITS 37
-/*
- * arguments:
- * WMI_SET_RETRY_LIMITS_CMD ibssSetRetryLimitsCmd
- * uses: WMI_SET_RETRY_LIMITS_CMDID
- */
-
-#ifdef CONFIG_HOST_TCMD_SUPPORT
-/* ====extended commands for radio test ==== */
-
-#define AR6000_XIOCTL_TCMD_CONT_TX 38
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_TCMD_CONT_TX)
- * WMI_TCMD_CONT_TX_CMD contTxCmd (see include/wmi.h)
- * uses: WMI_TCMD_CONT_TX_CMDID
- */
-
-#define AR6000_XIOCTL_TCMD_CONT_RX 39
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_TCMD_CONT_RX)
- * WMI_TCMD_CONT_RX_CMD rxCmd (see include/wmi.h)
- * uses: WMI_TCMD_CONT_RX_CMDID
- */
-
-#define AR6000_XIOCTL_TCMD_PM 40
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_TCMD_PM)
- * WMI_TCMD_PM_CMD pmCmd (see include/wmi.h)
- * uses: WMI_TCMD_PM_CMDID
- */
-
-#endif /* CONFIG_HOST_TCMD_SUPPORT */
-
-#define AR6000_XIOCTL_WMI_STARTSCAN 41
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_WMI_STARTSCAN)
- * UINT8 scanType
- * UINT8 scanConnected
- * A_BOOL forceFgScan
- * uses: WMI_START_SCAN_CMDID
- */
-
-#define AR6000_XIOCTL_WMI_SETFIXRATES 42
-
-#define AR6000_XIOCTL_WMI_GETFIXRATES 43
-
-
-#define AR6000_XIOCTL_WMI_SET_RSSITHRESHOLD 44
-/*
- * arguments:
- * WMI_RSSI_THRESHOLD_PARAMS_CMD thresholdParams (see include/wmi.h)
- * uses: WMI_RSSI_THRESHOLD_PARAMS_CMDID
- */
-
-#define AR6000_XIOCTL_WMI_CLR_RSSISNR 45
-/*
- * arguments:
- * WMI_CLR_RSSISNR_CMD thresholdParams (see include/wmi.h)
- * uses: WMI_CLR_RSSISNR_CMDID
- */
-
-#define AR6000_XIOCTL_WMI_SET_LQTHRESHOLD 46
-/*
- * arguments:
- * WMI_LQ_THRESHOLD_PARAMS_CMD thresholdParams (see include/wmi.h)
- * uses: WMI_LQ_THRESHOLD_PARAMS_CMDID
- */
-
-#define AR6000_XIOCTL_WMI_SET_RTS 47
-/*
- * arguments:
- * WMI_SET_RTS_MODE_CMD (see include/wmi.h)
- * uses: WMI_SET_RTS_MODE_CMDID
- */
-
-#define AR6000_XIOCTL_WMI_SET_LPREAMBLE 48
-
-#define AR6000_XIOCTL_WMI_SET_AUTHMODE 49
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_WMI_SET_AUTHMODE)
- * UINT8 mode
- * uses: WMI_SET_RECONNECT_AUTH_MODE_CMDID
- */
-
-#define AR6000_XIOCTL_WMI_SET_REASSOCMODE 50
-
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_WMI_SET_WMM)
- * UINT8 mode
- * uses: WMI_SET_WMM_CMDID
- */
-#define AR6000_XIOCTL_WMI_SET_WMM 51
-
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_WMI_SET_HB_CHALLENGE_RESP_PARAMS)
- * UINT32 frequency
- * UINT8 threshold
- */
-#define AR6000_XIOCTL_WMI_SET_HB_CHALLENGE_RESP_PARAMS 52
-
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_WMI_GET_HB_CHALLENGE_RESP)
- * UINT32 cookie
- */
-#define AR6000_XIOCTL_WMI_GET_HB_CHALLENGE_RESP 53
-
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_WMI_GET_RD)
- * UINT32 regDomain
- */
-#define AR6000_XIOCTL_WMI_GET_RD 54
-
-#define AR6000_XIOCTL_DIAG_READ 55
-
-#define AR6000_XIOCTL_DIAG_WRITE 56
-
-/*
- * arguments cmd (AR6000_XIOCTL_SET_TXOP)
- * WMI_TXOP_CFG txopEnable
- */
-#define AR6000_XIOCTL_WMI_SET_TXOP 57
-
-#ifdef USER_KEYS
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_USER_SETKEYS)
- * UINT32 keyOpCtrl
- * uses AR6000_USER_SETKEYS_INFO
- */
-#define AR6000_XIOCTL_USER_SETKEYS 58
-#endif /* USER_KEYS */
-
-#define AR6000_XIOCTL_WMI_SET_KEEPALIVE 59
-/*
- * arguments:
- * UINT8 cmd (AR6000_XIOCTL_WMI_SET_KEEPALIVE)
- * UINT8 keepaliveInterval
- * uses: WMI_SET_KEEPALIVE_CMDID
- */
-
-#define AR6000_XIOCTL_WMI_GET_KEEPALIVE 60
-/*
- * arguments:
- * UINT8 cmd (AR6000_XIOCTL_WMI_GET_KEEPALIVE)
- * UINT8 keepaliveInterval
- * A_BOOL configured
- * uses: WMI_GET_KEEPALIVE_CMDID
- */
-
-/* ====ROM Patching Extended Ioctls==== */
-
-#define AR6000_XIOCTL_BMI_ROMPATCH_INSTALL 61
-/*
- * arguments:
- * union {
- * struct {
- * UINT32 cmd (AR6000_XIOCTL_BMI_ROMPATCH_INSTALL)
- * UINT32 ROM Address
- * UINT32 RAM Address
- * UINT32 number of bytes
- * UINT32 activate? (0 or 1)
- * }
- * A_UINT32 resulting rompatch ID
- * }
- * uses: BMI_ROMPATCH_INSTALL
- */
-
-#define AR6000_XIOCTL_BMI_ROMPATCH_UNINSTALL 62
-/*
- * arguments:
- * struct {
- * UINT32 cmd (AR6000_XIOCTL_BMI_ROMPATCH_UNINSTALL)
- * UINT32 rompatch ID
- * }
- * uses: BMI_ROMPATCH_UNINSTALL
- */
-
-#define AR6000_XIOCTL_BMI_ROMPATCH_ACTIVATE 63
-/*
- * arguments:
- * struct {
- * UINT32 cmd (AR6000_XIOCTL_BMI_ROMPATCH_ACTIVATE)
- * UINT32 rompatch count
- * UINT32 rompatch IDs[rompatch count]
- * }
- * uses: BMI_ROMPATCH_ACTIVATE
- */
-
-#define AR6000_XIOCTL_BMI_ROMPATCH_DEACTIVATE 64
-/*
- * arguments:
- * struct {
- * UINT32 cmd (AR6000_XIOCTL_BMI_ROMPATCH_DEACTIVATE)
- * UINT32 rompatch count
- * UINT32 rompatch IDs[rompatch count]
- * }
- * uses: BMI_ROMPATCH_DEACTIVATE
- */
-
-#define AR6000_XIOCTL_WMI_SET_APPIE 65
-/*
- * arguments:
- * struct {
- * UINT32 cmd (AR6000_XIOCTL_WMI_SET_APPIE)
- * UINT32 app_frmtype;
- * UINT32 app_buflen;
- * UINT8 app_buf[];
- * }
- */
-#define AR6000_XIOCTL_WMI_SET_MGMT_FRM_RX_FILTER 66
-/*
- * arguments:
- * A_UINT32 filter_type;
- */
-
-#define AR6000_XIOCTL_DBGLOG_CFG_MODULE 67
-
-#define AR6000_XIOCTL_DBGLOG_GET_DEBUG_LOGS 68
-
-#define AR6000_XIOCTL_WMI_SET_WSC_STATUS 70
-/*
- * arguments:
- * A_UINT32 wsc_status;
- * (WSC_REG_INACTIVE or WSC_REG_ACTIVE)
- */
-
-/*
- * arguments:
- * struct {
- * A_UINT8 streamType;
- * A_UINT8 status;
- * }
- * uses: WMI_SET_BT_STATUS_CMDID
- */
-#define AR6000_XIOCTL_WMI_SET_BT_STATUS 71
-
-/*
- * arguments:
- * struct {
- * A_UINT8 paramType;
- * union {
- * A_UINT8 noSCOPkts;
- * BT_PARAMS_A2DP a2dpParams;
- * BT_COEX_REGS regs;
- * };
- * }
- * uses: WMI_SET_BT_PARAM_CMDID
- */
-#define AR6000_XIOCTL_WMI_SET_BT_PARAMS 72
-
-#define AR6000_XIOCTL_WMI_SET_HOST_SLEEP_MODE 73
-#define AR6000_XIOCTL_WMI_SET_WOW_MODE 74
-#define AR6000_XIOCTL_WMI_GET_WOW_LIST 75
-#define AR6000_XIOCTL_WMI_ADD_WOW_PATTERN 76
-#define AR6000_XIOCTL_WMI_DEL_WOW_PATTERN 77
-
-
-
-#define AR6000_XIOCTL_TARGET_INFO 78
-/*
- * arguments:
- * UINT32 cmd (AR6000_XIOCTL_TARGET_INFO)
- * A_UINT32 TargetVersion (returned)
- * A_UINT32 TargetType (returned)
- * (See also bmi_msg.h target_ver and target_type)
- */
-
-#define AR6000_XIOCTL_DUMP_HTC_CREDIT_STATE 79
-/*
- * arguments:
- * none
- */
-
-#define AR6000_XIOCTL_TRAFFIC_ACTIVITY_CHANGE 80
-/*
- * This ioctl is used to emulate traffic activity
- * timeouts. Activity/inactivity will trigger the driver
- * to re-balance credits.
- *
- * arguments:
- * ar6000_traffic_activity_change
- */
-
-#define AR6000_XIOCTL_WMI_SET_CONNECT_CTRL_FLAGS 81
-/*
- * This ioctl is used to set the connect control flags
- *
- * arguments:
- * A_UINT32 connectCtrlFlags
- */
-
-#define AR6000_XIOCTL_WMI_SET_AKMP_PARAMS 82
-/*
- * This IOCTL sets any Authentication,Key Management and Protection
- * related parameters. This is used along with the information set in
- * Connect Command.
- * Currently this enables Multiple PMKIDs to an AP.
- *
- * arguments:
- * struct {
- * A_UINT32 akmpInfo;
- * }
- * uses: WMI_SET_AKMP_PARAMS_CMD
- */
-
-#define AR6000_XIOCTL_WMI_GET_PMKID_LIST 83
-
-#define AR6000_XIOCTL_WMI_SET_PMKID_LIST 84
-/*
- * This IOCTL is used to set a list of PMKIDs. This list of
- * PMKIDs is used in the [Re]AssocReq Frame. This list is used
- * only if the MultiPMKID option is enabled via the
- * AR6000_XIOCTL_WMI_SET_AKMP_PARAMS IOCTL.
- *
- * arguments:
- * struct {
- * A_UINT32 numPMKID;
- * WMI_PMKID pmkidList[WMI_MAX_PMKID_CACHE];
- * }
- * uses: WMI_SET_PMKIDLIST_CMD
- */
-
-/* Historical DSETPATCH support for INI patches */
-#define AR6000_XIOCTL_UNUSED90 90
-
-
-
-/* used by AR6000_IOCTL_WMI_GETREV */
-struct ar6000_version {
- A_UINT32 host_ver;
- A_UINT32 target_ver;
-};
-
-/* used by AR6000_IOCTL_WMI_GET_QOS_QUEUE */
-struct ar6000_queuereq {
- A_UINT8 trafficClass;
- A_UINT16 activeTsids;
-};
-
-/* used by AR6000_IOCTL_WMI_GET_TARGET_STATS */
-typedef struct targetStats_t {
- A_UINT64 tx_packets;
- A_UINT64 tx_bytes;
- A_UINT64 tx_unicast_pkts;
- A_UINT64 tx_unicast_bytes;
- A_UINT64 tx_multicast_pkts;
- A_UINT64 tx_multicast_bytes;
- A_UINT64 tx_broadcast_pkts;
- A_UINT64 tx_broadcast_bytes;
- A_UINT64 tx_rts_success_cnt;
- A_UINT64 tx_packet_per_ac[4];
-
- A_UINT64 tx_errors;
- A_UINT64 tx_failed_cnt;
- A_UINT64 tx_retry_cnt;
- A_UINT64 tx_rts_fail_cnt;
- A_INT32 tx_unicast_rate;
- A_UINT64 rx_packets;
- A_UINT64 rx_bytes;
- A_UINT64 rx_unicast_pkts;
- A_UINT64 rx_unicast_bytes;
- A_UINT64 rx_multicast_pkts;
- A_UINT64 rx_multicast_bytes;
- A_UINT64 rx_broadcast_pkts;
- A_UINT64 rx_broadcast_bytes;
- A_UINT64 rx_fragment_pkt;
-
- A_UINT64 rx_errors;
- A_UINT64 rx_crcerr;
- A_UINT64 rx_key_cache_miss;
- A_UINT64 rx_decrypt_err;
- A_UINT64 rx_duplicate_frames;
- A_INT32 rx_unicast_rate;
-
- A_UINT64 tkip_local_mic_failure;
- A_UINT64 tkip_counter_measures_invoked;
- A_UINT64 tkip_replays;
- A_UINT64 tkip_format_errors;
- A_UINT64 ccmp_format_errors;
- A_UINT64 ccmp_replays;
-
- A_UINT64 power_save_failure_cnt;
- A_INT16 noise_floor_calibation;
-
- A_UINT64 cs_bmiss_cnt;
- A_UINT64 cs_lowRssi_cnt;
- A_UINT64 cs_connect_cnt;
- A_UINT64 cs_disconnect_cnt;
- A_UINT8 cs_aveBeacon_snr;
- A_INT16 cs_aveBeacon_rssi;
- A_UINT8 cs_lastRoam_msec;
- A_UINT8 cs_snr;
- A_INT16 cs_rssi;
-
- A_UINT32 lq_val;
-
- A_UINT32 wow_num_pkts_dropped;
- A_UINT8 wow_num_host_pkt_wakeups;
- A_UINT8 wow_num_host_event_wakeups;
- A_UINT16 wow_num_events_discarded;
-
-}TARGET_STATS;
-
-typedef struct targetStats_cmd_t {
- TARGET_STATS targetStats;
- int clearStats;
-} TARGET_STATS_CMD;
-
-/* used by AR6000_XIOCTL_USER_SETKEYS */
-
-/*
- * Setting this bit to 1 doesnot initialize the RSC on the firmware
- */
-#define AR6000_XIOCTL_USER_SETKEYS_RSC_CTRL 1
-#define AR6000_USER_SETKEYS_RSC_UNCHANGED 0x00000002
-
-typedef struct {
- A_UINT32 keyOpCtrl; /* Bit Map of Key Mgmt Ctrl Flags */
-} AR6000_USER_SETKEYS_INFO;
-
-
-/* used by AR6000_XIOCTL_GPIO_OUTPUT_SET */
-struct ar6000_gpio_output_set_cmd_s {
- A_UINT32 set_mask;
- A_UINT32 clear_mask;
- A_UINT32 enable_mask;
- A_UINT32 disable_mask;
-};
-
-/*
- * used by AR6000_XIOCTL_GPIO_REGISTER_GET and AR6000_XIOCTL_GPIO_REGISTER_SET
- */
-struct ar6000_gpio_register_cmd_s {
- A_UINT32 gpioreg_id;
- A_UINT32 value;
-};
-
-/* used by AR6000_XIOCTL_GPIO_INTR_ACK */
-struct ar6000_gpio_intr_ack_cmd_s {
- A_UINT32 ack_mask;
-};
-
-/* used by AR6000_XIOCTL_GPIO_INTR_WAIT */
-struct ar6000_gpio_intr_wait_cmd_s {
- A_UINT32 intr_mask;
- A_UINT32 input_values;
-};
-
-/* used by the AR6000_XIOCTL_DBGLOG_CFG_MODULE */
-typedef struct ar6000_dbglog_module_config_s {
- A_UINT32 valid;
- A_UINT16 mmask;
- A_UINT16 tsr;
- A_BOOL rep;
- A_UINT16 size;
-} DBGLOG_MODULE_CONFIG;
-
-typedef struct user_rssi_thold_t {
- A_INT16 tag;
- A_INT16 rssi;
-} USER_RSSI_THOLD;
-
-typedef struct user_rssi_params_t {
- A_UINT8 weight;
- A_UINT32 pollTime;
- USER_RSSI_THOLD tholds[12];
-} USER_RSSI_PARAMS;
-
-/*
- * Host driver may have some config parameters. Typically, these
- * config params are one time config parameters. These could
- * correspond to any of the underlying modules. Host driver exposes
- * an api for the underlying modules to get this config.
- */
-#define AR6000_DRIVER_CFG_BASE 0x8000
-
-/* Should driver perform wlan node caching? */
-#define AR6000_DRIVER_CFG_GET_WLANNODECACHING 0x8001
-/*Should we log raw WMI msgs */
-#define AR6000_DRIVER_CFG_LOG_RAW_WMI_MSGS 0x8002
-
-/* used by AR6000_XIOCTL_DIAG_READ & AR6000_XIOCTL_DIAG_WRITE */
-struct ar6000_diag_window_cmd_s {
- unsigned int addr;
- unsigned int value;
-};
-
-
-struct ar6000_traffic_activity_change {
- A_UINT32 StreamID; /* stream ID to indicate activity change */
- A_UINT32 Active; /* active (1) or inactive (0) */
-};
-
-#ifdef __cplusplus
-}
-#endif
-#endif
View
47 drivers/ar6000/ar6000/athtypes_linux.h
@@ -1,47 +0,0 @@
-/*
- * $Id: //depot/sw/releases/olca2.0-GPL/host/os/linux/include/athtypes_linux.h#1 $
- *
- * This file contains the definitions of the basic atheros data types.
- * It is used to map the data types in atheros files to a platform specific
- * type.
- *
- * Copyright 2003-2005 Atheros Communications, Inc., All Rights Reserved.
- *
- *
- * 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.
- *
- *
- *
- */
-
-#ifndef _ATHTYPES_LINUX_H_
-#define _ATHTYPES_LINUX_H_
-
-#ifdef __KERNEL__
-#include <linux/types.h>
-#endif
-
-typedef int8_t A_INT8;
-typedef int16_t A_INT16;
-typedef int32_t A_INT32;
-typedef int64_t A_INT64;
-
-typedef u_int8_t A_UINT8;
-typedef u_int16_t A_UINT16;
-typedef u_int32_t A_UINT32;
-typedef u_int64_t A_UINT64;
-
-typedef int A_BOOL;
-typedef char A_CHAR;
-typedef unsigned char A_UCHAR;
-typedef unsigned long A_ATH_TIMER;
-
-
-#endif /* _ATHTYPES_LINUX_H_ */
View
44 drivers/ar6000/ar6000/config_linux.h
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Atheros Communications Inc.
- * All rights reserved.
- *
- *
- * 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.
- *
- *
- *
- */
-
-#ifndef _CONFIG_LINUX_H_
-#define _CONFIG_LINUX_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Host-side GPIO support is optional.
- * If run-time access to GPIO pins is not required, then
- * this should be changed to #undef.
- */
-#define CONFIG_HOST_GPIO_SUPPORT
-
-/*
- * Host side Test Command support
- */
-#define CONFIG_HOST_TCMD_SUPPORT
-
-#define USE_4BYTE_REGISTER_ACCESS
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
View
86 drivers/ar6000/ar6000/debug_linux.h
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2004-2006 Atheros Communications Inc.
- * All rights reserved.
- *
- *
- * 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.
- *
- *
- *
- */
-
-#ifndef _DEBUG_LINUX_H_
-#define _DEBUG_LINUX_H_
-
-#define DBG_DEFAULTS (DBG_ERROR|DBG_WARNING)
-
-extern A_UINT32 g_dbg_flags;
-
-#define DBGFMT "%s() : "
-#define DBGARG __func__
-#define DBGFN A_PRINTF
-
-/* ------- Debug related stuff ------- */
-enum {
- ATH_DEBUG_SEND = 0x0001,
- ATH_DEBUG_RECV = 0x0002,
- ATH_DEBUG_SYNC = 0x0004,
- ATH_DEBUG_DUMP = 0x0008,
- ATH_DEBUG_IRQ = 0x0010,
- ATH_DEBUG_TRC = 0x0020,
- ATH_DEBUG_WARN = 0x0040,
- ATH_DEBUG_ERR = 0x0080,
- ATH_LOG_INF = 0x0100,
- ATH_DEBUG_BMI = 0x0110,
- ATH_DEBUG_WMI = 0x0120,
- ATH_DEBUG_HIF = 0x0140,
- ATH_DEBUG_HTC = 0x0180,
- ATH_DEBUG_WLAN = 0x1000,
- ATH_LOG_ERR = 0x1010,
- ATH_DEBUG_ANY = 0xFFFF,
-};
-
-#ifdef DEBUG
-
-#define A_DPRINTF(f, a) \
- if(g_dbg_flags & (f)) \
- { \
- DBGFN a ; \
- }
-
-
-// TODO FIX usage of A_PRINTF!
-#define AR_DEBUG_LVL_CHECK(lvl) (debughtc & (lvl))
-#define AR_DEBUG_PRINTBUF(buffer, length, desc) do { \
- if (debughtc & ATH_DEBUG_DUMP) { \
- DebugDumpBytes(buffer, length,desc); \
- } \
-} while(0)
-#define PRINTX_ARG(arg...) arg
-#define AR_DEBUG_PRINTF(flags, args) do { \
- if (debughtc & (flags)) { \
- A_PRINTF(KERN_ALERT PRINTX_ARG args); \
- } \
-} while (0)
-#define AR_DEBUG_ASSERT(test) do { \
- if (!(test)) { \
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Debug Assert Caught, File %s, Line: %d, Test:%s \n",__FILE__, __LINE__,#test)); \
- } \
-} while(0)
-extern int debughtc;
-#else
-#define AR_DEBUG_PRINTF(flags, args)
-#define AR_DEBUG_PRINTBUF(buffer, length, desc)
-#define AR_DEBUG_ASSERT(test)
-#define AR_DEBUG_LVL_CHECK(lvl) 0
-#define A_DPRINTF(f, a)
-#endif
-
-#endif /* _DEBUG_LINUX_H_ */
View
2,540 drivers/ar6000/ar6000/ioctl.c
@@ -1,2540 +0,0 @@
-/*
- *
- * Copyright (c) 2004-2007 Atheros Communications Inc.
- * All rights reserved.
- *
- *
- * 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.
- *
- *
- *
- */
-
-#include "ar6000_drv.h"
-
-static A_UINT8 bcast_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-static A_UINT8 null_mac[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
-extern USER_RSSI_THOLD rssi_map[12];
-extern unsigned int wmitimeout;
-extern A_WAITQUEUE_HEAD arEvent;
-extern int tspecCompliance;
-extern int bmienable;
-extern int bypasswmi;
-
-static int
-ar6000_ioctl_get_roam_tbl(struct net_device *dev, struct ifreq *rq)
-{
- AR_SOFTC_T *ar = (AR_SOFTC_T *)netdev_priv(dev);
-
- if (ar->arWmiReady == FALSE) {
- return -EIO;
- }
-
- if(wmi_get_roam_tbl_cmd(ar->arWmi) != A_OK) {
- return -EIO;
- }
-
- return 0;
-}
-
-static int
-ar6000_ioctl_get_roam_data(struct net_device *dev, struct ifreq *rq)
-{
- AR_SOFTC_T *ar = (AR_SOFTC_T *)netdev_priv(dev);
-
- if (ar->arWmiReady == FALSE) {
- return -EIO;
- }
-
-
- /* currently assume only roam times are required */
- if(wmi_get_roam_data_cmd(ar->arWmi, ROAM_DATA_TIME) != A_OK) {
- return -EIO;
- }
-
-
- return 0;
-}
-
-static int
-ar6000_ioctl_set_roam_ctrl(struct net_device *dev, char *userdata)
-{
- AR_SOFTC_T *ar = (AR_SOFTC_T *)netdev_priv(dev);
- WMI_SET_ROAM_CTRL_CMD cmd;
- A_UINT8 size = sizeof(cmd);
-
- if (ar->arWmiReady == FALSE) {
- return -EIO;
- }
-
-
- if (copy_from_user(&cmd, userdata, size)) {
- return -EFAULT;
- }
-
- if (cmd.roamCtrlType == WMI_SET_HOST_BIAS) {
- if (cmd.info.bssBiasInfo.numBss > 1) {
- size += (cmd.info.bssBiasInfo.numBss - 1) * sizeof(WMI_BSS_BIAS);
- }
- }
-
- if (copy_from_user(&cmd, userdata, size)) {
- return -EFAULT;
- }
-
- if(wmi_set_roam_ctrl_cmd(ar->arWmi, &cmd, size) != A_OK) {
- return -EIO;
- }
-
- return 0;
-}
-
-static int
-ar6000_ioctl_set_powersave_timers(struct net_device *dev, char *userdata)
-{
- AR_SOFTC_T *ar = (AR_SOFTC_T *)netdev_priv(dev);
- WMI_POWERSAVE_TIMERS_POLICY_CMD cmd;
- A_UINT8 size = sizeof(cmd);
-
- if (ar->arWmiReady == FALSE) {
- return -EIO;
- }
-
- if (copy_from_user(&cmd, userdata, size)) {
- return -EFAULT;
- }
-
- if (copy_from_user(&cmd, userdata, size)) {
- return -EFAULT;
- }
-
- if(wmi_set_powersave_timers_cmd(ar->arWmi, &cmd, size) != A_OK) {
- return -EIO;
- }
-
- return 0;
-}
-
-static int
-ar6000_ioctl_set_wmm(struct net_device *dev, struct ifreq *rq)
-{
- AR_SOFTC_T *ar = (AR_SOFTC_T *)netdev_priv(dev);
- WMI_SET_WMM_CMD cmd;
- A_STATUS ret;
-
- if ((dev->flags & IFF_UP) != IFF_UP) {
- return -EIO;
- }
- if (ar->arWmiReady == FALSE) {
- return -EIO;
- }
-
- if (copy_from_user(&cmd, (char *)((unsigned int*)rq->ifr_data + 1),
- sizeof(cmd)))
- {
- return -EFAULT;
- }
-
- if (cmd.status == WMI_WMM_ENABLED) {
- ar->arWmmEnabled = TRUE;
- } else {
- ar->arWmmEnabled = FALSE;
- }
-
- ret = wmi_set_wmm_cmd(ar->arWmi, cmd.status);
-
- switch (ret) {
- case A_OK:
- return 0;
- case A_EBUSY :
- return -EBUSY;
- case A_NO_MEMORY:
- return -ENOMEM;
- case A_EINVAL:
- default:
- return -EFAULT;
- }
-}
-
-static int
-ar6000_ioctl_set_txop(struct net_device *dev, struct ifreq *rq)
-{
- AR_SOFTC_T *ar = (AR_SOFTC_T *)netdev_priv(dev);
- WMI_SET_WMM_TXOP_CMD cmd;
- A_STATUS ret;
-
- if ((dev->flags & IFF_UP) != IFF_UP) {
- return -EIO;
- }
- if (ar->arWmiReady == FALSE) {
- return -EIO;
- }
-
- if (copy_from_user(&cmd, (char *)((unsigned int*)rq->ifr_data + 1),
- sizeof(cmd)))
- {
- return -EFAULT;
- }
-
- ret = wmi_set_wmm_txop(ar->arWmi, cmd.txopEnable);
-
- switch (ret) {
- case A_OK:
- return 0;
- case A_EBUSY :
- return -EBUSY;
- case A_NO_MEMORY:
- return -ENOMEM;
- case A_EINVAL:
- default:
- return -EFAULT;
- }
-}
-
-static int
-ar6000_ioctl_get_rd(struct net_device *dev, struct ifreq *rq)
-{
- AR_SOFTC_T *ar = (AR_SOFTC_T *)netdev_priv(dev);
- A_STATUS ret = 0;
-
- if ((dev->flags & IFF_UP) != IFF_UP || ar->arWmiReady == FALSE) {
- return -EIO;
- }
-
- if(copy_to_user((char *)((unsigned int*)rq->ifr_data + 1),
- &ar->arRegCode, sizeof(ar->arRegCode)))
- ret = -EFAULT;
-
- return ret;
-}
-
-
-/* Get power mode command */
-static int
-ar6000_ioctl_get_power_mode(struct net_device *dev, struct ifreq *rq)
-{
- AR_SOFTC_T *ar = (AR_SOFTC_T *)netdev_priv(dev);
- WMI_POWER_MODE_CMD power_mode;
- int ret = 0;
-
- if (ar->arWmiReady == FALSE) {
- return -EIO;
- }
-
- power_mode.powerMode = wmi_get_power_mode_cmd(ar->arWmi);
- if (copy_to_user(rq->ifr_data, &power_mode, sizeof(WMI_POWER_MODE_CMD))) {
- ret = -EFAULT;
- }
-