net: wireless: bcmdhd: Fix parameter to set wifi tx back off for SAR

b/17675462

Change-Id: Ic724df586dd6c7535903c1d24d14911cf9e5f9a2
Signed-off-by: lungtsai_lin <lungtsai_lin@htc.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd add RECOVERY mechanism of PCIe LinkDown

17294478 [WiFi] - Need Sub-System Restart for WiFi
17728059 APR (N6): Kernel panics at dhd_prot_process_msgtype
17721881 [WiFi] - Watchdog reset after Event HANG sent up
Signed-off-by: Ecco park <eccopark@broadcom.com>

Change-Id: I5a0157cf519e6188467922aa5d0ab57e602c3b7e

Conflicts:
	drivers/net/wireless/bcmdhd/dhd_pcie_linux.c
net: wireless: bcmdhd: add recovery logic for resumed on timeout

17755061 Wi-Fi stuck in Off position
17734434 Kernel Panic when Scanning wifi networks

Due to unknown reason of linkdown of PCIe, our DHD goes to weird stage.
Normally we should get linkdown irq of PCIe, but for some case, we don't
get any linkdown irq of PCIe.
In this case, we cannot recover PCIe registers when we turn off/on again.
To recover PCIe register properly, we should set bus->islinkdown=true for
resumed on timeout.

Change-Id: Ie135b05edb47a274cecaaa50c8e418118b7bbf89
Signed-off-by: Ecco park <eccopark@broadcom.com>
net: wireless: bcmdhd: Fixed failure to enter PS mode while roaming in suspend

b/17433072 Device on wifi(suspend) gets to a bad state and keeps drawing 400mW

Change-Id: I265312ec72f80bbcce9242eed3aa9f25bb68f4ca
Signed-off-by: Ritter Yeh <ryeh@broadcom.com>
net: wireless: bcmdhd: reduced the MAX_CNTL_TX_TIMEOUT to 1

Currently the recovery mechanism is not triggered because Wi-Fi
Framework will turn on Wi-Fi again as soon as we get resumed on
timeout for the first time.
Currently the recovery mechanism is triggered if we get resumed
on timeout two times in sequence.
In order to trigger recovery mechanism, we need to the count from 2 to 1.

b/17755061 Wi-Fi stuck in Off position

Change-Id: I86a950243c742e561c3ac8a8722bd9a760331410
Signed-off-by: Ecco park <eccopark@broadcom.com>
net: wireless: bcmdhd: change the turn off/on sequence of WLAN

1) diable pcie irq during turning off WLAN
2) clear resources during turning off WLAN

b/17755061

Change-Id: I41bb48064f5c2f68045c258dcb3ec37d6f87e42e
Signed-off-by: Ecco park <eccopark@broadcom.com>
net: wireless: bcmdhd: Fix compilation for non PCIE_FULL_DONGLE case

Change-Id: I6698e97be12b7b6ed2145420901558f756546b99
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Send DISASSOC to FW if status of wlan is connecting

b/17665436

Change-Id: I18a1f633f2019cd160cd342f39319a313637ffd6
Signed-off-by: lungtsai_lin <lungtsai_lin@htc.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Extend beacon miss time from 4 sec to 5

Change-Id: I5180abc532e438e073a24ca832fcef10199415a2
Signed-off-by: lungtsai_lin <lungtsai_lin@htc.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Fix assert condition for WLFC_PSQ_PREC_COUNT

Change-Id: I4aa95bb235b9a3f7343fe68f639fd7e9ac68e4a5
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Fix race condition during flow ring creation and deletion

b/17957931 EAPOL Tx frames are dropped by driver or firmware

Change-Id: Ib9c93867b09539bd22ad3c29b4543505104b0645
Signed-off-by: Ritter Yeh <ryeh@broadcom.com>
net: wirelss: bcmdhd fix the corner case of PCIe linkdown

1) [Issue 17755061] Wi-Fi stuck in Off position with new log, we missed the one
case for NON-IOCTL.  Sometimes we have issue for deleting flow ring.
2) For failure of WLAN-on, we don't set g_wifi_on to TRUE.  So, we don't do
anything to clear resource even through framework will call wl_android_wifi_off

Change-Id: I8078988eee3520780b1151422db88bf631a39084
Signed-off-by: Ecco park <eccopark@broadcom.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>