Граф коммитов

112022 Коммитов

Автор SHA1 Сообщение Дата
Yogesh Ashok Powar 19a898601a mwifiex: remove redundant "return" at end of void function
The return statement at the last line of a void function
is not necessary.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:12 -04:00
Amitkumar Karwar 600f5d909a mwifiex: cleanup ioctl wait queue and abstraction layer
1) remove mwifiex_alloc_fill_wait_queue() and
mwifiex_request_ioctl()
2) avoid dynamic allocation of wait queue
3) remove unnecessary mwifiex_error_code macros that
were used mainly by the wait queue status code
4) remove some abstraction functions
5) split mwifiex_prepare_cmd() to mwifiex_send_cmd_async()
and mwifiex_send_sync() to handle asynchronous and
synchronous commands respectively

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:11 -04:00
Felix Fietkau 3a9dddea89 ath5k: disable 5 GHz support for the dualband PHY chip on dual-radio AR5312
There are two variants of AR5312 dual-band devices, one single-radio
and the other one dual-radio. On the dual-radio board, the first MAC
only supports 5 GHz, even though it has a dual-band PHY. The 2.4 GHz
part of this phy is used in pass-through mode, connecting the second
MAC with the second PHY.
Disable 2.4 GHz for the first MAC on an AR5312, but only if the board
configuration indicates a dual-radio device.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:10 -04:00
Felix Fietkau 32377b6cf7 ath5k: fix the EEPROM check for hw AES crypto support
EEPROM version 5.0 adds a new field for disabling AES support, having
an older version means that AES is present. This patch fixes hw AES
crypto support on AR5312 boards, which have an older EEPROM version.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:09 -04:00
Felix Fietkau fa9bfd61e0 ath5k: add a new bus op for reading the mac address
On AHB, the calibration data usually does not contain a valid MAC address,
the correct MAC address is stored in the board config.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:09 -04:00
Felix Fietkau 0cb9e06b63 ath: unshare struct ath_bus_ops between ath5k and ath9k
This struct is not used in any common code, and moving it out of
the ath header makes it easier to add more driver specific ops.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:08 -04:00
Felix Fietkau 7f94f05b24 ath5k: disable 5 GHz support if a 2.4 GHz radio is detected
On a dual-radio dual-band AR5312 device, the calibration data is shared
between the 5 GHz and the 2.4 GHz radio/MAC.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:08 -04:00
Rajkumar Manoharan 10add41f2b ath9k: Fix improper beacon slot selection in IBSS
Request a re-configuration of Beacon related timers
on the receipt of the first Beacon frame has to be set only
for station mode. Setting beacon sync for IBSS is causing
wrong beacon slot selection on beacon generation.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:07 -04:00
John W. Linville dfa8fc69d9 ath9k: avoid using trinary operator w/ TX_STAT_INC
Otherwise, you get this:

  CC [M]  drivers/net/wireless/ath/ath9k/hif_usb.o
drivers/net/wireless/ath/ath9k/hif_usb.c: In function ‘ath9k_skb_queue_complete’:
drivers/net/wireless/ath/ath9k/hif_usb.c:230:12: error: expected expression before ‘do’
make[2]: *** [drivers/net/wireless/ath/ath9k/hif_usb.o] Error 1
make[1]: *** [drivers/net/wireless/ath/ath9k] Error 2
make: *** [drivers/net/wireless/ath/] Error 2

The TX_STAT_INC macro should probably be changed to accomodate such
usage, although using a trinary operator in place of an if-else seems
questionable to me anyway.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Sujith Manoharan <Sujith.Manoharan@Atheros.com>
2011-04-14 15:29:06 -04:00
John Fastabend 45a5f720fe ixgbe: DCB, X540 devices do not respond to pause frames
DCB enabled X540 devices are not responding to pause frames
due to a missing register set that was added for these
devices that did not exist in other devices.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:27:18 -07:00
John Fastabend e09ad236fc ixgbe: DCB, misallocated packet buffer size with X540 device
The X540 device has a smaller packet buffer but the DCB configuration
never took this into account. Under stress this can result in the DMA
engine hanging and TX Unit hang occurring to reset the device. This
patch reworks the packet buffer allocation routine used for DCB on
82599 and X540 devices to account for RX packet buffer sizes.

This fixes the immediate hang. We should consolidate the various
hardware specific routines for configuring features into a single
routine. This will make it much harder to miss feature cases like
this.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:26:43 -07:00
Emil Tantilov b776d10435 ixgbe: make device_caps() generic
x540 has the same device capability word in the EEPROM as 82599.
This patch renames ixgbe_get_device_caps_82599 to
ixgbe_get_device_caps_generic, moves it to ixgbe_common.h and
sets up the function pointer for x540.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:26:06 -07:00
Emil Tantilov a59e8a1a72 ixgbe: explicitly disable 100H for x540
100H is not supported on this HW, but the bit is set on the PHY.
This can result in link at 100F when advertising only 1000F.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:25:36 -07:00
Emil Tantilov 4c40ef0291 ixgbe: add support for new HW
Add new device ID supported by ixgbe.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:24:38 -07:00
Emil Tantilov eb9c3e3ea2 ixgbe: fix semaphores in eeprom routines for x540
HW can upload EEPROM content from flash while
in a middle of checksum calculation. Take NVM ownership for the whole
process of checksum update.

Call ixgbe_read_eerd_generic() and ixgbe_write_eewr_generic() directly to
avoid double take of semaphores which leads to long loading times.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:23:38 -07:00
Don Skidmore 032b4325b6 ixgbe: cleanup short msleep's (<20ms) to use usleep_range
Since msleep might not sleep for the desired amount when less
than 20ms use usleep_range.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:23:11 -07:00
Emil Tantilov 0fa6d83258 ixgbe: fix 82599 KR downshift coexistence with LESM FW module
Disable KR to KX4/KX downshift on 82599 backplane devices when
LESM (Link Establishment State Machine) is enabled in FW. Those
features cannot co-exist as they both manipulate the same registers.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phillip Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:22:44 -07:00
Emil Tantilov 3d5c520727 ixgbe: move disabling of relaxed ordering in start_hw()
Relaxed ordering can lead to issues with some chipsets.

This patch makes sure that it is disabled by default and
not only when DCA is on.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:22:18 -07:00
Emil Tantilov 7184b7cf55 ixgbe: refactor common start_hw code for 82599 and x540
Factored out the common start_hw code into a new function
ixgbe_start_hw_gen2() so that it can be used by x540 and 82599.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:21:52 -07:00
Jeff Kirsher 75e3d3c681 ixgbe: update version string for Dell CEM use
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
2011-04-13 19:21:28 -07:00
Emil Tantilov d6cd8e0e75 ixgbe: fix namespacecheck issue
Set ixgbe_identify_82599() as static

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:21:03 -07:00
Emil Tantilov c9130180a8 ixgbe: correct function number for some 82598 parts
Some 82598 parts have LAN0 disabled and LAN1 enabled and the LAN ID bits in
Device Status register report the NIC as having only LAN1 as enabled. This
causes ixgbe_set_lan_id_multi_port_pcie() to set bus->func = 1 which is
incorrect.

Force bus->func to 0 when LAN0 is disabled in the EEPROM.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:20:37 -07:00
Emil Tantilov 2ea5ea5fc4 ixgbe: fix return value checks
The value of status was incorrectly tested. Also whitespace cleanup.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:20:15 -07:00
John Fastabend c8ca76ebc6 ixgbe: DCB, further cleanups to app configuration
With the app data on the kernel dcb_app list we no longer
need to specifically handle them in ixgbe for the CEE case.
So now we can remove app handling logic and check when the
hw is configured if the app data matches the hardware
configuration in set_hw_all().

If it does not match then we can reconfigure.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:19:47 -07:00
Bruce Allan 78cd29d5a9 e1000e: If ASPM L0s needs to be disabled, do it prior to enabling device
Based on a patch from Naga Chumbalkar <nagananda.chumbalkar@hp.com>:

If ASPM L0s needs to be disabled due to HW errata, do it prior to
"enabling" the device. This way if the kernel ever defaults its
aspm_policy to POLICY_POWERSAVE, then the e1000e driver will get a
chance to disable ASPM on the misbehaving device *prior* to calling
pci_enable_device_mem(). This will be useful in situations
where the BIOS indicates ASPM support on the server by clearing the
ACPI FADT "ASPM Controls" bit.

Note:
The kernel (2.6.38) currently uses the BIOS "default" as its aspm_policy.
However, Linux distros can diverge from that and set the default to
"powersave".

v2: o cleanup namespace pollution of e1000e_disable_aspm(),
    o fix type and initialization of the new aspm_disable_flag in a few
      functions, and
    o redefine FLAG2_DISABLE_ASPM_L0S to the first unused bit in
      adapter->flags2.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:19:22 -07:00
Flavio Leitner 2084b114e3 e1000e: fix stats locking in e1000_watchdog_task
Just move the unlock down a bit because it unlocks too
early leaving a chance for get_stats64() run in parallel
while it is still accessing the stats.

Signed-off-by: Flavio Leitner <fleitner@redhat.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:18:57 -07:00
Jeff Kirsher 86d70e532c e1000e: convert to new VLAN model
This switches the e1000e driver to use the new VLAN interfaces.

