]> bbs.cooldavid.org Git - net-next-2.6.git/log
net-next-2.6.git
15 years agorndis_wlan: convert scan to cfg80211
Jussi Kivilinna [Thu, 26 Mar 2009 21:40:31 +0000 (23:40 +0200)]
rndis_wlan: convert scan to cfg80211

Convert scan function to cfg80211. Unlike old scan code new code
waits 1 sec before getting scan data from device and passing
forward to cfg80211.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: convert get range to cfg80211
Jussi Kivilinna [Thu, 26 Mar 2009 21:40:23 +0000 (23:40 +0200)]
rndis_wlan: convert get range to cfg80211

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: change quality level scale
Jussi Kivilinna [Thu, 26 Mar 2009 21:40:16 +0000 (23:40 +0200)]
rndis_wlan: change quality level scale

Change quality level scale to match cfg80211 CFG80211_SIGNAL_TYPE_UNSPEC.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: add cfg80211_inform_bss
Jussi Kivilinna [Thu, 26 Mar 2009 21:40:09 +0000 (23:40 +0200)]
cfg80211: add cfg80211_inform_bss

Added cfg80211_inform_bss() for full-mac devices to use.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: convert get/set mode to cfg80211
John W. Linville [Thu, 26 Mar 2009 21:40:01 +0000 (23:40 +0200)]
rndis_wlan: convert get/set mode to cfg80211

Signed-off-by: John W. Linville <linville@tuxdriver.com>
[edit: made rndis_change_virtual_intf static]
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: initiate cfg80211 conversion
John W. Linville [Thu, 26 Mar 2009 21:39:53 +0000 (23:39 +0200)]
rndis_wlan: initiate cfg80211 conversion

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: add beacon filtering support
Christian Lamparter [Wed, 25 Mar 2009 02:12:49 +0000 (03:12 +0100)]
p54: add beacon filtering support

This patch adds beacon filtering support to p54.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: more SoftLED updates
Christian Lamparter [Wed, 25 Mar 2009 02:12:18 +0000 (03:12 +0100)]
p54: more SoftLED updates

This patch hopefully finishes the SoftLED code:
- It adds two more LEDs (rx and radio).
  (the FW claims it can support up to 16 LEDs,
   but I doubt that any vendor put more than 4 on a board)
- update the LEDs in a _delayed_ workqueue.
  No one reported any more crashes.
  (see: "PATCH] p54: fix race condition in memory management")
  So we can stop burning the mm code.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: clean up p54.h's struct p54_common
Christian Lamparter [Wed, 25 Mar 2009 02:11:58 +0000 (03:11 +0100)]
p54: clean up p54.h's struct p54_common

This patch rearrange and regroups most elements in p54_common.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonet/ps3: Update maintainer
Masakazu Mokuno [Mon, 30 Mar 2009 18:04:04 +0000 (11:04 -0700)]
net/ps3: Update maintainer

Update the MAINTAINERS entry for PS3 NETWORK SUPPORT.

CC: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: reduce exported channel list
Bob Copeland [Mon, 30 Mar 2009 12:05:29 +0000 (08:05 -0400)]
ath5k: reduce exported channel list

Claiming every available 5 ghz channel has a couple of negative
side-effects: scanning takes a long time, and the channel list
overflows the available buffer space for netlink commands,
resulting in:

    $ iw phy phy0 info
    command failed: No buffer space available (-105)

This patch adds a modparam so people who want to see all the channels
can do so by passing all_channels=1.  By default users will see a
smaller list of channels.  This also halves scan time, from 10 seconds
down to less than 5 when using world regulatory.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Reported-by: Simon Farnsworth <simon@farnz.org.uk>
Tested-By: Simon Farnsworth <simon@farnz.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: move ieee80211_enable_ht function to mlme.c
Johannes Berg [Mon, 30 Mar 2009 11:23:35 +0000 (13:23 +0200)]
mac80211: move ieee80211_enable_ht function to mlme.c

It really belongs into that file since it is only relevant
for managed mode. Move 1:1, not even whitespace changes,
but make it static and remove from header file.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix bug in determining HT40 mode
Sujith [Mon, 30 Mar 2009 09:58:57 +0000 (15:28 +0530)]
ath9k: Fix bug in determining HT40 mode

This patch fixes a bug in checking for HT40 mode.
The STA's mode can be determined from the cached HT capabilities,
use that and remove the redundant variable 'rc_phy_mode'.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Determine number of streams from HT capabilities
Sujith [Mon, 30 Mar 2009 09:58:56 +0000 (15:28 +0530)]
ath9k: Determine number of streams from HT capabilities

The number of streams supported by a STA can be determined
directly from the HT capabilities. Remove the redundant
variable storing the stream cap.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Clean Interrupt handling routine
Sujith [Mon, 30 Mar 2009 09:58:49 +0000 (15:28 +0530)]
ath9k: Clean Interrupt handling routine

This patch cleans up the ISR, removing a unnecessary do..while
loop, and waking up the chip before getting the pending
interrupts.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Trivial fix to handle AMPDU params properly
Sujith [Mon, 30 Mar 2009 09:58:48 +0000 (15:28 +0530)]
ath9k: Trivial fix to handle AMPDU params properly

