Bluetooth:  Avoid queing power_on/off when during initial setup

Incase of SSR scenarios there is chance that user may request
for power_on/off while the ssr is going on, this need to be
avoided if the initial set up is not complete.

Change-Id: I2568a32e0ff18dba9faafe3d153852339b63841a
CRs-fixed: 432178
Signed-off-by: Bhasker Neti <bneti@codeaurora.org>
Bluetooth: Remove wake_locks added for BT idle timer

Wakelocks were used to address the issue related to timer
which was not triggered when device was put into suspend
mode.This does not impact the usecases as the link would
be put into sniff mode immediately after the device comes
out of suspend mode.

Change-Id: I648acf32c6ce9bd0d3415ac0e9dcd2250d3fb68d
Signed-off-by: Sumit Bajpai <sbajpai@codeaurora.org>
Bluetooth : Recover BT, if hardware error event is received from the SOC

If Hardware Error event is received from the SOC, then BT SOC is in bad
state. As per spec, Hardware Error event is handled in HCI. Upper layer
gets informed by HCI to reset everything. & recover BT state machine & BT
SOC.

Change-Id: Iefdf8511ad51f88ff8a24ab9e075eb8dbc0a0a67
Signed-off-by: Nitin Shivpure <nshivpur@codeaurora.org>
net: fix uninitialized variable usage

Change-Id: I66e024ce16bda11143dbbee9ca1d465aa451cf9b
Signed-off-by: Chris Fries <C.Fries@motorola.com>
(cherry picked from commit 7f35d9daca3f4eabd852a7d03a307e978f647658)

Conflicts:
	net/netfilter/xt_socket.c
Bluetooth: implement S3 Profile

To avoid BT-WiFi coexistence issues, phone will reject
EV3 packet types.Code Logic added to reject EV3 packet
type when eSCO Connection request is from Carkit/Headset,
hence headset will connect SCO with HV3 packet.Phone will
connect devices with eSCO only if 2EV3 packet type is
supported and for other SCO will be connected. This commit
is propagated from (CR)

- Original JIRA (CR) Packet optimization for BT
- Feature ID 33099

Change-Id: Icf2ea0589b4364a0a3b1ae33fb724e4fcec36255
Reviewed-on: http://gerrit.pcs.mot.com/317610
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: LieJun Tao <L.J.Tao@motorola.com>
Reviewed-by: Ashish Kumar Sharma <rjmc87@motorola.com>
Reviewed-by: Tao Hu <taohu@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Signed-off-by: Vishwanath K M <a21174@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/512986
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Viswanathan N <a21415@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
(cherry picked from commit ab0181f1846f873284bcfb430a49d253ebca9bb2)

Conflicts:
	net/bluetooth/hci_event.c
Bluetooth: SNIFF: Avoid sniff while SCO to address IOT issues

Change-Id: Ibf6e7eeb5080209db8304e19f5372a5a9ba79ee1
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
Reviewed-on: http://gerrit.pcs.mot.com/532378
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Vishwanath K M <a21174@motorola.com>
Reviewed-by: LieJun Tao <L.J.Tao@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
(cherry picked from commit 95eba67be175d46a071b2fec94670c53afeb5b6b)
because, samsung

Change-Id: I1ba9eab39d1ed6a72724c5d6696d5a0824ecf2d6
arm: don't call try_to_freeze() from do_signal()

get_signal_to_deliver() will handle it itself

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Change-Id: I41cd9112282db08f5063b03e0bd6fcc40c2e8d5a
Reviewed-on: http://gerrit.pcs.mot.com/625576
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Reviewed-by: Zhi-Ming Yuan <a14194@motorola.com>
Reviewed-by: Jiang-Li Yuan <jlyuan@motorola.com>
Reviewed-by: Christopher Fries <c.fries@motorola.com>
(cherry picked from commit f8e7ff822759c34a8f95704fb4c5a73d4816750c)

Conflicts:
	arch/arm/kernel/signal.c