openwrt/staging/blogic.git
14 years agowl1251: fix ELP_CTRL register accesses when using SDIO
Grazvydas Ignotas [Thu, 11 Mar 2010 15:44:57 +0000 (17:44 +0200)]
wl1251: fix ELP_CTRL register accesses when using SDIO

For some unknown reason ELP_CTRL can't be accesed using
sdio_memcpy_* functions (any attemts to do so result in timeouts):

 wl1251: ERROR sdio write failed (-110)
 wl1251: ERROR sdio read failed (-110)
 wl1251: WARNING WLAN not ready

To fix this, add special IO functions for ELP_CTRL access that are
using sdio_readb/sdio_writeb. Similar handling is done in TI
reference driver from Android code drop.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: Bob Copeland <me@bobcopeland.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: make local symbols static
Grazvydas Ignotas [Fri, 12 Mar 2010 10:28:41 +0000 (12:28 +0200)]
wl1251: make local symbols static

Make local functions and data static, also constify
some structures. While at it, clean up unneeded includes.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: Bob Copeland <me@bobcopeland.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: optimize tx status processing
Felix Fietkau [Thu, 11 Mar 2010 15:28:24 +0000 (16:28 +0100)]
mac80211: optimize tx status processing

When a cooked monitor interface is active, ieee80211_tx_status()
generates a radiotap header for every single frame, even if it wasn't
injected and thus won't be sent to a monitor interface.
This patch reduces cpu utilization by moving the cooked monitor check a
bit earlier, before it generates the rtap header.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoDRIVER: Libertas: Fixed coding style in rx.c
Stewart Malik [Thu, 11 Mar 2010 09:58:29 +0000 (20:28 +1030)]
DRIVER: Libertas: Fixed coding style in rx.c

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove unused beacon timer code
John W. Linville [Wed, 10 Mar 2010 16:08:50 +0000 (11:08 -0500)]
ath5k: remove unused beacon timer code

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove dead source in ath5k_combine_linear_pcdac_curves
John W. Linville [Wed, 10 Mar 2010 16:08:49 +0000 (11:08 -0500)]
ath5k: remove dead source in ath5k_combine_linear_pcdac_curves

This code was commented-out when it was added about a year ago and
remains unchanged -- seems as if we don't need it...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove some dead functions
John W. Linville [Wed, 10 Mar 2010 16:08:48 +0000 (11:08 -0500)]
ath5k: remove some dead functions

"ath5k: remove stale function declarations, make some functions static"
commented-out some unused functions.  This removes them.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
14 years agoairo : Print of firmware version
matthieu castet [Sun, 28 Feb 2010 14:42:54 +0000 (15:42 +0100)]
airo : Print of firmware version

For the firmware version 5.30.17 the log file shows:
Firmware version 5.30.11

The variable softSubVer is binary.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Jose Alonso <joalonsof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoairo : fix printing status info
matthieu castet [Sun, 28 Feb 2010 14:31:21 +0000 (15:31 +0100)]
airo : fix printing status info

For some status, reason is encoded in the low byte, but airo_print_status forgot tp mask low byte in status parsing.

This make it only work when reason is 0.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agossb: Export ssb_chipco_gpio_control - needed by N PHY code
Larry Finger [Wed, 10 Mar 2010 16:41:32 +0000 (10:41 -0600)]
ssb: Export ssb_chipco_gpio_control - needed by N PHY code

The latest changes in the N PHY core require the symbol
ssb_chipco_gpio_control to be exported.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: fixing retries in ath5k_hw_setup_4word_tx_desc
Andrew Blaich [Mon, 1 Mar 2010 15:30:40 +0000 (10:30 -0500)]
ath5k: fixing retries in ath5k_hw_setup_4word_tx_desc

The rate control algorithm, default is Minstrel for ath5k, determines
the number of retries to use for each rate.  However, there exists in
ath5k_hw_setup_4word_tx_desc (which is called for AR5212 like devices)
a set number of retries defined by AR5K_TUNE_HWTXTRIES.  The set
number of tries is added to the tx_tries0 variable setup by the rate
control algorithm.  This changes the number of retries the rate
control algorithm considers necessary.  By removing the
AR5K_TUNE_HWTXTRIES from the retry calculation the rate control
algorithm is given control over the number of retries.

Signed-off-by: Andrew Blaich <ablaich@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix rate control tx status handling for A-MPDU
Felix Fietkau [Mon, 1 Mar 2010 12:32:11 +0000 (13:32 +0100)]
ath9k: fix rate control tx status handling for A-MPDU

