Commit Graph

258 Commits

Author SHA1 Message Date
Caesar Wang
cd8c778456 net: rfkill: fixes the warning with gcc-7.2 build
when used the arm-linux-gnueabihf-gcc-7.2.1, had the below
warning information:
net/rfkill/rfkill-bt.c:711:5: warning: this ‘if’ clause does not
guard... [-Wmisleading-indentation] error, forbidden warning

Change-Id: I7834078bb731e1115f6e8328a56158b0d9f2991e
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-12-14 10:06:09 +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
Tao Huang
f5fe2b71a5 rk: rm include/linux/rockchip/common.h
Change-Id: I94147f5517a0bb83c677b5d9005c590e14d58762
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-17 14:55:40 +08:00
Tao Huang
e85d7dbaa0 rk: rm include/linux/rockchip/iomap.h
Change-Id: If3323fba5bfd820e526db5f863d7ba05b56672d5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-16 10:15:02 +08:00
Alex Zhao
5fda03d4a9 net: rfkill: rockchip: add vbat_gpio to control the wifi power supply
Change-Id: I4746fd5c46c5e1a7df2bb18f80f5a8efee20605f
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-10-17 11:05:46 +08:00
Alex Zhao
a7e71a03cf net: wireless: rockchip_wlan: ap6255: fix irq abnormal.
the dmesg log is like:
[11244.133855] Call trace:
[11244.133871] Exception stack(0xffffffc075cdf820 to 0xffffffc075cdf950)
[11244.133885] f820: ffffffc07b7d6040 0000008000000000 000000000169f000 ffffff80089174c4
[11244.133899] f840: 00000000804001c5 ffffff800940b1e0 0000000000000000 ffffff80091ec000
[11244.133913] f860: 0000000000000040 ffffff8008bf7000 0000000000000140 ffffff80091ec000
[11244.133924] f880: ffffff800938a830 cb88537fdc8ba653 ffffffc075cdf8e0 ffffff80080f28ec
[11244.133935] f8a0: ffffffc075cdf8b0 ffffff80080eabf0 ffffffc075cdf8e0 ffffff80080f29f8
[11244.133949] f8c0: ffffffc075cdf8e0 ffffff80080f2a28 ffffff800938a830 cb88537fdc8ba653
[11244.133963] f8e0: ffffffc07b41e400 0000000000000000 0000000000000000 0000000086098608
[11244.133975] f900: 0000000000000000 0000000000000000 00000000fffffffa ffffffc07b050580
[11244.133988] f920: ffffff80082fb318 7f7f7f7f7f7f7f7f 722d6367636c6261 7f7f7f7f7f7f7f7f
[11244.133998] f940: 0101010101010101 0000000000000010
[11244.134024] [<ffffff80089174c4>] clk_core_disable+0x18/0x18c
[11244.134039] [<ffffff80089178f0>] clk_disable+0x2c/0x40
[11244.134064] [<ffffff80083ab5a4>] rockchip_irq_gc_mask_set_bit+0x20/0x2c
[11244.134086] [<ffffff80080f7788>] irq_shutdown+0x4c/0x68
[11244.134098] [<ffffff80080f556c>] __free_irq+0x100/0x20c
[11244.134109] [<ffffff80080f5708>] free_irq+0x48/0x58
[11244.134129] [<ffffff80085c274c>] bcmsdh_oob_intr_unregister+0x8c/0xa0
[11244.134143] [<ffffff80085d1184>] dhd_bus_devreset+0x84/0x2c4
[11244.134166] [<ffffff80085a1754>] dhd_net_bus_devreset+0xc4/0x104
[11244.134190] [<ffffff80085b5aec>] wl_android_wifi_off+0xb8/0x10c
[11244.134205] [<ffffff80085a5560>] dhd_stop+0x6c/0x1d0
[11244.134227] [<ffffff80089bdb14>] __dev_close_many+0x9c/0xc0
[11244.134237] [<ffffff80089bdc5c>] __dev_close+0x38/0x68
[11244.134253] [<ffffff80089c6170>] __dev_change_flags+0xa8/0x140
[11244.134264] [<ffffff80089c6228>] dev_change_flags+0x20/0x5c
[11244.134290] [<ffffff8008a621a0>] devinet_ioctl+0x29c/0x60c
[11244.134304] [<ffffff8008a63a70>] inet_ioctl+0xc0/0xec
[11244.134327] [<ffffff80089a50f4>] sock_do_ioctl+0x30/0x5c
[11244.134341] [<ffffff80089a63c0>] sock_ioctl+0x2d8/0x314
[11244.134365] [<ffffff80081c6fb8>] do_vfs_ioctl+0x5e4/0x720
[11244.134377] [<ffffff80081c7154>] SyS_ioctl+0x60/0x88
[11244.134400] [<ffffff8008082930>] el0_svc_naked+0x24/0x28

