BACKPORT: Bluetooth: Store RSSI for connection

This patch adds support to store RSSI for connection when reply for
HCI_Read_RSSI is received.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 5ae76a94150c86a6e0ee84eb74e7f7e1909b8d39)
Signed-off-by: Tim Song <tengs@chromium.org>

Change-Id: I58aa3874bfc77c3435261299f195dc4843c5293c
TEST=`btmgmt conn-info <addr>` on link
BUG=chromium:382701
Reviewed-on: https://chromium-review.googlesource.com/204983
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-by: Tim Song <tengs@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Tested-by: Tim Song <tengs@chromium.org>
BACKPORT: Bluetooth: Store TX power level for connection

This patch adds support to store local TX power level for connection
when reply for HCI_Read_Transmit_Power_Level is received.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 5a134faeef82b46ff4ad244d11d8c6be41679834)
Signed-off-by: Tim Song <tengs@chromium.org>

Change-Id: Ic801cffa5c1e18e10c293ffb82d377edaf712053
TEST=`btmgmt conn-info <addr>` on link
BUG=chromium:382701
Reviewed-on: https://chromium-review.googlesource.com/204984
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-by: Tim Song <tengs@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Tested-by: Tim Song <tengs@chromium.org>
BACKPORT: Bluetooth: Add conn info lifetime parameters to debugfs

This patch adds conn_info_min_age and conn_info_max_age parameters to
debugfs which determine lifetime of connection information. Actual
lifetime will be random value between min and max age.

Default values for min and max age are 1000ms and 3000ms respectively.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 31ad169148df2252a774c73c504aff43bfa4b656)
Signed-off-by: Tim Song <tengs@chromium.org>

Conflicts:
	include/net/bluetooth/hci_core.h
	net/bluetooth/hci_core.c

Change-Id: If94024c2b19e2044e33b7c6f8bd307125bb2249e
TEST=`btmgmt conn-info <addr>` on link
BUG=chromium:382701
Reviewed-on: https://chromium-review.googlesource.com/204985
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-by: Tim Song <tengs@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Tested-by: Tim Song <tengs@chromium.org>
BACKPORT: Bluetooth: Add support to get connection information

This patch adds support for Get Connection Information mgmt command
which can be used to query for information about connection, i.e. RSSI
and local TX power level.

In general values cached in hci_conn are returned as long as they are
considered valid, i.e. do not exceed age limit set in hdev. This limit
is calculated as random value between min/max values to avoid client
trying to guess when to poll for updated information.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit dd9838087b8c2b45c7976e46290749732d7af9d5)
Signed-off-by: Tim Song <tengs@chromium.org>

Change-Id: I5eb0ae49c8ee30a87724c542417bcbd11946955a
TEST=`btmgmt conn-info <addr>` on link
BUG=chromium:382701
Reviewed-on: https://chromium-review.googlesource.com/204986
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-by: Tim Song <tengs@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Tested-by: Tim Song <tengs@chromium.org>
BACKPORT: Bluetooth: Avoid polling TX power for LE links

TX power for LE links is immutable thus we do not need to query for it
if already have value.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit f7faab0c9d47f7d3fb25db42eff08497131ec8ba)
Signed-off-by: Tim Song <tengs@chromium.org>

Change-Id: I78f0481f7798b0ceb1eb5d1c578e3434aac0736c
TEST=`btmgmt conn-info <addr>` on link
BUG=chromium:382701
Reviewed-on: https://chromium-review.googlesource.com/204987
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-by: Tim Song <tengs@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Tested-by: Tim Song <tengs@chromium.org>
BACKPORT: Bluetooth: Store max TX power level for connection

This patch adds support to store local maximum TX power level for
connection when reply for HCI_Read_Transmit_Power_Level is received.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit d0455ed996df84fd2670a655fe13ab72f8264765)
Signed-off-by: Tim Song <tengs@chromium.org>

Change-Id: Iabc33d92acf6939cd60b96346b3d3ebee643ad7e
TEST=`btmgmt conn-info <addr>` on link
BUG=chromium:382701
Reviewed-on: https://chromium-review.googlesource.com/204988
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-by: Tim Song <tengs@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Tested-by: Tim Song <tengs@chromium.org>
BACKPORT: Bluetooth: Add support for max_tx_power in Get Conn Info

This patch adds support for max_tx_power in Get Connection Information
request. Value is read only once for given connection and then always
returned in response as parameter.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit eed5daf318cf579f06c3e1eb47d014c35c84e3a3)
Signed-off-by: Tim Song <tengs@chromium.org>

Change-Id: I2816692ab9feffbcc975a00742aaf883100dda1b
TEST=`btmgmt conn-info <addr>` on link
BUG=chromium:382701
Reviewed-on: https://chromium-review.googlesource.com/204989
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-by: Tim Song <tengs@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Tested-by: Tim Song <tengs@chromium.org>
CHROMIUM: mwifiex: restart rxreorder timer correctly

During 11n RX reordering, if there is a hole in RX table,
driver will not send packets to kernel until the rxreorder
timer expires or the table is full.
However, currently driver always restarts rxreorder timer when
receiving a packet, which causes the timer hardly to expire.
So while connected with to 11n AP in a busy environment,
ping packets may get blocked for about 30 seconds.

This patch fixes this timer restarting by ensuring rxreorder timer
would only be restarted either timer is not set or start_win
has changed.

BUG=chrome-os-partner:33058
TEST=Connect STA with an 11N AP in busy environment, the first
ping can be back in a few seconds.

Change-Id: I62ba84f63701db832d5fb675af00a10f565399a1
Signed-off-by: Chin-Ran Lo <crlo@marvell.com>
Signed-off-by: Plus Chen <pchen@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Reviewed-on: https://chromium-review.googlesource.com/226371
Reviewed-by: Paul Stewart <pstew@chromium.org>
Merge branch 'chromeos-3.8' of https://chromium.googlesource.com/chromiumos/third_party/kernel into chromeos-3.8
Merge branch 'chromeos-3.8' of github.com:singulared/chromebook-kernel into chromeos-3.8