Currently the rate control tx status update gets called for every
subframe of an A-MPDU, and ath9k marks the frame with the relevant
status update with an internal flag. This not suitable for rate control
algorithms using the standard mac80211 rate control API, so fix this by
using IEEE80211_TX_STAT_AMPDU for marking the correct frames that
should be processed.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Changed wl1271_sdio to be selectable only on ARM
Teemu Paasikivi [Wed, 10 Mar 2010 11:22:31 +0000 (13:22 +0200)]
wl1271: Changed wl1271_sdio to be selectable only on ARM

As wl1271_sdio implementation depends on ARM GPIO impelementation it is
not directly usable on other architectures at the moment. Added
ARM dependency to kernel configuration option.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@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 agoath5k: Minor EEPROM documentation updates
Bruno Randolf [Tue, 9 Mar 2010 07:56:21 +0000 (16:56 +0900)]
ath5k: Minor EEPROM documentation updates

Here are some minor updates for EEPROM, mostly documentation and some small
fixes which have no effect at the moment.

- fixed_bias is not available for B mode.

- AR5K_EEPROM_[RT]X_CHAIN_DIS is 3 bit. this is MIMO and will not be used in
  ath5k, but just to be correct.

- AR5K_EEPROM_JAP_MID_EN added, and shift of following flags adapted.

- added some documentation for EEPROM values and some comments.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: IQ calibration for AR5211 is slightly different
Bruno Randolf [Tue, 9 Mar 2010 07:56:15 +0000 (16:56 +0900)]
ath5k: IQ calibration for AR5211 is slightly different

according to the HAL sources the calculation of the Q value is slightly
different for AR5211 chips.

i couldn't test this since IQ calibration never finishes on older parts. this
is a different problem...

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: add debugfs file frameerrors
Bruno Randolf [Tue, 9 Mar 2010 07:56:00 +0000 (16:56 +0900)]
ath5k: add debugfs file frameerrors

add a debugfs file to see different RX and TX errors as reported in our status
descriptors. this can help to diagnose driver problems.

statistics can be cleared by writing 'clear' into the frameerrors file.

example:

# cat /sys/kernel/debug/ath5k/phy0/frameerrors
RX
---------------------
CRC     27      (11%)
PHY     3       (1%)
FIFO    0       (0%)
decrypt 0       (0%)
MIC     0       (0%)
process 0       (0%)
jumbo   0       (0%)
[RX all 245]

TX
---------------------
retry   2       (9%)
FIFO    0       (0%)
filter  0       (0%)
[TX all 21]

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove ah_gpio_npins
Bruno Randolf [Tue, 9 Mar 2010 07:55:55 +0000 (16:55 +0900)]
ath5k: remove ah_gpio_npins

it's never used and we have a newer implementation in gpio.c.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove ah_mac_revision
Bruno Randolf [Tue, 9 Mar 2010 07:55:49 +0000 (16:55 +0900)]
ath5k: remove ah_mac_revision

it's not used, and we have ah_mac_srev.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove ah_magic
Bruno Randolf [Tue, 9 Mar 2010 07:55:44 +0000 (16:55 +0900)]
ath5k: remove ah_magic

it's never used. probably a leftover from the old OpenHAL days...

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove double opmode definition
Bruno Randolf [Tue, 9 Mar 2010 07:55:38 +0000 (16:55 +0900)]
ath5k: remove double opmode definition

opmode (operating mode) was defined in struct ath5k_hw and struct ath5k_softc.
remove it from ath5k_hw and use only from ath5k_softc (sc->opmode).