CC: Jesse Gross <jesse@nicira.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
2011-04-13 19:17:50 -07:00
Bruce Allan a5cc764206 e1000e: PCIe link speed in GT/s, not GB/s
Correct the log message when driver loads.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:17:27 -07:00
Bruce Allan 1bba4386ab e1000e: convert short duration msleep() to usleep_range()
With durations less than 20ms, the jiffies or legacy timer backed msleep()
may sleep ~20ms which might not be what the caller expects.  Instead, it
is recommended to use the hrtimers backed usleep_range().  For more, see
Documentation/timers/timers-howto.txt.  Issues reported by checkpatch.

In addition, remove unnecessary sleep in e1000e_write_nvm_spi().

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:17:06 -07:00
Stefan Assmann 563988dcfe igb: introduce igb_thermal_sensor_event for sensor checking
The code for thermal sensor checking should be wrapped into a function.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:16:44 -07:00
Stefan Assmann 34a0326e3a igb: fix typo in igb_validate_nvm_checksum_82580
Comment spelling fix.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by:  Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-04-13 19:16:19 -07:00
Mathieu J. Poirier c326de88b8 net: allow shifted access in smsc911x V2
This is a revised patch that permits a shifted access to the
LAN9221 registers.  More specifically:

 It adds a shift parameter in the platform_data.
 It introduces an ops in smsc911x_data.
 A choice of access function to use at run-time.
 Four new shifted access function.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 17:13:00 -07:00
Matt Carlson c3e945006a tg3: Add support for extended VPD blocks
In some devices, the VPD block is relocated to a different area in
NVRAM.  The original location can still contain old, but still valid VPD
data.  This patch changes the code to look for an extended VPD block in
NVRAM.  If one is found, that block is used for all VPD operations
instead.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 17:10:08 -07:00
Matt Carlson 4852a8614f tg3: Add jumbo frame loopback tests to selftest
This patch adds jumbo frame loopback test support to the ethtool
selftest.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 17:10:07 -07:00
Matt Carlson 48fa55a0a5 tg3: Automatically size stat/test string arrays
This patch reimplements the size preprocessor constants of the stats and
ethtool test string arrays.  The size is calculated at compile time
rather than using static constants.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 17:10:07 -07:00
Matt Carlson e64de4e6c6 tg3: Dump registers when status block shows errors
This patch monitors the error bit of the status word within the status
block.  If it is set, the driver will dump the driver state after
validating the error and then reset the chip.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 17:10:06 -07:00
Matt Carlson 97bd8e491d tg3: Provide full regdump on tx timeout
The current amount of information provided in the output of a tx timeout
is insufficient to determine a root cause.  This patch replaces the
terse, four-register status output with a more complete body of
information.  For PCIe devices, the full register space is dumped.  For
other devices, select registers are dumped instead.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 17:10:05 -07:00
Ben Hutchings 4d42d417be rndis_host: Poll status before control channel where necessary
Some RNDIS devices don't respond on the control channel until polled
on the status channel.  In particular, this was reported to be the
case for the 2Wire HomePortal 1000SW and for some Windows Mobile
devices.

This is roughly based on a patch by John Carr <john.carr@unrouted.co.uk>
which is currently applied by Mandriva.

Reported-by: Mark Glassberg <vzeeaxwl@myfairpoint.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 14:48:55 -07:00
Sujith Manoharan 09d5b94d2c ath9k_htc: Enable AP and P2P modes
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:44 -04:00
Sujith Manoharan fbc29d6c3d ath9k_htc: Add detailed firmware statistics
New debugfs files:

<debugfs_root>/ath9k_htc/<phy#>/tgt_int_stats
<debugfs_root>/ath9k_htc/<phy#>/tgt_tx_stats
<debugfs_root>/ath9k_htc/<phy#>/tgt_rx_stats

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:41 -04:00
Sujith Manoharan 821f9414c0 ath9k_htc: Use helper routines for transmission
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:37 -04:00
Sujith Manoharan 2f80194c90 ath9k_htc: Use separate URB pool for management frames
Beacon transmission needs to involve as little latency
as possible after receiving a SWBA event from the target.
Since packets are buffered to use TX stream mode, beacon
frames sometimes gets queued up and are not sent out immediately.
Fix this by decoupling management frame transmission from the
normal data path and send them out immediately.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:34 -04:00
Sujith Manoharan 859c3ca1e4 ath9k_htc: Add a timer to cleanup WMI events
Occasionally, a WMI event would arrive ahead of the TX
URB completion handler. Discarding these events would exhaust
the available TX slots, so handle them by running a timer
cleaning up such events. Also, timeout packets for which TX
completion events have not arrived.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:30 -04:00
Sujith Manoharan c4d04186c7 ath9k_htc: Add a debugfs file showing endpoint status
Location: ath9k_htc/phy#/queue

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:27 -04:00
Sujith Manoharan 01f684de7c ath9k_htc: Add a debugfs file to dump TX slot information
Location: ath9k_htc/phy#/slot

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:23 -04:00
Sujith Manoharan 27876a29de ath9k_htc: Add support for TX completion
Now that the infrastructure is in place, process WMI
TX status events and complete packets.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:20 -04:00
Sujith Manoharan 84c9e16446 ath9k_htc: Drain packets on station removal
When a station entry is removed, there could still be
pending packets destined for that station in the HIF layer.
Sending these to the target is not necessary, so drain them
in the driver itself.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:16 -04:00
Sujith Manoharan e1fe7c38d3 ath9k_htc: Optimize HTC start/stop API
There is no point in looping over all the endpoints,
since the HIF layer uses the start/stop APIs only
for the TX pipe. Simplify the API accordingly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:12 -04:00
Sujith Manoharan b587fc81a8 ath9k_htc: Drain pending TX frames properly
When doing a channel set or a reset operation the pending
frames queued up for transmission have to be flushed and
sent to mac80211. Fixing this has to be done in two separate
steps:

  * Flush queued frames and kill the URB TX completion handler.
  * Complete all the frames that in the TX pending queue.

This patch adds proper support for draining and all the callsites
namely, channel change/reset/idle/stop are fixed. A separate queue
is used for handling failed frames.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:08 -04:00
Sujith Manoharan f2820f4583 ath9k_htc: Use helper functions for TX processing
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:24:03 -04:00
Sujith Manoharan 2c5d57f004 ath9k_htc: Add TX slots
Maintain a bitmap of slots for transmission and update
the cookie field for every packet with the slot value.
This value would be used for matching packets when TX
completion processing is added.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:57 -04:00
Sujith Manoharan 729bd3ab46 ath9k_htc: Move endpoint header parsing to TX tasklet
There is no need to do endpoint header removal in the ISR.
Also, this is needed when TX slot management is added later on.
Use a helper function to strip the driver header.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:51 -04:00
Sujith Manoharan d67ee53393 ath9k_htc: Introduce new HTC API
A new routine that takes an endpoint explicitly is
introduced. The normal htc_send() now retrieves the endpoint
from the packet's private data. This would be useful
in TX completion when the endpoint ID would be required.
While at it, use a helper function to map the queue to endpoint.

Data/mgmt/beacon packets use htc_send(), while WMI comamnds
pass the endpoint to HTC.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:46 -04:00
Sujith Manoharan 8e86a54715 ath9k_htc: Fix TX queue management
Handle queue start/stop properly by maintaining
a counter to check if the pending frame count has
exceeded the threshold. Otherwise, packets would be
dropped needlessly. While at it, use a simple flag
to track queue status and use helper functions too.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:42 -04:00
Sujith Manoharan 3deff76095 ath9k_htc: Increase URB count for REG_IN pipe
Using a single URB for receiving WMI events is
insufficient, increase it to 64 to not lose
WMI events in high throughput situations.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:35 -04:00
Sujith Manoharan 16c56ae875 ath9k_htc: Add a new WMI event WMI_TXSTATUS_EVENTID
This event will be generated by the target for packet completions.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:30 -04:00
Sujith Manoharan e8e3860765 ath9k_htc: Sync MGMT/DATA packet headers with firmware
Add a new cookie field that would be filled by the host.
This can be used to match the TX status WMI event with
the appropriate packet.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:25 -04:00
Sujith Manoharan 15f6d6d52f ath9k_htc: Reduce TX queue size
The current max queue length of 1024 is quite large
and unnecessary. 256 suffices well enough even for high
throughput situations.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:21 -04:00
Sujith Manoharan 658ef04fd4 ath9k_htc: Move TX specific stuff to a separate structure
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:16 -04:00
Sujith Manoharan ee3fa1bdad ath9k_htc: Remove unused WMI_WLAN_TXCOMP_EVENTID
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:13 -04:00
Sujith Manoharan 0a8579f6b7 ath9k_htc: Sync struct ath9k_htc_cap_target with FW
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:08 -04:00
Sujith Manoharan e4c62506fc ath9k_htc: Sync struct ath9k_htc_target_vif with FW
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:03 -04:00
Sujith Manoharan b97c57ff3f ath9k_htc: Sync struct ath9k_htc_target_sta with FW
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:58 -04:00
Sujith Manoharan 40dc9e4b86 ath9k_htc: Use SKB's private area for TX parameters
For all packets sent through the USB_WLAN_TX_PIPE endpoint,
the private area of the SKB's tx_info can be used to store
driver-specific information. For packets sent through USB_REG_OUT_PIPE,
this will not make a difference since they are routed through a
separate routine that doesn't access the private region.

