Commit Graph

88057 Commits

Author SHA1 Message Date
Andy Fleming 99da5003a5 gianfar: Only process completed frames
If the LAST bit is not set in the RxBD, it's possible we're processing
an incomplete frame, which is bad.  While we're at it, add a constant
for the error bitmask, so the whole if-clause fits on one line,
and is more legible.

Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:44:39 -04:00
Dai Haruki faa8957762 gianfar: Fix frame size calculation when hardware VLAN acceleration is on
In gfar_change_mtu(), the frame size needs to be increased to account
for the extra 4 bytes VLAN adds to the ethernet header.  However,
it was being increased by the length of the whole header (18 bytes),
which is wrong.

Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:44:33 -04:00
Dai Haruki a3cb96a13c gianfar: Fix the data buffer stashing amount
- Buffer stashing parameter change to 96 from 64 in order to cover
the Layer 4 header.

Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:44:25 -04:00
Pavel Emelyanov 1119d577cc Use single_open instead of manual manipulations.
The code opening proc entry for each device makes the
same thing, as the single_open does, so remove the
unneeded code.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:19:58 -04:00
Anton Vorontsov 57bb7e2228 phy/broadcom: add support for BCM5481 PHY
This patch adds support for BCM5481 PHY. Unfortunately it's hard to
get specifications for this PHY, so its special register 0x18 isn't
annotated properly (but we know it's used to set up the delays).

I've kept the magic numbers, so we'll not forget to fix it at the
first opportunity, and will name that register and its bits correctly.

p.s. also fixed the line with broken indention, introduced by
commit 03157ac31e
    PHYLIB: Add BCM5482 PHY support

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:19:56 -04:00
Marcin Slusarz b39b5a2bc3 qla3xxx: convert byte order of constant instead of variable
Convert byte order of constant instead of variable which can be done at
compile time (vs run time)

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:19:43 -04:00
Julia Lawall 7a6d84c1b2 drivers/net/mv643xx_eth.c: Use FIELD_SIZEOF
Robert P.J. Day proposed to use the macro FIELD_SIZEOF in replace of code
that matches its definition.

The modification was made using the following semantic patch
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
type t;
identifier f;
@@

- (sizeof(((t*)0)->f))
+ FIELD_SIZEOF(t, f)

@depends on haskernel@
type t;
identifier f;
@@

- sizeof(((t*)0)->f)
+ FIELD_SIZEOF(t, f)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:19:41 -04:00
Florian Fainelli ef11291bcd Add support the Korina (IDT RC32434) Ethernet MAC
This patch adds support for the IDT rc32434 Ethernet MAC
we can find in the IDT boards and the Mikrotik RB500.
Driver references some code from the linux-mips RB500
support.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Philip Rischel <rischelp@idt.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:19:34 -04:00
Daniel Drake bfebbb88ec forcedeth: Use round_jiffies for stats timer
This timer doesn't need to run at precise times, so round it to a whole
second to decrease wakeups.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:51 -04:00
Al Viro 3459feb8fc s2io annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:48 -04:00
Al Viro 3b86301f12 endianness annotations: rndis
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:47 -04:00
Al Viro fa3a6cb4a6 annotate cxgb3 (ab)uses of skb->priority/skb->csum
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:46 -04:00
Al Viro 2f220e305b skfp annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:44 -04:00
Al Viro eca1ad82bd misc drivers/net annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:43 -04:00
Al Viro 05bd831fcd ni52: more unbreaking
missed read*/write* plus a bunch of wrong-sized ones...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:04 -04:00
Al Viro 176f65f3ef ni52: switch to ioremap()
isa_bus_to_virt() is the wrong thing to do here; it happens
to work on i386, but only by accident.  What we want is
normal ioremap/readb/etc. set - it's all in iomem.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:03 -04:00
Al Viro 76af5699a3 ni52: clean up check586()
take iscp-based testing into helper, kill the loop, stop
wanking with reassignments of priv->iscp

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:02 -04:00
Al Viro 7f8cfd5608 ni52: clean up initialization of priv
* initialize spinlock once
* check586() used to be done before we'd allocated ->priv; these days
  it's there from the very beginning, so we don't have to play with
  private copy.  Consequently, we don't need to mess with reinitializing
  ->base, etc. afterwards.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:02 -04:00
Al Viro e06ee2bb03 ni52: make ->base char __iomem *
... and store the virt address where we map the ->mem_addr, while we
are at it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:01 -04:00
Al Viro de5971462f ni52: kill the second argument of check586(), get rid of bogus pointer
Passing ISA bus address explicitly cast to char * only to cast it back to
unsigned long is dumb; so's passing it at all when it's always dev->mem_start...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:00 -04:00
Al Viro 725aa4a9ab ni52: unbreak scp_struct
unsigned short != u8, it's u16...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:18:00 -04:00
Al Viro 2d76c267e9 ni52 trivial iomem annotations
Driver is still broken, though; partially from Alan's checkpatch-induced
fun, partially from layers of ancient mess ;-)

