Commit graph

16724 commits

Author SHA1 Message Date
Juuso Oikarinen 7a38079e0d wl1271: Set IEEE80211_FCTL_TODS in the null data template
Set the IEEE80211_FCTL_TODS bit in the FC of the null data template.
This is a mandatory requirement in specification.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Cc: Vidhya Govindan <vidhya.govindan@nokia.com>
Cc: Janne Ylälehto <janne.ylalehto@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:18 -04:00
Bob Copeland e5e2647fd6 ath5k: use noise calibration from madwifi hal
This updates ath5k to calibrate the noise floor similar to the
way it is done in the madwifi hal and ath9k.  Of note:

- we start NF measurement at the same time as AGC calibration,
  but do not actually read the value until the periodic (long)
  calibration
- we keep a history of the last few values read and write the
  median back to the hardware for CCA
- we do not complain if NF calibration isn't complete, instead
  we keep the last read value.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:18 -04:00
Marek Lindner e307fcf0a1 ath9k: adjust ahb callbacks to new struct layout to avoid compile errors
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:18 -04:00
Holger Schurig 6d898b1983 libertas: make __lbs_cmd_async() non-static
This function will be needed for the cfg80211-enabled libertas driver.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:17 -04:00
Kalle Valo 40f54242ae wl1251: rename spi device to wl1251
During rename of the driver from wl12xx to wl1251 the spi device name
was accidentally left as wl12xx. Rename it to wl1251 which is the proper
name of the driver.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:17 -04:00
Juuso Oikarinen b54853f1b1 wl1271: Fix filter configuration
Fix the filter configuration to properly work with the two phase filter
configuration (prepare_multicast/configure_filter.)

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:16 -04:00
Luciano Coelho bd5ea18f7b wl1271: make sure PS is disabled in PLT
We cannot be in PS mode when running PLT tests, so we need to make sure we're
in active mode.  Also, we need to clear up the rx_counter when we stop PLT,
otherwise it could cause problems when entering PLT again.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:16 -04:00
Juuso Oikarinen ed317788b9 wl1271: Correct memory handling for FW boot
Several memory allocation related failure cases were not properly
handled by the driver - the result was that in low memory conditions
booting of a corrupted FW could be attempted - and user space would not
get proper failure code.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:16 -04:00
Juuso Oikarinen a163acce48 wl1271: Remove unnecessary rx_descriptor memory allocation
Remove unnecessary RX descriptor memory allocation from the driver. The
allocation was a remnant of the wl1251 driver.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:15 -04:00
Juuso Oikarinen 01c09162cd wl1271: Support for IPv4 ARP filtering
Add support for IPv4 ARP filtering in the driver. This will dramatically
reduce the number of unnecessary interrupts by the device in conqested
networks.

This patch is based on a similar patch to wl1251 by Janne Ylälehto.

Cc: Janne Ylälehto <janne.ylalehto@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:14 -04:00
Juuso Oikarinen 1fd2794f36 wl1271: Fix event handling mechanism
The event handling mechanism could miss events if multiple events would
occur simultaneously. Fix event handling mechanism to process all
events.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:11 -04:00
Juuso Oikarinen 7444113017 wl1271: Fix multicast list handling
Fixes bugs in the multicast list handling:
 - Use atomic memory allocation in non-sleepable context
 - Increment address pointer when iterating list of MC addresses

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:11 -04:00
Teemu Paasikivi 5d07b668f2 wl1271: Checking of rx descriptor status fixed
Fixed checking of status of the received packet. On wl1251 status is in the
flags field of the descriptor, on wl1271 there is a separate status field.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:11 -04:00
Teemu Paasikivi a410264553 wl1271: Added 5 GHz support to join and rx
Added support to assiociate and use connection on 5 GHz band (802.11a).

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:11 -04:00
Teemu Paasikivi abb0b3bfb2 wl1271: Added support to scan on 5 GHz band
Added support to scan 802.11a access points on 5 GHz band when using
wl1273 chip.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:10 -04:00
Teemu Paasikivi 311494c47f wl1271: Scan only enabled channels
Added checking of whether channel is enabled or disabled by mac80211
stack to scan. Disabled channels are not scanned.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:10 -04:00
Teemu Paasikivi 1ebec3d750 wl1271: Added 5 GHz parameters for wl1273
Added data rate and frequency tables for 5 GHz band channels, 5
GHz radio configration parameters and configuration option to enable
802.11 support.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:10 -04:00
Juuso Oikarinen c6d5d06e45 wl1271: Remove busy-word checking
Remove busy-word checking to work around an SPI bug. To reduce the
chance of chipset-busy scenarios, increment the number of fixed busy
words.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:10 -04:00
Juuso Oikarinen 11f70f9715 wl1271: Implement beacon early termination support
Add support to enable beacon early termination in the firmware. Early
Beacon termination is a feature which allows the radio to be turned off
after TIM IE to save power.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:09 -04:00
Juuso Oikarinen eb5b28d021 wl1271: Fix IRQ enable handling on FW init failure
Disable IRQ's after FW initialization failure - originally this was not
done in all cases, and it resulted in a kernel warning if firmware
initialization was tried again without reboot.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:09 -04:00
Juuso Oikarinen 8a08048a37 wl1271: Move default FW config struct away from stack
Move the default FW config into a module global static variable, instead
of being a stack variable.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:09 -04:00
Juuso Oikarinen 47fab7d589 wl1271: Add config structure for FW init parameters
Add a configuration structure for RX path parameters, and set default
configuration values there.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:08 -04:00
Juuso Oikarinen 51f2be2432 wl1271: Add config structure for connection management parameters
Add a configuration structure for connection management parameters, and
set default configuration values there.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:08 -04:00
Juuso Oikarinen 45b531a86f wl1271: Add config structure for TX path parameters
Add a configuration structure for TX path parameters, and set defalt
configuration values there.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:08 -04:00
Juuso Oikarinen 8793f9bb19 wl1271: Add config structure for RX path parameters
Add a configuration structure for RX path parameters, and set default
configuration values there.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:08 -04:00
Juuso Oikarinen 2b60100bf0 wl1271: Add structure for firmware configuration values
In order to make the firmware configuration more manageable, collect
hardcoded configuration values into one data structure, and set default values
there.

Add the SoftGemini BT/WLAN coex paramters into the config structure.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:07 -04:00
Juuso Oikarinen 2cc8d4db9d wl1271: Workaround for reference clock setting on boot.
If the 38.4MHz reference clock is configured to the firmware, it crashes
on boot. Configuring an experimental 38.4MHz in XTAL mode allows the
firmware to boot, and everything appears to work.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:07 -04:00
Zhu Yi 2f301227a1 iwlwifi: use paged Rx
This switches the iwlwifi driver to use paged skb from linear skb for Rx
buffer. So that it relieves some Rx buffer allocation pressure for the
memory subsystem. Currently iwlwifi (4K for 3945) requests 8K bytes for
Rx buffer. Due to the trailing skb_shared_info in the skb->data,
alloc_skb() will do the next order allocation, which is 16K bytes. This
is suboptimal and more likely to fail when the system is under memory
usage pressure. Switching to paged Rx skb lets us allocate the RXB
directly by alloc_pages(), so that only order 1 allocation is required.

It also adjusts the area spin_lock (with IRQ disabled) protected in the
tasklet because tasklet guarentees to run only on one CPU and the new
unprotected code can be preempted by the IRQ handler. This saves us from
spawning another workqueue to make skb_linearize/__pskb_pull_tail happy
(which cannot be called in hard irq context).

Finally, mac80211 doesn't support paged Rx yet. So we linearize the skb
for all the management frames and software decryption or defragmentation
required data frames before handed to mac80211. For all the other frames,
we __pskb_pull_tail 64 bytes in the linear area of the skb for mac80211
to handle them properly.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:06 -04:00
Luciano Coelho ae751bab9f wl1271: remove unnecessary joins and join only when the bssid changes
We were using the join command to change some settings when the stack asked
us to do it.  In many cases they were not needed (and could cause potential
problems), so they were removed.  In other cases there are ACX commands that
can be used instead of using join to reconfigure.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:06 -04:00
Luciano Coelho 0535d9f4f0 wl1271: use acx_rx_config instead of join when updating filters
We shouldn't use a join command to change the filter settings while
associated.  The right way to do it is to use ACX_RX_CFG.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:06 -04:00
Juuso Oikarinen 8bcfcb125b wl1271: Update boot time configuration for the new firmware
Update the magic values of the wl1271 boot time config according to the new
reference driver.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:06 -04:00
Juuso Oikarinen 7462141787 wl1271: Remove outdated SPI functions
With the change to the new firmware, there was a change to firmware memory
partitioning. Along with that change, the translation of all partitions was
unified, and separate functions for reg and mem access became unnecessary.

