Update compat-wireless from ol_R5.SP3.01 to ol_R5.SP6.01

Commits come from https://github.com/TI-OpenLink/. HTC specific changes
are still there. Just the commits leading from SP3.01 to SP6.01 were
applied.

Non squashed commits can be seen here:
https://github.com/thoemy/android_kernel_htc_endeavoru/tree/update-wifi-compat

Squashed commit of the following:

commit f44feec52868feb8147b9fd31afed470ff31e49c
Author: Victor Goldenshtein <victorg@ti.com>
Date:   Thu Jan 17 14:15:24 2013 +0200

    wl12xx: fix unsafe dereference of the wlvif

    wlvif could be passed as NULL from the wl1271_tx_work_locked()
    to the wl1271_prepare_tx_frame() and to wl1271_skb_queue_head()
    functions. This may lead to a Kernel panic, fix this by
    validating that wlvif != NULL before using it.

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

commit 025cff694bca23e5ce922eb13f4ee081590613ca
Author: Eyal Reizer <eyalr@ti.com>
Date:   Tue Mar 5 17:57:32 2013 +0200

    wl12xx:support ap a2dp coex

    Add functionality to support AP A2DP co-existence:

    1. Add configuration for enable/disable of CTS protection in AP mode
    2. Add indication for completion of connection establishment in ap
       mode. This is used by the firmware to change coex parameters
       when a station is in the process and connecting to the ap and
       change them back after the connection has been established.

    Signed-off-by: Eyal Reizer <eyalr@ti.com>

commit b362724cdf8d78333121410fa81246d2f1bc4c8e
Author: Victor Goldenshtein <victorg@ti.com>
Date:   Wed Feb 27 11:04:38 2013 +0200

    cfg80211: consider security during scan results update

    AP security changes are not updated in the following scenario:
    STA performs a scheduled scan on DFS channel during connection
    to open AP, as some devices (wl12xx) will send a probe req on
    DFS channels once activity is detected, cfg80211 gets and saves
    the scan result from a probe resp. STA disconnected and AP
    security is changed to AES, STA performs a passive scan,
    cfg80211 gets a new scan result for the same BSSID but now from
    beacon. cfg80211_bss_update() finds previous scan result from
    probe resp but the security change is not updated correctly.
    Fix this by considering security mismatch in rb_find_bss.

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

commit 84d2dec74d7352b76d726a3f5f772391e2c7c4a9
Author: Victor Goldenshtein <victorg@ti.com>
Date:   Thu Jan 17 13:39:13 2013 +0200

    wl12xx: fix unset ret value in wl1271_join

    Set the ret value before the return statement.

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

commit 7d3cf22542673fd0a5bd8a0f0dd21c9e36846f7b
Author: Victor Goldenshtein <victorg@ti.com>
Date:   Thu Jan 17 13:10:52 2013 +0200

    wl12xx: fix mem leak in the channel switch command

    Channel switch command wasn't freed in certain sanity check,
    fix this by moving the check before the command allocation.

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

commit 98bf0f43c8f9a441d13186753eb99179f7ec5ca2
Author: Eyal Shapira <eyal@wizery.com>
Date:   Sat Nov 3 16:35:35 2012 +0200

    mac80211: reject BA action frames if sent fron non HT STA

    The FW doesn't work well with BA sessions started from non 802.11n
    STAs. Reject these as a work around until the FW issue is fixed.

    Signed-off-by: Eyal Shapira <eyal@wizery.com>

commit c53bd9ec1ac5b7adea2c6c485cca5df86cc0d177
Author: Eyal Shapira <eyal@wizery.com>
Date:   Fri Nov 2 12:14:44 2012 +0200

    mac80211: warn on enabling beacon while off channel

    This can cause the beaconing to start on the wrong channel.
    Several such races were fixed but still add a WARN_ON as
    we'd like to know if something like that still happens.

    Signed-off-by: Eyal Shapira <eyal@wizery.com>

