Commit Graph

605371 Commits

Author SHA1 Message Date
Zhen Chen
690d49fe40 MALI: utgard: to adapt legacy GPU dts node format for mali_device befor r5p0
Just for rk3066 that has 4 PPs.

Change-Id: Ie3dfa436ee2842f6bcb8bcc7d72ff8e6cd147734
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2017-12-04 17:58:27 +08:00
Jerry Xu
9f0dddb259 ARM: dts: rk3288-popmetal: support android on rk3288 PopMetal
1. support android 7.1
2. support vga out

Change-Id: Ic2b8384566fe2f1919843616a544a6c8a516f608
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
2017-12-04 17:57:30 +08:00
Li Dongqiang
bd370f2645 ARM: dts: rk3229-gva: add audio config
Change-Id: I38dba9824034c5e3f75c1d44667d7772f1f490e9
Signed-off-by: Li Dongqiang <david.li@rock-chips.com>
2017-12-04 17:56:44 +08:00
Jeffy Chen
ea43504874 UPSTREAM: pinctrl: rockchip: add irq_enable & irq_disable ops
Currently we are trying to enable/disable the clk of irq's gpio bank when
unmask/mask irq. But the kernel's "lazy disable approach" will skip masking
irq when the irq chip doesn't support irq_disable ops.

So we may hit this case:
	irq_enable-> enable clk
	irq_disable-> noop
	irq_enable-> enable clk again
	irq_disable-> noop

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit d468289a02)

Change-Id: Ibe2f5c4ef48425300355a46312215984d8f4e1bc
2017-12-04 14:41:29 +08:00
xxh
ff766be22c bluetooth: rfkill: rockchip: ap6356s bluetooth module for RK3328 EVB board
Change-Id: I3f1e7e792b1c4d6952080b15e5bdb2902df4ddb1
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
2017-12-04 14:35:47 +08:00
Alex Zhao
8092b0b5e9 ARM/ARM64: make modules when build kernel.img
Change-Id: I79fe4d0e475bda97c2ad1e8e7f6ab454e4a7d147
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-12-04 14:26:01 +08:00
Finley Xiao
02e3d3be73 clk: rockchip: rk3066a: Make hclk_ahb2apb as critical
Change-Id: I6182e995ad18f28ac6208027af8365ed829388d8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-12-04 14:19:16 +08:00
Sugar Zhang
131e05e3ac ARM: dts: rk3066-rayeager: add support for hdmi audio
Change-Id: Idc15040a95a97584117f2f229063b7b404ab2268
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-12-04 14:17:36 +08:00
xxh
c19d52e5b7 arm64: dts: rockchip: RK3328 EVB board for bluetooth
Change-Id: Id54ef68dc939d3edf54d5cda1ee25e0014de2579
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
2017-12-04 14:13:17 +08:00
Li Dongqiang
2d4d0a7a20 ARM: dts: rk3229-at-som: update audio config
Change-Id: I4a128227ffdd6a6a6c2c34a30b4843495e28620e
Signed-off-by: Li Dongqiang <david.li@rock-chips.com>
2017-12-04 11:18:04 +08:00
Alex Zhao
26da30df33 net: wireless: rockchip_wlan: add network wakeup for 8188eu/8723cs/8723ds
Change-Id: Ib1bd1258a793932a42c0dd4809f7610f34f87fa5
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-12-04 10:41:39 +08:00
Zorro Liu
b8e487f1f6 driver: input: sensor: convert gyro sensor data to match user level
Change-Id: If23a83abc26c46ed31da11f6c2e49fdb8625e7a5
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-12-04 09:41:56 +08:00
Zorro Liu
4b5687dec0 driver: input: sensor: convert gsensor data to match user level
Change-Id: I6c32eab3aad9da36609b7fb0fd24473e0e9ae22d
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-12-04 09:41:56 +08:00
Zheng Yang
2b30312566 ARM: dts: rockchip: rk3066a: add HDMI nodes
Change-Id: Ic8d7731c445ff1ea8fd607c1f9984ce4672833b3
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-01 18:27:37 +08:00
Zheng Yang
69ef4dcd8d ARM: configs: rockchip_linux_defconfig enable RK3066 HDMI
Change-Id: I0eae8ffc45950081f1fd5dbc4d21b82be4a59693
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-01 18:26:49 +08:00
Zheng Yang
01af327c53 drm: rockchip: introduce rk3066 hdmi
Change-Id: Id354325d271d0c459c156b65cec10c68abeefdc4
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-01 18:26:40 +08:00
Xinhuang Li
cbc0075a13 input: rc: Fix clk get error
when the work clock is the same as the bus clock.drop
the "clock-names" property as the PWM uses only one
clock (the driver now needs to call devm_clk_get with NULL).

