net: guard tcp_set_keepalive() to tcp sockets

Its possible to use RAW sockets to get a crash in
tcp_set_keepalive() / sk_reset_timer()

Fix is to make sure socket is a SOCK_STREAM one.

Change-Id: Ieeb498a3e623cfcb54e1c865a3c0229e4acf1e87
Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
zte: don't reclaim memory from wlan

Revert ZTE change to wlan memory allocation.

Change-Id: I10dc06c1e6c2a328bee136d782886683f62ad2aa
defconfig: don't build test io scheduler

* rebuild defconfig to cleanup leftovers from commit
  bfd1851ba92edc7f0b56192005ebac4bf9ea1df6

Change-Id: I9b4b8591baf921dc80a702806e5e1370e1b8618a
prima: fix linux regulatory config

CONFIG_WLAN_FEATURE_11W should be enabled as well.

Change-Id: I5f2b3bf8d12a751908da2712e5f33c1f6ae9e0e3
zte: cleanup wifi mac driver

Change-Id: I2c31c7407f2038c781a8befbe257d37b25756423
prima: get wlan mac address from zte driver

Change-Id: I9da0cdd86f59be6a4598eecfc3c58de6f9fec998
prima: LNX.LA.3.5.1-08310-8x10.0

Change-Id: I729e230230806d890732f5860a94a4cceaf66ad6
wcnss: Sample WCNSS TOP AHB clock on WCNSS WDOG bite

Sample the wcss_top_ahb_clk and determine whether or not the clock freq
is zero when the issue occurs. This will help confirm the reason for
the system reset when Apps tries to access PMU registers for logging
purposes.

Change-Id: Ia4f34a38b7e8d237b9e5ae935d9ce339ca2d6ed1
Signed-off-by: Yue Ma <yuem@codeaurora.org>
wcnss: Retry PIL on error ready timeout

When the first PIL on wcnss fails; and when it times out on smp2p
error ready, retry PIL a couple more times. We have seen instances where
wcnss does bootup on PIL retry.

CRs-Fixed: 613487
Change-Id: I92569559cb8022c831036ec50ccf2e7475f0278c
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
msm: wcnss: Add the support to access IRIS registers using bit-bang

During cold boot, if firmware watchdog bite happens, WCNSS platform driver
will try to log Pronto registers, but in some cases it cannot access them
since there is no clock on Pronto. Add the support to log IRIS registers
using bit-bang in order to debug this issue.

CRs-fixed: 616588
Change-Id: I9315c295d33d131224605adddca26796de25e1fb
Signed-off-by: Yue Ma <yuem@codeaurora.org>
wcnss: Correct the logging sequence of certain registers

PMU_PLL_STATUS and PMU_CPU_AHB_CFG_RCGR registers should be dumped
despite common_ss being collapsed.

CRs-fixed: 615461
Change-Id: Iac7da726ad70420d29411e0c9f6bcd75c776ba50
Signed-off-by: Yue Ma <yuem@codeaurora.org>
wcnss: Add MCU debug registers to the register dump list

When firmware crashes happen, add the support to log MCU registers for
debugging purpose.

CRs-fixed: 613889
Change-Id: I8f1d4f9a26912151de2594f41ac8e09648650ff2
Signed-off-by: Yue Ma <yuem@codeaurora.org>
wcnss: Send FIQ to firmware after smp2p error ready happens

In order to get firmware dump, send FIQ when it times out on smp2p
error ready during cold boot.

Change-Id: I5edfed83dc12b00865066f2c8028d34b9857e116
CRs-Fixed: 608693
Signed-off-by: Yue Ma <yuem@codeaurora.org>
wcnss: Log debug registers when receives certain notification

If powering on a subsystem during restart fails, SSR framework will send
a "powerup failure" notification to the subsystem. Add the support that
WCNSS platform driver will register to listen the notifications and if
receives "powerup failure" notification, it will log the debug registers.

Change-Id: I0ae8a5ee96122d71c7a86711044f6b07e400b62c
Signed-off-by: Yue Ma <yuem@codeaurora.org>
wcnss: add API to check if wcnss is undergoing an SSR

Wlan driver should not read registers from wcnss or
try to communicate with the chip when it is undergoing
a subsystem-restart. Added an API with the wcnss platform
driver to check if ssr is in progress, this API will be
used by the wlan driver to protect register access and
other prohibited operations.

Change-Id: Ia0d93e774af126d84dbaabf5c36a2c90fdbd58be
CRs-Fixed: 621974
Signed-off-by: Mihir Shete <smihir@codeaurora.org>
wcnss: Unregister subsys notifier

Unregister subsys notifier for WCNSS on reaching
maximum number of retries.

Change-Id: I665398ec46b1bb3252dbbff58201c947f262bff3
CRs-Fixed: 655314
Signed-off-by: Pradeep Kumar Goudagunta <gpradeep@codeaurora.org>
wcnss: Reset IRIS card before Starting IRIS XO configuration

Set iris_reset bit of PMU CFG register to reset the IRIS
card before Starting IRIS XO configuration.

Change-Id: Id1cfd7e3e3df29919089725b2233c6f95afbbfb5
CRs-Fixed: 664642
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
wcnss: LDO change for WCNSS

Send LDO notification through SMD channel to FW which use
to update the pmic pam map.

Change-Id: I7a893570489e65d92df65728d09fd20e61d6b0fc
CRs-Fixed: 660361
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
wcnss: Fix AXIM select and CTRL select bit fields

When a WDI timeout happens, WLAN driver will initiate SSR. Dumping
these registers before performing the reset helps to debug the root
cause of the timeout. Fix AXIM select and CTRL select bit fields
of testbus register while doing the A2XB testbus register dump.

Change-Id: Ic9c7ddf2e4cee07b43cc8fe06afca04755856eeb
CRs-Fixed: 540586
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
msm: subsystem_restart: Add notification to indicate powerup failure

Currently, if powering on a subsystem during restart fails, a
kernel panic is trigerred immediately.
Instead, send a 'powerup failure' notification to the drivers
that have registered for notifications regarding the subsystem.
The drivers can then do the necessary cleanup/logging before a
kernel panic is triggered.

Change-Id: I252f221ee009436b7075c203b2a3de45e395c1b0
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>