Commit graph

5629 commits

Author SHA1 Message Date
Ivo van Doorn e9136550eb [PATCH] rt2x00: Increase rt2x00usb_vendor_request timeout.
By increasing the timeout for rt2x00usb_vendor_request,
we should limit the number of loops required to send
a signal to the device succefully.
500ms timeout is specified by the Ralink legacy drivers
for rt2500usb. For rt73usb 1000ms is specified, but that
includes the timeout for the firmware which is already
specified in a different define.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:53:02 -07:00
Ivo van Doorn 2484591049 [PATCH] rt2x00: Make *_beacon_update static
Make rt61pci_beacon_update and rt73usb_beacon_update static,
they are only used inside their own source file and then only
for setting it as callback funtion for mac80211.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:53:02 -07:00
Ivo van Doorn 725d99d466 [PATCH] rt2x00: Correct error in calculating rssi for link tuner
The call to rt2x00lib_precalculate_link_signal resets link.rx_success
which is needed when calculating the average rssi for the link
tuner. Change the call order so the link tuner runs first as it
doesn't need the result of the precalculate.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:53:01 -07:00
Johannes Berg ea49c359f3 [PATCH] mac80211: remove crypto algorithm typedef
The typedef is not required, we can just use "enum ieee80211_key_alg"
instead of "ieee80211_key_alg"

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:53:00 -07:00
Johannes Berg 4150c57212 [PATCH] mac80211: revamp interface and filter configuration
Drivers are currently supposed to keep track of monitor
interfaces if they allow so-called "hard" monitor, and
they are also supposed to keep track of multicast etc.

This patch changes that, replaces the set_multicast_list()
callback with a new configure_filter() callback that takes
filter flags (FIF_*) instead of interface flags (IFF_*).
For a driver, this means it should open the filter as much
as necessary to get all frames requested by the filter flags.
Accordingly, the filter flags are named "positively", e.g.
FIF_ALLMULTI.

Multicast filtering is a bit special in that drivers that
have no multicast address filters need to allow multicast
frames through when either the FIF_ALLMULTI flag is set or
when the mc_count value is positive.

At the same time, drivers are no longer notified about
monitor interfaces at all, this means they now need to
implement the start() and stop() callbacks and the new
change_filter_flags() callback. Also, the start()/stop()
ordering changed, start() is now called *before* any
add_interface() as it really should be, and stop() after
any remove_interface().

The patch also changes the behaviour of setting the bssid
to multicast for scanning when IEEE80211_HW_NO_PROBE_FILTERING
is set; the IEEE80211_HW_NO_PROBE_FILTERING flag is removed
and the filter flag FIF_BCN_PRBRESP_PROMISC introduced.
This is a lot more efficient for hardware like b43 that
supports it and other hardware can still set the BSSID
to all-ones.

Driver modifications by Johannes Berg (b43 & iwlwifi), Michael Wu
(rtl8187, adm8211, and p54), Larry Finger (b43legacy), and
Ivo van Doorn (rt2x00).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:52:57 -07:00
Denis V. Lunev 070ac3a265 [NET]: Proper comment for loopback initialization order.
Loopback device is special. It should be initialized at the very
beginning.  Initialization order has been changed by
Eric W. Biederman <ebiederm@xmission.com> and this change is non-obvious
and important enough to add proper comment.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:56 -07:00
Jonathan Bastien-Filiatrault 32db927686 [IRDA]: Document the fact that smsc-ircc2 will not use PNP by default
This avoids user confusion when they see that their device is not detected.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:55 -07:00
Satyam Sharma dcffde5345 [PASEMI_MAC]: remove unused function
drivers/net/pasemi_mac.c: At top level:
drivers/net/pasemi_mac.c:89: warning: 'read_iob_reg' defined but not used

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:54 -07:00
Satyam Sharma 7a876fae9d [SPIDERNET] spider_net_ethtool: Keep up with recent netdev stats changes
drivers/net/spider_net_ethtool.c: In function 'spider_net_get_ethtool_stats':
drivers/net/spider_net_ethtool.c:160: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:161: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:162: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:163: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:164: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:165: error: structure has no member named 'netdev_stats'
drivers/net/spider_net_ethtool.c:166: error: structure has no member named 'netdev_stats'
make[2]: *** [drivers/net/spider_net_ethtool.o] Error 1

Also do another ARRAY_SIZE() cleanup while at it.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:53 -07:00
Stephen Hemminger 3b04ddde02 [NET]: Move hardware header operations out of netdevice.
Since hardware header operations are part of the protocol class
not the device instance, make them into a separate object and
save memory.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:52 -07:00
Stephen Hemminger b95cce3576 [NET]: Wrap hard_header_parse
Wrap the hard_header_parse function to simplify next step of
header_ops conversion.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:51 -07:00
Stephen Hemminger 0c4e85813d [NET]: Wrap netdevice hardware header creation.
Add inline for common usage of hardware header creation, and
fix bug in IPV6 mcast where the assumption about negative return is
an errno. Negative return from hard_header means not enough space
was available,(ie -N bytes).

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:50 -07:00
David S. Miller 4c94f8c0c9 [NET]: Remove no longer relevant comment in loopback driver.
It talks about __get_cpu_var() which the driver no longer
does.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:49 -07:00
Eric W. Biederman 2774c7aba6 [NET]: Make the loopback device per network namespace.
This patch makes loopback_dev per network namespace.  Adding
code to create a different loopback device for each network
namespace and adding the code to free a loopback device
when a network namespace exits.

This patch modifies all users the loopback_dev so they
access it as init_net.loopback_dev, keeping all of the
code compiling and working.  A later pass will be needed to
update the users to use something other than the initial network
namespace.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:49 -07:00
Eric W. Biederman 5f6d88b914 [NET]: Dynamically allocate the per cpu counters for the loopback device.
This patch add support for dynamically allocating the statistics counters
for the loopback device and adds appropriate device methods for allocating
and freeing the loopback device.

This completes support for creating multiple instances of the loopback
device,  in preparation for creating per network namespace instances.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:47 -07:00
Vladimir Davydov ac630c2b19 [LIBERTAS]: fix oops on the blackfin architecture
Fixing memory alignment problems on the blackfin architecture (maybe on the
ARM also)

Signed-off-by: Vladimir Davydov <vladimir.davydov@promwad.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:28 -07:00
Vladimir Davydov f31ce76b78 [LIBERTAS]: fix oops on the blackfin architecture
Reserve two bytes to align pointer to the IP header.

Signed-off-by: Vladimir Davydov <vladimir.davydov@promwad.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:27 -07:00
Ryan Mallon 28de0b36be [LIBERTAS]: fix interrupts in CF driver
The following patch fixes the tx transmit timeout problem, which is
caused by the interrupts being incorrectly check and masked. The patch
moves the interrupt masking code so that interrupts are enabled only
when the driver is registered and only disabled when the driver is
unregistered.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:27 -07:00
Ryan Mallon 6f05cbe588 [LIBERTAS]: set dnld_sent correctly for CF parts
Corrects a minor bug with priv->dnld_sent being set incorrectly in
if_cs_host_to_card.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:26 -07:00
Larry Finger 1065de1562 [B43LEGACY]: Change the hardware radio enable logic and cleanup code
This change cleans up the radio-related messages in several ways.