Change-Id: I93cffbf170e96ccb71da53123f61c78f0ffdc98a
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-09-20 11:30:35 +08:00
zzc
9b18f3c7d7 net: rfkill-wlan: fix read wifi mac address failed
Change-Id: I4eea5e32a063bca45671c8a70d48b26bb2e7bd44
Signed-off-by: zzc <zzc@rock-chips.com>
2017-08-03 14:45:58 +08:00
zzc
602539cfc9 net: wireless: rockchip_wlan: add rtl8723ds support
update rtl8723ds wifi driver to version v5.1.1.5_20523.20161209_BTCOEX20161208-1212

Change-Id: Ifd44ce917d1fcb47696b893f2293ed932952bdef
Signed-off-by: zzc <zzc@rock-chips.com>
2017-08-01 17:13:14 +08:00
huweiguo
e0436fde65 net: wireless: rockchip_wlan: add rtl8189fs support
update rtl8189fs wifi driver to version v4.3.24.8_22657.20170607

Change-Id: Ia8154d438b8d17eb334ccac0bd366f19d7b0f785
Signed-off-by: huweiguo <hwg@rock-chips.com>
2017-06-22 18:41:34 +08:00
Huang, Tao
ad2fc3b29a Merge tag 'lsk-v4.4-17.05-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 17.05 v4.4-android

* tag 'lsk-v4.4-17.05-android': (266 commits)
  BACKPORT: mm/slab: clean up DEBUG_PAGEALLOC processing code
  Linux 4.4.70
  UPSTREAM: arm64: hibernate: Support DEBUG_PAGEALLOC
  BACKPORT: arm64: vmlinux.ld: Add mmuoff data sections and move mmuoff text into idmap
  BACKPORT: arm64: Create sections.h
  ANDROID: uid_sys_stats: defer io stats calulation for dead tasks
  ANDROID: AVB: Fix linter errors.
  ANDROID: AVB: Fix invalidate_vbmeta_submit().
  drivers: char: mem: Check for address space wraparound with mmap()
  nfsd: encoders mustn't use unitialized values in error cases
  drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2
  PCI: Freeze PME scan before suspending devices
  PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
  tracing/kprobes: Enforce kprobes teardown after testing
  osf_wait4(): fix infoleak
  genirq: Fix chained interrupt data ordering
  uwb: fix device quirk on big-endian hosts
  metag/uaccess: Check access_ok in strncpy_from_user
  metag/uaccess: Fix access_ok()
  iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings
  ...
2017-06-07 10:03:03 +08:00
Arnd Bergmann
48d735173e ANDROID: rfkill: fix unused function warning
As reported by kernelci, we get a harmless warning in this driver
when CONFIG_PM is disabled:

net/rfkill/core.c:810:12: warning: 'rfkill_resume' defined but not used [-Wunused-function]
net/rfkill/core.c:800:12: warning: 'rfkill_suspend' defined but not used [-Wunused-function]

This marks the functions as __maybe_unused to remove the #ifdef, and uses
a conditional reference to the pm operations instead, which will work
in any combination.

The patch is needed for both android-common-4.9 and 4.4.

