]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - wl12xx/wl12xx.git/log
wl12xx/wl12xx.git
11 years agowl12xx: Fix continuous and on-demand fwlog modes R5.xx_Build-10 R5.xx_Build-11 R5.xx_Build-12 R5.xx_Build-13 R5.xx_Build-14 R5.xx_Build-15 R5.xx_Build-16 R5.xx_Build-57 R5.xx_Build-58 R5.xx_Build-6 R5.xx_Build-7 R5.xx_Build-8 R5.xx_Build-9
Ido Yariv [Wed, 15 Aug 2012 14:51:01 +0000 (17:51 +0300)]
wl12xx: Fix continuous and on-demand fwlog modes

Commit 4d7944cc ("wl12xx: set default FW log mode to dbg-pins") set the
default debug output to debug pins. However, when either continuous or
on-demand fwlog modes are set, the debug output is not overridden
accordingly. Fix this.

Signed-off-by: Ido Yariv <ido@wizery.com>
11 years agowl12xx: Fix unbalanced interrupts enablement
Ido Yariv [Wed, 15 Aug 2012 14:20:16 +0000 (17:20 +0300)]
wl12xx: Fix unbalanced interrupts enablement

The interrupt line is enabled by wl1271_boot_enable_interrupts, but it
will not be disabled in all failure paths. Fix this.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: Don't recover during boot
Ido Yariv [Wed, 15 Aug 2012 14:20:15 +0000 (17:20 +0300)]
wl12xx: Don't recover during boot

While recursive recovery is avoided during shutdown, a new recovery may
be queued when the FW boots. The recovery work will then try to stop an
already stopped hardware, which will most likely result in a kernel
panic.

Fix this by verifying that wl->state is on before queueing a new
recovery.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowlcore: make debug prints work without dynamic debug
Arik Nemtsov [Wed, 8 Aug 2012 23:25:32 +0000 (02:25 +0300)]
wlcore: make debug prints work without dynamic debug

Make debug prints operational when dynamic debug is not defined.
This allows better debugging in production environments.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowlcore: op_tx: pass sta explicitly when inferring frame hlid
Arik Nemtsov [Thu, 26 Jul 2012 18:22:11 +0000 (21:22 +0300)]
wlcore: op_tx: pass sta explicitly when inferring frame hlid

avoid using the skb CB for getting the appropriate sta.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowlcore: don't get the hlid from a queued skb
Arik Nemtsov [Thu, 26 Jul 2012 18:19:44 +0000 (21:19 +0300)]
wlcore: don't get the hlid from a queued skb

There was a bug hiding here since the hlid was sometimes inferred from
the sta, which might be invalid at this point.

Instead, propagate the hlid from the skb-queue where we got the skb
in the first place.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowlcore: Prevent interaction with HW after recovery is queued ol_R5.SP2.04
Ido Yariv [Tue, 24 Jul 2012 16:18:49 +0000 (19:18 +0300)]
wlcore: Prevent interaction with HW after recovery is queued

When a function requests to recover, it would normally abort and will
not send any additional commands to the HW. However, other threads may
not be aware of the failure and could try to communicate with the HW
after a recovery was queued, but before the recovery work began.

Fix this by introducing an intermediate state which is set when recovery
is queued, and modify all state checks accordingly.

[Arik - ported to r5 driver version]

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: Use a dedicated fw for PLT
Eliad Peller [Mon, 6 Feb 2012 10:47:54 +0000 (12:47 +0200)]
wl12xx: Use a dedicated fw for PLT

A special PLT firmware is used for calibration.

Add multiple fw support by introducing a new fw_type member,
representing the currently saved fw (the actual fw state
can be determined by wl->state).

[Arik - Ported to r5_jb. Things are slighty modified here]

Signed-off-by: Gery Kahn <geryk@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: set default FW log mode to dbg-pins
Arik Nemtsov [Mon, 30 Jul 2012 15:05:00 +0000 (18:05 +0300)]
wl12xx: set default FW log mode to dbg-pins

This mode is the most stable with the current FW.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: take the mutex during delayed recovery
Arik Nemtsov [Sun, 29 Jul 2012 09:46:23 +0000 (12:46 +0300)]
wl12xx: take the mutex during delayed recovery

We are touching internal flags and talking to the FW, so we must take
the mutex. Also add an ELP wakeup/sleep before talking to the FW in this
funcion.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: tx_flush - optimize flow and force Tx during the flush
Arik Nemtsov [Sun, 29 Jul 2012 09:18:32 +0000 (12:18 +0300)]
wl12xx: tx_flush - optimize flow and force Tx during the flush

Force Tx during the flush if there are packets pending in the driver.
This actually solves a bug where we would get called from the mac80211
wq context, which would prevent tx_work from getting queued, even when
the mutex is unlocked.

Don't stop the queues needlessly if there's nothing to flush. Use a
larger delay when sleeping to give the driver a chance to flush and
avoid cpu busy looping. Re-arrange the loop so the last iteration is
not wasted.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: lazy-enable device roles
Eliad Peller [Thu, 26 Jul 2012 14:17:06 +0000 (17:17 +0300)]
wl12xx: lazy-enable device roles

Enable device roles just before starting it.
This way, a single device role should be enough
for all vifs, as we can't use concurrent device
roles (which require ROC) anyway.

Signed-off-by: Eliad Peller <eliad@wizery.com>
11 years agowl12xx: always use wlvif->role_id for scans
Eliad Peller [Thu, 26 Jul 2012 14:17:05 +0000 (17:17 +0300)]
wl12xx: always use wlvif->role_id for scans

enabled (but not-started) sta role should be good enough
for scanning (both normal and scheduled), so use it
instead of the device_role.

Signed-off-by: Eliad Peller <eliad@wizery.com>
11 years agowl12xx: disable roaming only when booting the MR FW
Arik Nemtsov [Wed, 25 Jul 2012 20:51:09 +0000 (23:51 +0300)]
wl12xx: disable roaming only when booting the MR FW

Since the SR/MR switch is now delayed, only disable roaming when the
MR FW is booted, and otherwise enable it.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: don't try to free a NULL probe-resp
Arik Nemtsov [Wed, 25 Jul 2012 20:10:28 +0000 (23:10 +0300)]
wl12xx: don't try to free a NULL probe-resp