Cleanup the unnecessary functions.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:05 -04:00
Juuso Oikarinen 207347e498 wl1271: Update TX path block calucation algo
Update the TX path block calculation algorithm based on TI reference.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:05 -04:00
Juuso Oikarinen 3cfd6cf960 wl1271: Enable smart reflex
Enable and configure smart reflex. This should have a reducing impact on
power consumption.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:05 -04:00
Juuso Oikarinen 5d0af498c0 wl1271: Enable ELP
The new firmware has fixed a firmware crash problem related to ELP entry.
Enable ELP to conserve power.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:04 -04:00
Juuso Oikarinen c15f63bffa wl1271: Update interrupt handling by removing an extra SPI read
Remove separate interrupt register reading from the interrupt handling
routine. This will slightly improve interrupt performance.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:04 -04:00
Juuso Oikarinen 284134eb6f wl1271: RefClk configuration
Updated RefClk configuration based on reference sources. Apparently this
change will improve RF performance.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:04 -04:00
Juuso Oikarinen e8768eeb59 wl1271: Add top-register access functions
Add top register access function.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:04 -04:00
Juuso Oikarinen 732a1ad93e wl1271: Remove RX workaround
Remove RX workaround which is not needed with newer firmware revisions. This
will reduce one SPI register transaction per RX packet.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:03 -04:00
Juuso Oikarinen 451de97adb wl1271: Update memory mapping for firmware revision 6.1.0.0.241
Update the memory regions and memory mapping to support firmware revision
6.1.0.0.241.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:03 -04:00
Luciano Coelho 37079a831d wl1271: enable HW_AVAILABLE interrupt to fix ELP
We need to listen to HW_AVAILABLE interrupts when using ELP with firmware
revision 6.1.0.0.241.  Add WL1271_ACX_INTR_HW_AVAILABLE to the interrupts that
are enabled by default.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:03 -04:00
Luciano Coelho ac78403e14 wl1271: add workaround to avoid distortion due to excessive tx power
We still don't have proper calibration for our devices, so we are using way
too much power for TX, which causes a lot of distortion.  This hack hardcodes
the txpower to 7dBm.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:02 -04:00
Luciano Coelho d6e19d135d wl1271: workaround to send a disconnect before rejoining
We don't get any indication from the stack when we have disassociated.  In
wl1271, it is important to send a CMD_DISCONNECT before joining again,
because the firmware cleans some things up.  So we check if we're already
joined and disconnect if that's the case.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:02 -04:00
Luciano Coelho 25a7dc6d22 wl1271: implement cmd_disconnect
This patch implements the CMD_DISCONNECT command, which should be sent to the
firmware when we are disassociated.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:01 -04:00
Wey-Yi Guy e57f14895b iwlwifi: update channel switch command API
Channel switch host command has different data structure for
different devices. Adding additional structures to support 5000 and 6000
NICs. unlike 4965, starting with 5000 series, the tx power is managed by
uCode, there is no tx power db information need to be passing from driver to
uCode; but the space needs to be reserved to match uCode expection.

1000 NIC do not support channel switch operation since it is 'bgn'
device, there is no need to have data structure defined for it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:01 -04:00
Abhijeet Kolekar 768db9829d iwl3945: rearrange the code.
Rearrange the code and groups setting of
retry_limit and data_retry_limits code together.
Make 'data_retry_limit' setting similar to iwlwifi
for better readability.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:01 -04:00
Abhijeet Kolekar 1f0436f470 iwlwifi/iwl3945: remove data_retry_limit
Remove the ununsed variable data_retry_limit
from priv.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:00 -04:00
Abhijeet Kolekar 9744c91f91 iwl3945: rename tx to tx_cmd
Rename iwl3945_tx_cmd variable tx to tx_cmd for better
readability.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:00 -04:00
Abhijeet Kolekar 37dc70fea8 iwlwifi/iwl3945: unify rts_tx_cmd_flag
3945 and 4965 share the functionality for setting RTS and CTS to
the tx_cmd. Unify these functions and move the common
functionality to core.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:00 -04:00
Wey-Yi Guy 92a35bda79 iwlwifi: showing accumulative ucode statistics counters
Adding accumulative statistics counters in iwlwifi driver.
Statistics counters are reported by uCode every beacon interval; but can
be reset by uCode when needed. The accumulative statistics counters is
maintained by driver to keep track of the history of all the counters.

Update the ucode stats files in debugfs to display both latest and
accumulative counters.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:00 -04:00
Wey-Yi Guy 88804e2b33 iwlwifi: dynamic allocate tx queue structure
Instead of always allocate the max number of tx queue structure,
use dynamic allocation based on the number of queues in device
configuration. With these changes, device does not have to allocate more
memory than the h/w can support.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:59 -04:00
Ben Cahill 008a9e3e3c iwl3945: move iwl_power_initialize()
iwl_power_initialize() initializes driver data (not device hardware), and does
not need to execute more than once (when the driver initializes).  Therefore, it
does not belong in iwl3945_apm_init(), which initializes hardware, and may run
more than once.

Move it to iwl3945_pci_probe(), where it will run only once.  This agrees
with similar placement in iwl-agn.c's iwl_pci_probe(), although placement
under "services" seemed more appropriate than under "mac80211".

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:59 -04:00
Ben Cahill 743cdf1b65 iwl3945: streamline iwl3945_rfkill_poll()
iwl3945_rfkill_poll() has been silently calling wiphy_rfkill_set_hw_state()
every 2 seconds, regardless of whether hardware RF KILL switch changed state.

Call wiphy_rfkill_set_hw_state() only when RFKILL switch changes.
Add IWL_DEBUG_RF_KILL log message and documentation.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:59 -04:00
Reinette Chatre 1a34c04380 iwlwifi: fix userspace setting of sleep_level_override
The sleep_level_override debugfs file is used by the user to request a
static power index instead of the dynamic sleep values. Users are expected
to provide value from 1 to 5 as an index or -1 to disable it.

The problem at the moment is that users can also provide 0 to this file
which, together with the value 1, is translated to index 1. This is
confusing and even more so when users write 0 to sleep_level_override and
then read 1 from it afterwards.

Modify checking to treat 0 as invalid.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:58 -04:00
Wey-Yi Guy 55036d6602 iwlwifi: additional items in sensitivity range table
Add more items to sensitivity range table to avoid using hardcoded values.
Initialize the table per device since unique per device information is
required to perform sensitivity calibration.

additional items in sensitivity range table:
   .barker_corr_th_min: Barker correlation threshold minimum
   .barker_corr_th_min_mrc: Barker correlation threshold minimum for MRC
   .nrg_th_cca: Energy threshold for Clear Channel Assessment

Barker codes are a technique used in WLAN encoding for transmission.
MRC is "Maximal Ratio Combining", a technique for optimally combining the
signals from 2 or more receivers to achieve a better signal.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:58 -04:00
Wey-Yi Guy bd35f15082 iwlwifi: remove duplicated/unused definition
"IWL_CMD_QUEUE_NUM" is being defined in multiple places and used by all
the devices. move it to iwl-dev.h file and shared by all the devices.

Remove "IWL_CMD_FIFO_NUM", replaced by "IWL49_CMD_FIFO_NUM" and IWL50_CMD_FIFO_NUM"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:58 -04:00
Ben Cahill b660d3adb8 iwlagn, iwl3945: remove apm_reset() functions
Clean up device-specific apm_reset() functions and library infrastructure,
now that these reset() functions are no longer being used.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:58 -04:00
Ben Cahill 278d84051d iwl3945: remove unnecessary call to apm_ops.reset()
Now that we're unconditionally using apm_ops.stop() to reset and power-down
the device in __iwl3945_down(), the apm_ops.reset() is redundant.  Removing
this call will also allow us to remove iwl3945_apm_reset().

Remove unneeded iwl_clear_bit(CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ) because
this bit will be set again very soon in iwl3945_hw_txq_ctx_stop() and other
following calls.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:57 -04:00
Ben Cahill 4d2ccdb948 iwlwifi: turn off device when not used.
In some cases (e.g. when mac80211 calls iwl_mac_stop() for suspend or user
no longer wants device active), device has not been going into low power state
via __iwl_down().  apm_ops.reset() does not put device into low power state;
instead it resets the device, then puts it into a powered-up state ready to be
re-loaded with uCode and re-started.  This has needlessly warmed up user's
laptops and drained batteries.

With current architecture in which mac80211 controls device up/down (including
resetting device after firmware errors), there is no need for apm_ops.reset()
any more; apm_ops.reset() is basically a combination of apm_ops.stop() and
apm_ops.init().

Instead, __iwl_down() now unconditionally places the device into a low-power
state via apm_ops.stop(). Device may be re-started via __iwl_up() calling
apm_ops.init() as soon as it may be needed (e.g. quickly for firmware errors),
but in the meantime, device will stop wasting energy.

Note that, even in this low power state, if driver re-enables interrupts,
the device retains the ability to sense the hardware RF-KILL switch, and
(except for 3945) interrupt the host when it changes.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:57 -04:00
Ben Cahill f33269b896 iwl3945: update iwl3945_apm_init()
Update iwl3945_apm_init() to set up device registers in sequence most recently
recommended by factory.

Add resets for APMG interrupts and radio chip, formerly done only in
iwl3945_apm_reset(); moving them here assures that apm_init() will do
a complete job of preparing hardware not only after platform boot,
but also after apm_stop() has executed (due to rfkill, ifconfig down,
driver unload, etc.).  This is in preparation to completely remove apm_reset().

Add some comments.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:56 -04:00
matthieu castet 40b93ad6e9 airo : allow supend with card without power management
Some airo card don't support power Management [1].
Don't abort suspend with those cards.

00:06.0 Network controller: AIRONET Wireless Communications PC4800 (rev 01)
        Flags: medium devsel, IRQ 17
        Memory at dffffe00 (32-bit, non-prefetchable) [size=128]
        I/O ports at d000 [size=128]
        I/O ports at cc00 [size=64]
        Kernel driver in use: airo

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:56 -04:00
Michael Buesch 899110fe4e b43/legacy: Fix usage of host_pci pointer
We must check the bustype before using the host_pci pointer.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:55 -04:00
Sujith 332c556633 ath9k: Fix TX hang poll routine
When TX is hung, the chip is reset. Ensure that
the chip is awake by using the PS wrappers.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:55 -04:00
Amitkumar Karwar c0bbd57679 libertas: Check return status of command functions
Return status of lbs_prepare_and_send_command and lbs_cmd_with_response
functions is not checked at some places. Those checks are added.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:55 -04:00
Juuso Oikarinen be823e5b2d wl1271: Mask unneeded events from firmware to conserve power
Currently several events are enabled from the firmware for which there
is no handling. This wakes up the host unnecessarily. Mask those
unneeded events.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:54 -04:00
Juuso Oikarinen 1922167b9d wl1271: Configure beacon filtering on if PSM used
Enable beacon filtering when PSM is enabled

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:54 -04:00
Juuso Oikarinen b771eee583 wl1271: Enable beacon filtering with the stack
Enable beacon filtering with the mac80211 stack.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:54 -04:00
Juuso Oikarinen 344152361e wl1271: Add connection monitoring configuration
Add configuration for connection monitor (number of allowed beacons, and
timeout after last received beacon.)

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:53 -04:00
Juuso Oikarinen 1fba49741d wl1271: Use vmalloc to allocate memory for firmware
Use vmalloc to allocate memory for the firmware image, and use a smaller
linear buffer for the actual transfer of the firmware to the chipset.

