Commit Graph

244504 Commits (5f8629c526b4f7e529a6d27bbd802c0dc7fcc357)

Author SHA1 Message Date
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
Linus Lüssing 57f0c07c4d batman-adv: Simplify gw_check_election(), use gw_get_selected()
gw_get_selected() can get us the desired orig_node directly, therefore
reusing that function in gw_check_election().

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 4c80485057 batman-adv: Make gateway_get_selected type safe
Make the return value explicit instead of (void *).

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 551586292b batman-adv: Move bonding / iface alternating router search to own functions
This decreases the size of find_router() by outsourcing the router
search for the bonding and interface alternating modes to their own sub
functions. This shall make it easier to keep track of the correct
refcounting later.

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:00 +02:00
David S. Miller 0c78641d7f atl1c: Fix set-but-unused variable.
The variable 'extra_size' is set but unused in
atl1c_configure_tx().  Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:55:20 -07:00
David S. Miller c96922c7be atl1e: Fix set-but-unused variable.
The variable 'tx_ring' is set but unused in
atl1e_init_ring_resources().  Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:54:51 -07:00
David S. Miller f8dfc4528b atlx: Fix set-but-unused variable.
The variable 'tpc' is set but unused in atl1_intr_tx().
Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:51:40 -07:00
David S. Miller 7d038eb6dc bonding: Fix set-but-unused variable.
The variable 'vlan_dev' is set but unused in
bond_send_gratuitous_arp().  Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:50:58 -07:00
David S. Miller 9e5ebaf852 atm: lec: Fix set-but-unused variables.
The variable 'eth' is set but unused in lec_handle_bridge().  Also,
the variable 'priv' is set but unused in lane_module_cleanup().

Just kill them off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:48:36 -07:00
David S. Miller d8f969e603 ax25: Fix set-but-unused variable.
The variable 's' is set but unused in ax25_protocol_release().
Just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:48:31 -07:00
David S. Miller b3b8dc51c1 econet: Fix set-but-unused variable.
#if 0'd out code for IP handling in aun_data_available() has
been commented out since the beginning, which makes the variable
"ip" set but not used.

Kill it off as well as the stub code.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:15:22 -07:00
David S. Miller 9bf9055eb7 decnet: Fix set-but-unused variable.
"next" in dn_rebuild_zone() is set but not actually used,
kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:14:09 -07:00
David S. Miller 21f825e618 pktgen: Fix set-but-unused variable.
"iph" in pktgen_output_ipsec() is set but never actually
used.  Kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:13:16 -07:00
David S. Miller 06091ed6b8 atm: solos-pci: Fix set-but-unused variable.
This is just a readback to entire completion of a register
write, keep the readback but kill the unused variable.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:11:25 -07:00
David S. Miller edb4dcb717 atm: idt77252: Fix set-but-unused variables.
Two cases here:

1) idt77252_rx_raw() really does not make any use of the
   extracted PTI field of the atm header.

2) idt77252_collect_stat() only uses the register values
   in code which has been compiled out by a "NOTDEF" cpp
   test for more than 10 years.  Just kill this NOTDEF
   code entirely, but keep the register reads in case
   they have side effects.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:10:17 -07:00
David S. Miller e60c5e14fb atm: he: Fix undefined sequence points.
GCC complains in these queue index operations because we
perform operations of the form:

	x = some_operation(++x);

which is undefined.  Replace with:

	x = some_operation(x + 1);

which is well defined and provides the intended operation.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:07:55 -07:00
David S. Miller dd182574d8 atm: eni: Kill set-but-unused variables.
The variable eni_dev is initialized but never subsequently used in
these two functions.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17 00:03:38 -07:00
Michał Mirosław 8b3afe95e3 net: gianfar: convert to hw_features
Note: I bet that gfar_set_features() don't really need a full reset.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-15 15:50:41 -07:00
Michał Mirosław c8c64cff2c net: mlx4: 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-15 15:50:41 -07:00
Michał Mirosław 569e146396 net: forcedeth: convert to hw_features
This also fixes a race around np->txrxctl_bits while changing RXCSUM offload.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-15 15:50:40 -07:00
Michał Mirosław c88fcb3d82 net: dm9000: 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-15 15:50:40 -07:00
Michał Mirosław 6de240b7f7 net: spider_net: 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-15 15:50:39 -07:00
Rob Landley 911cb193f3 net: minor cleanup to net_namespace.c.
Inline a small static function that's only ever called from one place.