Can lead to a crash if the probe-resp was never set.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: allow setting 3 mac addresses
Arik Nemtsov [Wed, 18 Jul 2012 11:43:17 +0000 (14:43 +0300)]
wl12xx: allow setting 3 mac addresses

To create the third MAC address, use the first address, but set the LAA
bit. This will allow STA + P2P + AP scenarios.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agomac80211: avoid using synchronize_rcu in ieee80211_set_probe_resp
Eyal Shapira [Wed, 25 Jul 2012 06:06:14 +0000 (09:06 +0300)]
mac80211: avoid using synchronize_rcu in ieee80211_set_probe_resp

This could take a while (100ms+) and may delay sending assoc resp
in AP mode with WPS or P2P GO (as setting the probe resp takes place
there). We've encountered situations where the delay was big enough
to cause connection problems with devices like Galaxy Nexus.
Switch to using call_rcu with a free handler.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agomac80211: avoid using synchronize_rcu in ieee80211_config_beacon
Eyal Shapira [Tue, 24 Jul 2012 18:12:44 +0000 (21:12 +0300)]
mac80211: avoid using synchronize_rcu in ieee80211_config_beacon

This was causing a very long delay (>200ms) which would
delay sending assoc resp in cases of an AP with WPS (where
the beacon gets updated after assoc req is received).
Some devices like Galaxy Nexus don't accept the assoc resp
if it's delayed for too long. This is causing connection issues
in AP mode with WPS and in P2P GO.

Switch instead to using kfree_rcu which wouldn't block here
but is still safe.

(This is based on upstream changes by Johannes)

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowlcore: don't stop tx queue via watermark if already stopped
Arik Nemtsov [Mon, 25 Jun 2012 19:26:17 +0000 (22:26 +0300)]
wlcore: don't stop tx queue via watermark if already stopped

If a Tx queue is currently stopped because of our Tx watermark flow
control, don't stop it again. This causes a warning to appear.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: stop queues on Tx flush
Arik Nemtsov [Fri, 18 May 2012 04:46:39 +0000 (07:46 +0300)]
wlcore: stop queues on Tx flush

Stop network queues during Tx flush, and also drop other internal
mac80211 packets (mgmt) that may arrive when the queues are stopped.

When flush is done all driver queues are clear, forcefully if needed.

Protect the Tx flush operation with a new mutex, to prevent concurrency
that can mess us queue state.

Based on a patch by Eliad Peller <eliad@wizery.com>

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: add stop reason bitmap for waking/starting queues
Arik Nemtsov [Fri, 18 May 2012 04:46:38 +0000 (07:46 +0300)]
wlcore: add stop reason bitmap for waking/starting queues

Allow the driver to wake/stop the queues for multiple reasons. A queue
is started when no stop-reasons exist.

Convert all wake/stop queue calls to use the new API.

Before, a stopped queue was almost synonymous a high-watermark on Tx.
Remove a bit of code in wl12xx_tx_reset() that relied on it.

Internal packets arriving from mac80211 are also discarded when a queue
is stopped. A notable exception to this is the watermark reason, which
is a "soft"-stop reason. We allow traffic to gradually come to a halt,
but we don't mind spurious packets here and there. This is merely a flow
regulation mechanism.

Based on a similar patch by Eliad Peller <eliadWizery.com>.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowl12xx: make Tx flush timings more verbose
Arik Nemtsov [Mon, 23 Jul 2012 20:50:45 +0000 (23:50 +0300)]
wl12xx: make Tx flush timings more verbose

Print how much time a flush took. This will help debug the time it takes
to switch between channels.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: allow only the lowest OFDM rate for p2p setup frames
Arik Nemtsov [Mon, 23 Jul 2012 12:18:29 +0000 (15:18 +0300)]
wl12xx: allow only the lowest OFDM rate for p2p setup frames

The IEEE80211_TX_CTL_NO_CCK_RATE flag is only set for mgmt packets
transmitted during p2p connection setup. Make sure to use the lowest
OFDM rate guarantee the peer always hears us.
Change the p2p rate policy to contain only the 6mpbs rate to acheive
this effect.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: AP mode - send non-data packets with basic rates
Arik Nemtsov [Mon, 23 Jul 2012 07:38:18 +0000 (10:38 +0300)]
wl12xx: AP mode - send non-data packets with basic rates

This solves interoperability issues with peer that don't seem to "hear"
management packets transmitted in higher rates. Based on a previous
patch by Igal Chernobelsky.

Cc: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agomac80211: skip the ps count of idle STAs
Victor Goldenshtein [Sun, 22 Jul 2012 13:44:36 +0000 (16:44 +0300)]
mac80211: skip the ps count of idle STAs

To be able to enter ps on a SR FW with more than one
interface up, while only one interface is connected
and others are idle.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
11 years agowl12xx: change verbose debug print
Victor Goldenshtein [Sun, 22 Jul 2012 13:44:37 +0000 (16:44 +0300)]
wl12xx: change verbose debug print

This print_info might be too verbose in some p2p
scenarios so change the wl1271_info() to
wl1271_debug() in wl12xx_need_fw_change().

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
11 years agocfg80211/nl80211/wl12xx: align to new nl80211.h ABI
Arik Nemtsov [Wed, 18 Jul 2012 11:33:23 +0000 (14:33 +0300)]
cfg80211/nl80211/wl12xx: align to new nl80211.h ABI

This includes some minor changes:
- change NL80211_CQM_RSSI_BEACON_LOSS to
  NL80211_CQM_RSSI_BEACON_LOSS_EVENT
- remove all features concerning advertisement of intermediate scan
  capabilities. These are currently unused.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agomac80211: fix invalid band deref building preq IEs
Arik Nemtsov [Mon, 9 Jul 2012 16:57:28 +0000 (19:57 +0300)]
mac80211: fix invalid band deref building preq IEs

The function building probe-request IEs does not validate the band is
supported before dereferencing it. This can result in a panic when
all bands are traversed, as done during sched-scan start.

Warn when this happens and return an empty probe request. Also fix
sched-scan to not waste memory on unsupported bands.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agowlcore: define number of supported bands internally
Arik Nemtsov [Tue, 3 Jul 2012 06:11:03 +0000 (09:11 +0300)]
wlcore: define number of supported bands internally

