WLAN - mac80211: Initial contribution

Initial contribution for TI's MAC80211 based WLAN solution.

Signed-off-by: Vishal Mahaveer <a0271468@ti.com>

Patch Set 2: Fixed formating errors.  No other changes made.
Signed-off-by: Jean Johnson <a0271255@ti.com>
Patch Set 3: Fixed more formating errors.  No other changes made.
Signed-off-by: Jean Johnson <a0271255@ti.com>
Change-Id: I8008c697608ed1baed4a6759f5175a9c79daff75
WLAN - mac80211: Add calibrator source code

Add calibrator source code.

Signed-off-by: Vishal Mahaveer <a0271468@ti.com>

Patch set 3:  Reformatted into Google format.
Signed-off-by: Jean Johnson <a0271255@ti.com>

Patch set 4:  Fixed some reformatting errors.
Signed-off-by: Jean Johnson <a0271255@ti.com>
Change-Id: I11305c66b59744f5205956e0dfd8bed84f1695b8
WLAN - mac80211: Initial support for supplicant 8 driver commands

Initial support for supplicant version 8 private commands

Change-Id: I1f6e274a8d4a88d33f8a5182cb2ff6656940ccc1
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
WLAN - mac80211: add mode commands to supplicant lib

Adding more DRIVER commands support to wpa_supplicant_lib using nl

Change-Id: I16d7670f25e246fa8159a5d86ea96b532d857b7b
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
WLAN - mac80211: remove alias name

Remove alias name from .conf files

Change-Id: I311bf0e5b89900d66ab1d253c478972743454611
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
WLAN - mac80211: Adjust includes for libnl

Adjusting to change made in system/core/libnl_2 to move
header files to external/libnl-headers

Change-Id: I3fa87d10037b2a03d002266a6fdec3bd50890129
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
WLAN - mac80211: Add LINKSPEED and RSSI command support

Addign support for RSSI and LINKSPEED driver command in supplicant library

Change-Id: I201cb03fd9bdc3f5f5bc26aa2767a03642ba3778
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
WLAN - mac80211: Update hostapd.conf for Android hostapd

Use interface name as ctrl interface, similar to wpa_supplicant.conf

Change-Id: I2e531a6ca316ac0ab605c9d7fe98c64e01b6ec1f
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
WLAN - mac80211: Add license header

Add license header to wpa_supplicant library files.

Change-Id: Iffc8d8af32ddc2ad572f72097328e2798eaf1925
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
WLAN - mac80211: Add R4 compat package

Adding compat packahe for wl12xx based on R4 release

compat-wireless code metrics

    875533 - Total upstream lines of code being pulled
      2210 - backport code changes
      1932 - backport code additions
       278 - backport code deletions
      8203 - backport from compat module
     10413 - total backport code
    1.1893 - % of code consists of backport work

Base tree: wl12xx.git
Base tree version: v2.6.39-1249-g332ef99
compat-wireless release: compat-wireless-2011-05-19-1-g6f4e670

Change-Id: I46fe477a6a4fdb6712b7fffc98de23171e277cd6
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
WLAN - mac80211: Add ini file for 127x

Add TQS_D_1.7.ini file for 127x also to be part of build

Change-Id: I7a9a41d5a59dbff6a98509c58646bd90a310fbe1
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
WLAN - mac80211: Support for host power management

Initial support for host power management.
Claim and Release host per usage.

Change-Id: I4853bbcbdd90f33b72393623209b151bbeb39930
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
wl12xx: Fix validation of pm_runtime_get_sync return value

wl1271_sdio_power_on checks if the return value of pm_runtime_get_sync
is non-zero, and if so bails out.
However, pm_runtime_get_sync can return a positive number which does not
suggest an error has occurred. This is problematic for two reasons:

1. The function will needlessly bail out without decrementing back the
   runtime PM reference counter.
2. wl1271_power_on only checks if wl1271_power_on return value is
   negative. This means that wl1271_power_on will continue even if
   wl1271_sdio_power_on bailed out. As a result, sdio transactions will
   be initiated without properly enabling the sdio function and claiming
   the host. This could even lead to a kernel panic.

Fix this by only checking that the return value of pm_runtime_get_sync
is non-negative.

Change-Id: If737332d9cb3296534b557507e17385b4112f611
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
Revert "WLAN - mac80211: Add LINKSPEED and RSSI command support"

This reverts commit ac27358d5d907fffe7881410417bf936e6e7836c.

We have SIGNAL_POLL command now replacing DRIVER LINKSPEED and DRIVER RSSI command.
SIGNAL_POLL command is handled by nl80211 driver in supplicant.

Change-Id: I7263299b7a2611a80915e259df88715af95e5f60
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
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>
mac80211: allow action frames with unknown BSSID in GO mode

When operating as a P2P GO, we receive some P2P action frames where the
BSSID is set to the peer MAC address. Specifically, this occurs for
invitation responses. These are valid action frames and they should be
passed up.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wl12xx: use 2 spare TX blocks for GEM cipher

Add tx_spare_blocks member to the wl1271 struct
for more generic configuration of the amount
of spare TX blocks that should be used.
The default value is 1.
In case GEM cipher is used by the STA, we need
2 spare TX blocks instead of just 1.

Signed-off-by: Guy Eilam <guy@wizery.com>
wl12xx: implement set_bitrate_mask callback

Save the configured bitrate, and use the min allowed rate
as the basic rate (e.g. when scanning).

Signed-off-by: Guy Eilam <guy@wizery.com>
cfg80211: allow userspace to control supported rates in scan

Some P2P scans are not allowed to advertise
11b rates, but that is a rather special case
so instead of having that, allow userspace
to request the rate sets (per band) that are
advertised in scan probe request frames.

Since it's needed in two places now, factor
out some common code parsing a rate array.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Guy Eilam <guy@wizery.com>
mac80211: implement scan supported rates

Scanning currently uses the TX rate mask to
restrict the rate set, which is bogus. Make
it use the new set of rates from userspace.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Guy Eilam <guy@wizery.com>