OSDN Git Service

uclinux-h8/linux.git
14 years agob43legacy: Fix DMA TX bounce buffer copying master-2009-10-30
Larry Finger [Fri, 30 Oct 2009 16:58:21 +0000 (11:58 -0500)]
b43legacy: Fix DMA TX bounce buffer copying

This patch is adapted from the submission by Michael Buesch <mb@bu3sch.de>
for a bounce-buffer copying problem with b43.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove bogus code
Johannes Berg [Fri, 30 Oct 2009 14:48:43 +0000 (15:48 +0100)]
mac80211: remove bogus code

It's not right to do something here when returning an
error, and hostapd should never have relied on it as
it only fixes up a small part of the problem anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove sent_ps_buffered
Johannes Berg [Fri, 30 Oct 2009 11:56:02 +0000 (12:56 +0100)]
mac80211: remove sent_ps_buffered

This variable is set once, and tested once.
However, the code path that can set it is
mutually exclusive with the code path that
tests it, so the test is always true. Thus
we also don't need to set it either and can
just remove the variable.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: also drop qos-nullfunc frames silently
Johannes Berg [Fri, 30 Oct 2009 11:55:03 +0000 (12:55 +0100)]
mac80211: also drop qos-nullfunc frames silently

We drop nullfunc frames, but not qos-nullfunc frames,
even though those could be used for PS state control
as well.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: fix init loop timeout
Luciano Coelho [Thu, 29 Oct 2009 11:20:04 +0000 (13:20 +0200)]
wl1271: fix init loop timeout

The check after the loop which checks whether the initialization timed-out
was wrong.  If the initialization would succeed exactly in the 20000th time
(the value set for INIT_LOOP), the driver would bail out and claim that
initialization failed.

Reported-by: Juha Leppanen <juha_motorsportcom@luukku.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: unconditionally set IEEE80211_TX_CTL_SEND_AFTER_DTIM
Johannes Berg [Thu, 29 Oct 2009 11:19:21 +0000 (12:19 +0100)]
mac80211: unconditionally set IEEE80211_TX_CTL_SEND_AFTER_DTIM

When mac80211 is asked to buffer multicast frames
in AP mode, it will not set the flag indicating
that the frames should be sent after the DTIM
beacon for those frames buffered in software. Fix
this little inconsistency by always setting that
flag in the buffering code path.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: deprecate qual value
Johannes Berg [Thu, 29 Oct 2009 07:41:25 +0000 (08:41 +0100)]
mac80211: deprecate qual value

This value is unused by mac80211, because it was only
be used by wireless extensions, and turned out to not
be useful there because the quality value needs to be
comparable between scan results and the current value
which is impossible when the qual value is calculated
taking into account noise, for example.

Since it is unused anyway, this patch deprecates it
in the hope that drivers will remove their sometimes
quite expensive calculations of the value.

I'm open to actual uses of the value, but the best
way of using it seems to be what the Intel drivers do
which should probably be generalised if we have noise
values from the hardware.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: introduce ieee80211_beacon_get_tim()
Johannes Berg [Thu, 29 Oct 2009 07:30:35 +0000 (08:30 +0100)]
mac80211: introduce ieee80211_beacon_get_tim()

Compared to ieee80211_beacon_get(), the new function
ieee80211_beacon_get_tim() returns information on the
location and length of the TIM IE, which some drivers
need in order to generate the TIM on the device. The
old function, ieee80211_beacon_get(), becomes a small
static inline wrapper around the new one to not break
all drivers.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: airo_cs needs WEXT_SPY
Randy Dunlap [Wed, 28 Oct 2009 23:08:32 +0000 (16:08 -0700)]
wireless: airo_cs needs WEXT_SPY

airo_cs uses spy interfaces so it needs to select WEXT_SPY.

ERROR: "iw_handler_set_thrspy" [drivers/net/wireless/airo.ko] undefined!
ERROR: "wireless_spy_update" [drivers/net/wireless/airo.ko] undefined!
ERROR: "iw_handler_get_spy" [drivers/net/wireless/airo.ko] undefined!
ERROR: "iw_handler_get_thrspy" [drivers/net/wireless/airo.ko] undefined!
ERROR: "iw_handler_set_spy" [drivers/net/wireless/airo.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: make align adjustment code support paged SKB
Zhu Yi [Wed, 28 Oct 2009 20:13:52 +0000 (13:13 -0700)]
mac80211: make align adjustment code support paged SKB

This fixed a BUG_ON in __skb_trim() when paged rx is used in
iwlwifi driver. Yes, the whole mac80211 stack doesn't support
paged SKB yet. But let's start the work slowly from small
code snippets.

Reported-and-tested-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: make ath9k_phy_modify_rx_buffer() static
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:46 +0000 (02:33 -0400)]
ath9k_hw: make ath9k_phy_modify_rx_buffer() static

