WLAN - mac80211: Add R5 compat for wl12xx builds

Add R5 version of compat under compat_wl12xx name.

Change-Id: I91c9d2821462af011db9874c6cfd724291a6e4d6
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
WLAN - mac80211:Upgrade driver to version R5.00.18

wl12xx: handle correctly wl_list
[NOT_FOR_UPSTREAM] setting only VO as UAPSD
Revert "wl12xx: wait stop station role event"
	due to bug with merge this code it was a dupplication of previos patch.
	the logic of waiting for stop role evevent remains.
wl12xx: wait stop station role event
wl12xx: increase number of BA session to 3
wl12xx: increase Tx spare size only for GEM encrypted packets
wl12xx: don't enable BET for high basic rates
wl12xx: fix fm_coex parameters configuration
wl12xx: modify default parameters (to be squashed)

R5.00.18 package upgradation needs the following patches also:
    for external/wpa_supplicant_8:
        http://review.omapzoom.org/22273
    for device/ti/proprietary-open:
        http://review.omapzoom.org/22274

Change-Id: Ie2ee674d5304e15aee121a562431da926f372ccc
Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
wlcore: Fix sdio out-of-sync power state

wl1271_sdio_power_off() manually powers down the card, regardless of the
runtime pm state. If wl1271_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 wl1271_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 wl1271_sdio_power_on() explicitly powers on
the chip in case runtime pm claims the chip is already powered on. To
avoid cases in which we are unable 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.

Change-Id: I5f9b1b45d3a6d3540551835de699fa327d43ab7f
Signed-off-by: Ido Yariv <ido@wizery.com>
WLAN - mac80211:Upgrade driver to version R5.SP2.04

wlcore: Prevent interaction with HW after recovery is queued
wl12xx: Use a dedicated fw for PLT
wl12xx: set default FW log mode to dbg-pins
wl12xx: take the mutex during delayed recovery
wl12xx: tx_flush - optimize flow and force Tx during the flush
wl12xx: lazy-enable device roles
wl12xx: always use wlvif->role_id for scans
wl12xx: disable roaming only when booting the MR FW
wl12xx: don't try to free a NULL probe-resp
wl12xx: allow setting 3 mac addresses
mac80211: avoid using synchronize_rcu in ieee80211_set_probe_resp
mac80211: avoid using synchronize_rcu in ieee80211_config_beacon
wlcore: don't stop tx queue via watermark if already stopped
wlcore: stop queues on Tx flush
wlcore: add stop reason bitmap for waking/starting queues
wl12xx: make Tx flush timings more verbose
wl12xx: allow only the lowest OFDM rate for p2p setup frames
wl12xx: AP mode - send non-data packets with basic rates
mac80211: skip the ps count of idle STAs
wl12xx: change verbose debug print
cfg80211/nl80211/wl12xx: align to new nl80211.h ABI
mac80211: fix invalid band deref building preq IEs
wlcore: define number of supported bands internally
wlcore: use basic rates for non-data packets
wlcore: send EAPOLs using minimum basic rate for all roles
mac80211: check sdata_running on ieee80211_set_bitrate_mask
wl12xx: increase WL12XX_MAX_ROLES
wl12xx: change recovery on start/stop device role
wl12xx: add grace period when changing MR -> SR fw
wl12xx: delay fw switch to start/stop_role_sta/ap
mac80211: count started vifs
wl12xx: increase command completion timeout
wl12xx: implement SW Tx watchdog
wl12xx: add an extra block for all data packets in GEM
wlcore: don't issue SLEEP_AUTH command during recovery
wl12xx: change return code in case of WD recovery (squash)
wl12xx: add elp_timeout config option
wl12xx: increase number of rx filters to 7
wl12xx: support wowlan pattern actions
nl80211: add an action to wowlan patterns
wlcore: avoid debug prints during intended FW recovery
wlcore: android: don't suspend on pending recovery (INTERNAL)
mac80211: fix list_aliases handling (INTERNAL)
wlcore: don't set SDIO_FAILED flag when driver state is off
mac80211: don't require associated->beacon_ies for ps
wlcore: Prevent processing of work items during op_stop
wl12xx: always clear recovery flag during recovery_work
wlcore: compare ssid_len before comparing ssids
wl12xx: init the pll reg before reading the fuse reg
wl12xx: always set default wep key idx
wlcore: add probe request templates for sched and one-shot scans
Revert "mac80211: use legacy mode for all ACs"
wlcore: release lock on error in wl1271_op_suspend()
mac80211: use legacy mode for all ACs
wl12xx: print stack trace in every recovery
wl12xx: queue recovery in case of bus errors during cmd_remove_peer
wl12xx: fix broken TX due to wrong queuing of recovery
wl12xx: reconfigure sleep_auth when removing interfaces
wl12xx: prevent recovery in the middle of resume
wl12xx: refactor threaded IRQ routine
wl12xx: check Rx-filter functions in the suspend path
wl12xx: force recovery on resume if suspended without recovering
wl12xx: don't allow SDIO read/writes after failure
wl12xx: cancel suspend when recovery is pending
mac80211: fix cleanup if driver suspend callback fails
mac80211: handle auth failure returned with unmatching auth algo
wl12xx: Force checking of io functions' return values
wl12xx: Propagate errors from wl1271_read_hwaddr
wl12xx: Propagate errors from wl1271_write
wl12xx: Propagate errors from wl1271_read
wl12xx: Propagate errors from wl1271_raw_write32
wl12xx: Propagate errors from wl1271_raw_read32
wl12xx: Check return value when reading the FW status
wl12xx: Change read/write ops to return errors
wl12xx: Disable interrupts while recovering
mac80211: Clear wowlan flag when drv_suspend returns failure
wlcore: send EAPOLs with basic rate policy
mac80211: fix non RCU-safe sta_list manipulation
wl12xx: add a directory specific .gitignore
mac80211: fix ADDBA declined after suspend with wowlan