Avoid using the IEEE80211_NUM_BANDS constant for arrays sizes etc, as
this can contain bands unsupported by the driver (e.g. 60Ghz). Use an
internal constant to determine the number of bands.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowlcore: use basic rates for non-data packets
Eliad Peller [Wed, 11 Jul 2012 15:01:49 +0000 (18:01 +0300)]
wlcore: use basic rates for non-data packets

After the latest mac80211 changes, the sta has
the ap's sta pointer even before association.

This cause the auth and assoc frames to be sent
with the standard ap's rates, rather than the
basic rates.

Change the tx rate policy logic to use the regular
ap rates only for data packets (so control and mgmt
packets will be sent with basic rates)

Signed-off-by: Eliad Peller <eliad@wizery.com>
11 years agowlcore: send EAPOLs using minimum basic rate for all roles
Igal Chernobelsky [Wed, 27 Jun 2012 08:09:34 +0000 (11:09 +0300)]
wlcore: send EAPOLs using minimum basic rate for all roles

Send EAPOLs using minimum basic rate for AP, STA, p2p GO and Client.
The patch fixes p2p connection issue with Realtek device in p2p
certification test 5.1.13 (DEVUT reinvokes Persistent Group).

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
11 years agomac80211: check sdata_running on ieee80211_set_bitrate_mask
Eliad Peller [Tue, 12 Jun 2012 09:41:15 +0000 (12:41 +0300)]
mac80211: check sdata_running on ieee80211_set_bitrate_mask

Otherwise, we might call the driver callback before
the interface was uploaded.

Solves the following warning:
WARNING: at net/mac80211/driver-ops.h:12 ieee80211_set_bitrate_mask+0xbc/0x18c [mac80211]()
wlan0:  Failed check-sdata-in-driver check, flags: 0x0
Modules linked in: wlcore_sdio wl12xx wl18xx wlcore mac80211 cfg80211 [last unloaded: cfg80211]
[<c001b964>] (unwind_backtrace+0x0/0x12c) from [<c0495550>] (dump_stack+0x20/0x24)
[<c0495550>] (dump_stack+0x20/0x24) from [<c003ee28>] (warn_slowpath_common+0x5c/0x74)
[<c003ee28>] (warn_slowpath_common+0x5c/0x74) from [<c003eefc>] (warn_slowpath_fmt+0x40/0x48)
[<c003eefc>] (warn_slowpath_fmt+0x40/0x48) from [<bf5c1ad0>] (ieee80211_set_bitrate_mask+0xbc/0x18c [mac80211])
[<bf5c1ad0>] (ieee80211_set_bitrate_mask+0xbc/0x18c [mac80211]) from [<bf575960>] (nl80211_set_tx_bitrate_mask+0x350/0x358 [cfg80211])
[<bf575960>] (nl80211_set_tx_bitrate_mask+0x350/0x358 [cfg80211]) from [<c03e9e94>] (genl_rcv_msg+0x1a8/0x1e8)
[<c03e9e94>] (genl_rcv_msg+0x1a8/0x1e8) from [<c03e9164>] (netlink_rcv_skb+0x5c/0xc0)
[<c03e9164>] (netlink_rcv_skb+0x5c/0xc0) from [<c03e9ce0>] (genl_rcv+0x28/0x34)
[<c03e9ce0>] (genl_rcv+0x28/0x34) from [<c03e8e74>] (netlink_unicast+0x158/0x234)
[<c03e8e74>] (netlink_unicast+0x158/0x234) from [<c03e93e0>] (netlink_sendmsg+0x218/0x298)
[<c03e93e0>] (netlink_sendmsg+0x218/0x298) from [<c03b4e5c>] (sock_sendmsg+0xa4/0xc0)
[<c03b4e5c>] (sock_sendmsg+0xa4/0xc0) from [<c03b5af4>] (__sys_sendmsg+0x1d8/0x254)
[<c03b5af4>] (__sys_sendmsg+0x1d8/0x254) from [<c03b5ca8>] (sys_sendmsg+0x4c/0x70)
[<c03b5ca8>] (sys_sendmsg+0x4c/0x70) from [<c0013980>] (ret_fast_syscall+0x0/0x3c)

Note that calling the driver can also result
in undefined behaviour since it doesn't have
to deal with calls while down.

Signed-off-by: Eliad Peller <eliad@wizery.com>
[removed timestamps, added note - Johannes]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agowl12xx: increase WL12XX_MAX_ROLES
Eliad Peller [Wed, 18 Jul 2012 11:43:17 +0000 (14:43 +0300)]
wl12xx: increase WL12XX_MAX_ROLES

when working with AP + 2*STA we have more than
4 active roles. increase WL12XX_MAX_ROLES to 6.

Signed-off-by: Eliad Peller <eliad@wizery.com>
11 years agowl12xx: change recovery on start/stop device role
Eliad Peller [Mon, 9 Jul 2012 12:31:54 +0000 (15:31 +0300)]
wl12xx: change recovery on start/stop device role

since the recovery itself will usually stop the offchannel
operation, on fw boot we will use SR fw again, which will
result in endless recoveries... avoid it by forcing MR fw
for some grace period after it was needed.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: add grace period when changing MR -> SR fw
Eliad Peller [Mon, 9 Jul 2012 12:29:13 +0000 (15:29 +0300)]
wl12xx: add grace period when changing MR -> SR fw

This improves user experience when performing p2p_find for instance.

[Changed grace period to 30 seconds]

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: delay fw switch to start/stop_role_sta/ap
Eliad Peller [Thu, 5 Jul 2012 16:40:44 +0000 (19:40 +0300)]
wl12xx: delay fw switch to start/stop_role_sta/ap

do the fw switch only when the role was started/stopped

Signed-off-by: Eliad Peller <eliad@wizery.com>
11 years agomac80211: count started vifs
Arik Nemtsov [Tue, 17 Jul 2012 05:47:23 +0000 (08:47 +0300)]
mac80211: count started vifs

count the started roles by simply counting the non-idle vifs.

this method also takes care of counting non-associated
stations (when device role is started)

[Arik - backport usage of rcu here]

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: increase command completion timeout r5_3.2 ol_R5.00.21 r5.00.19-build_235 r5.00.19-build_236 r5.00.19-build_237 r5.00.19-build_239 r5.00.19-build_240 r5.00.19-build_241 r5.00.19-build_242 r5.00.19-build_243 r5.00.19-build_245 r5.00.19-build_246 r5.00.19-build_247 r5.00.19-build_248 r5.00.19-build_249 r5.00.19-build_253 r5.00.19-build_254 r5.00.19-build_255 r5.00.19-build_256 r5.00.19-build_257
Luciano Coelho [Wed, 18 Jul 2012 14:15:45 +0000 (17:15 +0300)]
wl12xx: increase command completion timeout

