Changes in 4.9.269 net: usb: ax88179_178a: initialize local variables before use iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_enqueue_hcmd() ALSA: usb-audio: Add MIDI quirk for Vox ToneLab EX USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet USB: Add reset-resume quirk for WD19's Realtek Hub platform/x86: thinkpad_acpi: Correct thermal sensor allocation s390/disassembler: increase ebpf disasm buffer size ACPI: custom_method: fix potential use-after-free issue ACPI: custom_method: fix a possible memory leak arm64: dts: mt8173: fix property typo of 'phys' in dsi node ecryptfs: fix kernel panic with null dev_name mmc: core: Do a power cycle when the CMD11 fails mmc: core: Set read only for SD cards with permanent write protect bit btrfs: fix metadata extent leak after failure to create subvolume fbdev: zero-fill colormap in fbcmap.c staging: wimax/i2400m: fix byte-order issue usb: gadget: uvc: add bInterval checking for HS mode usb: dwc3: gadget: Ignore EP queue requests during bus reset usb: xhci: Fix port minor revision PCI: PM: Do not read power state in pci_enable_device_flags() x86/build: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS) spi: dln2: Fix reference leak to master spi: omap-100k: Fix reference leak to master intel_th: Consistency and off-by-one fix phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove() btrfs: convert logic BUG_ON()'s in replace_path to ASSERT()'s scsi: target: pscsi: Fix warning in pscsi_complete_cmd() media: ite-cir: check for receive overflow extcon: arizona: Fix some issues when HPDET IRQ fires after the jack has been unplugged media: media/saa7164: fix saa7164_encoder_register() memory leak bugs media: gspca/sq905.c: fix uninitialized variable power: supply: Use IRQF_ONESHOT scsi: qla2xxx: Always check the return value of qla24xx_get_isp_stats() scsi: scsi_dh_alua: Remove check for ASC 24h in alua_rtpg() media: em28xx: fix memory leak clk: socfpga: arria10: Fix memory leak of socfpga_clk on error return power: supply: generic-adc-battery: fix possible use-after-free in gab_remove() power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove() media: adv7604: fix possible use-after-free in adv76xx_remove() media: i2c: adv7511-v4l2: fix possible use-after-free in adv7511_remove() media: i2c: adv7842: fix possible use-after-free in adv7842_remove() media: dvb-usb: fix memory leak in dvb_usb_adapter_init media: gscpa/stv06xx: fix memory leak drm/msm/mdp5: Configure PP_SYNC_HEIGHT to double the vtotal drm/amdgpu: fix NULL pointer dereference scsi: lpfc: Fix crash when a REG_RPI mailbox fails triggering a LOGO response scsi: libfc: Fix a format specifier ALSA: emu8000: Fix a use after free in snd_emu8000_create_mixer ALSA: sb: Fix two use after free in snd_sb_qsound_build arm64/vdso: Discard .note.gnu.property sections in vDSO openvswitch: fix stack OOB read while fragmenting IPv4 packets NFSv4: Don't discard segments marked for return in _pnfs_return_layout() jffs2: Fix kasan slab-out-of-bounds problem powerpc/eeh: Fix EEH handling for hugepages in ioremap space. powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h jffs2: check the validity of dstlen in jffs2_zlib_compress() Revert 337f13046ff0 ("futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op") ftrace: Handle commands when closing set_ftrace_filter file ext4: fix check to prevent false positive report of incorrect used inodes ext4: fix error code in ext4_commit_super media: dvbdev: Fix memory leak in dvb_media_device_free() usb: gadget: dummy_hcd: fix gpf in gadget_setup usb: gadget: Fix double free of device descriptor pointers usb: gadget/function/f_fs string table fix for multiple languages dm persistent data: packed struct should have an aligned() attribute too dm space map common: fix division bug in sm_ll_find_free_block() dm rq: fix double free of blk_mq_tag_set in dev remove after table load fails Bluetooth: verify AMP hci_chan before amp_destroy hsr: use netdev_err() instead of WARN_ONCE() bluetooth: eliminate the potential race condition when removing the HCI controller net/nfc: fix use-after-free llcp_sock_bind/connect FDDI: defxx: Bail out gracefully with unassigned PCI resource for CSR misc: lis3lv02d: Fix false-positive WARN on various HP models misc: vmw_vmci: explicitly initialize vmci_notify_bm_set_msg struct misc: vmw_vmci: explicitly initialize vmci_datagram payload tracing: Treat recording comm for idle task as a success tracing: Use strlcpy() instead of strcpy() in __trace_find_cmdline() tracing: Map all PIDs to command lines tracing: Restructure trace_clock_global() to never block md-cluster: fix use-after-free issue when removing rdev md: factor out a mddev_find_locked helper from mddev_find md: md_open returns -EBUSY when entering racing area ipw2x00: potential buffer overflow in libipw_wx_set_encodeext() cfg80211: scan: drop entry from hidden_list on overflow drm/radeon: fix copy of uninitialized variable back to userspace ALSA: hda/realtek: Re-order ALC882 Acer quirk table entries ALSA: hda/realtek: Re-order ALC882 Sony quirk table entries ALSA: hda/realtek: Re-order ALC269 Sony quirk table entries ALSA: hda/realtek: Re-order ALC269 Lenovo quirk table entries ALSA: hda/realtek: Remove redundant entry for ALC861 Haier/Uniwill devices usb: gadget: pch_udc: Revert d3cb25a12138 completely memory: gpmc: fix out of bounds read and dereference on gpmc_cs[] ARM: dts: exynos: correct PMIC interrupt trigger level on SMDK5250 ARM: dts: exynos: correct PMIC interrupt trigger level on Snow serial: stm32: fix incorrect characters on console usb: gadget: pch_udc: Replace cpu_to_le32() by lower_32_bits() usb: gadget: pch_udc: Check if driver is present before calling ->setup() usb: gadget: pch_udc: Check for DMA mapping error crypto: qat - don't release uninitialized resources crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init fotg210-udc: Fix DMA on EP0 for length > max packet size fotg210-udc: Fix EP0 IN requests bigger than two packets fotg210-udc: Remove a dubious condition leading to fotg210_done fotg210-udc: Mask GRP2 interrupts we don't handle fotg210-udc: Don't DMA more than the buffer can take fotg210-udc: Complete OUT requests on short packets mtd: require write permissions for locking and badblock ioctls bus: qcom: Put child node before return crypto: qat - fix error path in adf_isr_resource_alloc() mtd: rawnand: gpmi: Fix a double free in gpmi_nand_init staging: rtl8192u: Fix potential infinite loop staging: greybus: uart: fix unprivileged TIOCCSERIAL crypto: qat - Fix a double free in adf_create_ring usb: gadget: r8a66597: Add missing null check on return from platform_get_resource USB: cdc-acm: fix unprivileged TIOCCSERIAL tty: actually undefine superseded ASYNC flags tty: fix return value for unsupported ioctls firmware: qcom-scm: Fix QCOM_SCM configuration x86/platform/uv: Fix !KEXEC build failure Drivers: hv: vmbus: Increase wait time for VMbus unload ttyprintk: Add TTY hangup callback. media: vivid: fix assignment of dev->fbuf_out_flags media: omap4iss: return error code when omap4iss_get() failed media: m88rs6000t: avoid potential out-of-bounds reads on arrays pata_arasan_cf: fix IRQ check pata_ipx4xx_cf: fix IRQ check sata_mv: add IRQ checks ata: libahci_platform: fix IRQ check scsi: fcoe: Fix mismatched fcoe_wwn_from_mac declaration media: dvb-usb-remote: fix dvb_usb_nec_rc_key_to_event type mismatch clk: uniphier: Fix potential infinite loop scsi: jazz_esp: Add IRQ check scsi: sun3x_esp: Add IRQ check scsi: sni_53c710: Add IRQ check HSI: core: fix resource leaks in hsi_add_client_from_dt() x86/events/amd/iommu: Fix sysfs type mismatch HID: plantronics: Workaround for double volume key presses perf symbols: Fix dso__fprintf_symbols_by_name() to return the number of printed chars net: lapbether: Prevent racing when checking whether the netif is running powerpc/prom: Mark identical_pvr_fixup as __init ALSA: core: remove redundant spin_lock pair in snd_card_disconnect nfc: pn533: prevent potential memory corruption ALSA: usb-audio: Add error checks for usb_driver_claim_interface() calls liquidio: Fix unintented sign extension of a left shift of a u16 powerpc/perf: Fix PMU constraint check for EBB events powerpc: iommu: fix build when neither PCI or IBMVIO is set mac80211: bail out if cipher schemes are invalid mt7601u: fix always true expression net: thunderx: Fix unintentional sign extension issue i2c: cadence: add IRQ check i2c: emev2: add IRQ check i2c: jz4780: add IRQ check i2c: sh7760: add IRQ check MIPS: pci-legacy: stop using of_pci_range_to_resource powerpc/pseries: extract host bridge from pci_bus prior to bus removal i2c: sh7760: fix IRQ error path mwl8k: Fix a double Free in mwl8k_probe_hw vsock/vmci: log once the failed queue pair allocation RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails net: davinci_emac: Fix incorrect masking of tx and rx error channel ath9k: Fix error check in ath9k_hw_read_revisions() for PCI devices powerpc/52xx: Fix an invalid ASM expression ('addi' used instead of 'add') net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send net:nfc:digital: Fix a double free in digital_tg_recv_dep_req kfifo: fix ternary sign extension bugs Revert "net/sctp: fix race condition in sctp_destroy_sock" sctp: delay auto_asconf init until binding the first addr Revert "of/fdt: Make sure no-map does not remove already reserved regions" Revert "fdt: Properly handle "no-map" field in the memory region" fs: dlm: fix debugfs dump tipc: convert dest node's address to network order net: stmmac: Set FIFO sizes for ipq806x ALSA: hdsp: don't disable if not enabled ALSA: hdspm: don't disable if not enabled ALSA: rme9652: don't disable if not enabled Bluetooth: Set CONF_NOT_COMPLETE as l2cap_chan default Bluetooth: initialize skb_queue_head at l2cap_chan_create() ip6_vti: proper dev_{hold|put} in ndo_[un]init methods mac80211: clear the beacon's CRC after channel switch cuse: prevent clone selftests: Set CC to clang in lib.mk if LLVM is set kconfig: nconf: stop endless search loops sctp: Fix out-of-bounds warning in sctp_process_asconf_param() ASoC: rt286: Generalize support for ALC3263 codec samples/bpf: Fix broken tracex1 due to kprobe argument change powerpc/pseries: Stop calling printk in rtas_stop_self() wl3501_cs: Fix out-of-bounds warnings in wl3501_send_pkt wl3501_cs: Fix out-of-bounds warnings in wl3501_mgmt_join powerpc/iommu: Annotate nested lock for lockdep net: ethernet: mtk_eth_soc: fix RX VLAN offload ASoC: rt286: Make RT286_SET_GPIO_* readable and writable f2fs: fix a redundant call to f2fs_balance_fs if an error occurs PCI: Release OF node in pci_scan_device()'s error path ARM: 9064/1: hw_breakpoint: Do not directly check the event's overflow_handler hook NFSv4.2: Always flush out writes in nfs42_proc_fallocate() NFS: Deal correctly with attribute generation counter overflow pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() NFSv4.2 fix handling of sr_eof in SEEK's reply sctp: fix a SCTP_MIB_CURRESTAB leak in sctp_sf_do_dupcook_b drm/radeon: Fix off-by-one power_state index heap overwrite khugepaged: fix wrong result value for trace_mm_collapse_huge_page_isolate() mm/hugeltb: handle the error case in hugetlb_fix_reserve_counts() ksm: fix potential missing rmap_item for stable_node kernel: kexec_file: fix error return code of kexec_calculate_store_digests() ARC: entry: fix off-by-one error in syscall number validation powerpc/64s: Fix crashes when toggling entry flush barrier squashfs: fix divide error in calculate_skip() iio: proximity: pulsedlight: Fix rumtime PM imbalance on error usb: fotg210-hcd: Fix an error message ACPI: scan: Fix a memory leak in an error handling path usb: xhci: Increase timeout for HC halt usb: dwc2: Fix gadget DMA unmap direction usb: core: hub: fix race condition about TRSMRCY of resume KVM: x86: Cancel pvclock_gtod_work on module removal FDDI: defxx: Make MMIO the configuration default except for EISA MIPS: Reinstate platform `__div64_32' handler MIPS: Avoid DIVU in `__div64_32' is result would be zero MIPS: Avoid handcoded DIVU in `__div64_32' altogether thermal/core/fair share: Lock the thermal zone while looping over instances dm ioctl: fix out of bounds array access when no devices kobject_uevent: remove warning in init_uevent_argv() netfilter: conntrack: Make global sysctls readonly in non-init netns clk: exynos7: Mark aclk_fsys1_200 as critical x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes extcon: adc-jack: Fix incompatible pointer type warning kgdb: fix gcc-11 warning on indentation usb: sl811-hcd: improve misleading indentation cxgb4: Fix the -Wmisleading-indentation warning isdn: capi: fix mismatched prototypes ACPI / hotplug / PCI: Fix reference count leak in enable_slot() Input: silead - add workaround for x86 BIOS-es which bring the chip up in a stuck state um: Mark all kernel symbols as local ceph: fix fscache invalidation ALSA: hda: generic: change the DAC ctl name for LO+SPK or LO+HP lib: stackdepot: turn depot_lock spinlock to raw_spinlock sit: proper dev_{hold|put} in ndo_[un]init methods ip6_tunnel: sit: proper dev_{hold|put} in ndo_[un]init methods xhci: Do not use GFP_KERNEL in (potentially) atomic context ipv6: remove extra dev_hold() for fallback tunnels Linux 4.9.269 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ib994aef2c6746afa8dcbb237d8c0645ba2c6f7e1
615 lines
14 KiB
C
615 lines
14 KiB
C
#ifndef __WL3501_H__
|
|
#define __WL3501_H__
|
|
|
|
#include <linux/spinlock.h>
|
|
#include <linux/ieee80211.h>
|
|
|
|
/* define for WLA 2.0 */
|
|
#define WL3501_BLKSZ 256
|
|
/*
|
|
* ID for input Signals of DRIVER block
|
|
* bit[7-5] is block ID: 000
|
|
* bit[4-0] is signal ID
|
|
*/
|
|
enum wl3501_signals {
|
|
WL3501_SIG_ALARM,
|
|
WL3501_SIG_MD_CONFIRM,
|
|
WL3501_SIG_MD_IND,
|
|
WL3501_SIG_ASSOC_CONFIRM,
|
|
WL3501_SIG_ASSOC_IND,
|
|
WL3501_SIG_AUTH_CONFIRM,
|
|
WL3501_SIG_AUTH_IND,
|
|
WL3501_SIG_DEAUTH_CONFIRM,
|
|
WL3501_SIG_DEAUTH_IND,
|
|
WL3501_SIG_DISASSOC_CONFIRM,
|
|
WL3501_SIG_DISASSOC_IND,
|
|
WL3501_SIG_GET_CONFIRM,
|
|
WL3501_SIG_JOIN_CONFIRM,
|
|
WL3501_SIG_PWR_MGMT_CONFIRM,
|
|
WL3501_SIG_REASSOC_CONFIRM,
|
|
WL3501_SIG_REASSOC_IND,
|
|
WL3501_SIG_SCAN_CONFIRM,
|
|
WL3501_SIG_SET_CONFIRM,
|
|
WL3501_SIG_START_CONFIRM,
|
|
WL3501_SIG_RESYNC_CONFIRM,
|
|
WL3501_SIG_SITE_CONFIRM,
|
|
WL3501_SIG_SAVE_CONFIRM,
|
|
WL3501_SIG_RFTEST_CONFIRM,
|
|
/*
|
|
* ID for input Signals of MLME block
|
|
* bit[7-5] is block ID: 010
|
|
* bit[4-0] is signal ID
|
|
*/
|
|
WL3501_SIG_ASSOC_REQ = 0x20,
|
|
WL3501_SIG_AUTH_REQ,
|
|
WL3501_SIG_DEAUTH_REQ,
|
|
WL3501_SIG_DISASSOC_REQ,
|
|
WL3501_SIG_GET_REQ,
|
|
WL3501_SIG_JOIN_REQ,
|
|
WL3501_SIG_PWR_MGMT_REQ,
|
|
WL3501_SIG_REASSOC_REQ,
|
|
WL3501_SIG_SCAN_REQ,
|
|
WL3501_SIG_SET_REQ,
|
|
WL3501_SIG_START_REQ,
|
|
WL3501_SIG_MD_REQ,
|
|
WL3501_SIG_RESYNC_REQ,
|
|
WL3501_SIG_SITE_REQ,
|
|
WL3501_SIG_SAVE_REQ,
|
|
WL3501_SIG_RF_TEST_REQ,
|
|
WL3501_SIG_MM_CONFIRM = 0x60,
|
|
WL3501_SIG_MM_IND,
|
|
};
|
|
|
|
enum wl3501_mib_attribs {
|
|
WL3501_MIB_ATTR_STATION_ID,
|
|
WL3501_MIB_ATTR_AUTH_ALGORITHMS,
|
|
WL3501_MIB_ATTR_AUTH_TYPE,
|
|
WL3501_MIB_ATTR_MEDIUM_OCCUPANCY_LIMIT,
|
|
WL3501_MIB_ATTR_CF_POLLABLE,
|
|
WL3501_MIB_ATTR_CFP_PERIOD,
|
|
WL3501_MIB_ATTR_CFPMAX_DURATION,
|
|
WL3501_MIB_ATTR_AUTH_RESP_TMOUT,
|
|
WL3501_MIB_ATTR_RX_DTIMS,
|
|
WL3501_MIB_ATTR_PRIV_OPT_IMPLEMENTED,
|
|
WL3501_MIB_ATTR_PRIV_INVOKED,
|
|
WL3501_MIB_ATTR_WEP_DEFAULT_KEYS,
|
|
WL3501_MIB_ATTR_WEP_DEFAULT_KEY_ID,
|
|
WL3501_MIB_ATTR_WEP_KEY_MAPPINGS,
|
|
WL3501_MIB_ATTR_WEP_KEY_MAPPINGS_LEN,
|
|
WL3501_MIB_ATTR_EXCLUDE_UNENCRYPTED,
|
|
WL3501_MIB_ATTR_WEP_ICV_ERROR_COUNT,
|
|
WL3501_MIB_ATTR_WEP_UNDECRYPTABLE_COUNT,
|
|
WL3501_MIB_ATTR_WEP_EXCLUDED_COUNT,
|
|
WL3501_MIB_ATTR_MAC_ADDR,
|
|
WL3501_MIB_ATTR_GROUP_ADDRS,
|
|
WL3501_MIB_ATTR_RTS_THRESHOLD,
|
|
WL3501_MIB_ATTR_SHORT_RETRY_LIMIT,
|
|
WL3501_MIB_ATTR_LONG_RETRY_LIMIT,
|
|
WL3501_MIB_ATTR_FRAG_THRESHOLD,
|
|
WL3501_MIB_ATTR_MAX_TX_MSDU_LIFETIME,
|
|
WL3501_MIB_ATTR_MAX_RX_LIFETIME,
|
|
WL3501_MIB_ATTR_MANUFACTURER_ID,
|
|
WL3501_MIB_ATTR_PRODUCT_ID,
|
|
WL3501_MIB_ATTR_TX_FRAG_COUNT,
|
|
WL3501_MIB_ATTR_MULTICAST_TX_FRAME_COUNT,
|
|
WL3501_MIB_ATTR_FAILED_COUNT,
|
|
WL3501_MIB_ATTR_RX_FRAG_COUNT,
|
|
WL3501_MIB_ATTR_MULTICAST_RX_COUNT,
|
|
WL3501_MIB_ATTR_FCS_ERROR_COUNT,
|
|
WL3501_MIB_ATTR_RETRY_COUNT,
|
|
WL3501_MIB_ATTR_MULTIPLE_RETRY_COUNT,
|
|
WL3501_MIB_ATTR_RTS_SUCCESS_COUNT,
|
|
WL3501_MIB_ATTR_RTS_FAILURE_COUNT,
|
|
WL3501_MIB_ATTR_ACK_FAILURE_COUNT,
|
|
WL3501_MIB_ATTR_FRAME_DUPLICATE_COUNT,
|
|
WL3501_MIB_ATTR_PHY_TYPE,
|
|
WL3501_MIB_ATTR_REG_DOMAINS_SUPPORT,
|
|
WL3501_MIB_ATTR_CURRENT_REG_DOMAIN,
|
|
WL3501_MIB_ATTR_SLOT_TIME,
|
|
WL3501_MIB_ATTR_CCA_TIME,
|
|
WL3501_MIB_ATTR_RX_TX_TURNAROUND_TIME,
|
|
WL3501_MIB_ATTR_TX_PLCP_DELAY,
|
|
WL3501_MIB_ATTR_RX_TX_SWITCH_TIME,
|
|
WL3501_MIB_ATTR_TX_RAMP_ON_TIME,
|
|
WL3501_MIB_ATTR_TX_RF_DELAY,
|
|
WL3501_MIB_ATTR_SIFS_TIME,
|
|
WL3501_MIB_ATTR_RX_RF_DELAY,
|
|
WL3501_MIB_ATTR_RX_PLCP_DELAY,
|
|
WL3501_MIB_ATTR_MAC_PROCESSING_DELAY,
|
|
WL3501_MIB_ATTR_TX_RAMP_OFF_TIME,
|
|
WL3501_MIB_ATTR_PREAMBLE_LEN,
|
|
WL3501_MIB_ATTR_PLCP_HEADER_LEN,
|
|
WL3501_MIB_ATTR_MPDU_DURATION_FACTOR,
|
|
WL3501_MIB_ATTR_AIR_PROPAGATION_TIME,
|
|
WL3501_MIB_ATTR_TEMP_TYPE,
|
|
WL3501_MIB_ATTR_CW_MIN,
|
|
WL3501_MIB_ATTR_CW_MAX,
|
|
WL3501_MIB_ATTR_SUPPORT_DATA_RATES_TX,
|
|
WL3501_MIB_ATTR_SUPPORT_DATA_RATES_RX,
|
|
WL3501_MIB_ATTR_MPDU_MAX_LEN,
|
|
WL3501_MIB_ATTR_SUPPORT_TX_ANTENNAS,
|
|
WL3501_MIB_ATTR_CURRENT_TX_ANTENNA,
|
|
WL3501_MIB_ATTR_SUPPORT_RX_ANTENNAS,
|
|
WL3501_MIB_ATTR_DIVERSITY_SUPPORT,
|
|
WL3501_MIB_ATTR_DIVERSITY_SELECTION_RS,
|
|
WL3501_MIB_ATTR_NR_SUPPORTED_PWR_LEVELS,
|
|
WL3501_MIB_ATTR_TX_PWR_LEVEL1,
|
|
WL3501_MIB_ATTR_TX_PWR_LEVEL2,
|
|
WL3501_MIB_ATTR_TX_PWR_LEVEL3,
|
|
WL3501_MIB_ATTR_TX_PWR_LEVEL4,
|
|
WL3501_MIB_ATTR_TX_PWR_LEVEL5,
|
|
WL3501_MIB_ATTR_TX_PWR_LEVEL6,
|
|
WL3501_MIB_ATTR_TX_PWR_LEVEL7,
|
|
WL3501_MIB_ATTR_TX_PWR_LEVEL8,
|
|
WL3501_MIB_ATTR_CURRENT_TX_PWR_LEVEL,
|
|
WL3501_MIB_ATTR_CURRENT_CHAN,
|
|
WL3501_MIB_ATTR_CCA_MODE_SUPPORTED,
|
|
WL3501_MIB_ATTR_CURRENT_CCA_MODE,
|
|
WL3501_MIB_ATTR_ED_THRESHOLD,
|
|
WL3501_MIB_ATTR_SINTHESIZER_LOCKED,
|
|
WL3501_MIB_ATTR_CURRENT_PWR_STATE,
|
|
WL3501_MIB_ATTR_DOZE_TURNON_TIME,
|
|
WL3501_MIB_ATTR_RCR33,
|
|
WL3501_MIB_ATTR_DEFAULT_CHAN,
|
|
WL3501_MIB_ATTR_SSID,
|
|
WL3501_MIB_ATTR_PWR_MGMT_ENABLE,
|
|
WL3501_MIB_ATTR_NET_CAPABILITY,
|
|
WL3501_MIB_ATTR_ROUTING,
|
|
};
|
|
|
|
enum wl3501_net_type {
|
|
WL3501_NET_TYPE_INFRA,
|
|
WL3501_NET_TYPE_ADHOC,
|
|
WL3501_NET_TYPE_ANY_BSS,
|
|
};
|
|
|
|
enum wl3501_scan_type {
|
|
WL3501_SCAN_TYPE_ACTIVE,
|
|
WL3501_SCAN_TYPE_PASSIVE,
|
|
};
|
|
|
|
enum wl3501_tx_result {
|
|
WL3501_TX_RESULT_SUCCESS,
|
|
WL3501_TX_RESULT_NO_BSS,
|
|
WL3501_TX_RESULT_RETRY_LIMIT,
|
|
};
|
|
|
|
enum wl3501_sys_type {
|
|
WL3501_SYS_TYPE_OPEN,
|
|
WL3501_SYS_TYPE_SHARE_KEY,
|
|
};
|
|
|
|
enum wl3501_status {
|
|
WL3501_STATUS_SUCCESS,
|
|
WL3501_STATUS_INVALID,
|
|
WL3501_STATUS_TIMEOUT,
|
|
WL3501_STATUS_REFUSED,
|
|
WL3501_STATUS_MANY_REQ,
|
|
WL3501_STATUS_ALREADY_BSS,
|
|
};
|
|
|
|
#define WL3501_MGMT_CAPABILITY_ESS 0x0001 /* see 802.11 p.58 */
|
|
#define WL3501_MGMT_CAPABILITY_IBSS 0x0002 /* - " - */
|
|
#define WL3501_MGMT_CAPABILITY_CF_POLLABLE 0x0004 /* - " - */
|
|
#define WL3501_MGMT_CAPABILITY_CF_POLL_REQUEST 0x0008 /* - " - */
|
|
#define WL3501_MGMT_CAPABILITY_PRIVACY 0x0010 /* - " - */
|
|
|
|
#define IW_REG_DOMAIN_FCC 0x10 /* Channel 1 to 11 USA */
|
|
#define IW_REG_DOMAIN_DOC 0x20 /* Channel 1 to 11 Canada */
|
|
#define IW_REG_DOMAIN_ETSI 0x30 /* Channel 1 to 13 Europe */
|
|
#define IW_REG_DOMAIN_SPAIN 0x31 /* Channel 10 to 11 Spain */
|
|
#define IW_REG_DOMAIN_FRANCE 0x32 /* Channel 10 to 13 France */
|
|
#define IW_REG_DOMAIN_MKK 0x40 /* Channel 14 Japan */
|
|
#define IW_REG_DOMAIN_MKK1 0x41 /* Channel 1-14 Japan */
|
|
#define IW_REG_DOMAIN_ISRAEL 0x50 /* Channel 3 - 9 Israel */
|
|
|
|
#define IW_MGMT_RATE_LABEL_MANDATORY 128 /* MSB */
|
|
|
|
enum iw_mgmt_rate_labels {
|
|
IW_MGMT_RATE_LABEL_1MBIT = 2,
|
|
IW_MGMT_RATE_LABEL_2MBIT = 4,
|
|
IW_MGMT_RATE_LABEL_5_5MBIT = 11,
|
|
IW_MGMT_RATE_LABEL_11MBIT = 22,
|
|
};
|
|
|
|
enum iw_mgmt_info_element_ids {
|
|
IW_MGMT_INFO_ELEMENT_SSID, /* Service Set Identity */
|
|
IW_MGMT_INFO_ELEMENT_SUPPORTED_RATES,
|
|
IW_MGMT_INFO_ELEMENT_FH_PARAMETER_SET,
|
|
IW_MGMT_INFO_ELEMENT_DS_PARAMETER_SET,
|
|
IW_MGMT_INFO_ELEMENT_CS_PARAMETER_SET,
|
|
IW_MGMT_INFO_ELEMENT_CS_TIM, /* Traffic Information Map */
|
|
IW_MGMT_INFO_ELEMENT_IBSS_PARAMETER_SET,
|
|
/* 7-15: Reserved, unused */
|
|
IW_MGMT_INFO_ELEMENT_CHALLENGE_TEXT = 16,
|
|
/* 17-31 Reserved for challenge text extension */
|
|
/* 32-255 Reserved, unused */
|
|
};
|
|
|
|
struct iw_mgmt_info_element {
|
|
u8 id; /* one of enum iw_mgmt_info_element_ids,
|
|
but sizeof(enum) > sizeof(u8) :-( */
|
|
u8 len;
|
|
u8 data[0];
|
|
} __packed;
|
|
|
|
struct iw_mgmt_essid_pset {
|
|
struct iw_mgmt_info_element el;
|
|
u8 essid[IW_ESSID_MAX_SIZE];
|
|
} __packed;
|
|
|
|
/*
|
|
* According to 802.11 Wireless Netowors, the definitive guide - O'Reilly
|
|
* Pg 75
|
|
*/
|
|
#define IW_DATA_RATE_MAX_LABELS 8
|
|
|
|
struct iw_mgmt_data_rset {
|
|
struct iw_mgmt_info_element el;
|
|
u8 data_rate_labels[IW_DATA_RATE_MAX_LABELS];
|
|
} __packed;
|
|
|
|
struct iw_mgmt_ds_pset {
|
|
struct iw_mgmt_info_element el;
|
|
u8 chan;
|
|
} __packed;
|
|
|
|
struct iw_mgmt_cf_pset {
|
|
struct iw_mgmt_info_element el;
|
|
u8 cfp_count;
|
|
u8 cfp_period;
|
|
u16 cfp_max_duration;
|
|
u16 cfp_dur_remaining;
|
|
} __packed;
|
|
|
|
struct iw_mgmt_ibss_pset {
|
|
struct iw_mgmt_info_element el;
|
|
u16 atim_window;
|
|
} __packed;
|
|
|
|
struct wl3501_tx_hdr {
|
|
u16 tx_cnt;
|
|
u8 sync[16];
|
|
u16 sfd;
|
|
u8 signal;
|
|
u8 service;
|
|
u16 len;
|
|
u16 crc16;
|
|
u16 frame_ctrl;
|
|
u16 duration_id;
|
|
u8 addr1[ETH_ALEN];
|
|
u8 addr2[ETH_ALEN];
|
|
u8 addr3[ETH_ALEN];
|
|
u16 seq_ctrl;
|
|
u8 addr4[ETH_ALEN];
|
|
};
|
|
|
|
struct wl3501_rx_hdr {
|
|
u16 rx_next_blk;
|
|
u16 rc_next_frame_blk;
|
|
u8 rx_blk_ctrl;
|
|
u8 rx_next_frame;
|
|
u8 rx_next_frame1;
|
|
u8 rssi;
|
|
char time[8];
|
|
u8 signal;
|
|
u8 service;
|
|
u16 len;
|
|
u16 crc16;
|
|
u16 frame_ctrl;
|
|
u16 duration;
|
|
u8 addr1[ETH_ALEN];
|
|
u8 addr2[ETH_ALEN];
|
|
u8 addr3[ETH_ALEN];
|
|
u16 seq;
|
|
u8 addr4[ETH_ALEN];
|
|
};
|
|
|
|
struct wl3501_start_req {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 bss_type;
|
|
u16 beacon_period;
|
|
u16 dtim_period;
|
|
u16 probe_delay;
|
|
u16 cap_info;
|
|
struct iw_mgmt_essid_pset ssid;
|
|
struct iw_mgmt_data_rset bss_basic_rset;
|
|
struct iw_mgmt_data_rset operational_rset;
|
|
struct iw_mgmt_cf_pset cf_pset;
|
|
struct iw_mgmt_ds_pset ds_pset;
|
|
struct iw_mgmt_ibss_pset ibss_pset;
|
|
};
|
|
|
|
struct wl3501_assoc_req {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
u16 timeout;
|
|
u16 cap_info;
|
|
u16 listen_interval;
|
|
u8 mac_addr[ETH_ALEN];
|
|
};
|
|
|
|
struct wl3501_assoc_confirm {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
u16 status;
|
|
};
|
|
|
|
struct wl3501_assoc_ind {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 mac_addr[ETH_ALEN];
|
|
};
|
|
|
|
struct wl3501_auth_req {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
u16 type;
|
|
u16 timeout;
|
|
u8 mac_addr[ETH_ALEN];
|
|
};
|
|
|
|
struct wl3501_auth_confirm {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
u16 type;
|
|
u16 status;
|
|
u8 mac_addr[ETH_ALEN];
|
|
};
|
|
|
|
struct wl3501_get_req {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
u16 mib_attrib;
|
|
};
|
|
|
|
struct wl3501_get_confirm {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
u16 mib_status;
|
|
u16 mib_attrib;
|
|
u8 mib_value[100];
|
|
};
|
|
|
|
struct wl3501_req {
|
|
u16 beacon_period;
|
|
u16 dtim_period;
|
|
u16 cap_info;
|
|
u8 bss_type;
|
|
u8 bssid[ETH_ALEN];
|
|
struct iw_mgmt_essid_pset ssid;
|
|
struct iw_mgmt_ds_pset ds_pset;
|
|
struct iw_mgmt_cf_pset cf_pset;
|
|
struct iw_mgmt_ibss_pset ibss_pset;
|
|
struct iw_mgmt_data_rset bss_basic_rset;
|
|
};
|
|
|
|
struct wl3501_join_req {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
struct iw_mgmt_data_rset operational_rset;
|
|
u16 reserved2;
|
|
u16 timeout;
|
|
u16 probe_delay;
|
|
u8 timestamp[8];
|
|
u8 local_time[8];
|
|
struct wl3501_req req;
|
|
};
|
|
|
|
struct wl3501_join_confirm {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
u16 status;
|
|
};
|
|
|
|
struct wl3501_pwr_mgmt_req {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 pwr_save;
|
|
u8 wake_up;
|
|
u8 receive_dtims;
|
|
};
|
|
|
|
struct wl3501_pwr_mgmt_confirm {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
u16 status;
|
|
};
|
|
|
|
struct wl3501_scan_req {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 bss_type;
|
|
u16 probe_delay;
|
|
u16 min_chan_time;
|
|
u16 max_chan_time;
|
|
u8 chan_list[14];
|
|
u8 bssid[ETH_ALEN];
|
|
struct iw_mgmt_essid_pset ssid;
|
|
enum wl3501_scan_type scan_type;
|
|
};
|
|
|
|
struct wl3501_scan_confirm {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
u16 status;
|
|
char timestamp[8];
|
|
char localtime[8];
|
|
struct wl3501_req req;
|
|
u8 rssi;
|
|
};
|
|
|
|
struct wl3501_start_confirm {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
u16 status;
|
|
};
|
|
|
|
struct wl3501_md_req {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 routing;
|
|
u16 data;
|
|
u16 size;
|
|
u8 pri;
|
|
u8 service_class;
|
|
struct {
|
|
u8 daddr[ETH_ALEN];
|
|
u8 saddr[ETH_ALEN];
|
|
} addr;
|
|
};
|
|
|
|
struct wl3501_md_ind {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 routing;
|
|
u16 data;
|
|
u16 size;
|
|
u8 reception;
|
|
u8 pri;
|
|
u8 service_class;
|
|
struct {
|
|
u8 daddr[ETH_ALEN];
|
|
u8 saddr[ETH_ALEN];
|
|
} addr;
|
|
};
|
|
|
|
struct wl3501_md_confirm {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
u8 reserved;
|
|
u16 data;
|
|
u8 status;
|
|
u8 pri;
|
|
u8 service_class;
|
|
};
|
|
|
|
struct wl3501_resync_req {
|
|
u16 next_blk;
|
|
u8 sig_id;
|
|
};
|
|
|
|
/* Definitions for supporting clone adapters. */
|
|
/* System Interface Registers (SIR space) */
|
|
#define WL3501_NIC_GCR ((u8)0x00) /* SIR0 - General Conf Register */
|
|
#define WL3501_NIC_BSS ((u8)0x01) /* SIR1 - Bank Switching Select Reg */
|
|
#define WL3501_NIC_LMAL ((u8)0x02) /* SIR2 - Local Mem addr Reg [7:0] */
|
|
#define WL3501_NIC_LMAH ((u8)0x03) /* SIR3 - Local Mem addr Reg [14:8] */
|
|
#define WL3501_NIC_IODPA ((u8)0x04) /* SIR4 - I/O Data Port A */
|
|
#define WL3501_NIC_IODPB ((u8)0x05) /* SIR5 - I/O Data Port B */
|
|
#define WL3501_NIC_IODPC ((u8)0x06) /* SIR6 - I/O Data Port C */
|
|
#define WL3501_NIC_IODPD ((u8)0x07) /* SIR7 - I/O Data Port D */
|
|
|
|
/* Bits in GCR */
|
|
#define WL3501_GCR_SWRESET ((u8)0x80)
|
|
#define WL3501_GCR_CORESET ((u8)0x40)
|
|
#define WL3501_GCR_DISPWDN ((u8)0x20)
|
|
#define WL3501_GCR_ECWAIT ((u8)0x10)
|
|
#define WL3501_GCR_ECINT ((u8)0x08)
|
|
#define WL3501_GCR_INT2EC ((u8)0x04)
|
|
#define WL3501_GCR_ENECINT ((u8)0x02)
|
|
#define WL3501_GCR_DAM ((u8)0x01)
|
|
|
|
/* Bits in BSS (Bank Switching Select Register) */
|
|
#define WL3501_BSS_FPAGE0 ((u8)0x20) /* Flash memory page0 */
|
|
#define WL3501_BSS_FPAGE1 ((u8)0x28)
|
|
#define WL3501_BSS_FPAGE2 ((u8)0x30)
|
|
#define WL3501_BSS_FPAGE3 ((u8)0x38)
|
|
#define WL3501_BSS_SPAGE0 ((u8)0x00) /* SRAM page0 */
|
|
#define WL3501_BSS_SPAGE1 ((u8)0x08)
|
|
#define WL3501_BSS_SPAGE2 ((u8)0x10)
|
|
#define WL3501_BSS_SPAGE3 ((u8)0x18)
|
|
|
|
/* Define Driver Interface */
|
|
/* Refer IEEE 802.11 */
|
|
/* Tx packet header, include PLCP and MPDU */
|
|
/* Tx PLCP Header */
|
|
struct wl3501_80211_tx_plcp_hdr {
|
|
u8 sync[16];
|
|
u16 sfd;
|
|
u8 signal;
|
|
u8 service;
|
|
u16 len;
|
|
u16 crc16;
|
|
} __packed;
|
|
|
|
struct wl3501_80211_tx_hdr {
|
|
struct wl3501_80211_tx_plcp_hdr pclp_hdr;
|
|
struct ieee80211_hdr mac_hdr;
|
|
} __packed;
|
|
|
|
/*
|
|
Reserve the beginning Tx space for descriptor use.
|
|
|
|
TxBlockOffset --> *----*----*----*----* \
|
|
(TxFreeDesc) | 0 | 1 | 2 | 3 | \
|
|
| 4 | 5 | 6 | 7 | |
|
|
| 8 | 9 | 10 | 11 | TX_DESC * 20
|
|
| 12 | 13 | 14 | 15 | |
|
|
| 16 | 17 | 18 | 19 | /
|
|
TxBufferBegin --> *----*----*----*----* /
|
|
(TxBufferHead) | |
|
|
(TxBufferTail) | |
|
|
| Send Buffer |
|
|
| |
|
|
| |
|
|
*-------------------*
|
|
TxBufferEnd -------------------------/
|
|
|
|
*/
|
|
|
|
struct wl3501_card {
|
|
int base_addr;
|
|
u8 mac_addr[ETH_ALEN];
|
|
spinlock_t lock;
|
|
wait_queue_head_t wait;
|
|
struct wl3501_get_confirm sig_get_confirm;
|
|
struct wl3501_pwr_mgmt_confirm sig_pwr_mgmt_confirm;
|
|
u16 tx_buffer_size;
|
|
u16 tx_buffer_head;
|
|
u16 tx_buffer_tail;
|
|
u16 tx_buffer_cnt;
|
|
u16 esbq_req_start;
|
|
u16 esbq_req_end;
|
|
u16 esbq_req_head;
|
|
u16 esbq_req_tail;
|
|
u16 esbq_confirm_start;
|
|
u16 esbq_confirm_end;
|
|
u16 esbq_confirm;
|
|
struct iw_mgmt_essid_pset essid;
|
|
struct iw_mgmt_essid_pset keep_essid;
|
|
u8 bssid[ETH_ALEN];
|
|
int net_type;
|
|
char nick[32];
|
|
char card_name[32];
|
|
char firmware_date[32];
|
|
u8 chan;
|
|
u8 cap_info;
|
|
u16 start_seg;
|
|
u16 bss_cnt;
|
|
u16 join_sta_bss;
|
|
u8 rssi;
|
|
u8 adhoc_times;
|
|
u8 reg_domain;
|
|
u8 version[2];
|
|
struct wl3501_scan_confirm bss_set[20];
|
|
|
|
struct iw_statistics wstats;
|
|
struct iw_spy_data spy_data;
|
|
struct iw_public_data wireless_data;
|
|
struct pcmcia_device *p_dev;
|
|
};
|
|
#endif
|