To do this we reorder callers in order in which they are called.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: Fix and complete force bias for AR5416
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:45 +0000 (02:33 -0400)]
ath9k_hw: Fix and complete force bias for AR5416

Force bias is a fix for usage of AR5416 radios on the 2.4 GHz band
for orientation sensitivity. This was only partially implemented
with the ath9k_hw_decrease_chain_power() but first -- this was being
called for all chipsets which is not correct and second -- it was
missing the actual orientation code.

We now ensure to only enable force bias only for AR5416 and BUG_ON()
on other chipsets. Although ath9k_hw_decrease_chain_power() was enabled
for newer chipsets I suspect that it never ran unless the EEPROM had
ATH9K_ANT_FIXED_A or ATH9K_ANT_FIXED_B for antenna diversity.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: remove unused modesIndex param from ath9k_hw_write_regs()
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:44 +0000 (02:33 -0400)]
ath9k_hw: remove unused modesIndex param from ath9k_hw_write_regs()

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: make spur mitigation a callback
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:43 +0000 (02:33 -0400)]
ath9k_hw: make spur mitigation a callback

This only differs between single-chip solutions and non single-chip
solutions.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: order phy.c code and integrate spur mitigation
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:42 +0000 (02:33 -0400)]
ath9k_hw: order phy.c code and integrate spur mitigation

This reorders phy.c routines in the order in the order in which they are used
and also moves the spur mitigation helpers for each type of chip into phy.c
as they are RF related.

This patch has no functional changes.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: use a callback for frequency change
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:41 +0000 (02:33 -0400)]
ath9k_hw: use a callback for frequency change

This avoids a branch on every channel change.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: make both analog channel change routines return int
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:40 +0000 (02:33 -0400)]
ath9k_hw: make both analog channel change routines return int

This allows us to later define a callback for both.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: rename ath9k_hw_rf_free() to ath9k_hw_rf_free_ext_banks()
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:39 +0000 (02:33 -0400)]
ath9k_hw: rename ath9k_hw_rf_free() to ath9k_hw_rf_free_ext_banks()

This clarifies this is only required for external radios.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: simplify ath9k_hw_rf_alloc_ext_banks()
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:38 +0000 (02:33 -0400)]
ath9k_hw: simplify ath9k_hw_rf_alloc_ext_banks()

This is calling an allocation and checking for it, simplify
this process in a macro.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: simplify rf attach and rename to ath9k_hw_rf_alloc_ext_banks()
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:37 +0000 (02:33 -0400)]
ath9k_hw: simplify rf attach and rename to ath9k_hw_rf_alloc_ext_banks()

ath9k_hw_rfattach() was just calling a helper and this helper was
doing nothing for single-chip devices, and for non single-chip devices
it is just allocating memory for banks to program the RF registers
at a later time. Simplify this by having the hw initialization call
the rf bank allocation directly for external radios.

Also, propagate an -ENOMEM properly now upon failure.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: bail out early on ath9k_hw_init_rf()
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:36 +0000 (02:33 -0400)]
ath9k_hw: bail out early on ath9k_hw_init_rf()

We a huge branch for old hardware and nothing for newer
hardware. Instead of doing this just bail out early for
newer hardware.

This patch has no functional changes.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: start documenting 802.11n RF anlong front ends
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:35 +0000 (02:33 -0400)]
ath9k_hw: start documenting 802.11n RF anlong front ends

Document what we can about the RF analog front ends (radios)
of Atheros 802.11n devices. What should be clearer now is the
what we do for old pre AR5416 and AR5418 MAC based devices in
comparison to the modern sigle-chip 802.11n solutions.

All devices after AR9280 are single chip and require less
programming -- the RF registers no longer need to be initialized
as they all have the RF analog front end embedded together with
the MAC/BB; this includes the AR9271. Older devices such as the
ones with the AR5416 MACs (PCI) or AR5418 MACs (PCI-E) have an
external 2.4 GHz AR2133 radio or a dual band 2.4 GHz / 5 GHz
AR5133 radio. These external radios require additional programming
of the RF registers.

Clarify which parts are for what devices and which code is
shared. This patch has no functional changes.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: change the way we initialize the pll for ar9271
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:34 +0000 (02:33 -0400)]
ath9k_hw: change the way we initialize the pll for ar9271

We adjust the core clock for ar9271 to 117 MHz; this also
requires us to adjust the baud divider based on the targetted
baud rate.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: update register initialization/reset values for ar9271
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:33 +0000 (02:33 -0400)]
ath9k_hw: update register initialization/reset values for ar9271

This update the register initialization/reset values (aka initvals)
for ar9271 based on the last recommended values on 2009-06-04 by our
systems engineering team.

