net-fixes: flow_dissector: prevent an infinite loop (CVE-2013-4348)

Jason Wang found that a malicious packet could make skb_flow_dissect()
loop forever. We must check that IP header has a valid ihl to avoid
this loop. It involves IPIP encapsulation and ihl = 0 to trigger.

Given this bug is critical, I cooked a patch before having
a fix in upstream kernel.

Tested:

 Compiled/booted
 Ran some tests on bnx2x and explicitely disabled hardware provided rxhash
 ethtool -K eth1 rxhash off
 ethtool -K eth2 rxhash off

Google-Bug-Id: 11465355
Effort: net-fixes
Change-Id: I813e4dc48cecb05f8edfa218304e1f13fd764323
net: wireless: bcmdhd: reduced the wakelock time of RX packet

	Reduce time : 1secs -> 500ms
	Problem : [Issue 11512235] 34% battery eaten overnight
		  [Issue 11374623] OS + Wifi used 41% of battery,
		  wlan_rx_wake
Signed-off-by: Ecco Park <eccopark@broadcom.com>

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	drivers/net/wireless/bcmdhd/dhd.h

Conflicts:
	drivers/net/wireless/bcmdhd/Makefile
	drivers/net/wireless/bcmdhd/dhd.h

Change-Id: I7a169e332895321c21692865b77475a91cb388e0
net: wireless: bcmdhd: cancel current PNO if connection will happen

	Issue : Manta: Lack of WLS causes PNO problem
	Problem : we found that race condition happens
		between connection and PNO sometimes.
		Connection is failed due to this race condition.
	Solution: we need to cancel PNO explicitly if the connection
	request start in DHD driver.
	Bug : 11174374
Signed-off-by: Ecco Park <eccopark@broadcom.com>

Change-Id: I7bf81d127901a74e9f47d6cc4ee7b265c6936dc3
Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	drivers/net/wireless/bcmdhd/wl_cfg80211.c

Conflicts:
	drivers/net/wireless/bcmdhd/dhd_pno.c
	drivers/net/wireless/bcmdhd/wl_cfg80211.c
net: wireless: bcmdhd: Change DTIM skip policy in suspend

	issue : WiFi continuously disconnects
	Root cause :
	Sometimes we got link down event due to beacon
	lost when device goes to suspend.
	This problem sometimes happens in case that DTIM is 3 and beacon
	100ms because we wake up on 900ms (100ms * 3 * 3) during
	suspend.
	This value(900ms) is too big to STA for sync up with AP time.
	This causes STA out of sync for time with the AP.
	Eventually STA got lost of beacon during long time (4secs).

	Solution :
	If the total dtim skip interval (beacon_interval *
	DTIM * 3) is greater than 300ms, we will not extend DTIM to DTIM
	* 3.
	Instead of that, we will use original value (DTIM) for wake up
	in suspend.
	Bug : 1343127 WiFi continuously disconnects

Signed-off-by: Ecco Park <eccopark@broadcom.com>

Change-Id: I6d89bd1c56127befe4d9606869396ee25b7911ef
Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	drivers/net/wireless/bcmdhd/dhd.h

Conflicts:
	drivers/net/wireless/bcmdhd/dhd.h
	drivers/net/wireless/bcmdhd/dhd_common.c
net: wireless: bcmdhd: Set MAX_DTIM_ALLOWED_INTERVAL to 600

Change-Id: Ie4d9cac1e0828651a142d64762b251537431ea99
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Enable IPv6 RA filter feature

1) We will block IPv6 Router Advertisement multicast packet in suspend mode to save power on device.

Bug: 11638281
Signed-off-by: Ecco Park <eccopark@broadcom.com>

Conflicts:
	drivers/net/wireless/bcmdhd/dhd_linux.c

Change-Id: Ie6e2c02d8cd04af2ce000eef7eaa196f5f93eedc
net: wireless: bcmdhd: enable TDLS_auto_mode

	Requirement :
	1. enable auto mode for SETUP request
	2. disable auto mode for TEARDOWN request
	bug : 11632025 TDLS hybrid mode support

Change-Id: Idc0cb60e65a45bb32b8beb2bb3daf72c9112eab6
Signed-off-by: Ecco Park <eccopark@broadcom.com>
Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	drivers/net/wireless/bcmdhd/wl_cfg80211.c

Conflicts:
	drivers/net/wireless/bcmdhd/dhd.h
	drivers/net/wireless/bcmdhd/dhd_linux.c
	drivers/net/wireless/bcmdhd/wl_cfg80211.c
net: wireless: bcmdhd: Change the parameter for TDLS

	1) tuned the parameter for TDLS connection to transit between AP
	and TDLS smoothly.
	2) tdls_rssi_high : -70 dbm -> -60 dbm (for setup)
	   tdls_rssi_low : -80 dbm -> -70dbm (for teardown)
	bug : 11632025
Signed-off-by: Ecco Park <eccopark@broadcom.com>

Conflicts:
	drivers/net/wireless/bcmdhd/Makefile
	drivers/net/wireless/bcmdhd/dhd_linux.c

Change-Id: Ib309565305636bed8c611b2eb9d55c56ca44fc46