Handle aggregation params only when aggregation is
supported.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Initialize values when setting up the queue parameters
Sujith [Mon, 30 Mar 2009 09:58:46 +0000 (15:28 +0530)]
ath9k: Initialize values when setting up the queue parameters

Also fix a small typo.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove the useless do..while loops
Sujith [Mon, 30 Mar 2009 09:58:45 +0000 (15:28 +0530)]
ath9k: Remove the useless do..while loops

These are unnecessary constructs in a function.
This patch removes these from both RX and TX init
routines.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove TIM from the interrupt mask
Sujith [Mon, 30 Mar 2009 09:58:43 +0000 (15:28 +0530)]
ath9k: Remove TIM from the interrupt mask

We never handle TIM, TIM_TIMER is used instead.
Remove this and the unnecessary swBeaconProcess variable.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Check for root debugfs file
Sujith [Mon, 30 Mar 2009 09:58:42 +0000 (15:28 +0530)]
ath9k: Check for root debugfs file

Creation of the root debugfs file could have failed
for some reason, check properly before proceeding in this
case.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove unused structures
Sujith [Mon, 30 Mar 2009 09:58:41 +0000 (15:28 +0530)]
ath9k: Remove unused structures

struct aggr_rifs_param and ath_tx_stat are not used anywhere.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove a couple of unused variables in descriptor handling
Sujith [Mon, 30 Mar 2009 09:58:40 +0000 (15:28 +0530)]
ath9k: Remove a couple of unused variables in descriptor handling

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Cleanup buffer status handling
Sujith [Mon, 30 Mar 2009 09:58:38 +0000 (15:28 +0530)]
ath9k: Cleanup buffer status handling

Using a u32 to store a single flag is overkill.
Use a bool to store whether the buffer is stale or not.
Also, use u8 instead of u32 to store the buffer type.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Avoid unneeded casts
Sujith [Mon, 30 Mar 2009 09:58:36 +0000 (15:28 +0530)]
ath9k: Avoid unneeded casts

Change the void pointer to struct sk_buff and access
bf_mpdu directly, removing all casts in the process.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove redundant variable for Interrupt Mitigation
Sujith [Mon, 30 Mar 2009 09:58:35 +0000 (15:28 +0530)]
ath9k: Remove redundant variable for Interrupt Mitigation

The state is already stored in ath9k_ops_config, so remove
the duplicate variable in ath_hw.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Change return value of ath9k_hw_fill_cap_info
Sujith [Mon, 30 Mar 2009 09:58:28 +0000 (15:28 +0530)]
ath9k: Change return value of ath9k_hw_fill_cap_info

This routine always return true, checking for false
in the return value is invalid. Fix this.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Cleanup debug messages
Sujith [Mon, 30 Mar 2009 09:58:25 +0000 (15:28 +0530)]
ath9k: Cleanup debug messages

Clean debug messages to use appropriate levels,
remove useless messages, and trim the number of
debug levels.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove redundant chainmask check
Sujith [Mon, 30 Mar 2009 09:58:24 +0000 (15:28 +0530)]
ath9k: Remove redundant chainmask check

We get the valid chainmasks on HW attach, checking
it again during reset is redundant. This patch removes the check.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove a few unused flags
Sujith [Mon, 30 Mar 2009 09:58:22 +0000 (15:28 +0530)]
ath9k: Remove a few unused flags

This patch removes unused HW capability flags and
HW operation variables, and a chainmask flag that
we don't use anywhere.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: No need to abort Rx path when autosleep is enabled.
Vivek Natarajan [Mon, 30 Mar 2009 08:47:00 +0000 (14:17 +0530)]
ath9k: No need to abort Rx path when autosleep is enabled.

For chipsets supporting autosleep feature, there is no need to abort
Rx engine since they are capable of automatically going back to sleep
after receiving a packet.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Do not "select" HW_RANDOM
Michael Buesch [Sun, 29 Mar 2009 11:19:31 +0000 (13:19 +0200)]
b43: Do not "select" HW_RANDOM

Auto-depend on HW_RANDOM, rather than "select"ing it.
This way the user has the choice to enable or disable HWRNG support.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix Sparse warning
Ivo van Doorn [Sat, 28 Mar 2009 19:51:41 +0000 (20:51 +0100)]
rt2x00: Fix Sparse warning

rt2x00link_reset_qual() is not declared in a header,
and is only internally used within rt2x00link.c.
It should be declared as static.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Move Move pci_dev specific access to rt2x00pci
Ivo van Doorn [Sat, 28 Mar 2009 19:51:24 +0000 (20:51 +0100)]
rt2x00: Move Move pci_dev specific access to rt2x00pci

pci_dev->irq and pci_name(pci_dev) access should be limited
to rt2x00pci only. This is more generic and allows a rt2x00 pci
driver to be controlled as PCI device but also as platform driver
(needed for rt2800pci SoC support).

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoar9170: fix hang on stop
Christian Lamparter [Sat, 28 Mar 2009 00:46:14 +0000 (01:46 +0100)]
ar9170: fix hang on stop