The changes account for:

  * Supporting ar9271 1.0 and ar9271 1.1 together, the difference
    is bb_spectral_scan_ena, for 1.0 we'll set this to 0x1.

  * Ensuring we get the correct noise floor values -115 ~ -118
    when we enable bb_enable_ant_div_lnadiv=0 and
    mc_tx_def_ant_sel=1. Previous to this we would get noise
    floor values in the range -50 ~ -80. To fix settings for
    the registers:

     - bb_ch1_xatten1_db
     - bb_ch1_xatten2_db
     - bb_ch1_xatten1_margin
     - bb_ch1_xatten2_margin
     - bb_ch1_gain_force
     - bb_ch1_xatten2_hyst_margin
     - bb_ch1_xatten1_hyst_margin
     - bb_ch1_max_oc_gain

  * 0x8120[2] mc_mic_new_location_enable is changed to 0x1. The MAC team
    suggest to set this value.

  * 0x9910[0] bb_spectral_scan_ena is changed to 0x0.
    For ar9271 1.1 we don't need to enable this bit.

Cc: Stephen Chen <Stephen.Chen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: modify the rf control register for ar9271 revision 1.0
Luis R. Rodriguez [Mon, 19 Oct 2009 06:33:32 +0000 (02:33 -0400)]
ath9k_hw: modify the rf control register for ar9271 revision 1.0

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoStaging: netwave: add TODO file
Greg Kroah-Hartman [Tue, 27 Oct 2009 16:18:26 +0000 (09:18 -0700)]
Staging: netwave: add TODO file

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoStaging: wavelan: add TODO file
Greg Kroah-Hartman [Tue, 27 Oct 2009 16:18:25 +0000 (09:18 -0700)]
Staging: wavelan: add TODO file

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoStaging: arlan: add TODO file
Greg Kroah-Hartman [Tue, 27 Oct 2009 16:18:24 +0000 (09:18 -0700)]
Staging: arlan: add TODO file

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoStaging: strip: add TODO file
Greg Kroah-Hartman [Tue, 27 Oct 2009 16:18:23 +0000 (09:18 -0700)]
Staging: strip: add TODO file

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: remove WLAN_80211 and WLAN_PRE80211 from Kconfig
John W. Linville [Wed, 28 Oct 2009 20:29:30 +0000 (16:29 -0400)]
wireless: remove WLAN_80211 and WLAN_PRE80211 from Kconfig

With the WLAN_PRE80211 drivers moved to drivers/staging, this
distinction becomes unnecessary.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonetwave: move driver to staging
John W. Linville [Wed, 28 Oct 2009 20:16:38 +0000 (16:16 -0400)]
netwave: move driver to staging

Move the netwave driver to drivers/staging.  This is another pre-802.11
driver that has seen virtually no non-API-fixup activity in years, and
for which no active hardware is likely to still exist.  This driver
represents unnecessary ongoing maintenance for no clear benefit.

This patch brought to you by the "hacking" session at the 2009 Kernel
Summit in Tokyo, Japan...

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowavelan: move driver to staging
John W. Linville [Wed, 28 Oct 2009 20:06:56 +0000 (16:06 -0400)]
wavelan: move driver to staging

Move the wavelan driver to drivers/staging.  This is another pre-802.11
driver that has seen virtually no non-API-fixup activity in years, and
for which no active hardware is likely to still exist.  This driver
represents unnecessary ongoing maintenance for no clear benefit.

This patch brought to you by the "hacking" session at the 2009 Kernel
Summit in Tokyo, Japan...

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoarlan: move driver to staging
John W. Linville [Tue, 20 Oct 2009 04:53:08 +0000 (13:53 +0900)]
arlan: move driver to staging

Move the arlan driver to drivers/staging.  This is another pre-802.11
driver that has seen virtually no non-API-fixup activity in years, and
for which no active hardware is likely to still exist.  This driver
represents unnecessary ongoing maintenance for no clear benefit.

This patch brought to you by the "hacking" session at the 2009 Kernel
Summit in Tokyo, Japan...

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agostrip: move driver to staging
John W. Linville [Tue, 20 Oct 2009 04:38:11 +0000 (13:38 +0900)]
strip: move driver to staging

Move the strip ("Starmode Radio IP") driver to drivers/staging.  For
several years this driver has only seen API "bombing-run" changes, and
few people ever had the hardware.  This driver represents unnecessary
ongoing maintenance for no clear benefit.

This patch brought to you by the "hacking" session at the 2009 Kernel
Summit in Tokyo, Japan...

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove RX_FLAG_RADIOTAP
Johannes Berg [Wed, 28 Oct 2009 09:03:35 +0000 (10:03 +0100)]
mac80211: remove RX_FLAG_RADIOTAP

While there may be a case for a driver adding its
own bits of radiotap information, none currently
does. Also, drivers would have to copy the code
to generate the radiotap bits that now mac80211
generates. If some driver in the future needs to
add some driver-specific information I'd expect
that to be in a radiotap vendor namespace and we
can add a different way of passing such data up
and having mac80211 include it.