This would help in situations where TX information is required
in the URB callback.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:53 -04:00
Sujith Manoharan e723f3900c ath9k_htc: Remove unused WMI commands
WMI_TGT_TXQ_ENABLE_CMDID
WMI_HOST_ATTACH
WMI_DEBUG_INFO_CMDID
WMI_BEACON_UPDATE_CMDID
WMI_RESET_CMDID
WMI_RX_LINK_CMDID
WMI_STOP_DMA_RECV_CMDID

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:48 -04:00
Sujith Manoharan b1563a4c3d ath9k_htc: Fix RX length check
The length of the received SKB could be equal to
HTC_RX_FRAME_HEADER_SIZE in case of packets with phy/crc errors,
in which case they are dropped without being processed.
Fix this check so that the error counters are updated correctly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:44 -04:00
Sujith Manoharan 719c4cf6b1 ath9k_htc: Add RX error statistics
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:41 -04:00
Sujith Manoharan 8e42e4ba98 ath9k_htc: Move debug code to a separate file
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:37 -04:00
Sujith Manoharan f4c88991f5 ath9k_htc: Queue WMI events
Use a queue to handle WMI events and schedule a tasklet
to process the events. This fixes the race between the
WMI event ISR and the SWBA tasklet when the arrival of
WMI events in quick succession could overwrite the SWBA
data before the tasklet from a previous iteration could
have been scheduled. Also, drain the WMI queue properly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:33 -04:00
Sujith Manoharan b0a6ba983e ath9k_htc: Fix beacon miss under heavy load
Transmission of beacons becomes erratic when TX load
is high, since the latency involved in the generation
of a SWBA interrupt on the target to the actual sending
of a beacon is quite high for USB devices.

Fix this by adjusting the beacon response time.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:30 -04:00
Sujith Manoharan 7d547eb4bb ath9k_htc: Handle buffered frames in AP mode
Use the CAB endpoint to send buffered multicast or
broadcast frames after each SWBA event.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:26 -04:00
Sujith Manoharan 2493a547ee ath9k_htc: Configure the beacon queue
Set operating parameters (cwmin, cwmax) for the beacon queue
in AP mode.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:22 -04:00
Sujith Manoharan 9b674a0207 ath9k_htc: Add TSF adjust capability
In multi-interface mode, beacons/probe responses that are
sent out must have their timestamp field updated. Calculate
the TSF adjustment value for each beaconing interface and set it
in the frame properly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:18 -04:00
Sujith Manoharan 832f6a18fc ath9k_htc: Add beacon slots
Beacon transmission is now handled through a slot mechanism.
This allows multiple beaconing interfaces to be be present.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:14 -04:00
Sujith Manoharan 1c165c972b ath9k_htc: Fix WMI and beacon header
Match the beacon header with that of the firmware.
Also, the firmware reports the TSF for an SWBA, so
store it.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:11 -04:00
Sujith Manoharan 29bbfb2491 ath9k_htc: Add a WMI command to get the firmware version
Also, update the wiphy information and use the correct
device pointer when registering. This would fix ethtool.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:07 -04:00
Sujith Manoharan ce18f391aa ath9k_htc: Rename firmware
Since the new FW requires backward incompatible host driver changes,
rename the FW to allow older driver versions to work with the
older FW.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:03 -04:00
Sujith Manoharan 9efabad2b2 ath9k_htc: Remove AR7010 v1.0 support
All the AR7010 devices supoprted by ath9k_htc are based
on version v1.1, so remove support for v1.0.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:21:59 -04:00
Brian Cavagnolo d0805c1c57 mwl8k: use traffic threshold to decide when to start ampdu
Currently, ampdu stream is created on the first qos packet to an
HT sta. The overhead of setting up the BA session may not be
justified if the outgoing packet rate is minimal (e.g., ping). So
we only allow ampdu streams after seeing a critical number of
packets in an arbitrary one-second interval.

Based on work by Nishant Sarmukadam <nishants@marvell.com>

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:21:56 -04:00
Gabor Juhos 8e26a03036 ath9k: introduce ATH9K_{PCI,AHB} config options
Currently ath9k only available in menuconfig if PCI bus
support is enabled. However the driver is required for
the built-in wireless MACs of the Atheros AR9130/AR9132
SoCs. These SoCs have no PCI controller, the wireless
MAC is connected to the AHB bus on them.

Introduce separated config options for the supported
buses, in order to allow building of ath9h without PCI
bus support.

As a bonus, this patch removes the cross-reference of
the ATHEROS_AR71XX option which is not present in the
kernel.

Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:21:34 -04:00
Nishant Sarmukadam 12488e01fb mwl8k: interrupt handling changes
We do not need to enable all the interrupts in mwl8k_probe_hw.
We need to enable only MWL8K_A2H_INT_OPC_DONE interrupt for sending
commands to the firmware. Keep the other interrupts masked in
mwl8k_probe_hw. Also, in mwl8k_start, where we expect other interrupts,
enable only those interrupts we are interested in.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:19:08 -04:00
Stanislaw Gruszka 332704a514 iwlegacy: fix tx_power initialization
priv->tx_power_next is not initialized to max supported power,
but instead default value is used, what cause errors like

[   58.597834] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14.
[   58.597839] iwl3945 0000:03:00.0: Error setting Tx power (-22).

if maximum tx power read from the eeprom is smaller than default.
In consequence card is unable to initialize properly. Fix the problem
and cleanup tx power initialization.

Reported-and-tested-by: Robin Dong <hao.bigrat@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:09:53 -04:00
Amit Kumar Salecha 91a403caf0 qlcnic: limit skb frags for non tso packet
Machines are getting deadlock in four node cluster environment.
All nodes are accessing (find /gfs2 -depth -print|cpio -ocv > /dev/null)
200 GB storage on a GFS2 filesystem.
This result in memory fragmentation and driver receives 18 frags for
1448 byte packets.
For non tso packet, fw drops the tx request, if it has >14 frags.

Fixing it by pulling extra frags.

Cc: stable@kernel.org
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 11:53:11 -07:00
Giuseppe Cavallaro 74ae2fd7d3 stmmac: review Wol and enable the Unicast support
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 11:51:43 -07:00
Alexander Stein b19f7f71b6 macb: Add rx overrun counter
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 11:50:08 -07:00
Anatolij Gustschin 7c9f6472d4 net: can: mscan: fix build breakage in mpc5xxx_can
Commit 74888760d4
"dt/net: Eliminate users of of_platform_{,un}register_driver"
broke building mscan driver. Fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 11:34:19 -07:00
Kevin Gan 9f72c1d977 Bluetooth: btmrvl: support Marvell Bluetooth device SD8787
The SD8787 firmware image is shared with mwifiex driver.
Whoever gets loaded first will be responsible for firmware
downloading.

Signed-off-by: Kevin Gan <ganhy@marvell.com>
Signed-off-by: Tristan Xu <xurf@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:20:05 -03:00
Gustavo F. Padovan b86ed368f1 Bluetooth: Check return value of hci_recv_stream_fragment()
It may return error and in this case we do add to the stats.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:20:04 -03:00
Jiejing Zhang 78b4a56c28 Bluetooth: hci_uart: check the return value of recv()
Check the return value of hu->proto->recv() in hci_uart_tty_receive()
the recv() may return error, check it, not add this to statistics.

Signed-off-by: Jiejing Zhang <jiejing.zhang@freescale.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:20:03 -03:00
Gustavo F. Padovan 0733119c0b Bluetooth: Clean up ath3k_load_firmware()
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:20:01 -03:00
John W. Linville 8962d87129 ath5k: improve comments for optimized tx descriptor setup
Comment the use of local variables to reduce the number of load/store
operations on uncached memory, in hopes of not losing this optimization
accidentally in the future.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 08:49:10 -04:00
David S. Miller c0212fb146 Merge branch 'sfc-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6 2011-04-12 17:10:52 -07:00
David S. Miller a7e7015888 Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2011-04-12 16:16:02 -07:00
David S. Miller 24743537d3 atm: iphase: Fix set-but-not-used warnings.
The "iavcc" and "iadev" cases are obvious.

The intr_status and frmr_intr cases are reading a register to clear
the chip status.  This driver is pretty old and creaky, and uses
volatile pointer dereferences to do register I/O when it should be
using readl() and friends.  However that it outside of the scope of
these changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 16:14:21 -07:00
Neil Turton fcfa060468 sfc: Use rmb() to ensure reads occur in order
Enabling write-combining may also enable read reordering.  The BIU is
only guaranteed to read from a 128-bit CSR or 64-bit SRAM word when
the host reads from its lowest address; otherwise the BIU may use the
latched value.  Therefore we need to reinstate the read memory
barriers after the first read operation for each CSR or SRAM word.