This patch fixes a locking problem which freezes the network core.

The deadlock goes as follows:
- ar9170_op_stop - is called
1. change the state to IDLE
2. > take the MUTEX <
3. cancel_SYNC all pending work, which means
    "block until a work_struct's callback has terminated"
=>  if filter_config_work was queued it tries to get the MUTEX,
       before checking the device state...

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: fix scanning in AR2424
Pavel Roskin [Fri, 27 Mar 2009 21:47:27 +0000 (17:47 -0400)]
ath5k: fix scanning in AR2424

AR5K_PHY_PLL_40MHZ_5413 should not be ORed with AR5K_PHY_MODE_RAD_RF5112
for 5 GHz channels.

The incorrect PLL value breaks scanning in the countries where 5 GHz
channels are allowed.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Update maintainers for ath9k
Luis R. Rodriguez [Fri, 27 Mar 2009 21:21:05 +0000 (17:21 -0400)]
ath9k: Update maintainers for ath9k

This has been the case really, we just forgot to update it.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Add Michael MIC failure event
Jouni Malinen [Fri, 27 Mar 2009 19:59:49 +0000 (21:59 +0200)]
nl80211: Add Michael MIC failure event

Define a new nl80211 event, NL80211_CMD_MICHAEL_MIC_FAILURE, to be
used to notify user space about locally detected Michael MIC failures.
This matches with the MLME-MICHAELMICFAILURE.indication() primitive.

Since we do not actually have TSC in the skb anymore when
mac80211_ev_michael_mic_failure() is called, that function is changed
to take in the TSC as an optional parameter instead of as a
requirement to include the TSC after the hdr field (which we did not
really follow). For now, TSC is not included in the events from
mac80211, but it could be added at some point.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Generate deauth/disassoc event for locally generated frames
Jouni Malinen [Fri, 27 Mar 2009 18:53:56 +0000 (20:53 +0200)]
nl80211: Generate deauth/disassoc event for locally generated frames

