pandora-kernel.git
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 24 Nov 2009 23:01:29 +0000 (15:01 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

14 years agonet/ipv6: Move && and || to end of previous line
Joe Perches [Tue, 24 Nov 2009 22:52:52 +0000 (14:52 -0800)]
net/ipv6: Move && and || to end of previous line

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopktgen: Fix netdevice unregister
Eric Dumazet [Tue, 24 Nov 2009 22:50:53 +0000 (14:50 -0800)]
pktgen: Fix netdevice unregister

When multi queue compatable names are used by pktgen (eg eth0@0),
we currently cannot unload a NIC driver if one of its device
is currently in use.

Allow pktgen_find_dev() to find pktgen devices by their suffix (netdev name)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Log interrupt and reset type names, not numbers
Ben Hutchings [Mon, 23 Nov 2009 16:08:17 +0000 (16:08 +0000)]
sfc: Log interrupt and reset type names, not numbers

Define name tables for these enumerations in a similar way as for
loopback.  Move the loopback name table together with them.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Combine high-level header files
Ben Hutchings [Mon, 23 Nov 2009 16:07:30 +0000 (16:07 +0000)]
sfc: Combine high-level header files

All files that include ethtool.h, rx.h or tx.h are also including
efx.h, and there is no good reason to separate out the few
declarations they contain.  Therefore fold them into efx.h.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Remove redundant efx_xmit() function
Ben Hutchings [Mon, 23 Nov 2009 16:07:05 +0000 (16:07 +0000)]
sfc: Remove redundant efx_xmit() function

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Remove unnecessary casts to struct sk_buff *
Ben Hutchings [Mon, 23 Nov 2009 16:06:47 +0000 (16:06 +0000)]
sfc: Remove unnecessary casts to struct sk_buff *

At some point these casts were used to remove const qualification, but
they are now unneeded.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Gather link state fields in struct efx_nic into new struct efx_link_state
Ben Hutchings [Mon, 23 Nov 2009 16:06:30 +0000 (16:06 +0000)]
sfc: Gather link state fields in struct efx_nic into new struct efx_link_state

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Move all I2C stuff into struct falcon_board
Ben Hutchings [Mon, 23 Nov 2009 16:06:02 +0000 (16:06 +0000)]
sfc: Move all I2C stuff into struct falcon_board

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Move struct falcon_board into struct falcon_nic_data
Ben Hutchings [Mon, 23 Nov 2009 16:05:45 +0000 (16:05 +0000)]
sfc: Move struct falcon_board into struct falcon_nic_data

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Move definition of struct falcon_nic_data into falcon.h
Ben Hutchings [Mon, 23 Nov 2009 16:05:28 +0000 (16:05 +0000)]
sfc: Move definition of struct falcon_nic_data into falcon.h

This is preparation for moving Falcon-specific state required by other
Falcon-specific code.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Make board information explicitly Falcon-specific
Ben Hutchings [Mon, 23 Nov 2009 16:05:12 +0000 (16:05 +0000)]
sfc: Make board information explicitly Falcon-specific

Rename struct efx_board to struct falcon_board.

Introduce and use inline function to look up board info from struct
efx_nic, in preparation for moving it.

Move board init and fini calls into NIC probe and remove functions.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Rename efx_board::init_leds to init_phy and use for SFN4111T
Ben Hutchings [Mon, 23 Nov 2009 16:04:23 +0000 (16:04 +0000)]
sfc: Rename efx_board::init_leds to init_phy and use for SFN4111T

efx_board::init_leds was introduced as a second stage of
initialisation because of the inter-dependency between the board and
PHY.  We want to move board initialisation into NIC probing, which is
too early to use MDIO, so SFN4111T initialisation also needs to be
split.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Use a single blink implementation
Ben Hutchings [Mon, 23 Nov 2009 16:03:45 +0000 (16:03 +0000)]
sfc: Use a single blink implementation

Only some PHYs have firmware support for a LED blink mode, so we
currently blink the others in a timer function.  Since all PHYs have
simple on and off modes, we don't gain anything by using multiple
blink implementations.  Also, since we have a process context there
is no need to use a timer.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: SFT9001: Reset LED configuration correctly after blinking
Ben Hutchings [Mon, 23 Nov 2009 16:02:49 +0000 (16:02 +0000)]
sfc: SFT9001: Reset LED configuration correctly after blinking

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Record RX queue number on GRO path
Ben Hutchings [Mon, 23 Nov 2009 16:02:40 +0000 (16:02 +0000)]
sfc: Record RX queue number on GRO path

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Move assertions and buffer cleanup earlier in efx_rx_packet_lro()
Ben Hutchings [Mon, 23 Nov 2009 16:02:25 +0000 (16:02 +0000)]
sfc: Move assertions and buffer cleanup earlier in efx_rx_packet_lro()

This removes the need to use a label and goto, and makes the two
branches mirror each other more closely.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Remove ridiculously paranoid assertions
Ben Hutchings [Mon, 23 Nov 2009 16:01:55 +0000 (16:01 +0000)]
sfc: Remove ridiculously paranoid assertions

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Remove redundant gotos from __efx_rx_packet()
Ben Hutchings [Mon, 23 Nov 2009 16:01:44 +0000 (16:01 +0000)]
sfc: Remove redundant gotos from __efx_rx_packet()

This function no longer has any common cleanup code.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Remove pointless abstraction of memory BAR number (2)
Ben Hutchings [Mon, 23 Nov 2009 16:01:33 +0000 (16:01 +0000)]
sfc: Remove pointless abstraction of memory BAR number (2)

Finish the job by removing the structure member.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomacvlan: fix gso_max_size setting
Patrick McHardy [Mon, 23 Nov 2009 22:18:53 +0000 (14:18 -0800)]
macvlan: fix gso_max_size setting

gso_max_size must be set based on the value of the underlying device to
support devices not using the full 64k.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoath9k: set ps_default as false
John W. Linville [Mon, 23 Nov 2009 21:15:19 +0000 (16:15 -0500)]
ath9k: set ps_default as false

Copied from original one-line patch here:

http://bugzilla.kernel.org/show_bug.cgi?id=14267#c26

(This is for 2.6.33 and beyond, where the bool was changed to a flag by
"cfg80211: convert bools into flags". -- JWL)

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agossb: Fix range check in sprom write
Michael Buesch [Mon, 23 Nov 2009 19:58:06 +0000 (20:58 +0100)]
ssb: Fix range check in sprom write

The range check in the sprom image parser hex2sprom() is broken.
One sprom word is 4 hex characters.
This fixes the check and also adds much better sanity checks to the code.
We better make sure the image is OK by doing some sanity checks to avoid
bricking the device by accident.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agossb: Fix SPROM writing
Michael Buesch [Mon, 23 Nov 2009 19:12:13 +0000 (20:12 +0100)]
ssb: Fix SPROM writing

The SPROM writing routines were broken since we rewrote the suspend
handling on wireless devices, because SPROM writing depended on suspend.

This patch changes it and freezes devices with the driver remove(), probe()
callbacks instead. This also simplifies the whole logics a lot.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agorndis_wlan: disable stall workaround
Jussi Kivilinna [Sun, 22 Nov 2009 18:16:47 +0000 (20:16 +0200)]
rndis_wlan: disable stall workaround

Stall workaround doesn't work with bcm4320a devices like with bcm4320b.
This workaround actually causes more stalls/device freeze on bcm4320a.
Therefore disable stall workaround by default.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agorndis_wlan: fix buffer overflow in rndis_query_oid
Jussi Kivilinna [Sun, 22 Nov 2009 18:16:42 +0000 (20:16 +0200)]
rndis_wlan: fix buffer overflow in rndis_query_oid

rndis_query_oid overwrites *len which stores buffer size to return full size
of received command and then uses *len with memcpy to fill buffer with
command.

Ofcourse memcpy should be done before replacing buffer size.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix missing kernel-doc notation
Jaswinder Singh Rajput [Sun, 22 Nov 2009 08:17:58 +0000 (13:47 +0530)]
mac80211: Fix missing kernel-doc notation

Fix the following htmldocs warnings:

  Warning(net/mac80211/sta_info.h:322): No description found for parameter 'drv_unblock_wk'
  Warning(net/mac80211/sta_info.h:322): No description found for parameter 'drv_unblock_wk'

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: remove reset led_tpt from iwl_leds_init()
Wey-Yi Guy [Fri, 20 Nov 2009 20:05:09 +0000 (12:05 -0800)]
iwlwifi: remove reset led_tpt from iwl_leds_init()

Current blinking rate is calculated based on the difference between
current tx/rx byte counts and priv->led_tpt.

priv->led_tpt should not get reset in iwl_leds_init(), this function can be
called by bring interface "up" or "down", or when uCode sysassert occurred.
resetting the led_tpt parameter will introduce incorrect led blinking behavior.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: change message for cmd queue full error
Wey-Yi Guy [Fri, 20 Nov 2009 20:05:08 +0000 (12:05 -0800)]
iwlwifi: change message for cmd queue full error

Change error message for command queue full

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Acked-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: print limited number of event log when uCode error
Wey-Yi Guy [Fri, 20 Nov 2009 20:05:07 +0000 (12:05 -0800)]
iwlwifi: print limited number of event log when uCode error

To help iwlagn uCode debugging, event log will dump to syslog when driver
detect uCode error occurred, but this only happen when compile with
CONFIG_IWLWIFI_DEBUG and debug flag is enabled; which is not always
the case. Also, there is another problem, if the flag is set, the entire
event log buffer will be dump to syslog, it can flood the syslog and
make it very difficult to debug the problem.

Change the default to only dump last 20 entries of event log to syslog
unless the following condition meets:
1. both compile with CONFIG_IWLWIFI_DEBUG and debug flag
is enabled, and then dump the entire event buffer to syslog.
2. dump event log request from debugfs

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Acked-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: Tell the ucode immediately when association state changes
Jay Sternberg [Fri, 20 Nov 2009 20:05:06 +0000 (12:05 -0800)]
iwlwifi: Tell the ucode immediately when association state changes

When we get a state change of associated or not, we need to tell the
ucode via the RX_ON command using the filter flags.  This will prevent
the ucode from sending any packets when not associated, specifically not
sending NULL QOS packets after a deauthentication which causes the AP to
repeatedly send deauth's in some situations.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: dump error log when uCode error occurred
Wey-Yi Guy [Fri, 20 Nov 2009 20:05:05 +0000 (12:05 -0800)]
iwlwifi: dump error log when uCode error occurred

uCode error log contain information as to what the error was and where
it occurred necessary to debug any uCode issues.

Always log the information without special debug flag, this can help to
capture the important information when error happened.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Acked-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: by default, dump entire sram data portion
Wey-Yi Guy [Fri, 20 Nov 2009 20:05:04 +0000 (12:05 -0800)]
iwlwifi: by default, dump entire sram data portion

For "sram" debugfs file, if user did not specify the offset and length,
dump the entire data portion of sram by default.
Data portion is 0x800000 - 0x80ffff, but the actual data size is known
to the driver from the ucode file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: update supported PCI_ID list for 5xx0 series
Wey-Yi Guy [Fri, 20 Nov 2009 20:05:03 +0000 (12:05 -0800)]
iwlwifi: update supported PCI_ID list for 5xx0 series

Update the PCI_ID list for 5xx0 series.
Remove all the PCI_IDs which never made into production or not longer in
production.

Also make sure the supported bands(a/b/g/n) match specified PCI_IDs

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: separate IO tracing
Johannes Berg [Fri, 20 Nov 2009 20:05:02 +0000 (12:05 -0800)]
iwlwifi: separate IO tracing

Since IO tracing is usually not needed and
generates a lot of data, separate it into
its own trace system so that we can always
enable iwlwifi:* and not have to worry about
getting too much data. If IO tracing is then
really needed we can enable iwlwifi_io:* in
addition and get that data.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix reserved2 field in iwl4965_addsta
Wey-Yi Guy [Fri, 20 Nov 2009 20:05:01 +0000 (12:05 -0800)]
iwlwifi: fix reserved2 field in iwl4965_addsta

reserved2 field in "struct iwl4965_addsta_cmd" is __le16.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: dynamically allocate buffer for sram debugfs file
Wey-Yi Guy [Fri, 20 Nov 2009 20:05:00 +0000 (12:05 -0800)]
iwlwifi: dynamically allocate buffer for sram debugfs file

Dynamically allocate memory for dumping SRAM based on the length of memory
to be displayed.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: increase tx_queue debugfs buffer size
Wey-Yi Guy [Fri, 20 Nov 2009 20:04:59 +0000 (12:04 -0800)]
iwlwifi: increase tx_queue debugfs buffer size

For tx_queue, need to increase the buffer size allocated for it,
so all the queues information can be displayed

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: set read/write permission for debugfs files
Wey-Yi Guy [Fri, 20 Nov 2009 20:04:58 +0000 (12:04 -0800)]
iwlwifi: set read/write permission for debugfs files

Set the correct Read/Write file permission for iwlwifi debugfs files
based on the functionality of the files

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwl3945: removed unused struct and definitions
Reinette Chatre [Fri, 20 Nov 2009 20:04:57 +0000 (12:04 -0800)]
iwl3945: removed unused struct and definitions

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: reset led_tpt when clear tx/rx traffic byte counts
Wey-Yi Guy [Fri, 20 Nov 2009 20:04:56 +0000 (12:04 -0800)]
iwlwifi: reset led_tpt when clear tx/rx traffic byte counts

LED blink rate is based on the traffic load, when tx/rx traffic counts
got reset, we also need to reset the led_tpt to prevent incorrect
blink rate being calculated.

Merge both clear_tx_statistics() and clear_rx_statistics() into
single clear_traffic_statistics() function, when reset the traffic byte
counts, both tx and rx need to be reset at the same time, to make
sure calculated the correct led blink rate.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: set sm_ps_mode as part of cfg parameters
Wey-Yi Guy [Fri, 20 Nov 2009 20:04:55 +0000 (12:04 -0800)]
iwlwifi: set sm_ps_mode as part of cfg parameters

Setting "Spatial multiplexing Power Save" as part of
per device configuration parameter.

Report to uCode based on priv->conf setting, so driver can
have more control of how different devices should operate
in power save mode.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: control led while update tx/rx bytes counts
Wey-Yi Guy [Fri, 20 Nov 2009 20:04:54 +0000 (12:04 -0800)]
iwlwifi: control led while update tx/rx bytes counts

LED blinking rate is based on tx/rx traffic, the most reasonable place
to do it is after update the traffic byte counts

This fixes the recent LED blinking breakage on 3945 introduced by "iwlwifi:
separate led function from statistic notification"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlagn: Use iwl_write8() for CSR_INT_COALESCING register
Ben Cahill [Fri, 20 Nov 2009 20:04:53 +0000 (12:04 -0800)]
iwlagn: Use iwl_write8() for CSR_INT_COALESCING register

CSR_INT_COALESCING previously had only one, but now has two single-byte fields.
With only one single-byte field (lowest order byte) it was okay to write via
iwl_write32(), but now with two, an iwl_write32() to the lower order field
clobbers the other field (odd-address CSR_INT_PERIODIC_REG, offset 0x5), and an
iwl_write32() to CSR_INT_PERIODIC_REG could clobber the lowest byte of the
next-higher register (CSR_INT, offset 0x8).

Fortunately, no bad side effects have been produced by the iwl_write32()
usage, due to order of execution (low order byte was always written before
higher order byte), and the fact that writing "0" to the low byte of the
next higher register has no effect (only action is when writing "1"s).

Nonetheless, this cleans up the accesses so no bad side effects might occur
in the future, if execution order changes, or more bit fields get added to
CSR_INT_COALESCING.

Add some comments regarding periodic interrupt usage.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: Add iwl_write8()
Ben Cahill [Fri, 20 Nov 2009 20:04:52 +0000 (12:04 -0800)]
iwlwifi: Add iwl_write8()

To support byte writes to CSR_INT_COALESCING and CSR_INT_PERIODIC registers,
add iwl_write8(), including debug/trace support.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix rcu locking
Johannes Berg [Fri, 20 Nov 2009 09:09:14 +0000 (10:09 +0100)]
mac80211: fix rcu locking

Add a missing rcu_read_unlock() before jumping out
of the ieee80211_change_station() function in the
error case.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Fix I/Q calibration
Lukáš Turek [Thu, 19 Nov 2009 22:02:02 +0000 (23:02 +0100)]
ath5k: Fix I/Q calibration

The sign of correction coefficients was lost in the calculations, which
caused high packetloss in 802.11a mode after the results were applied.
Fixed by removing unneccesary and broken AND with a bit mask.

Signed-off-by: Lukas Turek <8an@praha12.net>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove dead struct member
Johannes Berg [Thu, 19 Nov 2009 21:42:16 +0000 (22:42 +0100)]
mac80211: remove dead struct member

ieee80211_local.wstats is a remnant from the
days when we still had to worry about wireless
extensions in mac80211 -- it can be removed.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Rewrite DMA Tx status handling sanity checks
Michael Buesch [Thu, 19 Nov 2009 21:24:29 +0000 (22:24 +0100)]
b43: Rewrite DMA Tx status handling sanity checks

This rewrites the error handling policies in the TX status handler.
It tries to be error-tolerant as in "try hard to not crash the machine".
It won't recover from errors (that are bugs in the firmware or driver),
because that's impossible. However, it will return a more or less useful
error message and bail out. It also tries hard to use rate-limited messages
to not flood the syslog in case of a failure.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: This patch fix RX unpadding for any received frame.
Benoit PAPILLAULT [Thu, 19 Nov 2009 21:19:26 +0000 (22:19 +0100)]
ath9k: This patch fix RX unpadding for any received frame.

It has been tested with a 802.11 frame generator and by checking the FCS field
of each received frame with the value reported by the Atheros hardware. This
patch is useful if you are trying to analyze non standard 802.11 frame going
over the air.

Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agossb: Unconditionally log results of core scans
Larry Finger [Thu, 19 Nov 2009 20:40:46 +0000 (14:40 -0600)]
ssb: Unconditionally log results of core scans

At present, the results of an SSB core scan are only logged when
CONFIG_SSB_DEBUG is "y". As this may not be set in a distro kernel,
it is difficult interpret many problems posted in bug reports or in
help forums.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoipw2200: Set core hw rfkill status when hardware changes state
Matthew Garrett [Wed, 11 Nov 2009 19:36:31 +0000 (14:36 -0500)]
ipw2200: Set core hw rfkill status when hardware changes state

ipw2200 is able to detect when it's been hard-killed, but doesn't update
the core rfkill state or update userspace. Ensure that the state is updated,
allowing the rfkill core to notify userspace.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoipw2100: Register the wiphy device
Matthew Garrett [Wed, 11 Nov 2009 19:36:30 +0000 (14:36 -0500)]
ipw2100: Register the wiphy device

libipw unconditionally calls wiphy_unregister, but it's up to the driver
to register it in the first place. ipw2100 fails to do so. Add the necessary
glue code, and also ensure that rfkill statuses get set up appropriately.

(Augmented for proper wiphy_unregister placement. -- JWL)

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibipw: initiate cfg80211 API conversion (v2)
John W. Linville [Tue, 25 Aug 2009 18:12:25 +0000 (14:12 -0400)]
libipw: initiate cfg80211 API conversion (v2)

Initiate the conversion of libipw to the new cfg80211 configuration API.

For now, leave CONFIG_IPW2200_PROMISCUOUS stuff alone.  Eventually
migrate it to cfg80211 when the add/del/change_virtual_intf methods
are implemented.

(v2: Fix unconditional wiphy_unregister in libipw which was causing
     problems for ipw2100, somewhat based on prior attempted fix
     by Zhu Yi <yi.zhu@intel.com>.  Previously both original version of
     this patch and Zhu Yi's fix attempt were reverted due to
     discovery of regressions. -- JWL)

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Mon, 23 Nov 2009 22:01:47 +0000 (14:01 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

14 years agorfkill: fix miscdev ops
Johannes Berg [Mon, 23 Nov 2009 10:27:30 +0000 (11:27 +0100)]
rfkill: fix miscdev ops

The /dev/rfkill ops don't refer to the module,
so it is possible to unload the module while
file descriptors are open. Fix this oversight.

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: set ps_default as false
John W. Linville [Mon, 23 Nov 2009 21:15:19 +0000 (16:15 -0500)]
ath9k: set ps_default as false

Copied from original one-line patch here:

http://bugzilla.kernel.org/show_bug.cgi?id=14267#c26

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agosctp: prevent too-fast association id reuse
Vlad Yasevich [Mon, 23 Nov 2009 20:54:01 +0000 (15:54 -0500)]
sctp: prevent too-fast association id reuse

We use the idr subsystem and always ask for an id
at or above 1.  This results in a id reuse when one
association is terminated while another is created.

To prevent re-use, we keep track of the last id returned
and ask for that id + 1 as a base for each query.  We let
the idr spin lock protect this base id as well.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: fix integer overflow when setting the autoclose timer
Andrei Pelinescu-Onciul [Mon, 23 Nov 2009 20:54:01 +0000 (15:54 -0500)]
sctp: fix integer overflow when setting the autoclose timer

When setting the autoclose timeout in jiffies there is a possible
integer overflow if the value in seconds is very large
(e.g. for 2^22 s with HZ=1024). The problem appears even on
64-bit due to the integer promotion rules. The fix is just a cast
 to unsigned long.

Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: limit maximum autoclose setsockopt value
Andrei Pelinescu-Onciul [Mon, 23 Nov 2009 20:54:01 +0000 (15:54 -0500)]
sctp: limit maximum autoclose setsockopt value

To avoid overflowing the maximum timer interval when transforming
the  autoclose interval from seconds to jiffies, limit the maximum
autoclose value to MAX_SCHEDULE_TIMEOUT/HZ.

Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: Fix mis-ordering of user space data when multihoming in use
Neil Horman [Mon, 23 Nov 2009 20:54:00 +0000 (15:54 -0500)]
sctp: Fix mis-ordering of user space data when multihoming in use

Recently had a bug reported to me, in which the user was sending
packets with a payload containing a sequence number.  The packets
were getting delivered in order according the chunk TSN values, but
the sequence values in the payload were arriving out of order.  At
first I thought it must be an application error, but we eventually
found it to be a problem on the transmit side in the sctp stack.

The conditions for the error are that multihoming must be in use,
and it helps if each transport has a different pmtu.  The problem
occurs in sctp_outq_flush.  Basically we dequeue packets from the
data queue, and attempt to append them to the orrered packet for a
given transport.  After we append a data chunk we add the trasport
to the end of a list of transports to have their packets sent at
the end of sctp_outq_flush.  The problem occurs when a data chunks
fills up a offered packet on a transport.  The function that does
the appending (sctp_packet_transmit_chunk), will try to call
sctp_packet_transmit on the full packet, and then append the chunk
to a new packet.  This call to sctp_packet_transmit, sends that
packet ahead of the others that may be queued in the transport_list
in sctp_outq_flush.  The result is that frames that were sent in one
order from the user space sending application get re-ordered prior
to tsn assignment in sctp_packet_transmit, resulting in mis-sequencing
of data payloads, even though tsn ordering is correct.

The fix is to change where we assign a tsn.  By doing this earlier,
we are then free to place chunks in packets, whatever way we
see fit and the protocol will make sure to do all the appropriate
re-ordering on receive as is needed.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: William Reich <reich@ulticom.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: Update max.burst implementation
Vlad Yasevich [Mon, 23 Nov 2009 20:54:00 +0000 (15:54 -0500)]
sctp: Update max.burst implementation

Current implementation of max.burst ends up limiting new
data during cwnd decay period.  The decay is happening becuase
the connection is idle and we are allowed to fill the congestion
window.  The point of max.burst is to limit micro-bursts in response
to large acks.  This still happens, as max.burst is still applied
to each transmit opportunity.  It will also apply if a very large
send is made (greater then allowed by burst).

Tested-by: Florian Niederbacher <florian.niederbacher@student.uibk.ac.at>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: Turn the enum socket options into defines
Vlad Yasevich [Mon, 23 Nov 2009 20:53:59 +0000 (15:53 -0500)]
sctp: Turn the enum socket options into defines

Recent attempt to remove deprecated socket options demonstrated
that removing options from the enum space will have severe
binary compatibility issues.  The reason is that it changes
the subsequent enum space and causes option values to be redefined.
To solve this, and to get rid of the ugly double statements for
every option, we simply convert to the #define scheme.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: Remove useless last_time_used variable
Vlad Yasevich [Mon, 23 Nov 2009 20:53:58 +0000 (15:53 -0500)]
sctp: Remove useless last_time_used variable

The transport last_time_used variable is rather useless.
It was only used when determining if CWND needs to be updated
due to idle transport.  However, idle transport detection was
based on a Heartbeat timer and last_time_used was not incremented
when sending Heartbeats.  As a result the check for cwnd reduction
was always true.  We can get rid of the variable and just base
our cwnd manipulation on the HB timer (like the code comment sais).
We also have to call into the cwnd manipulation function regardless
of whether HBs are enabled or not.  That way we will detect idle
transports if the user has disabled Heartbeats.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: remove deprecated SCTP_GET_*_OLD stuffs
Amerigo Wang [Mon, 23 Nov 2009 20:53:58 +0000 (15:53 -0500)]
sctp: remove deprecated SCTP_GET_*_OLD stuffs

SCTP_GET_*_OLD stuffs are schedlued to be removed.

Cc: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: allow setting path_maxrxt independent of SPP_PMTUD_ENABLE
Andrei Pelinescu-Onciul [Mon, 23 Nov 2009 20:53:57 +0000 (15:53 -0500)]
sctp: allow setting path_maxrxt independent of SPP_PMTUD_ENABLE

Since draft-ietf-tsvwg-sctpsocket-15.txt, setting the
SPP_MTUD_ENABLE flag when changing pathmaxrxt via the
SCTP_PEER_ADDR_PARAMS setsockopt is not required any
longer.

Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: Update SWS avaoidance receiver side algorithm
Vlad Yasevich [Mon, 23 Nov 2009 20:53:57 +0000 (15:53 -0500)]
sctp: Update SWS avaoidance receiver side algorithm

We currently send window update SACKs every time we free up 1 PMTU
worth of data.  That a lot more SACKs then necessary.  Instead, we'll
now send back the actuall window every time we send a sack, and do
window-update SACKs when a fraction of the receive buffer has been
opened.  The fraction is controlled with a sysctl.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: Select a working primary during sctp_connectx()
Vlad Yasevich [Mon, 23 Nov 2009 20:53:57 +0000 (15:53 -0500)]
sctp: Select a working primary during sctp_connectx()

When sctp_connectx() is used, we pick the first address as
primary, even though it may not have worked.  This results
in excessive retransmits and poor performance.  We should
select the address that the association was established with.

Reported-by: Thomas Dreibholz <dreibh@iem.uni-due.de>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: Fix malformed "Invalid Stream Identifier" error
Vlad Yasevich [Mon, 23 Nov 2009 20:53:56 +0000 (15:53 -0500)]
sctp: Fix malformed "Invalid Stream Identifier" error

The "Invalid Stream Identifier" error has a 16 bit reserved
field at the end, thus making the parameter length be 8 bytes.
We've never supplied that reserved field making wireshark
tag the packet as malformed.

Reported-by: Chris Dischino <cdischino@sonusnet.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: implement the sender side for SACK-IMMEDIATELY extension
Wei Yongjun [Mon, 23 Nov 2009 20:53:56 +0000 (15:53 -0500)]
sctp: implement the sender side for SACK-IMMEDIATELY extension

This patch implement the sender side for SACK-IMMEDIATELY
extension.

  Section 4.1.  Sender Side Considerations

  Whenever the sender of a DATA chunk can benefit from the
  corresponding SACK chunk being sent back without delay, the sender
  MAY set the I-bit in the DATA chunk header.

  Reasons for setting the I-bit include

  o  The sender is in the SHUTDOWN-PENDING state.

  o  The application requests to set the I-bit of the last DATA chunk
     of a user message when providing the user message to the SCTP
     implementation.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: implement the receiver side for SACK-IMMEDIATELY extension
Wei Yongjun [Mon, 23 Nov 2009 20:53:53 +0000 (15:53 -0500)]
sctp: implement the receiver side for SACK-IMMEDIATELY extension

This patch implement the receiver side for SACK-IMMEDIATELY
extension:

  Section 4.2.  Receiver Side Considerations

  On reception of an SCTP packet containing a DATA chunk with the I-bit
  set, the receiver SHOULD NOT delay the sending of the corresponding
  SACK chunk and SHOULD send it back immediately.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agosctp: implement definition for SACK-IMMEDIATELY extension
Wei Yongjun [Mon, 23 Nov 2009 20:53:52 +0000 (15:53 -0500)]
sctp: implement definition for SACK-IMMEDIATELY extension

This patch implement the definition for SACK-IMMEDIATELY
extension.

Section 3.  The I-bit in the DATA Chunk Header

   The following Figure 1 shows the extended DATA chunk.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Type = 0    |  Res  |I|U|B|E|           Length              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              TSN                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Stream Identifier      |     Stream Sequence Number    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                  Payload Protocol Identifier                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   \                                                               \
   /                           User Data                           /
   \                                                               \
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                                 Figure 1

   The only difference between the DATA chunk in Figure 1 and the DATA
   chunk defined in [RFC4960] is the addition of the I-bit in the flags
   field of the chunk header.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
14 years agohso: fix soft-lockup
Antti Kaijanmäki [Mon, 23 Nov 2009 18:54:47 +0000 (10:54 -0800)]
hso: fix soft-lockup

Fix soft-lockup in hso.c which is triggered on SMP machine when
modem is removed while file descriptor(s) under /dev are still open:

  old version called kref_put() too early which resulted in destroying
  hso_serial and hso_device objects which were still used later on.

Signed-off-by: Antti Kaijanmäki <antti.kaijanmaki@nomovok.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agohso: fix debug routines
Antti Kaijanmäki [Mon, 23 Nov 2009 18:54:24 +0000 (10:54 -0800)]
hso: fix debug routines

Signed-off-by: Antti Kaijanmäki <antti.kaijanmaki@nomovok.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Only set/clear VFE in ixgbe_set_rx_mode
Alexander Duyck [Mon, 23 Nov 2009 06:32:57 +0000 (06:32 +0000)]
ixgbe: Only set/clear VFE in ixgbe_set_rx_mode

There appears to be a stray setting of the VFE bit when registering vlans.
This should not be done as vlan filtering should be enabled any time the
interface is not in promiscous mode

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Use rx buffer length from rx ring for configuring rscctl
Mallikarjuna R Chilakala [Mon, 23 Nov 2009 18:45:11 +0000 (10:45 -0800)]
ixgbe: Use rx buffer length from rx ring for configuring rscctl

While configuring rscctl use rx buffer length from rx ring structure
instead of passing rx_buf_len to ixgbe_configure_rscctl

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Modify 82599 HWRSC statistics counters
Mallikarjuna R Chilakala [Mon, 23 Nov 2009 06:32:06 +0000 (06:32 +0000)]
ixgbe: Modify 82599 HWRSC statistics counters

Divide 82599 HWRSC counters into aggregated and flushed to count number of
packets getting coalesced per TCP connection.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: remove BUG_ON() when be2net runs out of mccq wrbs
Sathya Perla [Sun, 22 Nov 2009 22:02:45 +0000 (22:02 +0000)]
be2net: remove BUG_ON() when be2net runs out of mccq wrbs

The driver can run out of mccq wrbs when completions don't arrive
due to an unresponsive card. This must not hit a BUG_ON(); instead
log a msg and return an error.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Fix cleanup path in be_probe()
Sathya Perla [Sun, 22 Nov 2009 22:02:26 +0000 (22:02 +0000)]
be2net: Fix cleanup path in be_probe()

Disabling msix was missing when probe fails after enabling msix.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Issue fw_init/clean cmds to fw
Sathya Perla [Sun, 22 Nov 2009 22:02:03 +0000 (22:02 +0000)]
be2net: Issue fw_init/clean cmds to fw

These cmds are issued to the fw in probe/resume and remove/suspend
paths to help fw execute some initialization and cleanup code.

This change needed the be_hw_up() code to be refactored as be_get_config().

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Fix rx_drops_no_fragments stat being incorrectly indexed
Sathya Perla [Sun, 22 Nov 2009 22:01:31 +0000 (22:01 +0000)]
be2net: Fix rx_drops_no_fragments stat being incorrectly indexed

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: support configuration of 64 multicast addresses instead of 32
Sathya Perla [Sun, 22 Nov 2009 22:01:10 +0000 (22:01 +0000)]
be2net: support configuration of 64 multicast addresses instead of 32

To send upto 64 addresses in the multicast-set cmd, the non-embeeded cmd format
that provides for a bigger buffer is used instead of an embedded format.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/ipv4: Move && and || to end of previous line
Joe Perches [Mon, 23 Nov 2009 18:41:23 +0000 (10:41 -0800)]
net/ipv4: Move && and || to end of previous line

On Sun, 2009-11-22 at 16:31 -0800, David Miller wrote:
> It should be of the form:
>  if (x &&
>      y)
>
> or:
>  if (x && y)
>
> Fix patches, rather than complaints, for existing cases where things
> do not follow this pattern are certainly welcome.

Also collapsed some multiple tabs to single space.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopktgen: Fix device name compares
Eric Dumazet [Mon, 23 Nov 2009 01:44:37 +0000 (01:44 +0000)]
pktgen: Fix device name compares

Commit e6fce5b916cd7f7f7 (pktgen: multiqueue etc.) tried to relax
the pktgen restriction of one device per kernel thread, adding a '@'
tag to device names.

Problem is we dont perform check on full pktgen device name.
This allows adding many time same 'device' to pktgen thread

 pgset "add_device eth0@0"

one session later :

 pgset "add_device eth0@0"

(This doesnt find previous device)

This consumes ~1.5 MBytes of vmalloc memory per round and also triggers
this warning :

[  673.186380] proc_dir_entry 'pktgen/eth0@0' already registered
[  673.186383] Modules linked in: pktgen ixgbe ehci_hcd psmouse mdio mousedev evdev [last unloaded: pktgen]
[  673.186406] Pid: 6219, comm: bash Tainted: G        W  2.6.32-rc7-03302-g41cec6f-dirty #16
[  673.186410] Call Trace:
[  673.186417]  [<ffffffff8104a29b>] warn_slowpath_common+0x7b/0xc0
[  673.186422]  [<ffffffff8104a341>] warn_slowpath_fmt+0x41/0x50
[  673.186426]  [<ffffffff8114e789>] proc_register+0x109/0x210
[  673.186433]  [<ffffffff8100bf2e>] ? apic_timer_interrupt+0xe/0x20
[  673.186438]  [<ffffffff8114e905>] proc_create_data+0x75/0xd0
[  673.186444]  [<ffffffffa006ad38>] pktgen_thread_write+0x568/0x640 [pktgen]
[  673.186449]  [<ffffffffa006a7d0>] ? pktgen_thread_write+0x0/0x640 [pktgen]
[  673.186453]  [<ffffffff81149144>] proc_reg_write+0x84/0xc0
[  673.186458]  [<ffffffff810f5a58>] vfs_write+0xb8/0x180
[  673.186463]  [<ffffffff810f5c11>] sys_write+0x51/0x90
[  673.186468]  [<ffffffff8100b51b>] system_call_fastpath+0x16/0x1b
[  673.186470] ---[ end trace ccbb991b0a8d994d ]---

Solution to this problem is to use a odevname field (includes @ tag and suffix),
instead of using netdevice name.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: do not fail when the timer cannot be used.
Giuseppe CAVALLARO [Sun, 22 Nov 2009 22:59:56 +0000 (22:59 +0000)]
stmmac: do not fail when the timer cannot be used.

If the external timer cannot be used the driver
will continue to work without mitigation.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: fixed a compilation error when use the external timer
Giuseppe CAVALLARO [Sun, 22 Nov 2009 22:58:40 +0000 (22:58 +0000)]
stmmac: fixed a compilation error when use the external timer

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Mon, 23 Nov 2009 17:52:51 +0000 (09:52 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-2.6

14 years agonetfilter: xt_limit: fix invalid return code in limit_mt_check()
Patrick McHardy [Mon, 23 Nov 2009 12:37:23 +0000 (13:37 +0100)]
netfilter: xt_limit: fix invalid return code in limit_mt_check()

Commit acc738fe (netfilter: xtables: avoid pointer to self) introduced
an invalid return value in limit_mt_check().

Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonet: Fix missing kernel-doc notation
Jaswinder Singh Rajput [Mon, 23 Nov 2009 04:43:13 +0000 (20:43 -0800)]
net: Fix missing kernel-doc notation

Fix the following htmldocs warning:

  Warning(net/core/dev.c:5378): bad line:

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoAu1x00: fix crash when trying register_netdev()
Alexander Beregalov [Mon, 23 Nov 2009 04:40:52 +0000 (20:40 -0800)]
Au1x00: fix crash when trying register_netdev()

Andreas Lohre reported that the driver crashes when trying
to register_netdev(), he sugessted to move dev->netdev_ops initialization
before calling register_netdev(), it worked for him.

Reported-by: Andreas Lohre <alohre@gmail.com>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen : fix BOND_MODE_TLB/ALB mode.
Narender Kumar [Fri, 20 Nov 2009 22:08:57 +0000 (22:08 +0000)]
netxen : fix BOND_MODE_TLB/ALB mode.

o Along with netdev->perm_addr, mac address will be
  maintained in device private structure.

o Device limitation: We need to set mac address when ever
  interface comes up.

In ALB/TAL mode, bonding driver calls set_mac for all slave with bond mac address.
But bonding driver set netdev->dev_addr field to its original value,
after enslaving interfaces.

When ever active slave changes, it swap dev_addr of inactive slave with active.
Yet it doesn't notify driver about change in netdev->dev_addr.

As netxen driver need to set mac addr when ever interface comes up,
it can't rely on netdev->dev_addr field. Specially in case of bonding mode ALB/TLB.

Signed-off-by: Narender Kumar <narender.kumar@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix promisc for NX2031.
Narender Kumar [Fri, 20 Nov 2009 15:09:33 +0000 (15:09 +0000)]
netxen: fix promisc for NX2031.

Kernel crashes, if promisc mode set without disabling rx queue.
Before changing mode in NX2031 chip, wait till rx queue drains.

Signed-off-by: Narender Kumar <narender.kumar@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix memory initialization
Amit Kumar Salecha [Fri, 20 Nov 2009 15:09:32 +0000 (15:09 +0000)]
netxen: fix memory initialization

Avoid resetting memory during initialization, skip this memory
block during driver probe.

Signed-off-by: Amit Kumar Salecha <amit@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: update Tx Unit hang detection message
Bruce Allan [Fri, 20 Nov 2009 23:28:56 +0000 (23:28 +0000)]
e1000e: update Tx Unit hang detection message

The Tx unit hang detection code in e1000e detects other hangs caused by
hardware components (e.g. Rx, DMA units), but it is not possible to detect
exactly which component is hung so it has always assumed a Tx unit hang.
When dumping a message to the system log because of a hang, this patch adds
more data to help narrow the cause of the issue and makes the message
non-Tx-specific.  Because this new code reads PHY registers which can
sleep, move it off to a workqueue.  This and all previously existing work
tasks in the driver are now cancelled when the driver is removed.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: cosmetic - group local variables of the same type
Bruce Allan [Fri, 20 Nov 2009 23:28:37 +0000 (23:28 +0000)]
e1000e: cosmetic - group local variables of the same type

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: remove redundant might_sleep()
Bruce Allan [Fri, 20 Nov 2009 23:28:17 +0000 (23:28 +0000)]
e1000e: remove redundant might_sleep()

Now that mutex_lock() calls might_sleep() the driver doesn't have to here.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: do not error out on identification LED init failure
Bruce Allan [Fri, 20 Nov 2009 23:27:59 +0000 (23:27 +0000)]
e1000e: do not error out on identification LED init failure

A failure to initialize the identification LED is not a fatal condition and
should allow the init path to continue.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: set pm_qos DMA latency requirement per interface when needed
Bruce Allan [Fri, 20 Nov 2009 23:27:40 +0000 (23:27 +0000)]
e1000e: set pm_qos DMA latency requirement per interface when needed

It was pointed out a pm_qos DMA latency requirement set when the driver is
loaded when parts that support early receive of jumbo frames are probed
could have that requirement overidden if another part supported by the
driver (one that does not support early receive of jumbo frames) is probed
later.  Change the DMA latency requirement to be per-interface if needed
instead of per driver.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: cleanup functions that clear hardware statistics
Bruce Allan [Fri, 20 Nov 2009 23:27:21 +0000 (23:27 +0000)]
e1000e: cleanup functions that clear hardware statistics

The e1000_clear_hw_cntrs_*() functions read the registers to clear them.
There is no reason to save the register contents so the temp variable can
be removed.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: cleanup - shift indentation left by exiting early in e1000_tso
Bruce Allan [Fri, 20 Nov 2009 23:27:03 +0000 (23:27 +0000)]
e1000e: cleanup - shift indentation left by exiting early in e1000_tso

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>