Signed-off-by; Ben Hutchings <bhutchings@solarflare.com>
2011-04-12 23:52:44 +01:00
Otavio Salvador 3d894a9c19 net/natsami: store MAC into perm_addr
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:56:00 -07:00
Otavio Salvador efa2ad8918 net/sis900: store MAC into perm_addr for SiS 900, 630E, 635 and 96x variants
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:56:00 -07:00
Michał Mirosław 6d95ff974a net: ioc3: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:50:45 -07:00
Michał Mirosław 66371c4413 net: bnx2x: convert to hw_features
Since ndo_fix_features callback is postponing features change when
bp->recovery_state != BNX2X_RECOVERY_DONE, netdev_update_features()
has to be called again when this condition changes. Previously,
ethtool_ops->set_flags callback returned -EBUSY in that case
(it's not possible in the new model).

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

v5: - don't delay set_features, as it's rtnl_locked - same as recovery process
v4: - complete bp->rx_csum -> NETIF_F_RXCSUM conversion
    - add check for failed ndo_set_features in ndo_open callback
v3: - include NETIF_F_LRO in hw_features
    - don't call netdev_update_features() if bnx2x_nic_load() failed
v2: - comment in ndo_fix_features callback
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:50:44 -07:00
Michał Mirosław e5ee20e70f net: bna: convert to hw_features
Note: looks like bnad->conf_mutex is duplicating rtnl_lock.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:50:44 -07:00
Michał Mirosław d1423c7ab8 net: ps3_gelic: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:50:43 -07:00
Michał Mirosław f5d640371d net: sky2: convert to hw_features
Caveats:
 - driver modifies vlan_features on HW VLAN TX changes
 - broken RX checksum will be reenabled on features change

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:50:42 -07:00
Patrick McHardy 0e08785845 connector: fix skb double free in cn_rx_skb()
When a skb is delivered to a registered callback, cn_call_callback()
incorrectly returns -ENODEV after freeing the skb, causing cn_rx_skb()
to free the skb a second time.

Reported-by: Eric B Munson <emunson@mgebm.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Tested-by: Eric B Munson <emunson@mgebm.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:38:57 -07:00
Vasanthakumar Thiagarajan 6f11c819d5 ath9k: Register id table for platform device
Currently the device id in the platform driver is hardcoded to an id
which is specific to AR9130/AR9132 SOCs as it supports only wmac (wireless mac)
of these SOCs. But this needs to be dynamic when we want to support different
wmac of SOCs. So add id_table to driver to make it extendable to more SOCs.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Acked-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:51 -04:00
Mark Davis b3ba44c6d1 rt2800usb: Add seven new USB IDs
Adds USB IDs for seven previously missing devices. Additionally, all
instances of 'Conceptronic' have been replaced by the OEM name.

Devices added are..
0411:01a2 - Buffalo WLI-UC-GNM, RT3070V
0586:341e - ZyXEL NWD2105, RT3070
13b1:002f - Linksys AE1000, RT3572
13b1:0031 - Cisco / Linksys AM10, RT3072
14b2:3c2c - Keebox W150NU / Alpha Networks WUS-N12, RT3070
157e:3013 - TRENDnet TEW-645UB, RT2770+RT2720
15a9:0012 - Airlink AWLL7025 / Gemtek WUBR-208N, RT2870+RT2850

Signed-off-by: Mark Davis <marked86@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:48 -04:00
Rajkumar Manoharan 901c1113da ath9k_hw: update AR9003 low_ob_db_tx_gain to improve spur performance
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:45 -04:00
Rajkumar Manoharan 5fb32faf82 ath9k_hw: update Ar9003 intervals to fix carrier leak
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:42 -04:00
Rajkumar Manoharan 2d05a0c2b4 ath9k_hw: Remove unused code in AR9287 eeprom
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:40 -04:00
Vasanthakumar Thiagarajan 3dfd7f6066 ath9k: Implement integer mode for AR9485
This fixes random disconnect.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:37 -04:00
Chaoming Li 228bdfca9a rtlwifi: rtl8192ce: Fix LED initialization
Driver rtl8192ce does not initialize the LED correctly.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:34 -04:00
roel f0bce44f5f ath9k: index out of bounds
Check whether index is within bounds before testing the element

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:32 -04:00
roel 0f8e94d2ae ath9k_hw: index out of bounds
Check whether index is within bounds before testing the element

Both spurChans arrays in modalHeader5G and modalHeader2G have 5 elements,
AR_EEPROM_MODAL_SPURS is defined 5. So unless a break occurs, in the
last iteration (i=5) we tried to access spurChansPtr[5] before testing
whether i was within bounds. Fix this.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:30 -04:00
Felix Fietkau c266c71a9c ath5k: reduce interrupt load caused by rx/tx interrupts
While the rx/tx tasklet is pending, new unnecessary interrupts may arrive.
Decrease the load by temporarily disabling the interrupts until the tasklet
has completed.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:27 -04:00
Felix Fietkau 5b7916ad8c ath5k: clean up debugfs code
The pointers to the debugfs entries do not need to be saved, because they
will be recursively removed when the wiphy is unregistered.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:24 -04:00
Felix Fietkau ed8950857f ath5k: remove ts_retry from ath5k_tx_status
Reusing the configured retry counts from the skb cb is more efficient than
reloading the data from uncached memory.
Replace ts_longretry (unused) with ts_final_retry which contains the retry
count for the final rate only

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:22 -04:00
Felix Fietkau b2fd97d019 ath5k: optimize rx status processing
Use ACCESS_ONCE to reduce the number of redundant loads on uncached memory

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:19 -04:00
Felix Fietkau b161b89fb9 ath5k: optimize tx status processing
Use ACCESS_ONCE to reduce the number of variable reloads on uncached memory

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:17 -04:00
Felix Fietkau fe12081cb6 ath5k: remove ts_rate from ath5k_tx_status
It is no longer necessary for preparing mac80211 tx status

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:14 -04:00
Felix Fietkau c5e0a88aa2 ath5k: optimize tx descriptor setup
Use local variables to reduce the number of load/store operations on uncached
memory.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:12 -04:00
Felix Fietkau b1ad1b6feb ath5k: fix slot time handling
Set the slot time based on the mac80211 short slot vs long slot setting
instead of just forcing long slot for all CCK-enabled channels.
This slightly improves 802.11g mode performance in in my tests.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:09 -04:00
Felix Fietkau 488a50176c ath5k: fix SIFS time handling
ath5k uses 8 usec as a sifs time, extracted from the initvals, whereas the
standard requires a sifs time of 10. The difference originates from the fact
that the SIFS register has an offset of 2 usec.
Fix the SIFS time definition to use the standard value of 10 usec and subtract
2 usecs when writing the SIFS register.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:06 -04:00
Felix Fietkau a27049e2c9 ath5k: fix short preamble rate duration value
Subtract the difference in preamble duration (in usec) from the value
returned by ieee80211_generic_frame_duration.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:02 -04:00
Felix Fietkau 6d7b97b23e ath5k: fix tx status reporting issues
During normal operation, minstrel was showing suspicious EWMA probabilities
exceeding 100%. It looks like the tx status reporting in ath5k was not
properly clearing the rate index for rates which were never attempted.

This is caused by uninitialized stale data in the on-stack tx status
information, which is reused when more frames are received.

To fix this, rely on ts->ts_final_idx to select the last attempted rate,
instead of checking whether ts->ts_rate is set.

Additionally, the conversion from the driver rate index back to the
mac80211 rate index can be dropped, as the mac80211 tx status will still
have the original rate index which was used to set up the descriptor.

Additionally, one more inaccuracy was fixed - the final rate attempt
count only needs to be increased by one if the transmission attempt was
successful.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:58:59 -04:00
John W. Linville a065784620 ath5k: improve pcal error handling for ENOMEM case
The ath5k driver does kmalloc allocations for pcal info in a loop.
But, if one fails it was simply returning -ENOMEM without freeing
already allocated memory.  This patch corrects that oversight.

Reported-by: Eugene A. Shatokhin <dame_eugene@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
2011-04-12 16:58:56 -04:00
Yogesh Ashok Powar ba30c4a58c mwl8k: Fix checkpatch.pl and sparse warnings and errors
Fix checkpatch errors and warnings comprising of indent errors, spaces and
__packed warnings. Also fix 'make C = 2' warnings.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:58:53 -04:00
Felix Fietkau 1296433bf3 ath9k_hw: remove unnecessary parts of the AR9380 SREV check
Older versions have not been sold and the driver does not explicitly
check for them anyway, so we can simply ignore the macRev here.
Reduces ath9k_hw size on mips by more than 2 KB.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:58:50 -04:00
Rajkumar Manoharan f60c49b67d ath9k: Fix kernel panic on module unload
The commit "ath9k: configure beacons based on hw opmode" introduced
a regression which leads to kernel panic. Failed to stop ani timer
during the driver unload while any of the beaconing vif is running.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:58:43 -04:00
Senthil Balasubramanian d0ef824b9a ath9k: Update gain table for AR9485
Update Tx gain 23 for all tx gain table.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:58:41 -04:00
Senthil Balasubramanian 7d75541499 ath9k: Add RSSI information from control and extension chains
Export RSSI information from all the control and extension
channel chains to debugfs. Also add rx antenna information
to debugfs. This will be useful for debugging purpose.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:58:39 -04:00
Paul Bolle a22e93f5d8 iwl4965: drop a lone pr_err()
iwl4965_rate_control_register() prints a message at KERN_ERR level. It
looks like it's just a debugging message, so pr_err() seems to be
overdone. But none of the similar functions in drivers/net/wireless
print a message, so let's just drop it.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:57:36 -04:00
Felix Fietkau 952949738a ath9k: fix too early enabling of rx during ath_startrecv()
rx should only be enabled after enough rx buffers have been given to the
hardware, however ath_rx_buf_link was calling ath9k_hw_rxena after every
single added buffer.
Fix this by calling ath9k_hw_rxena directly from the rx tasklet after
completion instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:57:36 -04:00
Felix Fietkau 264bbec811 ath9k: fix PS-Poll reception on AR9160 and earlier
I can't find any valid reason for not setting the ATH9K_RX_FILTER_PSPOLL
flag on older hardware and neither the documentation nor the reference
code mention any reason for excluding older hardware here.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:57:36 -04:00
Yogesh Ashok Powar 6a35a0ac57 mwifiex: use common keyinfo bitmap for different key types
Instead of having separate key information definitions for
each type of key, a common key information bitmap is used.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:57:35 -04:00
Bing Zhao 18bf965702 mwifiex: fix cmd_skb headroom decreasing issue
Before calling host_to_card() to send the cmd to firmware,
we use skb_push() to add 4 bytes SDIO interface header at
the start of the data buffer. Since cmd_skb data structure
will be re-used at a later time, we need to restore its
headroom by removing the 4 bytes header.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:57:35 -04:00
Rajkumar Manoharan d88525e8fd ath9k_hw: Fix instable target power control b/w CCK/OFDM
The problem is that when the attenuation is increased,
the rate will start to drop from MCS7 -> MCS6, and finally
will see MCS1 -> CCK_11Mbps. When the rate is changed b/w
CCK and OFDM, it will use register desired_scale to calculate
how much tx gain need to change.

The output power with the same tx gain for CCK and OFDM modulated
signals are different. This difference is constant for AR9280
but not AR9285/AR9271. It has different PA architecture
a constant. So it should be calibrated against this PA
characteristic.

The driver has to read the calibrated values from EEPROM and set
the tx power registers accordingly.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:57:35 -04:00
Vivek Natarajan 15b91e830d ath9k: Implement dev_tx_frames_pending callback.
This function returns true if there is atleast one frame
in any one of the tx queues.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:57:34 -04:00
Sujith Manoharan 50f6871218 ath9k_htc: Fix ethtool reporting
Pass the correct module name and device interface so that
ethtool can display the proper values.

The firmware version will be fixed later on when the FW
can actually report a version. :)

