Commit Graph

6502 Commits (1fea8e8838d009545d94588ac41037d8f20f969d)

Author SHA1 Message Date
Alan Cox a35f5de776 3c501: Bring into compliance with the coding style
3c501 leads the way... 8)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:04:00 -08:00
Adrian Bunk 68d579fb93 drivers/net/chelsio/: #if 0 unused functions
This patch #if 0's the following unused functions:
- espi.c:t1_espi_set_misc_ctrl()
- sge.c:t1_sched_set_max_avail_bytes()
- sge.c:t1_sched_set_drain_bits_per_us()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:59 -08:00
Joe Perches 2450022afa drivers/net: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:59 -08:00
Joe Perches 60403fdada drivers/net/sk98lin: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:58 -08:00
Joe Perches 93ab8e84de drivers/net/wan: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:57 -08:00
Joe Perches 5bc51424b4 drivers/net/netxen: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:56 -08:00
Joe Perches 8c5863a406 drivers/net/ixgb: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:55 -08:00
Joe Perches f07b2e403b drivers/net/cxgb3: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:55 -08:00
Joe Perches 3106752768 drivers/net/chelsio: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:54 -08:00
Eliezer Tamir a2fbb9ea23 add bnx2x driver for BCM57710
Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:53 -08:00
Sreenivasa Honnur faa4f7969f [S2IO]: Support for add/delete/store/restore ethernet addresses
- Support to add/delete/store/restore 64 and 128 Ethernet addresses for Xframe I and Xframe II respectively.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:52 -08:00
Patrick McHardy db0ce50d37 [E1000]: Secondary unicast address support
Add support for configuring secondary unicast addresses. Unicast
addresses take precendece over multicast addresses when filling
the exact address filters to avoid going to promiscous mode.
When more unicast addresses are present than filter slots,
unicast filtering is disabled and all slots can be used for
multicast addresses.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:51 -08:00
Joe Perches 2a88719197 [E1000E]: convert register test macros to functions
Add functions for reg_pattern_test and reg_set_and check
Changed macros to use these functions

Compiled x86, untested

Size decreased ~2K

old:

$ size drivers/net/e1000e/ethtool.o
   text    data     bss     dec     hex filename
  14461       0       0   14461    387d drivers/net/e1000e/ethtool.o

new:

$ size drivers/net/e1000e/ethtool.o
   text    data     bss     dec     hex filename
  12498       0       0   12498    30d2 drivers/net/e1000e/ethtool.o

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:51 -08:00
Joe Perches 7e64300a0f [E1000]: Convert regtest macro's to functions
Minimal macro to function conversion in e1000_ethtool.c

Adds functions reg_pattern_test and reg_set_and_check
Changes REG_PATTERN_TEST and REG_SET_AND_CHECK macros
to call these functions.

Saves ~2.5KB

Compiled x86, untested (no hardware)

old:

$ size drivers/net/e1000/e1000_ethtool.o
   text    data     bss     dec     hex filename
  16778       0       0   16778    418a drivers/net/e1000/e1000_ethtool.o

new:

$ size drivers/net/e1000/e1000_ethtool.o
   text    data     bss     dec     hex filename
  14128       0       0   14128    3730 drivers/net/e1000/e1000_ethtool.o

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:50 -08:00
Auke Kok ef90e4eca9 [E1000]: update netstats traffic counters realtime
formerly e1000/e1000e only updated traffic counters once every
2 seconds with the register values of bytes/packets. With newer
code however in the interrupt and polling code we can real-time
fill in these values in the netstats struct for users to see.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:49 -08:00
Auke Kok 4198869277 [E1000E]: update netstats traffic counters realtime
formerly e1000/e1000e only updated traffic counters once every
2 seconds with the register values of bytes/packets. With newer
code however in the interrupt and polling code we can real-time
fill in these values in the netstats struct for users to see.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:49 -08:00
Sten Wang 7a47dd7a2f [NET]: Add support for the RDC R6040 Fast Ethernet controller
This patch adds support for the RDC R6040 MAC we can find in the RDC
R-321x System-on-chips.

Signed-off-by: Sten Wang <sten.wang@rdc.com.tw>
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
2008-01-28 15:03:47 -08:00
David Acker 7734f6e6bc Fix e100 on systems that have cache incoherent DMA
On the systems that have cache incoherent DMA, including ARM, there
is a race condition between software allocating a new receive buffer
and hardware writing into a buffer.  The two race on touching the last
Receive Frame Descriptor (RFD).  It has its el-bit set and its next
link equal to 0.  When hardware encounters this buffer it attempts to
write data to it and then update Status Word bits and Actual Count in
the RFD.  At the same time software may try to clear the el-bit and
set the link address to a new buffer.

Since the entire RFD is once cache-line, the two write operations can
collide.  This can lead to the receive unit stalling or interpreting
random memory as its receive area.

The fix is to set the el-bit on and the size to 0 on the next to last
buffer in the chain.  When the hardware encounters this buffer it stops
and does not write to it at all.  The hardware issues an RNR interrupt
with the receive unit in the No Resources state.  Software can write
to the tail of the list because it knows hardware will stop on the
previous descriptor that was marked as the end of list.

Once it has a new next to last buffer prepared, it can clear the el-bit
and set the size on the previous one.  The race on this buffer is safe
since the link already points to a valid next buffer and the software
can handle the race setting the size (assuming aligned 16 bit writes
are atomic with respect to the DMA read). If the hardware sees the
el-bit cleared without the size set, it will move on to the next buffer
and skip this one.  If it sees the size set but the el-bit still set,
it will complete that buffer and then RNR interrupt and wait.

