Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
2bbcaae
Documentation
LICENSES
arch
block
certs
crypto
drivers
accessibility
acpi
amba
android
ata
atm
auxdisplay
base
bcma
block
bluetooth
bus
cdrom
char
clk
clocksource
connector
counter
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma-buf
dma
edac
eisa
extcon
firewire
firmware
fpga
fsi
gnss
gpio
gpu
greybus
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
i3c
ide
idle
iio
infiniband
input
interconnect
iommu
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc
mmc
mtd
mux
net
appletalk
arcnet
bonding
caif
can
dsa
ethernet
fddi
fjes
hamradio
hippi
hyperv
ieee802154
ipa
ipvlan
netdevsim
phy
plip
ppp
slip
team
usb
vmxnet3
wan
wimax
wireguard
wireless
admtek
ath
ar5523
ath10k
ath11k
ath5k
ath6kl
ath9k
Kconfig
Makefile
ahb.c
ani.c
ani.h
antenna.c
ar5008_initvals.h
ar5008_phy.c
ar9001_initvals.h
ar9002_calib.c
ar9002_hw.c
ar9002_initvals.h
ar9002_mac.c
ar9002_phy.c
ar9002_phy.h
ar9003_2p2_initvals.h
ar9003_aic.c
ar9003_aic.h
ar9003_buffalo_initvals.h
ar9003_calib.c
ar9003_eeprom.c
ar9003_eeprom.h
ar9003_hw.c
ar9003_mac.c
ar9003_mac.h
ar9003_mci.c
ar9003_mci.h
ar9003_paprd.c
ar9003_phy.c
ar9003_phy.h
ar9003_rtt.c
ar9003_rtt.h
ar9003_wow.c
ar9330_1p1_initvals.h
ar9330_1p2_initvals.h
ar9340_initvals.h
ar9462_2p0_initvals.h
ar9462_2p1_initvals.h
ar9485_initvals.h
ar953x_initvals.h
ar955x_1p0_initvals.h
ar9565_1p0_initvals.h
ar9565_1p1_initvals.h
ar956x_initvals.h
ar9580_1p0_initvals.h
ath9k.h
ath9k_pci_owl_loader.c
beacon.c
btcoex.c
btcoex.h
calib.c
calib.h
channel.c
common-beacon.c
common-beacon.h
common-debug.c
common-debug.h
common-init.c
common-init.h
common-spectral.c
common-spectral.h
common.c
common.h
debug.c
debug.h
debug_sta.c
dfs.c
dfs.h
dfs_debug.c
dfs_debug.h
dynack.c
dynack.h
eeprom.c
eeprom.h
eeprom_4k.c
eeprom_9287.c
eeprom_def.c
gpio.c
hif_usb.c
hif_usb.h
htc.h
htc_drv_beacon.c
htc_drv_debug.c
htc_drv_gpio.c
htc_drv_init.c
htc_drv_main.c
htc_drv_txrx.c
htc_hst.c
htc_hst.h
hw-ops.h
hw.c
hw.h
init.c
link.c
mac.c
mac.h
main.c
mci.c
mci.h
pci.c
phy.h
recv.c
reg.h
reg_aic.h
reg_mci.h
reg_wow.h
rng.c
tx99.c
wmi.c
wmi.h
wow.c
xmit.c
carl9170
wcn36xx
wil6210
Kconfig
Makefile
ath.h
debug.c
dfs_pattern_detector.c
dfs_pattern_detector.h
dfs_pri_detector.c
dfs_pri_detector.h
hw.c
key.c
main.c
reg.h
regd.c
regd.h
regd_common.h
spectral_common.h
trace.c
trace.h
atmel
broadcom
cisco
intel
intersil
marvell
mediatek
quantenna
ralink
realtek
rsi
st
ti
zydas
Kconfig
Makefile
mac80211_hwsim.c
mac80211_hwsim.h
ray_cs.c
ray_cs.h
rayctl.h
rndis_wlan.c
virt_wifi.c
wl3501.h
wl3501_cs.c
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c
macvlan.c
macvtap.c
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c
virtio_net.c
vrf.c
vsockmon.c
vxlan.c
xen-netfront.c
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi
sfi
sh
siox
slimbus
soc
soundwire
spi
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt
tty
uio
usb
vfio
vhost
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
drivers
/
net
/
wireless
/
ath
/
ath9k
/
hif_usb.h
Copy path
Blame
Blame
Latest commit
Qiujun Huang
and
Kalle Valo
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb
Apr 7, 2020
2bbcaae
·
Apr 7, 2020
History
History
143 lines (118 loc) · 3.72 KB
Breadcrumbs
linux
/
drivers
/
net
/
wireless
/
ath
/
ath9k
/
hif_usb.h
Top
File metadata and controls
Code
Blame
143 lines (118 loc) · 3.72 KB
Raw
/* * Copyright (c) 2010-2011 Atheros Communications Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef HTC_USB_H #define HTC_USB_H /* old firmware images */ #define FIRMWARE_AR7010_1_1 "htc_7010.fw" #define FIRMWARE_AR9271 "htc_9271.fw" /* supported Major FW version */ #define MAJOR_VERSION_REQ 1 #define MINOR_VERSION_REQ 3 /* minimal and maximal supported Minor FW version. */ #define FIRMWARE_MINOR_IDX_MAX 4 #define FIRMWARE_MINOR_IDX_MIN 3 #define HTC_FW_PATH "ath9k_htc" #define HTC_9271_MODULE_FW HTC_FW_PATH "/htc_9271-" \ __stringify(MAJOR_VERSION_REQ) \ "." __stringify(FIRMWARE_MINOR_IDX_MAX) ".0.fw" #define HTC_7010_MODULE_FW HTC_FW_PATH "/htc_7010-" \ __stringify(MAJOR_VERSION_REQ) \ "." __stringify(FIRMWARE_MINOR_IDX_MAX) ".0.fw" extern int htc_use_dev_fw; #define IS_AR7010_DEVICE(_v) (((_v) == AR9280_USB) || ((_v) == AR9287_USB)) #define AR9271_FIRMWARE 0x501000 #define AR9271_FIRMWARE_TEXT 0x903000 #define AR7010_FIRMWARE_TEXT 0x906000 #define FIRMWARE_DOWNLOAD 0x30 #define FIRMWARE_DOWNLOAD_COMP 0x31 #define ATH_USB_RX_STREAM_MODE_TAG 0x4e00 #define ATH_USB_TX_STREAM_MODE_TAG 0x697e /* FIXME: Verify these numbers (with Windows) */ #define MAX_TX_URB_NUM 8 #define MAX_TX_BUF_NUM 256 #define MAX_TX_BUF_SIZE 32768 #define MAX_TX_AGGR_NUM 20 #define MAX_RX_URB_NUM 8 #define MAX_RX_BUF_SIZE 16384 #define MAX_PKT_NUM_IN_TRANSFER 10 #define MAX_REG_OUT_URB_NUM 1 #define MAX_REG_IN_URB_NUM 64 #define MAX_REG_IN_BUF_SIZE 64 /* USB Endpoint definition */ #define USB_WLAN_TX_PIPE 1 #define USB_WLAN_RX_PIPE 2 #define USB_REG_IN_PIPE 3 #define USB_REG_OUT_PIPE 4 #define USB_MSG_TIMEOUT 1000 /* (ms) */ #define HIF_USB_MAX_RXPIPES 2 #define HIF_USB_MAX_TXPIPES 4 struct tx_buf { u8 *buf; u16 len; u16 offset; struct urb *urb; struct sk_buff_head skb_queue; struct hif_device_usb *hif_dev; struct list_head list; }; struct rx_buf { struct sk_buff *skb; struct hif_device_usb *hif_dev; }; #define HIF_USB_TX_STOP BIT(0) #define HIF_USB_TX_FLUSH BIT(1) struct hif_usb_tx { u8 flags; u8 tx_buf_cnt; u16 tx_skb_cnt; struct sk_buff_head tx_skb_queue; struct list_head tx_buf; struct list_head tx_pending; spinlock_t tx_lock; }; struct cmd_buf { struct sk_buff *skb; struct hif_device_usb *hif_dev; }; #define HIF_USB_START BIT(0) #define HIF_USB_READY BIT(1) struct hif_device_usb { struct usb_device *udev; struct usb_interface *interface; const struct usb_device_id *usb_device_id; const void *fw_data; size_t fw_size; struct completion fw_done; struct htc_target *htc_handle; struct hif_usb_tx tx; struct usb_anchor regout_submitted; struct usb_anchor rx_submitted; struct usb_anchor reg_in_submitted; struct usb_anchor mgmt_submitted; struct sk_buff *remain_skb; char fw_name[32]; int fw_minor_index; int rx_remain_len; int rx_pkt_len; int rx_transfer_len; int rx_pad_len; spinlock_t rx_lock; u8 flags; /* HIF_USB_* */ }; int ath9k_hif_usb_init(void); void ath9k_hif_usb_exit(void); void ath9k_hif_usb_dealloc_urbs(struct hif_device_usb *hif_dev); #endif /* HTC_USB_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
You can’t perform that action at this time.