Change-Id: I8151e4a3ddbefd7fafd1d626e04245e5d23b0d51
Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
compat: move br_port_exists() to compat-2.6.36.h

br_port_exists() was moved to a new compat-*.h file for every new
kernel release, as it is not in mainline. This patch moves it to compat-
2.6.36.h so it has not to be moved any more for a new kernel version.

(This time for compat_wl12xx)

Change-Id: I3bb9a24f8bd8a9b5a2e63a1ced2dc60cfcfc189d
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
compat: use kconfig.h in compat-2.6.h for 3.1 and later kernels

This file was introduced in commit 2a11c8ea20bf850b3a2c60db8c2e7497d28aba99
and included in 3.1 and later kernels.  It includes <generated/autoconf.h>
itself, as well as some other definitions that are used elsewhere.

(This time for compat_wl12xx)

Change-Id: Ia030c06b7fb7691c1e9db307485774f40b227531
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
WLAN - wl12xx: Update to R5.SP3.01 from R5.SP2.04 package

wl12xx: increase scan dwell times if no activity
wl12xx: prevent channel switch in the MR FW
nl80211: sync nl80211.h with latest wpa_s copy
wl12xx: remove unnecessary WARN_ON in wl12xx_tx_reset
wl12xx: new module param to set the dominant role
mac80211: if "dominant ap ch"!="sta ch" block the auth
mac80211: request AP/GO channel switch if needed
wl12xx: add channel switch request debugfs entry
wl12xx: add channel switch ability for AP & GO
mac80211: add ap channel switch command/event
nl80211/cfg80211: add ap channel switch command
cfg80211: add channel switch notify event
mac80211: add channel switch request
nl80211/cfg80211: add channel switch request command
mac80211: fix sync of rx filters with driver and cfg80211
nl80211: don't save wowlan triggers if rx_set_filters fails
wl12xx: clear RX filters when adding AP/GO interface
wl12xx: fwlog changes and dynamic mem_block
wl12xx: add sysfs control over disable SGI
wl12xx: add module param to enable/disable core_dump
wl12xx: core_dump implementation
wl12xx: remove some trailing spaces
wl12xx: elp_wakeup when issuing recovery from userspace
wl12xx: disable WARN_ON in case of FW watchdog recovery
mac80211: always set in_reconfig=false on wakeup
mac80211: stop Rx during HW reconfig
mac80211: add stations after AP start on reconfig
Revert "wl12xx: fix BA session after AP recovery"
wl12xx: Always pass DMA-able buffers to mmc functions
wl12xx: don't ROC or switch to MR on p2p mgmt on-chan Tx
wl12xx: enable the dev role on the p2p mgmt iface
mac80211: mark the p2p0 interface with a special flag
wl12xx: disable arp filter only if configured
wl12xx: don't send the sleep_auth to FW on recovery
wl12xx: Fix continuous and on-demand fwlog modes
wl12xx: Fix unbalanced interrupts enablement
wl12xx: Don't recover during boot
wlcore: make debug prints work without dynamic debug
wlcore: op_tx: pass sta explicitly when inferring frame hlid
wlcore: don't get the hlid from a queued skb

Change-Id: Ic2e9222690c4bf2d4a23ee0365b242654ecabe02
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Yair Shapira <yair.shapira@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
WLAN - add autogenerated file to gitignore

version.h is autogenerated during build.
Adding it to .gitignore file.