Additionally, rename IEEE80211_CONF_RADIOTAP to
IEEE80211_CONF_MONITOR since it's still used by
b43(legacy) to obtain per-frame timestamps.

The purpose of this patch is to simplify the RX
code in mac80211 to make it easier to add paged
skb support.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix radiotap header generation
Johannes Berg [Wed, 28 Oct 2009 08:58:52 +0000 (09:58 +0100)]
mac80211: fix radiotap header generation

In

  commit 601ae7f25aea58f208a7f640f6174aac0652403a
  Author: Bruno Randolf <br1@einfach.org>
  Date:   Thu May 8 19:22:43 2008 +0200

      mac80211: make rx radiotap header more flexible

code was added that tried to align the radiotap header
position in memory based on the radiotap header length.
Quite obviously, that is completely useless.

Instead of trying to do that, use unaligned accesses
to generate the radiotap header. To properly do that,
we also need to mark struct ieee80211_radiotap_header
packed, but that is fine since it's already packed
(and it should be marked packed anyway since its a
wire format).

Cc: Bruno Randolf <br1@einfach.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: split hardware scan by band
Johannes Berg [Tue, 27 Oct 2009 19:59:55 +0000 (20:59 +0100)]
mac80211: split hardware scan by band

There's currently a very odd bug in mac80211 -- a
hardware scan that is done while the hardware is
really operating on 2.4 GHz will include CCK rates
in the probe request frame, even on 5 GHz (if the
driver uses the mac80211 IEs). Vice versa, if the
hardware is operating on 5 GHz the 2.4 GHz probe
requests will not include CCK rates even though
they should.

Fix this by splitting up cfg80211 scan requests by
band -- recalculating the IEs every time -- and
requesting only per-band scans from the driver.

Apparently this bug hasn't been a problem yet, but
it is imaginable that some older access points get
confused if confronted with such behaviour.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove outdated comment
Johannes Berg [Tue, 27 Oct 2009 19:56:21 +0000 (20:56 +0100)]
mac80211: remove outdated comment

This comment hasn't been a real TODO item for a long
time now since we fixed that quite a while ago.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211_hwsim: don't register CCK rates on 5ghz
Johannes Berg [Tue, 27 Oct 2009 19:53:58 +0000 (20:53 +0100)]
mac80211_hwsim: don't register CCK rates on 5ghz

This buglet confused me a lot just now ...

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: remove bogus register write on ath9k_hw_9271_pa_cal()
Luis R. Rodriguez [Tue, 27 Oct 2009 16:59:37 +0000 (12:59 -0400)]
ath9k_hw: remove bogus register write on ath9k_hw_9271_pa_cal()

An extra register was being written to for PA calibration
making the hardware unresponsive, remove it. Hardware
reset should now complete fine on ar9271.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: correct AR_PHY_SPECTRAL_SCAN register offset
Luis R. Rodriguez [Tue, 27 Oct 2009 16:59:36 +0000 (12:59 -0400)]
ath9k_hw: correct AR_PHY_SPECTRAL_SCAN register offset

We had 0x9912 but AR_PHY_SPECTRAL_SCAN is 0x9910. By using the
0x9912 we were making the hardware unresponsive. This allows us
to move forward with hardware reset on ar9271 on the ath9k_htc
driver.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: add AR9271 single chip name mapping
Luis R. Rodriguez [Tue, 27 Oct 2009 16:59:35 +0000 (12:59 -0400)]
ath9k_hw: add AR9271 single chip name mapping

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: distinguish single-chip solutions on initial probe print
Luis R. Rodriguez [Tue, 27 Oct 2009 16:59:34 +0000 (12:59 -0400)]
ath9k_hw: distinguish single-chip solutions on initial probe print

Devices with external radios have revisions which we can count on.
On single chip solutions these EEPROM values for these radio revision
also exist but are not meaningful as the radios are embedded onto the
same chip. Each single-chip device evolves together as one device.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: move mac name and rf name helpers to hw code
Luis R. Rodriguez [Tue, 27 Oct 2009 16:59:33 +0000 (12:59 -0400)]
ath9k_hw: move mac name and rf name helpers to hw code

These are shared between ath9k and the future ath9k_htc driver.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: enable power save
Kalle Valo [Tue, 27 Oct 2009 15:36:25 +0000 (17:36 +0200)]
wl1251: enable power save

wl1251 supports power save and it can be enabled now.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix dynamic power save for devices with nullfunc support in hw
Kalle Valo [Tue, 27 Oct 2009 15:36:17 +0000 (17:36 +0200)]
mac80211: fix dynamic power save for devices with nullfunc support in hw

In TX path it was assumed that dynamic power save works only if
IEEE80211_HW_PS_NULLFUNC_STACK is set. But is not the case, there are
devices which have nullfunc support in hardware but need mac80211
to handle dynamic power save timers, TI's wl1251 is one of them.