Link: https://kernelci.org/build/id/59117c2f59b5147b06b12d54/logs/
Fixes: de6f7210e9 ("ANDROID: rfkill: Introduce CONFIG_RFKILL_PM and use instead of CONFIG_PM to power down")
Cc: Nick Pelly <npelly@google.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-05-25 16:37:25 +05:30
zzc
d7db16868d net: wireless: rockchip_wlan: add rtl8723cs support
update rtl8723cs wifi driver to version v5.2.1_21569.20170329_COEX20170214-1500

Change-Id: Iee0c342b4fb44a30be0004a2dcee40dea5e67269
Signed-off-by: zzc <zzc@rock-chips.com>
2017-04-06 12:01:56 +08:00
huweiguo
b58f60a9e8 net: rfkill-wlan: prior to use wifi addr store in vendor storage
Change-Id: I32ef43e1f47ee658675b26d54fa834ae9362382f
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-12-23 18:06:32 +08:00
Xu Xuehui
c75676bb6f bluetooth: rfkill-bt: enalbe 32K for ap6356
Change-Id: I71a14f38ab1d46bbf3bfc991140a20d8c6a27eec
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
2016-08-24 15:49:25 +08:00
xiaoyao
a7352aa663 wifi: power save: turn off the reset pin when wifi is closed
Change-Id: I06b188d9a67319d2508f016595e73b2f1d97fa99
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-07-27 20:20:39 +08:00
Huang, Tao
927b5a2bd7 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (477 commits)
  arm64: vdso: Mark vDSO code as read-only
  ARM/vdso: Mark the vDSO code read-only after init
  x86/vdso: Mark the vDSO code read-only after init
  lkdtm: Verify that '__ro_after_init' works correctly
  arch: Introduce post-init read-only memory
  x86/mm: Always enable CONFIG_DEBUG_RODATA and remove the Kconfig option
  mm/init: Add 'rodata=off' boot cmdline parameter to disable read-only kernel mappings
  asm-generic: Consolidate mark_rodata_ro()
  Linux 4.4.6
  ld-version: Fix awk regex compile failure
  target: Drop incorrect ABORT_TASK put for completed commands
  block: don't optimize for non-cloned bio in bio_get_last_bvec()
  MIPS: smp.c: Fix uninitialised temp_foreign_map
  MIPS: Fix build error when SMP is used without GIC
  ovl: fix getcwd() failure after unsuccessful rmdir
  ovl: copy new uid/gid into overlayfs runtime inode
  userfaultfd: don't block on the last VM updates at exit time
  powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages
  powerpc/powernv: Add a kmsg_dumper that flushes console output on panic
  powerpc: Fix dedotify for binutils >= 2.26
  ...
2016-03-24 15:45:58 +08:00
huweiguo
f99458ca37 net: rfkill-bt: auto compatible for uart rts control for all uart bt chip
Change-Id: I9b4d6614160285754ee86c427e8918296b92ddbd
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-03-15 19:38:01 +08:00
Alex Shi
fa6e6c7406 Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Conflicts solution:
	keep 'KBUILD_CFLAGS += -fno-pic'
	in arch/arm64/Makefile
2016-03-14 15:32:21 +08:00
xiaoyao
e1ba522e71 net: rkwifi: initialize code to support rkwifi
Change-Id: Id8ad92690bb1565ecae45ecf1f9edba71292dfc0
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-03-09 11:57:39 +08:00
Johannes Berg
33bf18e4aa rfkill: fix rfkill_fop_read wait_event usage
commit 6736fde967 upstream.

The code within wait_event_interruptible() is called with
!TASK_RUNNING, so mustn't call any functions that can sleep,
like mutex_lock().

Since we re-check the list_empty() in a loop after the wait,
it's safe to simply use list_empty() without locking.

This bug has existed forever, but was only discovered now
because all userspace implementations, including the default
'rfkill' tool, use poll() or select() to get a readable fd
before attempting to read.