In some rare cases, the CMD_ROC completion may take over 1 second.
The timeout had earlier been increased to 1000ms (from 750ms), but it
is still not enoug.  Increase it to 1500ms.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: implement SW Tx watchdog
Arik Nemtsov [Sat, 3 Mar 2012 20:18:00 +0000 (22:18 +0200)]
wl12xx: implement SW Tx watchdog

Track freed FW blocks during Tx. If no blocks were freed during a
predefined timeout, initiate a HW recovery. This helps in situations
when the FW watchdog fails.

Don't trigger recovery during activities that can temporarily stop
Tx. This includes:
- scanning
- buffering packets for sleeping stations (AP role)
- ROC on any role

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowl12xx: add an extra block for all data packets in GEM r5.00.19-build_232 r5.00.19-build_233 r5.00.19-build_234
Yoni Divinsky [Sun, 15 Jul 2012 11:21:34 +0000 (14:21 +0300)]
wl12xx: add an extra block for all data packets in GEM

FW does not handle correctly a situation where the STA
is connected using GEM and a non-GEM data packets is sent.
Therefore, when connecting using GEM, add an extra mem
block for all data packets even if they are not encrypted.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
11 years agowlcore: don't issue SLEEP_AUTH command during recovery
Arik Nemtsov [Tue, 10 Jul 2012 07:47:54 +0000 (10:47 +0300)]
wlcore: don't issue SLEEP_AUTH command during recovery

During interface removal, don't adjust sleep_auth if we are during
recovery. Since the FW is potentially dead we shouldn't talk to it.

Reported-by: Yossi Wortzel <yossiw@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowl12xx: change return code in case of WD recovery (squash) ol_R5.00.20 r5.00.19-build_226 r5.00.19-build_227 r5.00.19-build_228 r5.00.19-build_229
Yoni Divinsky [Mon, 9 Jul 2012 09:09:01 +0000 (12:09 +0300)]
wl12xx: change return code in case of WD recovery (squash)

In case of WD recovery we will manage to read correctly
FW status thus the return code will be 0. because of that
recovery wont be triggered.

This patch should be squashed into:
"wl12xx: refactor threaded IRQ routine"

Signed-off-by: Yossi Wortzel <yossiw@ti.com>
Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
11 years agowl12xx: add elp_timeout config option r5.00.19-build_224 r5.00.19-build_225
Yoni Divinsky [Sun, 8 Jul 2012 13:51:33 +0000 (16:51 +0300)]
wl12xx: add elp_timeout config option

Add a configuration option which defines the
timeout for which the driver waits until it
sets the chip into elp.

Since the dynamic_ps_timeout default value is
set to 1500 msec, using it in order to
define the elp timeout causes the chip to
stay awake for long periods.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
11 years agowl12xx: increase number of rx filters to 7
Eyal Shapira [Sun, 8 Jul 2012 14:35:00 +0000 (17:35 +0300)]
wl12xx: increase number of rx filters to 7

This is supported from the following FW revisions:
SR X.2.9.0.115 MR X.3.9.0.29

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowl12xx: support wowlan pattern actions
Eyal Shapira [Sun, 8 Jul 2012 13:32:56 +0000 (16:32 +0300)]
wl12xx: support wowlan pattern actions

Add support for setting the wowlan pattern action
to either ALLOW or DROP.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agonl80211: add an action to wowlan patterns
Eyal Shapira [Sun, 8 Jul 2012 11:30:10 +0000 (14:30 +0300)]
nl80211: add an action to wowlan patterns

Add an ALLOW or DROP action to wowlan patterns.
This enables configuring exception or blacklist wowlan
pattern which would avoid waking up the host in case
the pattern was found despite matching another wowlan
pattern with ALLOW action.
For example this enables configuring something like:
wakeup for all IPv4 multicast except certain type of
multicast packets.
This patch is based on a patch by Yossi Wortzel.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowlcore: avoid debug prints during intended FW recovery r5.00.19-build_223
Arik Nemtsov [Thu, 5 Jul 2012 12:50:32 +0000 (15:50 +0300)]
wlcore: avoid debug prints during intended FW recovery

Don't read the FW panic log or print other debug data when recovery is
intended (i.e. FW type switch). This takes valuable time and can be
confusing to the user.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowlcore: android: don't suspend on pending recovery (INTERNAL) r5.00.19-build_222
Arik Nemtsov [Wed, 27 Jun 2012 18:43:39 +0000 (21:43 +0300)]
wlcore: android: don't suspend on pending recovery (INTERNAL)

Some customers complain that if we cancel a pending recovery during
suspend, the android scheduler will keep banging on the suspend handler,
without letting recovery take its course. Grab a wakelock to give the
recovery process some breathing room.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agomac80211: fix list_aliases handling (INTERNAL)
Eliad Peller [Tue, 22 May 2012 11:29:29 +0000 (14:29 +0300)]
mac80211: fix list_aliases handling (INTERNAL)

commit 37a5502 ("cfg80211: more correct support of multi-essid bss-es")
used the wrong syntax for adding an entry to existing list, causing
memory corruption later on, if the original list was not empty.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowlcore: don't set SDIO_FAILED flag when driver state is off
Arik Nemtsov [Tue, 3 Jul 2012 06:00:18 +0000 (09:00 +0300)]
wlcore: don't set SDIO_FAILED flag when driver state is off

If some IO read/write fails while the FW is not loaded, a recovery
will not take place. This means the SDIO_FAILED flag will stay in place
forever and prevent further read/writes.

This can happen if a check for STATE_OFF was forgotten in some routine.

Take this opportunity to rename the flag to IO_FAILED, since we support
other buses as well.

Reported-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agomac80211: don't require associated->beacon_ies for ps
Eliad Peller [Mon, 25 Jun 2012 07:48:25 +0000 (10:48 +0300)]
mac80211: don't require associated->beacon_ies for ps

beacon_ies is needed only in order to extract the dtim
period. However, even if it's missing we can still enter
ps with dtim=1 (which also happens if the TIM ie is invalid).

