driver core: fix possible missing of device probe

Inside bus_add_driver(), one device might be added(device_add()) into
the bus or probed which is triggered by deferred probe
just after completing of driver_attach() and before
'klist_add_tail(&priv->knode_bus, &bus->p->klist_drivers)',
so the device won't be probed by this driver.

This patch moves the below line

	'klist_add_tail(&priv->knode_bus, &bus->p->klist_drivers)'

before driver_attach() inside bus_add_driver() to fix the
problem.

CRs-Fixed: 588802
Change-Id: I9250b399d57a89870d1df220b97fdca275e2e1a9
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 190888ac01d059e38ffe77a2291d44cafa9016fb
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
mach-msm:bus_config:fix possible missing error check

There is a possibility of msm_bus_board_get_iid returning the error.
ERROR check is required before proceeding with the msm_bus_get_fabric_device

CRs-Fixed: 588802
Change-Id: I1353ed1b2505b117b61b72600e74b5d68d0bc508
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
msm: vidc: enable pic_order_cnt_type for H264 encoding

-current implementation will result in poc_type as 0 in SPS
params (even though the poc increment value is 2 in the
encoded stream).
-So changes done to return poc_type as 2 in SPS params

Change-Id: I5a22af422b0e1591a69a0b5b868342667ee60bbf
Signed-off-by: srikarri <sridur@codeaurora.org>
Revert "Execute shader on wakeup from power collapse"

This reverts commit 28eabf6987637c6c438c461aa31ce25e0f7edcc5.

Conflicts:

	drivers/gpu/msm/adreno.c
	drivers/gpu/msm/adreno.h
	drivers/gpu/msm/adreno_a3xx.c
	drivers/gpu/msm/adreno_ringbuffer.c

Change-Id: I0a979f33d9030546d1e72b63cff88d269f63a4c7
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
wlan: Fix null pointer references found in static analysis.

Fixed potential null pointer references and
memory leaks find by static code analysis.

Change-Id: Ib13533257a23fb0801a287a256a9faa5c7ffa4f4
CRs-Fixed: 594219
wlan: Processing Deauth in eLIM_MLM_WT_ADD_STA_RSP_STATE

Currently DEAUTH is not getting processed in mlm state with
eLIM_MLM_WT_ADD_STA_RSP_STATE.

CRs-Fixed: 516813
Change-Id: I0ed779f73a5124ba06ebefad7d27046b3f46cf05
wlan: Allow sched scan start request only in dis-connected state

Support Sched scan start only in disconnected state.

Change-Id: Ief6f683b81b6b7acd4e6ffe6e186d9e45bda27c2
Crs-Fixed: 593797
Block scan during BTCOEX operations.

Framework issues BTCOEXMODE 1/2 signifying the critical period
where the WiFi has to acquire the antenna during the coex
operations with BT. Thus use the same indication to also
block off channel operations , VIZ scan.

Change-Id: I82bcbc52408fb42a6b37a4480bab0e6a7aa64be9
CRs-Fixed: 584636
wrong roam scan state (wlan_sm.c)

When the init scan command from UMAC to FW fails and at the same
time if abort is initiated by UMAC which in turn sends
Finish scan request to the FW for the scan which is not
successfully initiated by UMAC.This causes the FW to throw
assert.

Change-Id: I1d832e549329b6fdd7ae6b7e4fa98a272c983bda
CRs-fixed: 501122
wlan: Fix the race condition in RX Low resource recovery mechanism

Set the wpalPacketAvailableCB before we try to get a VOS
packet from the 'free list' and reset it if vos_pkt_get_packet()
returns a valid packet. This order is required to avoid the
following race condition:
1. The call to vos_pkt_get_packet() from wpalPacketAlloc() in
   RX_Thread determines that no more packets are available in
   the 'free list' and sets the low resource callbacks.
2. In parallel vos_pkt_return_packet() is called in MC_Thread for a
   Management frame before wpalPacketAlloc() gets a chance to set
   wpalPacketAvailableCB and since the 'low resource callbacks'
   are set the, callback function - wpalPacketRXLowResourceCB is
   executed.But as wpalPacketAvailableCB is still NULL the low
   resource recovery fails.

Change-Id: Ie1cea3c9411e314a4309efdc207f4f69953f844f
CRs-Fixed: 591906
arm: if there's no handler we need to restore sigmask, syscall or no syscall

CRs-fixed: 592079
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 7dfae72027cd8345247e675a3b27439df95fe06e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-stable.git
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
arm: new way of handling ERESTART_RESTARTBLOCK

new "syscall start" flag; handled in syscall_trace() by switching
syscall number to that of syscall_restart(2).  Restarts of that
kind (ERESTART_RESTARTBLOCK) are handled by setting that bit;
syscall number is not modified until the actual call.

CRs-fixed: 592079
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 6b5c8045ecc7e726cdaa2a9d9c8e5008050e1252
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-stable.git
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
wcnss: Add new device interface for user control messages

wcnss userspace service will use this new control interface to configure
certain parameters required by wcnss driver. This interface is required
to configure the serial number (for MAC address auto-generation),
calibrated data availability etc. These parameters were earlier written
thru module parameters from wcnss service, however that required the
wcnss userspace daemon to have the root permission.

Change-Id: I92cc7f2c63eae08b7a467b834116883027361299
CRs-Fixed: 590457
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
wlan:Revision 3.2.7.25

Revision 3.2.7.25

Change-Id: I756c3f54bced2e2eabbe51d89d388d6c858f0015
P2P: Abort ongoing scan when connection is initiated.

When DUT receives Provision Discovery request or
GO negotiation request to initiate p2p connection,
respective action frame's response will be delayed
by wpa_supplicant, if p2p scanning is in progress.
This results in multiple Provision discovery request
retries.

So, abort ongoing scan to remove delay in sending
Provision Discovery response or GO negotiation
response.

Change-Id: I8c099438925f50647aad7654d7630fefd0f399f1
CRs-Fixed: 576285
wlan: stop traffic timer during wlan driver shutdown.

While driver shutdown, traffic timer is not stopped, leading to
kernel panic while processing traffic timer handler, because of
hal context in hdd context is set to NULL, if the timer is invoked
before driver is reinitialized. So stop traffic timer in
hdd_wlan_shutdown().

Change-Id: I989f243cc29a0b9b865bde859d086262ef59e71d
CRs-Fixed: 593729
wlan: fix unsafe code after VOS_ASSERT

The WLAN module extensively uses the VOS_ASSERT macro, which either does
nothing or emits a warning (depending on conditional compilation) and
continues, i.e. it does not abort.  Use of VOS_ASSERT is unsafe in
instances where the assert performs out-of-bounds or NULL pointer
checks.
Patch takes care to bailout where ever it is unsafe to continue.

Change-Id: Ida1b72f4292f0b5d30b307b5ee43748e4af99a78
CRs-Fixed: 556307
Merge "arm: if there's no handler we need to restore sigmask, syscall or no syscall"
Merge "arm: new way of handling ERESTART_RESTARTBLOCK"
Merge "wlan: Processing Deauth in eLIM_MLM_WT_ADD_STA_RSP_STATE"