The fix is to not check for IEEE80211_HW_PS_NULLFUNC_STACK in
is_dynamic_ps_enabled(), instead check IEEE80211_HW_SUPPORTS_PS and
IEEE80211_HW_SUPPORTS_DYNAMIC_PS flags and act accordingly.

Tested with wl1251.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: refactor dynamic power save check
Kalle Valo [Tue, 27 Oct 2009 15:36:09 +0000 (17:36 +0200)]
mac80211: refactor dynamic power save check

Refactor dynamic power save checks to a function of it's own for better
readibility. No functional changes.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211/mac80211: use debugfs_remove_recursive
Johannes Berg [Tue, 27 Oct 2009 11:59:03 +0000 (12:59 +0100)]
cfg80211/mac80211: use debugfs_remove_recursive

We can save a lot of code and pointers in the structs
by using debugfs_remove_recursive().

First, change cfg80211 to use debugfs_remove_recursive()
so that drivers do not need to clean up any files they
added to the per-wiphy debugfs (if and only if they are
ok to be accessed until after wiphy_unregister!).

Then also make mac80211 use debugfs_remove_recursive()
where necessary -- it need not remove per-wiphy files
as cfg80211 now removes those, but netdev etc. files
still need to be handled but can now be removed without
needing struct dentry pointers to all of them.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: LP-PHY: Begin implementing calibration & software RFKILL support
Gábor Stefanik [Sun, 25 Oct 2009 15:26:36 +0000 (16:26 +0100)]
b43: LP-PHY: Begin implementing calibration & software RFKILL support

This implements the following calibration functions:
-Set TX IQCC
-Set TX Power by Index
-PR41573 workaround (incomplete, needs PHY reset)
-Calc RX IQ Comp
-PHY Cordic
-Run Samples
-Start/Stop TX Tone
-part of PAPD Cal TX Power
-RX I/Q Calibration
-The basic structure of the periodic calibration wrapper

Software RFKILL (required by calibration) is also implemented in
this round.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agovlan: cleanup multiple unregistrations
Patrick McHardy [Fri, 30 Oct 2009 06:43:00 +0000 (23:43 -0700)]
vlan: cleanup multiple unregistrations

The temporary copy of the VLAN group is not neccessary since the lower device
is already in the process of being unregistered, if it was neccessary the
memset of the global group would introduce a race condition.

With this removed, the changes to the original code are only a few lines, so
remove the new function and move the code back into vlan_device_event().

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoconvert kaweth to use usb_reset_configuration()
Oliver Neukum [Thu, 29 Oct 2009 05:07:12 +0000 (05:07 +0000)]
convert kaweth to use usb_reset_configuration()

For USB 3.0 it is necessary that all drivers use the standard
API to reset a configuration. This removes a home-grown
implementation.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Hi David,

please take this for the next merge window.

Regards
Oliver
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoax25: unsigned cannot be less than 0 in ax25_ctl_ioctl()
roel kluin [Wed, 14 Oct 2009 05:26:30 +0000 (05:26 +0000)]
ax25: unsigned cannot be less than 0 in ax25_ctl_ioctl()

