safe/jmp/linux-2.6
14 years agocfg80211: no cookies in cfg80211_send_XXX()
Holger Schurig [Tue, 13 Oct 2009 11:28:13 +0000 (13:28 +0200)]
cfg80211: no cookies in cfg80211_send_XXX()

Get rid of cookies in cfg80211_send_XXX() functions.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix filter configuration
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:59 +0000 (12:47 +0300)]
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>
14 years agowl1271: make sure PS is disabled in PLT
Luciano Coelho [Tue, 13 Oct 2009 09:47:58 +0000 (12:47 +0300)]
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>
14 years agowl1271: Correct memory handling for FW boot
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:57 +0000 (12:47 +0300)]
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>
14 years agowl1271: Remove unnecessary rx_descriptor memory allocation
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:56 +0000 (12:47 +0300)]
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>
14 years agowl1271: Support for IPv4 ARP filtering
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:55 +0000 (12:47 +0300)]
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>
14 years agowl1271: Fix event handling mechanism
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:54 +0000 (12:47 +0300)]
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>
14 years agowl1271: Fix multicast list handling
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:53 +0000 (12:47 +0300)]
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>
14 years agowl1271: Checking of rx descriptor status fixed
Teemu Paasikivi [Tue, 13 Oct 2009 09:47:52 +0000 (12:47 +0300)]
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>
14 years agowl1271: Added 5 GHz support to join and rx
Teemu Paasikivi [Tue, 13 Oct 2009 09:47:51 +0000 (12:47 +0300)]
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>
14 years agowl1271: Added support to scan on 5 GHz band
Teemu Paasikivi [Tue, 13 Oct 2009 09:47:50 +0000 (12:47 +0300)]
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>
14 years agowl1271: Scan only enabled channels
Teemu Paasikivi [Tue, 13 Oct 2009 09:47:49 +0000 (12:47 +0300)]
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>
14 years agowl1271: Added 5 GHz parameters for wl1273
Teemu Paasikivi [Tue, 13 Oct 2009 09:47:48 +0000 (12:47 +0300)]
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>
14 years agowl1271: Remove busy-word checking
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:47 +0000 (12:47 +0300)]
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>
14 years agowl1271: Implement beacon early termination support
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:46 +0000 (12:47 +0300)]
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>
14 years agowl1271: Fix IRQ enable handling on FW init failure
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:45 +0000 (12:47 +0300)]
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>
14 years agowl1271: Move default FW config struct away from stack
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:44 +0000 (12:47 +0300)]
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>
14 years agowl1271: Add config structure for FW init parameters
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:43 +0000 (12:47 +0300)]
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>
14 years agowl1271: Add config structure for connection management parameters
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:42 +0000 (12:47 +0300)]
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>
14 years agowl1271: Add config structure for TX path parameters
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:41 +0000 (12:47 +0300)]
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>
14 years agowl1271: Add config structure for RX path parameters
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:40 +0000 (12:47 +0300)]
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>
14 years agowl1271: Add structure for firmware configuration values
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:39 +0000 (12:47 +0300)]
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>
14 years agowl1271: Workaround for reference clock setting on boot.
Juuso Oikarinen [Tue, 13 Oct 2009 09:47:38 +0000 (12:47 +0300)]
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>
14 years agoiwlwifi: use paged Rx
Zhu Yi [Fri, 9 Oct 2009 09:19:45 +0000 (17:19 +0800)]
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>
14 years agowl1271: remove unnecessary joins and join only when the bssid changes
Luciano Coelho [Mon, 12 Oct 2009 12:08:57 +0000 (15:08 +0300)]
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>
14 years agowl1271: use acx_rx_config instead of join when updating filters
Luciano Coelho [Mon, 12 Oct 2009 12:08:56 +0000 (15:08 +0300)]
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>
14 years agowl1271: Update boot time configuration for the new firmware
Juuso Oikarinen [Mon, 12 Oct 2009 12:08:55 +0000 (15:08 +0300)]
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>
14 years agowl1271: Remove outdated SPI functions
Juuso Oikarinen [Mon, 12 Oct 2009 12:08:54 +0000 (15:08 +0300)]
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>
14 years agowl1271: Update TX path block calucation algo
Juuso Oikarinen [Mon, 12 Oct 2009 12:08:53 +0000 (15:08 +0300)]
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>
14 years agowl1271: Enable smart reflex
Juuso Oikarinen [Mon, 12 Oct 2009 12:08:52 +0000 (15:08 +0300)]
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>
14 years agowl1271: Enable ELP
Juuso Oikarinen [Mon, 12 Oct 2009 12:08:51 +0000 (15:08 +0300)]
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>
14 years agowl1271: Update interrupt handling by removing an extra SPI read
Juuso Oikarinen [Mon, 12 Oct 2009 12:08:50 +0000 (15:08 +0300)]
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>
14 years agowl1271: RefClk configuration
Juuso Oikarinen [Mon, 12 Oct 2009 12:08:49 +0000 (15:08 +0300)]
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>
14 years agowl1271: Add top-register access functions
Juuso Oikarinen [Mon, 12 Oct 2009 12:08:48 +0000 (15:08 +0300)]
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>
14 years agowl1271: Remove RX workaround
Juuso Oikarinen [Mon, 12 Oct 2009 12:08:47 +0000 (15:08 +0300)]
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>
14 years agowl1271: Update memory mapping for firmware revision 6.1.0.0.241
Juuso Oikarinen [Mon, 12 Oct 2009 12:08:46 +0000 (15:08 +0300)]
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>
14 years agowl1271: enable HW_AVAILABLE interrupt to fix ELP
Luciano Coelho [Mon, 12 Oct 2009 12:08:45 +0000 (15:08 +0300)]
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>
14 years agowl1271: add workaround to avoid distortion due to excessive tx power
Luciano Coelho [Mon, 12 Oct 2009 12:08:44 +0000 (15:08 +0300)]
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>
14 years agowl1271: workaround to send a disconnect before rejoining
Luciano Coelho [Mon, 12 Oct 2009 12:08:43 +0000 (15:08 +0300)]
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>
14 years agowl1271: implement cmd_disconnect
Luciano Coelho [Mon, 12 Oct 2009 12:08:42 +0000 (15:08 +0300)]
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>
14 years agoiwlwifi: update channel switch command API
Wey-Yi Guy [Fri, 9 Oct 2009 20:20:34 +0000 (13:20 -0700)]
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>
14 years agoiwl3945: rearrange the code.
Abhijeet Kolekar [Fri, 9 Oct 2009 20:20:33 +0000 (13:20 -0700)]
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>
14 years agoiwlwifi/iwl3945: remove data_retry_limit
Abhijeet Kolekar [Fri, 9 Oct 2009 20:20:32 +0000 (13:20 -0700)]
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>
14 years agoiwl3945: rename tx to tx_cmd
Abhijeet Kolekar [Fri, 9 Oct 2009 20:20:31 +0000 (13:20 -0700)]
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>
14 years agoiwlwifi/iwl3945: unify rts_tx_cmd_flag
Abhijeet Kolekar [Fri, 9 Oct 2009 20:20:30 +0000 (13:20 -0700)]
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>
14 years agoiwlwifi: showing accumulative ucode statistics counters
Wey-Yi Guy [Fri, 9 Oct 2009 20:20:29 +0000 (13:20 -0700)]
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>
14 years agoiwlwifi: dynamic allocate tx queue structure
Wey-Yi Guy [Fri, 9 Oct 2009 20:20:28 +0000 (13:20 -0700)]
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>
14 years agoiwl3945: move iwl_power_initialize()
Ben Cahill [Fri, 9 Oct 2009 20:20:27 +0000 (13:20 -0700)]
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>
14 years agoiwl3945: streamline iwl3945_rfkill_poll()
Ben Cahill [Fri, 9 Oct 2009 20:20:26 +0000 (13:20 -0700)]
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>
14 years agoiwlwifi: fix userspace setting of sleep_level_override
Reinette Chatre [Fri, 9 Oct 2009 20:20:25 +0000 (13:20 -0700)]
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>
14 years agoiwlwifi: additional items in sensitivity range table
Wey-Yi Guy [Fri, 9 Oct 2009 20:20:24 +0000 (13:20 -0700)]
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>
14 years agoiwlwifi: remove duplicated/unused definition
Wey-Yi Guy [Fri, 9 Oct 2009 20:20:23 +0000 (13:20 -0700)]
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>
14 years agoiwlagn, iwl3945: remove apm_reset() functions
Ben Cahill [Fri, 9 Oct 2009 20:20:22 +0000 (13:20 -0700)]
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>
14 years agoiwl3945: remove unnecessary call to apm_ops.reset()
Ben Cahill [Fri, 9 Oct 2009 20:20:21 +0000 (13:20 -0700)]
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>
14 years agoiwlwifi: turn off device when not used.
Ben Cahill [Fri, 9 Oct 2009 20:20:20 +0000 (13:20 -0700)]
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>
14 years agoiwl3945: update iwl3945_apm_init()
Ben Cahill [Fri, 9 Oct 2009 20:20:19 +0000 (13:20 -0700)]
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>
14 years agoairo : allow supend with card without power management
matthieu castet [Fri, 9 Oct 2009 20:12:25 +0000 (22:12 +0200)]
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>
14 years agob43: Remove me as maintainer
Michael Buesch [Fri, 9 Oct 2009 18:48:16 +0000 (20:48 +0200)]
b43: Remove me as maintainer

