linux/drivers/net
Bjørn Mork 03304bcb5e net: qmi_wwan: use fixed interface number matching
This driver support many composite USB devices where the
interface class/subclass/protocol provides no information
about the interface function. Interfaces with different
functions may all use ff/ff/ff, like this example of
a device with three serial interfaces and three QMI/wwan
interfaces:

T:  Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=116 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1199 ProdID=68a2 Rev= 0.06
S:  Manufacturer=Sierra Wireless, Incorporated
S:  Product=MC7710
S:  SerialNumber=3581780xxxxxx
C:* #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#=19 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=87(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#=20 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=89(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms

Instead of class/subclass/protocol the vendor use fixed
interface numbers for each function, and the Windows
drivers use these numbers to match driver and function.

The driver has had its own interface number whitelisting
code to simulate this functionality.  Replace this with
generic interface number matching now that the USB subsystem
support is there. This
 - removes the need for a driver_info structure per
   interface number,
 - avoids running the probe function for unsupported
   interfaces, and
 - simplifies the code.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-14 14:45:06 -07:00
..
appletalk net: Use PTR_RET rather than if(IS_ERR(.. [1] 2012-08-06 13:30:02 -07:00
arcnet
bonding netpoll: check netpoll tx status on the right device 2012-08-14 14:33:32 -07:00
caif caif: fix NULL pointer check 2012-07-24 13:54:16 -07:00
can net/c_can: remove conditional compilation of clk code 2012-07-30 17:25:12 -07:00
cris cris: fix eth_v10.c build error 2012-08-03 20:32:31 -07:00
dsa
ethernet bnx2x: Fix compiler warnings 2012-08-12 13:42:18 -07:00
fddi
hamradio
hippi
hyperv hyperv: Move wait completion msg code into rndis_filter_halt_device() 2012-08-03 16:51:11 -07:00
irda drivers: net: irda: bfin_sir: fix compile error 2012-08-08 15:40:25 -07:00
phy drivers/net/phy/mdio-mux-gpio.c: drop devm_kfree of devm_kzalloc'd data 2012-08-06 13:24:27 -07:00
plip
ppp pptp: lookup route with the proper net namespace 2012-08-08 15:57:10 -07:00
slip
team netpoll: use GFP_ATOMIC in slave_enable_netpoll() and __netpoll_setup() 2012-08-14 14:33:30 -07:00
usb net: qmi_wwan: use fixed interface number matching 2012-08-14 14:45:06 -07:00
vmxnet3
wan
wimax wimax: fix printk format warnings 2012-07-22 12:18:39 -07:00
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2012-08-10 14:05:38 -04:00
xen-netback xen/netback: only non-freed SKB is queued into tx_queue 2012-06-29 00:50:20 -07:00
dummy.c net: fix race condition in several drivers when reading stats 2012-07-22 12:12:32 -07:00
eql.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c net: fix race condition in several drivers when reading stats 2012-07-22 12:12:32 -07:00
macvlan.c
macvtap.c macvtap: rcu_dereference outside read-lock section 2012-08-12 13:40:48 -07:00
Makefile
mdio.c
mii.c
netconsole.c netconsole: do not release spin_lock when calling __netpoll_cleanup 2012-08-14 14:33:31 -07:00
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c tun: don't zeroize sock->file on detach 2012-08-09 16:16:14 -07:00
veth.c
virtio_net.c net: fix race condition in several drivers when reading stats 2012-07-22 12:12:32 -07:00
xen-netfront.c xen/netfront: teardown the device before unregistering it. 2012-06-27 01:25:41 -07:00