struct ax25_ctl_struct member `arg' is unsigned and cannot be less
than 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: version 1.26
Stephen Hemminger [Thu, 29 Oct 2009 06:37:10 +0000 (06:37 +0000)]
sky2: version 1.26

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: 88E8059 support
Stephen Hemminger [Thu, 29 Oct 2009 06:37:09 +0000 (06:37 +0000)]
sky2: 88E8059 support

Tentative support for newer Marvell hardware including
the Yukon-2 Optima chip. Do not have hatdware to test this yet,
code is based on vendor driver.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: workarounds for Yukon-2 supreme
Stephen Hemminger [Thu, 29 Oct 2009 06:37:08 +0000 (06:37 +0000)]
sky2: workarounds for Yukon-2 supreme

Changes related to support of Yukon supreme chip.
Don't have this chip version to test on,
these are reverse engineered from the vendor (GPL) driver.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: fix receive pause thresholds
Stephen Hemminger [Thu, 29 Oct 2009 06:37:07 +0000 (06:37 +0000)]
sky2: fix receive pause thresholds

Program the receive pause thresholds differently depending on
chip version. This cloned from from the vendor (GPL) driver.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: add register definitions for new chips
Stephen Hemminger [Thu, 29 Oct 2009 06:37:06 +0000 (06:37 +0000)]
sky2: add register definitions for new chips

This adds infrastructure for the newer chip versions and workarounds.
Extracted from the vendor (GPL) driver.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: add SK-9E21M device id
Stephen Hemminger [Thu, 29 Oct 2009 06:37:05 +0000 (06:37 +0000)]
sky2: add SK-9E21M device id

This is a new ID that just showed up in latest vendor driver.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Enable heuristic selection between page and skb RX buffers
Ben Hutchings [Thu, 29 Oct 2009 07:21:33 +0000 (07:21 +0000)]
sfc: Enable heuristic selection between page and skb RX buffers

Now that we can tell whether GRO is being applied, this heuristic is
effective once more.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Feed GRO result into RX allocation policy and interrupt moderation
Ben Hutchings [Thu, 29 Oct 2009 07:21:24 +0000 (07:21 +0000)]
sfc: Feed GRO result into RX allocation policy and interrupt moderation

When GRO is successfully merging received packets, we should allocate
raw page buffers rather than skbs that will be discarded by GRO.
Otherwise, we should allocate skbs.

GRO also benefits from higher interrupt moderation, so increase the
score for mergeable RX packets.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogro: Change all receive functions to return GRO result codes
Ben Hutchings [Fri, 30 Oct 2009 04:36:53 +0000 (21:36 -0700)]
gro: Change all receive functions to return GRO result codes

This will allow drivers to adjust their receive path dynamically
based on whether GRO is being applied successfully.

Currently all in-tree callers ignore the return values of these
functions and do not need to be changed.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogro: Name the GRO result enumeration type
Ben Hutchings [Thu, 29 Oct 2009 07:17:09 +0000 (07:17 +0000)]
gro: Name the GRO result enumeration type

This clarifies which return and parameter types are GRO result codes
and not RX result codes.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Fri, 30 Oct 2009 04:28:59 +0000 (21:28 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

14 years agonet: Fix 'Re: PACKET_TX_RING: packet size is too long'
Gabor Gombas [Thu, 29 Oct 2009 10:19:11 +0000 (03:19 -0700)]
net: Fix 'Re: PACKET_TX_RING: packet size is too long'

Currently PACKET_TX_RING forces certain amount of every frame to remain
unused. This probably originates from an early version of the
PACKET_TX_RING patch that in fact used the extra space when the (since
removed) CONFIG_PACKET_MMAP_ZERO_COPY option was enabled. The current
code does not make any use of this extra space.

This patch removes the extra space reservation and lets userspace make
use of the full frame size.

Signed-off-by: Gabor Gombas <gombasg@sztaki.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet,socket: introduce DECLARE_SOCKADDR helper to catch overflow at build time
Cyrill Gorcunov [Thu, 29 Oct 2009 09:59:18 +0000 (02:59 -0700)]
net,socket: introduce DECLARE_SOCKADDR helper to catch overflow at build time

proto_ops->getname implies copying protocol specific data
into storage unit (particulary to __kernel_sockaddr_storage).
So when we implement new protocol support we should keep such
a detail in mind (which is easy to forget about).

Lets introduce DECLARE_SOCKADDR helper which check if
storage unit is not overfowed at build time.

Eventually inet_getname is switched to use DECLARE_SOCKADDR
(to show example of usage).

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 29 Oct 2009 09:47:13 +0000 (02:47 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

14 years agonet: Introduce dev_get_by_index_rcu()
Eric Dumazet [Mon, 19 Oct 2009 19:18:49 +0000 (19:18 +0000)]
net: Introduce dev_get_by_index_rcu()

Some workloads hit dev_base_lock rwlock pretty hard.
We can use RCU lookups to avoid touching this rwlock.

netdevices are already freed after a RCU grace period, so this patch
adds no penalty at device dismantle time.

dev_ifname() converted to dev_get_by_index_rcu()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatm: Cleanup redundant tests on unsigned
roel kluin [Fri, 23 Oct 2009 06:09:55 +0000 (06:09 +0000)]
atm: Cleanup redundant tests on unsigned

The variables are unsigned so the `< 0' test always fails, the
other part of the test catches wrapped values.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Cleanup redundant tests on unsigned
roel kluin [Fri, 23 Oct 2009 05:59:21 +0000 (05:59 +0000)]
net: Cleanup redundant tests on unsigned

optlen is unsigned so the `< 0' test is never true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Cleanup redundant tests on unsigned
roel kluin [Fri, 23 Oct 2009 05:21:56 +0000 (05:21 +0000)]
net: Cleanup redundant tests on unsigned

If there is data, the unsigned skb->len is greater than 0.

rt.sigdigits is unsigned as well, so the test `>= 0' is
always true, the other part of the test catches wrapped
values.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: convert strcmp chain to table lookup
Tilman Schmidt [Sun, 25 Oct 2009 09:30:57 +0000 (09:30 +0000)]
gigaset: convert strcmp chain to table lookup

Replace the sequence of strcmp calls for interpreting ZSAU parameter
strings by a table of known strings and lookup loop to improve
readability.

Impact: readability improvement, no functional change
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: checkpatch cleanup of ev-layer.c
Tilman Schmidt [Sun, 25 Oct 2009 09:30:47 +0000 (09:30 +0000)]
gigaset: checkpatch cleanup of ev-layer.c

On more step towards the holy grail of checkpatch.pl silence.