Signed-off-by: David Acker <dacker@roinet.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:46 -08:00
Francois Romieu 3627947e84 sundance: SIOCDEVPRIVATE pollution
To quote one of my favorite contemporary author:
[include/linux/sockios.h]
 *      THESE IOCTLS ARE _DEPRECATED_ AND WILL DISAPPEAR IN 2.5.X -DaveM
 */

#define SIOCDEVPRIVATE  0x89F0  /* to 89FF */

[...]

Gentoo's snmpd trips up over this code when trying to figure if the driver
supports the non-SIOCDEVPRIVATE API or not.  One can argue over its choice
of heuristic but there no reason to make ioctl more ugly than needed.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jesse Huang <jesse@icplus.com.tw>
Tested-by: Volker Sauer <vsauer@dvs.tu-darmstadt.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:46 -08:00
Adrian Bunk 993fb90c5b drivers/net/netxen/: cleanups
This patch contains the following cleanups:
- static functions in .c files shouldn't be marked inline
- make needlessly global code static
- #if 0 unused code

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:45 -08:00
Auke Kok 3957d63da0 ixgbe: Fix copper PHY initialization code
While cleaning up the internal API focussing on Fiber and CX4 code
we found that I had broken the copper PHY initialization code. This
patch restores the PHY-specific code. This is mostly uninteresting
since no copper PHY boards are yet available. The changes have been
tested against Fiber only as I do not even have copper PHY versions
of 82598 macs.

This change actually cleans up the API code a bit more and we
lose some initialization code. A few PHY link detection helper
lines of code have been snuck into this patch, as well as a
read flush where it was suspected that this might cause issues.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:44 -08:00
Auke Kok 040babf9d8 e1000/e1000e: Move PCI-Express device IDs over to e1000e
e1000e will from now on support the PCI-Express adapters that
previously were supported by e1000. This support means better
performance and easier debugging from now on for both the old
PCI-X/PCI hardware and PCI-Express adapters.

This patch also moves 3 recently merged device IDs over to e1000e
that are identical to quad-port versions of already existing
dual port versions. With this last bit every former e1000 pci-e
device should work now with e1000e.

Here is a brief list of which gigabit driver to use with which
adapter:

  e1000:
	82540 -> 82547

  e1000e:
	82571 -> 82573
	ich8, ich9       (82562 or 82566)
	es2lan           (80003eslan)

  igb: (not yet merged, only available from e1000.sf.net)
	82575

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:43 -08:00
Auke Kok 1eae4eb2a1 e1000e: Disable L1 ASPM power savings for 82573 mobile variants
L1 ASPM link (pci-e link power savings) has significant benefits
(~1W savings when link is active) but unfortunately does not work
correctly on any of the chipsets that have 82573 on mobile platforms
which causes various nuisances:
 - eeprom reads return garbage information leading to bad eeprom
   checksums
 - long ping times (up to 2 seconds)
 - complete system hangs (freeze/lockup)

A lot of T60 owners have been plagued by this, but other mobile
solutions also suffer from these symptoms.

Disabling L1 ASPM before we activate the PCI-E link fixes all of
these issues at the cost of some power consumption.

Remove a workaround RDTR adjustment that is no longer needed with
this new one.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:43 -08:00
Bill Hayes 93ca161027 e1000e: alternate MAC address support
Port alternate MAC address support from the sourceforge
e1000 driver to the upstream e1000e driver.

Signed-off-by: Bill Hayes <bill.hayes@hp.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:42 -08:00
Jeff Garzik 3df5920c46 [netdrvr] ibmlana: move away from legacy MCA API
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:03:41 -08:00
Jeff Garzik fbe02d6d87 [netdrvr] ibmlana: modularization cleanup
* move alloc_netdev() call, register_netdev() call, and associated failure
  cleanup into ibmlana_probe()

* move per-net_device cleanup into ibmlana_remove_one()

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:03:40 -08:00
Jeff Garzik 28fc1f5a0c [netdrvr] irq handler minor cleanups in several drivers
* use irq_handler_t where appropriate

* no need to use 'irq' function arg, its already stored in a data struct

* rename irq handler 'irq' argument to 'dummy', where the function
  has been analyzed and proven not to use its first argument.

* remove always-false "dev_id == NULL" test from irq handlers

* remove pointless casts from void*

* declance: irq argument is not const

* add KERN_xxx printk prefix

* fix minor whitespace weirdness

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:03:40 -08:00
Jeff Garzik 1b36efe07f hamradio/scc: kill unnecessary use of 'irq' function arg
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 15:03:39 -08:00
Alejandro Martinez Ruiz ef878b8899 sk98lin: kill bogus check and convert to use ARRAY_SIZE()
This converts uses of ARRAY_SIZE(), and while at it also kills
unreachable code as far as I can say. I can't tell what was the author
trying to do with the following check. First we have:

PNMI_STATIC const SK_PNMI_STATADDR
		StatAddr[SK_PNMI_MAX_IDX][SK_PNMI_MAC_TYPES];

and then a check goes like this:

if (SK_PNMI_MAX_IDX !=
   (sizeof(StatAddr) / (sizeof(SK_PNMI_STATADDR) * SK_PNMI_MAC_TYPES)))