Remove me

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agossb: Put host pointers into a union
Michael Buesch [Fri, 9 Oct 2009 18:32:10 +0000 (20:32 +0200)]
ssb: Put host pointers into a union

This slightly shrinks the structure.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43/legacy: Fix usage of host_pci pointer
Michael Buesch [Fri, 9 Oct 2009 18:30:10 +0000 (20:30 +0200)]
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>
14 years agoath9k: Fix TX hang poll routine
Sujith [Fri, 9 Oct 2009 04:21:28 +0000 (09:51 +0530)]
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>
14 years agolibertas: Check return status of command functions
Amitkumar Karwar [Fri, 9 Oct 2009 02:38:45 +0000 (19:38 -0700)]
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>
14 years agowl1271: Mask unneeded events from firmware to conserve power
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:36 +0000 (21:56 +0300)]
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>
14 years agowl1271: Configure beacon filtering on if PSM used
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:35 +0000 (21:56 +0300)]
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>
14 years agowl1271: Enable beacon filtering with the stack
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:34 +0000 (21:56 +0300)]
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>
14 years agowl1271: Add connection monitoring configuration
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:33 +0000 (21:56 +0300)]
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>
14 years agowl1271: Use vmalloc to allocate memory for firmware
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:32 +0000 (21:56 +0300)]
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>
14 years agowl1271: Multicast filtering configuration
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:31 +0000 (21:56 +0300)]
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>
14 years agowl1271: Clear probe-request template after scan
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:30 +0000 (21:56 +0300)]
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>
14 years agowl1271: use workqueue provided by mac80211 instead of the default
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:29 +0000 (21:56 +0300)]
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>
14 years agowl1271: hack to disable filters
Luciano Coelho [Thu, 8 Oct 2009 18:56:28 +0000 (21:56 +0300)]
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>
14 years agowl1271: added Juuso Oikarinen as module author
Luciano Coelho [Thu, 8 Oct 2009 18:56:27 +0000 (21:56 +0300)]
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>
14 years agowl1271: Corrections to TX path
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:26 +0000 (21:56 +0300)]
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>
14 years agowl1271: Update join usage
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:25 +0000 (21:56 +0300)]
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>
14 years agowl1271: Configure rate policies based on AP rates
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:24 +0000 (21:56 +0300)]
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>
14 years agowl1271: Implementation for SPI busy word checking
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:23 +0000 (21:56 +0300)]
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>
14 years agowl1271: mask aid bits 14 and 15 in ps-poll template
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:22 +0000 (21:56 +0300)]
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>
14 years agowl1271: Implement delayed entry into ELP
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:21 +0000 (21:56 +0300)]
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>
14 years agowl1271: Correct TKIP header space handling in TX path
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:20 +0000 (21:56 +0300)]
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>
14 years agowl1271: Security sequence number handling for TX (for WPA)
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:19 +0000 (21:56 +0300)]
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>
14 years agowl1271: Correction to TX block allocation calculation
Juuso Oikarinen [Thu, 8 Oct 2009 18:56:18 +0000 (21:56 +0300)]
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>
14 years agowl1271: remove unecessary qual parameter from rx status
Luciano Coelho [Thu, 8 Oct 2009 18:56:17 +0000 (21:56 +0300)]
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>
14 years agoorinoco: use cfg80211 ethtool ops
David Kilroy [Wed, 7 Oct 2009 21:23:32 +0000 (22:23 +0100)]
orinoco: use cfg80211 ethtool ops

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: run ath9k_hw_9271_pa_cal() initial calibration
Luis R. Rodriguez [Wed, 7 Oct 2009 20:22:19 +0000 (16:22 -0400)]
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>
14 years agoath9k_hw: run the carrier leakage calibration fix for ar9271 as well
Luis R. Rodriguez [Wed, 7 Oct 2009 20:22:18 +0000 (16:22 -0400)]
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>
14 years agosfc: Rename 'xfp' file and functions to reflect reality
Ben Hutchings [Fri, 23 Oct 2009 08:33:42 +0000 (08:33 +0000)]
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>
14 years agosfc: Remove unused code for non-autoneg speed/duplex switching
Ben Hutchings [Fri, 23 Oct 2009 08:33:27 +0000 (08:33 +0000)]
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>
14 years agosfc: Merge efx_fc_resolve() into efx_mdio_get_pause()
Ben Hutchings [Fri, 23 Oct 2009 08:33:17 +0000 (08:33 +0000)]
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>
14 years agosfc: Move MTD probe after netdev registration and name allocation
Ben Hutchings [Fri, 23 Oct 2009 08:33:09 +0000 (08:33 +0000)]
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>
14 years agosfc: Remove unnecessary tests of efx->membase
Ben Hutchings [Fri, 23 Oct 2009 08:33:00 +0000 (08:33 +0000)]
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>
14 years agosfc: Remove incorrect assertion from efx_pci_remove_main()
Ben Hutchings [Fri, 23 Oct 2009 08:32:51 +0000 (08:32 +0000)]
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>
14 years agosfc: Merge falcon_probe_phy() into falcon_probe_port()
Ben Hutchings [Fri, 23 Oct 2009 08:32:42 +0000 (08:32 +0000)]
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>
14 years agosfc: Remove pointless abstraction of memory BAR number
Ben Hutchings [Fri, 23 Oct 2009 08:32:33 +0000 (08:32 +0000)]
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>
14 years agosfc: Removed kernel-doc for nonexistent member of efx_phy_operations
Ben Hutchings [Fri, 23 Oct 2009 08:32:22 +0000 (08:32 +0000)]
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>
14 years agosfc: Maintain interrupt moderation values in ticks, not microseconds
Ben Hutchings [Fri, 23 Oct 2009 08:32:13 +0000 (08:32 +0000)]
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>
14 years agosfc: Move shared members of struct falcon_nic_data into struct efx_nic
Ben Hutchings [Fri, 23 Oct 2009 08:32:04 +0000 (08:32 +0000)]
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>
14 years agosfc: Move efx_xmit_done() declaration into correct stanza
Ben Hutchings [Fri, 23 Oct 2009 08:31:54 +0000 (08:31 +0000)]
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>
14 years agosfc: Remove declarations of nonexistent functions
Ben Hutchings [Fri, 23 Oct 2009 08:31:46 +0000 (08:31 +0000)]
sfc: Remove declarations of nonexistent functions

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Change order of device removal to reverse of probe order
Ben Hutchings [Fri, 23 Oct 2009 08:31:37 +0000 (08:31 +0000)]
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>
14 years agosfc: Merge struct efx_blinker into struct efx_board
Ben Hutchings [Fri, 23 Oct 2009 08:31:29 +0000 (08:31 +0000)]
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>