Impact: cosmetic
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobas_gigaset: checkpatch cleanup
Tilman Schmidt [Sun, 25 Oct 2009 09:30:37 +0000 (09:30 +0000)]
bas_gigaset: checkpatch cleanup

On the quest for the holy grail of checkpatch.pl silence.

Impact: cosmetic
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoser_gigaset: checkpatch cleanup
Tilman Schmidt [Sun, 25 Oct 2009 09:30:27 +0000 (09:30 +0000)]
ser_gigaset: checkpatch cleanup

Duly uglified as demanded by checkpatch.pl.

Impact: cosmetic
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: checkpatch cleanup
Tilman Schmidt [Sun, 25 Oct 2009 09:30:17 +0000 (09:30 +0000)]
gigaset: checkpatch cleanup

Dum sanctis checkpatch.pl'ae legibus obsequimur.

Impact: cosmetic
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agousb_gigaset: code cleanup
Tilman Schmidt [Sun, 25 Oct 2009 09:30:07 +0000 (09:30 +0000)]
usb_gigaset: code cleanup

Reorganize the code of the Gigaset M10x driver to make it more
readable, less redundant, better aligned to the style of other
parts of the driver, and cause fewer checkpatch.pl complaints.

Impact: code reorganization, no functional change
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: fix bad assumptions about CAPI skbuffs
Tilman Schmidt [Sun, 25 Oct 2009 09:29:57 +0000 (09:29 +0000)]
gigaset: fix bad assumptions about CAPI skbuffs

The CAPI interface incorrectly assumed that CAPI messages would always
start at the beginning of the data buffer: fix by treating DATA_B3
messages as the link layer header to their payload data. This fix
changes the way acknowledgement information is propagated through the
hardware specific modules and thereby impacts the ISDN4Linux variant
of the driver, too.

Also some assumptions about methods not being called from interrupt
context turned out to be unwarranted; fix by using dev_kfree_skb_any()
wherever non-interrupt context isn't guaranteed.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: fix format string typo in CAPI dial command
Tilman Schmidt [Sun, 25 Oct 2009 09:29:47 +0000 (09:29 +0000)]
gigaset: fix format string typo in CAPI dial command

A missing dot lead to garbage characters being included in the
dial command generated from a CAPI CONNECT_REQ message, which
interestingly enough worked anyway, illustrating the resilience
of the device.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: CAPI module readability improvements
Tilman Schmidt [Sun, 25 Oct 2009 09:29:37 +0000 (09:29 +0000)]
gigaset: CAPI module readability improvements

Replace the "ignoring Additional Info" warning message by better
readable ones citing the specific subparameters being ignored.
Make parts of the code more readable by using a local cmsg
pointer variable.

Impact: readability improvement
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoAllow disabling of DSACK TCP option per route
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:27 +0000 (04:15 +0000)]
Allow disabling of DSACK TCP option per route

Add and use no DSCAK bit in the features field.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoAllow to turn off TCP window scale opt per route
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:26 +0000 (04:15 +0000)]
Allow to turn off TCP window scale opt per route

Add and use no window scale bit in the features field.

Note that this is not the same as setting a window scale of 0
as would happen with window limit on route.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoAllow disabling TCP timestamp options per route
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:25 +0000 (04:15 +0000)]
Allow disabling TCP timestamp options per route

Implement querying and acting upon the no timestamp bit in the feature
field.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoAdd the no SACK route option feature
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:24 +0000 (04:15 +0000)]
Add the no SACK route option feature

Implement querying and acting upon the no sack bit in the features
field.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoAdd dst_feature to query route entry features
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:23 +0000 (04:15 +0000)]
Add dst_feature to query route entry features

Adding an accessor to existing  dst_entry feautres field and
refactor the only supported feature (allfrag) to use it.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoAllow tcp_parse_options to consult dst entry
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:22 +0000 (04:15 +0000)]
Allow tcp_parse_options to consult dst entry

We need tcp_parse_options to be aware of dst_entry to
take into account per dst_entry TCP options settings

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoOnly parse time stamp TCP option in time wait sock
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:21 +0000 (04:15 +0000)]
Only parse time stamp TCP option in time wait sock

Since we only use tcp_parse_options here to check for the exietence
of TCP timestamp option in the header, it is better to call with
the "established" flag on.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Signed-off-by: Ori Finkelman <ori@comsleep.com>
Signed-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetdev: usb: dm9601.c can drive a device not supported yet, add support for it
Janusz Krzysztofik [Wed, 28 Oct 2009 05:34:21 +0000 (05:34 +0000)]
netdev: usb: dm9601.c can drive a device not supported yet, add support for it

I found that the current version of drivers/net/usb/dm9601.c can be used to
successfully drive a low-power, low-cost network adapter with USB ID
0a46:9000, based on a DM9000E chipset. As no device with this ID is yet
present in the kernel, I have created a patch that adds support for the device
to the dm9601 driver.