with the second line being just ARRAY_SIZE(StatAddr), which will always
return SK_PNMI_MAX_IDX, rendering the check useless.

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:38 -08:00
Alejandro Martinez Ruiz c00acf46de netdev: ARRAY_SIZE() cleanups
Convert array size calculations to use ARRAY_SIZE().

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:37 -08:00
Alejandro Martinez Ruiz 4c3616cdda netdev: use ARRAY_SIZE() instead of sizeof(array) / ETH_GSTRING_LEN
Using ARRAY_SIZE() on arrays of the form array[][K] makes it unnecessary
to know the value of K when checking its size.

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28 15:03:36 -08:00
Roel Kluin f59d978275 wireless: fix '!x & y' typo's
Fix priority mistakes similar to '!x & y'

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:35 -08:00
Holger Schurig 9f9dac281b libertas: move wlan_*_association_work from header to c file
Move wlan_postpone_association_work() and wlan_cancel_association_work()
from a assoc.h file to the sole user, into wext.c.

Renamed those two functions to to libertas_XXX as well.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:34 -08:00
Jes Sorensen 49df2b3347 iwlwifi: disable interrupts before calling request_irq
Disable interrupts in the iwl4965 before calling request_irq() for
the case that the previous OS or the BIOS left a pending interrupt in
the chip. This behavior has been observed on some laptops such as T61
Thinkpads and Toshiba Portege R500

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:34 -08:00
Dmitry Torokhov eb76bf29dd P54: use temporary variables to reduce size of generated code
When there are 2 linked structures, using a temporary variable to hold a pointer
to the often used structure usually produces better code (smaller and faster)
since compiler does not have to constantly re-fetch data from the first structure.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:33 -08:00
Matthias Kaehlcke 1b34fd390c Prism54: Convert mgmt_sem to the mutex API
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:32 -08:00
Dan Williams 1e3428e9e3 orinoco: more reliable scan handling
Bring scan result handling more in line with drivers like ipw.  Scan
results are aggregated and a BSS dropped after 15 seconds if no beacon
is received.  This allows the driver to interact better with userspace
where more than one process may request scans or results at any time.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:32 -08:00
Michael Buesch 40faacc407 b43: consistent naming for ieee80211_ops
Use a consistent naming scheme for the ops.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:31 -08:00
Michael Buesch 74cfdba7ce b43: Use the retry limit parameters from mac80211
Use the limits provided by mac80211.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:30 -08:00
Michael Buesch c6dfc9a8ec b43: Dereference of wl->current_dev must be protected by wl->mutex
Put all access to wl->current_dev under protection of the mutex.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:30 -08:00
Michael Buesch 0c1d379d2e b43legacy: Remove set_key callback
We don't need the set_key callback, as we don't do hw crypto.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:29 -08:00
Larry Finger f34eb692ac b43legacy: Rewrite pwork locking
Implement much easier and more lightweight locking for
the periodic work. This also removes the last big busywait
loop and replaces it by a sleeping loop.

This patch for b43legacy is patterned aftar the same patch
for b43 by Michael Buesch <mb@bu3sch.de>.

Signed-off-by: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:28 -08:00
Larry Finger 6be50837e3 b43legacy: Use input-polldev for the rfkill switch
This removes the direct call to rfkill on an rfkill event
and replaces it with an input device. This way userspace is also
notified about the event.

This patch is the port to b43legacy of a patch for b43 by Michael Buesch
<mb@bu3sch.de>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:27 -08:00
Larry Finger 93bb7f3a7b b43legacy: RF-kill support
This adds full support for the RFKILL button and the RFKILL LED trigger.

This is a port to b43legacy of a patch by Michael Buesch <mb@bu3sch.de>
for b43.

Signed-off-by: Larry Finger<Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:27 -08:00
Larry Finger ba48f7bb80 b43legacy: LED triggers support
Drive the LEDs through the generic LED triggers.

The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to b43legacy.

Signed-off-by: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:26 -08:00
Christoph Hellwig c8b0e6e19c iwlwifi: cleanup Kconfig and ifdefs to split 3945 and 4965
Currently the iwl3945 & iwl4965 drivers share some common Kconfig
symbols.  This split it up into options for the individual drivers
and gets rid of all the CONFIG_IWLWIFI cruft.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:25 -08:00
Christoph Hellwig 5d08cd1dfd iwlwifi: keep 3945 and 4965 headers separate
The iwl3945 and iwl4965 devices share some common structure, but with a
lot of difference split all over.  Currently the two drivers share a lot
of headers and use ugly preprocessor magic to manage the difference.

This patch keeps two entirely separate copies of the headers to get rid
of these hacks an ease future development.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:24 -08:00
Christoph Hellwig 416e1438d5 iwlwifi: mark more functions/variables static
mark more functions/variables static

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:23 -08:00
Zhu Yi 80f3e024dc iwlwifi: Update iwlwifi version stamp to 1.1.19
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:22 -08:00
Zhu Yi 6ff7520933 iwlwifi: Update iwlwifi version stamp to 1.1.18
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:22 -08:00
mabbas bee488dbd7 iwl4965: exclude 60M rate from probe request
This patch do the following 2 things:
1. Make sure we don't add rate 60M part of supported rate in proble request,
   some AP does not like that.
2. It is wrong to set priv->active_rate in this function, this will set
   it to all avialable rates which might overwrite the mode supported rate.
   priv->active_rate should be set by only from iwl_set_rate.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:21 -08:00