Fixes: c64fb01627 ("rfkill: create useful userspace interface")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 15:07:26 -08:00
xiaoyao
68874647f2 net: rfkill: fixed "WARNING: invalid free of devm_ allocated data"
Change-Id: I3c84a08e9d62d6f16e4f162708584f7fd716066b
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-02-26 16:29:29 +08:00
Huang, Tao
5f478558d4 Merge branch 'android-4.4'
* android-4.4: (475 commits)
  android: base-cfg: Add CONFIG_IP_MULTICAST
  android: recommended.cfg: enable taskstats
  ANDROID: android: base-cfg: disable CONFIG_SYSVIPC
  android: configs: base: enable configfs gadget functions
  android: add CONFIG_DEBUG_RODATA to recommended config
  android: configs: remove CONFIG_BATTERY_ANDROID=y
  android: configs: base: enable IPV6
  android: configs: Enable SELinux and its dependencies.
  android: base-cfg: disable ALARM_DEV
  android: base-cfg: turn off /dev/mem and /dev/kmem
  android: base-cfg: enable ARMV8_DEPRECATED and subfeatures
  android: base-cfg: enforce the needed XFRM_MODE_TUNNEL (for VPN)
  android: base-cfg: disable LOGGER
  android: base-cfg: enable DM_VERITY (used for secureboot)
  android: configs: add systrace support to recommended configs
  android: configs: update 3.10 options
  android: configs: Add CONFIG_NETFILTER_XT_TARGET_IDLETIMER
  android: configs: add IPV6 ROUTE INFO
  android: configs: add TIMER_STATS back, helps with sysrq t.
  android: configs: Add HIDRAW to recommended set
  ...

Change-Id: I4580a461d0e2845c6aa430861174c83bb6120bb4
2016-02-18 15:18:27 +08:00
Nick Pelly
c805cbb1cc rfkill: Introduce CONFIG_RFKILL_PM and use instead of CONFIG_PM to power down
Some platforms do not want to power down rfkill devices on suspend.

Change-Id: I62a11630521c636d54a4a02ab9037a43435925f5
Signed-off-by: Nick Pelly <npelly@google.com>
2016-02-16 13:51:46 -08:00
Huang, Tao
44f48d3af9 Merge tag 'v4.4-rc6'
Linux 4.4-rc6
2015-12-21 14:26:23 +08:00
Johannes Berg
b7bb110008 rfkill: copy the name into the rfkill struct
Some users of rfkill, like NFC and cfg80211, use a dynamic name when
allocating rfkill, in those cases dev_name(). Therefore, the pointer
passed to rfkill_alloc() might not be valid forever, I specifically
found the case that the rfkill name was quite obviously an invalid
pointer (or at least garbage) when the wiphy had been renamed.

Fix this by making a copy of the rfkill name in rfkill_alloc().

Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-10 10:37:51 +01:00
Huang, Tao
bbf44583ac Merge branch 'torvalds/master'
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>

Conflicts:
	arch/arm/include/asm/arm-cci.h
	drivers/android/binder.c
	drivers/android/binder_trace.h
	drivers/block/zram/Kconfig
	drivers/net/wireless/rockchip_wlan/esp8089/esp_premalloc/version.h
	include/kvm/arm_arch_timer.h
	include/linux/pl320-ipc.h
	include/linux/zsmalloc.h
	include/uapi/linux/android/binder.h
2015-11-11 19:52:00 +08:00
Huang, Tao
91e14b294f rk: revert to v3.10 2015-11-11 15:57:28 +08:00
Huang, Tao
240e7f3ebf rk: temp revert rk change 2015-11-11 15:54:30 +08:00
João Paulo Rechi Vita
4c0778933a rfkill: Copy "all" global state to other types
When switching the state of all RFKill switches of type all we need to
replicate the RFKILL_TYPE_ALL global state to all the other types global
state, so it is used to initialize persistent RFKill switches on
register.

Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-09-04 14:26:56 +02:00
David S. Miller
0aa65cc0c2 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says:

====================
pull request: bluetooth-next 2015-08-16