commit 84b4126a8085a36ae2ff53204679f31c01c0e925
Author: Eyal Shapira <eyal@wizery.com>
Date:   Fri Nov 2 12:19:21 2012 +0200

    wl12xx: improve some debug logs

    These turned out to be useful so add them.

    Signed-off-by: Eyal Shapira <eyal@wizery.com>

commit 2cbd264e7dd001a8ca54289c467f4bf272ef0fb4
Author: Ofir Luzon <ofirluzon@ti.com>
Date:   Wed Oct 31 14:57:56 2012 +0200

    wl12xx: fix list_add/list_del

    add list_del even if wl in off state

    Signed-off-by: Ofir Luzon <ofirluzon@ti.com>

commit cffd2e38e8a3a15b21c68173954c81896b3a3f0e
Author: Yair Shapira <yair.shapira@ti.com>
Date:   Wed Oct 31 12:48:33 2012 +0200

    wl12xx: FW recovery trigger assert bug fix

    The bug was in the partition mapping. It seems that .mem3 partition that
    we used to write 'magic' 0xCAFECAFE to address 0x1C is actually in use (it
    contains the struct part of the FW_STATUS). It is in use although the size
    of the partition is set to 0

    The fix was to save old partition, map a new partition with .mem part set to
    address 0x1C and remap previous partition after writing 0xCAFECAFE.

    Signed-off-by: Yair Shapira <yair.shapira@ti.com>

commit d2fd56a7755f5136a6a3125f46881387300da850
Author: Yair Shapira <yair.shapira@ti.com>
Date:   Mon Oct 29 19:56:45 2012 +0200

    wl12xx: mutually exclude PLT and normal power modes

    Small fix done to ensure that PLT mode and normal driver power
    mode (ifconfig/add_interface) are mutually excluded.

    This is partially based on wl18xx (R8) commit 6620ca8fe29d

    Signed-off-by: Yair Shapira <yair.shapira@ti.com>

commit fbf346aee8f230b01c4319a2827369406283b7a9
Author: Eyal Shapira <eyal@wizery.com>
Date:   Thu Oct 25 17:33:57 2012 +0200

    wl12xx: check for required fw change while enable or disable role

    In certain scenarios our current hooks for checking required
    fw change aren't enough and we could be left in MR even though
    we've gone back to a single interface. This is of course not
    good as we prefer running with the SR FW which contains goodies
    like BTCOEX.

    An example scanerio is when running P2P GO + STA and then
    removing the P2P GO.

    Fix it by adding checks for fw change also while enable or
    disable roles.

    Signed-off-by: Eyal Shapira <eyal@wizery.com>

commit 628cded5472953c4c3997c91e625d736c4444c2f
Author: Yair Shapira <yair.shapira@ti.com>
Date:   Mon Oct 29 16:38:57 2012 +0200

    wl12xx: disable elp sleep while in plt mode

    We now disable elp sleep during plt mode to allow normal operation of
    plt tools such as calibrator.

    Having elp_sleep enabled during plt mode is actually not required and
    in fact it distupt plt operations such as rx statistics etc...

    Signed-off-by: Yair Shapira <yair.shapira@ti.com>

commit 527a8c9e2fe74985b88dbf8b0918a3cba1b3eeae
Author: Arik Nemtsov <arik@wizery.com>
Date:   Wed Oct 24 22:35:27 2012 +0200

    mac80211: purge offchannel Tx on reconfig

    Offchannel Tx occuring during reconfig can cause us the low level driver
    to start various operations on the wrong channel, similar to remain on
    channel operations. Purge them before reconfig.

    Reported-by: Eyal Shapira <eyal@wizery.com>
    Signed-off-by: Arik Nemtsov <arik@wizery.com>

commit 6bddef20fb9bf7af7d6bf8a1529b4da3600e7011
Author: Igal Chernobelsky <igalc@ti.com>
Date:   Thu Oct 18 17:08:19 2012 +0200

    wl12xx: Copy FW log as entire mem block

    FW log copy is simplified to copy the entire
    memory block as FW logger utility is repsponsible
    for parsing of FW log content.
    (Similar commit was applied to wl18xx:
    wlcore/wl18xx/wl12xx: FW log params per chip arch)

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