This patch is an adaptation of a similar patch for wl1251 by Kalle Valo.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:53 -04:00
Juuso Oikarinen c87dec9f18 wl1271: Multicast filtering configuration
Enable multicast filtering. This way by default no multicast frames will
reach the host, and when needed, only required multicast frames can be
passed from the WLAN chipset to the host.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:53 -04:00
Juuso Oikarinen 66497dc3bd wl1271: Clear probe-request template after scan
Clear the probe-request template on the firmware after scan. Unless
cleared, the firmware can independently send probe requests to the AP
and interfere with the mac80211 logic.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:53 -04:00
Juuso Oikarinen a64b07e8c6 wl1271: use workqueue provided by mac80211 instead of the default
Use the workqueue provided by the mac80211 stack instead of the system
default queue.

Modified to use new ieee_queue_work() as required by changes in the
stack.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:52 -04:00
Luciano Coelho 64a7f67287 wl1271: hack to disable filters
This is a hack to disable all filters in the join command.  This is based on
Kalle Valo's patch for wl1251.

Cc: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:51 -04:00
Luciano Coelho 2f01872500 wl1271: added Juuso Oikarinen as module author
Add Juuso as one of the module authors, since he's working heavily on this
module as well.

Cc: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:51 -04:00
Juuso Oikarinen be7078c21d wl1271: Corrections to TX path
Corrections to the TX path - use correct number of maximum descriptors
(32 instead of 16) and correct checking and setting of excessive retries
on completion.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:50 -04:00
Juuso Oikarinen d94cd297e5 wl1271: Update join usage
Update the usage of join's, including using actual beacon interval and
dtim from AP, and configuring a basic rate set from AP.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:50 -04:00
Juuso Oikarinen 8a5a37a6c4 wl1271: Configure rate policies based on AP rates
Configure the rate policies to the firmware based on the rates given by
the AP.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:50 -04:00
Juuso Oikarinen 545f1da8ef wl1271: Implementation for SPI busy word checking
This patch adds implementation for checking for SPI busy words - i.e.
honoring a delay request from the WLAN chipset upon reading
registers/memory.

To optimized the average SPI ready by 32 bits, also configure the number
of busywords to one to disable the "fixed-busy-word" functionality.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:49 -04:00
Juuso Oikarinen c3fea1994a wl1271: mask aid bits 14 and 15 in ps-poll template
In ps-poll template aid bits 14 and 15 were not masked as required by
the standard. Mask them so that aid is sent in correct format.

This patch is a direct port of the respective patch for the wl1251
driver by Kalle Valo.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:49 -04:00
Juuso Oikarinen 37b70a8185 wl1271: Implement delayed entry into ELP
Implement delayed entry into ELP. This will promote the following:
 - Less redundant sleep/wake cycles (better perf)
 - Avoids known firmware issues with going to ELP too fast after an
   operation

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:49 -04:00
Juuso Oikarinen 1e2b79761d wl1271: Correct TKIP header space handling in TX path
Correct the position to which TKIP header space is appended for TX
packets.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:48 -04:00
Juuso Oikarinen ac4e4ce54e wl1271: Security sequence number handling for TX (for WPA)
Add security sequence number handling to the driver TX data path needed
by WPA.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:48 -04:00
Juuso Oikarinen 3b4be9e08a wl1271: Correction to TX block allocation calculation
Correct the TX path implementation to allocate sufficient blocks in the
firmware for TX packets.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:48 -04:00
Luciano Coelho 9d565973de wl1271: remove unecessary qual parameter from rx status
The qual element in ieee80211_rx_status is not used anymore, so we don't need
to set it in the wl1271_rx_status() function.  This saves a bit of time in
the RX path.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:47 -04:00
David Kilroy 3414fc3f52 orinoco: use cfg80211 ethtool ops
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:47 -04:00
Luis R. Rodriguez 6226811f4e ath9k_hw: run ath9k_hw_9271_pa_cal() initial calibration
The PA calibration for ar9271 ath9k_hw_9271_pa_cal() can run during
reset or initial calibration, update the PA calibration to account
for that and initialize PA calibration variables for both conditions.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:47 -04:00
Luis R. Rodriguez b57df129aa ath9k_hw: run the carrier leakage calibration fix for ar9271 as well
This is required for the ar9271 hardware as well.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:46 -04:00
Roel Kluin 30bd572673 airo: Reorder tests, check bounds before element
Test whether index is within bounds before reading the element

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:29:49 -04:00
Holger Schurig d18ba452d7 libertas spi: fix sparse errors
This fixes the following sparse warnings:

$ make modules SUBDIRS=drivers/net/wireless/libertas C=1 CF=-D__CHECK_ENDIAN__
make: Entering directory `/usr/src/linux-wl'
  CHECK   drivers/net/wireless/libertas/if_spi.c
drivers/net/wireless/libertas/if_spi.c:137:16: warning: incorrect type in initializer (different base types)
drivers/net/wireless/libertas/if_spi.c:137:16:    expected unsigned short [unsigned] [usertype] reg_out
drivers/net/wireless/libertas/if_spi.c:137:16:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:191:16: warning: incorrect type in initializer (different base types)
drivers/net/wireless/libertas/if_spi.c:191:16:    expected unsigned short [unsigned] [usertype] reg_out
drivers/net/wireless/libertas/if_spi.c:191:16:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:256:24: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/libertas/if_spi.c:256:24:    expected restricted __le32 const [usertype] *p
drivers/net/wireless/libertas/if_spi.c:256:24:    got unsigned int *<noident>
drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/libertas/if_spi.c:243:24:    expected restricted __le16 const [usertype] *p
drivers/net/wireless/libertas/if_spi.c:243:24:    got unsigned short *<noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/libertas/if_spi.c:243:24:    expected restricted __le16 const [usertype] *p
drivers/net/wireless/libertas/if_spi.c:243:24:    got unsigned short *<noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/libertas/if_spi.c:243:24:    expected restricted __le16 const [usertype] *p
drivers/net/wireless/libertas/if_spi.c:243:24:    got unsigned short *<noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/libertas/if_spi.c:243:24:    expected restricted __le16 const [usertype] *p
drivers/net/wireless/libertas/if_spi.c:243:24:    got unsigned short *<noident>
drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/libertas/if_spi.c:243:24:    expected restricted __le16 const [usertype] *p
drivers/net/wireless/libertas/if_spi.c:243:24:    got unsigned short *<noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/if_spi.c:171:7:    expected unsigned short [unsigned] [usertype] buff
drivers/net/wireless/libertas/if_spi.c:171:7:    got restricted __le16 [usertype] <noident>
drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/libertas/if_spi.c:243:24:    expected restricted __le16 const [usertype] *p
drivers/net/wireless/libertas/if_spi.c:243:24:    got unsigned short *<noident>

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:29:48 -04:00
Miguel Boton e6693eab35 b43: add 'struct b43_wl' missing declaration
'struct b43_wl' declaration is missing at 'leds.h'.
It should be declared to avoid getting some GCC warnings at 'b43_leds_unregister'.

Signed-off-by: Miguel Botón <mboton@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:29:46 -04:00
Larry Finger d50bae33d1 b43: Fix Bugzilla #14181 and the bug from the previous 'fix'
"b43: Fix PPC crash in rfkill polling on unload" fixed the bug reported
in Bugzilla No. 14181; however, it introduced a new bug. Whenever the
radio switch was turned off, it was necessary to unload and reload
the driver for it to recognize the switch again.

This patch fixes both the original bug in #14181 and the bug introduced by
the previous patch. It must be stated, however, that if there is a BCM4306/3
with an rfkill switch (not yet proven), then the driver will need an
unload/reload cycle to turn the device back on.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:29:46 -04:00
Benoit PAPILLAULT 1761631083 rt2x00: Fix crypto in TX frame for rt2800usb
Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:29:45 -04:00
Jasper Spaans a361c83cb4 bonding: Remove bond_dev from xmit_hash_policy call.
Now that the bonding device is no longer used in determining the device to
which to send packets, it can be dropped from the argument list of the various
xmit_hash_policy calls.

Signed-off-by: Jasper Spaans <spaans@fox-it.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-27 01:05:13 -07:00
David S. Miller cfadf853f6 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/sh_eth.c
2009-10-27 01:03:26 -07:00
Kurt Van Dijck 9dbb58d867 can: sja1000: fix bug using library functions for skb allocation
Commit 7b6856a0 "can: provide library functions for skb allocation"
did not properly remove two lines of the SJA1000 driver resulting in
a 'skb_over_panic' when calling skb_put, as reported by Kurt.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-27 01:02:33 -07:00
Krishna Kumar 10e85f7f08 cxgb3: Set the rxq
Set the rxq# for LRO when processing the last fragment of a
frame. This helps in fast txq selection for routing workloads.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-27 01:02:32 -07:00
Nobuhiro Iwamatsu f568a926a3 sh_eth: Add asm/cacheflush.h
Add include asm/cacheflush.h,  because declaration of __flush_purge_region
moved to asm/cacheflush.h.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-26 17:19:44 -07:00
Michal Ostrowski fb64bb560e PPPoE: Fix flush/close races.
Be more careful about the state of pointers during tear-down.
The "pppoe_dev" field can only be looked at safely while holding socket locks.
This subsequently allows for the flush_lock to be killed.

We depend on the PPPOX_CONNECTED state to tell us that that those fields are
valid, so whoever clears that state (pppox_unbind_sock()) is responsible for
the dev_put() call.

We also have to ensure that we delete_item() on all sockets before they are
cleaned up.

The need for these changes has been exposed by scenarios wherein namespace
bindings of ethernet devices change while there are ongoing PPPoE sessions,
which resulted in oopses due to unusual socket connection termination paths,
exposing these issues.

Signed-off-by: Michal Ostrowski <mostrows@gmail.com>
Reviewed-by: Cyril Gorcunov <gorcunov@gmail.com>
Reported-by: Denys Fedoryschenko <denys@visp.net.lb>
Tested-by: Denys Fedoryschenko <denys@visp.net.lb>
2009-10-26 16:23:20 -07:00
Bruce Allan 5ccdcecb72 e1000e: allow for swflag to be held over consecutive PHY accesses
PCH-based parts (82577/82578) and some ICH8-based parts (82566) need to
hold the swflag (sw/fw/hw hardware semaphore) over consecutive PHY accesses
in order to perform sw-driven PHY configuration during initialization to
workaround known hardware issues (see follow-on patch).  This patch
provides new PHY read/write functions (and function pointers) that will
allow accessing the PHY registers assuming the swflag has already been
acquired.  The actual PHY register access code has moved into helper
functions that are called with a flag indicating whether or not the swflag
has already been acquired and acquires/releases it if not.

The functions called from within the updated PHY access functions had to be
updated to assume the swflag was already acquired, and other functions that
called those functions were also updated to acquire/release the swflag.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-26 16:16:25 -07:00
Bruce Allan ca15df58b1 e1000e: separate mutex usage between NVM and PHY/CSR register for ICHx/PCH
Accesses to NVM and PHY/CSR registers on ICHx/PCH-based parts are protected
from concurrent accesses with a mutex that is acquired when the access is
initiated and released when the access has completed.  However, the two
types of accesses should not be protected by the same mutex because the
driver may have to access the NVM while already holding the mutex over
several consecutive PHY/CSR accesses which would result in livelock.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-26 16:16:24 -07:00
Bruce Allan fa2ce13ca7 e1000e: 82577/82578 requires a different method to configure LPLU
Unlike previous ICHx-based parts, the PCH-based parts (82577/82578) require
LPLU (Low Power Link Up, or "reverse auto-negotiation") to be configured in
the PHY rather than the MAC.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-26 16:16:23 -07:00
Bruce Allan 53ac5a8875 e1000e: increase swflag acquisition timeout for ICHx/PCH
In some conditions (e.g. when AMT is enabled on the system), it is possible
to take an extended period of time to for the driver to acquire the sw/fw/hw
hardware semaphore used to protect against concurrent access of a shared
resource (e.g. PHY registers).  This could cause PHY registers to not get
configured properly resulting in link issues.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-26 16:16:19 -07:00
Bruce Allan db2932ecf8 e1000e: clear PHY wakeup bit after LCD reset on 82577/82578
Performing a dummy read of the PHY Wakeup Control (WUC) register clears the
wakeup enable bit set by an PHY reset.  If this bit remains set, link
problems may occur.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-26 16:16:18 -07:00
Alexander Duyck 39305965f3 igbvf: fix memory leak when ring size changed while interface down
This patch resolves a memory leak which occurs while changing the ring size
while the interface is down.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-26 16:09:01 -07:00
Alexander Duyck 759884b4d4 ixgbe: fix memory leak when resizing rings while interface is down
This patch resolves a memory leak that occurs when you resize the rings via
the ethtool -G option while the interface is down.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-26 16:08:59 -07:00
Alexander Duyck 6d9f4fc420 igb: fix memory leak when setting ring size while interface is down
Changing ring sizes while the interface was down was causing a double
allocation of the receive and transmit rings.  This issue is amplified when
there are multiple rings enabled.  To prevent this we need to add an
additional check which will just update the ring counts when the interface
is not up and skip the allocation steps.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-26 16:08:56 -07:00
Jasper Spaans d3da68310a bonding: Modify hash transmit policies to use the packet's source MAC address
Modify bonding hash transmit policies to use the psource MAC address of
the packet instead of the MAC address configured for the bonding device.

The old sitation conflicts with the documentation.

Signed-off-by: Jasper Spaans <spaans@fox-it.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 07:02:28 -07:00
Ben Dooks 62e20a624b DM9000: Fix revision ID for DM9000B
The DM9000B revision ID is 0x1A, not 0x1B as set in the curernt
dm9000.h header.

Fix bug reported by Paolo Zebelloni.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 06:53:07 -07:00
Simon Wunderlich 05af2142d0 r8169: fix Ethernet Hangup for RTL8110SC rev d
The 8110SC rev d chip on our board shows a regression which the 8110SB chip
did not have. When inbound traffic is overflowing the receive descriptor queue,
"holes" in the ring buffer may occur which lead to a hangup until the buffer
is filled again. The packets are than completely processed, but the ring
remains porous and no packets are processed until the next overflow. Setting
the interface down and up can fix the problem temporary from userspace.

For some reason we don't know, this behaviour is not occuring if the RxVlan
bit for hardware VLAN untagging is set. There is another "Work around for
AMD plateform" in the current code which checks the VLAN status
word in receive descriptors, but does never come to effect when hardware
VLAN support is enabled. We assume that this is a bug in the chip.

The following patch fixes the problem. Without the patch we could reproduce
the hang within minutes (given other devices also generating lots of
interrupts), without we couldn't reproduce within a few days of long term
testing.

This version contains minor style adjustments and is sent with mutt which
will hopefully not destroy the formatting again.

Signed-off-by: Bernhard Schmidt <bernhard.schmidt@saxnet.de>
Signed-off-by: Simon Wunderlich <simon.wunderlich@saxnet.de>
Acked-by: Francois Romieu <romieu@zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 06:47:33 -07:00
Ben Hutchings b37b62fea1 sfc: Rename 'xfp' file and functions to reflect reality
The 'XFP' driver is really a driver for the QT2022C2 and QT2025C PHYs,
covering both more and less than XFP.  Rename its functions and
constants to reflect reality and to reduce namespace pollution when
sfc is a built-in driver.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:28 -07:00
Ben Hutchings fc2b5e673f sfc: Remove unused code for non-autoneg speed/duplex switching
The only multi-speed PHY driver using this is 10Xpress, and it does
not support non-autoneg operation.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:26 -07:00
Ben Hutchings 18ea024fd6 sfc: Merge efx_fc_resolve() into efx_mdio_get_pause()
efx_fc_resolve() is specific to MDIO and is not used by any other
function.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:25 -07:00
Ben Hutchings a5211bb5f7 sfc: Move MTD probe after netdev registration and name allocation
The MTD partition is named based on the netdev name, which is set to
'eth%d' before registration.  Also, the MTD partition will currently
be left registered if netdev registration fails.

Fix both these problems by moving the MTD probe after netdev
registration.  Hold the RTNL to serialise this with the netdev
notifier that calls efx_mtd_rename().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:24 -07:00
Ben Hutchings 2ed380a59b sfc: Remove unnecessary tests of efx->membase
These cleanup functions will never be called if the MMIO region could
not be mapped.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:23 -07:00
Ben Hutchings be4b163b28 sfc: Remove incorrect assertion from efx_pci_remove_main()
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:22 -07:00
Ben Hutchings 96c45726c7 sfc: Merge falcon_probe_phy() into falcon_probe_port()
MAC and PHY probing are bound up together, as evidenced by the
initialisation of efx_nic::loopback_modes.  Remove the current
arbitrary separation.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:18 -07:00
Ben Hutchings dc803df8dd sfc: Remove pointless abstraction of memory BAR number
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:18 -07:00
Ben Hutchings 8698a6b642 sfc: Removed kernel-doc for nonexistent member of efx_phy_operations
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:17 -07:00
Ben Hutchings 0d86ebd815 sfc: Maintain interrupt moderation values in ticks, not microseconds
This simplifies the implementation a lot.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:15 -07:00
Ben Hutchings 0484e0db7c sfc: Move shared members of struct falcon_nic_data into struct efx_nic
These will also be used with Siena NICs.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:14 -07:00
Ben Hutchings 59cf09cc2f sfc: Move efx_xmit_done() declaration into correct stanza
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:13 -07:00
Ben Hutchings 5c86987e86 sfc: Remove declarations of nonexistent functions
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:13 -07:00
Ben Hutchings f01865f064 sfc: Change order of device removal to reverse of probe order
This makes efx_pci_remove_main() more obviously the inverse of
efx_pci_probe_main(), and matches our out-of-tree driver.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:12 -07:00
Ben Hutchings 7d4cdb5af0 sfc: Merge struct efx_blinker into struct efx_board
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:08 -07:00
Ben Hutchings 63f1988419 sfc: Move all TX DMA length limiting into tx.c
Replace the duplicated logic in efx_enqueue_skb() and
efx_tx_queue_insert() with an inline function, efx_max_tx_len().

Remove the failed attempt at abstracting hardware-specifics and put
all the magic numbers in efx_max_tx_len().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:07 -07:00
Ben Hutchings 6d51d30750 sfc: Define DMA address mask explicitly in terms of descriptor field width
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:06 -07:00
Ben Hutchings 3ffeabdd2b sfc: Eliminate indirect lookups of queue size constants
Move size and mask definitions into efx.h; calculate page orders in falcon.c.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:05 -07:00
Ben Hutchings 12d00cadcc sfc: Rename register I/O header and functions used by both Falcon and Siena
While we're at it, use type suffixes of 'd', 'q' and 'o', consistent
with register type names.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:04 -07:00
Ben Hutchings 3e6c453854 sfc: Update hardware definitions for Siena
Siena is still based on the Falcon hardware architecture and will
share many of these definitions, so replace falcon_hwdefs.h with
regs.h.

The new definitions have been generated according to a naming
convention which incorporates the type and revision information.
Update the code accordingly.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:03 -07:00
Ben Hutchings 625b451455 sfc: Move RX data FIFO thresholds out of struct efx_nic_type
Since there are now separate blocks of code to set the thresholds for
each NIC type, it is no longer useful to include them in the NIC type
description.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:00 -07:00
Ben Hutchings 56241ceb9e sfc: Remove versioned bitfield macros
These macros are not extensible to more than two NIC types without
repetition of register definitions, and they are only used to deal
with a few fields in RX_CFG_REG and global events which moved between
Falcon rev A1 and B0.

Therefore:
- Move RX_CFG_REG initialisation into its own function which tests the
  NIC revision just once
- Explicitly test the NIC revision when checking the RX_RECOVERY flag in
  global events
- Merge definitions of RX_XOFF_MAC_EN flag, which did not move
- Remove the macro definitions

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:26:56 -07:00
Ben Hutchings 5087b54ddc sfc: Remove boards.h, moving last remaining declaration to falcon.h
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:26:56 -07:00
Ben Hutchings c9597d4f89 sfc: Merge sfe4001.c into falcon_boards.c
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:26:55 -07:00
Ben Hutchings 3473a5b118 sfc: Rename Falcon-specific board code and types
Siena will require entirely different board code.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:26:52 -07:00
Ben Hutchings 19e71cf691 sfc: Remove redundant hardware initialisation
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:26:52 -07:00
Ben Hutchings 7dbb06f707 sfc: Remove redundant header gmii.h
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:26:50 -07:00
Eric Dumazet db51914424 ifb: should not use __dev_get_by_index() without locks
At this point (ri_tasklet()), RTNL or dev_base_lock are not held,
we must use dev_get_by_index() instead of __dev_get_by_index()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-22 21:54:19 -07:00
Manuel Lauss bc36b42851 net: au1000_eth: add missing capability.h
fixes the following build failure:
  CC      drivers/net/au1000_eth.o
/drivers/net/au1000_eth.c: In function 'au1000_set_settings':
/drivers/net/au1000_eth.c:623: error: implicit declaration of function 'capable'
/drivers/net/au1000_eth.c:623: error: 'CAP_NET_ADMIN' undeclared (first use in this function)
/drivers/net/au1000_eth.c:623: error: (Each undeclared identifier is reported only once
/drivers/net/au1000_eth.c:623: error: for each function it appears in.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-22 21:51:27 -07:00
Brice Goglin 196f17eb17 myri10ge: improve port type reporting in ethtool
Improve the reporting of myri10ge port type in ethtool,
and update for new boards.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew Gallatin <gallatin@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-22 21:43:43 -07:00
Bruce Allan 74eee2e8d0 e1000e: reset the PHY on 82577/82578 when going to Sx
The PHY on 82577/82578 parts needs a soft reset when transitioning to Sx
state in order for the PHY write which disables gigabit speed to take
effect.  Gigabit speed must be disabled in order for the PHY writes to
registers on page 800 (the wakeup control registers) to work as expected
otherwise the system might not wake via WoL.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-22 21:22:18 -07:00
Ben Hutchings 188586b28d sfc: 10Xpress: Report support for pause frames
Commits 27fbc7d 'mdio: Expose pause frame advertising flags to ethtool'
and c634263 'sfc: 10Xpress: Initialise pause advertising flags'
added to our reported advertising flags.

efx_mdio_set_settings() requires that all advertising flags are
also present in the supported flags, so make sure that is true.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-22 18:36:15 -07:00
Dhananjay Phadke 0dc6d9cbe7 netxen: avoid undue board config check
Old code assumed board config version in the flash to be 1.
When this will get changed by tools, driver just refuses to
attach. This is unnecessary since driver does not have to
parse board config structure directly (maintained by firmware).

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-22 18:27:50 -07:00
Amit Kumar Salecha ff8a306d63 netxen: fix tx timeout handling on firmware hang
Clear NX_RESETING bit in netxen_tx_timeout_task() so that
the firmware watchdog task can catch need_reset request
from tx timeout.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-22 18:27:50 -07:00
Dhananjay Phadke 8bee0a91dd netxen: fix i2c init
Avoid resetting subsys ID in i2c block. Also remove duplicate
check for address tranlsation error.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-22 18:27:49 -07:00
Ron Mercer a61f802613 qlge: Add ethtool register dump function.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-21 21:45:41 -07:00
Ron Mercer bc083ce98e qlge: Add ethtool wake on LAN function.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-21 21:45:40 -07:00
Ron Mercer d8eb59dc8b qlge: Add ethtool blink function.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-21 21:45:40 -07:00
Ron Mercer 1d30df24ec qlge: Add ethtool get/set pause parameter.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-21 21:45:39 -07:00
Joyce Yu 845de8afa6 niu: VLAN_ETH_HLEN should be used to make sure that the whole MAC header was copied to the head buffer in the Vlan packets case
Signed-off-by: Joyce Yu <joyce.yu@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-21 17:21:10 -07:00
Ben Dooks b6a71bfa00 KS8851: Fix ks8851_set_rx_mode() for IFF_MULTICAST
In ks8851_set_rx_mode() the case handling IFF_MULTICAST was also setting
the RXCR1_AE bit by accident. This meant that all unicast frames where
being accepted by the device. Remove RXCR1_AE from this case.

Note, RXCR1_AE was also masking a problem with setting the MAC address
properly, so needs to be applied after fixing the MAC write order.

Fixes a bug reported by Doong, Ping of Micrel. This version of the
patch avoids setting RXCR1_ME for all cases.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-20 19:11:07 -07:00
Ben Dooks 160d0fadaf KS8851: Fix MAC address write order
The MAC address register was being written in the wrong order, so add
a new address macro to convert mac-address byte to register address and
a ks8851_wrreg8() function to write each byte without having to worry
about any difficult byte swapping.

Fixes a bug reported by Doong, Ping of Micrel.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-20 19:11:06 -07:00
Ben Dooks 57dada6819 KS8851: Add soft reset at probe time
Issue a full soft reset at probe time.

This was reported by Doong Ping of Micrel, but no explanation of why this
is necessary or what bug it is fixing. Add it as it does not seem to hurt
the current driver and ensures that the device is in a known state when we
start setting it up.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-20 19:11:05 -07:00
Steven King 78abcb13dd net: fix section mismatch in fec.c
fec_enet_init is called by both fec_probe and fec_resume, so it
shouldn't be marked as __init.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-20 18:51:37 -07:00
Wolfgang Grandegger 7b6856a029 can: provide library functions for skb allocation
This patch makes the private functions alloc_can_skb() and
alloc_can_err_skb() of the at91_can driver public and adapts all
drivers to use these. While making the patch I realized, that
the skb's are *not* setup consistently. It's now done as shown
below:

  skb->protocol = htons(ETH_P_CAN);
  skb->pkt_type = PACKET_BROADCAST;
  skb->ip_summed = CHECKSUM_UNNECESSARY;
  *cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
  memset(*cf, 0, sizeof(struct can_frame));

The frame is zeroed out to avoid uninitialized data to be passed to
user space. Some drivers or library code did not set "pkt_type" or
"ip_summed". Also,  "__constant_htons()" should not be used for
runtime invocations, as pointed out by David Miller.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-20 00:08:01 -07:00
Tomas Winkler ce5eb7a292 i2400m-sdio: select IWMC3200TOP in Kconfig
i2400m-sdio requires iwmc3200top for its operation

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-19 23:22:51 -07:00
Tomas Winkler 439ca3a4b1 iwmc3200wifi: select IWMC3200TOP in Kconfig
iwmc3200wifi requires iwmc3200top  for its operation

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-19 23:22:51 -07:00
Ron Mercer 7c734359d3 qlge: Size RX buffers based on MTU.
Change RX large buffer size based on MTU. If pages are larger
than the MTU the page is divided up into multiple chunks and passed to
the hardware.  When pages are smaller than MTU each RX buffer can
contain be comprised of up to 2 pages.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-19 23:22:49 -07:00
Thomas Chou 50c54a57df ethoc: clear only pending irqs
This patch fixed the problem of dropped packets due to lost of
interrupt requests. We should only clear what was pending at the
moment we read the irq source reg.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-18 21:24:16 -07:00
Thomas Chou 16dd18b083 ethoc: inline regs access
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-18 21:24:14 -07:00
Alan Cox 2395f0e862 cosa: Kill off the use of the old ioctl path
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-18 18:53:43 -07:00
Eric Dumazet c720c7e838 inet: rename some inet_sock fields
In order to have better cache layouts of struct sock (separate zones
for rx/tx paths), we need this preliminary patch.

Goal is to transfert fields used at lookup time in the first
read-mostly cache line (inside struct sock_common) and move sk_refcnt
to a separate cache line (only written by rx path)

This patch adds inet_ prefix to daddr, rcv_saddr, dport, num, saddr,
sport and id fields. This allows a future patch to define these
fields as macros, like sk_refcnt, without name clashes.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-18 18:52:53 -07:00
Krishna Kumar 0d9a40de60 cxgb3: No need to wake queue in xmit handler
The xmit handler doesn't need to wake the queue after stopping
it temporarily (some other drivers are doing the same).

Patch on net-next-2.6, multiple netperf sessions tested.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-17 23:57:25 -07:00
Dhananjay Phadke 7194660da7 netxen; update version to 4.0.62
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-17 23:44:47 -07:00
Narender Kumar caa2dd53bc netxen: sysfs control for auto firmware recovery
Firmware hang detection and recovery (reset) need to
be disabled for diagnostic tools, which can run
some disruptive tests.

This adds a driver level control to turn off this
feature by diag tools.

Signed-off-by: Narender Kumar <narender.kumar@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-17 23:44:46 -07:00
Dhananjay Phadke 7cecdca133 netxen: fix error codes in for tools access
Use -EIO or -EINVAL as error codes, these can get passed up
to applications (tools).

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-17 23:44:44 -07:00
Amit Kumar Salecha 6abb4b83ea netxen: onchip memory access change
Add support for different windowing scheme for on chip
memory in future chip revisions. This is required by
diagnostic tools.

Signed-off-by: Amit Kumar Salecha <amit@netxen.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-17 23:44:42 -07:00
Amit Kumar Salecha 0be367bd5d netxen: reset sequence changes
Future revisions need different chip reset sequence
and firmware initialization.

Also clean up some never used debug code.

Signed-off-by: Amit Kumar Salecha <amit@netxen.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-17 23:44:41 -07:00
Amit Kumar Salecha fb1f6a4378 netxen: 128 memory controller support
Future revisions of the chip have 128 bit memory
transactions. Require drivers to implement rmw
in case of sub-128 bit accesses by driver. This
is mostly used by diagnostic tools.

Signed-off-by: Amit Kumar Salecha <amit@netxen.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-17 23:44:40 -07:00
Amit Kumar Salecha 0a2aa44060 netxen: defines for next revision
Signed-off-by: Amit Kumar Salecha <amit@netxen.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-17 23:44:39 -07:00
Ajit Khaparde 12d7ea2c5a be2net: Add support for next generation of BladeEngine device.
Add new PCI ids to support next generation of BladeEngine device.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-16 18:02:12 -07:00
Randy Dunlap f6965582ac vmxnet3: use dev_dbg, fix build for CONFIG_BLOCK=n
vmxnet3 was using dprintk() for debugging output.  This was
defined in <linux/dst.h> and was the only thing that was
used from that header file.  This caused compile errors
when CONFIG_BLOCK was not enabled due to bio* and BIO*
uses in the header file, so change this driver to use
dev_dbg() for debugging output.

include/linux/dst.h:520: error: dereferencing pointer to incomplete type
include/linux/dst.h:520: error: 'BIO_POOL_BITS' undeclared (first use in this function)
include/linux/dst.h:521: error: dereferencing pointer to incomplete type
include/linux/dst.h:522: error: dereferencing pointer to incomplete type
include/linux/dst.h:525: error: dereferencing pointer to incomplete type
make[4]: *** [drivers/net/vmxnet3/vmxnet3_drv.o] Error 1

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-16 17:54:34 -07:00
Eilon Greenstein b2d76447df bnx2x: Update to version 1.52.1-1
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-15 00:19:31 -07:00
Eilon Greenstein 35c5f8fef1 bnx2x: Report the maximal available BW as link speed
The device is limited to the maximal BW allocation, so it should be displayed as
the link speed to notify the user.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-15 00:19:05 -07:00
Eilon Greenstein 061bc702f6 bnx2x: Do not call load/unload functionality from DCC
There is really no need to clear the MAC or the FW filtering rules - it was
added for completion, but caused race conditions with load/unload. Removing this
redundant code

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-15 00:18:47 -07:00
Eilon Greenstein c4ff7cbf88 bnx2x: Adding FW mailbox mutex
DCC commands are not protected with the RTNL lock, so a mutex should be added

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-15 00:18:27 -07:00
Eilon Greenstein f34d28ea01 bnx2x: Changing the Disabled state to a flag
When working with DCC, a function can be disabled or enabled (virtual link down
or up). Using the function state introduced some race conditions with the
load/unload flow.
Using a separate flag to indicate that the function is disabled.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-15 00:18:08 -07:00
Eilon Greenstein b015e3d112 bnx2x: Allowing 0 as initial fairness value
Value of zero was used to disable the fairness mechanism. Though the code
(driver and FW) allowed changing the value at run time, it did not allow to do
that if the mechanism was disabled to begin with.
Fixed the FW to allow turning on and off the mechanism at run time. Fixed the
code to read the value from the chip at the right sequence.
Without this fix, if the initial value was set to zero, traffic could not run on
the interface.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-15 00:17:20 -07:00
Eric Dumazet ed79bab847 virtio_net: use dev_kfree_skb_any() in free_old_xmit_skbs()
Because netpoll can call netdevice start_xmit() method with
irqs disabled, drivers should not call kfree_skb() from
their start_xmit(), but use dev_kfree_skb_any() instead.

Oct  8 11:16:52 172.30.1.31 [113074.791813] ------------[ cut here ]------------
Oct  8 11:16:52 172.30.1.31 [113074.791813] WARNING: at net/core/skbuff.c:398 \
                skb_release_head_state+0x64/0xc8()
Oct  8 11:16:52 172.30.1.31 [113074.791813] Hardware name:
Oct  8 11:16:52 172.30.1.31 [113074.791813] Modules linked in: netconsole ocfs2 jbd2 quota_tree \
ocfs2_dlmfs ocfs2_stack_o2cb ocfs2_dlm ocfs2_nodemanager ocfs2_stackglue configfs crc32c drbd cn loop \
serio_raw psmouse snd_pcm snd_timer snd soundcore snd_page_alloc virtio_net pcspkr parport_pc parport \
i2c_piix4 i2c_core button processor evdev ext3 jbd mbcache dm_mirror dm_region_hash dm_log dm_snapshot \
dm_mod ide_cd_mod cdrom ata_generic ata_piix virtio_blk libata scsi_mod piix ide_pci_generic ide_core \
                virtio_pci virtio_ring virtio floppy thermal fan thermal_sys [last unloaded: netconsole]
Oct  8 11:16:52 172.30.1.31 [113074.791813] Pid: 11132, comm: php5-cgi Tainted: G        W  \
                2.6.31.2-vserver #1
Oct  8 11:16:52 172.30.1.31 [113074.791813] Call Trace:
Oct  8 11:16:52 172.30.1.31 [113074.791813] <IRQ>  [<ffffffff81253cd5>] ? \
                skb_release_head_state+0x64/0xc8
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81253cd5>] ? skb_release_head_state+0x64/0xc8
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81049ae1>] ? warn_slowpath_common+0x77/0xa3
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81253cd5>] ? skb_release_head_state+0x64/0xc8
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81253a1a>] ? __kfree_skb+0x9/0x7d
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffffa01cb139>] ? free_old_xmit_skbs+0x51/0x6e \
                [virtio_net]
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffffa01cbc85>] ? start_xmit+0x26/0xf2 [virtio_net]
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8126934f>] ? netpoll_send_skb+0xd2/0x205
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffffa0429216>] ? write_msg+0x90/0xeb [netconsole]
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81049f06>] ? __call_console_drivers+0x5e/0x6f
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8102b49d>] ? kvm_clock_read+0x4d/0x52
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8104a082>] ? release_console_sem+0x115/0x1ba
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8104a632>] ? vprintk+0x2f2/0x34b
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8106b142>] ? vx_update_load+0x18/0x13e
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81308309>] ? printk+0x4e/0x5d
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8102b49d>] ? kvm_clock_read+0x4d/0x52
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81070b62>] ? getnstimeofday+0x55/0xaf
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81062683>] ? ktime_get_ts+0x21/0x49
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff810626b7>] ? ktime_get+0xc/0x41
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81062788>] ? hrtimer_interrupt+0x9c/0x146
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81024a4b>] ? smp_apic_timer_interrupt+0x80/0x93
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81011663>] ? apic_timer_interrupt+0x13/0x20
Oct  8 11:16:52 172.30.1.31 [113074.791813] <EOI>  [<ffffffff8130a9eb>] ? _spin_unlock_irq+0xd/0x31

Reported-and-tested-by: Massimo Cetra <mcetra@navynet.it>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Bug-Entry: http://bugzilla.kernel.org/show_bug.cgi?id=14378
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-14 23:29:56 -07:00
Sathya Perla 43a04fdc36 be2net: fix support for PCI hot plug
Before issuing any cmds to the FW, the driver must first wait
till the fW becomes ready. This is needed for PCI hot plug when
the driver can be probed while the card fw is being initialized.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-14 23:29:56 -07:00
Sathya Perla 73d540f282 be2net: fix promiscuous and multicast promiscuous modes being enabled always
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-14 23:29:54 -07:00
Randy Dunlap 8f7e524ce3 vmxnet: fix 2 build problems
vmxnet3 uses in_dev* interfaces so it should depend on INET.
Also fix so that the driver builds when CONFIG_PCI_MSI is disabled.

vmxnet3_drv.c:(.text+0x2a88cb): undefined reference to `in_dev_finish_destroy'

