Ben Hutchings [Sun, 27 Apr 2008 11:55:59 +0000 (12:55 +0100)]
New driver "sfc" for Solarstorm SFC4000 controller.
The driver supports the 10Xpress PHY and XFP modules on our reference
designs SFE4001 and SFE4002 and the SMC models SMC10GPCIe-XFP and
SMC10GPCIe-10BT.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Since MAC80211_LEDS is selected by wireless drivers it must select its
own dependencies otherwise a build error may occur (kbuild will select
the symbol regardless of "depends" constraints).
Signed-off-By: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
tcp_v6_do_rcv()->tcp_rcv_established(), the latter goes to step5, where
eventually skb can be freed via tcp_data_queue() (drop: label), then if
check for tcp_defer_accept_check() returns true and thus
tcp_rcv_established() returns -1, which forces tcp_v6_do_rcv() to jump
to reset: label, which in turn will pass through discard: label and free
the same skb again.
Tested by Eric Sesterhenn.
Signed-off-by: David S. Miller <davem@davemloft.net> Acked-By: Patrick McManus <mcmanus@ducksong.com>
Herbert Xu [Sun, 27 Apr 2008 07:59:59 +0000 (00:59 -0700)]
[IPSEC]: Use digest_null directly for auth
Previously digest_null had no setkey function which meant that
we used hmac(digest_null) for IPsec since IPsec always calls
setkey. Now that digest_null has a setkey we no longer need to
do that.
In fact when only confidentiality is specified for ESP we already
use digest_null directly. However, when the null algorithm is
explicitly specified by the user we still opt for hmac(digest_null).
This patch removes this discrepancy. I have not added a new compat
name for it because by chance it wasn't actualy possible for the user
to specify the name hmac(digest_null) due to a key length check in
xfrm_user (which I found out when testing that compat name :)
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sun, 27 Apr 2008 05:57:25 +0000 (22:57 -0700)]
can: Fix copy_from_user() results interpretation
Both copy_to_ and _from_user return the number of bytes, that failed to
reach their destination, not the 0/-EXXX values.
Based on patch from Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
- remove the function pointer to help gcc optimizing the
inline pci_dma functions
- pci_dma_sync_single_for_cpu is not needed for a single
large packet
- convert rtl8169_try_rx_copy to bool
Pavel Emelyanov [Fri, 25 Apr 2008 08:49:48 +0000 (01:49 -0700)]
net: Fix wrong interpretation of some copy_to_user() results.
I found some places, that erroneously return the value obtained from
the copy_to_user() call: if some amount of bytes were not able to get
to the user (this is what this one returns) the proper behavior is to
return the -EFAULT error, not that number itself.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 25 Apr 2008 07:29:00 +0000 (00:29 -0700)]
xfrm: alg_key_len & alg_icv_len should be unsigned
In commit ba749ae98d5aa9d2ce9a7facde0deed454f92230 ([XFRM]: alg_key_len
should be unsigned to avoid integer divides
<http://git2.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=ba749ae98d5aa9d2ce9a7facde0deed454f92230>)
alg_key_len field of struct xfrm_algo was converted to unsigned int to
avoid integer divides.
Then Herbert in commit 1a6509d991225ad210de54c63314fd9542922095
([IPSEC]: Add support for combined mode algorithms) added a new
structure xfrm_algo_aead, that resurrected a signed int for alg_key_len
and re-introduce integer divides.
This patch avoids these divides and saves 64 bytes of text on i386.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
- vlans were using a single CAM register (see mac_set_vlan_cam)
- setting the address filtering registers for vlans is not
needed when there is no vlan
The non-tagged interface is filtered out as soon as a tagged
(!= 0) interface is created. Its traffic appears again when an
zero-tagged interface is created.
Tested on Via Epia SN (VT6130 chipset) with several vlans whose
tag was above or beyond 255.
Ayaz Abdulla [Wed, 23 Apr 2008 18:37:30 +0000 (14:37 -0400)]
forcedeth: realtek phy crossover detection
This patch fixes an issue seen with the realtek 8201 phy. This phy has a
problem with crossover detection and it needs to be disabled. The
problem only arises on certain switches. Therefore, a module parameter
has been added to allow enabling crossover detection if needed. The
default will be set to disabled.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Andy Fleming [Tue, 22 Apr 2008 22:18:29 +0000 (17:18 -0500)]
gianfar: Fix skb allocation strategy
gianfar was unable to handle failed skb allocation for rx buffers, so
we were spinning until it succeeded. Actually, it was worse--we were
spinning for a long time, and then silently failing. Instead, we take
Stephen Hemminger's suggestion to try the allocation earlier, and drop the
packet if it failed.
We also make a couple of tweaks to how buffer descriptors are set up.
Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Harvey Harrison [Tue, 22 Apr 2008 18:48:35 +0000 (11:48 -0700)]
netxen: reduce stack usage of netxen_nic_flash_print
Don't need to keep a struct netxen_new_user_info on the stack
when we only are interested in printing the serial_num. Change
to only reading the serial_num.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Kay Sievers [Fri, 18 Apr 2008 20:50:44 +0000 (13:50 -0700)]
net drivers: fix platform driver hotplug/coldplug
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable network
platform drivers, to re-enable auto loading.
NOTE: didn't change drivers/net/fs_enet/fs_enet-main.c "old binding" support.
That looks problematic in the first place (it even uses the ancient "struct
device_driver" binding scheme for platform_bus!) and I suspect it will vanish
soonish when arch/powerpc rules the world. Also, drivers/net/ne.c would have
needed more thought to sort out.
[akpm@linux-foundation.org: fix sgiseeq.c]
[dbrownell@users.sourceforge.net: more drivers, registration fixes] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Scott Wood <scottwood@freescale.com> Cc: Vitaly Bordug <vitb@kernel.crashing.org> Cc: Dale Farnsworth <dale@farnsworth.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Andrew Victor <andrew@sanpeople.com> Cc: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Ayaz Abdulla [Fri, 18 Apr 2008 20:50:43 +0000 (13:50 -0700)]
forcedeth: new backoff implementation
This patch adds support for a new backoff algorithm for half duplex supported
in newer hardware. The old method is will be designated as legacy mode.
Re-seeding random values for the backoff algorithms are performed when a
transmit has failed due to a maximum retry count (1 to 15, where max is
considered the wraparound case of 0).
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Andrew Morton [Fri, 18 Apr 2008 20:50:39 +0000 (13:50 -0700)]
ehea: make things static
ehea_flush_sq() and ehea_purge_sq() should be static.
Cc: Jeff Garzik <jeff@garzik.org> Cc: Thomas Klein <osstklei@de.ibm.com> Cc: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Andy Fleming [Fri, 18 Apr 2008 22:29:54 +0000 (17:29 -0500)]
phylib: Add support for board-level PHY fixups
Sometimes the specific interaction between the platform and the PHY
requires special handling. For instance, to change where the PHY's
clock input is, or to add a delay to account for latency issues in the
data path. We add a mechanism for registering a callback with the PHY
Lib to be called on matching PHYs when they are brought up, or reset.
Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Chris Snook [Sat, 19 Apr 2008 01:47:41 +0000 (21:47 -0400)]
atlx: remove flash vendor parameter
There's no good reason to manually set the flash vendor in a module
parameter, outside of an Atheros hardware lab. Remove it, so nobody
accidentally bricks their board using it incorrectly.
Signed-off-by: Chris Snook <csnook@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
- useless initialization (korina_ope / korina_restart)
- use a single variable for the status code in korina_probe
and propagate the error status code from below
- useless checks in korina_remove : the variables are
necessarily set when korina_probe succeeds
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
The local variable "prefix" is never used anymore, and the content of
this string appears a bit later, directly in a call to "alloc_netdev"
after doing exactly the same if/else test. So there seems to be no
point keeping those 4 lines anymore.
Signed-off-by: Cédric Augonnet <cedric.augonnet@ens-lyon.org> Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Grant Grundler [Mon, 21 Apr 2008 04:44:15 +0000 (22:44 -0600)]
[netdrvr] typhoon: typhoon_resume - remove call to start_queue
While trying to fix http://bugzilla.kernel.org/show_bug.cgi?id=8952
I looked at a few other drivers to figure out what drivers _should_
be doing for suspend/resume. I noticed typhoon driver is likely doing
more than it needs to. Patch below is untested since I don't have the HW.
Suspend/resume code across NIC drivers is fairly inconsistent.
And I couldn't find any documentation on what the canonical sequence
NICs need to do for suspend or resume. Is there any?
Barring contrary advice, I'm going model the tulip suspend/resume
fixes after tg3.c since a number of "modern" (< 5 years old) laptops
have that and I'm silly enough to assume it works.
This patch adds ibm_newemac PHY clock workaround for 440EP/440GR EMAC
attached to a PHY which doesn't generate RX clock if there is no link.
The code is based on the previous ibm_emac driver stuff. The 440EP/440GR
allows controlling each EMAC clock separately as opposed to global clock
selection for 440GX.
BenH: Made that #ifdef CONFIG_PPC_DCR_NATIVE for now as dcri_* stuff doesn't
exist for MMIO type DCRs like Cell. Some future rework & improvements of the
DCR infrastructure will make that cleaner but for now, this makes it work.
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout
error) if there's no link. Because of that it fails to find PHY
chip. The older ibm_emac driver had a workaround for that: the
EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros, which toggle the Ethernet
Clock Select bit in the SDR0_MFR register. This patch does the same for
"ibm,emac-440gx" compatible chips. The workaround forces clock on -all-
EMACs, so we select clock under global emac_phy_map_lock.
BenH: Made that #ifdef CONFIG_PPC_DCR_NATIVE for now as dcri_* stuff
doesn't exist for MMIO type DCRs like Cell. Some future rework &
improvements of the DCR infrastructure will make that cleaner but
for now, this makes it work.
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
ibm_newemac Use status property for unused/unwired EMACs
Convert ibm_newemac to use the of_device_is_available function when checking
for unused/unwired EMACs. We leave the current check for an "unused" property
to maintain backwards compatibility for older device trees. Newer device
trees should simply use the standard "status" property in the EMAC node.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This patch fixes several section mismatch warnings in the
ibm_newemac driver similar to:
WARNING: vmlinux.o(.devinit.text+0x3a04): Section mismatch in reference from the function emac_probe() to the function .devexit.text:tah_detach()
The function __devinit emac_probe() references
a function __devexit tah_detach().
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Stefan Roese [Tue, 22 Apr 2008 00:46:42 +0000 (10:46 +1000)]
ibm_newemac: Add support for 460EX/GT-type MAL rx-channel handling
On some 4xx PPC's (e.g. 460EX/GT), the rx channel number is a multiple
of 8 (e.g. 8 for EMAC1, 16 for EMAC2), but enabling in MAL_RXCASR needs
the divided by 8 value for the bitmask.
Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Stefan Roese [Tue, 22 Apr 2008 00:46:42 +0000 (10:46 +1000)]
ibm_newemac: Fix problem with jumbo frame support and EMAC V4.patch
This fixes the jumbo frame support on EMAC V4 systems. Now the correct
bit is set depending on the EMAC version configured.
Tested on Kilauea (405EX) and Canyonlands (460EX).
Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
David Graham [Wed, 23 Apr 2008 18:09:14 +0000 (11:09 -0700)]
e1000e: Fix HW Error on es2lan, ARP capture issue by BMC
Several components to this complex fix. The es2lan cards occasionally
gave a "HW Error" especially when forcing speed. Some users also
reported that the BMC stole ARP packets.
The fixes include setting the proper SW_FW bits to tell the BMC
that we're active and not do any un-initialization at all, so the
setup routine is largely changed.
Signed-off-by: David Graham <david.graham@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
The ethtool -c / -C interface can now be used to modify the
irq moderation algorithm. This change does not require an
adapter reset and can thus be used at all times. The adapter
only supports changing/reading rx-usecs which has special
values for 0, 1 and 3:
0 - no irq moderation whatsoever
1 - normal moderation favoring regular mixed traffic (default)
3 - best attempt at low latency possible at cost of CPU
For values between 10 and 10000 the rx-usecs defines "the minimum
time between successive irqs" in usec, unlike the module parameter.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Bruce Allan [Wed, 23 Apr 2008 18:09:00 +0000 (11:09 -0700)]
e1000e: cleanup several stats issues
Several stats registers are completely unused and we just waste pci
bus time reading them. We also omit using the high 32 bits of the GORC/
GOTC counters. We can just read clear them and only read the low registers.
Mii-tool can also break es2lan if it executes a MII PHY register
ioctl while the device is in autonegotiation. Unfortunately it seems
that several applications and installations still perform this ioctl
call periodically and especially in this crucial startup time. We
can fool the ioctl by providing fail safe information that mimics
the "down" link state and only perform the dangerous PHY reads once
after link comes up to fill in the real values. As long as link
stays up the information will not change.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
- Removed receive buffer replenishment tasklet s2io_tasklet and instead
allocating the receive buffers in either the interrupt handler (no napi)
or the napi handler (napi enabled).
The patch that changed mdio_bus to a string didn't conflict strongly enough
with the patch that added fixed PHY support to UCC. Gather it back into
the fold.
Fixes this error:
...
CC drivers/net/ucc_geth.o
'ucc_geth_probe':
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ucc_geth.c:3935: error:
incompatible types in assignment
make[3]: *** [drivers/net/ucc_geth.o] Error 1
Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
ipv6 RAW: Disallow IPPROTO_IPV6-level IPV6_CHECKSUM socket option on ICMPv6 sockets.
RFC3542 tells that IPV6_CHECKSUM socket option in the IPPROTO_IPV6
level is not allowed on ICMPv6 sockets. IPPROTO_RAW level
IPV6_CHECKSUM socket option (a Linux extension) is still allowed.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Quetchenbach [Fri, 25 Apr 2008 04:11:58 +0000 (21:11 -0700)]
tcp: tcp_probe buffer overflow and incorrect return value
tcp_probe has a bounds-checking bug that causes many programs (less,
python) to crash reading /proc/net/tcp_probe. When it outputs a log
line to the reader, it only checks if that line alone will fit in the
reader's buffer, rather than that line and all the previous lines it
has already written.
tcpprobe_read also returns the wrong value if copy_to_user fails--it
just passes on the return value of copy_to_user (number of bytes not
copied), which makes a failure look like a success.
This patch fixes the buffer overflow and sets the return value to
-EFAULT if copy_to_user fails.
Patch is against latest net-2.6; tested briefly and seems to fix the
crashes in less and python.
Signed-off-by: Tom Quetchenbach <virtualphtn@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
ethtool: EEPROM dump no longer works for tg3 and natsemi
In the ethtool user-space application, tg3 and natsemi over-ride the
default implementation of dump_eeprom(). In both tg3_dump_eeprom() and
natsemi_dump_eeprom(), there is a magic number check which is not
present in the default implementation.
Commit b131dd5d ("[ETHTOOL]: Add support for large eeproms") snipped
the code which copied the ethtool_eeprom structure back to
user-space. tg3 and natsemi are over-writing the magic number field
and then checking it in user-space. With the ethtool_eeprom copy
removed, the check is failing.
The fix is simple. Add the ethtool_eeprom copy back.
Signed-off-by: Mandeep Singh Baines <msb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Brian Haley [Fri, 25 Apr 2008 03:38:31 +0000 (20:38 -0700)]
af_key: Fix af_key.c compiler warning
net/key/af_key.c: In function ‘pfkey_spddelete’:
net/key/af_key.c:2359: warning: ‘pol_ctx’ may be used uninitialized in
this function
When CONFIG_SECURITY_NETWORK_XFRM isn't set,
security_xfrm_policy_alloc() is an inline that doesn't set pol_ctx, so
this seemed like the easiest fix short of using *uninitialized_var(pol_ctx).
Signed-off-by: Brian Haley <brian.haley@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Thu, 24 Apr 2008 08:02:16 +0000 (01:02 -0700)]
[NET]: Fix heavy stack usage in seq_file output routines.
Plan C: we can follow the Al Viro's proposal about %n like in this patch.
The same applies to udp, fib (the /proc/net/route file), rt_cache and
sctp debug. This is minus ~150-200 bytes for each.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
David Woodhouse [Thu, 24 Apr 2008 07:59:25 +0000 (00:59 -0700)]
[AF_UNIX] Initialise UNIX sockets before general device initcalls
When drivers call request_module(), it tries to do something with UNIX
sockets and triggers a 'runaway loop modprobe net-pf-1' warning. Avoid
this by initialising AF_UNIX support earlier.
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Thu, 24 Apr 2008 05:10:48 +0000 (22:10 -0700)]
[RTNETLINK]: Fix bogus ASSERT_RTNL warning
ASSERT_RTNL uses mutex_trylock to test whether the rtnl_mutex is
held. This bogus warnings when running in atomic context, which
f.e. happens when adding secondary unicast addresses through
macvlan or vlan or when synchronizing multicast addresses from
wireless devices.
Mid-term we might want to consider moving all address updates
to process context since the locking seems overly complicated,
for now just fix the bogus warning by changing ASSERT_RTNL to
use mutex_is_locked().
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 24 Apr 2008 02:37:58 +0000 (19:37 -0700)]
tun: Fix minor race in TUNSETLINK ioctl handling.
Noticed by Alan Cox.
The IFF_UP test is a bit racey, because other entities
outside of this driver's ioctl handler can modify that
state, even though this ioctl handler runs under
lock_kernel().
Signed-off-by: David S. Miller <davem@davemloft.net>
Paulius Zaleckas [Thu, 24 Apr 2008 01:54:01 +0000 (18:54 -0700)]
ppp_generic: use stats from net_device structure
Use stats which now is in the net_device instead of one declared in
ppp structure.
Kill ppp_net_stats function, because by default it is used identical
internal_stats function from net/core/dev.c
Signed-of-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Signed-off-by: David S. Miller <davem@davemloft.net>
Roland Dreier [Wed, 23 Apr 2008 23:22:13 +0000 (16:22 -0700)]
iwlwifi: Don't unlock priv->mutex if it isn't locked
Commit b716bb91 ("iwlwifi: Cancel scanning upon association") moved the
test of priv->vif in iwl{3945,4964}_mac_config_interface() outside of
where priv->mutex is held, but still tries to do mutex_unlock() on
return. This is clearly wrong and triggers a nasty lockdep warning when
this codepath is triggered. Fix this by removing the mutex_unlock().
Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis Carlos Cobo [Wed, 23 Apr 2008 19:34:59 +0000 (12:34 -0700)]
mac80211: update mesh EID values
This patch updates mesh EID values, some of which where conflicting with
already-approved 11h EIDs (pointed out by Tomas Winkler). I wanted to use the
values suggested in the last available 802.11 draft (2.0) but it assigns 50 to
MESH_CONFIG, the same value than EXT_SUPP_RATES. Using the values proposed in
the draft incremented by one.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Michael Buesch [Wed, 23 Apr 2008 17:13:01 +0000 (19:13 +0200)]
b43: Workaround DMA quirks
Some mainboards/CPUs don't allow DMA masks bigger than a certain limit.
Some VIA crap^h^h^h^hdevices have an upper limit of 0xFFFFFFFF. So in this
case a 64-bit b43 device would always fail to acquire the mask.
Implement a workaround to fallback to lower DMA mask, as we can always
also support a lower mask.
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ron Rindjunsky [Wed, 23 Apr 2008 10:45:12 +0000 (13:45 +0300)]
mac80211: fix use before check of Qdisc length
This patch fixes use of Qdisc length in requeue function, before we checked
the reference is valid. (Adrian Bunk's catch)
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Adrian Bunk [Wed, 23 Apr 2008 09:51:28 +0000 (12:51 +0300)]
net/mac80211/rx.c: fix off-by-one
This patch fixes an off-by-one in net/mac80211/rx.c introduced by
commit 8318d78a44d49ac1edf2bdec7299de3617c4232e
(cfg80211 API for channels/bitrates, mac80211 and driver conversion)
and spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Emelyanov [Wed, 23 Apr 2008 07:47:15 +0000 (11:47 +0400)]
mac80211: Fix race between ieee80211_rx_bss_put and lookup routines.
The put routine first decrements the users counter and then
(if it is zero) locks the sta_bss_lock and removes one from
the list and the hash.
Thus, any of ieee80211_sta_config_auth, ieee80211_rx_bss_get
or ieee80211_rx_mesh_bss_get can race with it by finding a
bss that is about to get kfree-ed.
Using atomic_dec_and_lock in ieee80211_rx_bss_put takes care
of this race.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Sat, 19 Apr 2008 15:52:12 +0000 (17:52 +0200)]
ssb: Fix all-ones boardflags
In the SSB SPROM a field set to all ones means the value
is not defined in the SPROM.
In case of the boardflags, we need to set them to zero
to avoid confusing drivers. Drivers will only check the
flags by ANDing.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Gabor Stefanik <netrolller.3d@gmail.com> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Michael Buesch [Fri, 18 Apr 2008 18:51:41 +0000 (20:51 +0200)]
b43: Workaround invalid bluetooth settings
This adds a workaround for invalid bluetooth SPROM settings
on ASUS PCI cards.
This will stop the microcode from poking with the BT GPIO line.
This fixes data transmission on this device, as the BT GPIO line
is used for something TX related on this device
(probably the power amplifier or the radio).
This also adds a modparam knob to help debugging this in the future,
as more devices with this bug may show up.
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 17 Apr 2008 17:36:28 +0000 (19:36 +0200)]
mac80211: MAINTAINERS update
This updates the mac80211 maintainers entry to
1) remove Jiri
2) put me first
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Michael Wu <flamingice@sourmilk.net> Cc: Jiri Benc <jbenc@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
There are two structures named wmm_info and wmm_param, they are used while
parsing the beacon frame. (Check the function ieee802_11_parse_elems).
Certain APs like D-link does not set the fifth bit in WMM IE.
While sending the association request to n-only ap it checks for wmm_ie.
If it is set then only ieee80211_ht_cap is sent during association request.
So n-only association fails.
And this patch fixes this problem by copying the wmm_info to wmm_ie,
which enables the "wmm" flag in iee80211_send_assoc.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Acked-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Herbert Xu [Tue, 22 Apr 2008 07:46:42 +0000 (00:46 -0700)]
[IPSEC]: Fix catch-22 with algorithm IDs above 31
As it stands it's impossible to use any authentication algorithms
with an ID above 31 portably. It just happens to work on x86 but
fails miserably on ppc64.
The reason is that we're using a bit mask to check the algorithm
ID but the mask is only 32 bits wide.
After looking at how this is used in the field, I have concluded
that in the long term we should phase out state matching by IDs
because this is made superfluous by the reqid feature. For current
applications, the best solution IMHO is to allow all algorithms when
the bit masks are all ~0.
The following patch does exactly that.
This bug was identified by IBM when testing on the ppc64 platform
using the NULL authentication algorithm which has an ID of 251.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>