(btw: what's the meaning of opmode when we have multiple interfaces?)

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: preserve antenna settings
Bruno Randolf [Tue, 9 Mar 2010 07:55:28 +0000 (16:55 +0900)]
ath5k: preserve antenna settings

save antenna settings and preserve across resets.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: add antenna statistics and debugfs file for antenna settings
Bruno Randolf [Tue, 9 Mar 2010 07:55:17 +0000 (16:55 +0900)]
ath5k: add antenna statistics and debugfs file for antenna settings

keep statistics about which antenna was used for TX and RX. this is used only
for debugging right now, but might have other applications later.

add a new file 'antenna' in debugfs (/sys/kernel/debug/ath5k/phy0/antenna) to show
antenna use statistics and antenna diversity related register values. it can
also be used to set the antenna mode until we have proper support for that in
iw:
  - echo diversity > antenna: use default antenna mode (RX and TX diversity)
  - echo fixed-a > antenna: use fixed antenna A for RX and TX
  - echo fixed-b > antenna: use fixed antenna B for RX and TX
  - echo clear > antenna: reset antenna statistics

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agorndis_wlan: Implement cfg80211 PMKSA API
Jussi Kivilinna [Thu, 4 Mar 2010 16:27:36 +0000 (18:27 +0200)]
rndis_wlan: Implement cfg80211 PMKSA API

Add support for cfg80211 set_pmksa/del_pmksa/flush_pmksa. Updating PMKID
entry list is done on driver side since NDIS API requires full list update.

v2:
 - fixed to use new netdev_dbg/warn/etc instead of old devdbg/warn/etc
 - fixed false padding from struct ndis_80211_bssid_info

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agorndis_wlan: get max_num_pmkids from device
Jussi Kivilinna [Thu, 4 Mar 2010 16:27:24 +0000 (18:27 +0200)]
rndis_wlan: get max_num_pmkids from device

Extend rndis_wlan_get_caps() to get 802.11 capabilities and maximum
supported number of PMKIDs by device.

v2: fixed to use new netdev_dbg/warn/etc instead of old devdbg/warn/etc

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agorndis_wlan: remove unused variables from priv structure
Jussi Kivilinna [Thu, 4 Mar 2010 16:27:12 +0000 (18:27 +0200)]
rndis_wlan: remove unused variables from priv structure

Some variables were left unused after cfg80211 conversion. Remove those and related deadcode.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agorndis_wlan: copy only useful data from rndis_command respond
Jussi Kivilinna [Thu, 4 Mar 2010 16:27:02 +0000 (18:27 +0200)]
rndis_wlan: copy only useful data from rndis_command respond

rndis_query_oid() uses full output buffer size to copy response buffer
from rndis_command()/device. This doesn't cause problems as response buffer
is sized based on output buffer but does copy extra unset bytes.
So change rndis_query_oid() so that only meaningful bytes are being copied.

Also in case of malfunctioning device/cable/etc returned data offset from
device might be wrong so bound check memory access correctly, so add
checks for this.

v2: fixed to use new netdev_dbg/warn/etc instead of old devdbg/warn/etc

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agominstrel: make the rate control ops reusable from another rc implementation
Felix Fietkau [Mon, 1 Mar 2010 21:21:40 +0000 (22:21 +0100)]
minstrel: make the rate control ops reusable from another rc implementation

This patch makes it possible to reuse the minstrel rate control ops
from another rate control module. This is useful in preparing for the
new 802.11n implementation of minstrel, which will reuse the old code
for legacy stations.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agominstrel: simplify and fix debugfs code
Felix Fietkau [Mon, 1 Mar 2010 21:17:38 +0000 (22:17 +0100)]
minstrel: simplify and fix debugfs code

This patch cleans up the debugfs read function for the statistics by
using simple_read_from_buffer instead of its own semi-broken hack.
Also removes a useless member of the minstrel debugfs info struct.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Fix TX/RX padding for all frames
Benoit Papillault [Sat, 27 Feb 2010 22:05:26 +0000 (23:05 +0100)]
ath5k: Fix TX/RX padding for all frames

Currently, the padding position is based on
ieee80211_get_hdrlen_from_skb(). This is not correct since the HW does
padding on RX (and expect the same padding to be present on TX) at the
following position :

- management : 24 + 6 if 4-addr format
- control    : 24 + 6 if 4-addr format
- data       : 24 + 6 if 4-addr format + 2 if QoS
- invalid    : 24 + 6 if 4-addr format

whereas ieee80211_get_hdrlen_from_skb() is :

- management : 24
- control    : 16 except for ACK/CTS where it is 10
- data       : 24 + 6 if 4-addr format + 2 if QoS + 2 if QoS & order
- invalid    : 24

So, correct frames are not affected : management frames do not use
4-addr format, control frames have no body and invalid frames are ...
not valid by definition. However, in order to use monitor interface for
debugging purpose, one must be able to send/receive any frames, be it
correct or not. Such frames are affected by incorrect padding.

Moreover, since padding is added on TX, we need to remove it before
calling ieee80211_tx_status. This affect TX packets received by monitor
interfaces.

It has been tested between an ath5k based card (AR5212) and an ar9170usb
based card (netgear WNDA3100) using a frame generator and a monitor
interface for each card.

v2: Added ath5k_add_padding / ath5k_remove_padding

Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: give warning if building w/out rate ctrl algorithm
Andres Salomon [Fri, 26 Feb 2010 00:18:47 +0000 (19:18 -0500)]
mac80211: give warning if building w/out rate ctrl algorithm

I discovered that if EMBEDDED=y, one can accidentally build a mac80211 stack
and drivers w/ no rate control algorithm.  For drivers like RTL8187 that don't
supply their own RC algorithms, this will cause ieee80211_register_hw to
fail (making the driver unusable).

This will tell kconfig to provide a warning if no rate control algorithms
have been selected.  That'll at least warn the user; users that know that
their drivers supply a rate control algorithm can safely ignore the
warning, and those who don't know (or who expect to be using multiple
drivers) can select a default RC algorithm.

Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: typo fix and code cleanup
Zhu Yi [Thu, 25 Feb 2010 06:15:31 +0000 (14:15 +0800)]
iwmc3200wifi: typo fix and code cleanup