Created and tested against linux-2.6.32-rc5.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix firmware mailbox command timeout.
Ron Mercer [Wed, 28 Oct 2009 08:39:21 +0000 (08:39 +0000)]
qlge: Fix firmware mailbox command timeout.

The mailbox command process would only process a maximum of 5 unrelated
firmware events while waiting for it's command completion status.
It should process an unlimited number of events while waiting for a maximum of 5 seconds.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix EEH handling.
Ron Mercer [Wed, 28 Oct 2009 08:39:20 +0000 (08:39 +0000)]
qlge: Fix EEH handling.

Clean up driver resources without touch the hardware. Add pci
save/restore state.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoip6mr: Optimize multiple unregistration
Eric Dumazet [Wed, 28 Oct 2009 04:48:11 +0000 (04:48 +0000)]
ip6mr: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6 sit: Optimize multiple unregistration
Eric Dumazet [Wed, 28 Oct 2009 04:37:43 +0000 (04:37 +0000)]
ipv6 sit: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipmr: Optimize multiple unregistration
Eric Dumazet [Wed, 28 Oct 2009 05:21:38 +0000 (05:21 +0000)]
ipmr: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoip6tnl: Optimize multiple unregistration
Eric Dumazet [Wed, 28 Oct 2009 05:16:51 +0000 (05:16 +0000)]
ip6tnl: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge: Optimize multiple unregistration
Eric Dumazet [Wed, 28 Oct 2009 05:35:35 +0000 (05:35 +0000)]
bridge: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Add the new PCI IDs to PCI_DEVICE_TABLE.
Ajit Khaparde [Thu, 29 Oct 2009 08:11:06 +0000 (01:11 -0700)]
be2net: Add the new PCI IDs to PCI_DEVICE_TABLE.

This patch adds the PCI IDs for the next generation chip to the
PCI_DEVICE_ID table.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoAF_RAW: Augment raw_send_hdrinc to expand skb to fit iphdr->ihl (v2)
Neil Horman [Wed, 28 Oct 2009 08:59:47 +0000 (08:59 +0000)]
AF_RAW: Augment raw_send_hdrinc to expand skb to fit iphdr->ihl (v2)

Augment raw_send_hdrinc to correct for incorrect ip header length values

A series of oopses was reported to me recently.  Apparently when using AF_RAW
sockets to send data to peers that were reachable via ipsec encapsulation,
people could panic or BUG halt their systems.

I've tracked the problem down to user space sending an invalid ip header over an
AF_RAW socket with IP_HDRINCL set to 1.

Basically what happens is that userspace sends down an ip frame that includes
only the header (no data), but sets the ip header ihl value to a large number,
one that is larger than the total amount of data passed to the sendmsg call.  In
raw_send_hdrincl, we allocate an skb based on the size of the data in the msghdr
that was passed in, but assume the data is all valid.  Later during ipsec
encapsulation, xfrm4_tranport_output moves the entire frame back in the skbuff
to provide headroom for the ipsec headers.  During this operation, the
skb->transport_header is repointed to a spot computed by
skb->network_header + the ip header length (ihl).  Since so little data was
passed in relative to the value of ihl provided by the raw socket, we point
transport header to an unknown location, resulting in various crashes.

This fix for this is pretty straightforward, simply validate the value of of
iph->ihl when sending over a raw socket.  If (iph->ihl*4U) > user data buffer
size, drop the frame and return -EINVAL.  I just confirmed this fixes the
reported crashes.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.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/linville/wirel...
David S. Miller [Thu, 29 Oct 2009 08:05:38 +0000 (01:05 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

14 years agoe1000e: flow control doesn't re-enable
Bruce Allan [Wed, 28 Oct 2009 18:28:30 +0000 (18:28 +0000)]
e1000e: flow control doesn't re-enable

When changing flow control (pause) parameters, the flow control thresholds
(i.e. when to send XON/XOFF frames) may not be setup correctly on parts
with copper media.  Call the existing e1000_set_fc_watermarks()
function to set these thresholds.

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 agovlan: Add support to netdev_ops.ndo_fcoe_get_wwn for VLAN device
Yi Zou [Wed, 28 Oct 2009 18:25:16 +0000 (18:25 +0000)]
vlan: Add support to netdev_ops.ndo_fcoe_get_wwn for VLAN device

Implements the netdev_ops.ndo_fcoe_get_wwn for VLAN device.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Add support for netdev_ops.ndo_fcoe_get_wwn to 82599
Yi Zou [Wed, 28 Oct 2009 18:24:56 +0000 (18:24 +0000)]
ixgbe: Add support for netdev_ops.ndo_fcoe_get_wwn to 82599

Implements the netdev_ops.ndo_fcoe_get_wwn in 82599 if it finds valid
prefix for the World Wide Node Name (WWNN) or World Wide Port Name (WWPN),
as well as valid SAN MAC address.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>