Reported-by: Richard Farina <sidhayn@gmail.com>
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Tested-by: Richard Farina <sidhayn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:41:34 -04:00
Felix Fietkau 5882da02e9 ath9k_hw: fix stopping rx DMA during resets
During PHY errors, the MAC can sometimes fail to enter an idle state on older
hardware (before AR9380) after an rx stop has been requested.

This typically shows up in the kernel log with messages like these:

ath: Could not stop RX, we could be confusing the DMA engine when we start RX up
------------[ cut here ]------------
WARNING: at drivers/net/wireless/ath/ath9k/recv.c:504 ath_stoprecv+0xcc/0xf0 [ath9k]()
Call Trace:
[<8023f0e8>] dump_stack+0x8/0x34
[<80075050>] warn_slowpath_common+0x78/0xa4
[<80075094>] warn_slowpath_null+0x18/0x24
[<80d66d60>] ath_stoprecv+0xcc/0xf0 [ath9k]
[<80d642cc>] ath_set_channel+0xbc/0x270 [ath9k]
[<80d65254>] ath_radio_disable+0x4a4/0x7fc [ath9k]

When this happens, the state that the MAC enters is easy to identify and
does not result in bogus DMA traffic, however to ensure a working state
after a channel change, the hardware should still be reset.

This patch adds detection for this specific MAC state, after which the above
warnings completely disappear in my tests.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Cc: Kyungwan Nam <Kyungwan.Nam@Atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:41:33 -04:00
John W. Linville 252f4bf400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	drivers/net/wireless/ath/ar9170/main.c
	drivers/net/wireless/ath/ar9170/phy.c
	drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
2011-04-12 16:18:44 -04:00
Jon Mason 6ba1037c3d vxge: update driver version
Update vxge driver version to 2.5.3

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 11:22:34 -07:00
Jon Mason 9f9b164581 vxge: spin-lock issue
In vxge_hw_vpath_close, __vxge_hw_vp_terminate memsets the vpath which
clobbers the spin lock state, then the driver attempts to acquire the
spin lock.  Resolve this by not zeroing the lock part of vpath struct,
clean-up vpath locking in init, close, and fix locking hole in fw_api
call.

Issue found by Bob Picco <bpicco@redhat.com>

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 11:22:34 -07:00
Jon Mason cd883a791b vxge: always enable hardware time stamp
Hardware time stamp calculation can only be enabled by the privileged
function. Enable it always by default and simply use the ethtool
interface to set a flag to indicate whether or not the respective
function driver should indicate the timestamp along with the received
packet.

Also, make certain fields in vxge_hw_device_config bit-fields to reduce
the size of the struct.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 11:22:33 -07:00
David S. Miller d83d282bcb s2io: Fix warnings due to -Wunused-but-set-variable.
Most of these are cases where we are trying to read back a register
after a write to ensure completion.

Simply pre-fixing the readl() or readq() with "(void)" is sufficient
because these are volatile operations and the compiler cannot eliminate
them just because no real assignment takes place.

The case of free_rxd_blk()'s assignments to "struct buffAdd *ba" is a
real spurious assignment as this variable is completely otherwise
unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jon Mason <jdmason@kudzu.us>
2011-04-12 11:21:30 -07:00
Ben Hutchings d4fabcc8e8 sfc: Do not use efx_process_channel_now() in online self-test
During self-tests we use efx_process_channel_now() to handle
completion and other events synchronously.  This disables interrupts
and NAPI processing for the channel in question, but it may still be
interrupted by another channel.  A single socket may receive packets
from multiple net devices or even multiple channels of the same net
device, so this can result in deadlock on a socket lock.

Receiving packets in process context will also result in incorrect
classification by the network cgroup classifier.

Therefore, we must only use efx_process_channel_now() in the offline
loopback tests (which never deliver packets up the stack) and not for
the online interrupt and event tests.

For the interrupt test, there is no reason to process events.  We
only care that an interrupt is raised.

For the event test, we want to know whether events have been received,
and there may be many events ahead of the one we inject.  Therefore
remove efx_channel::magic_count and instead test whether
efx_channel::eventq_read_ptr advances.  This is currently an event
queue index and might wrap around to exactly the same value, resulting
in a false negative.  Therefore move the masking to efx_event() and
efx_nic_eventq_read_ack() so that it cannot wrap within the time of
the test.

The event test also tries to diagnose failures by checking whether an
event was delivered without causing an interrupt.  Add and use a
helper function that only does this.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-04-12 16:37:54 +01:00
Neil Turton 9d1aea62e4 sfc: Stop the TX queues during loopback self-tests
If the TX queues are running during loopback self tests, host
traffic gets looped back which causes the test to fail.  Avoid
restarting the TX queues after the port reset so that any packets
sent by the host get held back until after the tests have completed.

[bwh: Also wake all TX queues at the end of self-tests.]

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-04-12 16:20:25 +01:00
David S. Miller f344c25dba niu: Fix warnings due to -Wunused-but-set-variable
Most of these were legitimate, and once case was a real bug
(not propagating errors from ->xcvr_init() methods).

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 15:49:26 -07:00
David S. Miller 1c01a80cfe Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/smsc911x.c
2011-04-11 13:44:25 -07:00
Ben Hutchings c44d79950b niu: Recognise original ethtool class code for AH/ESP flow hashing
When the RX network flow classification interface was originally
defined for reporting and controlling of flow hashing, AH and ESP were
not given distinct flow class codes (apparently because the Sun
Neptune hardware treats them very similarly).

For flow steering, they must be distinguished, so new and separate
flow class codes were added for AH and ESP.  But for backward-
compatibility, flow hash operations should continue to support the
original class codes.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:28:44 -07:00
Ben Hutchings bde3528f17 gianfar: Clean up implementation of RX network flow classification
This code was cribbed from niu, so gfar_set_hash_opts() begins by
converting the ethtool flow class code into a class code for Sun
Neptune hardware, then does the same thing again for the hardware it's
really dealing with.  It may also return -1 (-EPERM) for some
unhandled ethtool flow class codes.

Remove the useless code and definitions, and fix the error code.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:28:43 -07:00
stephen hemminger 1b3291241a qlge: use ethtool set_phys_id
This is a stab at replacing old ethtool phys_id with set_phys_id
on the Qlogic 10Gb driver. Compile tested only.

Not sure if set_led_cfg will flash continuously, or needs
to be replaced by ETHTOOL_ID_ON/ETHTOOL_ID_OFF

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:22:34 -07:00
amit salecha c968bdf691 netxen: limit skb frags for non tso packet
Machines are getting deadlock in four node cluster environment.
All nodes are accessing (find /gfs2 -depth -print|cpio -ocv > /dev/null)
200 GB storage on a GFS2 filesystem.
This result in memory fragmentation and driver receives 18 frags for
1448 byte packets.
For non tso packet, fw drops the tx request, if it has >14 frags.

Fixing it by pulling extra frags.

Cc: stable@kernel.org
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:57 -07:00
Peter Pan(潘卫平) 77c8e2c015 bonding:fix two typos
replace relpy with reply.
replace premanent with permanent.

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:56 -07:00
Peter Pan(潘卫平) 9814290ad0 net: fix tranmitted/tranmitting typo
replace tranmitted with transmitted.
replace tranmitting with transmitting.

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:56 -07:00
Peter Pan(潘卫平) 26f007b85a bonding:delete unused rlb_interval_counter
Now, alb_bond_info uses rx_ntt,rlb_update_delay_counter and
rlb_update_retry_counter to decide when to call rlb_update_rx_clients().

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:55 -07:00
Peter Pan(潘卫平) 3b64756845 bonding:delete unused alb_timer
Now bonding-alb uses delayed_work instead of timer_list.

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:55 -07:00
Peter Pan(潘卫平) 38dbaf0afb bonding:set save_load to 0 when initializing
It is unnecessary to set save_load to 1 here,
as the tx_hashtbl is just kzalloced.

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:54 -07:00
Giuseppe CAVALLARO a08070acd4 stmmac: fix Transmit Underflow error
On some old MAC chips without COE sometime the
Transmit Underflow error is issued.