Fix wrong IWM_RX_TICKET_DROP_REASON_MSK macro define, typo and other
small cleanups.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: mark some pmksa functions static
Zhu Yi [Thu, 25 Feb 2010 06:15:30 +0000 (14:15 +0800)]
iwmc3200wifi: mark some pmksa functions static

This fixes the sparse warnings.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: increase concatenated buffer
Zhu Yi [Thu, 25 Feb 2010 06:15:29 +0000 (14:15 +0800)]
iwmc3200wifi: increase concatenated buffer

Increase concatenated buffer from 8K to 32K to get better performance.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: protect rx_tickets and rx_packets[] lists
Zhu Yi [Thu, 25 Feb 2010 06:15:28 +0000 (14:15 +0800)]
iwmc3200wifi: protect rx_tickets and rx_packets[] lists

Protect rx_tickets and rx_packets[] lists with spinlocks to fix the
race condition for concurrent list operations. In iwmc3200wifi both
sdio_isr_worker and rx_worker workqueues can access the rx ticket
and packets lists at the same time under high rx load.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: add ftrace event tracing support
Zhu Yi [Thu, 25 Feb 2010 06:15:27 +0000 (14:15 +0800)]
iwmc3200wifi: add ftrace event tracing support

Add event tracer for iwmc3200wifi driver. When enabled, all the
commands and responses between the driver and firmware (also
including Tx/Rx frames) will be recorded in the ftrace ring buffer.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: remove "_safe" for some list_for_each_entry usage
Zhu Yi [Thu, 25 Feb 2010 06:15:26 +0000 (14:15 +0800)]
iwmc3200wifi: remove "_safe" for some list_for_each_entry usage

Use list_for_each_entry instead of list_for_each_entry_safe in
places iteration against list entry removal is not required.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: refuse to associate on unallowed channels
Zhu Yi [Thu, 25 Feb 2010 06:15:25 +0000 (14:15 +0800)]
iwmc3200wifi: refuse to associate on unallowed channels

We need to make sure we don't associate with APs on unallowed
channels (according to regulatory setting). This could happen
when the channel is not specified (auto-select) within the
connection request. In this case we get the AP's channel until
the firmware indicates the association succeeded later. We need
to verify the associated channel. If the channel is disabled by
regulatory, we have to disassociate with the AP.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoenhance sysfs rfkill interface
florian@mickler.org [Fri, 26 Feb 2010 11:01:34 +0000 (12:01 +0100)]
enhance sysfs rfkill interface

This commit introduces two new sysfs knobs.

/sys/class/rfkill/rfkill[0-9]+/blocked_hw: (ro)
hardblock kill state
/sys/class/rfkill/rfkill[0-9]+/blocked_sw: (rw)
softblock kill state

Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoDocument the rfkill sysfs ABI
florian@mickler.org [Wed, 24 Feb 2010 11:05:16 +0000 (12:05 +0100)]
Document the rfkill sysfs ABI

This moves sysfs ABI info from Documentation/rfkill.txt to the
ABI subfolder and reformats it.

This also schedules the deprecated sysfs parts to be removed in
2012 (claim file) and 2014 (state file).

Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwl3945: check ucode load error code
Abhijeet Kolekar [Fri, 26 Feb 2010 23:17:01 +0000 (15:17 -0800)]
iwl3945: check ucode load error code

Check successful completion of BSM loading. Give a chance to
load BSM again. If BSM loading is unsuccessful we should exit
and not initilize NIC. Before this checking even if the BSM loading failed
driver tries to initilize the NIC which should not be the case.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: clean up queue/fifo handling
Johannes Berg [Wed, 24 Feb 2010 09:57:19 +0000 (01:57 -0800)]
iwlwifi: clean up queue/fifo handling

4965 hardware has 7 queues reserved and the
remaining ones used for aggregation, 5000
and higher need to have 10 reserved. This
is not very clear in the code right now,
unfortunately.

Introduce a new IWL_TX_FIFO_UNUSED constant
and make the queue/FIFO mapping arrays able
to hold that value, and change the setup
code to reserve all queues in the arrays
(the queue number is the index) and use the
new unused constant to not map those queues
to any FIFO.

Additionally, clear up the AC/queue mapping
code to be more understandable. The mapping
is the identity mapping right now, but with
the mapping function I think it's easier to
understand what happens there.