drivers/net/vmxnet3/vmxnet3_drv.c:1335: error: 'struct vmxnet3_intr' has no member named 'msix_entries'
drivers/net/vmxnet3/vmxnet3_drv.c:1384: error: 'struct vmxnet3_intr' has no member named 'msix_entries'
drivers/net/vmxnet3/vmxnet3_drv.c:2137: error: 'struct vmxnet3_intr' has no member named 'msix_entries'
drivers/net/vmxnet3/vmxnet3_drv.c:2138: error: 'struct vmxnet3_intr' has no member named 'msix_entries'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Bhavesh davda <bhavesh@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-14 20:38:58 -07:00
Thomas Sailer 48bccd25df hamradio: Fix bit test correctly.
Signed-off-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-14 16:57:17 -07:00
Giuseppe Cavallaro 47dd7a540b net: add support for STMicroelectronics Ethernet controllers.
This is the driver for the ST MAC 10/100/1000 on-chip Ethernet
controllers (Synopsys IP blocks).

Driver documentation:
 o http://stlinux.com/drupal/kernel/network/stmmac
Revisions:
 o http://stlinux.com/drupal/kernel/network/stmmac-driver-revisions
Performances:
 o http://stlinux.com/drupal/benchmarks/networking/stmmac

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-14 15:13:45 -07:00
Randy Dunlap 47a01a0c94 net: ks8851_mll uses mii interfaces
From: Randy Dunlap <randy.dunlap@oracle.com>

