Commit Graph

11153 Commits (1757ab2f0411110c0261dfb66d26faf63037c531)

Author SHA1 Message Date
Steve Glendinning 1757ab2f04 smsc911x: make smsc911x_poll_controller static
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 22:31:16 -08:00
David S. Miller 56bde88590 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2008-12-12 22:20:51 -08:00
Ben Hutchings a7a81fc060 sfc: Version 2.3
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 22:10:23 -08:00
Ben Hutchings 7dde596ef7 sfc: Fix synchronisation of efx_mtd_{probe,rename,remove}
Currently efx_mtd_rename() can race with the probe() and remove()
functions.

Move probe() before device registration and remove() after
unregistration.  Move initialisation/update of all names based on the
netdev name into a new function and call it under the RTNL immediately
after registration.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 22:09:38 -08:00
Ben Hutchings 0c53d8c840 sfc: Use kzalloc() to ensure struct efx_spi_device is fully initialised
Currently the mtd field is not initialised early enough.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 22:08:50 -08:00
Steve Hodgson fa402b2ea9 sfc: Treat probe as unsuccessful if it scheduled a reset
From: Steve Hodgson <shodgson@solarflare.com>

efx_pci_probe_main() can return success despite a reset being scheduled.
Catch this and retry or abort probe depending on the reset type.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 22:08:16 -08:00
Ben Hutchings ab37735870 sfc: Use model numbers for PHY type names
Some of the PHY type names are overly generic.  Change them to include
the model numbers of the PHYs they represent.

Correct the model number reference at the top of xfp_phy.c.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 22:06:54 -08:00
Ben Hutchings ca54a9f525 sfc: Use mutex_lock_interruptible() for ethtool EEPROM access
ethtool must contend with the MTD driver for the SPI bus lock, which
may carry out long operations such as flash erase.  Allow it to be
interrupted while waiting.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 22:06:24 -08:00
Ben Hutchings 11e6696627 sfc: Specify a meaningful component for loopback RX-side and PHY tests
Our ethtool self-test result names each begin with a component name.  For
some results this is "port0", which is not very meaningful.  Change that
to "rx" or "phy" as appropriate.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 22:05:48 -08:00
Ben Hutchings b453193821 sfc: Remove leading spaces
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 22:05:01 -08:00
Ben Hutchings 6f158d5f29 sfc: Add support for SFN4111T
Add support code for the SFN4111T 100/1000/10GBASE-T reference design,
based in part on the existing code for the SFE4001.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 22:00:49 -08:00
Ben Hutchings e6fa2eb789 sfc: Add support for Solarflare 10Xpress SFT9001
Add type codes for the new PHY and rename the SFX7101 type code.

Add definition of clause 22 extension MMD.

Adapt the 10Xpress SFX7101 code to support the SFT9001 as well.
Clean up register definitions.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 22:00:17 -08:00
Ben Hutchings 766ca0fa6b sfc: Rework MAC, PHY and board event handling
From: Steve Hodgson <shodgson@solarflare.com>

MAC, PHY and board events may be separately enabled and signalled.
Our current arrangement of chaining the polling functions can result
in events being missed.  Change them to be more independent.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:59:24 -08:00
Ben Hutchings 04cc8cacb0 sfc: Implement auto-negotiation
Add infrastructure for auto-negotiation of speed, duplex and flow
control.

When using 10Xpress, auto-negotiate flow control.  While we're
at it, clean up the code to warn when partner is not 10GBASE-T
capable.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:58:17 -08:00
Ben Hutchings 177dfcd80f sfc: Add support for sub-10G speeds
The SFC4000 has a separate MAC for use at sub-10G speeds.  Introduce
an efx_mac_operations structure with implementations for the two MACs.
Switch between the MACs as necessary.

PHY settings are independent of the MAC, so add get_settings() and
set_settings() to efx_phy_operations.  Also add macs field to indicate
which MACs the PHY is connected to.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:58:17 -08:00
Ben Hutchings 356eebb2b3 sfc: Clean up MDIO flag setting
We often want to set or clear a flag in an MDIO register, but avoid
writing if no change is required since this can have side-effects.
Encapsulate this in a function, mdio_clause45_set_flag().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:58:16 -08:00
Ben Hutchings 04300d248b sfc: Clean up board identification
Remove kluge for development boards with unspecified board type.

Remove assumption of contiguous board type code assignments.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:58:00 -08:00
Ben Hutchings 06d5e19318 sfc: Add phy_type device attribute
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:57:59 -08:00
Ben Hutchings 27dd2caca4 sfc: Add support for MMDs numbered >15
Combine DEVS0 and DEVS1 registers into a 32-bit mask instead of
reading just DEVS0.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:57:58 -08:00
Ben Hutchings f31a45d2f4 sfc: Remove MII extension cruft
Replace efx_nic::link_options bitfield with link_speed (speed in
Mbit/s) and link_fd (full duplex flag).