Change-Id: I7fcdd9635f81778a3dc522d99d0fc081408d6fea
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-12-01 18:22:23 +08:00
Zheng Yang
b240a5aae0 drm: bridge: dw-hdmi: add hdmi status debugfs node
Introduce status node in debugfs to show HDMI output status,
such as phy status, color and eotf.

Here is a sample log:

PHY enabled                     Mode: HDMI
Pixel Clk: 594000000Hz          TMDS Clk: 594000000Hz
Color Format: YUV422            Color Depth: 10 bit
Colorimetry: ITU.BT2020         EOTF: ST2084
x0: 0                           y0: 0
x1: 0                           y1: 0
x2: 0                           y2: 0
white x: 0                      white y: 0
max lum: 0                      min lum: 0
max cll: 0                      max fall: 0

Change-Id: I5d458b633dd3bd9aab67cc91f1695621937e58f5
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-01 15:52:17 +08:00
Jianqun Xu
647d1b5702 ARM: configs: rockchip_linux_defconfig select CMA & DMA_CMA
Change-Id: I2dfa8fe524b7625c4ef574e4ff72f68b82a7a308
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-12-01 14:42:21 +08:00
Tao Huang
c1a3c92580 arm64: rockchip_cros_defconfig: update by savedefconfig
Also remove schedfreq as default, which is dropped by linaro.

Change-Id: Ide1e05586cdbb1ddde2dcc87a3fccfdc54fe0061
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-12-01 14:29:52 +08:00
Tao Huang
afd240d168 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (510 commits)
  Linux 4.4.103
  Revert "sctp: do not peel off an assoc from one netns to another one"
  xen: xenbus driver must not accept invalid transaction ids
  s390/kbuild: enable modversions for symbols exported from asm
  ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data
  btrfs: return the actual error value from from btrfs_uuid_tree_iterate
  ASoC: rsnd: don't double free kctrl
  netfilter: nf_tables: fix oob access
  netfilter: nft_queue: use raw_smp_processor_id()
  spi: SPI_FSL_DSPI should depend on HAS_DMA
  staging: iio: cdc: fix improper return value
  iio: light: fix improper return value
  mac80211: Suppress NEW_PEER_CANDIDATE event if no room
  mac80211: Remove invalid flag operations in mesh TSF synchronization
  drm: Apply range restriction after color adjustment when allocation
  ALSA: hda - Apply ALC269_FIXUP_NO_SHUTUP on HDA_FIXUP_ACT_PROBE
  ath10k: set CTS protection VDEV param only if VDEV is up
  ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats()
  ath10k: ignore configuring the incorrect board_id
  ath10k: fix incorrect txpower set by P2P_DEVICE interface
  ...

Conflicts:
	drivers/media/v4l2-core/v4l2-ctrls.c
	kernel/sched/fair.c

Change-Id: I48152b2a0ab1f9f07e1da7823119b94f9b9e1751
2017-12-01 11:04:13 +08:00
Masahiro Yamada
7b1e4fbf3b BACKPORT: pinctrl: rockchip: remove unneeded (void *) casts in of_match_table
of_device_id::data is an opaque pointer.  No explicit cast is needed.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit cdbbd26f48)

Change-Id: I5a19310bd3c9a9756c4a7fe9d79803dd9eced387
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-12-01 10:23:21 +08:00
Zorro Liu
b5c33435dd arm64: dts: rockchip: rk3368-xikp: disabled sdmmc
we need uart2 to debug

Change-Id: I09d2acb77b0ea16f21d54a723d1718989f91a31c
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-12-01 10:22:04 +08:00
zhangyunlong
32160fa8b9 camra: rockchip: isp10: add ov13850 drivers
Change-Id: I691a0d32c40766e5d0559f704d6bad88da422f16
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2017-12-01 10:21:10 +08:00
Wu Liangqing
a0dd3dc616 drivers: rk_nand: rk vendor register default
Change-Id: I241230236d62ac76dec9961db298ebfce08765cd
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2017-12-01 10:20:49 +08:00
Alex Shi
0f646885c3 Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android 2017-12-01 01:02:04 +08:00
Alex Shi
81ab793d6d Merge tag 'v4.4.103' into linux-linaro-lsk-v4.4
This is the 4.4.103 stable release
2017-12-01 01:02:00 +08:00
Zhang Zhijie
c58e8c45ef arm64: dts: rockchip: rk3328: add firmware and optee node
Add optee node to supply OP-TEE required properties.
/optee node is supposed to be below /firmware node.