Tomas Winkler d9fd0c9969 iwlwifi: Renames struct fw_image_desc to struct fw_desc
This patche shortens the name of struct fw_image_desc to be struct
fw_desc.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:20 -08:00
Emmanuel Grumbach b559e66cfc iwlwifi: add 5965 SCD registers to iwl-prph.h
This patch adds SCD registers for 5965

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-01-28 15:03:20 -08:00
Emmanuel Grumbach 7088310908 iwlwifi: move 3945 SCD registers to iwl-prph.h
This patch moves 3945 SCD registers to iwl-prph.h. These registers
are assigned from the periphery bus

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:19 -08:00
Emmanuel Grumbach 67dc320d47 iwlwifi-ht: move 4965 SCD registers to iwl-prph.h
This patch moves 4965 SCD registers to iwl-prph.h. These registers
are assigned from the periphery bus

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:18 -08:00
Tomas Winkler ac17a947a4 iwlwifi: replacing wording restricted to nic access in iwl-io
This patch replaces wording 'restricted' with more appropriate 'nic access'
NIC access is grabbed to prevent NIC entering power save mode
General cleanup of iwl-io.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:17 -08:00
Tomas Winkler af7cca2a44 iwlwifi: rename restricted_mem to targ_mem
This patch renames restricted_mem suffix with more proper
name targ_mem for function accessing memory on the nic in target mode

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:17 -08:00
Tomas Winkler d860965200 iwlwifi: replace restricted_reg with prph
This patch renames restricted_reg suffix with more proper
name prhp for function accessing registers on the periphery bus.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:16 -08:00
mabbas a033f37ee4 iwlwifi: accept up to 4K frame size on Rx side to fit A-MSDU frame
The driver drops any Rx frame larger than 2332 bytes, but with A-MSDU
frame, it could be up to 4K. This patch makes sure we can process larger
A-MSDU frame.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:15 -08:00
Tomas Winkler c6f3f656e1 iwlwifi: using PCI_DEVICE macro
PCI_DEVICE macro is more concise when using defualt values
in device definitions

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:14 -08:00
Tomas Winkler 12a70fbe57 iwlwifi: remove cck_power_index_compensation
cck_power_index_compensation variable was never used

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:13 -08:00
Ian Schram 3edb059a40 iwlwifi: remove late null-check and duplicate bug_on
These pieces of code appear to be useless. The BUG_ON is also performed in
iwl_send_cmd_async.

Serious karma would be needed to enter iwl_ativate_qos with a null priv.
I had a deja vu when patching this, but for the life of me I couldn't track
down a similar patch.

Signed-off-by: Ian Schram <ischram@telenet.be>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:13 -08:00
Ian Schram bc434dd296 iwlwifi: Beautify by removing superfluous newlines and code
Moving code around, lindent, and whatnot created several places where
there appeared to be an 75 column "rule" instead of 80. This patch removes
those that I can spot, hopefully increasing readability.

Signed-off-by: Ian Schram <ischram@telenet.be>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:12 -08:00
Ian Schram bbc5807bed iwlwifi: Two comments in iwl-3945.c were longer than 80 columns
This patch shorten two comments lines in iwl-3945.c

Signed-off-by: Ian Schram <ischram@telenet.be>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:11 -08:00
Tomas Winkler 6994633357 iwlwifi: remove cck_flag from iwl_driver_hw_info
This patch remove cck_flag from iwl_driver_hw_info, this flag
is unused after spliting the iwl-base.c

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:11 -08:00
Tomas Winkler f1f1f5c730 iwlwifi: add TGN flag to qos parameters
This patch adds TGN flag to QoS parameters. This flag governs enablement of
NAV shortening with CF-End and filters in 4 or 8K RX AMSDU packets

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:10 -08:00
Tomas Winkler dc2453ae81 iwlwifi: rs-4965 fix return values
This patch cleans up style of 'return' of rate scale 4965 functions.
It renames return name variables rc to ret, change functions to void if no
meaningful value was returned it add return of -EINVAL for checks of wrong
arguments.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:09 -08:00
Tomas Winkler fc4b6853fb iwlwifi: renaming last_used and first_empty
This patch renames queue pointers to write_ptr and read_ptr
instead of  first_empty and last_used. This is closer to technical
terminology we everyday use

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:08 -08:00
Ian Schram 91e1747384 iwlwifi: rename iwl_eeprom_aqcuire_semaphore to _acquire_
Correct the spelling of aqcuire.

Signed-off-by: Ian Schram <ischram@telenet.be>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:07 -08:00
Ian Schram 01ebd063e1 iwlwifi: fix various spelling and typos
Fixing various spelling errors and typos. Mostly in comments. In total
27 words were corrected, some of which occurred more than ones.