The driver aborted all the transmission process
and initialized it from scratch.
This breaks the network activity as raised by Nachiketa
on a SPEAr board.

The patch is to fix this rare underflow event.
The driver will only clear the interrupt and the Tx
DMA will go out the Suspend state as soon as the
descriptor is fetched again.
The driver will continue to bump-up the DMA FIFO threshold
that, indeed, helped somebody to prevent this kind of error
in the past as well.

Reported-by: Nachiketa Prachanda <nprachanda@ncomputing.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 12:55:48 -07:00
Giuseppe CAVALLARO f66ffe2859 stmmac: fix open funct when exit on error
This patch reviews the open function and fixes some
errors when exit with an error state.
It also moves the request_irq after core is initialized
when interrupts are properly masked.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Hacked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 12:55:47 -07:00
Giuseppe CAVALLARO bded18c2dd stmmac: fixed dma lib build when turn-on the debug option
This patch fixes a compilation error when build the
dwmac_lib with the DEBUG option enabled.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 12:55:47 -07:00
David S. Miller 0e10b33a05 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2011-04-11 12:53:51 -07:00
John W. Linville 4a39e78168 iwlegacy: make iwl3945 and iwl4965 select IWLWIFI_LEGACY
Otherwise, IWLWIFI_LEGACY has to be selected independently before the
drivers are made available.

Reported-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-11 13:56:07 -04:00
Linus Torvalds b42282e5a0 pci: fix PCI bus allocation alignment handling
In commit 13583b1659 ("PCI: refactor io size calculation code") Ram
had a thinko in the refactorization of the code: the end result used the
variable 'align' for the bus alignment, but the original code used
'min_align'.

Since then, another use of that 'align' variable got introduced by
commit c8adf9a3e8 ("PCI: pre-allocate additional resources to devices
only after successful allocation of essential resources.")

Fix both of those uses to use 'min_align' as they should.

Daniel Hellstrom <daniel@gaisler.com>
Acked-by: Ram Pai <linuxram@us.ibm.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-11 10:53:11 -07:00
Linus Torvalds c44eaf41a5 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: (34 commits)
  net: Add support for SMSC LAN9530, LAN9730 and LAN89530
  mlx4_en: Restoring RX buffer pointer in case of failure
  mlx4: Sensing link type at device initialization
  ipv4: Fix "Set rt->rt_iif more sanely on output routes."
  MAINTAINERS: add entry for Xen network backend
  be2net: Fix suspend/resume operation
  be2net: Rename some struct members for clarity
  pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev
  dsa/mv88e6131: add support for mv88e6085 switch
  ipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2)
  be2net: Fix a potential crash during shutdown.
  bna: Fix for handling firmware heartbeat failure
  can: mcp251x: Allow pass IRQ flags through platform data.
  smsc911x: fix mac_lock acquision before calling smsc911x_mac_read
  iwlwifi: accept EEPROM version 0x423 for iwl6000
  rt2x00: fix cancelling uninitialized work
  rtlwifi: Fix some warnings/bugs
  p54usb: IDs for two new devices
  wl12xx: fix potential buffer overflow in testmode nvs push
  zd1211rw: reset rx idle timer from tasklet
  ...
2011-04-11 07:27:24 -07:00
Steve Glendinning 88edaa4159 net: Add support for SMSC LAN9530, LAN9730 and LAN89530
This patch adds support for SMSC's LAN9530, LAN9730 and LAN89530 USB
ethernet controllers to the existing smsc95xx driver by adding
their new USB VID/PID pairs.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:59:27 -07:00
Michał Mirosław 8d7dfc2b57 net: bnx2: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:21 -07:00
Michał Mirosław f593fe3632 net: via-velocity: convert to hw_features
Trivial conversion.

This also enables toggling TX VLAN offload and fixes TX checksumming
race with offload changes.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:21 -07:00
Michał Mirosław e6a46416d4 net: ksz884x: convert to hw_features
This also fixes possible race when changing receive checksum state
and removes IPV6_CSUM_GEN_HACK as it's always set.

BTW, The claim about fake IPV6 checksum looks dubious. If that were true,
then there's a problem in networking core and should be fixed there and not
in random drivers.

BTW#2, there's no MAINTAINERS entry for this driver. I assume this driver
is supported by Micrel?

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:20 -07:00
Michał Mirosław 5e982f3bfd net: stmmac: convert to hw_features
This also removes TSO as it's made fully in software --- better to leave this
to networking core.

If the MAC features can be detected at probe time and not at open, then
stmmac_fix_features could be simplified by limiting hw_features. That's
also better for users as they don't see offloads being togglable but
never turned on.

Redundant fallbacks for TX csum are removed as it's already handled
by network core.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:19 -07:00
Michał Mirosław 044a890c5a net: 8139cp: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:19 -07:00
Michał Mirosław 350fb32ae4 net: r8169: convert to hw_features
Simple conversion with a bit of needed cleanup.

This also fixes:
 - confusion around vlan_features in rtl8169_vlan_mode(),
 - problem with broken TSO for too big MTU (the limit is set
   at 0xFFF --- max MSS field value).

SG+IP_CSUM+TSO is left disabled by default, based on suggestion by
David Dillow.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:18 -07:00
Michał Mirosław 8b8ddc68df net: benet: convert to hw_features - fixup
Fix up after merge with NETIF_F_RXHASH implementation.

This allows to toggle NETIF_F_RXHASH and NETIF_F_HW_VLAN_TX.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:18 -07:00
Michał Mirosław 4e01d2d1ca net: Remove invalid offloads
Remove offload changing ethtool ops which drivers don't really support:

 - fs_enet
 - ucc_geth

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:17 -07:00
simon 5325e92f33 usb: plusb: Add debug to reset function
This patch adds some debug to the reset function to print out the
reason why it fails.

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:46:45 -07:00
simon 647da406e5 usb: plusb: Add support for PL-25A1
This patch adds support for the PL-25A1 by adding the appropriate
USB ID's. This chip is used in the Belkin 'Windows Easy Transfer'
Cables.

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:46:44 -07:00
simon 6e4d2d9eb2 usb: plusb: Whitespace
This patch cleans up a couple of instances of incorrect whitespace

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:46:44 -07:00
Linus Torvalds 510ec7bc3b Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
  mtd: atmel_nand: use CPU I/O when buffer is in vmalloc(ed) region
  mtd: atmel_nand: modify test case for using DMA operations
  mtd: atmel_nand: fix support for CPUs that do not support DMA access
  mtd: atmel_nand: trivial: change DMA usage information trace
  mtd: mtdswap: fix printk format warning
2011-04-09 13:23:50 -07:00
Dimitris Michailidis 857a3d0fb6 cxgb4vf: drop phys_id interface and implement the newer set_phys_id
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-08 13:07:08 -07:00
Dimitris Michailidis c5e0636031 cxgb4: drop phys_id interface and implement the newer set_phys_id
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-08 13:06:25 -07:00
Michael Chan 93ae653491 cnic: Fix rtnl deadlock
When cnic_stop_hw() -> cnic_cm_stop_bnx2x_hw() is called under rtnl_lock()
from NETDEV_DOWN event, it waits for cnic_delete_task() to complete.
It will deadlock when cnic_delete_task() takes rtnl_lock() before
calling cnic_ulp_stop_one().

We fix it by removing the rtnl_lock() in cnic_delete_task().
cnic_ulp_stop_one() has mutex and atomic bit ops to prevent important
operations from being done more than once, so it is not necessary to take
rtnl_lock().

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-08 13:03:02 -07:00
Jason Conti a6756da9ea p54: Initialize extra_len in p54_tx_80211
This patch fixes a very serious off-by-one bug in
the driver, which could leave the device in an
unresponsive state.

The problem was that the extra_len variable [used to
reserve extra scratch buffer space for the firmware]
was left uninitialized. Because p54_assign_address
later needs the value to reserve additional space,
the resulting frame could be to big for the small
device's memory window and everything would
immediately come to a grinding halt.

Reference: https://bugs.launchpad.net/bugs/722185

Cc: <stable@kernel.org>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Jason Conti <jason.conti@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-08 13:06:30 -04:00
Felix Fietkau 96f372c95d ath9k: fix missing ath9k_ps_wakeup/ath9k_ps_restore calls
These missing chip wakeups mainly cause crashes on AR5416 cards in MIPS
boards, but have also been reported to cause radio stability issues on
AR9285.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-08 13:06:30 -04:00
Johannes Berg 6fc3ba9999 iwlagn: downgrade warning on unknown TLV
If we maintain API properly, then there isn't
really a reason to warn about this since we'll
just be adding things that are safe to ignore,
so downgrade the warning to debug info level.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:19:11 -07:00
Johannes Berg 0da0e5bf15 iwlagn: clean up & autodetect statistics
There's no need to keep both normal and BT statistics
versions around all the time in memory when we only
use a subset of both. So keep only the subsets that
we need in memory, depending on the debug config).

Also, in doing so, we can remove all the calls to
iwl_bt_statistics() in the driver as we'll just
access the copied statistics now.

Finally, also remove this call from the one place
where it might still be needed and automatically
detect what kind of statistics the device is sending
based on their size. This way, we don't need to keep
track of which devices do what any more, which is
good since this is subject to change based on the
ucode version (as some ucode even for non-BT devices
will in fact use BT statistics).

