bcm4329 wifi support

enable wireless extension and bcm4329 kernel driver

Bug 724105

Original-Change-Id: I7d5ac551bd1e3bc2c440b0cd9ef4b09fbd7c34d5
Reviewed-on: http://git-master/r/9884
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Tested-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

Rebase-Id: R394b04a7c824aff5fb92500afe3217ffc5f46ff7
WOW support in BCM driver

Making sure that Rx pkt is acknowledged and sent
to network interface by wifi driver before system
goes in suspend.

BUG ID 767438

Original-Change-Id: Ie88176ec11aa1d2fe4253d9b0472d13a4742d300
Reviewed-on: http://git-master/r/12703
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

Rebase-Id: Ra548a45038befb153207f78f373cf433fe89dccb
net: wireless: bcm4329: Increase backplane clk delay.

During suspend/resume wifi chip's power mode is changed and this
impacts chip's internal registers reading/writing. Delaying reads/
writes to wifi chip from HZ/100 to 3*HZ which gives time for chip
to settle its state.

BUG 798783

Original-Change-Id: Ie9c06c2d03fb38b6fba5acca48490d12c358e496
Reviewed-on: http://git-master/r/22150
Reviewed-by: Rahul Bansal <rbansal@nvidia.com>
Tested-by: Rahul Bansal <rbansal@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

Rebase-Id: R67e6b0385695a1044c7673190136e41dbec4a9be
net: wireless: bcm4329: Fix delayed scan list after wifi turn-on.

Initiate broadcast scan (active scan) just after
initializing with network interface.

BUG 781501

Original-Change-Id: I6c9bc7b458fff604c12ea3c94c4d4a5255b3bb91
Reviewed-on: http://git-master/r/23216
Reviewed-by: Rahul Bansal <rbansal@nvidia.com>
Tested-by: Rahul Bansal <rbansal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

Rebase-Id: R3593349369720bf76c758e4b77ec0d41726cfad6
net: wireless: bcm4329: Enable SDIO_ISR_THREAD flag.

In case of inband interrupts i.e SDIO CARD INT, two
level of thread switching takes place to process wifi
interrupts one in SDHCI and the other in Wifi driver if
"SDIO_ISR_THREAD" flag is disabled.
Enabling "SDIO_ISR_THREAD" flag will prevent deferred
MAC interrupts processing because it is preventing thread
context switching in wifi driver.

Bug 789444
Bug 787054
Bug 795460

Original-Change-Id: I4b00b5a1a3127380699c958d802e5d823078896e
Reviewed-on: http://git-master/r/24273
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rf7c499bdc13df3b0e651b726fff4b71c49c40c75
driver: wireless: removing compilation error

warning is treated as error do checking the condition
and increasing DHD_REGISTRATION_TIMEOUT

Original-Change-Id: I369eda5d629c887bee3f79f9edc8a64bf6df5aa5
Reviewed-on: http://git-master/r/16990
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Tested-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Original-Change-Id: I835479bf59524735d059b5450bc380766b933e56

Rebase-Id: R1800ef9e7dcbfe689a14d0a5d9bf9a01a5330807
net: wireless: resolve uplink udp iperf failure

makeing dhd_doflow true and changing queue size to resolve
udp iperf uplink error/warning messages mentioned below

write2 failed: Connection refused
read failed: Connection refused
[ 3] WARNING: did not receive ack of last datagram after 1 tries.

BUG 789046

Original-Change-Id: Iadea7e74bece039b4656c495c11e551f625fd4e0
Reviewed-on: http://git-master/r/21462
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Tested-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Original-Change-Id: I87ac5570785a7613eb655410ac22aaa1c5b94b5d

Rebase-Id: R0433497e222034bbdedca2cef3c54422f6424b5a
net: wireless :bcm4329: disable sdio interrupts before wifi reset

during system suspend if wifi is on but not connected, android
sets RTC alarm to wake up system after 2 mins of system suspend
to turn off wifi. during turning off wifi it was observed that
BCM4329 MAC is giving spurious sdio interrupts which was causing
lockup issue (mmc_lock) between sdio interrupt handling process
and wifi stop process, to fix this issue sdio interrupts are
disabled before giving MAC reset from host.