Change-Id: I5a55a8e62c741726b9c5c7cf33ca832d3cbae86b
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2017-11-30 18:50:33 +08:00
Zhang Zhijie
67e46ec537 arm64: rockchip_defconfig: enable CONFIG_TEE and CONFIG_OPTEE
Change-Id: Ib299f9b5c07484b00e21e80166548f03a5a6f4a1
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2017-11-30 18:50:32 +08:00
Greg Kroah-Hartman
08c15ad2e6 Linux 4.4.103 2017-11-30 08:37:28 +00:00
Greg Kroah-Hartman
3d7214a338 Revert "sctp: do not peel off an assoc from one netns to another one"
This reverts commit 2a0e60907e which is
commit df80cd9b28 upstream as I messed up
by applying it to the tree twice.

Reported-by: Michal Kubecek <mkubecek@suse.cz>
Cc: ChunYu Wang <chunwang@redhat.com>
Cc: Xin Long <lucien.xin@gmail.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:28 +00:00
Juergen Gross
c73eb1e0cc xen: xenbus driver must not accept invalid transaction ids
[ Upstream commit 639b08810d ]

When accessing Xenstore in a transaction the user is specifying a
transaction id which he normally obtained from Xenstore when starting
the transaction. Xenstore is validating a transaction id against all
known transaction ids of the connection the request came in. As all
requests of a domain not being the one where Xenstore lives share
one connection, validation of transaction ids of different users of
Xenstore in that domain should be done by the kernel of that domain
being the multiplexer between the Xenstore users in that domain and
Xenstore.

In order to prohibit one Xenstore user "hijacking" a transaction from
another user the xenbus driver has to verify a given transaction id
against all known transaction ids of the user before forwarding it to
Xenstore.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:28 +00:00
Heiko Carstens
eedd29f510 s390/kbuild: enable modversions for symbols exported from asm
[ Upstream commit cabab3f9f5 ]