(1) The state of the rfkill switch is assumed to be on, rather than
    tested. Now, any user without such a switch will not see any
    messages. For devices with such a switch, a message will be
    logged only if the initial state is off, or if the switch is toggled.
(2) The routine for testing the switch state is no longer inline.
(3) The LED handling routine is simplified.
(4) The "Radio turned off" message that has confused some users has been
    changed to "Radio initialized".

This patch is patterned after a similar change to b43 by Michael Buesch.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:25 -07:00
Larry Finger 42a9174f54 [B43LEGACY]: Support for turning the radio off from software.
This adds support for turning the radio off in software.
That's useful in environments, where you don't want the RF
to radiate any signals, but don't want to bring the interface down.

This patch is based on a similar patch of b43 by Michael Buesch.

Signed-off-by: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:25 -07:00
Michael Buesch fda9abcf1a [B43]: Support for turning the radio off from software.
This adds support for turning the radio off in software.
That's useful in environments, where you don't want the RF
to radiate any signals, but don't want to bring the interface down.

Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:24 -07:00
Michael Buesch 6a724d68a3 [B43]: Remove the "radio hw enabled" message on startup.
This message is useless. Only report state changes.

Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:24 -07:00
Michael Buesch 05155c83d1 [B43]: Change loglevel of radio-enable message.
Also cleanup the code a bit and remove the inline.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:21 -07:00
Michael Buesch b85b3b7af5 [B43]: Don't lock irq_lock in debugfs txpower adjust
It's not required and the txpower adjustment must not be in atomic.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:20 -07:00
Andrew Morton 90f4dd0f4b [P54PCI]: terminate pci table
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:19 -07:00
Ulrich Kunitz ababda03e1 [ZD1211RD]: add USB id for Telegent TG54USB WLAN adapter
Reinhard Speyerer reported at 2007-08-10 a new device.

Here are the information strings.

Product: Telegent TG54USB WLAN Adapter
USB ID: 129b:1666
Chip ID: zd1211 chip 129b:1666 v4330 high 00-01-36 RF2959_RF pa0 -----
FCC ID: N89-UW620Z

Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:18 -07:00
Larry Finger 01449c5a46 [BCM43XX]: Change radio hardware switch status printk from debug to regular
Some distros ship bcm43xx with debugging printout disabled. For those
BCM43xx devices with radio on/off switches, this makes it impossible
to know if the radio is on or off. This patch changes a pair of debug
printk's into ordinary printk's. It also changes the message that
prints when the radio is initialized to the off state as the old message
seems to confuse users.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:18 -07:00
Jesper Juhl fa46081c50 [ZD1211RW]: Don't needlessly initialize variable to NULL in zd_chip
No need to initialize to NULL when variable is never used before
it's assigned the return value of a kmalloc() call.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:17 -07:00
Zhu Yi 1156b2c689 [IWLWIFI]: remove per-file CFLAGS for IWL define
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:16 -07:00
Daniel Lezcano 854d8363f3 [NET]: Dynamically allocate the loopback device, part 2.
Doing this makes loopback.c a better example of how to do a
simple network device, and it removes the special case
single static allocation of a struct net_device, hopefully
making maintenance easier.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-By: Kirill Korotaev <dev@sw.ru>
Acked-by: Benjamin Thery <benjamin.thery@bull.net>
2007-10-10 16:52:15 -07:00
Daniel Lezcano de3cb747ff [NET]: Dynamically allocate the loopback device, part 1.
This patch replaces all occurences to the static variable
loopback_dev to a pointer loopback_dev. That provides the
mindless, trivial, uninteressting change part for the dynamic
allocation for the loopback.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-By: Kirill Korotaev <dev@sw.ru>
Acked-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:14 -07:00
Michael Buesch 1a09404a23 [B43]: Fix sparse warnings.
The remaining warning in phy.c will be fixed later.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:07 -07:00
Al Viro fb8e4444cc cxgb3: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:06 -07:00
Al Viro bd7eb1c549 3c509: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:06 -07:00
Al Viro 16989ba6e9 drivers/net/appletalk: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:05 -07:00
Al Viro 2929e7700f tms380tr: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:05 -07:00
Al Viro b963dc1df7 pppoe: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:04 -07:00
Al Viro 53c03f5c9e via-rhine: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:04 -07:00
Al Viro b1eab70130 r8169: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:03 -07:00
Al Viro 88b1943bd3 starfire: trivial endianness annotations
Note: we still have several fishy areas - mcast filter
and vlan handling.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:02 -07:00
Al Viro 37e1370b70 drivers/net/irda: endianness, NULL noise
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:02 -07:00
Al Viro c676504ef5 ixgb: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:01 -07:00
Al Viro 3e33545ba6 pcnet32: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:01 -07:00
Al Viro 03a710ffcb typhoon: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:00 -07:00
Al Viro c559a5bc94 tulip: endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:00 -07:00
Al Viro 701181ac1d arcnet endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:59 -07:00
Al Viro 05d2fec9f5 amd8111e big-endian fix
amd8111e_calc_coalesce() ends up with insane values of tx_data_rate since
->tx_bytes increments missing conversion from little- to host-endian

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:58 -07:00
Al Viro ee41a82fa3 amd8111e: trivial endianness annotations, NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:58 -07:00
Al Viro cc2d6596ca 3c59x: trivial endianness annotations, NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:57 -07:00
Al Viro cf9830195a fix vlan in 8139cp on big-endian
Layout of opts2 is
: MSB(vlan_tag) : LSB(vlan_tag) : flags : 0 :
regardless of the host endianness.  On little-endian
the current code ends up with the right values, but
on big-endian it blows.  In r8169.c the same bug
had been fixed in commit d35da12a40426184b1d0844104b1d464753eba19
(r8169: endianness fixes).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:57 -07:00
Al Viro d3bb52b094 endianness annotations drivers/net/bonding/
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:56 -07:00
Vitaly Bordug 9b8ee8e7d6 FS_ENET: Add polling support
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:55 -07:00
Vitaly Bordug aa90f50321 FS_ENET: TX stuff should use fep->tx_lock, instead of fep->lock.
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:54 -07:00
Maciej W. Rozycki 1a9e8549ef NET_SB1250_MAC: Rename to SB1250_MAC
Rename NET_SB1250_MAC to SB1250_MAC to follow the convention.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:54 -07:00
Maciej W. Rozycki 25a72dfe04 NET_SB1250_MAC: Update Kconfig entry
The SB1250 network interfaces are Gigabit Ethernet ones.  Move the
Kconfig entry to the appropriate section and add some help text.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:53 -07:00
Dhananjay Phadke 200eef20db netxen: ethtool fixes
Resubmitting the patch.

This patch improves ethtool support for printing correct ring statistics,
segmentation offload status, etc.