Warn upon encountering a statistics command from the
ucode that isn't known, so we will find such issues
earlier in the future.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:19:00 -07:00
Wey-Yi Guy 703bc583cb iwlagn: sensitivity and chain noise done by driver
_agn driver should perform both sensitivity and chain noise calib.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:02:03 -07:00
Wey-Yi Guy ae89726a02 iwlagn: tx power calib always done in firmware
Remove the config flag for tx power calib

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:01:55 -07:00
Wey-Yi Guy 23c0fcc66b iwlagn: all _agn devices support power save mode
Remove broken_power_save checking

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:01:46 -07:00
Wey-Yi Guy 8ff84a2c99 iwlagn: more cleanup to remove unused reference
More cleanup code, no functional changes

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:01:37 -07:00
Wey-Yi Guy 15ade3ca64 iwlagn: remove un-needed configuration
After driver split, set_l0s config is no longer needed, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:01:18 -07:00
Wey-Yi Guy 6bb64697ed iwlagn: remove more reference to legacy devices
Remove the reference to both 3945 and 4965 in LED code

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:01:00 -07:00
Wey-Yi Guy ee3cd7e04c iwlagn: cleanup to remove the reference for 3945
More clean up after driver split

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:00:46 -07:00
Wey-Yi Guy ab4bf5ef5a iwlagn: remove unused 3945 define
3945 no longer apply

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:00:30 -07:00
Wey-Yi Guy ece3cd2e8f iwlagn: no 3945 define needed
Remove 3945 define

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:00:19 -07:00
Wey-Yi Guy dcf6640f0f iwlagn: PAPD read for 2000 series devices
For 2000 series NICs, disable OTP refresh in order to read correct
PAPD table from high OTP block

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 08:00:11 -07:00
Johannes Berg a2b76b3b31 iwlwifi: fix bugs in change_interface
If change_interface gets invoked during a firmware
restart, it may crash; prevent that from happening
by checking if ctx->vif is assigned.

Additionally, in my initial commit I forgot to set
the vif->p2p variable correctly, so fix that too.

Cc: stable@kernel.org [2.6.38+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 07:59:53 -07:00
Garen Tamrazian 68b993118f iwlagn: fix radar frame rejection
The microcode may sometimes reject TX frames when
on a radar channel even after we associated as it
clears information during association and needs to
receive a new beacon before allowing that channel
again. This manifests itself as a TX status value
of TX_STATUS_FAIL_PASSIVE_NO_RX. So in this case,
stop the corresponding queue and give the frame
back to mac80211 for retransmission. We start the
queue again when a beacon from the AP is received
which will make the regulatory enforcement in the
device allow transmitting again.

Signed-off-by: Garen Tamrazian <garenx.tamrazian@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 07:59:37 -07:00
Wey-Yi Guy 3ecccbcd3c iwlagn: remove un-necessary function pointer
After driver split, no need to use function pointer for those event and
register dump function.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 07:59:25 -07:00
root 1d5cc5559a iwlwifi: remove extranious macro from firmware define
define of firmware filenames use extra macro to build the files name.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 07:59:01 -07:00
Linus Torvalds bb3c90f0de Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] compile fix for latest binutils
  [S390] cio: prevent purging of CCW devices in the online state
  [S390] qdio: fix init sequence
  [S390] Fix parameter passing for smp_switch_to_cpu()
  [S390] oprofile s390: prevent stack corruption
2011-04-08 07:36:14 -07:00
Yevgeny Petrilin 60b1809f7e mlx4_en: Restoring RX buffer pointer in case of failure
If not done, second attempt to open the RX ring would cause memory corruption.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 20:36:13 -07:00
Yevgeny Petrilin ab6dc30da5 mlx4: Sensing link type at device initialization
When bringing the port up, performing a SENSE_PORT command
To try and check to which physical link type (IB or Ethernet) the physical
port is connected.
In case there is no valid link partner, the port will come up as its
supported default.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 20:36:12 -07:00
Michał Mirosław 782d640afd net: atl*: convert to hw_features
Things left as they were:
 - atl1: is RX checksum really enabled?
 - atl2: copy-paste from atl1, with-errors-on-modify I presume
 - atl1c: there's a bug: MTU can't be changed if device is not up

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 20:19:01 -07:00
Michał Mirosław dc668910f4 net: tg3: convert to hw_features
Cleanup hint: Some features are calculated in tg3_get_invariants() and
the rest in its caller --- tg3_init_one(). This is not changed here.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 20:16:58 -07:00
Michał Mirosław 5ec8f9b8e6 net: enic: convert to hw_features
As the driver uses GRO and not LRO, LRO settings are ignored anyway
and are removed here to avoid confusion.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 20:16:58 -07:00
Michał Mirosław 6332c8d3a5 net: benet: convert to hw_features
Simple conversion.

This also fixes a bug in TX checksum toggling --- driver was changing
NETIF_F_HW_CSUM instead of NETIF_F_IP_CSUM+NETIF_F_IPV6_CSUM.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 20:16:57 -07:00
Michał Mirosław e92702b104 skge: convert to hw_features
just IP_CSUM.  This needs testing and so is not changed here.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 20:15:49 -07:00
Ajit Khaparde 5784186919 be2net: call FLR after setup wol in be_shutdown
Calling setup_wol after a reset is inconsequential.
The WOL setting should be programmed before FLR.
And yes, FLR does not erase wol information.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 15:05:00 -07:00
Ajit Khaparde 48f5a19168 be2net: dynamically allocate adapter->vf_cfg
Instead of a fixed sized array for vf_cfg, allocate the size dynamically
depending on number of VFs the device supports.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 15:04:45 -07:00
Ajit Khaparde 81be8f0ab4 be2net: fix to get max VFs supported from adapter
The user supplied num_vfs value need not be compared
against a static BE_MAX_VF, but can be checked against
the actual VFs that the device can support.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 15:04:45 -07:00
Ajit Khaparde b0060586d2 be2net: use common method to check for sriov function type
Lancer and BE can both use SLI_INTF_REG to check a VF or a PF.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 15:04:44 -07:00
Ajit Khaparde 4b97291429 be2net: add rxhash support
Add rxhash support,
Based on initial work by Eric Dumazet.

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-07 15:04:44 -07:00
David S. Miller c1e48efc70 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/benet/be_main.c
2011-04-07 14:05:23 -07:00
John W. Linville b37e3b6d64 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/rtlwifi/efuse.c
	drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
	net/bluetooth/mgmt.c
2011-04-07 16:45:40 -04:00
Linus Torvalds 0c3efe54d0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  watchdog: mpc8xxx_wdt: fix build
2011-04-07 13:34:41 -07:00
Peter Korsgaard d856b41846 watchdog: mpc8xxx_wdt: fix build
Since 1c48a5c93d (dt: Eliminate of_platform_{,un}register_driver)
mpc8xxx_wdt no longer builds as it tries to refer to a 'match' variable
rather than ofdev->dev.of_match that it checks just before.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2011-04-07 20:20:24 +00:00
Johannes Berg 02a7fa00a6 iwlagn: move IO functions out of line
This generates a massive reduction in module size:
with debug:
   text	   data	    bss	    dec	    hex	filename
 670300	  13136	    420	 683856	  a6f50	iwlagn.ko (before)
 388347	  13136	    408	 401891	  621e3	iwlagn.ko (after)

without debug:
   text	   data	    bss	    dec	    hex	filename
 528575	  13072	    420	 542067	  84573	iwlagn.ko (before)
 294192	  13072	    408	 307672	  4b1d8	iwlagn.ko (after)

This also removes all the IO debug functionality since
it can easily be replaced by tracing, and makes the
code unnecessarily complex.

I haven't done any CPU utilisation measurements, but
given that the hotpaths don't use much IO it is not
likely to have a negative impact; in fact, the size
reduction will reduce cache pressure which possibly
improves performance.

Finally, an unused function or two were removed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:52:28 -04:00
Johannes Berg 519d8abd35 iwlagn: remove ISR ops
The ISR (interrupt service routine) ops are now
no longer necessary since they are the same for
all devices this driver now handles.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:52:28 -04:00
Johannes Berg 0e5884458e iwlagn: remove rxb page bookkeeping
We never use the value in alloc_rxb_page,
so there's no point in keeping it either.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:40 -04:00
Johannes Berg c2974a1d18 iwlagn: remove rev_id
The rev_id variable is only printed, we
don't need to store it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:40 -04:00
Johannes Berg e98a130259 iwlagn: remove hw_rev
The hw_rev variable is used only during init,
so there's no need to keep it around.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:39 -04:00
Johannes Berg bc25593063 iwlagn: remove hw_wa_rev
The variable is never used.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:39 -04:00
Johannes Berg 917b6777b4 iwlagn: remove BSM clock setting
Again, a 4965 specific code path that we no
longer need in iwlagn.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:39 -04:00
Johannes Berg 17445b8c44 iwlagn: init cmd_queue earlier
We know after loading the ucode whether it will
support PAN or not, so we can also initialise
the cmd_queue variable much earlier.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:39 -04:00
Johannes Berg d7d5783c66 iwlagn: clean up alive handling
Devices newer than 4965 don't actually send
two different versions of the ALIVE command,
so we always had a bug here since before this
patch we copy more data than we got. Remove
the iwl_init_alive_resp struct and don't use
it.