By the end of the series... hell, might be even worth trying to stick
such card into old alpha or ppc with an ISA slot and see if it work -
would be for the first time ever in case of alpha and for the first
time since at least 2.5.3 in case of ppc...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:17:59 -04:00
Jesse Brandeburg 9c61a9dcb2 ixgb: remove irq_sem
ixgb can remove irq_sem by auditing all the call sites to make sure
that each of them makes sure the adapter is in the correct state
before re-enabling interrupts.  after doing this to all of our other
drivers it is becoming easier.

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 <jeff@garzik.org>
2008-03-26 00:17:53 -04:00
Jesse Brandeburg 9150b76a64 e1000: remove irq_sem
irq_sem was just a hack to prevent interrupts from being enabled
unexpectedly in deep call paths.  Simply finding those call paths and
fixing them by hand results in a driver that behaves as we expect and
doesn't need the atomic at all.

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 <jeff@garzik.org>
2008-03-26 00:17:52 -04:00
Jesse Brandeburg 74ef9c39db e1000e: remove irq_sem
irq_sem can safely be removed by auditing all irq.*able sites to
make sure that interrupts don't get enabled unexpectedly when the
interface is down.

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 <jeff@garzik.org>
2008-03-26 00:17:51 -04:00
Auke Kok 67d204a532 e1000e: remove no longer used e1000e_read_nvm_spi
This function is no longer used now that 82573 uses the eerd
read method as well. Thanks to Adrian Bunk for pointing this out.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:17:49 -04:00
Auke Kok a9340b86f0 ixgb: move externs out of .c files
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:17:48 -04:00
Joe Perches 446490ca44 ixgb: convert boolean_t to bool
> send me a patch for e1000 and for ixgb and I'll happily apply those :)

boolean_t to bool
TRUE to true
FALSE to false

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:17:45 -04:00
Jesse Brandeburg bab2bce7dc ixgb: add explicit state checking
In order to remove the irq_sem code we need to implement strict
adapter state checking to prevent accidental double up or downs
or resets. This code is largely copied from e1000/e1000e.

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 <jeff@garzik.org>
2008-03-26 00:17:43 -04:00
Joe Perches c3033b01d7 e1000: Convert boolean_t to bool
On Thu, 2008-03-06 at 10:07 -0800, Kok, Auke wrote:
> send me a patch for e1000 and for ixgb and I'll happily apply those :)

boolean_t to bool
TRUE to true
FALSE to false
comment typo ahread to ahead

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26 00:17:42 -04:00
David S. Miller f89e6e3834 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.26 2008-03-25 17:20:03 -07:00
Ivo van Doorn 3a643d244f rt2x00: Fix in_atomic() usage
rt73usb and rt2500usb used in_atomic to determine
if a configuration step should be rescheduled or not.
Since in_atomic() is not a valid method to determine
if sleeping is allowed we should fix the way this is handled
by adding a new flag to rt2x00.

In addition mark LED class support for the drivers broken
since that also uses the broken in_atomic() method but
so far no solution exists to have LED triggers work only
in scheduled context.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:42:00 -04:00
Ivo van Doorn 866a050384 rt2x00: Fix rate detection for invalid signals
It has been observed on rt2500pci hardware that some
frames received with signal 0x0C do not have the OFDM
flag set.

Signals can have 2 meanings:
 1) The PLCP value
 2) The bitrate * 10

For rt2500pci (1) is for frames received with a OFDM rate,
and (2) is for frames received with a CCK rate.
But 0x0C is a invalid bitrate value but is a valid PLCP
value for 54Mbs (obvious OFDM rate).
This means that it is possible that the hardware does not
set the OFDM bit correctly under all circumstances.
This results in rt2x00 failing to detect the rate and
mac80211 triggering a WARN_ON() and dropping the frame.

