drivers: wireless: bcmdhd: from grouper 3.1

per 02a7a4f net: wireless: bcmdhd: Combined P2P fixes
rfkill: Fix compilation when PM is disabled

Add config macros for RFKILL_PM to fix compilation when
CONFIG_PM is disabled

Change-Id: I9fba48fb02d671885665354091101f3813426f57
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
net/rfkill/core.c: Avoid leaving freed data in a list

The list_for_each_entry loop can fail, in which case the list element is
not removed from the list rfkill_fds.  Since this list is not accessed by
the loop, the addition of &data->list into the list is just moved after the
loop.

The sematic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E,E1,E2;
identifier l;
@@

*list_add(&E->l,E1);
... when != E1
    when != list_del(&E->l)
    when != list_del_init(&E->l)
    when != E = E2
*kfree(E);// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cfg80211: add a field for the bitrate of the last rx data packet from a station

Also fix a typo in the STATION_INFO_TX_BITRATE description

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
mac80211: add support for showing the last rx bitrate

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
nl80211: Add BSS parameters to station

This allows user-space monitoring of BSS parameters for the associated
station.  This is useful for debugging and verifying that the paramaters
are as expected.

[Exactly the same as before but bundled into a single message]

Signed-off-by: Paul Stewart <pstew@chromium.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
{mac|nl}80211: Add station connected time

Add station connected time in debugfs. This will be helpful to get a
measure of stability of the connection and for debugging stress issues

Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cfg80211/nl80211: Send AssocReq IEs to user space in AP mode

When user space SME/MLME (e.g., hostapd) is not used in AP mode, the
IEs from the (Re)Association Request frame that was processed in
firmware need to be made available for user space (e.g., RSN IE for
hostapd). Allow this to be done with cfg80211_new_sta().

(cherry picked from commit d692df224b8605095cb7f770c1c99d3150834daf from
android.googlesource.com/common.git)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I211171ca4953832cc998402c149ecf3fc429f9e6
Reviewed-on: http://git-master/r/78886
Reviewed-by: Automatic_Commit_Validation_User
cfg80211: fix a crash in nl80211_send_station

mac80211 leaves sinfo->assoc_req_ies uninitialized, causing a random
pointer memory access in nl80211_send_station.
Instead of checking if the pointer is null, use sinfo->filled, like
the rest of the fields.

Change-Id: I312a466f8c631ad64a16ecf191fa8046fe658cc1
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/48179
Reviewed-by: Jim1 Lin <jim1_lin@asus.com>
Tested-by: Jim1 Lin <jim1_lin@asus.com>
Reviewed-by: Leslie Yu <Leslie_Yu@asus.com>
cfg80211: Add nl80211 event for deletion of a station entry

Indicate an NL80211_CMD_DEL_STATION event when a station entry in
mac80211 is deleted to match with the NL80211_CMD_NEW_STATION event
that is used when the entry was added. This is needed, e.g., to allow
user space to remove a peer from RSN IBSS Authenticator state machine
to avoid re-authentication and re-keying delays when the peer is not
reachable anymore.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Revert "SLAB: Record actual last user of freed objects."

This reverts commit 4eb1a6cba9700bcd533975c066134b26b7346fba.
Revert "mm: notifier_from_errno() cleanup"

This reverts commit bbd2e7cdfcf5376b729daee617d3ee04d5928095.
Revert "slab,rcu: don't assume the size of struct rcu_head"

This reverts commit dec5bf8fa41cd290ff689c813b2a6e0dd17487f1.
Revert "mm: Remove support for kmem_cache_name()"

This reverts commit 59ecae883edb69fe13dbacbb458ca4e026bb71cc.
Revert "sched: don't call task_group() many times in set_task_rq()"

This reverts commit 8ebf6d58c3fee4cef28db1fb46a5eb5d7e8417a5.
Revert "cpufreq: Export user_policy min/max"

This reverts commit 71d4679b6c54b51671e07984325c81446f472f70.
Revert "[CPUFREQ] fix cpumask memory leak in acpi-cpufreq on cpu hotplug."

This reverts commit fa6f74c1f01a5eb47c9207e4e169ed5d634443d8.
Revert "cpufreq: expose a cpufreq_quick_get_max routine"

This reverts commit 43357614f25e6a048fb06a5451cb251c054e90fe.
msm: mahimahi: bcmdhd updates
msm: supersonic: bcmdhd updates