Signed-off by: Dhananjay Phadke <dhananjay@netxen.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:52 -07:00
David Gibson 1d3bb99648 Device tree aware EMAC driver
Based on BenH's earlier work, this is a new version of the EMAC driver
for the built-in ethernet found on PowerPC 4xx embedded CPUs.  The
same ASIC is also found in the Axon bridge chip.  This new version is
designed to work in the arch/powerpc tree, using the device tree to
probe the device, rather than the old and ugly arch/ppc OCP layer.

This driver is designed to sit alongside the old driver (that lies in
drivers/net/ibm_emac and this one in drivers/net/ibm_newemac).  The
old driver is left in place to support arch/ppc until arch/ppc itself
reaches its final demise (not too long now, with luck).

This driver still has a number of things that could do with cleaning
up, but I think they can be fixed up after merging.  Specifically:
	- Should be adjusted to properly use the dma mapping API.
Axon needs this.
	- Probe logic needs reworking, in conjuction with the general
probing code for of_platform devices.  The dependencies here between
EMAC, MAL, ZMII etc. make this complicated.  At present, it usually
works, because we initialize and register the sub-drivers before the
EMAC driver itself, and (being in driver code) runs after the devices
themselves have been instantiated from the device tree.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:52 -07:00
Al Viro 03233b90b0 8139cp: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:51 -07:00
Bryan Wu eeb70af91d Blackfin EMAC driver: add a select for the PHYLIB of this driver
Since we are adding requirement for the PHYLIB for this driver, there should be a select for that

Cc: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:51 -07:00
Bryan Wu 4ae5a3ad5a Blackfin EMAC driver: Add phy abstraction layer supporting in bfin_emac driver
- add MDIO functions and register mdio bus
 - add phy abstraction layer (PAL) functions and use PAL API
 - test on STAMP537 board

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:50 -07:00
Bryan Wu 496a34c224 Blackfin EMAC driver: add power management interface and change the bf537mac_reset to bf537mac_disable
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:49 -07:00
Alex Landau 73f8318286 Blackfin EMAC driver: add function to change the MAC address
Alex Landau writes in the forums:
 Previously, changing the MAC address (e.g. via ifconfig) resulted
 in a generic function to be called that only changed a variable in
 memory. This patch also updated the Blackfin MAC address registers
 to filter the correct new MAC.

Signed-off-by: Alex Landau <lirsb@yahoo.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:48 -07:00
Sivakumar Subramani 1a7eb72b68 S2io: Updating transceiver information in ethtool function
- Update transceiver information in ethtool function

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:48 -07:00
Sivakumar Subramani 2fd3768845 S2io: Added support set_mac_address driver entry point
- Added set_mac_address driver entry point
- Copying permanent mac address to dev->perm_addr
- Incorporated following review comments from Jeff
     - Converted the macro to a function and removed call to memset
     - regarding function naming convention, for all callbacks and entry points
       will have 's2io_' prefix and helper functions will have 'do_s2io_' prefix.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:47 -07:00
Sivakumar Subramani 8a4bdbaa93 S2io: Removed unused feature - bimodal interrupts
Removed bimodal interrupt support - unused feature

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