Finally, HCCA isn't implemented at all and
I think newer microcode removed it, so let's
remove all mention of it in the code, some
comments remain for 4965.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: add internal short scan support for 3945
Wey-Yi Guy [Wed, 24 Feb 2010 16:28:30 +0000 (08:28 -0800)]
iwlwifi: add internal short scan support for 3945

Add internal short scan support for 3945 NIC, This allows 3945 NIC
to support radio reset request like the other series of NICs.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove unnecessary parameter in scan function
Wey-Yi Guy [Tue, 23 Feb 2010 22:36:13 +0000 (14:36 -0800)]
iwlwifi: remove unnecessary parameter in scan function

small change to remove unnecessary "ret" parameter since it not being
used.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove duplicate function
Wey-Yi Guy [Tue, 23 Feb 2010 22:05:29 +0000 (14:05 -0800)]
iwlwifi: remove duplicate function

"internal_scan" debugfs function serves the same propose of mode "0" of
"force_reset" debugfs function. Remove it to avoid duplicate.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove needlessly exported symbols
Reinette Chatre [Fri, 19 Feb 2010 19:41:32 +0000 (11:41 -0800)]
iwlwifi: remove needlessly exported symbols

iwl_apm_stop_master and iwl_internal_short_hw_scan
are only used within iwlcore and thus do not need to be exported.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: change WEP key protection to use mutex
Johannes Berg [Fri, 19 Feb 2010 19:42:32 +0000 (11:42 -0800)]
iwlwifi: change WEP key protection to use mutex

For later station notification support we would like WEP key setting to be
done synchronously always. Currently all places from which WEP key is set
can sleep, but the usage of sta_lock prevents it to do so. Modify the
locking to use priv->mutex instead and thus enable this call to sleep.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove un-necessary parameters
Wey-Yi Guy [Thu, 18 Feb 2010 23:22:07 +0000 (15:22 -0800)]
iwlwifi: remove un-necessary parameters

small code cleanup to remove un-necessary parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlagn: move sysfs flags and filter_flags files to debugfs
Johannes Berg [Thu, 18 Feb 2010 08:36:07 +0000 (00:36 -0800)]
iwlagn: move sysfs flags and filter_flags files to debugfs

These files are incompatible with some changes
I'm making, and don't really belong into sysfs
anyway as they can only be used for debugging.
Since writing them will probably crash the
firmware, keep only the reading part and move
them into debugfs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove STATUS_MODE_PENDING
Johannes Berg [Wed, 17 Feb 2010 12:54:08 +0000 (04:54 -0800)]
iwlwifi: remove STATUS_MODE_PENDING

Since rfkill integration, mac80211 can no
longer add an interface while the hardware
is not ready, so STATUS_MODE_PENDING can
never be set.

Also, remove another superfluous channel
sanity check and return the commit_rxon
return value in case it failed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove alive start adhoc restart
Johannes Berg [Wed, 17 Feb 2010 09:43:41 +0000 (01:43 -0800)]
iwlwifi: remove alive start adhoc restart

This code will never trigger, because when
we call this during interface start, neither
priv->vif nor priv->iw_mode conditions will
be true, and when it happens during reset
then priv->vif is also NULL. Also, in both
cases the same code will be executed as part
of iwl_bss_info_changed(), which contains a
copy of this code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: move 3945 clip groups to 3945 data
Johannes Berg [Wed, 17 Feb 2010 10:39:19 +0000 (02:39 -0800)]
iwlwifi: move 3945 clip groups to 3945 data

Only used on 3945, so it can be in the
3945-specific part of the data.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: clear up AC/FIFO debug output
Johannes Berg [Fri, 22 Jan 2010 12:06:41 +0000 (04:06 -0800)]
iwlwifi: clear up AC/FIFO debug output

Not all queues are mapped for frame transmission,
so saying "AC" is misleading. They are all mapped
to FIFOs, obviously, though, so use that term and
also say AC/CMD instead of just AC for the queue
type.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove sanity check
Johannes Berg [Thu, 21 Jan 2010 15:31:07 +0000 (07:31 -0800)]
iwlwifi: remove sanity check

iwl_mac_beacon_update can only be called
when the operating mode is IBSS, so it
doesn't need to verify that again.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove IBSS channel sanity check
Johannes Berg [Thu, 21 Jan 2010 15:32:20 +0000 (07:32 -0800)]
iwlwifi: remove IBSS channel sanity check

mac80211 will always enforce using a channel
that the driver allowed for IBSS use.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove priv->active_rate_basic
Johannes Berg [Thu, 21 Jan 2010 19:33:19 +0000 (11:33 -0800)]
iwlwifi: remove priv->active_rate_basic