commit 892ec800368b26df0a51129374e1d229de5340e9
Author: Eyal Shapira <eyal@wizery.com>
Date:   Thu Oct 18 18:05:24 2012 +0200

    wl12xx: decrease elp timeout to 20ms

    The current elp timeout set to 200 ms is too high.
    While its purpose was to avoid going to ELP
    during Tx/Rx the problem is that it keeps the
    device awake also after issuing commands when there's
    no traffic. In Android this is a real problem as
    RSSI is polled by the framework every 3 seconds
    and keeping the chip out of ELP for 200ms each time
    has a significant power consumption effect.

    Fix that by changing to 20ms. This prevents excessive
    real elp sleeps and wakeups during Rx/Tx with 12xx.
    There's no real need any more for setting a hard
    coded 5ms while in forced_ps.

    The fw won't enter elp anyways before the dynamic-ps
    timeout expired as well (and it entered ps
    successfully).

    (Based on a similar patch by Eliad for wlcore)

    Signed-off-by: Eyal Shapira <eyal@wizery.com>

commit f42634221d0a3be3f626effa91ec6158ca8a055d
Author: Yair Shapira <yair.shapira@ti.com>
Date:   Sun Oct 14 17:10:46 2012 +0200

    wl12xx: triggering FW assert to perform recovery

    Driver based FW recovery was modified. It is now trying to trigger
    FW assert and waiting for WATCHDOG interrupt before continuing with
    recovery.

    This is done to allow FW to perform cleanups and halt gracefully
    before recovery is performed. This allows for safe reading of
    on-demand fwlog, core_dump, etc...

    FW assert triggering is done by writing 0xcafecafe to FW address 0x1c
    and then triggering PHY_RX_HEADER FW interrupt which is its highest
    priority interrupt.

    There is a timeout of 100ms waiting for WATCHDOG interrupt.

    In case timeout is reached or we get ELP or SDIO errors, we resume
    recovery without reading fwlog, core_dump, etc beacuse we assume that
    FW is not responding...

    Signed-off-by: Yair Shapira <yair.shapira@ti.com>

commit 45106c6f0b3abcf1b6fb8ebffed5eaa88efd7302
Author: Yair Shapira <yair.shapira@ti.com>
Date:   Sun Oct 14 17:10:45 2012 +0200

    wl12xx: fix some line spacing

    Remove trailing blanks...

    Signed-off-by: Yair Shapira <yair.shapira@ti.com>

commit f5b0d71aed8278875fa12f08b4a9c2c3df805b2b
Author: Yair Shapira <yair.shapira@ti.com>
Date:   Sun Oct 14 17:10:44 2012 +0200

    wl12xx: recovery elp_wakeup optimizations

    We now do several optimizations related to recovery situations:

      We fail elp_wakeup if we have SDIO errors (otherwise we just waste time)

      We now call elp_wakeup inside the recovery work routine to ensure that
      FW is awake for recovery operations (such as ewading core dump, on-
      demand fwlog etc...). This is done prior to disabling wl-interrupts.

      The call to elp_wakeup was removed from userspace recovery trigger routines
      (such as libnl and debugfs) because it is now redundent

    Signed-off-by: Yair Shapira <yair.shapira@ti.com>

commit 523ae05615fe45613b97fdd5e57143cdb8784d4f
Author: Arik Nemtsov <arik@wizery.com>
Date:   Wed Oct 10 18:11:20 2012 +0200

    mac80211: purge all pending ROCs on reconfig

    A remain-on-channel work item may be queued, causing interfaces to start
    on the wrong channel during reconfig.

    Signed-off-by: Arik Nemtsov <arik@wizery.com>

commit b7676716ba2bf9c95bacec7affbfe36571e42162
Author: Eyal Shapira <eyal@wizery.com>
Date:   Sun Sep 30 04:04:04 2012 +0200

    wl12xx: block sched scan if p2p client is running

    sched scan isn't supported by the FW when there's a p2p
    role active so block it if any interface is running
    p2p client.

    Signed-off-by: Eyal Shapira <eyal@wizery.com>