Most drivers don't use conf.max_sleep_period/ps_dtim_period
anyway, and this check prevents them from entering ps if
they don't have beacon (but only probe response), even though
the beacon is not needed at all.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowlcore: Prevent processing of work items during op_stop
Ido Yariv [Tue, 3 Jul 2012 22:01:47 +0000 (01:01 +0300)]
wlcore: Prevent processing of work items during op_stop

The interrupt line is disabled in op_stop using disable_irq. Since
pending interrupts are synchronized, the mutex has to be released before
disabling the interrupt to avoid a deadlock with the interrupt handler.

In addition, the internal state of the driver is only set to 'off'
after the interrupt is disabled. Otherwise, if an interrupt fires after
the state is set but before the interrupt line is disabled, the
interrupt handler will not be able to acknowledge the interrupt
resulting in an interrupt storm.

The driver's operations might be called during recovery. If these
acquire the mutex after it was released by op_stop, but before the
driver's state is changed, they may queue new work items instead of just
failing. This is especially problematic in the case of scans, in which a
new scan may be scheduled after all scan requests were cancelled.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowl12xx: always clear recovery flag during recovery_work
Eyal Shapira [Tue, 3 Jul 2012 15:03:19 +0000 (18:03 +0300)]
wl12xx: always clear recovery flag during recovery_work

If recovery is called when the FW is off, we should clear
the recovery flag. Otherwise we risk booting the driver in
permanent pending-recovery state or getting into a state where
the driver is left in an OFF state.
This can happen if a 2nd recovery is triggered and runs before
ieee80211_reconfig adds back the interface.
Fix this by always clearing the recovery flag.
In addition, enable interrupts to balance the disable in
wl1271_queue_recovery_work.