This variable is assigned a default value,
but then assigned zero as soon as mac80211
calls a change channel (which will happen
right after the hw is started) and after
that it never changes again.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove never-changing priv->rates_mask variable
Johannes Berg [Thu, 21 Jan 2010 19:23:30 +0000 (11:23 -0800)]
iwlwifi: remove never-changing priv->rates_mask variable

It's always just IWL_RATES_MASK.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove frame dropping
Johannes Berg [Thu, 18 Feb 2010 18:56:57 +0000 (10:56 -0800)]
iwlwifi: remove frame dropping

With some of the new code in mac80211, public action
frames can be exchanged as non-injected frames even
while not associated.

Aside from that, dropping frames here is pointless
since we do deal with arbitrary frames that were
injected already, so let mac80211 make the decision
about which frames to allow or not.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove dead code from iwl_mac_reset_tsf
Johannes Berg [Thu, 21 Jan 2010 15:32:58 +0000 (07:32 -0800)]
iwlwifi: remove dead code from iwl_mac_reset_tsf

iwl_mac_reset_tsf will only ever be called in
IBSS mode, so checking for other modes is not
useful and the code that depends on that will
not be executed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove superfluous channel check
Johannes Berg [Thu, 21 Jan 2010 15:26:26 +0000 (07:26 -0800)]
iwlwifi: remove superfluous channel check

mac80211 will not allow using channels not
marked as allowing IBSS for IBSS mode.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlagn: remove write-only variables
Johannes Berg [Tue, 19 Jan 2010 18:04:28 +0000 (10:04 -0800)]
iwlagn: remove write-only variables

Updating the variables last_rx_rssi, last_tsf
and last_beacon_time needs a lot of code but
they are not actually used in iwlagn (only in
3945) so we can move them to the 3945 specific
data.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: move ICT data to agn part of union
Johannes Berg [Thu, 21 Jan 2010 14:25:54 +0000 (06:25 -0800)]
iwlwifi: move ICT data to agn part of union

Since the ICT data is all AGN specific, it can
be the first data to create the _agn part of the
device-specific union in the priv struct.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: move 3945 specific data into union
Johannes Berg [Thu, 21 Jan 2010 14:09:28 +0000 (06:09 -0800)]
iwlwifi: move 3945 specific data into union

To be obviously correct, this patch only modifies
3945 files and the struct definition. A follow-up
patch will create the AGN part of the union.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlagn: move ICT code into separate file
Johannes Berg [Thu, 21 Jan 2010 14:21:10 +0000 (06:21 -0800)]
iwlagn: move ICT code into separate file

All the ICT ISR code is iwlagn specific, and doesn't
need to be in iwlcore. So create a new iwl-agn.h
header file that will hold agn specific function
declarations etc., and move the ICT code into a new
iwl-agn-ict.c file that is linked into iwlagn. This
also gets rid of exporting those symbols.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agob43: N-PHY: switch to chanspec ops
Rafał Miłecki [Sat, 27 Feb 2010 12:03:41 +0000 (13:03 +0100)]
b43: N-PHY: switch to chanspec ops

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement chanspec setup
Rafał Miłecki [Sat, 27 Feb 2010 12:03:40 +0000 (13:03 +0100)]
b43: N-PHY: implement chanspec setup

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: isloate 2055 radio setup
Rafał Miłecki [Sat, 27 Feb 2010 12:03:39 +0000 (13:03 +0100)]
b43: N-PHY: isloate 2055 radio setup

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: adjust gain table
Rafał Miłecki [Sat, 27 Feb 2010 12:03:38 +0000 (13:03 +0100)]
b43: N-PHY: adjust gain table

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: switch to chanspec struct
Rafał Miłecki [Sat, 27 Feb 2010 12:03:37 +0000 (13:03 +0100)]
b43: N-PHY: switch to chanspec struct

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: update post init of 2055 radio
Rafał Miłecki [Sat, 27 Feb 2010 12:03:36 +0000 (13:03 +0100)]
b43: N-PHY: update post init of 2055 radio

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: update writing channel-specific radio registers
Rafał Miłecki [Sat, 27 Feb 2010 12:03:35 +0000 (13:03 +0100)]
b43: N-PHY: update writing channel-specific radio registers

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: turn radio on/off (rfkill)
Rafał Miłecki [Sat, 27 Feb 2010 12:03:34 +0000 (13:03 +0100)]
b43: N-PHY: turn radio on/off (rfkill)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: initialize super switch
Rafał Miłecki [Sat, 27 Feb 2010 12:03:33 +0000 (13:03 +0100)]
b43: N-PHY: initialize super switch

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add some registers and structs definitions
Rafał Miłecki [Sat, 27 Feb 2010 12:03:32 +0000 (13:03 +0100)]
b43: N-PHY: add some registers and structs definitions

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: use different MAC addresses for virtual interfaces
Johannes Berg [Thu, 25 Feb 2010 14:13:11 +0000 (15:13 +0100)]
mac80211: use different MAC addresses for virtual interfaces