ks8851_mll uses mii interfaces so it needs to select MII.

ks8851_mll.c:(.text+0xf95ac): undefined reference to `generic_mii_ioctl'
ks8851_mll.c:(.text+0xf96a0): undefined reference to `mii_ethtool_gset'
ks8851_mll.c:(.text+0xf96fa): undefined reference to `mii_ethtool_sset'
ks8851_mll.c:(.text+0xf9754): undefined reference to `mii_link_ok'
ks8851_mll.c:(.text+0xf97ae): undefined reference to `mii_nway_restart'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-14 15:10:58 -07:00
John Bonesio 37ccd92f55 net/fec_mpc52xx: Fix kernel panic on FEC error
The MDIO bus cannot be accessed at interrupt context, but on an FEC
error, the fec_mpc52xx driver reset function also tries to reset the
PHY.  Since the error is detected at IRQ context, and the PHY functions
try to sleep, the kernel ends up panicking.

Resetting the PHY on an FEC error isn't even necessary.  This patch
solves the problem by removing the PHY reset entirely.

Signed-off-by: John Bonesio <bones@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-14 15:10:19 -07:00
Anton Vorontsov e72701acbe net: Fix OF platform drivers coldplug/hotplug when compiled as modules
Some OF platform drivers are missing module device tables, so they won't
load automatically on boot. This patch fixes the issue by adding proper
MODULE_DEVICE_TABLE() macros to the drivers.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-14 14:54:52 -07:00
Thomas Gleixner deed49fbb6 net: Remove BKL from tun
The lock_kernel/unlock_kernel() in cycle_kernel_lock() which is called
in tun_chr_open() is not serializing against anything and safe to
remove.

tun_chr_fasync() is serialized by get/put_tun() and fasync_helper()
has no dependency on BKL. The modification of tun->flags is racy with
and without the BKL so removing it does not make it worse.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-14 01:19:46 -07:00
David S. Miller 421355de87 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-10-13 12:55:20 -07:00
Sriram 0fe7463a35 TI DaVinci EMAC: Clear statistics register properly.
The mechanism to clear the statistics register is dependent
on the status of GMIIEN bit in MAC control register. If the
GMIIEN bit is set, the stats registers are write to decrement.
If the GMIIEN bit is cleared, the stats registers are plain
read/write registers. The stats register clearing operation
must take into account the current state of GMIIEN as it
can be cleared when the interface is brought down.

With existing implementation logic, querying for interface stats
when the interface is down, can corrupt the statistics counters.
This patch examines the GMIIEN bit status in MAC_CONTROL
register before choosing an appropriate mask for clearing stats
registers.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Acked-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 12:02:53 -07:00
françois romieu daf9df6d8d r8169: partial support and phy init for the 8168d
Extracted from Realtek's 8.012.00 r8168 driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Simon Farnsworth <simon.farnsworth@onelan.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 12:01:31 -07:00
Manuel Lauss aace495933 net: smsc911x: allow platform_data to specify mac address
Extend the driver to accept a MAC address specified in platform_data.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:32 -07:00
Manuel Lauss b4efc56109 net: enable smsc911x on MIPS
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:30 -07:00
Ajit Khaparde d189a7e858 ixgb: Fix erroneous display of stats by ethtool -S
Commit 5675f221 overlooked the way offsets for netdev stats were considered.
Because of this some of the stats shown by ethtool -S were wrong.
This patch fixes it.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:29 -07:00
Ajit Khaparde 231835e416 igb: Fix erroneous display of stats by ethtool -S
Commit 337e067d overlooked the way offsets for netdev stats were considered.
Because of this some of the stats shown by ethtool -S were wrong.
This patch fixes it.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:28 -07:00
Ajit Khaparde 8328c38fcd e1000: Fix erroneous display of stats by ethtool -S
Commit 23d26497 overlooked the way offsets for netdev stats were considered.
Because of this some of the stats shown by ethtool -S were wrong.
This patch fixes it.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:28 -07:00
Ajit Khaparde e0f36a95c7 e1000e: Fix erroneous display of stats by ethtool -S
Commit fd8235bb overlooked the way offsets for netdev stats were considered.
Because of this some of the stats shown by ethtool -S were wrong.
This patch fixes it.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:27 -07:00
Ajit Khaparde 29c3a050f8 ixgbe: Fix erroneous display of stats by ethtool -S
Commit 59aa3cc4 overlooked the way offsets for netdev stats were considered.
Because of this some of the stats shown by ethtool -S were wrong.
This patch fixes it.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:26 -07:00
Dhananjay Phadke 70f9cf8951 netxen: add sysfs entries for diag tools
Add sysfs entries to enable register and memory access
for diagnostic tools.

Signed-off-by: Narender Kumar <narender.kumar@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:25 -07:00
Dhananjay Phadke f03b0ebd8e netxen: separate register and memory access lock
Since register and onboard memory access has separate
window registers, they need not be kept under same lock.

Also, memory is always accessed from process context
(mostly for firmware init and diagnostic tools).

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:21 -07:00
Dhananjay Phadke 907fa1201c netxen: annotate register windowing code
Use common variables crb_win, ocm_win for all revisions of chip.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:20 -07:00
Dhananjay Phadke 47abe35610 netxen: add access to on chip memory for tools
Add access to on chip memory, this is used by
debug and diagnostic tools only.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:19 -07:00
Amit Kumar Salecha 1f5e055db3 netxen: remove sub 64-bit mem accesses
Sub 64-bit / unaligned access to oncard memory was only used
by old diagnostic tools, causes some intermittent issues when
memory controller agent is used.  The new access method was
added by commit ea6828b8aa
("netxen: improve pci memory access").  Firmware init anyway
uses 8-byte strides.

This also fixes address/offset calculation for NX2031 context
memory (SIU). For NX3031, SIU uses same register offsets
as packet memory (MIU).

Signed-off-by: Amit Kumar Salecha <amit@netxen.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:19 -07:00
Eric Dumazet 89d71a66c4 net: Use netdev_alloc_skb_ip_align()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 11:48:18 -07:00
David S. Miller 417c5233db Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2009-10-13 11:41:34 -07:00
roel kluin bff1c09640 sb1250-mac: duplicate setting of bit V_MAC_RX_PL_THRSH(4) in sbmac_channel_start()
The bit V_MAC_RX_PL_THRSH(4) was already set a few lines higher.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 03:44:08 -07:00
roel kluin a81d4bfdef net/hamradio: fix test in receive()
The negation makes it a bool before the comparison and hence it
will never evaluate to true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 03:44:08 -07:00
Karen Xie f14d42f314 cxgb3: Added private MAC address and provisioning packet handler for iSCSI
This patch added support of private MAC address per port and provisioning
packet handler for iSCSI traffic only.

The above changes are isolated to the cxgb3 driver, independent of any scsi or iscsi driver changes.

Acked-by: Karen Xie <kxie@chelsio.com>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Rakesh Ranjan <rakesh@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 03:44:06 -07:00
Magnus Damm bcd5149ded net: add Runtime PM to the sh_eth driver
Add Runtime PM support to the sh_eth driver.

The clock to the ethernet hardware block will be
enabled as long as the network device is up.

Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 03:44:05 -07:00
Magnus Damm 748031f9fd net: allow sh_eth to get mac address through platform data
Extend the sh_eth driver to allow passing the mac address
using the platform data structure. This to simplify board
setup code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 03:44:05 -07:00
Wolfgang Grandegger a6e4bc5304 can: make the number of echo skb's configurable
This patch allows the CAN controller driver to define the number of echo
skb's used for the local loopback (echo), as suggested by Kurt Van
Dijck, with the function:

  struct net_device *alloc_candev(int sizeof_priv,
                                  unsigned int echo_skb_max);

The CAN drivers have been adapted accordingly. For the ems_usb driver,
as suggested by Sebastian Haas, the number of echo skb's has been
increased to 10, which improves the transmission performance a lot.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 03:44:04 -07:00
Dmitry Artamonow 91cd1756cb irda/sa1100_ir: check return value of startup hook
Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 03:17:37 -07:00
Krzysztof Halasa 9652041da1 WAN: fix Cisco HDLC handshaking.
Cisco HDLC uses keepalive packets and sequence numbers to determine link
state. In rare cases both ends could transmit keepalive packets at the same
time, causing the received sequence numbers to be treated as incorrect.
Now we accept our current sequence number as well as the previous one.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 03:16:53 -07:00
Nicolas de Pesloüan 38fc0026da bonding: change bond_create_proc_entry() to return void
The function bond_create_proc_entry is currently of type int.

Two versions of this function exist:

The one in the ifdef CONFIG_PROC_FS branch always return 0.
The one in the else branch (which is empty) return nothing.

When CONFIG_PROC_FS is undef, this cause the following warning:

drivers/net/bonding/bond_main.c: In function `bond_create_proc_entry':
drivers/net/bonding/bond_main.c:3393: warning: control reaches end of
non-void function