Previously, nl80211 mlme events were generated only for received
deauthentication and disassociation frames. We need to do the same for
locally generated ones in order to let applications know that we
disconnected (e.g., when AP does not reply to a probe). Rename the
nl80211 and cfg80211 functions (s/rx_//) to make it clearer that they
are used for both received and locally generated frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Require auth type for NL80211_CMD_AUTHENTICATE
Jouni Malinen [Fri, 27 Mar 2009 18:52:47 +0000 (20:52 +0200)]
nl80211: Require auth type for NL80211_CMD_AUTHENTICATE

NL80211_ATTR_AUTH_TYPE is a required parameter for
NL80211_CMD_AUTHENTICATE. We are currently (by chance) defaulting to
open system authentication if the attribute is not specified. It is
better to just reject the invalid command.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: remove duplicated #include
Huang Weiyi [Fri, 27 Mar 2009 14:21:36 +0000 (22:21 +0800)]
nl80211: remove duplicated #include

Remove duplicated #include in net/wireless/core.h.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: remove duplicated #include
Huang Weiyi [Fri, 27 Mar 2009 14:20:27 +0000 (22:20 +0800)]
cfg80211: remove duplicated #include

Remove duplicated #include in include/net/cfg80211.h.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorfkill-input: remove unused code
Johannes Berg [Fri, 27 Mar 2009 13:16:44 +0000 (14:16 +0100)]
rfkill-input: remove unused code

There's a lot of rfkill-input code that cannot ever be
compiled and is useless until somebody needs and tests
it -- therefore remove it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorfkill: remove user_claim stuff
Johannes Berg [Fri, 27 Mar 2009 13:14:31 +0000 (14:14 +0100)]
rfkill: remove user_claim stuff

Almost all drivers do not support user_claim, so remove it
completely and always report -EOPNOTSUPP to userspace. Since
userspace cannot really drive rfkill _anyway_ (due to the
odd restrictions imposed by the documentation) having this
code is just pointless.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorfkill: remove deprecated state constants
Johannes Berg [Mon, 30 Mar 2009 09:32:46 +0000 (11:32 +0200)]
rfkill: remove deprecated state constants

I only did superficial review, but these constants are stupid
to have and without proper warnings nobody will review the
code anyway, no amount of shouting will help.

Also fix wimax to use correct states.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: validate some input better
Johannes Berg [Fri, 27 Mar 2009 11:40:28 +0000 (12:40 +0100)]
nl80211: validate some input better

This patch changes nl80211 to:
 * validate that any IE input is a valid IE (stream)
 * move some validation code before locking
 * require that a reason code is given for both deauth/disassoc

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Don't access managed mode bits in non-managed mode
Vasanthakumar Thiagarajan [Fri, 27 Mar 2009 07:38:45 +0000 (13:08 +0530)]
mac80211: Don't access managed mode bits in non-managed mode

This fixes a stupid bug introduced in 25f85c31d4f..

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54spi: compensate firmware alignment bug in p54spi_rx
Max Filippov [Fri, 27 Mar 2009 04:50:53 +0000 (07:50 +0300)]
p54spi: compensate firmware alignment bug in p54spi_rx

Firmware may insert up to 4 padding bytes after the lmac header,
but it does not amend the size of SPI data transfer.
Such packets has correct data size in header, thus referencing
past the end of allocated skb. Put extra 4 bytes to the end of the
received skb to compensate for this case.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: use iwl_mac_conf_tx
Abhijeet Kolekar [Thu, 26 Mar 2009 17:14:10 +0000 (10:14 -0700)]
iwl3945: use iwl_mac_conf_tx

3945 now uses iwl_mac_conf_tx.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: merge and better support of suspend/resume for iwlagn and iwl3945
Wey-Yi Guy [Thu, 26 Mar 2009 17:14:08 +0000 (10:14 -0700)]
iwlwifi: merge and better support of suspend/resume for iwlagn and iwl3945

With mac80211's help to call stop() and start() in mac80211
suspend/resume function, both iwlagn and iwl3945 no longer calling
stop() and start(); remove un-necessary STATUS_IN_SUSPEND bit from both
header files and functions,

Move apm_ops.stop() function into pci_suspend() to ensure
DMA is stopped before go into suspend mode.

iwl3945 has the similar suspend/resume function as iwlagn, so move both
functions to iwlcore to be shared by both drivers.

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>
15 years agop54spi: fix p54spi_tx_frame DMA transfer initiation and skb cleanup
Max Filippov [Thu, 26 Mar 2009 03:38:25 +0000 (06:38 +0300)]
p54spi: fix p54spi_tx_frame DMA transfer initiation and skb cleanup

p54spi_tx_frame wasn't waiting for HOST_ALLOWED in SPI_ADRS_DMA_WRITE_CTRL.
This resulted in frequent 'WR_READY timeout' on beacon resubmission.

Also don't free skb on error path, as it gets freed on p54spi_wq_tx.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: support mesh for various firmware versions
Bing Zhao [Wed, 25 Mar 2009 16:51:16 +0000 (09:51 -0700)]
libertas: support mesh for various firmware versions

CMD_MESH_CONFIG command ID and a couple of structure members in TxPD,
RxPD have been changed in firmware version 10.x.y.z and newer.

Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54spi: fix p54spi_upload_firmware
Max Filippov [Wed, 25 Mar 2009 12:45:01 +0000 (13:45 +0100)]
p54spi: fix p54spi_upload_firmware

Instead of firmware itself p54_upload_firmware was sending to the device
content of struct firmware and the following random garbage.

Notice '&' before priv->firmware->data at p54spi_spi_write.
But simple removing of '&' sign triggered BUG_ON at dma_cache_maint.
Thus kmemdup - kfree workaround.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54spi: mask value read from SPI_ADRS_DMA_WRITE_CTRL in p54spi_wait_bit
Max Filippov [Wed, 25 Mar 2009 05:30:15 +0000 (08:30 +0300)]
p54spi: mask value read from SPI_ADRS_DMA_WRITE_CTRL in p54spi_wait_bit

Mask value read from SPI_ADRS_DMA_WRITE_CTRL in p54spi_wait_bit.
 Without this, 'fw_upload not allowed to DMA write' is observed at both N800 and N810.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoe1000/e1000e/igb/ixgb: do not use netif_wake_queue un-necessarily
Jesse Brandeburg [Tue, 21 Apr 2009 18:42:05 +0000 (18:42 +0000)]
e1000/e1000e/igb/ixgb: do not use netif_wake_queue un-necessarily

It was pointed out that the Intel wired ethernet drivers do not need to
wake the tx queue since netif_carrier_on/off will take care of the qdisc
management in order to guarantee the correct handling of the transmit
routine enable state.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosa1100_ir: fix build breakage
Alexander Beregalov [Wed, 22 Apr 2009 01:12:11 +0000 (18:12 -0700)]
sa1100_ir: fix build breakage

Fix simple typo. Caused by commit
a1de966682551debbe690672e760487cc555c05f
("irda/sa1100_ir: convert to net_device_ops").

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotun: fix tun_chr_aio_write so that aio works
Michael S. Tsirkin [Mon, 20 Apr 2009 01:26:11 +0000 (01:26 +0000)]
tun: fix tun_chr_aio_write so that aio works

aio_write gets const struct iovec * but tun_chr_aio_write casts this to struct
iovec * and modifies the iovec. As a result, attempts to use io_submit
to send packets to a tun device fail with weird errors such as EINVAL.

Since tun is the only user of skb_copy_datagram_from_iovec, we can
fix this simply by changing the later so that it does not
touch the iovec passed to it.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotun: fix tun_chr_aio_read so that aio works
Michael S. Tsirkin [Mon, 20 Apr 2009 01:25:59 +0000 (01:25 +0000)]
tun: fix tun_chr_aio_read so that aio works

aio_read gets const struct iovec * but tun_chr_aio_read casts this to struct
iovec * and modifies the iovec. As a result, attempts to use io_submit
to get packets from a tun device fail with weird errors such as EINVAL.

Fix by using the new skb_copy_datagram_const_iovec.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: skb_copy_datagram_const_iovec()
Michael S. Tsirkin [Mon, 20 Apr 2009 01:25:46 +0000 (01:25 +0000)]
net: skb_copy_datagram_const_iovec()

There's an skb_copy_datagram_iovec() to copy out of a paged skb,
but it modifies the iovec, and does not support starting
at an offset in the destination. We want both in tun.c, so let's
add the function.

It's a carbon copy of skb_copy_datagram_iovec() with enough changes to
be annoying.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoucc_geth: Move freeing of TX packets to NAPI context
Joakim Tjernlund [Fri, 17 Apr 2009 12:03:48 +0000 (12:03 +0000)]
ucc_geth: Move freeing of TX packets to NAPI context

This will make the system alot more responsive while ping flooding the
ucc_geth ethernet interface.

Also set NAPI weight to 64 as this is a common value.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agortl8139: unify the struct's name
Jianjun Kong [Mon, 20 Apr 2009 04:05:34 +0000 (04:05 +0000)]
rtl8139: unify the struct's name

unify the struct's name of "struct rtl8139_private *np" to "struct rtl8139_private *tp"

most of them like this:
struct rtl8139_private *tp = netdev_priv(dev);

Signed-off-by: Amos Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: factor out ethtool invocation of vlan/macvlan drivers
Patrick McHardy [Mon, 20 Apr 2009 04:49:28 +0000 (04:49 +0000)]
net: factor out ethtool invocation of vlan/macvlan drivers

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agousb driver for intellon int51x1 based PLC like devolo dlan duo
Peter Holik [Sat, 18 Apr 2009 07:24:21 +0000 (07:24 +0000)]
usb driver for intellon int51x1 based PLC like devolo dlan duo

usb driver for intellon int51x1 based PLC like devolo dlan duo
with improvements suggested by the guys of the mailinglist:
- name and prefix with int51x1 (Florian Fainelli)
- use conversion functions cpu_to_le16 / le16_to_cpu (Oliver Neukum)
- use pskb_may_pull instead of skb->len (Ilpo Järvinen)
- better code in tx_fixup (Ilpo Järvinen)
- use gotos for error handling (Ilpo Järvinen)
- better description (Jon Smirl)

Signed-off-by: Peter Holik <peter@holik.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoexport usbnet_get_ethernet_addr from usbnet and fixed cdc_ether.c
Peter Holik [Sat, 18 Apr 2009 07:24:17 +0000 (07:24 +0000)]
export usbnet_get_ethernet_addr from usbnet and fixed cdc_ether.c

because of using the same function get_ethernet_addr as cdc_ether.c
i export usbnet_get_ethernet_addr from usbnet and fixed cdc_ether
(suggested by Oliver Neukum).

Signed-off-by: Peter Holik <peter@holik.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Update version to 3.99
Matt Carlson [Mon, 20 Apr 2009 07:13:31 +0000 (07:13 +0000)]
tg3: Update version to 3.99

This patch updates the tg3 version to 3.99.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Restore LAA sooner in shutdown sequence
Matt Carlson [Mon, 20 Apr 2009 06:58:52 +0000 (06:58 +0000)]
tg3: Restore LAA sooner in shutdown sequence

After a shutdown reset, the LAA needs to be restored before posting the
post-reset signature in shared memory.  If the LAA is not restored
before then, the bootcode will assume the factory default MAC address
and WOL will not work with the LAA.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Limit CLKREQ fix to A[01] of 57780 asic rev
Matt Carlson [Mon, 20 Apr 2009 06:58:27 +0000 (06:58 +0000)]
tg3: Limit CLKREQ fix to A[01] of 57780 asic rev

This patch restricts the CLKREQ bugfix to the A0 and A1 revisions
of 57780 ASIC rev chips.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Allow 5761 WOL and LED fixes to 5761S too
Matt Carlson [Mon, 20 Apr 2009 06:58:01 +0000 (06:58 +0000)]
tg3: Allow 5761 WOL and LED fixes to 5761S too

The 5761 WOL and LED fixes used the PCI device ID to as the activation
key.  The 5761S requires the same process.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Prevent send BD corruption
Matt Carlson [Mon, 20 Apr 2009 06:57:41 +0000 (06:57 +0000)]
tg3: Prevent send BD corruption

On rare occasions, send BD corruptions can occur.  This patch
fixes the problem by increasing the L1 entry threshold to 4
milliseconds.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Handle NVRAM absent cases
Matt Carlson [Mon, 20 Apr 2009 06:57:14 +0000 (06:57 +0000)]
tg3: Handle NVRAM absent cases

Some 57780 ASIC revision parts do not have NVRAM.  Code the driver so
that it is tolerant of this configuration.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Allow screaming interrupt detection
Matt Carlson [Mon, 20 Apr 2009 06:55:01 +0000 (06:55 +0000)]
tg3: Allow screaming interrupt detection

The tg3 driver's ISR is coded to accept interrupts as its own if the
status block tag does not equal the last tag the driver has seen.  The
last_tag field is updated from tg3_poll.  In a screaming interrupt
situation from another device sharing tg3's IRQ, tg3_poll does not get
a chance to be called, so the last_tag will always be out of sync with
the status block tag.  Consequently, the driver will continually
declare the screaming interrupts as its own, thus thwarting the
screaming interrupt detection logic.

This patch solves the problem by creating a new last_irq_tag member and
recording the status block tag in the ISR.  The ISR then checks the
last_irq_tag for interrupt ownership.

Many thanks to John Marvin for the detailed bug report and analysis and
Michael Chan for the bugfix.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Tested-by: John Marvin <jsm@fc.hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 21 Apr 2009 08:32:26 +0000 (01:32 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
net/core/dev.c

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Mon, 20 Apr 2009 22:33:46 +0000 (15:33 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

15 years agotg3: Fix SEEPROM accesses
Matt Carlson [Mon, 20 Apr 2009 21:52:29 +0000 (14:52 -0700)]
tg3: Fix SEEPROM accesses

The recent NVRAM patches sanitized how the driver deals with NVRAM
data, but they failed to bring the SEEPROM interfaces inline with
the new strategy.  This patch brings the SEEPROM interfaces up to date.
This patch also reverts commit 0d489ffb76de0fe804cf06a9d4d11fa7342d74b9
("tg3: fix big endian MAC address collection failure").

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Tested-by: Robin Holt <holt@sgi.com>
Tested-by: James Bottomley <james.bottomley@HansenPartnership.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomac80211: fix basic rate bitmap calculation
Johannes Berg [Sun, 19 Apr 2009 11:22:11 +0000 (13:22 +0200)]
mac80211: fix basic rate bitmap calculation

"mac80211: fix basic rates setting from association response"
introduced a copy/paste error.

Unfortunately, this not just leads to wrong data being passed
to the driver but is remotely exploitable for some hardware or
driver combinations.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org [2.6.29]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: fix beacon loss detection after scan
Kalle Valo [Sun, 19 Apr 2009 05:47:19 +0000 (08:47 +0300)]
mac80211: fix beacon loss detection after scan

Currently beacon loss detection triggers after a scan. A probe request
is sent and a message like this is printed to the log:

wlan0: beacon loss from AP 00:12:17:e7:98:de - sending probe request

But in fact there is no beacon loss, the beacons are just not received
because of the ongoing scan. Fix it by updating last_beacon after
the scan has finished.

Reported-by: Jaswinder Singh Rajput <jaswinder@kernel.org>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Make nl80211_send_mlme_event() atomic
Jouni Malinen [Sat, 18 Apr 2009 18:53:15 +0000 (21:53 +0300)]
nl80211: Make nl80211_send_mlme_event() atomic

One of the code paths sending deauth/disassoc events ends up calling
this function with rcu_read_lock held, so we must use GFP_ATOMIC in
allocation routines.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoar9170usb: fix hang on resume
Christian Lamparter [Sat, 18 Apr 2009 15:12:18 +0000 (17:12 +0200)]
ar9170usb: fix hang on resume

This patch fixes a hang on resume when the filesystem is not
available and request_firmware blocks.

However, the device does not accept the firmware on resume.
and it will exit with:

> firmware part 1 upload failed (-71).
> device is in a bad state. please reconnect it!

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoMAC80211: Remove unused MAC80211_VERBOSE_SPECT_MGMT_DEBUG.
Robert P. J. Day [Sat, 18 Apr 2009 13:33:55 +0000 (09:33 -0400)]
MAC80211: Remove unused MAC80211_VERBOSE_SPECT_MGMT_DEBUG.

Remove this unused Kconfig variable, which Intel apparently once
promised to make use of but never did.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: fix module re-insertion bug
Joerg Albert [Sat, 18 Apr 2009 00:10:45 +0000 (02:10 +0200)]
mwl8k: fix module re-insertion bug

swap mwl8k_remove and mwl8k_shutdown functions to allow
"rmmod mwl8k; modprobe mwl8k"

Signed-off-by: Joerg Albert <jal2@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: deactivate broken powersave function
Christian Lamparter [Fri, 17 Apr 2009 13:14:22 +0000 (15:14 +0200)]
p54: deactivate broken powersave function

This patch deactivates powersave in station mode.

It does not work correctly yet, so the code does more harm than good.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945-base.c: Add missing space to debug print
Joe Perches [Thu, 16 Apr 2009 23:23:26 +0000 (16:23 -0700)]
iwl3945-base.c: Add missing space to debug print

"not" is not printed without a space after %pM

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Don't free register information on suspend
Ivo van Doorn [Sat, 28 Mar 2009 19:51:58 +0000 (20:51 +0100)]
rt2x00: Don't free register information on suspend

After suspend & resume the rt2x00 devices won't wakeup
anymore due to a broken register information setup.
The most important problem is the release of the EEPROM
buffer which is completely cleared and never read again
after the suspend.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agotun: Fix sk_sleep races when attaching/detaching
Herbert Xu [Sun, 19 Apr 2009 22:35:50 +0000 (22:35 +0000)]
tun: Fix sk_sleep races when attaching/detaching

As the sk_sleep wait queue actually lives in tfile, which may be
detached from the tun device, bad things will happen when we use
sk_sleep after detaching.

Since the tun device is the persistent data structure here (when
requested by the user), it makes much more sense to have the wait
queue live there.  There is no reason to have it in tfile at all
since the only time we can wait is if we have a tun attached.
In fact we already have a wait queue in tun_struct, so we might
as well use it.

Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotun: Only free a netdev when all tun descriptors are closed
Herbert Xu [Sat, 18 Apr 2009 14:15:52 +0000 (14:15 +0000)]
tun: Only free a netdev when all tun descriptors are closed

The commit c70f182940f988448f3c12a209d18b1edc276e33 ("tun: Fix
races between tun_net_close and free_netdev") fixed a race where
an asynchronous deletion of a tun device can hose a poll(2) on
a tun fd attached to that device.

However, this came at the cost of moving the tun wait queue into
the tun file data structure.  The problem with this is that it
imposes restrictions on when and where the tun device can access
the wait queue since the tun file may change at any time due to
detaching and reattaching.

In particular, now that we need to use the wait queue on the
receive path it becomes difficult to properly synchronise this
with the detachment of the tun device.

This patch solves the original race in a different way.  Since
the race is only because the underlying memory gets freed, we
can prevent it simply by ensuring that we don't do that until
all tun descriptors ever attached to the device (even if they
have since be detached because they may still be sitting in poll)
have been closed.

This is done by using reference counting the attached tun file
descriptors.  The refcount in tun->sk has been reappropriated
for this purpose since it was already being used for that, albeit
from the opposite angle.

Note that we no longer zero tfile->tun since tun_get will return
NULL anyway after the refcount on tfile hits zero.  Instead it
represents whether this device has ever been attached to a device.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosyncookies: remove last_synq_overflow from struct tcp_sock
Florian Westphal [Sun, 19 Apr 2009 09:43:48 +0000 (09:43 +0000)]
syncookies: remove last_synq_overflow from struct tcp_sock

last_synq_overflow eats 4 or 8 bytes in struct tcp_sock, even
though it is only used when a listening sockets syn queue
is full.

We can (ab)use rx_opt.ts_recent_stamp to store the same information;
it is not used otherwise as long as a socket is in listen state.

Move linger2 around to avoid splitting struct mtu_probe
across cacheline boundary on 32 bit arches.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoloopback: packet drops accounting
Eric Dumazet [Fri, 17 Apr 2009 22:03:10 +0000 (22:03 +0000)]
loopback: packet drops accounting

We can in some situations drop packets in netif_rx()

loopback driver does not report these (unlikely) drops to its stats,
and incorrectly change packets/bytes counts.

After this patch applied, "ifconfig lo" can reports these drops as in :

# ifconfig lo
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:692562900 errors:3228 dropped:3228 overruns:0 frame:0
          TX packets:692562900 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2865674174 (2.6 GiB)  TX bytes:2865674174 (2.6 GiB)

I initialy chose to reflect those errors only in tx_dropped/tx_errors, but David
convinced me that it was really RX errors, as loopback_xmit() really starts
a RX process. (calling eth_type_trans() for example, that itself pulls the ethernet header)

These errors are accounted in rx_dropped/rx_errors.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Fix GRO for multiple page fragments
Ben Hutchings [Thu, 16 Apr 2009 08:04:20 +0000 (08:04 +0000)]
net: Fix GRO for multiple page fragments

This loop over fragments in napi_fraginfo_skb() was "interesting".

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
David S. Miller [Mon, 20 Apr 2009 09:16:44 +0000 (02:16 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6

15 years agonet: fix "compatibility" typos
Marcin Slusarz [Sun, 19 Apr 2009 07:24:24 +0000 (07:24 +0000)]
net: fix "compatibility" typos

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: fix mid-wq adjustment helper
Ilpo Järvinen [Sat, 18 Apr 2009 05:48:48 +0000 (05:48 +0000)]
tcp: fix mid-wq adjustment helper

Just noticed while doing some new work that the recent
mid-wq adjustment logic will misbehave when FACK is not
in use (happens either due sysctl'ed off or auto-detected
reordering) because I forgot the relevant TCPCB tagbit.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: sch_netem: Fix an inconsistency in ingress netem timestamps.
Jarek Poplawski [Fri, 17 Apr 2009 10:08:49 +0000 (10:08 +0000)]
net: sch_netem: Fix an inconsistency in ingress netem timestamps.

Alex Sidorenko reported:

"while experimenting with 'netem' we have found some strange behaviour. It
seemed that ingress delay as measured by 'ping' command shows up on some
hosts but not on others.

After some investigation I have found that the problem is that skbuff->tstamp
field value depends on whether there are any packet sniffers enabled. That
is:

- if any ptype_all handler is registered, the tstamp field is as expected
- if there are no ptype_all handlers, the tstamp field does not show the delay"

This patch prevents unnecessary update of tstamp in dev_queue_xmit_nit()
on ingress path (with act_mirred) adding a check, so minimal overhead on
the fast path, but only when sniffers etc. are active.

Since netem at ingress seems to logically emulate a network before a host,
tstamp is zeroed to trigger the update and pretend delays are from the
outside.

Reported-by: Alex Sidorenko <alexandre.sidorenko@hp.com>
Tested-by: Alex Sidorenko <alexandre.sidorenko@hp.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoax25: proc uid file misses header
Alan Cox [Fri, 17 Apr 2009 04:19:36 +0000 (04:19 +0000)]
ax25: proc uid file misses header

This has been broken for a while. I happened to catch it testing because one
app "knew" that the top line of the calls data was the policy line and got
confused.

Put the header back.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: Fix EEH final recovery attempt
Divy Le Ray [Fri, 17 Apr 2009 12:21:27 +0000 (12:21 +0000)]
cxgb3: Fix EEH final recovery attempt

EEH attempts to recover up 6 times.
The last attempt leaves all the ports and adapter down.hen
The driver is then unloaded, bringing the adapter down again
unconditionally. The unload will hang.
Check if the adapter is already down before trying to bring it down again.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: Fix potential msi-x vector leak
Divy Le Ray [Fri, 17 Apr 2009 12:21:22 +0000 (12:21 +0000)]
cxgb3: Fix potential msi-x vector leak

Release vectors when a MSI-X allocation fails.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: fix workqueue flush issues
Divy Le Ray [Fri, 17 Apr 2009 12:21:17 +0000 (12:21 +0000)]
cxgb3: fix workqueue flush issues

The fatal error task can be scheduled while processing an offload packet
in NAPI context when the connection handle is bogus. this can race
with the ports being brought down and the cxgb3 workqueue being flushed.
Stop napi processing before flushing the work queue.

The ULP drivers (iSCSI, iWARP) might also schedule a task on keventd_wk
while releasing a connection handle (cxgb3_offload.c::cxgb3_queue_tid_release()).
The driver however does not flush any work on keventd_wq while being unloaded.
This patch also fixes this.

Also call cancel_delayed_work_sync in place of the the deprecated
cancel_rearming_delayed_workqueue.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: fix link fault handling
Divy Le Ray [Fri, 17 Apr 2009 12:21:11 +0000 (12:21 +0000)]
cxgb3: fix link fault handling

Use the existing periodic task to handle link faults.
The link fault interrupt handler is also called in work queue context,
which is wrong and might cause potential deadlocks.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000: init link state correctly
Jesse Brandeburg [Fri, 17 Apr 2009 20:44:36 +0000 (20:44 +0000)]
e1000: init link state correctly

As reported by Andrew Lutomirski <amluto@gmail.com>

All the intel wired ethernet drivers were calling netif_carrier_off
and netif_stop_queue (or variants) before calling register_netdevice

This is incorrect behavior as was pointed out by davem, and causes
ifconfig and friends to report a strange state before first link
after the driver was loaded.

This apparently confused *some* versions of networkmanager.

Andy tested this for e1000e and confirmed it was working for him.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reported-by: Andrew Lutomirski <amluto@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: indicate link down at load
Jesse Brandeburg [Fri, 17 Apr 2009 20:44:34 +0000 (20:44 +0000)]
e1000e: indicate link down at load

As reported by Andrew Lutomirski <amluto@gmail.com>

All the intel wired ethernet drivers were calling netif_carrier_off
and netif_stop_queue (or variants) before calling register_netdevice

This is incorrect behavior as was pointed out by davem, and causes
ifconfig and friends to report a strange state before first link
after the driver was loaded, since without a netif_carrier_off, the stack
assumes carrier_on, but before register_netdev, netlink messages are not
sent out telling link state.

This apparently confused *some* versions of networkmanager.

Andy tested this for e1000e and confirmed it was working for him.

see thread: http://marc.info/?l=linux-netdev&m=123946479705636&w=2

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andy Lutomirski <amluto@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: fix link down inital state
Jesse Brandeburg [Fri, 17 Apr 2009 20:44:32 +0000 (20:44 +0000)]
igb: fix link down inital state

As reported by Andrew Lutomirski <amluto@gmail.com>

All the intel wired ethernet drivers were calling netif_carrier_off
and netif_stop_queue (or variants) before calling register_netdevice

This is incorrect behavior as was pointed out by davem, and causes
ifconfig and friends to report a strange state before first link
after the driver was loaded, since without a netif_carrier_off, the stack
assumes carrier_on, but before register_netdev, netlink messages are not
sent out telling link state.

This apparently confused *some* versions of networkmanager.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reported-by: Andrew Lutomirski <amluto@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgb: fix link down initial state
Jesse Brandeburg [Fri, 17 Apr 2009 20:44:29 +0000 (20:44 +0000)]
ixgb: fix link down initial state

As reported by Andrew Lutomirski <amluto@gmail.com>

All the intel wired ethernet drivers were calling netif_carrier_off
and netif_stop_queue (or variants) before calling register_netdevice

This is incorrect behavior as was pointed out by davem, and causes
ifconfig and friends to report a strange state before first link
after the driver was loaded, since without a netif_carrier_off, the stack
assumes carrier_on, but before register_netdev, netlink messages are not
sent out telling link state.

This apparently confused *some* versions of networkmanager.

in addition this driver appeared to need a netif_start_queue at
the end of open.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reported-by: Andrew Lutomirski <amluto@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>