Signed-Of-By: Ian Schram <ischram@telenet.be>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:06 -08:00
Tomas Winkler 220173b012 iwlwifi: Add erp_ie_changed hanlder
This patch adds erp_ie_changed handler to iwl4956

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:03:05 -08:00
Ivo van Doorn a3c7aa58df rt2x00: Release rt2x00 2.0.12
Version bump.

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>
2008-01-28 15:03:05 -08:00
Mattias Nissler 2700f8b048 rt2x00: Correctly set ACK bit in tx descriptors
Add a flag to struct txdata_entry_desc that specifies whether an ack for the
frame is to be expected. Use this flag to set the ACK bit in the tx descriptor.
Previously, the ACK bit could be set incorrectly on CTS-to-self frames, so they
caused retries and were reported to be failed in the txdone handlers.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
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>
2008-01-28 15:03:04 -08:00
Adam Baker 3d82346c5d rt2x00: Place mutex around USB register access
There is a buffer, csr_cache which is used to hold copies of data being passed
to the USB stack which can get corrupted if multiple threads attempt to access
CSR registers simultaneously. There is also the possibility if multiple
threads try to access BBP or RF registers for the multiple USB operations
needed to get interleaved leading to incorrect results. This patch introduces
a mutex to prevent such simultaneous access. The interleaved access problem
may also affect the PCI devices but if so that will be handled in a follow-up
patch.

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:03:03 -08:00
Ivo van Doorn 4bd7c452a4 rt2x00: Remove data_desc structure
Coverty indicated that data_desc with a single
element array is bad coding style. This removes
the structure and forces everybody to use __le32.

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>
2008-01-28 15:03:03 -08:00
Mattias Nissler 2676c94d4e rt2x00: Rework rt73 antenna selection
This patch changes rt73 antenna selection to what I believe is the correct way.
It also fixes a small selection bug that switched the antennas by accident.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
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>
2008-01-28 15:03:01 -08:00
Ivo van Doorn 50794638dc rt2x00: Remove unused variables
With the updated antenna setup the following
variables are no longer used.

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>
2008-01-28 15:03:01 -08:00
Mattias Nissler acaa410d06 rt2x00: Rework rt61 antenna selection.
This patch changes rt61 antenna selection again. It helps at least with the
rt61 pci card in my box, I hope I haven't broken behaviour on other RF chips.
RF 2529 antenna setup is incomplete, we need to at code for diversity when we
figure out how it is done properly.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
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>
2008-01-28 15:03:00 -08:00
Adam Baker 0e14f6d3e0 rt2x00: Unconstify rt2x00dev
Some register accesses need rt2x00dev to be non-const
they all need modifying so the prototype is consistent.

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:02:59 -08:00
Ivo van Doorn d9890b8f45 rt2x00: Detect initial rfkill state on register
When registering rfkill, make sure a initial
poll event is directly executed to detect the initial
rfkill state and send the event to the rfkill layer.

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>
2008-01-28 15:02:58 -08:00
Ivo van Doorn 4300beb47d rt2x00: Input-polldev requires input device
input-polldev requires a correctly allocated
and initialized input device to be set for the
input_polled_dev->input field.
Failure to do that will prevent correct polling
of the device.

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>
2008-01-28 15:02:58 -08:00
Ivo van Doorn e4cd2ff89f rt2x00: Split rt61/rt73 antenna selection into RX and TX antenna
Based on investigation of the legacy drivers, I have made the
following assumptions of the antenna setup:
 - R77 is the TX antenna configuration
 - RF2529 fetches default antenna selection from NIC eeprom word

With these assumptions we can change the antenna configuration
to correctly read both antenna setup values and correctly
configure the antenna. And we can now also configure the antenna
for RF2529 without a double antenna.

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>
2008-01-28 15:02:57 -08:00
Ivo van Doorn e25c4bb913 rt2x00: Disable RX when switching antenna
Antenna switching will be ignored when RX is enabled
during the switch. Make sure we disable the RX during
the switch and don't forget to reenable it later.

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>
2008-01-28 15:02:56 -08:00
Ivo van Doorn 2d68de3efa [PATCH] rt2x00: Release rt2x00 2.0.11
Version bump.

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>
2008-01-28 15:02:55 -08:00
Mattias Nissler 16b1951f53 [PATCH] rt2x00: Fix antenna selection.
In the config() handler, make sure that we do configure an antenna if the
current active antenna is uninitialized. Furthermore, don't overwrite the
active antenna with bogus values if we didn't touch the antenna setup.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
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>
2008-01-28 15:02:54 -08:00
Ivo van Doorn ddc827f93a [PATCH] rt2x00: Cleanup if-statements
Cleanup if-statements for simple 1/0 register field values.

This also fixes a endian bug in rt2500usb when working
with the PHY_CSR2 initialization. As well as a bug
in the enabling of the LED in rt73usb.

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>
2008-01-28 15:02:54 -08:00
Ivo van Doorn 69f81a2cac [PATCH] rt2x00: Implement SW diversity
When mac80211 indicates that the default antenna setup
should be used _and_ that this default setup is SW_DIVERSITY.

This requires sampling and storing the RSSI per antenna
and check once every 2 seconds to determine if the RSSI
has changed significantly. Once this is the case we should sample
the other antenna for a short period and evaluate if
we need to swap antenna or not.

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>
2008-01-28 15:02:53 -08:00
Ivo van Doorn 8de8c5162b [PATCH] rt2x00: Remove rt2x00_clear_link
rt2x00_clear_link() was becoming too large for statically inline,
also it was used on a single location and shouldn't really be
used anywhere else. So move the entire code into the function
rt2x00lib_start_link_tuner()

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>
2008-01-28 15:02:52 -08:00
Ivo van Doorn 39e75857d0 [PATCH] rt2x00: SW diversity should default to antenna B
Although ANTENNA_SW_DIVERSITY should never be send
to the driver, we should still handle it to prevent bugs.
But instead of defaulting to ANTENNA_HW_DIVERSITY we
should default to ANTENNA_B instead.

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>
2008-01-28 15:02:52 -08:00
Ivo van Doorn addc81bd42 [PATCH] rt2x00: Correctly translate mac80211 antenna setup to rt2x00
mac80211 has 3 values for the antenna setup:
 0 - default
 1 - use antenna 1
 2 - use antenna 2

This means that rt2x00 should store the default value
from the EEPROM somwhere and use that when mac80211 indicates
that the antenna setup is 0.
This also implies that rt2x00 should no longer write the
hw->config.antenna_sel_* values based on the EEPROM input.