[also, trim trailing whitespace]
2007-10-10 16:51:47 -07:00
Sivakumar Subramani bd684e43d6 S2io: Change kmalloc+memset to k[zc]alloc
- Changed kmalloc+memset to k[zc]alloc as per Mariusz's patch
  <m.kozlowski@tuxland.pl>

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:46 -07:00
Jeff Garzik b9f2c0440d [netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_count
These have been superceded by the new ->get_sset_count() hook.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:45 -07:00
Michael Buesch 753f492093 [B44]: port to native ssb support
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:51:43 -07:00
Michael Wu eff1a59c48 [P54]: add mac80211-based driver for prism54 softmac hardware
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:42 -07:00
Joe Perches 0795af5729 [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:42 -07:00
Ivo van Doorn 95ea36275f [RT2x00]: add driver for Ralink wireless hardware
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:39 -07:00
Zhu Yi b481de9ca0 [IWLWIFI]: add iwlwifi wireless drivers
This patch adds the mac80211 based wireless drivers for the Intel
PRO/Wireless 3945ABG/BG Network Connection and Intel Wireless WiFi
Link AGN (4965) adapters.

[ Move driver into it's own directory -DaveM ]

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:39 -07:00
Larry Finger 75388acd0c [B43LEGACY]: add mac80211-based driver for legacy BCM43xx devices
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:38 -07:00
Michael Buesch e4d6b79518 [B43]: add mac80211-based driver for modern BCM43xx devices
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:37 -07:00
Andy Gospodarek 1a348ccc10 [NET]: Add Tehuti network driver.
[ Ported to napi_struct changes... -DaveM ]

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:34 -07:00
Francois Romieu 1202d6ff35 [IPG]: add IP1000A driver to kernel tree
Signed-off-by: Jesse Huang <jesse@icplus.com.tw>
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:33 -07:00
Ed Swierk 4885a50476 [TAP]: Configurable interface MTU.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:19 -07:00
Jeff Garzik 88d3aafdae [ETHTOOL] Provide default behaviors for a few ethtool sub-ioctls
For the operations
	get-tx-csum
	get-sg
	get-tso
	get-ufo
the default ethtool_op_xxx behavior is fine for all drivers, so we
permit op==NULL to imply the default behavior.

This provides a more uniform behavior across all drivers, eliminating
ethtool(8) "ioctl not supported" errors on older drivers that had
not been updated for the latest sub-ioctls.

The ethtool_op_xxx() functions are left exported, in case anyone
wishes to call them directly from a driver-private implementation --
a not-uncommon case.  Should an ethtool_op_xxx() helper remain unused
for a while, except by net/core/ethtool.c, we can un-export it at a
later date.

[ Resolved conflicts with set/get value ethtool patch... -DaveM ]

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:17 -07:00
Jeff Garzik 09f75cd7bf [NET] drivers/net: statistics cleanup #1 -- save memory and shrink code
We now have struct net_device_stats embedded in struct net_device,
and the default ->get_stats() hook does the obvious thing for us.

Run through drivers/net/* and remove the driver-local storage of
statistics, and driver-local ->get_stats() hook where applicable.

This was just the low-hanging fruit in drivers/net; plenty more drivers
remain to be updated.

[ Resolved conflicts with napi_struct changes and fix sunqe build
  regression... -DaveM ]

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:16 -07:00
Denis Cheng ff8ac60948 drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:15 -07:00
Ralf Baechle 10d024c1b2 [NET]: Nuke SET_MODULE_OWNER macro.
It's been a useless no-op for long enough in 2.6 so I figured it's time to
remove it.  The number of people that could object because they're
maintaining unified 2.4 and 2.6 drivers is probably rather small.

[ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ]

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:13 -07:00
Sivakumar Subramani 596c5c9743 S2io: code Optimization of isr function
- Code Optimization of s2io_isr function.
- Isr check using per device napi variable instead of driver global.
- Reduced from 3 to 1 if condition before check for processing packet receive
  packets.
- Implemented Jeff's comment to use synchronize_irq. Removed the isr_cnt
  variable as it became redundant.
- One time de assert the interrupts by writing all F's to the general_int_mask
  register instead of de asserting by clearing the source of interrupts with
  multiple writes which causes loss of interrupts (race conditions). It is
  entirely possible that before the driver has a chance to mask the asserted
  alarm bit, another alarm/traffic interrupt bit gets asserted as well. In
  this case Herc will keep the INTA line asserted and the bridge will not
  send a new Assert_INTA message upstream.

[ Resolved conflicts due to napi_struct changes... -DaveM ]

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:10 -07:00
Sivakumar Subramani 92b84437a6 S2io: Check for device state before handling traffic
- Added check to return from the traffic handling function, if the card status
  is DOWN.
- Implemented Jeff's comments on incorrect return value in s2io_poll function.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:10 -07:00
Sivakumar Subramani eaae7f7230 S2io: Cleanup - removed unused variable intr_type
- Removed the unused variable, intr_type, in device private structure.

[ Resolve conflicts with napi_struct changes... -DaveM ]

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:09 -07:00
Sivakumar Subramani 8116f3cf4a [S2IO]: Handle and monitor all of the device errors and alarms
- Added support to poll entire set of device errors and alarams.
- A note on how device errors and alarms are handled:
- The adapter will automatically recover from uncorrectable ECC errors.
  Packets containing corrupted data will be dropped (not transmitted) or tagged
  as invalid before being passed to the host.
- The adapter cannot recover from any internal state machine errors. A state
  machine error requires a device reset.
- Any internal error that could potentially result in .store trampling.
  (undesirable PCI behaviour)is tagged as a "serious error". In such cases
  the adapter will give up its ability to be a bus master. In this situation
  the host will still be able to read internal device registers in order to
  generate an error report. A device reset is necessary to return to normal
  operation.
- In the event of a pcix data parity error, the adapter will automatically
  disable itself. Adapter_En will automatically transition from '1' to '0' and
  the adapter will enter its clean-up routine. Once the device has achieved
  quiescence, an adapter reset should be performed.
- Replaced alarm_intr_handler() with s2io_handle_errors().
- Added statistic counters to monitor the alarms.

[ Fix warnings wrt. do_s2io_chk_alarm_bit(), Callers pass in an
  "unsigned long long *" but the function takes a "u64 *" which is
  different on many 64-bit platforms. -DaveM ]

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:09 -07:00
Sivakumar Subramani 9caab4587b S2io: Enable all the error and alarm indications
- Added support to unmask entire set of device errors and alarams.
        Alarm interrupts are generated for a myriad of purposes, ranging from
  illegal operations or requests to internal state machine errors and
  uncorrectable data corruption errors. In several cases the adapter can
  recover gracefully from unexpected events; however, in some cases, a device
  reset may be necessary. This patch handles alarms generated by all the
  blocks within the device.

  The adapter generates the following types of alarms:
        1. Link state transitions (local/remote fault) or other link-related
           problems.
        2. Problems with any device peripherals, including the EEPROM, FLASH,
           etc.
        3. Correctable ECC errors (single-bit errors) on internal data
           structures or frame data.
        4. Uncorrectable ECC errors (multi-bit errors) on internal data
           structures or frame data.
        5. State machine errors, which indicate that internal control
           structures have become corrupted.
        6. PCI related errors, including parity errors or illegal transactions.
        7. Other unexpected events.

- Implemented Jeff's review comments to use do_s2io_write_bits function to avoid
  duplicate codes.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:08 -07:00
Thomas Bogendoerfer ed9f0e0bf3 remove setup of platform device from jazzsonic.c
remove setup platform device from jazzsonic, which is done in arch code now

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:07 -07:00
Ralf Baechle 99cd149efe sgiseeq: replace use of dma_cache_wback_inv
The sgiseeq driver is one of the few remaining users of the ancient
cache banging DMA API.  Replaced with the modern days DMA API.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:07 -07:00
Divy Le Ray dc67369573 cxgb3 - Update engine microcode version
The new microcode engine version is set to 1.1.0

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:06 -07:00
Divy Le Ray 1aafee2657 cxgb3 - Add T3C rev
add driver recognition for T3C rev board.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:06 -07:00
Divy Le Ray bb9366af7b cxgb3 - CQ context operations time out too soon.
Currently, the driver only tries up to 5 times (5us) to get the results
of a CQ context operation.  Testing has shown the chip can take as much
as 50us to return the response on SG_CONTEXT_CMD operations.  So we up
the retry count to 100 to cover high loads.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:05 -07:00
Divy Le Ray 1c17ae8af9 cxgb3 - Set the CQ_ERR bit in CQ contexts.
The cxgb3 driver is incorrectly configuring the HW CQ context for CQ's
that use overflow-avoidance.  Namely the RDMA control CQ.  This results
in a bad DMA from the device to bus address 0.  The solution is to set
the CQ_ERR bit in the context for these types of CQs.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:05 -07:00
Divy Le Ray b4687ff753 cxgb3 - remove false positive in xgmac workaround
Qualify toggling of xgmac tx enable with not getting pause frames,
we might not make forward progress because the peer is sending
lots of pause frames.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:04 -07:00
Divy Le Ray 3eea3337a0 cxgb3 - log and clear PEX errors
Clear pciE PEX errors late at module load time.
Log details when PEX errors occur.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:03 -07:00
Divy Le Ray a5a3b4601b cxgb3 - Firmware update
Update firmware version.
Allow the driver to be up and running with older FW image

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:03 -07:00
Stephen Hemminger 34c6417b70 e100: timer power saving
Since E100 timer is 2HZ, use rounding to make timer occur on the
correct boundary.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:02 -07:00
Auke Kok 9a799d7103 ixgbe: driver for Intel(R) 82598 PCI-Express 10GbE adapters (v4)
This patch adds support for the Intel 82598 PCI-Express 10GbE
chipset. Devices will be available on the market soon.

This version of the driver is largely the same as the last release:

  * Driver uses a single RX and single TX queue, each using 1 MSI-X
  irq vector.
  * Driver runs in NAPI mode only
  * Driver is largely multiqueue-ready (TM)

Changes since 20070803:
  * removed wrappers for hardware functions
  * incorporated e1000e-style HW api reorganization code
  * sparse/checkpatch cleanups, namespace cleanups
  * driver prints out extra debugging information at load time
    identifying adapter board number, mac, phy types
  * removed ixgbe_api.c, ixgbe_api.h, ixgbe_osdep.h
  * driver update to 1.1.18
  * removed ixgbe.txt which contained no useful info anymore

[ Integrated napi_struct changes from Auke as well... -DaveM ]

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:02 -07:00
Masakazu Mokuno dc029ad97f PS3: Remove the workaround no longer needed
Removed the workaround that was needed for PS3 firmware versions
prior to the first release.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
CC: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:01 -07:00
Masakazu Mokuno 173261ed37 PS3: changed the way to handle tx skbs
The PS3 virtual network device requires a vlan tag in the sending packet
to select the destination device, ethernet port or wireless.
As the vlan tag field is in the middle of the passed data,
we should insert it into the packet data.
To avoid copying much of the packet data, the driver used two tx descriptors
for one tx skb; one descriptor was for sending a small static
buffer which contained vlan tag and copied header (two mac addresses),
one was for the residual data after the vlan field.

This patch changes the way to insert the vlan tag.  By changing
netdev->hard_header_len, we can make the headroom for moving mac address
fields in the skb buffer. Then we can send one tx skb with
one tx descriptor.  This also gives us a tx throughut gain of approx.
20% according to netperf results.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
CC: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:00 -07:00
Olof Johansson 829185e97f pasemi_mac: Clean TX ring in poll
Unfortunately there's no timeout for how long a packet can sit on
the TX ring after completion before an interrupt is generated, and
we want to have a threshold that's larger than one packet per interrupt.

So we have to have a timer that occasionally cleans the TX ring even
though there hasn't been an interrupt. Instead of setting up a dedicated
timer for this, just clean it in the NAPI poll routine instead.

[ Resolved conflicts with napi_struct changes... -DaveM ]

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:00 -07:00
Olof Johansson 6fba848a9a pasemi_mac: Enable LLTX
Enable LLTX on pasemi_mac: we're already doing sufficient locking
in the driver to enable it.

[ Resolved merge conflicts with napi_struct changes... -DaveM ]

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:59 -07:00
Olof Johansson 38bf3184e8 pasemi_mac: Fix RX checksum flags
RX side flag to use is CHECKSUM_UNNECESSARY, not CHECKSUM_COMPLETE.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:59 -07:00
Olof Johansson 021fa22e01 pasemi_mac: Fix TX ring wrap checking
The old logic didn't detect full (tx) ring cases properly, causing
overruns and general badness. Clean it up a bit and abstract out the
ring size checks, always making sure to leave 1 slot open.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:58 -07:00
Olof Johansson 02df6cfa09 pasemi_mac: Batch up TX buffer frees
Postpone pci unmap and skb free of the transmitted buffers to outside of
the tx ring lock, batching them up 32 at a time.

Also increase the count threshold to 128.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:58 -07:00
Olof Johansson 26fcfa95ae pasemi_mac: RX performance tweaks
Various RX performance tweaks, do some explicit prefetching of packet
data, etc.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:57 -07:00
Olof Johansson 73344863e4 pasemi_mac: Fix memcpy amount for short receives
Fix up memcpy for short receives.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:56 -07:00
Olof Johansson c0efd52b8b pasemi_mac: Enable L2 caching of packet headers
Enable settings to target l2 for the first few cachelines of the packet, since
we'll access them to get to the various headers.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:56 -07:00
Olof Johansson b6e05a1b67 pasemi_mac: Stop using the pci config space accessors for register read/writes
Move away from using the pci config access functions for simple register
access.  Our device has all of the registers in the config space (hey,
from the hardware point of view it looks reasonable :-), so we need to
somehow get to it. Newer firmwares have it in the device tree such that
we can just get it and ioremap it there (in case it ever moves in future
products). For now, provide a hardcoded fallback for older firmwares.

[ Resolved napi_struct conflicts... -DaveM ]

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:55 -07:00
Olof Johansson a85b94222d pasemi_mac: Abstract out register access
Abstract out the PCI config read/write accesses into reg read/write ones,
still calling the pci accessors on the back end.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:55 -07:00
Olaf Hering ced13330bb bmac: add simple ethtool support for network manager
NetworkManager will not start dhcpd on an interface unless it reports
link-up state via ethtool.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:54 -07:00
Stephen Hemminger 167f53d05f sky2: use pci_config access functions
Use the PCI layer config access functions. The driver was using the
memory mapped window in device, to workaround issues accessing the
advanced error reporting registers.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:54 -07:00
Stephen Hemminger 555382cbfc sky2: advanced error reporting
Use the kernel interfaces for advanced error reporting.
This should be cleaner and clear up errors on boot.

For those systems with busted BIOS's that don't correctly
support mmconfig, advanced error reporting will be disabled.
The PCI registers for advanced error reporting start at 0x100 which
is too large to be accessed by legacy functions.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:53 -07:00
Stephen Hemminger 8c4c00f371 sky2: dont restrict config space access
Take out the code that protects driver from accessing the
PCI config space.
We are old enough to run with scissors now.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:52 -07:00
Stephen Hemminger efcf6e2feb sky2: document GPHY_CTRL bits
Add documentation of GPHY_CTRL register bits even if driver
is not using them (yet).

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:52 -07:00
Stephen Hemminger 5b296bc9e1 sky2: use debugfs rename
Use debugfs rename to handle device neame changes.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:51 -07:00
Divy Le Ray 3f61e4278c cxgb3 - Update internal memory management
Set PM1 internal memory to round robin mode
It balances access to this internal memory for multiport adapters.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:51 -07:00
Divy Le Ray 167cdf5fbc cxgb3 - log adapter serial number
Log HW serial number when cxgb3 module is loaded.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:50 -07:00
Divy Le Ray c64c2eaeaa cxgb3 - Fatal error update
Stop the MAC when a fatal error is detected.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:50 -07:00
Divy Le Ray c9a6ce500d cxgb3 - tighten checks on TID values
Enforce validity checks on connection ids

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:49 -07:00
Divy Le Ray e22bb45d77 cxgb3 - Expose HW memory page info
A HW issue requires limiting the receive window size
to 23 pages of internal memory.
These pages can be configured to different sizes,
thus the RDMA driver needs to know the
page size to enforce the upper limit.

Also assign explicit enum values.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:49 -07:00
Divy Le Ray 27186dc325 cxgb3 - use immediate data for offload Tx
Send small TX_DATA work requests as immediate data even when
there are fragments. this avoids doing multiple DMAs for
small fragmented packets.
The driver already implements this optimization for small
contiguous packets.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:48 -07:00
Divy Le Ray 6e3f03b72c cxgb3 - SGE doorbell overflow warning
Log doorbell Fifo overflow

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:47 -07:00
Divy Le Ray 52b810d305 cxgb3 - Update rx coalescing length
Reduce Rx coalescing length to 12288
Large bursts from the adapter to the host create back pressure
on the chip. Reducing the burst size avoids the issue.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:47 -07:00
Mark Hindley c8303d10da 3c59x: check return of pci_enable_device()
Check return of pci_enable_device in vortex_up().

Also modify vortex_up to return error to callers. Handle failure of
vortex_up in vortex_open and vortex_resume.

Signed-off-by: Mark Hindley <mark@hindley.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:46 -07:00
Brian King 79ef4a4dd4 ibmveth: Remove use of bitfields
Removes the use of bitfields from the ibmveth driver. This results
in slightly smaller object code.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:46 -07:00
Brian King 3449a2ab31 ibmveth: Remove dead frag processing code
Removes dead frag processing code from ibmveth. Since NETIF_F_SG was
not set, this code was never executed. Also, since the ibmveth
interface can only handle 6 fragments, core networking code would need
to be modified in order to efficiently enable this support.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:45 -07:00
Brian King ddbb4de967 ibmveth: Add ethtool driver stats hooks
Add ethtool hooks to ibmveth to retrieve driver statistics.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:44 -07:00
Brian King 80e536770c ibmveth: Add ethtool TSO handlers
Add handlers for get_tso and get_ufo to prevent errors being printed
by ethtool.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:44 -07:00
Brian King 5fc7e01cb7 ibmveth: Implement ethtool hooks to enable/disable checksum offload
This patch adds the appropriate ethtool hooks to allow for enabling/disabling
of hypervisor assisted checksum offload for TCP.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:43 -07:00
Brian King f4ff28720f ibmveth: Enable TCP checksum offload
This patchset enables TCP checksum offload support for IPV4
on ibmveth. This completely eliminates the generation and checking of
the checksum for packets that are completely virtual and never
touch a physical network. A simple TCP_STREAM netperf run on
a virtual network with maximum mtu set yielded a ~30% increase
in throughput. This feature is enabled by default on systems that
support it, but can be disabled with a module option.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:43 -07:00
Komuro df950828b0 dl2k: add Sundance/Tamarack TC902x Gigabit Ethernet Adapter support
Actually, D-Link modified the VendorID/ProductID of the TC902x.
The TC902x is the original chipset.

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:42 -07:00
Rafael J. Wysocki b6aec32a77 uli526x: Add suspend and resume routines (updated)
Add suspend/resume support to the uli526x network driver (tested on x86_64,
with 'Ethernet controller: ALi Corporation M5263 Ethernet Controller, rev 40').

This patch is based on the suspend/resume code in the tg3 driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:41 -07:00
Don Fry 917270c6ed pcnet32: add suspend and resume capability
Add suspend and resume capability to the driver.
Tested both to ram and to disk on x86_64 platform.

Signed-off-by:  Don Fry <pcnet32@verizon.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:41 -07:00
Oliver Neukum a11a6544c0 support for USB autosuspend in the asix driver
this implements support for USB autosuspend in the asix USB ethernet
driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:40 -07:00
Auke Kok bc7f75fa97 [E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)
This driver implements support for the ICH9 on-board LAN ethernet
device. The device is similar to ICH8.

The driver encompasses code to support 82571/2/3, es2lan and ICH8
devices as well, but those device IDs are disabled and will be
"lifted" from the e1000 driver over one at a time once this driver
receives some more live time.

Changes to the last snapshot posted are exclusively in the internal
hardware API organization. Many thanks to Jeff Garzik for jumping in
and getting this organized with a keen eye on the future layout.

[ Integrated napi_struct patch from Auke as well... -DaveM ]

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:40 -07:00
John W. Linville cbdb9e43d1 [PATCH] libertas: remove unused adhoc_rates_b definition
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:39 -07:00
Andrew Morton 4ecd41bd0f [PATCH] libertas: printk warning fixes
drivers/net/wireless/libertas/if_cs.c: In function 'if_cs_prog_helper':
drivers/net/wireless/libertas/if_cs.c:462: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
drivers/net/wireless/libertas/if_cs.c: In function 'if_cs_prog_real':
drivers/net/wireless/libertas/if_cs.c:538: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:38 -07:00
Jesper Juhl 655b4d16ac [PATCH] net: Kill some unneeded allocation return value casts in libertas
kmalloc() and friends return void*, no need to cast it.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:37 -07:00
Brajesh Dave 4b04f19625 [PATCH] libertas: advertise 11g ad-hoc rates
Advertise support for 802.11g bitrates when starting adhoc
networks, not just 802.11b bitrates.

Signed-off-by: Brajesh Dave <brajeshd@marvell.com>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:37 -07:00
Marek Vašut 70500f5443 [PATCH] libertas: region code values specified as 8bit
This patch strips away possible mess in regioncode (eg. on my card - 88W8305
chipset - I get 0x3031 instead of expected 0x0031 and as a result the driver
defaults to USA region which is obviously incorrect). Following patch fixes
the issue.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:36 -07:00
Pierre Ossman 794760f750 [PATCH] libertas: properly end commands on hardware failure
Make sure that errors reported by the hardware layer is properly
handled. Otherwise commands tend to get stuck in limbo.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:36 -07:00
Dan Williams b6e99dd6e2 [PATCH] libertas: send reset command directly instead of calling libertas_reset_device
Ensures that any platform specific code that might live in libertas_reset_device
(for example, OLPC tells the EC to do a GPIO-toggled reset of the wireless
from libertas_reset_device) isn't called.  Could be handled better by
interface-specific callbacks and a flag for "other hardware reset".

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Marcelo Tosatti <marcelo@kvack.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:35 -07:00
Dan Williams 64f104e89b [PATCH] libertas: don't stomp on interface-specific private data
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:34 -07:00
Dan Williams 954ee164f4 [PATCH] libertas: reorganize and simplify init sequence
This patch moves all firmware load responsibility into the interface-specific
code and gets rid of the firmware pointer in the generic card structure.  It
also removes 3 fairly unecessary callbacks: hw_register_dev, hw_unregister_dev,
and hw_prog_firmware.  It also makes the init sequence from interface
probe functions more logical, as there are paired add/remove and start/stop
calls into generic libertas code.

Because the USB driver code uses the same TX URB callback for both firmware
upload (where the generic libertas structure isn't initialized yet) and for
normal operation (where it is), some bits of USB code have to deal with
'priv' being NULL.  All USB firmware upload bits have been changed to not
require 'priv' at all, but simply the USB card structure.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:34 -07:00
Dan Williams b1b1907dce [PATCH] libertas: fix inadvertant removal of bits from commit 8314418629
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:33 -07:00
Mariusz Kozlowski 7563a0b4b5 [PATCH] drivers/net/wireless/wl3501_cs.c: remove redundant memset
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:33 -07:00
Daniel Drake 475fed1e22 [PATCH] zd1211rw: Add ID for ZyXEL M-202 XtremeMIMO
Tested by Nathen Meyers
FCC ID: SI5WUB221Z
zd1211b chip 0586:340a v4810 high 00-13-49 AL2230_RF pa0 ----S

Despite the product name, I'm pretty sure this isn't a MIMO device. It
appears just to be a normal ZD1211B and we have never heard of these
devices having more than 1 RF. I guess they named this product this way
to make it appear that it fits in with the rest of their XtremeMIMO
product range.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:32 -07:00
Ulrich Kunitz 64f222cce2 [PATCH] zd1211rw: consistent handling of ZD1211 specific rates
As pointed out by Daniel Drake, the zd1211rw driver used several
different rate values and names throughout the driver. He has
written a patch to change it and tweaked it after some pretty wild
ideas from my side. But the discussion helped me to understand the
problem better and I think I have nailed it down with this patch.

A zd-rate will consist from now on of a four-bit "pure" rate value
and a modulation type flag as used in the ZD1211 control set used
for packet transmission. This is consistent with the usage in the
zd_rates table. If possible these zd-rates should be used in the
code.

Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:32 -07:00
Daniel Drake 8e97afe569 [PATCH] zd1211rw: Add ID for Sitecom WL-162
Tested by Giuseppe Lippolis
zd1211b chip 0cde:001a v4810 high 00-60-b3 AL2230_RF pa0 g--NS

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:31 -07:00
Ulrich Kunitz ffe143741f [PATCH] zd1211rw: removed noisy debug messages
While developing the driver we added a lot of debug messages for
setting hardware registers. These messages make the reading of the
log files difficult and are of no use anymore. This patch removes
those messages in zd_chip.c.

Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:30 -07:00
Jeremy Fitzhardinge 5dcddfae63 xen-netfront: remove dead code
This patch removes some residual dead code left over from removing the
"flip" receive mode.  This patch doesn't change the generated output
at all, since gcc already realized it was dead.

This resolves the "regression" reported by Adrian.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:30 -07:00
Richard Knutsson df570f9333 drivers/net/3c505: Convert to generic boolean
Convert to generic boolean

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:29 -07:00
Richard Knutsson 2d6d749d12 drivers/net/tokenring: Convert to generic boolean
Convert to generic boolean

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:29 -07:00
Surya Prabhakar N c821d55c67 drivers/net/tokenring/3c359.c
Hi,
   Replacing kmalloc with kzalloc and cleaning up memset in
drivers/net/tokenring/3c359.c

Signed-off-by: Surya Prabhakar <surya.prabhakar@wipro.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:28 -07:00
Divy Le Ray b1c9e0f780 cxgb3 - MAC workaround update
Update the MAC workaround to deal with switches that do not
honor pause frames.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:28 -07:00
Mariusz Kozlowski acb2cc8b20 [PATCH] drivers/net: remove superfluous memset
This patch covers something like this:

dev = alloc_*dev(...
...
priv = netdev_priv(dev);
memset(priv, 0, sizeof(*priv));

The memset() here is superfluous. alloc_netdev() uses kzalloc()
to allocate needed memory so there is no need to zero the priv region
twice.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:27 -07:00
Jesper Juhl bf1e9a080d Clean up duplicate includes in drivers/net/
This patch cleans up duplicate includes in
	 drivers/net/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:26 -07:00
Jeff Garzik 10096974ad [netdrvr] ns83820: add ethtool media support
Split out from patch authored by Dan Faerch <dan@hacker.dk>.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:26 -07:00
Mariusz Kozlowski 2808d2e83f net/tulip/xircom_cb.c: remove superfulous priv assignment
Unpatched version does sth like this:

dev = alloc_etherdev(...
private = netdev_priv(dev);
...
dev->priv = private;

which doesn't make much sense (does it?) because this is done in
alloc_netdev() already.

struct net_device *alloc_netdev(...
{
...
	if (sizeof_priv)
		dev->priv = netdev_priv(dev);

This patch removes superfluous code.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

 drivers/net/tulip/xircom_cb.c | 32853 -> 32831 (-22 bytes)
 drivers/net/tulip/xircom_cb.o | 123984 -> 123984 (0 bytes)

 drivers/net/tulip/xircom_cb.c |    1 -
 1 file changed, 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:25 -07:00
Sivakumar Subramani 92c487996d S2IO: Fixed Link LED issue when MSI-X is enabled
-Fixed Link LED issue when MSI-X is enabled.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:25 -07:00
Sivakumar Subramani c77dd43e77 S2IO: Fixes in MSIX related code.
- Calling store_xmsi_data to store the MSI-X datas during initialization
  in s2io-init_nic function
- Disabling NAPI when MSI-X is enabled
- Freeing sp->entries and sp->s2io_entries in s2io_rem_isr

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:24 -07:00
Sivakumar Subramani 8abc4d5b84 [S2IO]: Making MSIX as default intr_type
- Making MSIX as default intr_type
- Driver will test MSI-X by issuing test MSI-X vector and if fails it will
  fallback to INTA

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:24 -07:00
Jeff Garzik 28006c65a7 [8139too]: tab-align enums and structs; remove dead code
* (main change) tab-align hardware register value enums, and hw struct

* MMIO_FLUSH_AUDIT_COMPLETE has been defined to 1 for a while.  Remove
  the code activated when it is set to zero.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:23 -07:00
Jeff Garzik 6cc92cddb1 [netdrvr] 8139cp, 8139too: convert to generic DMA
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:22 -07:00
Mariusz Kozlowski ae94607d19 drivers/net/via-velocity.c: mostly kmalloc + memset conversion to kcalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

 drivers/net/via-velocity.c | 88263 -> 88120 (-143 bytes)
 drivers/net/via-velocity.o | 254264 -> 253828 (-436 bytes)

 drivers/net/via-velocity.c |   24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:22 -07:00
Mariusz Kozlowski c477f3348a drivers/net/sb1250-mac.c: kmalloc + memset conversion to kcalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

 drivers/net/sb1250-mac.c | 76286 -> 76199 (-87 bytes)

 drivers/net/sb1250-mac.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:21 -07:00
Jeff Garzik a967b14035 drivers/net/skfp: Remove dead code referencing pci_find_device()
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:21 -07:00
Ralf Baechle bbfb86c577 IOC3: Switch hw checksumming to ethtool configurable.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:20 -07:00
Denis Cheng c54f5c2402 drivers/net/cxgb3: removed several unneeded zero initilization
Cc: linux-bugs@chelsio.com
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:20 -07:00
Yoann Padioleau eda105317f dev->priv to netdev_priv(dev), drivers/net/tokenring/
Replacing accesses to dev->priv to netdev_priv(dev). The replacment
is safe when netdev_priv is used to access a private structure that is
right next to the net_device structure in memory.
Cf http://groups.google.com/group/comp.os.linux.development.system/browse_thread/thread/de19321bcd94dbb8/0d74a4adcd6177bd
This is the case when the net_device structure was allocated with
a call to alloc_netdev or one of its derivative.

Here is an excerpt of the semantic patch that performs the transformation

@ rule1 @
type T;
struct net_device *dev;
@@

 dev =
(
        alloc_netdev
|
        alloc_etherdev
|
        alloc_trdev
)
   (sizeof(T), ...)

@ rule1bis @
struct net_device *dev;
expression E;
@@
 dev->priv = E

@ rule2 depends on rule1 && !rule1bis  @
struct net_device *dev;
type rule1.T;
@@

- (T*) dev->priv
+ netdev_priv(dev)

PS: I have performed the same transformation on the whole kernel
and it affects around 70 files, most of them in drivers/net/.
Should I split my patch for each subnet directories ? (wireless/, wan/, etc)

Thanks to Thomas Surrel for helping me refining my semantic patch.

Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>

 3c359.c       |   58 +++++++++++++++++++++++++++++-----------------------------
 ibmtr.c       |   38 +++++++++++++++++++-------------------
 lanstreamer.c |   32 ++++++++++++++++----------------
 madgemc.c     |    4 ++--
 olympic.c     |   36 ++++++++++++++++++------------------
 tmspci.c      |    4 ++--
 6 files changed, 86 insertions(+), 86 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:19 -07:00
Jeff Garzik af096046f6 [netdrvr] skfp: remove a bunch of dead code
The driver has not compiled in anything except PCI support for many
years (see drivers/net/skfp/Makefile).  This driver is also unmaintained
for many years, so arguments for keeping the cross-OS, cross-bus (ISA,
EISA, MCA) code do not exist.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:18 -07:00
Dan Williams 7856a541ad [PATCH] libertas: bump driver version
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:18 -07:00
Dan Williams 8362cd413e [PATCH] libertas: fix sparse-reported problems
A few fields being converted to the wrong sized type, and a few missed
endian conversions.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:17 -07:00
Dan Williams c7fdf26995 [PATCH] libertas: better descriptions for association errors
Describe the association response status code the firmware
returns, based on mail to libertas-dev from Ronak.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:17 -07:00
Dan Williams 5612c0140a [PATCH] libertas: ignore spurious mesh autostart events
Don't trust the firmware to always send them at the right time,
ignore them when the driver thinks mesh autostart is disabled.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:16 -07:00
Dan Williams 81173e34d4 [PATCH] libertas: fix misspelling in debug message
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:15 -07:00
Luis Carlos Cobo 63f0023bc3 [PATCH] libertas: pass boot2 version to firmware
Boot2 version used to be hardcoded in the uploaded firmware,
this patch preserves the boot2 version before uploading firmware
and sends it to the firmware again on resume.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:15 -07:00
Dan Williams 2afc0c5d71 [PATCH] libertas: push WEXT scan requests to a work queue
Push WEXT scan requests to a workqueue and have each partial scan queue
the next part, then only report results when the complete scan has finished.
Full scans don't go through the work queue.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:14 -07:00
Eugene Teo b031ac1026 [PATCH] drivers/net/wireless/libertas/cmd.c: fix adapter->driver_lock dereference
adapter is NULL if cmdnode is not.

Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:14 -07:00
Dan Williams 5707708111 [PATCH] libertas: fix assignment of WEP key type
keytype is a u8

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:13 -07:00
Luis Carlos Cobo 965f8bbc6c [PATCH] libertas: monitor mode support for OLPC firmware
Driver support for the monitor mode support that will be available in the next
OLPC 'bleeding edge' Marvell firmware release (most likely, 5.110.16.p2).

To activate monitor mode,

echo mode > /sys/class/net/{ethX,mshX}/device/libertas_rtap

where mode is the hex mask that specifies which frames to sniff (in short, 0x1
for data, 0x2 for all management but beacons, 0x4 for beacons). Any non zero
mode will activate the monitor mode, inhibiting transmission in ethX and mshX
interfaces and routing all the incoming traffic to a new rtapX interface that
will output the packets in 802.11+radiotap headers format.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:13 -07:00
Jean Tourrilhes 9483f03150 [PATCH] libertas: fix a few wext abuses...
o SIOCGIWNAME is not designed to return the version number of the driver.
On the other hand, you are free to abuse SIOCGIWNICKN for that purpose.

o Don't attempt to fix the WE19/WE20 transition in the driver, because
your fixes are bogus, and redundant with the code in the kernel (you may
endup with +2, you can't read 32 char ESSID...).

o In SIOCSIWTXPOW, if you specified in iwrange that you want dBm, you
should only get dBm, which allow to reduce code bloat.

Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:12 -07:00
Luis Carlos Cobo d21b31fd53 [PATCH] libertas: keep mesh autostart enabled while asleep
After loading the firmware, mesh autostart will be disabled. After that, the
user will still be able to enable or disable it at will. On suspend, it will be
always activated and later on resume it will go back to the state it had before
going to sleep.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:11 -07:00
Luis Carlos Cobo b37e5842f5 [PATCH] libertas: revert CAPINFO_MASK to its original value
CAPINFO_MASK changed on commits 981f187b and a091095b. Reverting to the original
value.  Also move CAPINFO_MASK into the sole user, join.c.  CAPINFO_MASK
should be in host CPU byte order; capability is converted to device
byte order elsewhere.

This fixes OLPC ticket #2161

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:11 -07:00
Dan Williams 00af0157e0 [PATCH] libertas: push mesh beacon bit to userspace in scan results
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:10 -07:00
Dan Williams 0edef215e4 [PATCH] libertas: send association events on adhoc reassociation
Send association event to userspace when reassociating to the same
ad-hoc network, because it's still an association.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:10 -07:00
Holger Schurig 9556d2120c [PATCH] libertas: fix two debug statements in cmdresp.c
Purely cosmetic: this moves an lbs_deb_enter() to the proper place
and changes an erraneous lbs_deb_enter_args() into lbs_deb_leave_args()

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:09 -07:00
Holger Schurig bee093d613 [PATCH] libertas: remove bss_descriptor->timestamp
Noone used this variable.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:09 -07:00
Holger Schurig a2235ed402 [PATCH] libertas: remove bss_descriptior->networktsf
This value was parsed out, but then nowhere used ... except in
some debugfs output. I can't imagine anyone wanting to use this
value for anything real (as no other driver exports it), so
bye-bye.

Along this, made the columns of
/sys/kernel/debug/libertas_wireless/*/getscantable align again.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:08 -07:00
Holger Schurig 4f2fdaaf0e [PATCH] libertas: remove adapter->scantype
scantype was initialized with CMD_SCAN_TYPE_ACTIVE, but there is no code
that would ever change it, so we can use that variable directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:08 -07:00
Holger Schurig d65ead886a [PATCH] libertas: remove adapter->scanmode
scanmode was initialized with CMD_BSS_TYPE_ANY, but there is no code
that ever can store another value there, so it can go away.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:07 -07:00
Holger Schurig 2c85103da3 [PATCH] libertas: remove adapter->beaconperiod
beaconperiod was initialized with MRVDRV_BEACON_INTERVAL, but there is
no code that would ever change it's value. We can use the define directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:06 -07:00
Holger Schurig 85c93e5189 [PATCH] libertas: remove adapter->adhoc_grate_enabled
The variable was initialized with 0 (false). There is no code that would
ever change it, so we can use the false-patch directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:06 -07:00
Holger Schurig 0aabc0a5d5 [PATCH] libertas: remove adapter->listeninterval
listeninterval was initialized with MRVDRV_DEFAULT_LISTEN_INTERVAL, but
there exists that would ever change it. So we can use this define directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:05 -07:00
Holger Schurig 956deb867a [PATCH] libertas: remove adapter->regiontableindex
The value was computed, but then never used.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:05 -07:00
Holger Schurig ae596ce2f7 [PATCH] libertas: remove adapter->atimwindow
This varaible was initialized with 0 but there is no code that would ever
change it's value. So it can go away.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:04 -07:00
Holger Schurig 56c4656e84 [PATCH] libertas: remove adapter->multipledtim
multipledtim was initialized with MRVDRV_DEFAULT_MULTIPLE_DTIM and then
kept at that value, so we could use that define directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:03 -07:00
Holger Schurig 252cf0d10f [PATCH] libertas: remove adapter->locallisteninterval
locallisteninterval was initialized with 0, but there is no code that
changes it, rendering it rather useless.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:03 -07:00
Holger Schurig 97605c3eb3 [PATCH] libertas: remove adapter->nullpktinterval
No code ever initialized this variable, so it was 0 because of kzalloc().
But no other code changes it, making it rather useless.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:02 -07:00