No caller of this function use the returned value.

So change the returned type from int to void and remove the
useless return 0; .

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Reported-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 00:45:06 -07:00
Ken Kawasaki e3eef534c5 3c574_cs: spin_lock the set_multicast_list function
3c574_cs:
 spin_lock the set_multicast_list function.

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 00:35:55 -07:00
Chris Rankin ab854b24a2 net: Teach pegasus driver to ignore bluetoother adapters with clashing Vendor:Product IDs
The Belkin F8T012xx1 bluetooth adaptor has the same vendor and product
IDs as the Belkin F5D5050, so we need to teach the pegasus driver to
ignore adaptors belonging to the "Wireless" class 0xE0. For this one
case anyway, seeing as pegasus is a driver for "Wired" adaptors.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 00:35:54 -07:00
Dhananjay Phadke 71fb62fb6d netxen: fix pci bar mapping
Use resource_size_t for PCI resource remapping instead
of unsigned long. Physical addresses can exceed range of
long data type (e.g with PAE).

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 00:26:04 -07:00
Alan Cox 4ce22537a2 ethoc: fix warning from 32bit build
drivers/net/ethoc.c: In function ‘ethoc_open’:
drivers/net/ethoc.c:667: warning: comparison of distinct pointer types
lacks a cast

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 00:23:06 -07:00
Alan Cox 767e366fc9 libertas: fix build
drivers/net/wireless/libertas/cmdresp.c: In function ‘lbs_process_event’:
drivers/net/wireless/libertas/cmdresp.c:519: error: ‘TASK_INTERRUPTIBLE’
undeclared (first use in this function)
drivers/net/wireless/libertas/cmdresp.c:519: error: (Each undeclared
identifier is reported only once
drivers/net/wireless/libertas/cmdresp.c:519: error: for each function it
appears in.)

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 00:23:05 -07:00
Shreyas Bhatewara d1a890fa37 net: VMware virtual Ethernet NIC driver: vmxnet3
Ethernet NIC driver for VMware's vmxnet3