This also adds the basis in rt2x00lib for correct software
diversity handling. By default rt2x00lib will now configure
antenna B instead of hardware diversity.

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>
2008-01-28 15:02:51 -08:00
Ivo van Doorn 362f3b6bfb [PATCH] rt2x00: Use enum defines
When setting the default EEPROM values use
the values from the enums instead of "magic" values.

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>
2008-01-28 15:02:50 -08:00
Ivo van Doorn ebcf26dae9 [PATCH] rt2x00: Move quality statistics into seperate structure
Move all link quality statistics variables into
the link_qual structure. This cleans up the link
structure and allows us to use it for more then
just statistics.

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>
2008-01-28 15:02:49 -08:00
Adrian Bunk f1862b0ae2 [SHAPER]: The scheduled shaper removal.
This patch contains the scheduled removal of the shaper driver.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:00:29 -08:00
David S. Miller 15ca36fb99 [LIBERTAS]: Remove last stray user of MAC_FMT.
Reported by Denis V. Lunev

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:00:08 -08:00
Matt Carlson 255f97b311 [TG3]: Update version to 3.87
This patch updates the version number to 3.87.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:35 -08:00
Matt Carlson ef167e2703 [TG3]: Fix supporting flowctrl code
This patch does three things.  It modifies tg3_setup_flow_control() to
use the administrator requested flow control settings if
autonegotiation is turned off.  It slightly modifies the
tg3_setup_fiber_mii_phy() function to account for this new use case.
And finally, it does the same for tg3_setup_copper_phy().

The copper modifications are more than a small multi-line change.  The
new code makes an attempt to avoid a link renegotiation if the link is
active at half duplex and the only difference between the current
advertised settings and requested advertised settings is the
flow control advertisements.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:34 -08:00
Matt Carlson 5be73b471b [TG3]: Correct sw autoneg flow control advertisements
This patch modifies the software autoneg code to use the administrator
specified flow control parameters.  Since the autonegotiation code uses
alternative flow control enumerations, the 1000-BaseX utility functions
are used and code was added to convert the definitions to and from the
alternate enumerations.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:34 -08:00
Matt Carlson 82cd3d11f3 [TG3]: Correct 5704S flowctrl advertisements
This patch modifies the 5704S hardware autoneg code to use the
administrator specified flow control parameters.  Since the 5704S uses
device specific flow control enumerations, the 1000-BaseX utility
functions are used and code was added to convert the definitions to and
from the proprietary enumerations.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:33 -08:00
Matt Carlson c98f6e3be1 [TG3]: Replace some magic 5704S constants
This patch replaces magic values with preprocessor definitions for
the sg_dig_ctrl and sg_dig_status registers.  This is preparatory work
for the next patch.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:32 -08:00
Matt Carlson ba4d07a848 [TG3]: Add 1000T & 1000X flowctl adv helpers
This patch adds two functions designed to convert abstract TX & RX
flow control parameters to 1000-BaseT and 1000-BaseX autonegotiation
advertisements.  Code that uses standard definitions which statically
advertises TX & RX flow control has been replaced with code that
configures the advertisements based on administrator dictated
preferences.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:31 -08:00
Matt Carlson 95937268b7 [TG3]: Add 1000T & 1000X flowctrl resolvers
This patch adds two new utility functions to resolve flow control.  One
function resolves flow control based on 1000-BaseT register definitions.
The other resolves flow control based on 1000-Base X register
definitions.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:30 -08:00
Matt Carlson 8d01862108 [TG3]: Separate requested and actual flow control parameters
This patch removes the TX and RX flow control flags from tg3_flags and
adds two new flow control variables, flowctrl and active_flowctrl.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:29 -08:00
Mattias Nissler 1abbe498e4 mac80211: clean up rate selection
Move some code out of rc80211_simple since it's probably needed for all rate
selection algorithms, and fix iwlwifi accordingly. While at it, clean up the
rate_control_get_rate() interface.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:17 -08:00
Joe Perches 2caf62f6ca [NIU]: Use print_mac
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:15 -08:00
Joe Perches d664537228 [TG3]: Use print_mac
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:14 -08:00
Joe Perches 137919a9ba [SUNVNET]: Use print_mac
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:59:13 -08:00
Johannes Berg 03bffc1341 wireless: make drivers include the TSF RX flag where appropriate
These drivers pass full mactime information to the stack, make them
indicate this via the new RX_FLAG_TSFT to get mac80211 to show this
information in monitor mode.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:58:26 -08:00
Dan Williams 374fdfbc67 introduce WEXT scan capabilities
Introduce scan capabilities to WEXT so that userspace can do intelligent
things with scan behavior such as handling hidden SSIDs more gracefully.
If the driver reports a specific scan capability, the driver must
respect the options specified in the iw_scan_req structure when handling
the SIOCSIWSCAN call, unless it's mode or state does not allow it to do
so, in which case it must return an error.

This version switches to Dave Kilroy's suggestion of claiming unused
padding space for the scan_capa field.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:58:25 -08:00
Matthias Kaehlcke 5e41fb8321 [PPP] synchronous tty: convert dead_sem to completion
PPP synchronous tty channel driver: convert the semaphore dead_sem to a
completion

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:58:07 -08:00
Michael Chan 2ba582b782 [BNX2]: Fix compiler warning.
Change bnx2_init_napi() to void.