Since we also really don't need to track all
the data received in ALIVE as we only use the
error and log event tables later, we can also
save space by just keeping those and not more
data around in memory.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:38 -04:00
Johannes Berg 3d09cdff23 iwlagn: fix ucode verify message
My previous patch left a message talking about
bootstrap, but that's clearly bogus.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:38 -04:00
Johannes Berg 3997ff39fa iwlagn: add feature flags
Some new devices and microcode files will a greater
variety of features, so the TLV-per-feature approach
we took before will quickly make things harder to
manage and increase the file size.

Add a new TLV that has feature flags. Currently, it
will contain:
 1) a PAN feature flag, which moves from a separate
    TLV
 2) a new BT stats bit that indicates whether the
    microcode image uses bluetooth statistics
 3) a new MFP flag for management frame protection
    which can be enabled once the device/microcode
    supports it

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:38 -04:00
Wey-Yi Guy 7415952ff7 iwlagn: check more error return code
In alive notify, we should check return code instead of assume everything ok

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:38 -04:00
Wey-Yi Guy 901069c714 iwlagn: change Copyright to 2011
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:37 -04:00
Johannes Berg 6009c39c6f iwlagn: remove ucode_data_backup
This was used only on 4965 in conjunction with
the bootstrap ucode.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:37 -04:00
Johannes Berg e649437fd6 iwlagn: centralize and fix ucode restart
The ucode restart has to take into account a number
of things, like clearing the HCMD_ACTIVE and other
status bits, and waking up the wait_command_queue.
Currently, however, there are a number of places
that neither do that, nor actually set the FW error
bit that leads to proper restart handling, which
means that in those cases things will probably just
hang completely.

To clean this up, make all ucode restart go through
a single function, except for the cases where it's
called during firmware loading.

Also fix a bug in wimax coexist restart avoidance,
it needs to first clear the status bits (and it has
to clear the HCMD_ACTIVE one as well) and then wake
up anything waiting on wait_command_queue.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:37 -04:00
Johannes Berg 1fc352765f iwlagn: remove bootstrap code
Only 4965 had a bootstrap microcode image, so
the agn driver can completely ignore that and
we can remove some code from it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:36 -04:00
Johannes Berg 35b1d92dfb iwlagn: verify specific ucode
When we loaded a ucode, there's no point in
checking any one that is present, we know
which one is supposed to be present so also
verify that it is exactly the right one.

That also simplifies the code and makes it
faster since it doesn't have to check all.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:36 -04:00
Johannes Berg fb66216f9e iwlagn: simplify ucode check code
The code in iwlcore_verify_inst_sparse really
doesn't need to keep track of the number of
errors it encountered since a single one is
fatal.

Also, the code in iwl_verify_inst_full is just
used to print out some things, so rename it to
iwl_print_inst and don't give it a return code
and just make it print out the values.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:36 -04:00
Wey-Yi Guy 36127db02e iwlagn: return send calibration result
In alive notification call, return the status from iwl_send_calib_results()

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:35 -04:00
Johannes Berg 08960dea6c iwlagn: remove pointless return variables
A number of places just use a variable to return
it right away, which is useless, so let's remove
the variables there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:35 -04:00
Wey-Yi Guy 4de10b1880 iwlagn: remove more 3945/4965 related defines
After driver split, remove unused #defines

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:35 -04:00
Johannes Berg 7102762ef0 iwlagn: clean up ucode loading
All agn devices behave the same, so there's no
need to go through function pointers for any
of the ucode loading functionality.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:35 -04:00
Johannes Berg 2dedbf58b2 iwlagn: make mac80211 handlers static
Now that these handlers are no longer shared
between 4965 and agn, they can be static.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:49:42 -04:00
Johannes Berg 3240cab3dd iwlagn: clean up some 3945/4965 remnants
When the driver was split, a bunch of definitions
for the 3945 and 4965 devices stayed around, but
they're now useless so remove (some of) them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:49:41 -04:00
Johannes Berg 68e022dfeb iwlagn: remove unused variable
Some code was removed, but a variable it used
and that is now unused stayed around, kill it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:49:41 -04:00
Michal Marek cebb28ba1e rt2x00: Drop __TIME__ usage
The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:49:41 -04:00
Nishant Sarmukadam 0321708748 mwl8k: Do not configure tx power unconditionally
Instead of configuring tx power unconditionally, check for
IEEE80211_CONF_CHANGE_POWER and configure it only when stack
sets this flag

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:49:40 -04:00
Rajkumar Manoharan 99e4d43ad5 ath9k: configure beacons based on hw opmode
Current ath9k code does not handle beacon timers on opmode
specific. One such example is that a STA beacon config overwrites
already configured AP vif's beacon timers during scan.

On multi station vif case, configure beacon timers beased
on primary vif selected. This also helps while moving back
to single STA vif from multi STA vifs, where the power save
is enabled and hw has to be reconfigured with proper
beacon and bssid/aid. Otherwise connection poll will be triggered
so frequently due to beacon loss.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:49:40 -04:00
Linus Torvalds 132452ee23 Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6:
  efifb: Add override for 11" Macbook Air 3,1
  efifb: Support overriding fields FW tells us with the DMI data.
  fb: Reduce priority of resource conflict message
  savagefb: Remove obsolete else clause in savage_setup_i2c_bus
  savagefb: Set up I2C based on chip family instead of card id
  savagefb: Replace magic register address with define
  drivers/video/bfin-lq035q1-fb.c: introduce missing kfree
  video: s3c-fb: fix checkpatch errors and warning
  efifb: support AMD Radeon HD 6490
  s3fb: fix Virge/GX2
  fbcon: Remove unused 'display *p' variable from fb_flashcursor()
  fbdev: sh_mobile_lcdcfb: fix module lock acquisition
  fbdev: sh_mobile_lcdcfb: add blanking support
  viafb: initialize margins correct
  viafb: refresh rate bug collection
  sh: mach-ap325rxa: move backlight control code
  sh: mach-ecovec24: support for main lcd backlight
2011-04-07 12:49:17 -07:00
Linus Torvalds 26cf445721 Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: select ARCH_NO_SYSDEV_OPS.
  sh: fix build error in board-sh7757lcr.c
  sh: landisk: Remove whitespace
  sh: landisk: Remove mv_nr_irqs
  sh: sh-sci: Fix double initialization by serial_console_setup
  serial: sh-sci: prevent setup of uninitialized serial console
  dma: shdma: add checking the DMAOR_AE in sh_dmae_err
2011-04-07 12:48:45 -07:00
Rajkumar Manoharan 4f5ef75b15 ath9k: Handle BSSID/AID for multiple interfaces
As of now bssid/aid is overridden with recently changed vif's
bss config. This may cause improper beacon updation due to
bssid/aid mismatch. On station mode, select an associated
sta vif as primary vif and configure that vif's bss into hw.
Update the primary vif on interface change and bss info change.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:34:15 -04:00
Rajkumar Manoharan 66da424177 ath9k: Cleanup ath_vif struct
Remove unused bssid from ath_vif and set av_bslot on beacon
alloc/return.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:34:15 -04:00
Rajkumar Manoharan 59575d1c71 ath9k: deny new interface addtion on IBSS mode
The present check denies the IBSS interface addtion if we
already have any other vifs. But it fails to deny interface
addition if IBSS was already present.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:34:15 -04:00
Jarkko Nikula 1e5f52de21 wl1251: Add support for idle mode
On Nokia N900 the wl1251 consumes the most power when the interface is up
but not associated to access point (that supports PSM). In terms of battery
current consumption, the consumption is ~180 mA higher when the interface is
up but not associated and only ~5 mA higher when associated compared to
interface down and driver not loaded cases.

This patch adds support for the mac80211 idle notifications. Chip is put into
idle very much the same way when entering into PSM by utilizing the Extreme
Low Power (ELP) mode. I.e. idle is entered by setting necessary conditions
in wl1251_ps_set_mode followed by a call to wl1251_ps_elp_sleep.

It seems it is just enough the authorize ELP mode followed by
CMD_DISCONNECT (thanks to Kalle Valo about the idea to use it).
Without disconnect command the chip remains somewhat active and stays
consuming ~20 mA. Idle mode is left by same way than PSM. The wl1251_join
call is used to revert the CMD_DISCONNECT. Without it association to AP
doesn't work when trying second time.

With this patch the interface up but not associated case the battery current
consumption is less than 1 mA higher compared to interface down case.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:34:14 -04:00
Jarkko Nikula a0bbb58bcb wl1251: Prepare for idle mode support
RFC for WL1251 idle mode support brought a few issues that are worth to
update before adding the idle mode support.

Since the idle mode can reuse the code that is now used in Power Save Mode
(PSM), the flag psm in struct wl1251 is changed to variable station_mode
to be able to distinguish between PSM and idle modes.

As the station mode is different than the power power save mode command
that is sent to chip, the enum wl1251_cmd_ps_mod values are used only when
communicating with the chip and new enum wl1251_station_mode values are used
inside the driver.

Confusing comment about psm and elp relation is removed since the PSM is
actually activated by putting the chip into Entreme Low Power (ELP) mode.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:34:14 -04:00
Jussi Kivilinna fbd5d17b8e zd1211rw: rename CR* macros to ZD_CR*
With compat-wireless CR* macros in zd_usb.h conflict with CR macros in
include/asm-generic/termbits.h. So rename CR* macros to ZD_CR*.

Conversion was done with using sed and then 'over 80 character line'
checkpatch.pl warnings and comment indents were fixed.

Reported-by: Walter Goldens <goldenstranger@yahoo.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:34:13 -04:00