Drivers can now advertise to cfg80211 that they have
multiple MAC addresses reserved for a device, but we
don't currently make use of that in mac80211.

Change that and assign different addresses to new
virtual interfaces (if addresses are available) in
order to make it easier for users to use multiple
virtual interfaces; they no longer need to always
assign a new MAC address manually.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Improve software scan timing
Helmut Schaa [Wed, 24 Feb 2010 13:19:21 +0000 (14:19 +0100)]
mac80211: Improve software scan timing

The current software scan implemenation in mac80211 returns to the operating
channel after each scanned channel. However, in some situations (e.g. no
traffic) it would be nicer to scan a few channels in a row to speed up
the scan itself.

Hence, after scanning a channel, check if we have queued up any tx frames and
return to the operating channel in that case.

Unfortunately we don't know if the AP has buffered any frames for us. Hence,
scan only as many channels in a row as the pm_qos latency and the negotiated
listen interval allows us to.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: never read from the AR_IMR_S2 register
Pavel Roskin [Tue, 23 Feb 2010 23:15:27 +0000 (18:15 -0500)]
ath9k: never read from the AR_IMR_S2 register

The AR_IMR_S2 register sometimes cannot be read correctly.  Instead of a
valid value, 0xdeadbeef is returned.  The driver has been observed
writing that value back to AR_IMR_S2 after changing a few bits.

Cache the register value in ah->imrs2_reg and always write chached value
to the register.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix rates setup on IBSS merge
Bruno Randolf [Tue, 23 Feb 2010 09:51:13 +0000 (18:51 +0900)]
mac80211: fix rates setup on IBSS merge

when an IBSS merge happened, the supported rates for the newly added station
were left empty, causing the rate control module to be initialized with only
the basic rates.

also the section of the ibss code which deals with updating supported rates for
an already existing station fails to inform the rate control module about the
new rates. as i don't know how to fix this (minstrel does not have an update
function), i have just added a comment for now.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Remove tx-power level workaround
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:42 +0000 (08:38 +0200)]
wl1271: Remove tx-power level workaround

This patch removes the workaround limiting chipset TX power to 12dB, instead
using the value configured by the mac80211.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Disable host TX rate control
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:41 +0000 (08:38 +0200)]
wl1271: Disable host TX rate control

Disable host TX rate control. The wl1271 firmware is already managing rate
control, so this eliminate unnecessary host processing.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Clean up TX security sequence number handling
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:40 +0000 (08:38 +0200)]
wl1271: Clean up TX security sequence number handling

Instead of managing the TX security sequence number as two variables, use
one 64 bit variable. This greatly simplifies the handling of the number.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Clean up firmware block allocation calculation
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:39 +0000 (08:38 +0200)]
wl1271: Clean up firmware block allocation calculation

This patch simplifies the required block count calculation. Though it
introduces a division operator, it greatly simplifies the formula.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Update TX packet life time handling with higher resolution time
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:38 +0000 (08:38 +0200)]
wl1271: Update TX packet life time handling with higher resolution time

This patch uses a higher precision timer to synchronize with the firmware
clock. Improved precision is needed as on some platforms a jiffy may be up to
tens of milliseconds, and the required precision is closer to TU's.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Implement looped IRQ handling
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:37 +0000 (08:38 +0200)]
wl1271: Implement looped IRQ handling

This patch implements looped IRQ handling. In essence, if a new interrupt is
asserted by the FW while the host is processing the previous one, the host
will directly proceed processing the new IRQ without leaving the handling
function.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Don't mask interrupts while handling interrupt
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:36 +0000 (08:38 +0200)]
wl1271: Don't mask interrupts while handling interrupt

Don't mask firmware interrupts while processing interrupts. This allows the
interrupt handler looping to work efficiently thus reducing interrupt
processing latency.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Aggregate RX acknowledgements to FW
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:35 +0000 (08:38 +0200)]
wl1271: Aggregate RX acknowledgements to FW

This patch will ack RX frames read from the firmware in one single write,
instead of acking all the frames separately. This will reduce the amount of
required communication per frame.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Remove annoying PSM entry/exit kernel traces
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:34 +0000 (08:38 +0200)]
wl1271: Remove annoying PSM entry/exit kernel traces

Remove the annoying and dmesg-flooding WLAN PSM entry/exit traces. Instead,
only output them if PSM traces are enabled.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix queue stopping/waking for TX path
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:33 +0000 (08:38 +0200)]
wl1271: Fix queue stopping/waking for TX path