Warning was noted by DaveM.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:40 -08:00
Michael Chan f13561cb2f [BNX2]: Update version to 1.7.1.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:40 -08:00
Michael Chan 57851d8453 [BNX2]: Enable new tx ring.
Enable new tx ring and add new MSIX handler and NAPI poll function
for the new tx ring.  Enable MSIX when the hardware supports it.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:39 -08:00
Michael Chan c76c04758b [BNX2]: Add support for a new tx ring.
To separate TX IRQs into a different MSIX vector, we need to
support a new tx ring.  The original tx ring will still be used
when not using MSIX.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:38 -08:00
Michael Chan b4b360420d [BNX2]: Support multiple MSIX IRQs.
Change bnx2_napi struct into an array and add code to manage multiple
IRQs.  MSIX hardware structures and new registers are also added.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:37 -08:00
Michael Chan a1f6019090 [BNX2]: Move rx indexes into bnx2_napi struct.
Rx related fields used in NAPI polling are moved from the main
bnx2 struct to the bnx2_napi struct.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:37 -08:00
Michael Chan a550c99bc3 [BNX2]: Move tx indexes into bnx2_napi struct.
Tx related fields used in NAPI polling are moved from the main
bnx2 struct to the bnx2_napi struct.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:36 -08:00
Michael Chan 35efa7c1f4 [BNX2]: Introduce new bnx2_napi structure.
Introduce a bnx2_napi structure that will hold a napi_struct and
other fields to handle NAPI polling for the napi_struct.  Various tx
and rx indexes and status block pointers will be moved from the main
bnx2 structure to this bnx2_napi structure.

Most NAPI path functions are modified to be passed this bnx2_napi
struct pointer.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:35 -08:00
Michael Chan 6d866ffc69 [BNX2]: Restructure IRQ datastructures.
Add a table to keep track of multiple IRQs and restructure the IRQ
request and free functions so that they can be easily expanded to
handle multiple IRQs.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:34 -08:00
Michael Chan ead7270b99 [BNX2]: Add function to fetch hardware tx index.
This makes the code cleaner and easier to support different tx rings.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:33 -08:00
Michael Chan a0d142c628 [BNX2]: Update version to 1.6.9.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:33 -08:00
Michael Chan 84eaa18771 [BNX2]: Enable S/G for jumbo RX.
If the MTU requires more than 1 page for the SKB, enable the page ring
and calculate the size of the page ring.  This will guarantee order-0
allocation regardless of the MTU size.

Fixup loopback test packet size so that we don't deal with the pages
during loopback test.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:32 -08:00
Michael Chan 1db82f2aec [BNX2]: Add fast path code to handle RX pages.
Add function to reuse a page in case of allocation or other errors.
Add code to construct the completed SKB with the additional data in
the pages.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:31 -08:00
Michael Chan 47bf4246a3 [BNX2]: Add init. code to handle RX pages.
Add new fields to keep track of the pages and the page rings.
Add functions to allocate and free pages.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:30 -08:00
Michael Chan 110d0ef990 [BNX2]: Update firmware to support S/G RX buffers.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:30 -08:00
Michael Chan 5d5d001504 [BNX2]: Restructure RX ring init. code.
Factor out the common functions that will be used to initialize the
normal RX rings and the page rings.

Change the copybreak constant RX_COPY_THRESH to 128.  This same
constant will be used for the max. size of the linear SKB when pages
are used.  Copybreak will be turned off when pages are used.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:29 -08:00
Michael Chan 85833c6269 [BNX2]: Restructure RX fast path handling.
Add a new function to handle new SKB allocation and to prepare the
completed SKB.  This makes it easier to add support for non-linear
SKB.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:28 -08:00
Michael Chan e343d55c0a [BNX2]: Add ring constants.
Define the various ring constants to make the code cleaner.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:27 -08:00
Andrew Morton f5f97b57b5 [NET]: fix drivers/net/ns83820.c build
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:26 -08:00
Pavel Emelyanov 6a7657f562 [NET]: Remove unused define from loopback driver.
The LOOPBACK_OVERHEAD is not used in this file at all.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:25 -08:00
Harvey Harrison 41380930d2 [NET]: Remove FASTCALL macro
X86_32 was the last user of the FASTCALL macro, now that it
uses regparm(3) by default, this macro expands to nothing.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:23 -08:00
John W. Linville 003faaa177 bcm43xx: mark as obsolete and schedule for removal
Schedule bcm43xx for for removal in the 2.6.26 development window.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:55:35 -08:00
Akinobu Mita 52427c9d11 [TUN]: Use iov_length()
Use iov_length() instead of tun's homemade iov_total().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:54:34 -08:00
Patrick McHardy ad5d20a639 [MACVLAN]: Allow setting mac address while device is up
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:54:23 -08:00
Patrick McHardy 59891d53f4 [MACVLAN]: Remove unnecessary IFF_UP check
Only devices that are UP are in the hash, so macvlan_broadcast() doesn't
need to check for IFF_UP.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:54:23 -08:00
Stephen Hemminger 0953864160 [NETPOLL]: no need to store local_mac
The local_mac is managed by the network device, no need to keep a
spare copy and all the management problems that could cause.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:54:17 -08:00
Oliver Hartkopp ccb2963799 [CAN]: Add virtual CAN netdevice driver
This patch adds the virtual CAN bus (vcan) network driver.
The vcan device is just a loopback device for CAN frames, no
real CAN hardware is involved.