Here's what's likely the last bluetooth-next pull request for 4.3:

 - 6lowpan/802.15.4 refactoring, cleanups & fixes
 - Document 6lowpan netdev usage in Documentation/networking/6lowpan.txt
 - Support for UART based QCA Bluetooth controllers
 - Power management support for Broeadcom Bluetooth controllers
 - Change LE connection initiation to always use passive scanning first
 - Support for new Silicon Wave USB ID

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-17 15:41:21 -07:00
Geert Uytterhoeven
36890997b0 rfkill: Allow compile test of GPIO consumers if !GPIOLIB
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
appropriate.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-08-13 10:48:52 +02:00
Frederic Danis
9e6080936c net: rfkill: gpio: Remove BCM2E39 support
Power management support for BCM2E39 is now performed in Bluetooth
BCM UART driver.

Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2015-08-11 21:26:27 +02:00
hwg
361c76b08d rfkill-wlan.c: solve mac addr all zero error, cause can't connect ap problem 2015-06-03 09:28:46 +08:00
hwg
94dfc90f19 rfkill-wlan, solve rockchip_wifi_mac_addr error 2015-06-01 15:41:27 +08:00
Uwe Kleine-König
f7959e9c73 net: rfkill: gpio: make better use of gpiod API
Since 39b2bbe3d7 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.

Furthermore there is devm_gpiod_get_optional which is designed to get
optional gpios.

Simplify driver accordingly.

Note this makes error checking more strict because only -ENOENT is
ignored when searching for the GPIOs which is good.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-05-29 13:13:45 +02:00
hwg
f2c6301f10 rfkill-wlan: skip can't find rockchip,grf property error in none 3368 platform 2015-05-22 09:52:18 +08:00
Lars-Peter Clausen
28f297a7af net: rfkill: Switch to PM ops
Use dev_pm_ops instead of the legacy suspend/resume callbacks for the
rfkill class suspend and resume operations.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-05-20 15:00:00 +02:00
Huang, Tao
61ef8d7311 rfkill-bt: fix compilation warning
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2015-05-04 21:03:48 +08:00
hwg
1879153799 wifi: support random mac address and save to file, solve compile warning 2015-04-20 16:23:36 +08:00
hwg
f37e3b555c wifi: support random mac address and save to file 2015-04-20 16:23:28 +08:00
Huang, Tao
05b29f94a4 Merge branch develop-3.10 2015-03-17 15:16:39 +08:00
hwg
c859dedc50 wifi: support ap6212 ap6354 2015-03-10 16:23:18 +08:00
hwg
2c70deaed9 rfkill-wlan.c use CONFIG_MFD_SYSCON to compatible rk3368 and rk3288 2015-03-04 09:56:25 +08:00
hwg
69ec730f70 support different wifi bt chip auto compatible
like auto recognize rtl8188eu, ap6210, esp8089 in android

Conflicts:
	drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/Makefile
	net/rfkill/rfkill-wlan.c
2015-03-04 09:55:21 +08:00
hwg
fc81f4bf58 rfkill-wlan.c use CONFIG_MFD_SYSCON to compatible rk3368 and rk3288 2015-03-03 17:57:20 +08:00
hwg
d65aa5b926 rfkill-wlan.c: support rk3368
Conflicts:
	net/rfkill/rfkill-wlan.c
2015-03-03 17:57:19 +08:00
hwg
7e92f35bdf support different wifi bt chip auto compatible
like auto recognize rtl8188eu, ap6210, esp8089 in android
2015-02-28 14:05:32 +08:00
hwg
6589e9111e rfkill-wlan.c: support rk3368 2015-02-12 15:22:38 +08:00
Huang, Tao
220ae60186 Merge branch develop-3.10 into develop-3.10-next
Conflicts:
	drivers/clk/rockchip/clk-ops.h
	drivers/video/rockchip/hdmi/chips/rk3288/rk3288_hdmi.c
	drivers/video/rockchip/rk_fb.c
2015-02-10 16:43:50 +08:00
hwg
14529fd551 rfkill-wlan.c: solve null point panic when wifi_chip_type is not define in dts 2015-02-05 10:52:39 +08:00