s390 version of commit 334bb77387 ("x86/kbuild: enable modversions
for symbols exported from asm") so we get also rid of all these
warnings:

WARNING: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "memcpy" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "memmove" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "memset" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "save_fpu_regs" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "sie64a" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "sie_exit" [vmlinux] version generation failed, symbol will not be versioned.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:28 +00:00
Richard Fitzgerald
681b223986 ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data
[ Upstream commit 1cab2a84f4 ]

Protect against corrupt firmware files by ensuring that the length we
get for the data in a region actually lies within the available firmware
file data buffer.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:28 +00:00
Pan Bian
b63209c78f btrfs: return the actual error value from from btrfs_uuid_tree_iterate
[ Upstream commit 73ba39ab93 ]

In function btrfs_uuid_tree_iterate(), errno is assigned to variable ret
on errors. However, it directly returns 0. It may be better to return
ret. This patch also removes the warning, because the caller already
prints a warning.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188731
Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
[ edited subject ]
Signed-off-by: David Sterba <dsterba@suse.com>

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:28 +00:00
Colin Ian King
e88f3fb0e3 ASoC: rsnd: don't double free kctrl
[ Upstream commit 0ea617a298 ]

On an error, snd_ctl_add already free's kctrl, so calling snd_ctl_free_one
to free it again leads to a double free error.  Fix this by removing
the extraneous snd_ctl_free_one call.

Issue found using static analysis with CoverityScan, CID 1372908

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:28 +00:00
Florian Westphal
47b99a3306 netfilter: nf_tables: fix oob access
[ Upstream commit 3e38df136e ]

BUG: KASAN: slab-out-of-bounds in nf_tables_rule_destroy+0xf1/0x130 at addr ffff88006a4c35c8
Read of size 8 by task nft/1607

When we've destroyed last valid expr, nft_expr_next() returns an invalid expr.
We must not dereference it unless it passes != nft_expr_last() check.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:27 +00:00
Pablo Neira Ayuso
a1e4f6a151 netfilter: nft_queue: use raw_smp_processor_id()
[ Upstream commit c2e756ff9e ]

Using smp_processor_id() causes splats with PREEMPT_RCU:

[19379.552780] BUG: using smp_processor_id() in preemptible [00000000] code: ping/32389
[19379.552793] caller is debug_smp_processor_id+0x17/0x19
[...]
[19379.552823] Call Trace:
[19379.552832]  [<ffffffff81274e9e>] dump_stack+0x67/0x90
[19379.552837]  [<ffffffff8129a4d4>] check_preemption_disabled+0xe5/0xf5
[19379.552842]  [<ffffffff8129a4fb>] debug_smp_processor_id+0x17/0x19
[19379.552849]  [<ffffffffa07c42dd>] nft_queue_eval+0x35/0x20c [nft_queue]

No need to disable preemption since we only fetch the numeric value, so
let's use raw_smp_processor_id() instead.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:27 +00:00
Geert Uytterhoeven
85f286d6f8 spi: SPI_FSL_DSPI should depend on HAS_DMA
[ Upstream commit dadab2d4e3 ]

If NO_DMA=y:

    ERROR: "bad_dma_ops" [drivers/spi/spi-fsl-dspi.ko] undefined!

Add a dependency on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:27 +00:00
Pan Bian
8537e96e43 staging: iio: cdc: fix improper return value
[ Upstream commit 91ca1a8c58 ]

At the end of function ad7150_write_event_config(), directly returns 0.
As a result, the errors will be ignored by the callers. It may be better
to return variable "ret".

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:27 +00:00
Pan Bian
266913b390 iio: light: fix improper return value
[ Upstream commit db4e5376d0 ]

In function cm3232_reg_init(), it returns 0 even if the last call to
i2c_smbus_write_byte_data() returns a negative value (indicates error).
As a result, the return value may be inconsistent with the execution
status, and the caller of cm3232_reg_init() will not be able to detect
the error. This patch fixes the bug.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188641

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:27 +00:00
Masashi Honma
7e927748d4 mac80211: Suppress NEW_PEER_CANDIDATE event if no room
[ Upstream commit 11197d006b ]

Previously, kernel sends NEW_PEER_CANDIDATE event to user land even if
the found peer does not have any room to accept other peer. This causes
continuous connection trials.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:27 +00:00
Masashi Honma
9825826ed7 mac80211: Remove invalid flag operations in mesh TSF synchronization
[ Upstream commit 76f43b4c0a ]

mesh_sync_offset_adjust_tbtt() implements Extensible synchronization
framework ([1] 13.13.2 Extensible synchronization framework). It shall
not operate the flag "TBTT Adjusting subfield" ([1] 8.4.2.100.8 Mesh
Capability), since it is used only for MBCA ([1] 13.13.4 Mesh beacon
collision avoidance, see 13.13.4.4.3 TBTT scanning and adjustment
procedures for detail). So this patch remove the flag operations.

[1] IEEE Std 802.11 2012

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
[remove adjusting_tbtt entirely, since it's now unused]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:27 +00:00
Chris Wilson
f0d8fb7447 drm: Apply range restriction after color adjustment when allocation
[ Upstream commit 3db93756b5 ]

mm->color_adjust() compares the hole with its neighbouring nodes. They
only abutt before we restrict the hole, so we have to apply color_adjust
before we apply the range restriction.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-36-chris@chris-wilson.co.uk
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:27 +00:00
Gabriele Mazzotta
31447ebb1a ALSA: hda - Apply ALC269_FIXUP_NO_SHUTUP on HDA_FIXUP_ACT_PROBE
[ Upstream commit 972aa2c708 ]

Setting shutup when the action is HDA_FIXUP_ACT_PRE_PROBE might
not have the desired effect since it could be overridden by
another more generic shutup function. Prevent this by setting
the more specific shutup function on HDA_FIXUP_ACT_PROBE.

Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:26 +00:00
Bartosz Markowski
7e920566c3 ath10k: set CTS protection VDEV param only if VDEV is up
[ Upstream commit 7cfe0455ee ]

The cts protection vdev parameter, in new QCA9377 TF2.0 firmware,
requires bss peer to be created for the STATION vdev type.
bss peer is being allocated by the firmware after vdev_start/_up commands.
mac80211 may call the cts protection setup at any time, so the
we needs to track the situation and defer the cts configuration
to prevent firmware asserts, like below:

[00]: 0x05020001 0x000015B3 0x0099ACE2 0x00955B31
[04]: 0x0099ACE2 0x00060730 0x00000004 0x00000000
[08]: 0x0044C754 0x00412C10 0x00000000 0x00409C54
[12]: 0x00000009 0x00000000 0x00952F6C 0x00952F77
[16]: 0x00952CC4 0x00910712 0x00000000 0x00000000
[20]: 0x4099ACE2 0x0040E858 0x00421254 0x004127F4
[24]: 0x8099B9B2 0x0040E8B8 0x00000000 0xC099ACE2
[28]: 0x800B75CB 0x0040E8F8 0x00000007 0x00005008
[32]: 0x809B048A 0x0040E958 0x00000010 0x00433B10
[36]: 0x809AFBBC 0x0040E9A8 0x0042BB74 0x0042BBBC
[40]: 0x8091D252 0x0040E9C8 0x0042BBBC 0x00000001
[44]: 0x809FFA45 0x0040EA78 0x0043D3E4 0x0042C2C8
[48]: 0x809FCEF4 0x0040EA98 0x0043D3E4 0x00000001
[52]: 0x80911210 0x0040EAE8 0x00000010 0x004041D0
[56]: 0x80911154 0x0040EB28 0x00400000 0x00000000

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:26 +00:00
Christian Lamparter
ef751ca546 ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats()
[ Upstream commit 097e46d2ae ]

ath10k_wmi_tlv_op_pull_fw_stats() uses tb = ath10k_wmi_tlv_parse_alloc(...)
function, which allocates memory. If any of the three error-paths are
taken, this tb needs to be freed.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:26 +00:00
Ryan Hsu
b24769300a ath10k: ignore configuring the incorrect board_id
[ Upstream commit d2e202c06c ]

With command to get board_id from otp, in the case of following

  boot get otp board id result 0x00000000 board_id 0 chip_id 0
  boot using board name 'bus=pci,bmi-chip-id=0,bmi-board-id=0"
  ...
  failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-board-id=0 from
  ath10k/QCA6174/hw3.0/board-2.bin

The invalid board_id=0 will be used as index to search in the board-2.bin.

Ignore the case with board_id=0, as it means the otp is not carrying
the board id information.

Signed-off-by: Ryan Hsu <ryanhsu@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:26 +00:00
Ryan Hsu
64b22ee723 ath10k: fix incorrect txpower set by P2P_DEVICE interface
[ Upstream commit 88407beb1b ]

Ath10k reports the phy capability that supports P2P_DEVICE interface.

When we use the P2P supported wpa_supplicant to start connection, it'll
create two interfaces, one is wlan0 (vdev_id=0) and one is P2P_DEVICE
p2p-dev-wlan0 which is for p2p control channel (vdev_id=1).

	ath10k_pci mac vdev create 0 (add interface) type 2 subtype 0
	ath10k_add_interface: vdev_id: 0, txpower: 0, bss_power: 0
	...
	ath10k_pci mac vdev create 1 (add interface) type 2 subtype 1
	ath10k_add_interface: vdev_id: 1, txpower: 0, bss_power: 0

And the txpower in per vif bss_conf will only be set to valid tx power when
the interface is assigned with channel_ctx.

But this P2P_DEVICE interface will never be used for any connection, so
that the uninitialized bss_conf.txpower=0 is assinged to the
arvif->txpower when interface created.

Since the txpower configuration is firmware per physical interface.
So the smallest txpower of all vifs will be the one limit the tx power
of the physical device, that causing the low txpower issue on other
active interfaces.

	wlan0: Limiting TX power to 21 (24 - 3) dBm
	ath10k_pci mac vdev_id 0 txpower 21
	ath10k_mac_txpower_recalc: vdev_id: 1, txpower: 0
	ath10k_mac_txpower_recalc: vdev_id: 0, txpower: 21
	ath10k_pci mac txpower 0

This issue only happens when we use the wpa_supplicant that supports
P2P or if we use the iw tool to create the control P2P_DEVICE interface.

Signed-off-by: Ryan Hsu <ryanhsu@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:26 +00:00
Daniel Vetter
c4cf731af8 drm/armada: Fix compile fail
[ Upstream commit 7357f89954 ]

I reported the include issue for tracepoints a while ago, but nothing
seems to have happened. Now it bit us, since the drm_mm_print
conversion was broken for armada. Fix it, so I can re-enable armada
in the drm-misc build configs.

v2: Rebase just the compile fix on top of Chris' build fix.

Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Acked: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1483115932-19584-1-git-send-email-daniel.vetter@ffwll.ch
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:26 +00:00