wireless: add VHT (802.11ac) definitions

Add the VHT definitions to be used by drivers supporting it.

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: ce0e169529a2db1cd910d2d45a5713fcdc29f6e1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: Iccbc9c8c1f0182c93d2476fd520d6d8070c5acdf
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
cfg80211: allow advertising VHT capabilities

Allow drivers to advertise their VHT capabilities
and export them to userspace via nl80211.

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: bf0c111ec80355ee9fe2e2bdb609a536b54768d8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: I467d7a3386053eb23d92e5f3f4e4a92a8e01c95f
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
mac80211: include VHT capability IE in probe requests

Insert the VHT capability IE into probe requests.

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: ba0afa2f22e1e3f332e45460f99328025d44564e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[jjohnson@codeaurora.org: resolved 3.4 backport issues]
Change-Id: I3f9e19c85a76664abda65f4ef52672328ff31a0c
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
mac80211: VHT (11ac) association.

Insert VHT IEs into association frames to allow
mac80211 to connect as a VHT client.

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
[clarify commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: d545daba5357c1ca377a4fe917ccf4de3a3031e0
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[duttus@codeaurora.org: resolved 3.4 backport issues]
Change-Id: Idac8e490ad25636c7056101b9e8073830b74a783
Signed-off-by: Sunil Dutt <duttus@codeaurora.org>
ieee80211: Rename VHT cap struct

Rename struct ieee80211_vht_capabilities to ieee80211_vht_cap
and renamed its member vht_capabilities_info to vht_cap_info.

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: d4950281d72d8845225e3a39dbeb366c40c824c9
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: Ib595d501a8049042f36640b5e8f0fa66ec8403f7
CRs-fixed: 452921
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
{nl,cfg}80211: Peer STA VHT caps

To save STAs VHT caps in AP mode

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: f461be3eff662f01a177ecea8c1d7b040bb6bfbe
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[duttus@codeaurora.org: backport to 3.4 excluding the change in
net/mac80211/cfg.c-This commit includes the changes from following commits
in include/linux/nl80211.h and net/wireless/nl80211.c to compile for
msm-3.4.
89a54e48b9cbb44aed1bf6cd712e087b96b6ae65:
nl80211: prepare for non-netdev wireless devs.
57b5ce072e7361218a8e2ea1d62960cbb71d9cff:
cfg80211: add cellular base station regulatory hint support.
ed44a951c72ab409f932b1c15914488308e86da2:
cfg80211/nl80211: Notify connection request failure in AP mode.
e39e5b5e7206767a0f1be0e5cb7acbd0db87ae60:
cfg80211: Allow user space to specify non-IEs to SAE Authentication]
Change-Id: I6030c8c16a146eff7db426346c232a9b1f396951
Signed-off-by: Sunil Dutt <duttus@codeaurora.org>
cfg80211: Pass station (extended) capability info to kernel

The information of the peer's capabilities and extended capabilities are
required for the driver to perform TDLS Peer UAPSD operations and off
channel operations. This information of the peer is passed from user space
using NL80211_CMD_SET_STATION command. This commit enhances
the function nl80211_set_station to pass the capability information of
the peer to the driver.

Similarly, there may be need for capability information for other modes,
so allow this to be provided with both add_station and change_station.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 9d62a98617298c1da288f50e84c5dd67732e79b7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: I18b19ccdfdd2a6daca4fd5f878f9a8df2598a1e9
CRs-fixed: 452921
[duttus@codeaurora.org: backport to 3.4-This commit includes the
changes from following commits in include/linux/nl80211.h to compile
for msm-3.4.
ed47377154310fd2fd59d75fcdeb3d022344fb31 :
{nl,cfg}80211: add a flags word to scan requests.
3d9d1d6656a73ea8407734cfb00b81d14ef62d4b :
nl80211/cfg80211: support VHT channel configuration.
53cabad70ecf0c245b41285de64a74a6c3ee9933 :
nl80211: support P2P GO powersave configuration.
3b1c5a5307fb5277f395efdcf330c064d79df07d :
{cfg,nl}80211: mesh power mode primitives and userspace access.
77765eaf5cfb6b8dd98ec8b54b411d74ff6095f1 :
cfg80211/nl80211: add API for MAC address ACLs.
04f39047af2a6df64b763ea5a271db24879d0391 :
nl80211/cfg80211: add radar detection command/event.
a50df0c4c0d97170a6c43573612acacc43e62fe7 :
cfg80211: advertise extended capabilities to userspace.]
Signed-off-by: Sunil Dutt <duttus@codeaurora.org>
cfg80211: Pass TDLS peer's QoS/HT/VHT information during set_station

The information of the peer's capabilities is required for the driver
to perform TDLS Peer UAPSD operations. This information of the peer is
passed by the supplicant using NL80211_CMD_SET_STATION command. This
commit enhances the function nl80211_set_station to pass this
information of the peer to the driver in case this command is used
with the TDLS peer STA.

In addition, make the HT/VHT capability configuration handled more
consistently for other STA cases (reject both instead of just HT).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: df881293c6ba9a12868491a717b25cb14ec1fa4a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
CRs-fixed: 452921
Change-Id: Idf5c8e29de9c81e3fc6e9faf9ea785e9b505d89b
[duttus@codeaurora.org: resolved 3.4 backport issues]
Signed-off-by: Sunil Dutt <duttus@codeaurora.org>
cfg80211: fix station change if TDLS isn't supported

Larry noticed (and bisected) that commit df881293c6ba9a12868491a717b25
"cfg80211: Pass TDLS peer's QoS/HT/VHT information during set_station"
broke secure connections. This is is the case only for drivers that
don't support TDLS, where any kind of change, even just the change of
authorized flag that is required for normal operation, was rejected
now. To fix this, remove the checks. I have some patches that will add
proper verification for all the different cases later.

Cc: Jouni Malinen <j@w1.fi>
Bisected-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 8c6d59ee3509acd474365c34db291b950d2e66bf
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: I6620b36c9c8b6304e21c44894d1295316fb7884b
CRs-fixed: 452921
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
cfg80211: Extend support for IEEE 802.11r Fast BSS Transition
cfg80211/nl80211: add API for MAC address ACLs

Add API to enable drivers to implement MAC address based
access control in AP/P2P GO mode. Capable drivers advertise
this capability by setting the maximum number of MAC
addresses in such a list in wiphy->max_acl_mac_addrs.

An initial ACL may be given to the NL80211_CMD_START_AP
command and/or changed later with NL80211_CMD_SET_MAC_ACL.

Black- and whitelists are supported, but not simultaneously.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
[rewrite commit log, many cleanups]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 77765eaf5cfb6b8dd98ec8b54b411d74ff6095f1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
CRs-fixed: 487410
Change-Id: I9593b887941be5efa5e96546ad92cd6c6bf8fb87
[duttus@codeaurora.org: resolved 3.4 backport issues]
Signed-off-by: Sunil Dutt <duttus@codeaurora.org>
wcnss: Add API to expose the IRIS XO mode set

IRIS XO mode can be configured thru module parameter; and it can also
be auto detected. Add an API to expose the IRIS XO mode set. WLAN driver
can use this API for it's XO specific operation.

Change-Id: If40ae715f5e400e13a6fc9588d2bd144958ee8c2
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
nl80211: fix mgmt tx status and testmode reporting for netns

commit a0ec570f4f69c4cb700d743a915096c2c8f56a99 upstream.

These two events were sent to the default network
namespace.

This caused AP mode in a non-default netns to not
work correctly. Mgmt tx status was multicasted to
a different (default) netns instead of the one the
AP was in.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mac80211: fix duplicate retransmission detection

commit 6b0f32745dcfba01d7be33acd1b40306c7a914c6 upstream.

The duplicate retransmission detection code in mac80211
erroneously attempts to do the check for every frame,
even frames that don't have a sequence control field or
that don't use it (QoS-Null frames.)

This is problematic because it causes the code to access
data beyond the end of the SKB and depending on the data
there will drop packets erroneously.

Correct the code to not do duplicate detection for such
frames.

I found this error while testing AP powersave, it lead
to retransmitted PS-Poll frames being dropped entirely
as the data beyond the end of the SKB was always zero.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cfg80211: Allow TDLS peer AID to be configured for VHT

VHT uses peer AID in the PARTIAL_AID field in TDLS frames. The
current design for TDLS is to first add a dummy STA entry before
completing TDLS Setup and then update information on this STA
entry based on what was received from the peer during the setup
exchange.

In theory, this could use NL80211_ATTR_STA_AID to set
the peer AID just like this is used in AP mode to set the AID
of an association station. However, existing cfg80211 validation
rules prevent this attribute from being used with set_station
operation. To avoid interoperability issues between different
kernel and user space version combinations, introduce a new
nl80211 attribute for the purpose of setting TDLS peer AID.
This attribute can be used in both the new_station and set_station
operations. It is not supposed to be allowed to change the AID
value during the lifetime of the STA entry, but that validation
is left for drivers to do in the change_station callback.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 5e4b6f5698421d94226cc2f80eae6d613c9acef8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
Change-Id: I1d2f6d2f5a291f91858b45ad004de66a0080f1d2
CRs-fixed: 483290
[duttus@codeaurora.org: backport to 3.4-This commit includes the
changes from following commits in include/linux/nl80211.h to compile
for msm-3.4.
5de17984898c5758fc6ebe08eccea9f4b6548914 :
cfg80211: introduce critical protocol indication from user-space.]
Signed-off-by: Sunil Dutt <duttus@codeaurora.org>
cfg80211: fix VHT TDLS peer AID verification

I (Johannes) accidentally applied the first version of the patch
("Allow TDLS peer AID to be configured for VHT"). Now apply just
the changes between v1 and v2 to get the AID verification and
prefer the new attribute over the old one.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 3d124ea27ae2fc895f81725f0b4c7f3d9c733df4
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
Change-Id: I72b465fff381f7c3f6faa3731a5c43375887077c
CRs-fixed: 483290
Signed-off-by: Sunil Dutt <duttus@codeaurora.org>
cfg80211: Add AP stopped interface

AP stopped interface can be used to indicate that the AP mode has
stopped functioning, WLAN driver may have encountered errors that has
forced the driver to stop the AP mode.

When the driver is in P2P-Go mode, and when it goes thru automatic
recovery from firmware crashes, it uses this interface to notify the
userspace that the group has been deleted.

CRs-Fixed: 453060
Change-Id: Ifcd8d4f0c0b26f56a56fb8560aa474297b7521d4
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
wcnss derp.. adapted from jb_3.2.1 caf to fix errors for building prima
thanks chadouming
update prima 3.2.3.177 caf
https://www.codeaurora.org/cgit/external/wlan//prima
defconfig: Enable 802.11r