Remove broken auto-negotiation functions.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:57:57 -08:00
Ben Hutchings 5005087728 sfc: Don't count RX checksum errors during loopback self-test
The loopback self-test checks that IP packets with incorrect checksums
are not altered when sent on a queue with checksum generation off.
These should not contribute to RX error statistics.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:57:56 -08:00
Ben Hutchings 740ced9927 sfc: Abbreviate self-test names so they are not truncated
Change "channel" to "chan".

Shorten PHY loopback names.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:57:56 -08:00
Ben Hutchings 56536e9ce7 sfc: Provide hints to irqbalance daemon
Allocate IRQs with the name format <device>[-<type>]-<number> so that
future versions of irqbalanced understand what we're doing.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:57:45 -08:00
Neil Turton 28b581ab0a sfc: Add option to use a separate channel for TX completions
In a bidirectional forwarding test, we find that the best performance
is achieved by sending the TX completion interrupts from one NIC to a
CPU which shares an L2 cache with RX completion interrupts from the
other NIC.  To facilitate this, add an option (through a module
parameter) to create separate channels for RX and TX completion with
separate IRQs when MSI-X is available.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:57:44 -08:00
Ben Hutchings 84ae48fe4c sfc: Restore phy_flash_cfg module parameter
This is needed for recovery in case a PHY firmware upgrade is aborted.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:57:44 -08:00
Ben Hutchings 2f7f573095 sfc: Work around unreliable strap pins
The SFC4000 has strap pins indicating the presence of SPI flash and/or
EEPROM.  These pins are also used for GPIO, and in some cases they may
be read wrongly at reset.  However, on production boards it must boot
from one or the other device, so we can assume the boot device is
present and read the board config from there.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:57:43 -08:00
Ben Hutchings be4ea89c8d sfc: Clean up waits for flash/EEPROM operations
Make falcon_spi_wait() ignore the write timer - it is only relevant to
write commands, it only works for the device that contains VPD, and it
might not be initialised properly at all.

Rename falcon_spi_fast_wait() to falcon_spi_wait_write(), reflecting
its use, and make it wait up to 10 ms (not 1 ms) since buffered writes
to EEPROM may take this long to complete.

Make both wait functions sleep instead of busy-waiting.

Replace wait for command completion at top of falcon_spi_cmd() with a
single poll; no command should be running when the function starts.

Correct some comments.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:57:35 -08:00
Steve Hodgson 1ab00629f0 sfc: Make reset_workqueue driver-global rather than per-NIC
Each reset is serialised by the rtnl_lock anyway, so there's no win
per-NIC.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:56:21 -08:00
Ben Hutchings 65f667fb47 sfc: Correct interpretation of second param to ethtool phys_id()
A value of 0 means indefinite repetition (until interrupted).

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:56:20 -08:00
Ben Hutchings 2b2734dcbf sfc: Remove unneeded register write
This was only ever needed for an FPGA version of Falcon.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:56:19 -08:00
Ben Hutchings 23d30f027d sfc: Change SPI lengths to type size_t
Based on a patch by Andrew Morton.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:56:11 -08:00
Ben Hutchings a17102b1ba sfc: Board support fixes
Set dummy monitor method for unrecognised boards.

Clean up board resources if efx_pci_probe_main() fails after board has
been initialised.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12 21:28:20 -08:00
Tomas Winkler a7b75207bd iwlwifi: add contact email to MODULE_AUTHOR
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:45:43 -05:00
Tomas Winkler 2aa6ab86bc iwlwifi: remove 4965 from common uCode API structures
This patch removes 4965 from common uCode API structures. Also updates
iwlagn commands with 3945 specific RX command in preparation for 3945 port.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:45:41 -05:00
Tomas Winkler b5047f7866 iwlwifi: remove includes of iwl-helpers.h where not needed
This patch removes includes of iwl-helpers.h where not needed

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:45:39 -05:00
Tomas Winkler 29d51d9df5 iwlwifi: remove unused clip_groups priv member
Remove clip_groups from priv and related structure.
This code is for 3945 only and was renamed to 4965 in
when code was split.
Also remove unused RATE definitions

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:45:37 -05:00
Mohamed Abbas edb342286e iwlwifi: fix resume while txpower off
This patch take care of coming out rfkill when the driver is up while
rfkill is on by restarting interface.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:45:35 -05:00
Zhu, Yi 3d5717ade0 iwlwifi: use iwl_poll_direct_bit in EEPROM reading
The patch replaces the current reading EEPROM loop iterations with
iwl_poll_direct_bit(). It also fixes some comment error.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:45:33 -05:00
Jouni Malinen 9c5f89b3f6 ath9k: Do not remove header padding on RX from short frames
The 802.11 header is only padded to 32-bit boundary when the frame has
a non-zero length payload. In other words, control frames (e.g., ACK)
do not have a padding and we should not try to remove it. This fixes
monitor mode for short control frames. In addition, the hdrlen&3 use
is described in more detail to make it easier to understand how the
padding length is calculated.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:45:31 -05:00
Rami Rosen f2f1ba253d iwlwifi: fix build warning (iwl-rx.c)
This patch fixes the following build warning when CONFIG_IWLWIFI_DEBUG
is not set.