To bypass this, print a warning when such a frame is received,
and reset the rate to the lowest supported rate for the current band.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:42:00 -04:00
Masakazu Mokuno 49d20fac21 PS3: gelic: Add support for separate cipher selection
From version 2.20 of the PS3 system software, the hypervisor allows
the guest OSes to specify separate cipher for group and pairwise.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:59 -04:00
Michael Buesch c01f9c6f1d b43: Don't compile N-PHY code when N-PHY is disabled
There's no need to compile the N-PHY support code, when the
N-PHY support is disabled in Kconfig.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:59 -04:00
Assaf Krauss 1ea8739648 iwlwifi: Completing the parameter packaging
This patch completes the changes regarding the packaging of user
parameters.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:58 -04:00
Al Viro 83f7d57c37 ipw2200 annotations and fixes
a) a bunch of printks in error-handling assums that ->status is
big-endian.
b) bitfields trouble
c) missing annotations

NB: a bunch of structs is declared packed for no good reason, AFAICS.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:58 -04:00
Ivo van Doorn 19d30e0299 rt2x00: Add dev_flags to rx descriptor
The rxdone_entry_desc structure contains 3 fields
which are always 1 or 0. We can safe 8 bytes by
replacing them with a single dev_flags fields which
contain the flags for those settings.

Additionally we can remove the OFDM flag since it
is no longer used since the introduction of the
SIGNAL_PLCP flag.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:58 -04:00
Vladimir Koutny e2839d8f50 mac80211: configure default wmm params correctly
Default WMM params have to be set according to beacon/probe response
information prior to authentication (or IBSS start/join); beacon queue
is configured only in IBSS. This does not affect the use of 'real' WMM
params as reported by AP.

Signed-off-by: Vladimir Koutny <vlado@ksp.sk>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:57 -04:00
Mohamed Abbas 675ef586f0 mac80211: prevent tuning during scanning
Postpone calling ieee80211_hw_config if hardware scanning is active.
This is similar to solution for software scanning where channel setting
is delayed until scan complete.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:57 -04:00
Ron Rindjunsky 85249e5fab mac80211: tear down of block ack sessions
This patch adds a clean tear down for all block ack sessions if interface
goes down or if a deauthentication is done.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:57 -04:00
Ron Rindjunsky 7b9d44cd6b mac80211: fixing debug prints for AddBA request
This patch also fixes the Rx timer's comments

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:56 -04:00
Ron Rindjunsky 2e354ed7be mac80211: fixing delba debug print
This patch fixes a wrong debug print when receiving delba

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:56 -04:00
Johannes Berg fab7d4a2b1 mac80211: filter scan results on unusable channels
When you have an AP on channel 13, it will currently often enough
be listed in scan results even when the regulatory domain restricts
to channels 1-11. This is due to channel overlap. To avoid getting
very strange failures, don't show such APs in the scan results. The
failure mode will now go from "I can see the AP but not associate"
to "I can't see the AP although I know it's there" which is easier
to debug.

This problem was first really noticed by Jes Sorensen.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Jes Sorensen <jes@trained-monkey.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:56 -04:00
Johannes Berg e048c6e4fd mac80211: use ieee80211_get_channel
Use the new ieee80211_get_channel() function instead of open-coding it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:55 -04:00
Johannes Berg 906c730a2d wireless: add wiphy channel freq to channel struct lookup helper
Add ieee80211_get_channel() which gets you a channel struct for a
specific wiphy if that channel is present in that wiphy.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:55 -04:00
Tomas Winkler 857485c0c4 iwlwifi: move host command sending functions to core module
1. Host command sending functions moved from iwl4965-base.c to iwl-hcmd.c
in iwlcore module
2. enqueue_hcmd function currently stays in iwl4965-base.c. It is invoked
   through the new 'utils' field in priv's ops.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:55 -04:00
Assaf Krauss 8622e7058a iwlwifi: rename iwl4965_get_channel_info to iwl_get_channel_info
iwl4965_get_channel_info was moved to iwlcore module
4965 needs to be stripped off

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:54 -04:00
Tomas Winkler 410e088d53 iwlwifi: iwl3945 remove 4965 commands
This patch removes 4965 host commands from iwl-3945-commands.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:54 -04:00
Emmanuel Grumbach ab885f8c45 iwlwifi-2.6: enables RX TKIP decryption in HW
This patch enables RX TKIP decryption in HW.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:53 -04:00