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>
Merge remote-tracking branch 'common/bcmdhd-3.10' into khaon
f2fs:sync with revision branch

squashed the following commits:

f2fs: fix possible data corruption in f2fs_write_begin()
f2fs: use current_sit_addr to replace the open code
f2fs: rename f2fs_set/clear_bit to f2fs_test_and_set/clear_bit
f2fs: set raw_super default to NULL to avoid compile warning
f2fs: introduce f2fs_change_bit to simplify the change bit logic
f2fs: remove the redundant function cond_clear_inode_flag
f2fs: remove the seems unneeded argument 'type' from __get_victim
f2fs: avoid returning uninitialized value to userspace from f2fs_trim_fs()
f2fs: declare f2fs_convert_inline_dir as a static function
f2fs: use kmap_atomic instead of kmap
f2fs: reuse make_empty_dir code for inline_dentry
f2fs: introduce f2fs_dentry_ptr structure for code clean-up
f2fs: should not truncate any inline_dentry
f2fs: reuse core function in f2fs_readdir for inline_dentry
f2fs: fix counting inline_data inode numbers
f2fs: add stat info for inline_dentry inodes
f2fs: avoid deadlock on init_inode_metadata
f2fs: fix to wait correct block type
f2fs: reuse find_in_block code for find_in_inline_dir
f2fs: reuse room_for_filename for inline dentry operation
f2fs: update f2fs documentation for inline dir support
f2fs: enable inline dir handling
f2fs: add key function to handle inline dir
f2fs: export dir operations for inline dir
f2fs: add a new mount option for inline dir
f2fs: add infra struct and helper for inline dir
f2fs: avoid infinite loop at cp_error
f2fs: avoid build warning
f2fs: fix to call f2fs_unlock_op
f2fs: avoid to allocate when inline_data was written
f2fs: use highmem for directory pages
f2fs: fix race conditon on truncation with inline_data
f2fs: should truncate any allocated block for inline_data write
f2fs: invalidate inmemory page
f2fs: do not make dirty any inmemory pages