Commit Graph

9888 Commits (953f551756a1275d9bfdbb70697323449305161a)

Author SHA1 Message Date
Michael Buesch 400828c3da b43: Add LP-PHY radio register definitions
This adds definitions for the LP-PHY radios.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-05 16:17:44 -04:00
Michael Buesch 0888707f1a b43: Add LP-PHY read/write phyops
This adds read/write phyops for the LP-PHY and LP-PHY radios.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-05 16:17:44 -04:00
Michael Buesch e63e436326 b43: Add LP-PHY template
This adds template code for the LP-PHY.
No actual functionality is implemented.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-05 16:17:43 -04:00
Michael Buesch 3d0da75164 b43: Move code from nphy.* to phy_n.*
Sourcecode files for PHY code are named by phy_XXX.{c,h}
where XXX is the PHY type.
Move the N-PHY code to match the other files.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-05 16:17:43 -04:00
Michael Buesch 99c4a78062 b43: Move remaining code from phy.c to phy_a.c
This moves the remaining code from phy.c to phy_a.c
phy.c is removed.
No functional change. Just moving code and removing dead code.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-05 16:17:42 -04:00
Luis R. Rodriguez f59ac04816 cfg80211: keep track of supported interface modes
It is obviously good for userspace to know up front which
interface modes a given piece of hardware might support (even
if adding such an interface might fail later because of
concurrency issues), so let's make cfg80211 aware of that.
For good measure, disallow adding interfaces in all other
modes so drivers don't forget to announce support for one mode
when they add it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Stephen Blackheath <tramp.enshrine.stephen@blacksapphire.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-05 16:17:42 -04:00
Nick Kossifidis c6e387a214 ath5k: HW code cleanup
* No code changes...

 * Split hw.c to multiple files for better maintenance and add some documentation on each file
   code is going to grow soon (eeprom.c for example is going to get much stuff currently developed
   on ath_info) so it's better this way.

 * Rename following functions to maintain naming scheme:

     ah_setup_xtx_desc -> ah_setup_mrr_tx_desc
     (Because xtx doesn't say much, it's actually
     a multi-rate-retry tx descriptor)

     ath5k_hw_put_tx/rx_buf - > ath5k_hw_set_tx/rxdp
     ath5k_hw_get_tx/rx_buf -> ath5k_hw_get_tx/rxdp
     (We don't put any "buf" we set descriptor pointers on hw)

     ath5k_hw_tx_start -> ath5k_hw_start_tx_dma
     ath5k_hw_start_rx -> ath5k_hw_start_rx_dma
     ath5k_hw_stop_pcu_recv -> ath5k_hw_stop_rx_pcu
     (It's easier this way to identify them, we also
     have ath5k_hw_start_rx_pcu which completes the
     set)

     ath5k_hw_set_intr -> ath5k_hw_set_imr
     (As in get_isr we set imr here, not "intr")

  * Move ath5k_hw_setup_rx_desc on ah->ah_setup_rx_desc so we can
    include support for different rx descriptors in the future

  * Further cleanups so that checkpatch doesn't complain
    (only some > 80 col warnings for eeprom.h and reg.h as usual
    due to comments)

  Tested on 5211 and 5213 cards and works ok.

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-05 16:15:24 -04:00
Michael Buesch fa9abe050d b43: Don't use memcpy for overlapping areas
It is valid to pass &gphy->rfatt and &gphy->bbatt as rfatt and bbatt
pointer arguments to the function. So we have to use memmove for the
possibly overlapping memory areas.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-05 16:15:24 -04:00
Linus Torvalds 316343e2cf Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  bnx2x: Accessing un-mapped page
  ath9k: Fix TX control flag use for no ACK and RTS/CTS
  ath9k: Fix TX status reporting
  iwlwifi: fix STATUS_EXIT_PENDING is not set on pci_remove
  iwlwifi: call apm stop on exit
  iwlwifi: fix Tx cmd memory allocation failure handling
  iwlwifi: fix rx_chain computation
  iwlwifi: fix station mimo power save values
  iwlwifi: remove false rxon if rx chain changes
  iwlwifi: fix hidden ssid discovery in passive channels
  iwlwifi: W/A for the TSF correction in IBSS
  netxen: Remove workaround for chipset quirk
  pcnet-cs, axnet_cs: add new IDs, remove dup ID with less info
  ixgbe: initialize interrupt throttle rate
  net/usb/pegasus: avoid hundreds of diagnostics
  tipc: Don't use structure names which easily globally conflict.
2008-09-03 16:21:02 -07:00
David S. Miller fca1287a3a Merge branch 'davem-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2008-09-03 14:43:30 -07:00
Eilon Greenstein 437cf2f1c5 bnx2x: Accessing un-mapped page
The allocated RX buffer size was 64 bytes bigger than the PCI mapped
size with no good reason. If the packet was actually using the buffer up
to its limit and if the last 64 bytes of the buffer crossed 4KB boundary
then an unmapped PCI page was accessed. The fix is to use only one
parameter for the buffer size - there is no need to differentiate
between the buffer size and the PCI mapping size since the extra 64
bytes can actually be used by the FW to align the Ethernet payload to
64 bytes.

Also updating the driver version and date

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 14:38:00 -07:00
Jouni Malinen 9aab3e3ee6 ath9k: Fix TX control flag use for no ACK and RTS/CTS
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-03 15:32:44 -04:00
Jouni Malinen 43f30ae0a6 ath9k: Fix TX status reporting
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-03 15:18:20 -04:00
Gregory Greenman 0b124c3183 iwlwifi: fix STATUS_EXIT_PENDING is not set on pci_remove
This patch sets STATUS_EXIT_PENDING on pci_remove. Otherwise
iwl4965_down may fail to uninitialize the driver.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Mohamed Abbas <mohamed.abbas@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-09-03 15:10:37 -04:00
Gregory Greenman d535311ecb iwlwifi: call apm stop on exit
This patch calls apm stop on exit and suspend. Without this patch
hardware consumes power even after driver is removed or suspended.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Mohamed Abbas <mohamed.abbas@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-09-03 15:10:37 -04:00
Tomas Winkler 73b7d74251 iwlwifi: fix Tx cmd memory allocation failure handling
This patch "iwlwifi: do not use GFP_DMA in iwl_tx_queue_init" removes
GFP_DMA from allocation tx command buffers. GFP_DMA allows allocation
only for memory under 16M which causes allocation problems
suspend/resume flows.

Using kmalloc is temporal solution and some consistent/coherent
allocation schema will be more correct. Since iwlwifi hardware
supports 64bit address this solution should work on x86 (32 and
64bit) for now.

This patch fixes memory freeing problem in the previous patch.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
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-09-03 15:10:37 -04:00
Tomas Winkler 28a6b07a14 iwlwifi: fix rx_chain computation
This patch fixes rx_chain computation. The code that adjusts number of
rx chains to number supported by HW was missing. Miss configuration
causes firmware error.  Note: iwlwifi supports HW with up to 3 RX
chains (2x2, 2x3, 1x2, and 3x3 MIMO). This patch also simplifies the
whole RX chain computation.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-03 15:10:37 -04:00
Ron Rindjunsky 4834c73f05 iwlwifi: fix station mimo power save values
This patch fixes the wrong use MIMO power save values. Our TX was
configured with our MIMO power save values instead of peer's MIMO power
save values, this may affect connectivity. The peer STA/AP may not sense
our traffic at all as it doesn't have all RX chains opened.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@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-09-03 15:10:37 -04:00
Mohamed Abbas 545597036c iwlwifi: remove false rxon if rx chain changes
Rx chain might change during power save transitions but it doesn't
require sending Full-ROXN command to the firmware. Full-RXON requires
reconnection to an AP and thus affects user experience. The patch
avoids the Full-RXON by removing the rx_chain modification check in
iwl_full_rxon_required function.

Signed-off-by: Mohamed Abbas <mohamed.abbas@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-09-03 15:10:36 -04:00
Ron Rindjunsky 0ffe014a8c iwlwifi: fix hidden ssid discovery in passive channels
This enables sending of direct probes on passive channels, as long as
traffic was detected on that channel. This enables connectivity to
hidden/non broadcasting SSIDs APs on passive channels. Note 5000 HW
declares all 5.2 spectrum as passive.

Signed-off-by: Cahill Ben <ben.m.cahill@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-03 15:10:36 -04:00
Assaf Krauss b94d8eea44 iwlwifi: W/A for the TSF correction in IBSS
This patch is a W/A for the TSF sync issue in IBSS merging. HW is not
capable to sync TSF (it's constantly little behind). This creates
constant IBSS merging upon reception of each beacon, adding and removing
station which in turn creates above 50% packet loss and thus dramatically
degrade the throughput. The W/A simply stops the driver from declaring it
has a reliable TSF value and thus eliminates IBSS merging.

Signed-off-by: Assaf Krauss <assaf.krauss@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-09-03 15:10:36 -04:00
Ilpo Järvinen a505f4ff49 s2io: reindented misleading for loop
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:24:24 -04:00
Huang Weiyi 45021ae498 [netdrvr] removed unused #include <version.h>
The drivers below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/net/myri10ge/myri10ge.c
  drivers/net/netxen/netxen_nic_ethtool.c
  drivers/net/tokenring/lanstreamer.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:24:22 -04:00
Kevin Lo 1c460afaa5 8139too: use netdev_alloc_skb
This patch uses netdev_alloc_skb. This sets skb->dev and allows
arch specific allocation. Also cleanup the alignment code.

Signed-off-by:	Kevin Lo <kevlo@kevlo.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:24:14 -04:00
Kevin Lo a52be1cbc2 8139cp: use netdev_alloc_skb
This patch uses netdev_alloc_skb. This sets skb->dev and allows
arch specific allocation. Also cleanup the alignment code.

Signed-off-by:	Kevin Lo <kevlo@kevlo.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:24:09 -04:00
Kevin Lo b26b555a7b via-rhine: changed to use netdev_alloc_skb() from dev_alloc_skb
Use netdev_alloc_skb. This sets skb->dev and allows
arch specific allocation. Also cleanup the alignment code.

Signed-off-by:	Kevin Lo <kevlo@kevlo.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:24:04 -04:00
Stephen Hemminger c844d48300 sky2: display product info on boot.
Change bootup messages to print more information. This is to help users
who may have old buggy EEPROM image.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:23:58 -04:00
Stephen Hemminger 1413235c14 sky2: EEPROM read/write bug fixes
Cleanup and harden the routines accessing the EEPROM.
  1. Prevent spin forever waiting for the TWSI bus
  2. Fix write eeprom to write full words rather than only 16 bits
    Luckly the vendor doesn't provide EEPROM in Linux format so it must never
    have been used.
  3. Don't allow partial eeprom writes, not needed, not safe.

These are non-urgent bug fixes.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:23:56 -04:00
Jeff Garzik 9389523a77 Merge branch 'r8169-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream-next 2008-09-03 10:21:20 -04:00
Alexander Duyck 3be1adfb91 ixgbe: change config srrctl to only program one register per VMDq/RSS id
This change makes it so only one srrctl register is programmed per VMDq id, and if VMDq is not enabled it is one register per RSS queue.  Currently this function is working correctly for the multiqueue RSS and single queue cases, but if any advances features such as VMDq or DCB would have been enabled this function would have caused issues as it was not correct.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:08:22 -04:00
Alexander Duyck 1a32bcfb57 igb: clean up a stray fake netdev code left in rx path
Remove code that was in place to support fake netdev

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:08:17 -04:00
Alexander Duyck fc7d345d11 igb: remove unneeded cleaned variable in clean_tx_irq path
The cleaned variable can be replaced by the count of packets cleaned during
the tx interrupt routine so it can be removed.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:08:16 -04:00
Bruce Allan 4662e82b2c e1000e: add support for new 82574L part
This new part has the same feature set as previous parts with the addition
of MSI-X support.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:08:13 -04:00
Bruce Allan f4187b56e1 e1000e: add support for 82567LM-3 and 82567LF-3 (ICH10D) parts
Add support for new LOM devices on the latest generation ICHx platforms.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:06:47 -04:00
Bruce Allan 2f15f9d601 e1000e: add support for the 82567LM-4 device
Enable PCI device ID for a new combination of MAC and PHY already supported
in the driver.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:06:02 -04:00
PJ Waskiewicz 4eeae6fd3f ixgbe: use different context for tso and offload
Change TSO offloads to use a different context than VLAN insertion
and Tx checksumming.  Hardware has separate registers internally for
storing these so use them.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:34 -04:00
Jesse Brandeburg cc41ac7c00 ixgbe: fix dca hints going to wrong processor
hardware was configured incorrectly which led all hints to be
sent to queue[0]'s DCA configuration.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:34 -04:00
Jesse Brandeburg e9990a9cd7 ixgbe: fix bug where lro settings are per ring
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:34 -04:00
Jesse Brandeburg 96b0e0f63b ixgbe: update dca to new interface, fix CONFIG_DCA_MODULE
DCA related fixes
=================
- ixgbe was not compiling and using DCA correctly if dca was a module
- DCA interface changed with new kernel
- ixgbe was not correctly configured to indicate DCA hints to the
  correct CPU.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:34 -04:00
Jesse Brandeburg 22f32b7a5a ixgbe: should not use HW_CSUM, should use IP* flags
as mentioned by Herbert, our hardware supports IP offloads, not full
checksum offloads for any protocol in existence (even though the
hardware just provides generic csum support over any range of bytes)

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:33 -04:00
Jesse Brandeburg 7c6e0a436d ixgbe: Lock RSS seed, move rx_buf_len to the rx_ring
This locks the seed down so loading/unloading the driver will present
predictable hashing from RSS.  Also move the rx_buf_len out of the adapter
struct, and into the Rx ring struct.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:33 -04:00
Jesse Brandeburg e01c31a5f7 ixgbe: Implement Tx Head Writeback
Enable Tx Head Writeback in the hardware.  This helps performance by
removing adapter writebacks to descriptors on transmit completion.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:33 -04:00
Jesse Brandeburg 2b9ade935c ixgbe: disable flow control by default
Since the adapter cannot tell what the remote end's flow control capability
is through auto-neg, we must turn off flow control by default.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:33 -04:00
Jesse Brandeburg 3a581073e0 ixgbe: Cleanup references to Tx and Rx rings to becommon across the driver
Cleanup all the different references to the Tx ring and Rx ring structures
and make them common across the driver.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:33 -04:00
Jesse Brandeburg 036c9b0970 ixgbe: do not update stats twice each receive
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:33 -04:00
Christopher Leech 2c5645cf65 ixgbe: Implement HAVE_SET_RX_MODE
Implement HAVE_SET_RX_MODE in the driver for MC and UC lists.

Signed-off-by: Christopher Leech <christopher.leech@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:32 -04:00
Jesse Brandeburg 9da09bb1b8 ixgbe: add little endian annotations for sparse
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:32 -04:00
Jesse Brandeburg 712744bebe ixgbe: fix rx csum return status misinterpretation
the driver was misinterpreting rx_csum return value in the descriptor
so occassionally we would indicate an rx_csum error in our stats
when there was none.  This would have no effect on traffic because
we would just hand the packet to the stack anyway without the offload
flag set, but would increase CPU for those packets that needed a recompute.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:32 -04:00
roel kluin fa928c0caa ibm_newemac: MAL[12]_IER_EVENTS definition: 2x *_OTE -> *_DE
MAL[12]_IER_EVENTS definitions have MAL_IER_OTE twice
but lack MAL_IER_DE

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:08 -04:00
Randy Dunlap 8dcc61ac32 hp-plus: fix link objects
Fix hp-plus Makefile object file:

drivers/built-in.o: In function `hpp_open':
hp-plus.c:(.text+0xaf445): undefined reference to `ei_interrupt'
hp-plus.c:(.text+0xaf4ac): undefined reference to `ei_open'
drivers/built-in.o: In function `hpp_close':
hp-plus.c:(.text+0xaf59d): undefined reference to `ei_close'
drivers/built-in.o: In function `hpp_probe1':
hp-plus.c:(.init.text+0x7314): undefined reference to `ei_poll'
drivers/built-in.o: In function `hp_plus_probe':
(.init.text+0x7407): undefined reference to `__alloc_ei_netdev'
make[1]: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:07 -04:00
Brian Haley f14c4e4e36 bonding: change some __constant_htons() to htons()
Resending since I didn't see any responses from the first try.

Change __constant_htons() to htons() in the bonding driver, it should
only be used for initializers.

-Brian

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 10:03:07 -04:00
Ben Hutchings a816f75ac5 sfc: Rework efx_set_multicast_hash()
When !port_enabled, defer the write to reconfigure_mac_wrapper.

Whilst here, simplify the logic now that efx_start_port() always calls
efx_reconfigure_port().

From: Steve Hodgson <shodgson@solarflare.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:49 -04:00
Ben Hutchings 3c78708fe8 sfc: Remove the STATE_RESETTING flag
This was originally a kludge to fix broken locking, which has since
been fixed properly.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:49 -04:00
Ben Hutchings 8c8661e4ce sfc: Extend self-tests
Include PMA/PMD in loopback self-tests as intended.

Add NVRAM checksum validation and include it in self-tests.

Add register self-tests.

Run PHY self-tests where available.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:48 -04:00
Ben Hutchings a515089c96 sfc: Rework the bitfield header so that we can identify fields by bit number
This will support register self-tests.

From: Steve Hodgson <shodgson@solarflare.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:48 -04:00
Ben Hutchings 2467ca46b6 sfc: Cleanup reset code
Move more code from efx_reset() into efx_reset_down() and efx_reset_up().

Stop propagating MAC/PHY setting failures from efx_reset_down() and
efx_reset_up() as these should not be fatal.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:48 -04:00
Ben Hutchings bc3c90a2b7 sfc: Remove some unreachable error paths
Some functions return an error code which is always 0.  Change their
return types to void and simplify their callers accordingly.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:48 -04:00
Ben Hutchings c1e5fcc980 sfc: Remove remnants of multi-port abstraction for MAC registers
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:48 -04:00
Ben Hutchings 01aad7b6ff sfc: Remove efx_nic_dummy_op_int() as redundant with efx_port_dummy_op_int()
Update comment on the dummy operation implementations.

Line up the board operation initialisers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:47 -04:00
Ben Hutchings 740847dab1 sfc: Enable TSO for 802.1q VLAN devices
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:47 -04:00
Steve Hodgson dacccc7411 sfc: Do not call netif_{stop,wake}_queue() before register_netdev
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:47 -04:00
Ben Hutchings f8b87c1701 sfc: Make PHY flash mode a device attribute, not a module parameter
This allows updating PHY firmware for one interface without removing
all other interfaces handled by the driver.

Replace tx_disabled flags and 10Xpress status enumeration with flags in
enum efx_phy_mode.

Prevent an interface from being brought up while in PHY flash mode.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:47 -04:00
Ben Hutchings 3594e131b2 sfc: Implement get_sset_count, replacing get_stats_count and self_test_count
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:47 -04:00
Ben Hutchings 42cbe2d73c sfc: Cleanup RX event processing
Make efx_process_channel() and falcon_process_eventq() return the
number of packets received rather than updating the quota, consistent
with new NAPI.

Since channels and RX queues are mapped one-to-one, remove return
value from falcon_handle_rx_event() and add a warning for events
with the wrong RX queue number.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:47 -04:00
Ben Hutchings d307402534 sfc: Remove efx_channel::evqnum field
It is redundant with efx_channel::channel.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:46 -04:00
Ben Hutchings a2589027ff sfc: Make efx_for_each_channel_rx_queue() more efficient
Currently each channel can have at most one RX queue, so go straight to
that one.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:46 -04:00
Ben Hutchings 955f0a744b sfc: Remove initialisation of RX_FILTER_CTL_REG.NUM_KER
We have long since given up doing RSS on Falcon A1 and therefore we
would always write the default value of 0.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:46 -04:00
Ben Hutchings 8831da7b6c sfc: Cleanup RX queue information
Rename efx_nic::rss_queues to the more obvious n_rx_queues

Remove efx_rx_queue::used and other stuff that's redundant with it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:46 -04:00
Ben Hutchings 64ee3120f7 sfc: Remove efx_channel::has_interrupt
efx_channel::has_interrupt is redundant with efx_channel::used_flags.

Remove efx_test_eventq() because it is now obviously unreachable.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:46 -04:00
Ben Hutchings 46123d043d sfc: Move CPU counting for RSS into a separate function, efx_wanted_rx_queues()
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:45 -04:00
Ben Hutchings 4a5b504d0c sfc: Export boot configuration in EEPROM through ethtool
Extend the SPI device setup code to support this.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:45 -04:00
Ben Hutchings 4d566063a7 sfc: Removed forced inlining of long functions
gcc will automatically inline static functions with only one caller, and
may inline other functions depending on the kernel configuration and size
of the intermediate code.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:45 -04:00
Ben Hutchings 23d9e60b1d sfc: Cleaned up struct tso_state fields
Squashed nested structures.

Renamed remaining_len to out_len, ifc.len to in_len, header_length to
header_len.

Moved ipv4_id into the group of output variables where it belongs.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:45 -04:00
Ben Hutchings 28506563e2 sfc: Set net_device::vlan_features appropriately
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:45 -04:00
Ben Hutchings dc8cfa55da sfc: Use explicit bool for boolean variables, parameters and return values
Replace (cond ? 1 : 0) with cond or !!cond as appropriate, and
(cond ? 0 : 1) with !cond.

Remove some redundant boolean temporaries.

Rename one field that looks like a flag but isn't.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:45 -04:00
Ben Hutchings cc12dac2e5 sfc: Reduce the size of struct efx_tx_buffer
Remove unmap_addr since it can be calculated from dma_addr, len and
unmap_len.  This saves 4-16 bytes.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:44 -04:00
Ben Hutchings ecbd95c17c sfc: Use pci_map_single() to map the skb header when doing TSO
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:44 -04:00
Ben Hutchings 5988b63a53 sfc: Don't leak PCI DMA maps in the TSO code when the queue fills up
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:44 -04:00
Ben Hutchings b9aafb0e91 sfc: Speed up loopback self-test
Add efx_poll_loopback() function to test for successful completion of test.
Change efx_test_loopback() to end the test after 1 ms if
efx_poll_loopback() indicates success, and otherwise to wait for 100 ms
as before.

While we're here, rename efx_{rx,tx}_loopback() to
efx_{begin,end}_loopback() which more accurately reflect their
purpose.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:44 -04:00
Ben Hutchings f8ea0b6743 sfc: Self-test reporting cleanup
Removed log messages that are redundant with calling functions.
Fixed bitwise or-ing of return codes.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:43 -04:00
Ben Hutchings e9713e6f4e sfc: Reduce log level for XGXS lane status
This was making noise during 10Xpress self-test.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:43 -04:00
Ben Hutchings c84a6f18a9 sfc: Reverse the XOFF/XON pause frame control fifo thresholds
These were clearly bogus.

From: Steve Hodgson <shodgson@solarflare.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:43 -04:00
Ben Hutchings f90748f009 sfc: Remove inclusion of workarounds.h from efx.c
efx.c does not use hardware workarounds.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:43 -04:00
Ben Hutchings c264361d31 sfc: XMAC statistics fix-ups
Exclude assumed size of RX control frames from rx_bad_bytes.

Exclude assumed size of TX control frames from tx_good_bytes for
consistency with rx_good_bytes.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:43 -04:00
Ben Hutchings 5b39fe307b sfc: Remove mistaken hardware workaround
We believed that some valid SNAP frames were being marked as invalid.
In fact this is not the case and no workaround is needed.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:43 -04:00
Ben Hutchings 11f34e691d sfc: Reduce delays in SFE4001 initialisation
Currently the board initialisation includes 2 delays of 1 second each.
Usually it is unnecessary to wait that long, so check before doing so.

Correct some of the comments and log messages while we're here.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:42 -04:00
Ben Hutchings a0c2c19093 sfc: Avoid mangling error codes in efx_test_loopback()
efx_test_loopback() used "|" to combine the results of the RX and TX
phases.  If both phases fail with different error codes, this results
in a bogus error code.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:42 -04:00
Ben Hutchings 60ac10658c sfc: Use separate hardware TX queues to select checksum generation
Checksum generation is an attribute of our hardware TX queues, not TX
descriptors.  We previously used a single queue and turned checksum
generation on or off as requested through ethtool.  However, this can
result in regenerating checksums in raw packets that should not be
modified.  We now create 2 hardware TX queues with checksum generation
on or off.  They are presented to the net core as one queue since it
does not know how to select between them.

The self-test verifies that a bad checksum is unaltered on the queue
with checksum generation off.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:42 -04:00
Steve Hodgson 26c086771a sfc: Remove unused field efx_channel::reset_work
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:42 -04:00
Ben Hutchings 18c2fc0478 sfc: Change first parameter type of {set,clear}_bit_le() to unsigned
This means the compiler doesn't need to use real division instructions.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:42 -04:00
Ben Hutchings 767e468c06 sfc: Replace net_dev->priv with netdev_priv(net_dev)
Use of the net_device::priv field is deprecated.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:53:42 -04:00
Dhananjay Phadke 0b62afb432 netxen: Remove workaround for chipset quirk
Remove chipset-specific quirk workaround; the workaround caused
unrecoverable DMA lockups when the driver was loaded following a
PXE boot.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:26:40 -04:00
Komuro 2dcc9ff7ef pcnet-cs, axnet_cs: add new IDs, remove dup ID with less info
pcnet_cs:
    add new ID: "corega Ether PCC-TD".
    remove duplicate ID: "IC-CARD".

axnet_cs:
    add new ID: "IO DATA ETXPCM".

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:26:37 -04:00
Andy Gospodarek 15e79f24b6 ixgbe: initialize interrupt throttle rate
This commit dropped the setting of the default interrupt throttle rate.

commit 021230d40a
Author: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>
Date:   Mon Mar 3 15:03:45 2008 -0800

    ixgbe: Introduce MSI-X queue vector code

The following patch adds it back.  Without this the default value of 0
causes the performance of this card to be awful.  Restoring these to the
default values yields much better performance.

This regression has been around since 2.6.25.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: stable@kernel.org [2.6.25 and later]
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:26:18 -04:00
David Brownell e000ea1312 net/usb/pegasus: avoid hundreds of diagnostics
Make the "pegasus" driver scream less loudly in the face of
problems as it initializes, avoiding hundreds of messages:

 - ratelimit some key error messages
 - avoid some spurious diagnostics caused by strange codeflow

And fix one instance of goofy indentation.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03 09:26:10 -04:00
Linus Torvalds d26acd92fa Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  ipsec: Fix deadlock in xfrm_state management.
  ipv: Re-enable IP when MTU > 68
  net/xfrm: Use an IS_ERR test rather than a NULL test
  ath9: Fix ath_rx_flush_tid() for IRQs disabled kernel warning message.
  ath9k: Incorrect key used when group and pairwise ciphers are different.
  rt2x00: Compiler warning unmasked by fix of BUILD_BUG_ON
  mac80211: Fix debugfs union misuse and pointer corruption
  wireless/libertas/if_cs.c: fix memory leaks
  orinoco: Multicast to the specified addresses
  iwlwifi: fix 64bit platform firmware loading
  iwlwifi: fix apm_stop (wrong bit polarity for FLAG_INIT_DONE)
  iwlwifi: workaround interrupt handling no some platforms
  iwlwifi: do not use GFP_DMA in iwl_tx_queue_init
  net/wireless/Kconfig: clarify the description for CONFIG_WIRELESS_EXT_SYSFS
  net: Unbreak userspace usage of linux/mroute.h
  pkt_sched: Fix locking of qdisc_root with qdisc_root_sleeping_lock()
  ipv6: When we droped a packet, we should return NET_RX_DROP instead of 0
2008-09-02 21:02:14 -07:00
Senthil Balasubramanian 773b4e02be ath9: Fix ath_rx_flush_tid() for IRQs disabled kernel warning message.
This patch addresses an issue with the locking order. ath_rx_flush_tid()
uses spin_lock/unlock_bh when IRQs are disabled in sta_notify by mac80211.

As node clean up is still pending with ath9k and this problematic portion
of the code is expected to change anyway, thinking of a proper fix may not
be worthwhile. So having this interim fix helps the users to get rid of the
kernel warning message.

Pasted the kernel warning message for reference.

kernel: ath0: No ProbeResp from current AP 00:1b:11:60:7a:3d - assume out of range
kernel: ------------[ cut here ]------------
kernel: WARNING: at kernel/softirq.c:136 local_bh_enable+0x3c/0xab()
kernel: Pid: 1029, comm: ath9k Not tainted 2.6.27-rc4-wt-w1fi-wl
kernel:
kernel: Call Trace:
kernel:  [<ffffffff802278d8>] warn_on_slowpath+0x51/0x77
kernel:  [<ffffffff80224c51>] check_preempt_wakeup+0xf3/0x123
kernel:  [<ffffffff80239658>] autoremove_wake_function+0x9/0x2e
kernel:  [<ffffffff8022c281>] local_bh_enable+0x3c/0xab
kernel:  [<ffffffffa01ab75a>] ath_rx_node_cleanup+0x38/0x6e [ath9k]
kernel:  [<ffffffffa01b2280>] ath_node_detach+0x3b/0xb6 [ath9k]
kernel:  [<ffffffffa01ab09f>] ath9k_sta_notify+0x12b/0x165 [ath9k]
kernel:  [<ffffffff802366cf>] queue_work+0x1d/0x49
kernel:  [<ffffffffa018c3fc>] add_todo+0x70/0x99 [mac80211]
kernel:  [<ffffffffa017de76>] __sta_info_unlink+0x16b/0x19e [mac80211]
kernel:  [<ffffffffa017e6ed>] sta_info_unlink+0x18/0x43 [mac80211]
kernel:  [<ffffffffa0182732>] ieee80211_associated+0xaa/0x16d [mac80211]
kernel:  [<ffffffffa0184a1a>] ieee80211_sta_work+0x4fb/0x6b4 [mac80211]
kernel:  [<ffffffff80469c58>] thread_return+0x30/0xa9
kernel:  [<ffffffffa018451f>] ieee80211_sta_work+0x0/0x6b4 [mac80211]
kernel:  [<ffffffff802362c2>] run_workqueue+0xb1/0x17a
kernel:  [<ffffffff80236be9>] worker_thread+0xd0/0xdb
kernel:  [<ffffffff8023964f>] autoremove_wake_function+0x0/0x2e
kernel:  [<ffffffff80236b19>] worker_thread+0x0/0xdb
kernel:  [<ffffffff8023954a>] kthread+0x47/0x75
kernel:  [<ffffffff80223121>] schedule_tail+0x18/0x50
kernel:  [<ffffffff8020bc49>] child_rip+0xa/0x11
kernel:  [<ffffffff80239503>] kthread+0x0/0x75
kernel:  [<ffffffff8020bc3f>] child_rip+0x0/0x11
kernel:
kernel: ---[ end trace e9bb5da661055827 ]---

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-02 17:40:03 -04:00
Senthil Balasubramanian 1b96175b7e ath9k: Incorrect key used when group and pairwise ciphers are different.
Updating sc_keytype multiple times when groupwise and pairwise
ciphers are different results in incorrect pairwise key type
assumed for TX control and normal ping fails. This works fine
for cases where both groupwise and pairwise ciphers are same.

Also use mac80211 provided enums for key length calculation.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-02 17:40:03 -04:00
Boaz Harrosh 445df54fec rt2x00: Compiler warning unmasked by fix of BUILD_BUG_ON
A "Set" to a sign-bit in an "&" operation causes a compiler warning.
Make calculations unsigned.

[ The warning was masked by the old definition of BUILD_BUG_ON() ]

Also remove __builtin_constant_p from FIELD_CHECK since BUILD_BUG_ON
no longer permits non-const values.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-02 17:40:02 -04:00
Adrian Bunk 9a52028e53 wireless/libertas/if_cs.c: fix memory leaks
The leak in if_cs_prog_helper() is obvious.

It looks a bit as if not freeing "fw" in if_cs_prog_real() was done
intentionally, but I'm not seeing why it shouldn't be freed.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-02 17:39:50 -04:00
David Kilroy 667d41008e orinoco: Multicast to the specified addresses
When multicasting the driver sets the number of group addresses using
the count from the previous set multicast command. In general this means
you have to set the multicast addresses twice to get the behaviour you
want.

If we were multicasting, and reduce the number of addresses we are
multicasting to, then the driver would write uninitialised data from the
stack into the group addresses to multicast to.

Only write the multicast addresses we have specifically set.

Signed-off-by: David Kilroy <kilroyd@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-02 17:39:49 -04:00
Tomas Winkler f0b9f5cb4a iwlwifi: fix 64bit platform firmware loading
This patch fixes loading firmware from memory above 32bit.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Marcel Holtmann <holtmann@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-02 17:12:49 -04:00
Mohamed Abbas 1d3e6c6134 iwlwifi: fix apm_stop (wrong bit polarity for FLAG_INIT_DONE)
The patch fixes CSR_GP_CNTRL_REG_FLAG_INIT_DONE was set instead of
cleared which disabled moving device to D0U state.

Signed-off-by: Mohamed Abbas <mohamed.abbas@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-09-02 17:12:49 -04:00
Tomas Winkler cf88c433bf iwlwifi: workaround interrupt handling no some platforms
This patch adds workaround for an interrupt related hardware bug on
some platforms.  (Apparently these platforms boot-up w/ INTX_DISABLED
set. -- JWL)

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-09-02 17:12:49 -04:00
John W. Linville 49898852e6 iwlwifi: do not use GFP_DMA in iwl_tx_queue_init
GFP_DMA is not necessary for the iwlwifi hardware and it can cause
allocation failures and/or invoke the OOM killer on lots of systems.

For reference:

	https://bugzilla.redhat.com/show_bug.cgi?id=459709

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-02 15:07:18 -04:00
David S. Miller b171e19ed0 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	net/mac80211/mlme.c
2008-08-29 23:06:00 -07:00
Michael Buesch 18c8adeb02 b43: Rewrite TX power adjustment
This patch rewrites the TX power recalculation algorithms to scale better
with changed enviromnent. If there's low
TX traffic, the power will be checked against the desired values
every 60 seconds.
If there is high TX traffic, the check is redone every 2 seconds. This improves
the reaction times a lot and confuses the rate control less.
It will also reduce the time it initially takes to tune to a new TX power
value. With the old algorithm it could take about 30 to 45 seconds to settle to
a new power value. This will happen in about two to four seconds now.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:13 -04:00
Michael Buesch ef1a628d83 b43: Implement dynamic PHY API
This patch implements a dynamic "ops" based PHY API.
This is needed in order to conveniently support future PHY types
to avoid the "switch"-hell.

This patch does not change any functionality. It just moves lots
of code from one place to another and adjusts it for the changed
data structures.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:12 -04:00
Ivo van Doorn 35e032d82f rt2x00: Release rt2x00 2.2.1
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:12 -04:00
Mattias Nissler 1abc3656e9 rt2x00: skb->data pointer should not include TX descriptor
Make sure the skb->data pointer points to the frame data, not the TX
descriptor. The frame dumping code relies on that.

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>
2008-08-29 16:24:12 -04:00
Ivo van Doorn 6c6aa3c004 rt2x00: Add Signal type flag
Instead of using the PLCP flag to indicate if the
signal value is plcp or the bitrate we should add
a new flag to mark the bitrate type explicitely.
This is usefull when new types are added later for
rt2800.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:12 -04:00
Ivo van Doorn 2af0a570b4 rt2x00: Initialize txop during conf_tx() callback
The txop parameter is supported by rt61pci and rt73usb,
and thus should be written to the register instead
of using the fixed value set during initialization.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:12 -04:00
Mattias Nissler 2575c11d6e rt2x00: Only configure hardware when radio is enabled
Some hardware configuration registers such as antenna and channel configuration
can only be written when the radio is enabled. Previously, we didn't consider
this, so some configuration items could be set inconsistently after reenabling
the radio. This patch changes the config() handler to only reprogram the
hardware when the radio is enabled. Configuration changes that are made while
the radio is off are postponed until the radio is switched back on. We also
leave the radio turned off during initialization and only enable it when
requested by mac80211. This allows us to get rid of the DIRTY_CONFIG flag,
because the device is now guaranteed to be completely initialized when brought
up by mac80211.

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>
2008-08-29 16:24:11 -04:00
Ivo van Doorn 3ee54a07d3 rt2x00: Map extra_tx_headroom to DMA
If a driver requests additional headroom it should
be mapped to DMA as well because it will be send to
the hardware as well (as form of extra descriptor).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:11 -04:00
Ivo van Doorn 0262ab0df6 rt2x00: Fix race conditions in flag handling
Some of the flags should be accessed atomically to
prevent race conditions. The flags that are most important
are those that can change often and indicate the actual
state of the device, queue or queue entry.

The big flag rename was done to move all state flags to
the same naming type as the other rt2x00dev flags and
made sure all places where the flags were used were changed. ;)

Thanks to Stephen for most of the queue flags updates,
which fixes some of the most obvious consequences of the
race conditions. Among those the notorious:

rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0.
rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0.
rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0.

Signed-off-by: Stephen Blackheath <tramp.enshrine.stephen@blacksapphire.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:11 -04:00
Harvey Harrison de9cc7a4e6 libertas: use the common frame control functions
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:11 -04:00
Sujith 5701ed843e ath9k: rc.h cleanup
Use kernel doc syntax for comments and remove a few unused macros.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:10 -04:00
Sujith 1fe1132bad ath9k: Remove sc_lastrx as we don't use it anywhere
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:10 -04:00
Sujith 14cc709f33 ath9k: Do not update frame's duration field
When AR_DurUpdateEna is set, the frame's duration field
is updated by the MAC based on the current rate.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:10 -04:00
Sujith 822ceaefaa ath9k: Remove more dead code
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:09 -04:00
Vasanthakumar Thiagarajan c83be6885e ath9k: Add LED support
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:09 -04:00
Christian Lamparter 7262d59366 p54pci: rx tasklet refactoring
This patch moves the all of p54pci's receiver code out of the
bloated interrupt handler routine and into a less critical tasklet.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:09 -04:00
Chr 84df3ed30b p54: redo queue numbering
The firmware supports 8 different queues and not only 4.
So, let's make some room for further tasks (ap/adhoc support)
in this area.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:09 -04:00
Chr 031d10ee5a p54: take tx_queue's lock in rx_frame_sent
p54_rx_frame_sent will alter the tx_queue. Therefore we should hold
the lock to protect against concurrent p54_assign_address calls.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:08 -04:00
Christian Lamparter 154e3af17f p54: fix rssi auto calibration
Ever wondered why the signal was so bad with p54 compared to madwifi, or intel?

Well, if you have revision 1 rssi calibration curve points in your EEPROM, then wonder no more.
The firmware wants a extra 1 byte padding for every curve point. But someone forgot to put
them into the EEPROM's data structure...

So now, big question: what happens when we blindly "memcpy" these data points?

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:08 -04:00
Huang Weiyi a3ec233c90 wireless: remove unused #include <version.h>
The driver(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/net/wireless/b43legacy/main.c
  drivers/net/wireless/iwlwifi/iwl-3945-led.c
  drivers/net/wireless/iwlwifi/iwl-led.c
  drivers/net/wireless/iwlwifi/iwl-rfkill.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:08 -04:00
Jouni Malinen e022edbd2b ath9k: Use mac80211 for multicast power save buffering
Replace the internal ath9k implementation of multicast/broadcast frame
power save buffering (AP mode) in ath9k with use of mac80211
ieee80211_get_buffered_bc() mechanism. This removes quite a bit of
duplicated functionality and simplifies the driver part.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:08 -04:00
Jouni Malinen 87e8b64e68 mac80211_hwsim: Add minimal IEEE 802.11n support
Set some semi-random values for HT and add more queues to allow IEEE
802.11n association to be tested with mac80211_hwsim. This with the
latest hostapd git tree version can complete a simulated 802.11n
association successfully (with mac80211 client MLME).

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:07 -04:00
Dan Williams f5fe1fdaae libertas: convert adhoc operations to direct commands
with fixes for v9 and later firmware too.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:07 -04:00
Dan Williams d5db2dfa66 libertas: convert CMD_802_11_RADIO_CONTROL to a direct command
and return errors for operations like join & scan that aren't possible
when the radio is turned off.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:07 -04:00
Dan Williams 191bb40e72 libertas: convert CMD_802_11_DEAUTHENTICATE to a direct command
and remove DISASSOCIATE because it's not in any of the specs and has
never been used.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:06 -04:00
Dan Williams 87c8c72d53 libertas: convert CMD_802_11_RF_TX_POWER to a direct command
And while we're at it, grab min/max TX power from the firmware and use
that to validate incoming TX power requests from WEXT.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:06 -04:00
Sujith 19b73c7f68 ath9k: Add IEEE80211_HW_RX_INCLUDES_FCS to hw flags
Don't trim the FCS before passing the frame to mac80211,
move TSF_TO_TU to core.h and delete more unused macros.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:05 -04:00
Sujith 6065367893 ath9k: Use definition from ieee80211.h
Also, Max RX-ampdu and mpdu-density are ath9k specific.
Rename appropriately.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:05 -04:00
Sujith ff9b662dab ath9k: Miscellaneous fixes
This patch removes ath_vap_listen() and dma wrapper macros.
Also, Inline abuse is cleaned up and a few typos are fixed.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:04 -04:00
Sujith dc2222a85f ath9k: Random cleanup
Remove dead code, add newlines, fix indentation.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:04 -04:00
Sujith 927e70e924 ath9k: Remove remaining occurences of ath_skb_map functions
Use direct pci functions instead.
Also, use sc_ht_info.tx_chan_width directly and remove ath_cwm_macmode.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:04 -04:00
Jouni Malinen b14ecdd0af ath9k: Fix TX control flag use for no ACK and RTS/CTS
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:04 -04:00
Jouni Malinen 147583c057 ath9k: Assign seq# when mac80211 requests this
Use TX control flag IEEE80211_TX_CTL_ASSIGN_SEQ as a request to update
the seq# for the frames. This will likely require some further cleanup
to get seq# correctly for Beacons vs. other frames and also potentially
for multiple BSSes. Anyway, this is better than ending up sending out
most frames with seq# 0.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:03 -04:00
Jouni Malinen 580f0b8a6d ath9k: Fix TX status reporting
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:03 -04:00
Jouni Malinen a8fff50e4d ath9k: Updated Beacon generation to use mac80211-style
This change moves ath9k to use mac80211-generated Beacon frames instead
of trying to allocate a single Beacon frame and then update it. In
addition, the remaining ath_skb_{map,unmap}_single() wrapper calls are
replaced with direct pci_{map,unmap}_single() calls in beacon.c. Power
save buffering for multicast/broadcast frames is not yet converted to
use mac80211-style (frames to be buffered inside mac80211, not in
driver).

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:03 -04:00
Jouni Malinen 2ad67de3c8 ath9k: Allow AP mode to be enabled
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:02 -04:00
Sujith 98deeea0b3 ath9k: Trim struct ath_softc
Add sc_rxflush and sc_noreset as bitfields to sc_flags.
Remove a few variables and function prototypes that are unused.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:01 -04:00
Sujith 7c56d24bc8 ath9k: Use ah_curchan and remove sc_curchan which is redundant
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:24:00 -04:00
Sujith 672840ac04 ath9k: Use bitfields for sc operations
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:23:59 -04:00
Sujith b4696c8b92 ath9k: Use a single opmode variable
ah_opmode and sc_opmode are redundant.
This patch removes sc_opmode.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:23:58 -04:00
Sujith 6a2b9e8c8f ath9k: Unused macros, variables
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:23:56 -04:00
Sujith d2d80ee9c6 ath9k: Remove ar5416hal and assign default values directly
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:23:56 -04:00
Sujith 556bb8f141 ath9k: Remove a few unnecessary macros
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:23:56 -04:00
Sujith cd3d39a687 ath9k: Use bitfields for buffer type
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-29 16:23:56 -04:00