Commit Graph

244405 Commits

Author SHA1 Message Date
Joe Perches
482e3febc2 via-rhine: Assign random MAC address if necessary
Roger Luethi has had several reports of Rhine NICs providing
an invalid MAC address.  If so, assign a random MAC address so
the hardware can still be used.

Tested as a standalone interface, as carrier for ppp, and as a
bonding slave.

Original-patch-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:56:37 -07:00
Joe Perches
df4511feb7 via_rhine: Use netdev_<level> and pr_<level>
Use the more current logging styles.

Add #define DEBUG to make netdev_dbg always active.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:56:36 -07:00
Stephen Hemminger
28674b97cf bridge: fix accidental creation of sysfs directory
Commit bb900b27a2 ("bridge: allow
creating bridge devices with netlink") introduced a bug in net-next
because of a typo in notifier. Every device would have the sysfs
bridge directory (and files).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:52:51 -07:00
Michał Mirosław
2ed28baa70 net: cxgb4{,vf}: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:51:32 -07:00
Thiago Farina
c582a950b1 drivers/net/usb/usbnet.c: Use FIELD_SIZEOF macro in usbnet_init() function.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:49:21 -07:00
Michał Mirosław
5e4011e2b8 net: ibm_newemac: convert to hw_features
Side effect: allow toggling of TX offloads.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:47:36 -07:00
Michał Mirosław
131ae32970 net: greth: convert to hw_features
Note: Driver modifies its struct net_device_ops. This will break if used for
multiple devices that are not all the same (if that HW config is possible).

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:47:36 -07:00
Michał Mirosław
3cd8ef4b60 net: niu: convert to hw_features
Side effect: allow toggling of TX offloads.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:47:35 -07:00
Michał Mirosław
f4786a9625 net: ehea: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:47:35 -07:00
Michał Mirosław
66a1c54132 net: benet: convert to hw_features - fixup
Remove be_set_flags() as it's already covered by hw_features.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Ajit Khaparde ajit.khaparde@emulex.com
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:47:34 -07:00
Michał Mirosław
86688a8f13 net: typhoon: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:47:34 -07:00
Michał Mirosław
aad59c431b net: mv643xx: convert to hw_features
Side effect: don't reenable RXCSUM on every ifdown/ifup.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:47:33 -07:00
Michał Mirosław
eea3250b43 net: tehuti: convert to hw_features
As a side effect, make TX offloads changeable.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:47:33 -07:00
Michał Mirosław
d2fe275534 net: cxgb3: convert to hw_features
This removes some of the remnants of LRO -> GRO conversion.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:40:25 -07:00
Michał Mirosław
3918764666 net: macvlan: convert to hw_features
Not much of a conversion anyway - macvlan has no way to change the offload
settings independently to its base device.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:40:24 -07:00
David S. Miller
9c6bc16577 Merge branch 'batman-adv/next' of git://git.open-mesh.org/ecsv/linux-merge 2011-04-17 17:37:29 -07:00
David S. Miller
03746b0a02 be2net: Fix unused-but-set variables.
The variables 'tx_min' and 'tx_max' are set but not used in
be_set_coalesce().

Similarly for 'region' in be_do_flash().

Just kill them off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:08:41 -07:00
David S. Miller
9365f11a53 isdn: i4l: isdn_tty: Fix unused-but-set variables.
The variable 'fcr' is set but not used in isdn_tty_change_speed().

Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:07:57 -07:00
David S. Miller
b169f6db40 netfilter: ip6table_mangle: Fix set-but-unused variables.
The variable 'flowlabel' is set but unused in ip6t_mangle_out().

The intention here was to compare this key to the header value after
mangling, and trigger a route lookup on mismatch.

Make it so.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:06:15 -07:00
David S. Miller
f3c85dd560 netfilter: ip6_tables: Fix set-but-unused variables.
The variable 'target' is set but unused in compat_copy_entry_from_user().

Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:04:48 -07:00
David S. Miller
d88d7de098 netfilter: nf_conntrack_standalone: Fix set-but-unused variables.
The variable 'ret' is set but unused in ct_seq_show().

This was obviously meant to be used to propagate error codes
to the caller, so make it so.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:03:33 -07:00
David S. Miller
d87d7fb381 netfilter: nfnetlink_log: Fix set-but-unused variables.
The variable 'tmp_uint' is set but unused in __build_packet_message().

Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:02:51 -07:00
David S. Miller
dab51d0e07 netlabel: Fix set-but-unused variables.
The variable 'type_str' is set but unused in netlbl_cipsov4_add().

Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:01:49 -07:00
David S. Miller
8cb4901447 l2tp: Fix set-but-unused variables.
The variable 'ret' is set but unused in l2tp_nl_register_ops().

This was obviously meant to maintain error codes which are
returned to the caller, make it so.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 17:01:05 -07:00
David S. Miller
6385969b32 irda: irproc: Fix set-but-unused variables.
The variable 'd' is set but unused in irda_proc_register().

Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:59:50 -07:00
David S. Miller
1627ea35cb irda: irlap_event: Fix set-but-unused variables.
The variable 'ret' is set but unused in irlap_state_sclose().

Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:59:09 -07:00
David S. Miller
056693a38e caif: Fix set-but-unused variables.
The variable 'caifdef' is set but unused in modemcmd().

Similarly for 'net' in receive(), and 'res' in
caif_device_notify() and caif_exit_net().

Just kill them off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:57:55 -07:00
David S. Miller
b8ee8328ba bnx2x: Fix set-but-unused variables.
The variable 'rc' is set but unused in bnx2x_timer().

Similarly for 'hc_index_p' in bnx2x_init_sb(), and 'port' in
bnx2x_get_hwinfo().

Just kill them off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:56:12 -07:00
David S. Miller
5859854290 bna: Fix set-but-unused variables.
The variable 'pgoff' is set but unused in bfa_nw_ioc_fwver_get()
and bfa_ioc_download_fw().

Similarly for 'cmd_h' in bna_mbox_flush_q and the entirety of
bna_rit_mod_uninit() is unused since variables are purely set but no
action is made using them.

Same for 'bna' in bna_rit_create() and 'ret' in bna_rx_create().

Just kill them off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:54:08 -07:00
David S. Miller
81b424d9e2 isdn: mISDN: socket: Fix set-but-unused variables.
The variable 'len' is set but unused in data_sock_getsockopt().

The code should use 'len' to validate that the user's socket option is
indeed the right size.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:48:53 -07:00
David S. Miller
07f46f80f4 isdn: i4l: isdn_net: Fix set-but-unused variables.
The variable 'unused' is set but unused in
isdn_net_ciscohdlck_slarp_in().  Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:46:50 -07:00
David S. Miller
50a7c114c2 isdn: i4l: isdn_common: Fix set-but-unused variables.
The variable 'ch' is set but unused in isdn_capi_rec_hl_msg().  Just
kill it off.

Similarly for 'chidx' in isdn_ioctl() and 'di' in
isdn_capi_rec_hl_msg().

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:45:51 -07:00
David S. Miller
8c85290d84 isdn: teles_cs: Fix set-but-unused variables.
The variable 'dev' is set but unused in teles_cs_config().  Just
kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:44:12 -07:00
David S. Miller
1397c5df25 isdn: l3ni1: Fix set-but-unused variables.
The variable 'cause' is set but unused in ni1up().  Just
kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:43:20 -07:00
David S. Miller
cf117eafa0 isdn: l3dss1: Fix set-but-unused variables.
The variable 'cause' is set but unused in dss1up().  Just
kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:42:15 -07:00
David S. Miller
f6f0e4a7a3 isdn: jade: Fix set-but-unused variables.
The variable 'i' is set but unused in JadeVersion().  Just
kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:41:29 -07:00
David S. Miller
d462003ddb isdn: ipacx: Fix set-but-unused variables.
The variable 'cda2_cr' is set but unused in ctrl_complete().  Just
kill it off.

Keep the cs->readisac() call just in case the register read has side
effects.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:40:40 -07:00
David S. Miller
a1e6216d1b isdn: hfc_usb: Fix set-but-unused variables.
The variable 'buf' is set but unused in
ctrl_complete().  Just kill it off.

Similarly for 'err' in hfc_usb_init().

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:39:18 -07:00
David S. Miller
db47367451 isdn: elsa_ser: Fix set-but-unused variables.
The variable 'bits' is set but unused in
change_speed().  Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:38:33 -07:00
David S. Miller
94dbe1ae44 isdn: elsa_cs: Fix set-but-unused variables.
The variable 'dev' is set but unused in
elsa_cs_config().  Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:38:03 -07:00
David S. Miller
011bc1ef44 isdn: arcofi: Fix set-but-unused variables.
The variable 'val' is set but unused in
send_arcofi().  Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:36:28 -07:00
David S. Miller
3c76c58fca isdn: hfcsusb: Fix set-but-unused variables.
The variable 'buf' is set but unused in
ctrl_complete().  Just kill it off.

Similarly for the variable 'err' in setup_hfcsusb().

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:35:27 -07:00
David S. Miller
a719e0a81f isdn: hfcpci: Fix set-but-unused variables.
The variable 'total' is set but unused in
hfcpci_empty_bfifo().  Just kill it off.

Similarly for the variable 'val' in ph_state_nt().

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:34:50 -07:00
David S. Miller
2d09d56712 isdn: eicon: Fix set-but-unused variables.
The variable 'best_id' is set but unused in
diva_mnt_add_xdi_adapter().  Just kill it off.

Similarly for the variable 'CIP' in connect_req(), 'Number' in
sig_ind(), 'Info' in dtmf_confirmation() mixer_command()
fax_connect_ack_command() fax_edata_ack_command()
rtp_connect_b3_res_command() and rtp_connect_b3_res_command(), and 'a'
in mixer_indication_coefs_set(),

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:31:33 -07:00
David S. Miller
a713c3bbb5 isdn: gigaset: Fix set-but-unused variable.
The variable 'offset' is set but unused in
write_iso_tasklet().  Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 16:22:33 -07:00
Andrew Lunn
af20b71047 batman-adv: Set the txqueuelen to zero when creating soft interface
Like other virtual interfaces, e.g. br0, we don't need a transmit
queue. Packets should only be queued on real interfaces which are
underneath. In practice this patch makes little difference since the
virtual interfaces can accept packets as fast as they come, but the
patch will avoid bufferbloat questions to the mailling lists in the
future.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2011-04-17 21:11:02 +02:00
Simon Wunderlich
ba85fac280 batman-adv: protect softif_neigh by rcu
Add get/set wrapper functions for softif_neigh and
use rcu functions to manipulate the pointers.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2011-04-17 21:11:02 +02:00
Marek Lindner
c4aac1ab9b batman-adv: concentrate all curr_gw related rcu operations in select/deselect functions
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2011-04-17 21:11:01 +02:00
Linus Lüssing
68003903e4 batman-adv: Protect global TQ window with a spinlock
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2011-04-17 21:11:01 +02:00
Linus Lüssing
e1a5382f97 batman-adv: Make orig_node->router an rcu protected pointer
The rcu protected macros rcu_dereference() and rcu_assign_pointer()
for the orig_node->router need to be used, as well as spin/rcu locking.
Otherwise we might end up using a router pointer pointing to already
freed memory.

Therefore this commit introduces the safe getter method
orig_node_get_router().

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2011-04-17 21:11:01 +02:00