Change-Id: I3b010069a3ab3245bf3d4c98dc2ce1b86c7b6cef
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
WLAN - compat_wl12xx: more file cleanups

- Remove unused files from compat
- Update Makefile accordingly

Change-Id: I65acbe7ee8063c082a1877ac7f668287f6ba15cd
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
WLAN - compat_wl12xx: fix compilation warnings

Fix compilation warnings "warning: "pr_fmt" redefined"

Based on below commit from compat-wireless,

commit 3362c65c42220fa0458d0499262245dc3b59f430
Author: Luis R. Rodriguez <mcgrof@frijolero.org>
Date:   Mon Apr 2 20:30:10 2012 -0700

    compat-wireless: fix pr_fmt compile warnings

Change-Id: Ifae0e05afecc95e742f815b9e890c65e2c8c96be
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
WLAN - wl12xx: Update to R5.SP3.06 from R5.SP3.01 package

mac80211: reject BA action frames if sent fron non HT STA
mac80211: warn on enabling beacon while off channel
wl12xx: improve some debug logs
wl12xx: fix list_add/list_del
wl12xx: FW recovery trigger assert bug fix
wl12xx: mutually exclude PLT and normal power modes
wl12xx: check for required fw change while enable or disable role
wl12xx: disable elp sleep while in plt mode
mac80211: purge offchannel Tx on reconfig
wl12xx: Copy FW log as entire mem block
wl12xx: decrease elp timeout to 20ms
wl12xx: triggering FW assert to perform recovery
wl12xx: fix some line spacing
wl12xx: recovery elp_wakeup optimizations
mac80211: purge all pending ROCs on reconfig
wl12xx: block sched scan if p2p client is running
mac80211: increase channel switch request timeout
wl12xx: initialize per-link FW freed blocks correctly
wl12xx: restore default channel configuration
wl12xx: consolidate free_link and always call it
wl12xx: take the mutex before resetting Tx queues
wl12xx: change packet retry count
wl12xx: fix generic cfg fw command

Change-Id: I6df813e1781f5178d9558f7a4b4a70d7900bd6bb
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Yossi Wortzel <yossiw@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Yair Shapira <yair.shapira@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Ofir Luzon <ofirluzon@ti.com>
Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
WLAN - wl12xx: Update to R5.SP5.01 from R5.SP3.06 package

wl12xx: fix mem leak in the channel switch command
wl12xx: fix unset ret value in wl1271_join
wl12xx: fix unsafe dereference of the wlvif
cfg80211: consider security during scan results update
wl12xx:support ap a2dp coex

This is the latest version which is officially supported by TI

original commits from:
https://github.com/TI-OpenLink/wl12xx/commits/ol_R5.SP5.01

latest firmware can be found here:
https://github.com/TI-OpenLink/ti-utils/commits/ol_R5.SP5.01

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I913828ff5ca228dc6f875beb41e9369c44a0408d
WLAN - wl12xx: Update version to ol_R5.SP5.01

Updated to reflect the real version.

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I3e9087b1b455477187c9d0c59737b8667d993728
compat-wireless: turn on TESTMODE and MAC DEBUGFS, turn off BT

CONFIG_NL80211_TESTMODE is required to support utils (calibrator)
CONFIG_MAC80211_DEBUGFS is used to control UAPSD mode.
These switches are also turned on in driver kernel config.
Turn off BT module build switches as BT has a separate compat.

Change-Id: I9bf41b8f3e442fddb8cf17da3c0d3138788097a2
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
wl12xx: fix unbalanced wakelock in IRQ-while-suspended path

Change-Id: I2d9cf541884a7e2435865096796a3947439c0f4d
WLAN - mac80211: generating wpa_supplicant.conf on the fly

Aligning with Android mechanism of generating wpa_supplicant.conf on the fly.

Change-Id: I53c27fdeaf6ba7a7f6769d2b3f149d896eb1b7a8
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
wlan: mac80211: config: add check for new wpa_supplicant tree

Add check for new TI wpa_supplicant tree added to JB

Change-Id: I7525f8a6792b2a9b909d6365d2ef13b502f417a6
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
wl12xx: Import firmware & ini files from ol_R5.SP5.01

This brings us up-to-date with TI ol_R5.SP5.01 release
and eliminates the need for device specific firmware in device/vendor trees

Current firmware:
SR: X.3.10.0.136 MR: X.5.7.0.46

Original files from:
https://github.com/TI-OpenLink/ti-utils/commits/ol_R5.SP5.01

Change-Id: Ie8917768212c2eb5330127fb7d498c0499d7cc8d
Signed-off-by: Michael Bestas <mikeioannina@gmail.com>