The queue stopping/waking functionality was broken in a way that could
cause huge latencies in TX transfers and even cause the TX to stall in the
right circumstances. Correct these problems.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix ad-hoc mode neighborhood detection
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:32 +0000 (08:38 +0200)]
wl1271: Fix ad-hoc mode neighborhood detection

This patch fixes a bug in ad-hoc mode preventing mac80211 from properly
detecting other ad-hoc networks with the same SSID.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Improvements to the TX path
Juuso Oikarinen [Mon, 22 Feb 2010 06:38:31 +0000 (08:38 +0200)]
wl1271: Improvements to the TX path

- Fix a TX result overflow problem that was present in the TX path and visible
  with at least linksys AP's (probably any AP with high throughput capability.)
- Optimize TX by writing FW trigger for a group of TX frames instead of
  each and every frame.
- Slightly optimize the TX path code.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: don't get received frames from hardware in PLT mode
Kalle Valo [Mon, 22 Feb 2010 06:38:30 +0000 (08:38 +0200)]
wl1271: don't get received frames from hardware in PLT mode

Most probably patch "wl1271: add most of the normal initialization commands
to PLT mode" enabled the RX path in firmware so that now driver received
frames and passed them to mac80211, which warned about them.

Workaround this by not retrieving frames from the hardware, just ignore them.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fixed unloading of the wl1271_sdio module
Teemu Paasikivi [Mon, 22 Feb 2010 06:38:29 +0000 (08:38 +0200)]
wl1271: Fixed unloading of the wl1271_sdio module

Fixed two bugs causing problems when unloding wl1271 module. First was
missing sdio_set_drvdata call from the probe function, second was order
of function calls in the remove function.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Changed access to fw status register to use raw read
Teemu Paasikivi [Mon, 22 Feb 2010 06:38:28 +0000 (08:38 +0200)]
wl1271: Changed access to fw status register to use raw read

Changed access to fw status register to use raw read instead of
translated addressing. On SDIO access by translated addressing was not
working and raw access is working also on SPI.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Initial SDIO implementation
Teemu Paasikivi [Mon, 22 Feb 2010 06:38:27 +0000 (08:38 +0200)]
wl1271: Initial SDIO implementation

Added initial implementation of SDIO interfacte to the wl1271 driver.
When selected, this adds new module called "wl1271_sdio".

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Divided driver to two separate modules
Teemu Paasikivi [Mon, 22 Feb 2010 06:38:26 +0000 (08:38 +0200)]
wl1271: Divided driver to two separate modules

Divided wl1271 driver to wl1271 "core" and wl1271_spi modules in preparation
of integration of the SDIO implementation.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Removed wl1271_spi.h and made some functions static
Teemu Paasikivi [Mon, 22 Feb 2010 06:38:25 +0000 (08:38 +0200)]
wl1271: Removed wl1271_spi.h and made some functions static

Removed wl1271_spi.h header as there's no more need to access functions
declared there outside of wl1271_spi.c. Also made those SPI access
functions static.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Inlined IO functions
Teemu Paasikivi [Mon, 22 Feb 2010 06:38:24 +0000 (08:38 +0200)]
wl1271: Inlined IO functions

Changed IO functions to static inline.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Implemented abstraction of IO functions.
Teemu Paasikivi [Mon, 22 Feb 2010 06:38:23 +0000 (08:38 +0200)]
wl1271: Implemented abstraction of IO functions.

Changed the driver to use if_ops structure to abstract access to the IO
layer (SPI or SDIO).

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Added functions to enable/disable interrupt handling
Teemu Paasikivi [Mon, 22 Feb 2010 06:38:22 +0000 (08:38 +0200)]
wl1271: Added functions to enable/disable interrupt handling

Added/moved enable and disable interrupt handling functions.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Moved module basics to wl1271_spi.c
Teemu Paasikivi [Mon, 22 Feb 2010 06:38:21 +0000 (08:38 +0200)]
wl1271: Moved module basics to wl1271_spi.c

Moved wl1271 drivers probe, remove etc. functions and structres to
wl1271_spi.c from wl1271_main.c in preparation of implementing SDIO interface.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54: Enable HW_REPORTS_TX_ACK_STATUS
Christian Lamparter [Fri, 19 Feb 2010 21:34:39 +0000 (22:34 +0100)]
p54: Enable HW_REPORTS_TX_ACK_STATUS

P54 devices always generate a full tx_status report
(ACK, PSM, rate control, etc..) for every xmitted frame.

Therefore, I think The driver qualifies for the
REPORTS_TX_ACK_STATUS hardware feature flag.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>