/work/src/wireless-testing/drivers/net/wireless/iwlwifi/iwl-rx.c:758:
warning: 'iwl_dbg_report_frame' defined but not used

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:45:29 -05:00
Anna Neal 6fb532527e libertas: Create sysfs entry for changing the mesh probe response limit
This patch adds the ability to change the number of probe response retries sent
by the mesh interface.

In dense networks it is recommended to change this value to zero to reduce
traffic congestion.

Signed-off-by: Anna Neal <anna@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:45:13 -05:00
Sujith b77f483fcf ath9k: Refactor struct ath_softc
Split ath_softc into smaller structures for rx, tx and beacon
handling.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:02:17 -05:00
Christian Lamparter 59651e8918 p54: fix oops on faulty devices
This patch fixes an oops when the devices suddenly starts
to receive martian data frames.

bug reference:
http://marc.info/?l=linux-wireless&m=122872280317635&w=2

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:02:15 -05:00
Jouni Malinen b7a530d82c mac80211: Disable requests for new scans in AP mode
AP mode operations are seriously affected if mac80211 runs through a
multi-second scan while the AP is trying to send Beacon frames on the
operation channel. While this could be implemented in a way that does
not cause too many problems, it is not very simple and will require
synchronization with Beacon frame scheduling in the drivers (scan one
channel at a time between Beacon frames). Furthermore, such scanning
takes quite a bit longer time and existing userspace applications
would be likely to timeout while waiting for the results.

For now, just refuse requests for new scans (SIOCSIWSCAN) when in AP
mode. In practice, this moves the rejection from iwl* drivers into
mac80211 to make it apply to every mac80211-based driver.

This issue shows up in associated stations getting disconnected when
something (e.g., Network Manager) requests a scan while the interface
is in AP mode. When doing this continuously (e.g., NM does it every 120
seconds), the network gets close to useless.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:02:12 -05:00
Helmut Schaa 14a4dfe2ff ipw2200: fix scanning while associated
This patch fixes sporadic firmware restarts when scanning while associated.

The firmware will quietly cancel a scan (while associated) if the dwell time
for a channel to be scanned is larger than the time it may stay away from the
operating channel (because of DTIM catching). Unfortunately the driver is not
notified about the canceled scan and therefore the scan watchdog timeout will
be hit and the driver causes a firmware restart which results in
disassociation. This mainly happens on passive channels which use a dwell time
of 120 whereas a typical beacon interval is around 100.

The patch changes the dwell time for passive channels to be slightly smaller
than the actual beacon interval to work around the firmware issue. Furthermore
the number of allowed beacon misses is increased from one to three as otherwise
most scans (while associated) won't complete successfully.

However scanning while associated will still fail in corner cases such as a
beacon intervals below 30.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:02:10 -05:00
Larry Finger d8004cb926 b43legacy: Fix sparse warnings
Sparse yields the following warnings for b43legacy:

  CHECK   drivers/net/wireless/b43legacy/phy.c
drivers/net/wireless/b43legacy/phy.c:1304:31: warning: potentially expensive pointer subtraction
drivers/net/wireless/b43legacy/phy.c:1304:31: warning: potentially expensive pointer subtraction
drivers/net/wireless/b43legacy/phy.c:1304:31: warning: potentially expensive pointer subtraction
  CHECK   drivers/net/wireless/b43legacy/debugfs.c
drivers/net/wireless/b43legacy/debugfs.c:243:9: warning: memset with byte count of 131072

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:02:08 -05:00
Larry Finger c1db52b9d2 rtl8187: Use usb anchor facilities to manage urbs
When SLUB debugging is enabled in the kernel, and the boot command includes
the option "slub_debug=P", rtl8187 encounters a GPF due to a read-after-free
of a urb.

Following the example of changes in p54usb to fix the same problem, the code
has been modified to use the usb_anchor_urb() method. With this change, the
USB core handles the freeing of urb's.

This patch fixes the problem reported in Kernel Bugzilla #12185
(http://bugzilla.kernel.org/show_bug.cgi?id=12185).

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:02:06 -05:00
Bob Copeland 388cdf31db ath5k: fix endianness of bitwise ops when installing mic
Fix these bugs found by sparse:

    ath5k/pcu.c:1102:21: warning: restricted __le32 degrades to integer
    ath5k/pcu.c:1102:13: warning: incorrect type in assignment (different base types)
    ath5k/pcu.c:1102:13:    expected restricted __le32 <noident>
    ath5k/pcu.c:1102:13:    got unsigned int
    ath5k/pcu.c:1104:20: warning: restricted __le32 degrades to integer
    ath5k/pcu.c:1104:13: warning: incorrect type in assignment (different base types)
    ath5k/pcu.c:1104:13:    expected restricted __le32 <noident>
    ath5k/pcu.c:1104:13:    got unsigned int

Changes-licensed-under: ISC

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:02:04 -05:00
David Kilroy 62d714e5eb spectrum_cs: Fix function names used in debug strings
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:02:02 -05:00
David Kilroy 499b702a8d orinoco: Fix inappropriate use of IRQ_BAP
This hardware buffer should only be used from an interrupt. The
wireless event generation functions are called from a workqueue, so use
USER_BAP instead.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12 14:01:59 -05:00