Signed-off-by: Rob Landley <rlandley@parallels.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-15 15:47:51 -07:00
Daniel Walter c3968a857a ipv6: RTA_PREFSRC support for ipv6 route source address selection
[ipv6] Add support for RTA_PREFSRC

This patch allows a user to select the preferred source address
for a specific IPv6-Route. It can be set via a netlink message
setting RTA_PREFSRC to a valid IPv6 address which must be
up on the device the route will be bound to.

Signed-off-by: Daniel Walter <dwalter@barracuda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-15 15:44:37 -07:00
Daniel Walter bd015928bb ipv6: ignore looped-back NA while dad is running
[ipv6] Ignore looped-back NAs while in Duplicate Address Detection

If we send an unsolicited NA shortly after bringing up an
IPv6 address, the duplicate address detection algorithm
fails and the ip stays in tentative mode forever.
This is due a missing check if the NA is looped-back to us.

Signed-off-by: Daniel Walter <dwalter@barracuda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-15 15:43:55 -07:00
Eric Dumazet c65353daf1 ip: ip_options_compile() resilient to NULL skb route
Scot Doyle demonstrated ip_options_compile() could be called with an skb
without an attached route, using a setup involving a bridge, netfilter,
and forged IP packets.

Let's make ip_options_compile() and ip_options_rcv_srr() a bit more
robust, instead of changing bridge/netfilter code.

With help from Hiroaki SHIMODA.

Reported-by: Scot Doyle <lkml@scotdoyle.com>
Tested-by: Scot Doyle <lkml@scotdoyle.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-14 23:26:02 -07:00
Ben Hutchings eb8aa72d4e rndis_host: Quirky devices are still 'point-to-point'
My changes in commit 4d42d417be were
written some time before the introduction of FLAG_POINTTOPOINT, so
didn't include that flag in the new driver_info.  Change the new
driver_info to be consistent.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-14 23:23:45 -07:00
David Decotigny 5d30530efb net-bonding: Adding support for throughputs larger than 65536 Mbps
This updates the bonding driver to support v2.6.27-rc3 enhancements
(b11f8d8c aka. "ethtool: Expand ethtool_cmd.speed to 32 bits") which
allow to encode the Mbps link speed on 32-bits (Max 4 Pbps) instead of
16 (Max 65536 Mbps).

This patch also attempts to compact struct slave by reordering its
fields.

Signed-off-by: David Decotigny <decot@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-14 22:00:32 -07:00
David Decotigny 65cce19c07 net-bonding: Fix minor/cosmetic type inconsistencies
The __get_link_speed() function returns a u16 value which was stored
in a u32 local variable. This patch uses the return value directly,
thus fixing that minor type consistency.

The 'duplex' field in struct slave being encoded on 8 bits, to be more
consistent we use a u8 integer (instead of u16) whenever we copy it to
local variables.

Signed-off-by: David Decotigny <decot@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-14 22:00:32 -07:00
David Decotigny d30ee670f2 net-bonding: Fix minor sparse complaints
This gets rid of minor sparse complaints:
drivers/net/bonding/bond_main.c:4361:4: warning: do-while statement is not a compound statement
drivers/net/bonding/bond_main.c:243:12: warning: symbol 'bond_mode_name' was not declared. Should it be static?

Signed-off-by: David Decotigny <decot@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-14 22:00:31 -07:00
stephen hemminger ef9c7ab4a9 qlge: make nic_operations struct const
The struct nic_operations is just function pointers and should be
declared const for added security.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-14 21:53:43 -07:00
stephen hemminger 6c8c2513c8 sfc: make function tables const
The phy, mac, and board information structures should be const.
Since tables contain function pointer this improves security
(at least theoretically).

Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-14 21:53:42 -07:00
Rémi Denis-Courmont 44f4d5a27e Phonet: convert bound sockets hash list to RCU
This gets rid of the last spinlock in the Phonet stack proper.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-14 21:32:53 -07:00