(This is based on Arik's patch for wlcore with fixes)

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowlcore: compare ssid_len before comparing ssids r5.00.19-build_221
Eliad Peller [Tue, 3 Jul 2012 14:00:21 +0000 (17:00 +0300)]
wlcore: compare ssid_len before comparing ssids

When comparing 2 ssids the ssid_len must be taken
into account. Otherwise, a substring will be treated
as equal.

This bug might cause ssids to get scanned as
public ssids (rather than hidden), resulting in
broadcast probe request (instead of ssid-specific
ones)

[ this is a backport of 587cc28 ("wlcore: compare
  ssid_len before comparing ssids") which already
  contains the "wlcore: check ssid length against
  the correct element" fix ]

Signed-off-by: Eliad Peller <eliad@wizery.com>
11 years agowl12xx: init the pll reg before reading the fuse reg
Yoni Divinsky [Mon, 2 Jul 2012 07:23:43 +0000 (10:23 +0300)]
wl12xx: init the pll reg before reading the fuse reg

The device mac address can be stored in the nvs or
the fuse registers. If the nvs contains a zero mac
address then the driver will fallback to the fuse
mac address which is read during the wl12xx_sdio
insmod.

The fuse registers are held in the DRPW partition,
therefore in order to read them safely the pll
clock must first be initialized.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
11 years agowl12xx: always set default wep key idx
Eyal Shapira [Mon, 2 Jul 2012 20:56:15 +0000 (23:56 +0300)]
wl12xx: always set default wep key idx

The driver doesn't configure the FW default wep key
in case it thinks it's identical to what was set. However,
the FW clears the default tx wep key index as part of removing
that key. This leads to key index 0 being used instead of
the correct key index in case of disconnect and reconnect
to the same network. This of course prevents any TX to the
reconnected network.
Fix it by always configuring the default wep key requested
by mac80211.
Also add a debug log for op_set_default_key_idx like the
rest of mac80211 ops.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowlcore: add probe request templates for sched and one-shot scans ol_R5.00.19 r5.00.19-build_217 r5.00.19-build_218 r5.00.19-build_219 r5.00.19-build_220
Yoni Divinsky [Thu, 14 Jun 2012 09:29:16 +0000 (12:29 +0300)]
wlcore: add probe request templates for sched and one-shot scans

The driver configures the firmware template for probe requests during
the scan process.  If the same template is used for one-shot and sched
scans they will override each other when running scans simultaneously.

This fix works only on firmwares later than
X.3.9.2.112 for single role and
X.3.9.2.23  for multi-role

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agoRevert "mac80211: use legacy mode for all ACs" r5.00.19-build_216
Assaf Azulay [Thu, 28 Jun 2012 17:40:47 +0000 (20:40 +0300)]
Revert "mac80211: use legacy mode for all ACs"

This reverts commit f4a3ec20b2a41d0988759eea247a73aac1e73f5f.
due to coex issues we have to work in mixed mode (uapsd on VO)
we will add supplicant option to configure the ACs

Signed-off-by: Assaf Azulay <assaf@ti.com>
11 years agowlcore: release lock on error in wl1271_op_suspend() r5.00.18-build_215
Eyal Shapira [Tue, 26 Jun 2012 15:10:47 +0000 (18:10 +0300)]
wlcore: release lock on error in wl1271_op_suspend()

We should release this lock before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agomac80211: use legacy mode for all ACs
Eyal Shapira [Tue, 19 Jun 2012 15:22:49 +0000 (18:22 +0300)]
mac80211: use legacy mode for all ACs

FritzBox 7390 (and potentially other models) have a weird behaviour
where once we enable U-APSD on the the VO AC it limits the rate
of the packets it sends us to 39Mbps and doesn't do AMPDU aggregation.
This causes a big degradation in TP obviously.
Once we use legacy mode for all ACs it's willing to use higher rates
as well as do AMPDU aggregation.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowl12xx: print stack trace in every recovery
Eyal Shapira [Mon, 25 Jun 2012 18:49:07 +0000 (21:49 +0300)]
wl12xx: print stack trace in every recovery

As recovery queuing can now occur from multiple code paths
it's convenient to know what triggered it in all cases
other than an intended recovery which is part of the
switch between single role to multi role.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowl12xx: queue recovery in case of bus errors during cmd_remove_peer
Eyal Shapira [Mon, 25 Jun 2012 18:49:06 +0000 (21:49 +0300)]
wl12xx: queue recovery in case of bus errors during cmd_remove_peer

Following the addition of propagating errors from the bus ops
there's a need to distinguish between bus errors (including timeout)
and a legitimate timeout occuring in cmd_wait_for_event_or_timeout.
In case of real bus errors we need to queue recovery even in cases
where a timeout on a response from the FW to a command is acceptable.

Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowl12xx: fix broken TX due to wrong queuing of recovery
Eyal Shapira [Mon, 25 Jun 2012 18:49:05 +0000 (21:49 +0300)]
wl12xx: fix broken TX due to wrong queuing of recovery

commit 14bba17b "wl12xx: Propagate errors from wl1271_raw_write32"
breaks down TX in certain scenarios. wl1271_irq_locked() propagates
errors from wl1271_tx_work_locked however it may return -EBUSY
when the FW queues are full which is a legitimate case and not a
a real error. In this case a recovery is triggered by wl1271_irq
and this keeps repeating itself so TX is completely broken.
Fix it by avoiding propagating return values as errors even if they
aren't. Only bus (SDIO or SPI) ops failures would be progagated
as only these should trigger recovery.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowl12xx: reconfigure sleep_auth when removing interfaces r5.00.18-build_216
Arik Nemtsov [Sun, 10 Jun 2012 16:10:45 +0000 (19:10 +0300)]
wl12xx: reconfigure sleep_auth when removing interfaces

The sleep_auth value of the last interface to be set up prevailed when
an interface was removed. Take care of this by correctly configuring the
value according to the remaining STA/AP interfaces.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: prevent recovery in the middle of resume
Arik Nemtsov [Thu, 21 Jun 2012 15:10:52 +0000 (18:10 +0300)]
wl12xx: prevent recovery in the middle of resume

Take the mutex early in the resume handler and use the locked version of
the IRQ routine. This ensures any recoveries queued will only take place
after resume has fully completed.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: refactor threaded IRQ routine
Arik Nemtsov [Thu, 21 Jun 2012 15:10:51 +0000 (18:10 +0300)]
wl12xx: refactor threaded IRQ routine

Separate the threaded IRQ handling routine into two functions.
The outer function takes the mutex and calls recovery on errors. It also
performs a Tx-path optimization to avoid redundant works.

The inner function is simplified - all calls to recovery are removed and
it assumes the lock is taken. The locked variant will be reused elsewhere.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: check Rx-filter functions in the suspend path
Arik Nemtsov [Thu, 21 Jun 2012 15:10:50 +0000 (18:10 +0300)]
wl12xx: check Rx-filter functions in the suspend path

Propagate some missing return values for Rx-filter related functions.
This and makes sure we always fail the suspend in case of SDIO errors.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: force recovery on resume if suspended without recovering
Arik Nemtsov [Thu, 21 Jun 2012 15:10:49 +0000 (18:10 +0300)]
wl12xx: force recovery on resume if suspended without recovering

If an error is detected after mac80211 is already suspended, the recovery
work will not be queued. This will leave the driver in a bad state on
resume.

Detect this in the resume op and re-queue a recovery.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: don't allow SDIO read/writes after failure
Arik Nemtsov [Thu, 21 Jun 2012 15:10:48 +0000 (18:10 +0300)]
wl12xx: don't allow SDIO read/writes after failure

Set a flag and after the first read/write failure is encountered.
This flag will disallow further SDIO read/writes until op_stop() is
executed, which will clear all flags.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agowl12xx: cancel suspend when recovery is pending
Arik Nemtsov [Thu, 21 Jun 2012 15:10:47 +0000 (18:10 +0300)]
wl12xx: cancel suspend when recovery is pending

We wish to postpone suspend if recovery is pending. This will make sure
the FW is in a good state and perform wowlan wakeup.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
11 years agomac80211: fix cleanup if driver suspend callback fails
Eyal Shapira [Sat, 16 Jun 2012 12:09:40 +0000 (15:09 +0300)]
mac80211: fix cleanup if driver suspend callback fails

In case the driver suspend callback fails, mac80211 is left
with stopped queues which prevents any further traffic as well
as all STAs are left marked with WLAN_STA_BLOCK_BA which will
cause any further ADDBA requests to be declined. Fix it by
undoing both before returning from __iee80211_suspend.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agomac80211: handle auth failure returned with unmatching auth algo
Eyal Shapira [Tue, 12 Jun 2012 10:02:43 +0000 (13:02 +0300)]
mac80211: handle auth failure returned with unmatching auth algo

Some Netgear APs like WNAP210 have a quirk behavior when
configured for WEP Shared. They send an auth response with algo
SHARED and status code NOT_SUPPORTED_AUTH_ALG (13) when being
sent a request made with auth algo OPEN. Enable such response to
propagate to userspace instead of discarding it so wpa_s can
reattempt to auth with SHARED.

Reported-by: Noam Shaked <noams@ti.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowl12xx: Force checking of io functions' return values
Ido Yariv [Fri, 22 Jun 2012 07:36:39 +0000 (10:36 +0300)]
wl12xx: Force checking of io functions' return values

All io functions' return values should be propagated and handled. Add a
__must_check annotation to verify that the return values are checked and
to avoid future mistakes.

Signed-off-by: Ido Yariv <ido@wizery.com>
11 years agowl12xx: Propagate errors from wl1271_read_hwaddr
Ido Yariv [Fri, 22 Jun 2012 07:27:23 +0000 (10:27 +0300)]
wl12xx: Propagate errors from wl1271_read_hwaddr

Propagate errors from wl1271_read_hwaddr. This function is only used
when reading the FW log (following a recovery), so don't read the FW log
in case of a bus error.

Signed-off-by: Ido Yariv <ido@wizery.com>
11 years agowl12xx: Propagate errors from wl1271_write
Ido Yariv [Fri, 22 Jun 2012 07:22:32 +0000 (10:22 +0300)]
wl12xx: Propagate errors from wl1271_write

Propagate return values from wl1271_write in order to handle bus
operations failures.

Signed-off-by: Ido Yariv <ido@wizery.com>
11 years agowl12xx: Propagate errors from wl1271_read
Ido Yariv [Fri, 22 Jun 2012 07:12:06 +0000 (10:12 +0300)]
wl12xx: Propagate errors from wl1271_read

Propagate return values from wl1271_read and change prototypes of
functions calling this function to return errors.

Signed-off-by: Ido Yariv <ido@wizery.com>
11 years agowl12xx: Propagate errors from wl1271_raw_write32
Ido Yariv [Fri, 22 Jun 2012 07:03:58 +0000 (10:03 +0300)]
wl12xx: Propagate errors from wl1271_raw_write32

Propagate errors from wl1271_raw_write32 and request for recovery when
appropriate.

Signed-off-by: Ido Yariv <ido@wizery.com>
11 years agowl12xx: Propagate errors from wl1271_raw_read32
Ido Yariv [Thu, 21 Jun 2012 15:43:22 +0000 (18:43 +0300)]
wl12xx: Propagate errors from wl1271_raw_read32

Propagate errors from wl1271_raw_read32. Since the read functions had no
way of returning errors in-band, change their prototypes.

Signed-off-by: Ido Yariv <ido@wizery.com>
11 years agowl12xx: Check return value when reading the FW status
Ido Yariv [Wed, 20 Jun 2012 17:46:21 +0000 (20:46 +0300)]
wl12xx: Check return value when reading the FW status

The return value of the bus read operation is not checked when reading
the FW status. This can lead to various problems. For instance, the
driver might not be able to acknowledge interrupts, which will keep on
firing as soon as the interrupt handler exits. Fix this by propagating
the bus operation return value and handling it.

Signed-off-by: Ido Yariv <ido@wizery.com>
11 years agowl12xx: Change read/write ops to return errors
Ido Yariv [Sun, 17 Jun 2012 17:30:05 +0000 (20:30 +0300)]
wl12xx: Change read/write ops to return errors

While bus operations may fail, either due to HW or FW issues, these are
never propagated to higher layers. As a result, the core driver has no
way of knowing that the operations failed, and will only recover if high
level logic requires it (e.g. no command completion).

Change read/write bus operations to return errors to let higher layer
functionality handle these.

Signed-off-by: Ido Yariv <ido@wizery.com>
11 years agowl12xx: Disable interrupts while recovering
Ido Yariv [Sun, 20 May 2012 22:10:11 +0000 (01:10 +0300)]
wl12xx: Disable interrupts while recovering

In case a recovery is initiated, the FW can no longer be trusted, and
the driver should not handle any new FW events.

Disable the interrupt handler when a recovery is scheduled and balance
it back in the op_stop callback.

Signed-off-by: Ido Yariv <ido@wizery.com>
11 years agowl12xx: Fix sdio out-of-sync power state
Ido Yariv [Sun, 20 May 2012 07:38:16 +0000 (10:38 +0300)]
wl12xx: Fix sdio out-of-sync power state

wl12xx_sdio_power_off() manually powers down the card regardless of the
runtime pm state. If wl12xx_sdio_power_on() is called before the card
was suspended by runtime PM, it will not power up the card.

As part of the HW detection, the chip's power is toggled. Since this
happens in the context of probing sdio, the power reference counter will
be higher than zero. As a result, when wl12xx_sdio_power_off() is
called, the chip will be powered down while still having a positive
power reference counter. If the interface is quickly activated, the
driver might try to transfer data to a powered off chip.

Fix this by ensuring that wl12xx_sdio_power_on() explicitly powers on
the chip in case runtime pm claims the chip is already powered on. To
avoid cases in which it is not possible to determine if the chip was
really powered on (card's power reference counter is positive), operate
on the mmc_card instead of the function.

Also verify that the chip is indeed powered on before powering off, to
avoid wrong reference counter values in error cases.

Signed-off-by: Ido Yariv <ido@wizery.com>
11 years agomac80211: Clear wowlan flag when drv_suspend returns failure
Pontus Fuchs [Thu, 31 May 2012 10:34:47 +0000 (12:34 +0200)]
mac80211: Clear wowlan flag when drv_suspend returns failure

drv_resume can get called without a prior call to drv_suspend.
Consider the following steps:

1. Suspend is started but driver's drv_suspend returns error.
2. Suspend is aborted. local->wowlan flag is left set.
3. Interface is removed.
4. Suspend again. This time open_count is 0 so drv_suspend is
   not called and local->wowlan not cleared.
5. On resume ieee80211_reconfig will call drv_resume since
   local->wowlan is set.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowlcore: send EAPOLs with basic rate policy
Eyal Shapira [Wed, 30 May 2012 07:34:26 +0000 (00:34 -0700)]
wlcore: send EAPOLs with basic rate policy

EAPOLs are sent at high rates as they are considered
data packets. Some APs don't respond well to these rates
and don't respond with EAPOL 3/4.
Send EAPOLs with basic rate policy in order to avoid that.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agomac80211: fix non RCU-safe sta_list manipulation
Arik Nemtsov [Sun, 3 Jun 2012 20:32:32 +0000 (23:32 +0300)]
mac80211: fix non RCU-safe sta_list manipulation

sta_info_cleanup locks the sta_list using rcu_read_lock however
the delete operation isn't rcu safe. A race between sta_info_cleanup
timer being called and a STA being removed can occur which leads
to a panic while traversing sta_list. Fix this by switching to the
RCU-safe versions.

[Backported to R5 by eyalsh]

Cc: stable@vger.kernel.org
Reported-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowl12xx: add a directory specific .gitignore
Eyal Shapira [Wed, 16 May 2012 07:03:49 +0000 (10:03 +0300)]
wl12xx: add a directory specific .gitignore

Ignore version.h which is an auto generated h file

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agomac80211: fix ADDBA declined after suspend with wowlan
Eyal Shapira [Mon, 28 May 2012 23:15:03 +0000 (16:15 -0700)]
mac80211: fix ADDBA declined after suspend with wowlan

WLAN_STA_BLOCK_BA is set while suspending but doesn't get cleared
when resuming in case of wowlan. This causes further ADDBA requests
received to be rejected. Fix it by clearing it in the wowlan path
as well.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
11 years agowl12xx: handle correctly wl_list ol_R5.00.17 ol_R5.00.18 r5.00.15-build_189 r5.00.15-build_190 r5.00.18-build_196 r5.00.18-build_197 r5.00.18-build_199 r5.00.18-build_200 r5.00.18-build_201 r5.00.18-build_202 r5.00.18-build_203 r5.00.18-build_204 r5.00.18-build_205 r5.00.18-build_206 r5.00.18-build_207 r5.00.18-build_208 r5.00.18-build_209 r5.00.18-build_210 r5.00.18-build_211 r5.00.18-build_212 r5.00.18-build_213 r5.00.18-build_214
Victor Goldenshtein [Tue, 8 May 2012 14:02:52 +0000 (17:02 +0300)]
wl12xx: handle correctly wl_list

wl_list wasn't handled correctly as the wl node added in the
wl1271_op_add_interface (for each new interface), and deleted
only once in the wl1271_op_stop.

Fix this by moving the list_add operational to wl1271_op_start.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
11 years agomac80211: [NOT_FOR_UPSTREAM] setting only VO as UAPSD r5.00.15-build_188
Assaf Azulay [Tue, 8 May 2012 11:29:57 +0000 (14:29 +0300)]
mac80211: [NOT_FOR_UPSTREAM] setting only VO as UAPSD

due to IOP with a lot of APs in the world, we can see that the
best behavior of our station is when working in "mixed mode":
only voice will be in UAPSD, while the other queues are in legasy
mode.

Signed-off-by: Assaf Azulay <assaf@ti.com>
11 years agoRevert "wl12xx: wait stop station role event"
Assaf Azulay [Mon, 7 May 2012 06:32:28 +0000 (09:32 +0300)]
Revert "wl12xx: wait stop station role event"

This reverts commit 0edbb3815513ddd114528246e96a4f994f78f844.

due to bug with merge this code it was a dupplication of previos patch.
the logic of waiting for stop role evevent remains.

Signed-off-by: Assaf Azulay <assaf@ti.com>
11 years agowl12xx: wait stop station role event ol_R5.00.16 r5.00.15-build_181
Victor Goldenshtein [Thu, 5 Jan 2012 15:46:34 +0000 (17:46 +0200)]
wl12xx: wait stop station role event

Wait for the completion event after sending
the CMD_ROLE_STOP command.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
11 years agowl12xx: increase number of BA session to 3 r5.00.15-build_180
Assaf Azulay [Wed, 2 May 2012 19:09:59 +0000 (22:09 +0300)]
wl12xx: increase number of BA session to 3

with the new FW (sigle role X.3.8.0.108, multi role X.5.4.0.21)
we are supporting 3 RX BA sessions, tis change is to support this
new ability

Signed-off-by: Assaf Azulay <assaf@ti.com>
11 years agowl12xx: increase Tx spare size only for GEM encrypted packets ol_R5.00.15 r5.00.15-build_172 r5.00.15-build_173 r5.00.15-build_174 r5.00.15-build_175 r5.00.15-build_176 r5.00.15-build_177 r5.00.15-build_178 r5.00.15-build_179
Arik Nemtsov [Tue, 24 Apr 2012 14:55:02 +0000 (17:55 +0300)]
wl12xx: increase Tx spare size only for GEM encrypted packets

When allocating FW Tx spare blocks, consider the cipher used for this
skb. GEM packets require 2 spare blocks.
This is a change from globally requiring 2 spare blocks when a GEM cipher
is configured for any interface.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
11 years agowl12xx: don't enable BET for high basic rates
Victor Goldenshtein [Mon, 23 Apr 2012 14:58:11 +0000 (17:58 +0300)]
wl12xx: don't enable BET for high basic rates

The beacon early termination is not relevant for
high basic rates, which doesn't contribute
anything to the PS and only adds unnecessary FW
work.

Enable BET only if the basic rate is less than 9
Mbps.

Signed-off-by: Ziv Riesel <zivriesel@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
11 years agowl12xx: fix fm_coex parameters configuration
Victor Goldenshtein [Thu, 19 Apr 2012 16:03:41 +0000 (19:03 +0300)]
wl12xx: fix fm_coex parameters configuration

Wrong fm_coex parameters were set during wl12xx
init phase, fix it.

Signed-off-by: Ziv Riesel <zivriesel@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
11 years agowl12xx: modify default parameters (to be squashed)
Igal Chernobelsky [Tue, 24 Apr 2012 10:59:43 +0000 (13:59 +0300)]
wl12xx: modify default parameters (to be squashed)

Modify default parameters to reduce firmware BSS lose
probability in congested environment.
Should be squashed for upstream with original commit:
43e4ba7 modify default parameters.

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
12 years agowl12xx: modify default parameters ol_R5.00.14 r5.00.13-build_144 r5.00.13-build_145 r5.00.13-build_146 r5.00.14-build_147 r5.00.14-build_148 r5.00.14-build_149 r5.00.14-build_150 r5.00.14-build_151 r5.00.14-build_152 r5.00.14-build_153 r5.00.14-build_154 r5.00.14-build_155 r5.00.14-build_156 r5.00.14-build_157 r5.00.14-build_158 r5.00.15-build_160 r5.00.15-build_161 r5.00.15-build_162 r5.00.15-build_163 r5.00.15-build_164 r5.00.15-build_165 r5.00.15-build_166 r5.00.15-build_167 r5.00.15-build_168 r5.00.15-build_170 r5.00.15-build_171
Igal Chernobelsky [Tue, 3 Apr 2012 12:48:29 +0000 (15:48 +0300)]
wl12xx: modify default parameters

Modify default parameters to reduce firmware BSS lose
probability in congested environment.

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
12 years agowl12xx: add a sanity check for the SSID config
Victor Goldenshtein [Sun, 1 Apr 2012 13:32:11 +0000 (16:32 +0300)]
wl12xx: add a sanity check for the SSID config

If the AP is configured with hidden_ssid it still
should have a valid SSID configuration.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
12 years agomac80211: don't reset bss_conf->ssid_len for the set_beacon op
Victor Goldenshtein [Mon, 2 Apr 2012 10:07:11 +0000 (13:07 +0300)]
mac80211: don't reset bss_conf->ssid_len for the set_beacon op

Since params->ssid_len and params->ssid are not
parsed in the nl80211_addset_beacon for the
NL80211_CMD_SET_BEACON case, don't reset these
parameters in the bss_conf.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
12 years agowl12xx: wait for roc complete only for the first roc command r5.00.13-build_139 r5.00.13-build_140 r5.00.13-build_141 r5.00.13-build_142 r5.00.13-build_143
Victor Goldenshtein [Thu, 29 Mar 2012 10:06:46 +0000 (12:06 +0200)]
wl12xx: wait for roc complete only for the first roc command

In some multi role scenarios the driver might send multi
roc requests without sending a croc first, the fw queues
those requests and starts service the next roc request as
soon as the driver sends a croc for the previous one. So,
if the fw rocs on channel X and driver asks to roc also
on channel Y, the fw will not start service Y (and will
not send roc complete event for this request) until the
driver releases the fw with croc X.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>