Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
xcap
xcap-capability-linux
Commits
22f6dacd
Commit
22f6dacd
authored
May 08, 2009
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: include/net/tcp.h
parents
928f308f
9b05126b
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
612 additions
and
173 deletions
+612
-173
drivers/net/bnx2.c
drivers/net/bnx2.c
+4
-2
drivers/net/bonding/bond_alb.c
drivers/net/bonding/bond_alb.c
+3
-9
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_main.c
+1
-1
drivers/net/ehea/ehea.h
drivers/net/ehea/ehea.h
+1
-1
drivers/net/ehea/ehea_main.c
drivers/net/ehea/ehea_main.c
+18
-13
drivers/net/igb/igb_main.c
drivers/net/igb/igb_main.c
+5
-7
drivers/net/usb/Kconfig
drivers/net/usb/Kconfig
+14
-0
drivers/net/usb/Makefile
drivers/net/usb/Makefile
+1
-0
drivers/net/usb/cdc_eem.c
drivers/net/usb/cdc_eem.c
+381
-0
drivers/net/wireless/iwlwifi/iwl-sta.c
drivers/net/wireless/iwlwifi/iwl-sta.c
+11
-10
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
+0
-1
include/linux/netfilter/xt_LED.h
include/linux/netfilter/xt_LED.h
+2
-0
include/linux/netfilter/xt_cluster.h
include/linux/netfilter/xt_cluster.h
+2
-0
include/linux/usb/cdc.h
include/linux/usb/cdc.h
+3
-0
include/net/bluetooth/hci_core.h
include/net/bluetooth/hci_core.h
+1
-0
include/net/tcp.h
include/net/tcp.h
+13
-1
net/Kconfig
net/Kconfig
+0
-6
net/bluetooth/hci_conn.c
net/bluetooth/hci_conn.c
+2
-0
net/bluetooth/hci_sysfs.c
net/bluetooth/hci_sysfs.c
+39
-34
net/core/skbuff.c
net/core/skbuff.c
+2
-0
net/ipv4/tcp_input.c
net/ipv4/tcp_input.c
+0
-10
net/ipv6/netfilter/ip6t_ipv6header.c
net/ipv6/netfilter/ip6t_ipv6header.c
+3
-3
net/mac80211/rc80211_minstrel.c
net/mac80211/rc80211_minstrel.c
+1
-1
net/mac80211/rc80211_pid_algo.c
net/mac80211/rc80211_pid_algo.c
+39
-34
net/mac80211/tx.c
net/mac80211/tx.c
+1
-1
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_netlink.c
+20
-28
net/netfilter/xt_cluster.c
net/netfilter/xt_cluster.c
+7
-1
net/sched/sch_fifo.c
net/sched/sch_fifo.c
+1
-1
net/wimax/op-msg.c
net/wimax/op-msg.c
+6
-5
net/wimax/stack.c
net/wimax/stack.c
+15
-2
net/wireless/reg.c
net/wireless/reg.c
+15
-2
net/wireless/scan.c
net/wireless/scan.c
+1
-0
No files found.
drivers/net/bnx2.c
View file @
22f6dacd
...
...
@@ -54,8 +54,8 @@
#define DRV_MODULE_NAME "bnx2"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "2.0.
0
"
#define DRV_MODULE_RELDATE "
April 2
, 2009"
#define DRV_MODULE_VERSION "2.0.
1
"
#define DRV_MODULE_RELDATE "
May 6
, 2009"
#define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-4.6.16.fw"
#define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-4.6.16.fw"
#define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-4.6.17.fw"
...
...
@@ -2600,6 +2600,7 @@ bnx2_get_hw_tx_cons(struct bnx2_napi *bnapi)
/* Tell compiler that status block fields can change. */
barrier
();
cons
=
*
bnapi
->
hw_tx_cons_ptr
;
barrier
();
if
(
unlikely
((
cons
&
MAX_TX_DESC_CNT
)
==
MAX_TX_DESC_CNT
))
cons
++
;
return
cons
;
...
...
@@ -2879,6 +2880,7 @@ bnx2_get_hw_rx_cons(struct bnx2_napi *bnapi)
/* Tell compiler that status block fields can change. */
barrier
();
cons
=
*
bnapi
->
hw_rx_cons_ptr
;
barrier
();
if
(
unlikely
((
cons
&
MAX_RX_DESC_CNT
)
==
MAX_RX_DESC_CNT
))
cons
++
;
return
cons
;
...
...
drivers/net/bonding/bond_alb.c
View file @
22f6dacd
...
...
@@ -1706,10 +1706,8 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
* Called with RTNL
*/
int
bond_alb_set_mac_address
(
struct
net_device
*
bond_dev
,
void
*
addr
)
__releases
(
&
bond
->
curr_slave_lock
)
__releases
(
&
bond
->
lock
)
__acquires
(
&
bond
->
lock
)
__
acquir
es
(
&
bond
->
curr_slave_
lock
)
__
releas
es
(
&
bond
->
lock
)
{
struct
bonding
*
bond
=
netdev_priv
(
bond_dev
);
struct
sockaddr
*
sa
=
addr
;
...
...
@@ -1745,9 +1743,6 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
}
}
write_unlock_bh
(
&
bond
->
curr_slave_lock
);
read_unlock
(
&
bond
->
lock
);
if
(
swap_slave
)
{
alb_swap_mac_addr
(
bond
,
swap_slave
,
bond
->
curr_active_slave
);
alb_fasten_mac_swap
(
bond
,
swap_slave
,
bond
->
curr_active_slave
);
...
...
@@ -1755,16 +1750,15 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
alb_set_slave_mac_addr
(
bond
->
curr_active_slave
,
bond_dev
->
dev_addr
,
bond
->
alb_info
.
rlb_enabled
);
read_lock
(
&
bond
->
lock
);
alb_send_learning_packets
(
bond
->
curr_active_slave
,
bond_dev
->
dev_addr
);
if
(
bond
->
alb_info
.
rlb_enabled
)
{
/* inform clients mac address has changed */
rlb_req_update_slave_clients
(
bond
,
bond
->
curr_active_slave
);
}
read_unlock
(
&
bond
->
lock
);
}
read_lock
(
&
bond
->
lock
);
write_lock_bh
(
&
bond
->
curr_slave_lock
);
return
0
;
}
...
...
drivers/net/e1000/e1000_main.c
View file @
22f6dacd
...
...
@@ -3741,7 +3741,7 @@ static irqreturn_t e1000_intr(int irq, void *data)
struct
e1000_hw
*
hw
=
&
adapter
->
hw
;
u32
rctl
,
icr
=
er32
(
ICR
);
if
(
unlikely
((
!
icr
)
||
test_bit
(
__E1000_
RESETTING
,
&
adapter
->
flags
)))
if
(
unlikely
((
!
icr
)
||
test_bit
(
__E1000_
DOWN
,
&
adapter
->
flags
)))
return
IRQ_NONE
;
/* Not our interrupt */
/* IMS will not auto-mask if INT_ASSERTED is not set, and if it is
...
...
drivers/net/ehea/ehea.h
View file @
22f6dacd
...
...
@@ -40,7 +40,7 @@
#include <asm/io.h>
#define DRV_NAME "ehea"
#define DRV_VERSION "EHEA_010
0
"
#define DRV_VERSION "EHEA_010
1
"
/* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
...
...
drivers/net/ehea/ehea_main.c
View file @
22f6dacd
...
...
@@ -545,14 +545,17 @@ static inline struct sk_buff *get_skb_by_index(struct sk_buff **skb_array,
x
&=
(
arr_len
-
1
);
pref
=
skb_array
[
x
];
prefetchw
(
pref
);
prefetchw
(
pref
+
EHEA_CACHE_LINE
);
pref
=
(
skb_array
[
x
]
->
data
);
prefetch
(
pref
);
prefetch
(
pref
+
EHEA_CACHE_LINE
);
prefetch
(
pref
+
EHEA_CACHE_LINE
*
2
);
prefetch
(
pref
+
EHEA_CACHE_LINE
*
3
);
if
(
pref
)
{
prefetchw
(
pref
);
prefetchw
(
pref
+
EHEA_CACHE_LINE
);
pref
=
(
skb_array
[
x
]
->
data
);
prefetch
(
pref
);
prefetch
(
pref
+
EHEA_CACHE_LINE
);
prefetch
(
pref
+
EHEA_CACHE_LINE
*
2
);
prefetch
(
pref
+
EHEA_CACHE_LINE
*
3
);
}
skb
=
skb_array
[
skb_index
];
skb_array
[
skb_index
]
=
NULL
;
return
skb
;
...
...
@@ -569,12 +572,14 @@ static inline struct sk_buff *get_skb_by_index_ll(struct sk_buff **skb_array,
x
&=
(
arr_len
-
1
);
pref
=
skb_array
[
x
];
prefetchw
(
pref
);
prefetchw
(
pref
+
EHEA_CACHE_LINE
);
if
(
pref
)
{
prefetchw
(
pref
);
prefetchw
(
pref
+
EHEA_CACHE_LINE
);
pref
=
(
skb_array
[
x
]
->
data
);
prefetchw
(
pref
);
prefetchw
(
pref
+
EHEA_CACHE_LINE
);
pref
=
(
skb_array
[
x
]
->
data
);
prefetchw
(
pref
);
prefetchw
(
pref
+
EHEA_CACHE_LINE
);
}
skb
=
skb_array
[
wqe_index
];
skb_array
[
wqe_index
]
=
NULL
;
...
...
drivers/net/igb/igb_main.c
View file @
22f6dacd
...
...
@@ -2010,7 +2010,7 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
struct
e1000_hw
*
hw
=
&
adapter
->
hw
;
u32
rctl
;
u32
srrctl
=
0
;
int
i
,
j
;
int
i
;
rctl
=
rd32
(
E1000_RCTL
);
...
...
@@ -2075,8 +2075,6 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
if
(
adapter
->
vfs_allocated_count
)
{
u32
vmolr
;
j
=
adapter
->
rx_ring
[
0
].
reg_idx
;
/* set all queue drop enable bits */
wr32
(
E1000_QDE
,
ALL_QUEUES
);
srrctl
|=
E1000_SRRCTL_DROP_EN
;
...
...
@@ -2084,16 +2082,16 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
/* disable queue 0 to prevent tail write w/o re-config */
wr32
(
E1000_RXDCTL
(
0
),
0
);
vmolr
=
rd32
(
E1000_VMOLR
(
j
));
vmolr
=
rd32
(
E1000_VMOLR
(
adapter
->
vfs_allocated_count
));
if
(
rctl
&
E1000_RCTL_LPE
)
vmolr
|=
E1000_VMOLR_LPE
;
if
(
adapter
->
num_rx_queues
>
0
)
if
(
adapter
->
num_rx_queues
>
1
)
vmolr
|=
E1000_VMOLR_RSSE
;
wr32
(
E1000_VMOLR
(
j
),
vmolr
);
wr32
(
E1000_VMOLR
(
adapter
->
vfs_allocated_count
),
vmolr
);
}
for
(
i
=
0
;
i
<
adapter
->
num_rx_queues
;
i
++
)
{
j
=
adapter
->
rx_ring
[
i
].
reg_idx
;
int
j
=
adapter
->
rx_ring
[
i
].
reg_idx
;
wr32
(
E1000_SRRCTL
(
j
),
srrctl
);
}
...
...
drivers/net/usb/Kconfig
View file @
22f6dacd
...
...
@@ -180,6 +180,20 @@ config USB_NET_CDCETHER
IEEE 802 "local assignment" bit is set in the address, a "usbX"
name is used instead.
config USB_NET_CDC_EEM
tristate "CDC EEM support"
depends on USB_USBNET && EXPERIMENTAL
help
This option supports devices conforming to the Communication Device
Class (CDC) Ethernet Emulation Model, a specification that's easy to
implement in device firmware. The CDC EEM specifications are available
from <http://www.usb.org/>.
This driver creates an interface named "ethX", where X depends on
what other networking devices you have in use. However, if the
IEEE 802 "local assignment" bit is set in the address, a "usbX"
name is used instead.
config USB_NET_DM9601
tristate "Davicom DM9601 based USB 1.1 10/100 ethernet devices"
depends on USB_USBNET
...
...
drivers/net/usb/Makefile
View file @
22f6dacd
...
...
@@ -9,6 +9,7 @@ obj-$(CONFIG_USB_RTL8150) += rtl8150.o
obj-$(CONFIG_USB_HSO)
+=
hso.o
obj-$(CONFIG_USB_NET_AX8817X)
+=
asix.o
obj-$(CONFIG_USB_NET_CDCETHER)
+=
cdc_ether.o
obj-$(CONFIG_USB_NET_CDC_EEM)
+=
cdc_eem.o
obj-$(CONFIG_USB_NET_DM9601)
+=
dm9601.o
obj-$(CONFIG_USB_NET_SMSC95XX)
+=
smsc95xx.o
obj-$(CONFIG_USB_NET_GL620A)
+=
gl620a.o
...
...
drivers/net/usb/cdc_eem.c
0 → 100644
View file @
22f6dacd
/*
* USB CDC EEM network interface driver
* Copyright (C) 2009 Oberthur Technologies
* by Omar Laazimani, Olivier Condemine
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ctype.h>
#include <linux/ethtool.h>
#include <linux/workqueue.h>
#include <linux/mii.h>
#include <linux/usb.h>
#include <linux/crc32.h>
#include <linux/usb/cdc.h>
#include <linux/usb/usbnet.h>
/*
* This driver is an implementation of the CDC "Ethernet Emulation
* Model" (EEM) specification, which encapsulates Ethernet frames
* for transport over USB using a simpler USB device model than the
* previous CDC "Ethernet Control Model" (ECM, or "CDC Ethernet").
*
* For details, see www.usb.org/developers/devclass_docs/CDC_EEM10.pdf
*
* This version has been tested with GIGAntIC WuaoW SIM Smart Card on 2.6.24,
* 2.6.27 and 2.6.30rc2 kernel.
* It has also been validated on Openmoko Om 2008.12 (based on 2.6.24 kernel).
* build on 23-April-2009
*/
#define EEM_HEAD 2
/* 2 byte header */
/*-------------------------------------------------------------------------*/
static
void
eem_linkcmd_complete
(
struct
urb
*
urb
)
{
dev_kfree_skb
(
urb
->
context
);
usb_free_urb
(
urb
);
}
static
void
eem_linkcmd
(
struct
usbnet
*
dev
,
struct
sk_buff
*
skb
)
{
struct
urb
*
urb
;
int
status
;
urb
=
usb_alloc_urb
(
0
,
GFP_ATOMIC
);
if
(
!
urb
)
goto
fail
;
usb_fill_bulk_urb
(
urb
,
dev
->
udev
,
dev
->
out
,
skb
->
data
,
skb
->
len
,
eem_linkcmd_complete
,
skb
);
status
=
usb_submit_urb
(
urb
,
GFP_ATOMIC
);
if
(
status
)
{
usb_free_urb
(
urb
);
fail:
dev_kfree_skb
(
skb
);
devwarn
(
dev
,
"link cmd failure
\n
"
);
return
;
}
}
static
int
eem_bind
(
struct
usbnet
*
dev
,
struct
usb_interface
*
intf
)
{
int
status
=
0
;
status
=
usbnet_get_endpoints
(
dev
,
intf
);
if
(
status
<
0
)
{
usb_set_intfdata
(
intf
,
NULL
);
usb_driver_release_interface
(
driver_of
(
intf
),
intf
);
return
status
;
}
/* no jumbogram (16K) support for now */
dev
->
net
->
hard_header_len
+=
EEM_HEAD
+
ETH_FCS_LEN
;
return
0
;
}
/*
* EEM permits packing multiple Ethernet frames into USB transfers
* (a "bundle"), but for TX we don't try to do that.
*/
static
struct
sk_buff
*
eem_tx_fixup
(
struct
usbnet
*
dev
,
struct
sk_buff
*
skb
,
gfp_t
flags
)
{
struct
sk_buff
*
skb2
=
NULL
;
u16
len
=
skb
->
len
;
u32
crc
=
0
;
int
padlen
=
0
;
/* When ((len + EEM_HEAD + ETH_FCS_LEN) % dev->maxpacket) is
* zero, stick two bytes of zero length EEM packet on the end.
* Else the framework would add invalid single byte padding,
* since it can't know whether ZLPs will be handled right by
* all the relevant hardware and software.
*/
if
(
!
((
len
+
EEM_HEAD
+
ETH_FCS_LEN
)
%
dev
->
maxpacket
))
padlen
+=
2
;
if
(
!
skb_cloned
(
skb
))
{
int
headroom
=
skb_headroom
(
skb
);
int
tailroom
=
skb_tailroom
(
skb
);
if
((
tailroom
>=
ETH_FCS_LEN
+
padlen
)
&&
(
headroom
>=
EEM_HEAD
))
goto
done
;
if
((
headroom
+
tailroom
)
>
(
EEM_HEAD
+
ETH_FCS_LEN
+
padlen
))
{
skb
->
data
=
memmove
(
skb
->
head
+
EEM_HEAD
,
skb
->
data
,
skb
->
len
);
skb_set_tail_pointer
(
skb
,
len
);
goto
done
;
}
}
skb2
=
skb_copy_expand
(
skb
,
EEM_HEAD
,
ETH_FCS_LEN
+
padlen
,
flags
);
if
(
!
skb2
)
return
NULL
;
dev_kfree_skb_any
(
skb
);
skb
=
skb2
;
done:
/* we don't use the "no Ethernet CRC" option */
crc
=
crc32_le
(
~
0
,
skb
->
data
,
skb
->
len
);
crc
=
~
crc
;
put_unaligned_le32
(
crc
,
skb_put
(
skb
,
4
));
/* EEM packet header format:
* b0..13: length of ethernet frame
* b14: bmCRC (1 == valid Ethernet CRC)
* b15: bmType (0 == data)
*/
len
=
skb
->
len
;
put_unaligned_le16
(
BIT
(
14
)
|
len
,
skb_push
(
skb
,
2
));
/* Bundle a zero length EEM packet if needed */
if
(
padlen
)
put_unaligned_le16
(
0
,
skb_put
(
skb
,
2
));
return
skb
;
}
static
int
eem_rx_fixup
(
struct
usbnet
*
dev
,
struct
sk_buff
*
skb
)
{
/*
* Our task here is to strip off framing, leaving skb with one
* data frame for the usbnet framework code to process. But we
* may have received multiple EEM payloads, or command payloads.
* So we must process _everything_ as if it's a header, except
* maybe the last data payload
*
* REVISIT the framework needs updating so that when we consume
* all payloads (the last or only message was a command, or a
* zero length EEM packet) that is not accounted as an rx_error.
*/
do
{
struct
sk_buff
*
skb2
=
NULL
;
u16
header
;
u16
len
=
0
;
/* incomplete EEM header? */
if
(
skb
->
len
<
EEM_HEAD
)
return
0
;
/*
* EEM packet header format:
* b0..14: EEM type dependant (Data or Command)
* b15: bmType
*/
header
=
get_unaligned_le16
(
skb
->
data
);
skb_pull
(
skb
,
EEM_HEAD
);
/*
* The bmType bit helps to denote when EEM
* packet is data or command :
* bmType = 0 : EEM data payload
* bmType = 1 : EEM (link) command
*/
if
(
header
&
BIT
(
15
))
{
u16
bmEEMCmd
;
/*
* EEM (link) command packet:
* b0..10: bmEEMCmdParam
* b11..13: bmEEMCmd
* b14: bmReserved (must be 0)
* b15: 1 (EEM command)
*/
if
(
header
&
BIT
(
14
))
{
devdbg
(
dev
,
"reserved command %04x
\n
"
,
header
);
continue
;
}
bmEEMCmd
=
(
header
>>
11
)
&
0x7
;
switch
(
bmEEMCmd
)
{
/* Responding to echo requests is mandatory. */
case
0
:
/* Echo command */
len
=
header
&
0x7FF
;
/* bogus command? */
if
(
skb
->
len
<
len
)
return
0
;
skb2
=
skb_clone
(
skb
,
GFP_ATOMIC
);
if
(
unlikely
(
!
skb2
))
goto
next
;
skb_trim
(
skb2
,
len
);
put_unaligned_le16
(
BIT
(
15
)
|
(
1
<<
11
)
|
len
,
skb_push
(
skb2
,
2
));
eem_linkcmd
(
dev
,
skb2
);
break
;
/*
* Host may choose to ignore hints.
* - suspend: peripheral ready to suspend
* - response: suggest N millisec polling
* - response complete: suggest N sec polling
*/
case
2
:
/* Suspend hint */
case
3
:
/* Response hint */
case
4
:
/* Response complete hint */
continue
;
/*
* Hosts should never receive host-to-peripheral
* or reserved command codes; or responses to an
* echo command we didn't send.
*/
case
1
:
/* Echo response */
case
5
:
/* Tickle */
default:
/* reserved */
devwarn
(
dev
,
"unexpected link command %d
\n
"
,
bmEEMCmd
);
continue
;
}
}
else
{
u32
crc
,
crc2
;
int
is_last
;
/* zero length EEM packet? */
if
(
header
==
0
)
continue
;
/*
* EEM data packet header :
* b0..13: length of ethernet frame
* b14: bmCRC
* b15: 0 (EEM data)
*/
len
=
header
&
0x3FFF
;
/* bogus EEM payload? */
if
(
skb
->
len
<
len
)
return
0
;
/* bogus ethernet frame? */
if
(
len
<
(
ETH_HLEN
+
ETH_FCS_LEN
))
goto
next
;
/*
* Treat the last payload differently: framework
* code expects our "fixup" to have stripped off
* headers, so "skb" is a data packet (or error).
* Else if it's not the last payload, keep "skb"
* for further processing.
*/
is_last
=
(
len
==
skb
->
len
);
if
(
is_last
)
skb2
=
skb
;
else
{
skb2
=
skb_clone
(
skb
,
GFP_ATOMIC
);
if
(
unlikely
(
!
skb2
))
return
0
;
}
crc
=
get_unaligned_le32
(
skb2
->
data
+
len
-
ETH_FCS_LEN
);
skb_trim
(
skb2
,
len
-
ETH_FCS_LEN
);
/*
* The bmCRC helps to denote when the CRC field in
* the Ethernet frame contains a calculated CRC:
* bmCRC = 1 : CRC is calculated
* bmCRC = 0 : CRC = 0xDEADBEEF
*/
if
(
header
&
BIT
(
14
))
crc2
=
~
crc32_le
(
~
0
,
skb2
->
data
,
len
);
else
crc2
=
0xdeadbeef
;
if
(
is_last
)
return
crc
==
crc2
;
if
(
unlikely
(
crc
!=
crc2
))
{
dev
->
stats
.
rx_errors
++
;
dev_kfree_skb_any
(
skb2
);
}
else
usbnet_skb_return
(
dev
,
skb2
);
}
next:
skb_pull
(
skb
,
len
);
}
while
(
skb
->
len
);
return
1
;
}
static
const
struct
driver_info
eem_info
=
{
.
description
=
"CDC EEM Device"
,
.
flags
=
FLAG_ETHER
,
.
bind
=
eem_bind
,
.
rx_fixup
=
eem_rx_fixup
,
.
tx_fixup
=
eem_tx_fixup
,
};
/*-------------------------------------------------------------------------*/
static
const
struct
usb_device_id
products
[]
=
{
{
USB_INTERFACE_INFO
(
USB_CLASS_COMM
,
USB_CDC_SUBCLASS_EEM
,
USB_CDC_PROTO_EEM
),
.
driver_info
=
(
unsigned
long
)
&
eem_info
,
},
{
/* EMPTY == end of list */
},
};
MODULE_DEVICE_TABLE
(
usb
,
products
);
static
struct
usb_driver
eem_driver
=
{
.
name
=
"cdc_eem"
,
.
id_table
=
products
,
.
probe
=
usbnet_probe
,
.
disconnect
=
usbnet_disconnect
,
.
suspend
=
usbnet_suspend
,
.
resume
=
usbnet_resume
,
};
static
int
__init
eem_init
(
void
)
{
return
usb_register
(
&
eem_driver
);
}
module_init
(
eem_init
);
static
void
__exit
eem_exit
(
void
)
{
usb_deregister
(
&
eem_driver
);
}
module_exit
(
eem_exit
);
MODULE_AUTHOR
(
"Omar Laazimani <omar.oberthur@gmail.com>"
);
MODULE_DESCRIPTION
(
"USB CDC EEM"
);
MODULE_LICENSE
(
"GPL"
);
drivers/net/wireless/iwlwifi/iwl-sta.c
View file @
22f6dacd
...
...
@@ -719,6 +719,14 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
{
unsigned
long
flags
;
int
ret
=
0
;
__le16
key_flags
=
0
;
key_flags
|=
(
STA_KEY_FLG_TKIP
|
STA_KEY_FLG_MAP_KEY_MSK
);
key_flags
|=
cpu_to_le16
(
keyconf
->
keyidx
<<
STA_KEY_FLG_KEYID_POS
);
key_flags
&=
~
STA_KEY_FLG_INVALID
;
if
(
sta_id
==
priv
->
hw_params
.
bcast_sta_id
)
key_flags
|=
STA_KEY_MULTICAST_MSK
;
keyconf
->
flags
|=
IEEE80211_KEY_FLAG_GENERATE_IV
;
keyconf
->
flags
|=
IEEE80211_KEY_FLAG_GENERATE_MMIC
;
...
...
@@ -738,6 +746,9 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
WARN
(
priv
->
stations
[
sta_id
].
sta
.
key
.
key_offset
==
WEP_INVALID_OFFSET
,
"no space for a new key"
);
priv
->
stations
[
sta_id
].
sta
.
key
.
key_flags
=
key_flags
;
/* This copy is acutally not needed: we get the key with each TX */
memcpy
(
priv
->
stations
[
sta_id
].
keyinfo
.
key
,
keyconf
->
key
,
16
);
...
...
@@ -754,9 +765,7 @@ void iwl_update_tkip_key(struct iwl_priv *priv,
{
u8
sta_id
=
IWL_INVALID_STATION
;
unsigned
long
flags
;
__le16
key_flags
=
0
;
int
i
;
DECLARE_MAC_BUF
(
mac
);
sta_id
=
priv
->
cfg
->
ops
->
smgmt
->
find_station
(
priv
,
addr
);
if
(
sta_id
==
IWL_INVALID_STATION
)
{
...
...
@@ -771,16 +780,8 @@ void iwl_update_tkip_key(struct iwl_priv *priv,