From: Shreyas Bhatewara <sbhatewara@vmware.com>

This patch adds driver support for VMware's virtual Ethernet NIC: vmxnet3
Guests running on VMware hypervisors supporting vmxnet3 device will thus have
access to improved network functionalities and performance.

Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: Ronghua Zhang <ronghua@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 00:15:51 -07:00
Vincent Sanders b9696ea325 net: Fix IXP 2000 network driver building.
The IXP 2000 network driver was failing to build as it has its own
statistics gathering which was not compatible with the recent network
device operations changes. This patch fixes the driver in the obvious
way and has been compile tested. I have been unable to get the ixp2000
maintainer to comment or test this fix.

Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13 00:03:11 -07:00
Ben Hutchings c634263df5 sfc: 10Xpress: Initialise pause advertising flags
The mdio module now handles reconfiguration of pause advertising
through ethtool, but not initialisation.  Add the necessary
initialisation to tenxpress_phy_init().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:59:09 -07:00
Ben Hutchings 27fbc7db52 mdio: Expose pause frame advertising flags to ethtool
In mdio45_ethtool_gset_npage() and mdio45_ethtool_gset(), check MDIO
pause frame advertising flags and set the corresponding ethtool flags.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:59:08 -07:00
Ben Hutchings 767f4a7ca8 mdio: Advertise pause (flow control) settings even if autoneg is off
Currently, if pause autoneg is off we do not set either pause
advertising flag.  If autonegotiation of speed and duplex settings is
enabled, there is no way for the link partner to distinguish this from
our refusing to use pause frames.

We should instead set the advertising flags according to the forced
mode so that the link partner can follow our lead.  This is consistent
with the behaviour of other drivers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:59:07 -07:00
Anton Vorontsov be926fc404 gianfar: Add support for hibernation
Thanks to various cleanups and refactorings this is now straightforward:
convert the gianfar driver to dev_pm_ops, plus add ->restore() callback
that will fully reinitialize MAC internal registers and BDs.

Note that I kept legacy suspend/resume callbacks so that this patch
doesn't depend on PowerPC changes (i.e. dev_pm_ops support for OF
platform drivers).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:54:05 -07:00
Anton Vorontsov 8728327e7a gianfar: Factor out gfar_init_bds() from gfar_alloc_skb_resources()
After hibernation we want to just reinitialize BDs, no need to allocate
anything. So, factor out BDs initialization code from
gfar_alloc_skb_resourses().

Also, teach gfar_init_bds() to reuse already allocated RX SKBs, i.e.
just call gfar_init_rxbdp() if a SKB was already allocated and mapped.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:54:05 -07:00
Anton Vorontsov 8a102fe001 gianfar: Factor out RX BDs initialization from gfar_new_rxbdp()
We want to just reinitialize RX BDs after hibernation, no need to
map the skb->data again. So let's factor gfar_init_rxbdp() out of
gfar_new_rxbdp().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:54:04 -07:00
Anton Vorontsov 32c513bca0 gianfar: Move tbase/rbase initialization to gfar_init_mac()
For hibernation we want to call gfar_init_mac() without need to
free/allocate_skb_resources sequence, so save the DMA address into a
private struct, and move tbase/rbase initialization to gfar_init_mac().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:54:03 -07:00
Anton Vorontsov 826aa4a056 gianfar: Split allocation and initialization steps out of startup_gfar()
Two new functions implemented: gfar_alloc_skb_resources() and
gfar_init_mac(). We'll use gfar_init_mac() for restoring after
hibernation.

The patch just moves the code around, there should be no functional
changes.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:54:03 -07:00
Anton Vorontsov 14231176b0 gianfar: Don't needlessly set the wrap bit for the last RX BD
startup_gfar() sets the wrap bit for the last rxbd just after
gfar_new_rxbdp() call, which is issued for all rxbds. And
gfar_new_rxbdp() has the following check already:

	if (bdp == priv->rx_bd_base + priv->rx_ring_size - 1)
		lstatus |= BD_LFLAG(RXBD_WRAP);

So we don't need to set the bit again.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:54:02 -07:00
Anton Vorontsov e69edd2181 gianfar: Simplify skb resources freeing code
Remove dma_free_coherent() from stop_gfar() and gfar_start() calls,
place it into free_skb_resources(). That makes SKB resources management
more understandable, plus free_skb_resources() will be used as a cleanup
routine for gfar_alloc_skb_resources() that will be implemented soon.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:54:02 -07:00
Anton Vorontsov ccc05c6e1e gianfar: Some cleanups for startup_gfar()
We're going to split the startup_gfar() into 3 separate functions,
so let's cleanup the code a little bit so that cosmetic changes
won't distract attention from logical ones.

- Remove needless casts (e.g. (struct sk_buff **)kmalloc());
- Turn 'unsigned long vaddr;' into 'void *vaddr', to avoid casting;
- Add new 'struct device *dev' variable as a shorthand for
  '&priv->ofdev->dev' that is used all over the place, also rename
  'struct net_device *dev' to 'struct net_device *ndev';
- Turn printk(KERN_ERR ...) to pr_err(...), which is shorter;
- Don't return bogus -1 (i.e. -EPERM) when request_irq() fails;
- Turn '&priv->regs->' to just '&regs->'.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:54:01 -07:00
David S. Miller c05e85a06e cnic: Need to include net/ip6_checksum.h
drivers/net/cnic.c: In function 'cnic_init_storm_conn_bufs':
drivers/net/cnic.c:1757: error: implicit declaration of function 'csum_ipv6_magic'

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:18:35 -07:00
Valentine Barshak 5402240c0b pasemi_mac: ethtool set settings support
Add ethtool set settings to pasemi_mac_ethtool.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 13:26:39 -07:00
Sarveshwar Bandi fad9ab2cef be2net: Implement ethtool get_phys_id function.
Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 13:26:38 -07:00
Alan Cox c49de94a56 libertas: fix build
drivers/net/wireless/libertas/cmdresp.c: In function ‘lbs_process_event’:
drivers/net/wireless/libertas/cmdresp.c:519: error: ‘TASK_INTERRUPTIBLE’
undeclared (first use in this function)
drivers/net/wireless/libertas/cmdresp.c:519: error: (Each undeclared
identifier is reported only once
drivers/net/wireless/libertas/cmdresp.c:519: error: for each function it
appears in.)

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-12 15:55:54 -04:00
Johannes Berg edbfdcceb4 b43: fix ieee80211_rx() context
Due to the way it interacts with the networking
stack and other parts of mac80211, ieee80211_rx()
must be called with disabled softirqs.

[1] http://thread.gmane.org/gmane.linux.kernel.wireless.general/39440/focus=40266

Reported-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-12 15:55:53 -04:00
Wey-Yi Guy d7c76f4c50 iwlwifi: change the order of freeing memory
Need to free the dynamic allocated memory before ieee80211_free_hw();
once call ieee80211_free_hw(), should not reference to "priv" data
structure.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-12 15:55:52 -04:00
Ben Hutchings 6c60e0c30c acenic: Pass up error code from ace_load_firmware()
If ace_load_firmware() fails, ace_init() cleans up but still returns
0, leading to an oops as seen in <http://bugs.debian.org/521383>.
It should pass the error code up.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 04:18:48 -07:00
Michael Chan 71034ba845 cnic: Add main functions to support bnx2x devices.
Add iSCSI support for bnx2x devices.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:30:18 -07:00
Michael Chan e251306556 cnic: Add bnx2x data structures.
Add hardware and software structures for bnx2x devices.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:30:16 -07:00
Michael Chan 86b53606eb cnic: Refactor some code.
Refactor ring init. code for subsequent 10G patches.  Also add rtnl_lock()
in cnic_uio_open() to prevent race condition with netdev events.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:30:15 -07:00
Michael Chan 993ac7b518 bnx2x: Add main CNIC interface functions.
Add the main CNIC registration, callback, MAC addr. setup functions.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:30:14 -07:00
Michael Chan 37b091bacb bnx2x: Add hw init code to support iSCSI.
Add code to initialize hardware blocks used for iSCSI.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:30:13 -07:00
Michael Chan e665bfda5b bnx2x: Refactor MAC address setup code.
For iSCSI MAC address setup in later patches.

Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:30:11 -07:00
Michael Chan 2891290219 bnx2x: Refactor bnx2x_sp_post().
Some of the SPQ (slow-path queue) operations will be used
by the cnic code in later patches.

Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:30:09 -07:00
Ron Mercer 6abd23468d qlge: Add CBFC pause frame counters to ethtool stats.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:16:18 -07:00
Ron Mercer 8092886094 qlge: Don't fail open when port is not initialized.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:16:17 -07:00
Ron Mercer fda9b77c10 qlge: Get rid of firmware handler debug code.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:16:16 -07:00
Ron Mercer 52e55f3cde qlge: Remove inline math for small rx buf mapping.
rx_ring->sbq_buf_len now holds the length of the mapped portion of the
buffer rather than the overall length.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:16:16 -07:00
Ron Mercer 88051b4e4f qlge: Store firmware revision as early as possible.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11 23:16:15 -07:00