commit d173877d5d017ab851719ce9c9386a7062f81f7f
Author: Victor Goldenshtein <victorg@ti.com>
Date:   Sun Sep 30 12:39:59 2012 +0200

    mac80211: increase channel switch request timeout

    In some heavy loaded MR scenarios with enabled debug
    prints the channel switch request + channel switch
    command can take some time. Increase the channel
    switch request timeout to: beacon_int * dtim_period * 10.

    Also clear the "ap_cs_channel" in case of completion
    timeout/error.

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

commit 9c1255023df31d54958880ae8026ef2e4d807707
Author: Arik Nemtsov <arik@wizery.com>
Date:   Tue Sep 25 14:24:13 2012 +0200

    wl12xx: initialize per-link FW freed blocks correctly

    When a link is allocated, sometimes the "freed packets" counter in FW
    is non zero, but we always assumed it is. This caused us to incorrectly
    account FW allocated blocks in some cases.

    When operating in AP mode, this bug caused some stations to never
    come back from PSM.

    Signed-off-by: Arik Nemtsov <arik@wizery.com>

commit a7564b01eaad16ffa1aaa1bcdc652090a15ce0af
Author: Victor Goldenshtein <victorg@ti.com>
Date:   Tue Sep 25 12:28:06 2012 +0200

    wl12xx: restore default channel configuration

    wl12xx allocates two static structs wl1271_band_2ghz &
    wl1271_band_5ghz which are used/modified by Reg-Domain
    e.g. some channel might be marked as passive at some
    point. These structs freed only during wl12xx rmmod and
    aren't cleared during wl12xx_sdio.ko, this means that
    some channel flags might be set regardless reg-domain
    rules. Fix this by clearing the channel flags from
    the previous usage (before the current wl12xx_sdio.ko
    insmod).

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

commit 21581a8ad39e05d7e6a0ee6486653cfcd32570ee
Author: Arik Nemtsov <arik@wizery.com>
Date:   Mon Sep 24 20:32:08 2012 +0200

    wl12xx: consolidate free_link and always call it

    Make sure free_link is always called when removing an interface. This
    ensures all skbs belonging to this interface are returned to mac80211.
    Otherwise these dangling skbs might crash the system on the next
    call to wl1271_tx_reset_link_queues(). This happens on recovery/stop or
    an unsuccessful Tx flush.

    Signed-off-by: Ido Yariv <ido@wizery.com>
    Signed-off-by: Arik Nemtsov <arik@wizery.com>

commit f8bead8619acb89bf9cc22ae79daff252f007722
Author: Arik Nemtsov <arik@wizery.com>
Date:   Mon Sep 24 15:55:55 2012 +0200

    wl12xx: take the mutex before resetting Tx queues

    Otherwise we risk contention for private members of our global structure
    while op_stop_locked is running.

    Reported-by: Ido Yariv <ido@wizery.com>
    Signed-off-by: Arik Nemtsov <arik@wizery.com>

commit d274f996ed2de68d84d5703f395e533f28900621
Author: Yossi Wortzel <yossiw@ti.com>
Date:   Thu Sep 20 14:51:21 2012 +0300

    wl12xx: change packet retry count

    default retry number was 10. we found out that in noisy environment
    there were case we were failed to send the packet.
    in that case it took time until the upper layer retransmit the
    packet which cause degradation in TCP TP.
    change the default to 50 in order to solve this problem

    Signed-off-by: Yossi Wortzel <yossiw@ti.com>

commit d7dd1287518f82042f9a2d67f5f10387a70c555b
Author: Eyal Shapira <eyal@wizery.com>
Date:   Wed Sep 19 13:35:50 2012 +0300

    wl12xx: fix generic cfg fw command

    The command struct was missing the header struct.

    Signed-off-by: Eyal Shapira <eyal@wizery.com>

Change-Id: I816aee1b26634d090aad8e999372cac932927473