Signed-off-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
Signed-off-by: Urs Thuermann <urs.thuermann@volkswagen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:54:12 -08:00
Russell King 0ff66f0c7a Merge branch 'pxa-plat' into devel
* pxa-plat: (53 commits)
  [ARM] 4762/1: Basic support for Toradex Colibri module
  [ARM] pxa: fix mci_init functions returning -1
  [ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix
  [ARM] 4747/1: pcm027: support for pcm990 baseboard for phyCORE-PXA270
  [ARM] 4746/1: pcm027: network support for phyCORE-PXA270
  [ARM] 4745/1: pcm027: default configuration
  [ARM] 4744/1: pcm027: add support for phyCORE-PXA270 CPU module
  [NET] smc91x: Make smc91x use IRQ resource trigger flags
  [ARM] pxa: add default config for littleton
  [ARM] pxa: add basic support for Littleton (PXA3xx Form Factor Platform)
  [ARM] 4664/1: Add basic support for HTC Magician PDA phones
  [ARM] 4649/1: Base support for pxa-based Toshiba e-series PDAs.
  [ARM] pxa: skip registers saving/restoring if entering standby mode
  [ARM] pxa: fix PXA27x resume
  [ARM] pxa: Avoid fiddling with CKEN register on suspend
  [ARM] pxa: Add PXA3 standby code hooked into the IRQ wake scheme
  [ARM] pxa: Add zylonite MFP wakeup configurations
  [ARM] pxa: program MFPs for low power mode when suspending
  [ARM] pxa: make MFP configuration processor independent
  [ARM] pxa: remove un-used pxa3xx_mfp_set_xxx() functions
  ...

Conflicts:

	arch/arm/mach-pxa/ssp.c

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:21:38 +00:00
Daniel Mack 4e4fc05a2b [ARM] 4762/1: Basic support for Toradex Colibri module
This patch adds support for Toradex' PXA27x based Colibri module.
It's kept as simple as possible to only provide basic functionality.
A default config is also included.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:27 +00:00
Robert Schwebel 4f15a98025 [ARM] 4746/1: pcm027: network support for phyCORE-PXA270
This patch adds SMC91x support for the phyCORE-PXA270 CPU module (aka PCM-027).

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:13:23 +00:00
Russell King e7b3dc7ef1 [NET] smc91x: Make smc91x use IRQ resource trigger flags
smc91x is shared between many different platforms.  Each platform needs
to specify the interrupt type, and in some cases the irq type depends
on more than just the build configuration - it depends on runtime
checks.

Rather than throwing this code into the SMC_IRQ_FLAGS definition, provide
a way for these flags to be passed via the IRQ resource itself.

Note that IRQF_TRIGGER_* constants are intentionally defined to correspond
with the IORESOURCE_IRQ_* interrupt type flags, in much the same way that
the low bits of PCI iomem resources correspond with the BAR flag bits.

Also provide a way to configure smc91x to read the IRQ flags from the
resource.  Once all platforms have been converted over (signified
by all definitions of SMC_IRQ_FLAGS being -1) SMC_IRQ_FLAGS should
be removed.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Nicolas Pitre <nico@cam.org>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28 13:13:19 +00:00
Andrew Victor 2b3b3516b6 [ARM] 4764/1: [AT91] AT91CAP9 core support
Add support for Atmel's AT91CAP9 Customizable Microcontroller family.
  <http://www.atmel.com/products/AT91CAP/Default.asp>

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26 15:01:13 +00:00
Jack Morgenstein 5920869f1e mlx4_core: Fix max_eqs masking in QUERY_DEV_CAP
log_max_eqs is a 4-bit field, not a 3-bit field in the response to the
QUERY_DEV_CAP FW command, so we should mask with 0xf instead of 0x7
when reading it.

Found by Yossi Leybovitch of Mellanox.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25 14:15:29 -08:00
Greg Kroah-Hartman c10997f657 Kobject: convert drivers/* from kobject_unregister() to kobject_put()
There is no need for kobject_unregister() anymore, thanks to Kay's
kobject cleanup changes, so replace all instances of it with
kobject_put().


Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:40 -08:00
Greg Kroah-Hartman f9cb074bff Kobject: rename kobject_init_ng() to kobject_init()
Now that the old kobject_init() function is gone, rename
kobject_init_ng() to kobject_init() to clean up the namespace.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:38 -08:00
Greg Kroah-Hartman b2d6db5878 Kobject: rename kobject_add_ng() to kobject_add()
Now that the old kobject_add() function is gone, rename kobject_add_ng()
to kobject_add() to clean up the namespace.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:38 -08:00
Greg Kroah-Hartman cbe9c595f1 Driver: add driver_add_kobj for looney iseries_veth driver
The iseries driver wants to hang kobjects off of its driver, so, to
preserve backwards compatibility, we need to add a call to the driver
core to allow future changes to work properly.

Hopefully no one uses this function in the future and the iseries_veth
driver authors come to their senses so I can remove this hack...

Cc: Dave Larson <larson1@us.ibm.com>
Cc: Santiago Leon <santil@us.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:34 -08:00
Greg Kroah-Hartman 78be3d2f57 Kobject: convert drivers/net/iseries_veth.c to use kobject_init/add_ng()
This converts the code to use the new kobject functions, cleaning up the
logic in doing so.

Cc: Kyle A. Lucke <klucke@us.ibm.com>
Cc: David Gibson <dwg@au1.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:30 -08:00
Greg Kroah-Hartman 8dde2a96c1 Kobject: change drivers/net/ibmveth.c to use kobject_init_and_add
Stop using kobject_register, as this way we can control the sending of
the uevent properly, after everything is properly initialized.

Cc: Dave Larson <larson1@us.ibm.com>
Cc: Santiago Leon <santil@us.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:29 -08:00
Tony Jones 02ff82cac7 cosa: Convert from class_device to device for cosa sync driver
struct class_device is going away, this converts the code to use struct
device instead.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:07 -08:00
Francois Romieu b334349eb4 sis190: scheduling while atomic error
sis190_tx_timeout
-> sis190_hw_start
   -> sis190_soft_reset
      -> msleep *splat*

PCI transactions are correctly flushed here.
The msleep() is probably useless.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: K.M. Liu <kmliu@sis.com.tw>
2008-01-23 03:11:45 -08:00