Bug 834444
Bug 798783
Bug 796147
Bug 797230
Bug 780047
Bug 818687

(cherry picked from commit 113676ec197fc62b7dce23dad4e081c940319846)

Original-Change-Id: I810894ded26bcfb44cff52aba16f2a5dbcba8f28
Reviewed-on: http://git-master/r/47478
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Tested-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

Rebase-Id: R89453877feceb4702ae89d0bfab90dfda1e4bbd1
net: wireless: bcm4329: Fix build with gcc-4.6.1

Add a couple -Wno-error options when building with the new toolchain;
it's stricter. These can be removed once the code is fixed not to
cause warnings (see bug 888158).

Bug 830289

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Matt Pedro <mapedro@nvidia.com>
(cherry picked from commit 4a2bbb6dc6ab70a8e562d8db4d6016c28c290ce0)

Change-Id: I9944bf4a5fac005fed5ff5d92c38c5be32ea6f55
Reviewed-on: http://git-master/r/68740
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Allen Martin <amartin@nvidia.com>
net: wireless: bcm4329: set reference to physical device

Set the parent field of the netdevice, which causes sysfs
to create a device subdirectory under the netdevice.  Without
this subdirectory the user-space NetworkManager cannot manage
the network device.

Implemented using void * to maintain current driver implementation
of segregated OS-specific implementation.

Bug 929960

Signed-off-by: Eric Brower <ebrower@nvidia.com>
Reviewed-on: http://git-master/r/77889
(cherry picked from commit 5055320be16c36557e1ab9966ff7537500ca6d4d)

Change-Id: Ia5ea298c32823f896428905a779a734140306861
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82720
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
net: wireless: bcm4329: move CSCAN enable to a Kconfig option

Move CSCAN driver compilation flag to CONFIG_BCM4329_CSCAN_ENABLE
Kconfig option; CSCAN is not supported in all userspace environments.

The driver implementation of PNO_SUPPORT has a dependency on CSCAN, so
make that option controlled by CONFIG_BCM4329_CSCAN_ENABLE.

Bug 929960

Signed-off-by: Eric Brower <ebrower@nvidia.com>
(cherry picked from commit af965bf9a82041353a322a3205574ff402c6ff05)
Reviewed-on: http://git-master/r/77890
(cherry picked from commit 2f641aa2781afc80ed496978c55fc83aa251f727)

Change-Id: Iaf9ba7c7122571c7b5c5a670e0b9330d53a8940e
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82721
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
drivers: wireless: bcm4329: set MMC_PM_KEEP_POWER on suspend

MMC_PM_KEEP_POWER should be set before each suspend/resume cycle as
mmc drivers clears MMC_PM_KEEP_POWER from pm_flags on resume.

Bug 942826

Change-Id: Ie11c661bdc3450cc4e75fa7700b96aedc69d628a
Signed-off-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-on: http://git-master/r/87703
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Tested-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
net: wireless: bcm4329: Fix GCC 4.6 warning

This module has -Werror turned on, so this was causing the build to
break on GCC 4.6:

drivers/net/wireless/bcm4329/wl_iw.c: In function 'wl_iw_set_pmksa':
drivers/net/wireless/bcm4329/wl_iw.c:5149:5: error: array subscript is above array bounds [-Werror=array-bounds]
drivers/net/wireless/bcm4329/wl_iw.c:5152:5: error: array subscript is above array bounds [-Werror=array-bounds]

It's a partial 'backport' of a change made to the bcmdhd driver:

commit 09a8dc7361d0e603d9935ec7f736fabaa2e6dc7a
net: wireless: bcmdhd: Combined P2P fix

Change-Id: Ie62ad82f884c213553772ac91eaf85e17a807503
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/88694
GVS: Gerrit_Virtual_Submit
Reviewed-by: Stephen Warren <swarren@nvidia.com>
bcm4329: add support for custom sdcc wifi slot

Needed by Huawei U8160/U8180 and possibly other devices.
bcm4329: add support for custom oob gpio number

Needed by Huawei U8160/U8180 and possibly other devices.
bcm4329: rename module to dhd.ko