aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-09-03Merge tag 'kbuild-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuildLinus Torvalds5-6/+4
Pull Kbuild updates from Masahiro Yamada: - Add -s option (strict mode) to merge_config.sh to make it fail when any symbol is redefined. - Show a warning if a different compiler is used for building external modules. - Infer --target from ARCH for CC=clang to let you cross-compile the kernel without CROSS_COMPILE. - Make the integrated assembler default (LLVM_IAS=1) for CC=clang. - Add <linux/stdarg.h> to the kernel source instead of borrowing <stdarg.h> from the compiler. - Add Nick Desaulniers as a Kbuild reviewer. - Drop stale cc-option tests. - Fix the combination of CONFIG_TRIM_UNUSED_KSYMS and CONFIG_LTO_CLANG to handle symbols in inline assembly. - Show a warning if 'FORCE' is missing for if_changed rules. - Various cleanups * tag 'kbuild-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (39 commits) kbuild: redo fake deps at include/ksym/*.h kbuild: clean up objtool_args slightly modpost: get the *.mod file path more simply checkkconfigsymbols.py: Fix the '--ignore' option kbuild: merge vmlinux_link() between ARCH=um and other architectures kbuild: do not remove 'linux' link in scripts/link-vmlinux.sh kbuild: merge vmlinux_link() between the ordinary link and Clang LTO kbuild: remove stale *.symversions kbuild: remove unused quiet_cmd_update_lto_symversions gen_compile_commands: extract compiler command from a series of commands x86: remove cc-option-yn test for -mtune= arc: replace cc-option-yn uses with cc-option s390: replace cc-option-yn uses with cc-option ia64: move core-y in arch/ia64/Makefile to arch/ia64/Kbuild sparc: move the install rule to arch/sparc/Makefile security: remove unneeded subdir-$(CONFIG_...) kbuild: sh: remove unused install script kbuild: Fix 'no symbols' warning when CONFIG_TRIM_UNUSD_KSYMS=y kbuild: Switch to 'f' variants of integrated assembler flag kbuild: Shuffle blank line to improve comment meaning ...
2021-09-01Merge tag 'media/v5.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds41-503/+1883
Pull media updates from Mauro Carvalho Chehab: - new sensor drivers: imx335, imx412, ov9282 - new IR transmitter driver: meson-ir-tx - handro driver gained support for H.264 for Rockchip VDPU2 - imx gained support for i.MX8MQ - ti-vpe has gained support for other SoC variants - lots of cleanups, fixes, board additions and doc improvements * tag 'media/v5.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (195 commits) media: venus: venc: add support for V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM control media: venus: venc: Add support for intra-refresh period media: v4l2-ctrls: Add intra-refresh period control media: docs: ext-ctrls-codec: Document cyclic intra-refresh zero control value media: venus: helper: do not set constrained parameters for UBWC media: venus: venc: Fix potential null pointer dereference on pointer fmt media: venus: hfi: fix return value check in sys_get_prop_image_version() media: tegra-cec: Handle errors of clk_prepare_enable() media: cec-pin: rename timer overrun variables media: TDA1997x: report -ENOLINK after disconnecting HDMI source media: TDA1997x: fix tda1997x_query_dv_timings() return value media: Fix cosmetic error in TDA1997x driver media: v4l2-dv-timings.c: fix wrong condition in two for-loops media: imx: add a driver for i.MX8MQ mipi csi rx phy and controller media: dt-bindings: media: document the nxp,imx8mq-mipi-csi2 receiver phy and controller media: imx: imx7_mipi_csis: convert some switch cases to the default media: imx: imx7-media-csi: Fix buffer return upon stream start failure media: imx: imx7-media-csi: Don't set PIXEL_BIT in CSICR1 media: imx: imx7-media-csi: Set TWO_8BIT_SENSOR for >= 10-bit formats media: dt-bindings: media: nxp,imx7-csi: Add i.MX8MM support ...
2021-09-01Merge tag 'tty-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/ttyLinus Torvalds3-13/+12
Pull tty / serial updates from Greg KH: "Here is the "big" set of tty/serial driver patches for 5.15-rc1 Nothing major in here at all, just some driver updates and more cleanups on old tty apis and code that needed it that includes: - tty.h cleanup of things that didn't belong in it - other tty cleanups by Jiri - driver cleanups - rs485 support added to amba-pl011 driver - dts updates - stm32 serial driver updates - other minor fixes and driver updates All have been in linux-next for a while with no reported problems" * tag 'tty-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (83 commits) tty: serial: uartlite: Use read_poll_timeout for a polling loop tty: serial: uartlite: Use constants in early_uartlite_putc tty: Fix data race between tiocsti() and flush_to_ldisc() serial: vt8500: Use of_device_get_match_data serial: tegra: Use of_device_get_match_data serial: 8250_ingenic: Use of_device_get_match_data tty: serial: linflexuart: Remove redundant check to simplify the code tty: serial: fsl_lpuart: do software reset for imx7ulp and imx8qxp tty: serial: fsl_lpuart: enable two stop bits for lpuart32 tty: serial: fsl_lpuart: fix the wrong mapbase value mxser: use semi-colons instead of commas tty: moxa: use semi-colons instead of commas tty: serial: fsl_lpuart: check dma_tx_in_progress in tx dma callback tty: replace in_irq() with in_hardirq() serial: sh-sci: fix break handling for sysrq serial: stm32: use devm_platform_get_and_ioremap_resource() serial: stm32: use the defined variable to simplify code Revert "arm pl011 serial: support multi-irq request" tty: serial: samsung: Add Exynos850 SoC data tty: serial: samsung: Fix driver data macros style ...
2021-09-01Merge tag 'staging-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds389-36881/+65749
Pull IIO and staging driver updates from Greg KH: "Here is the big set of staging and IIO driver updates for 5.15-rc1. Also included in here are the counter driver subsystem updates as the IIO drivers needed them. Lots of churn in some staging drivers, we dropped the "old" rtl8188eu driver and replaced it with a newer version of the driver that had been maintained out-of-tree by Larry with the end goal of actually being able to get this driver out of staging eventually. Despite that driver being "newer" the line count of this pull request is going up. Some drivers moved out of staging as well, which is always nice to see, that is why there are additions to the mfc and misc driver subsystems. All of these were acked by the various subsystem maintainers involved. But by far, as normal, it's coding style cleanups all over the drivers/staging/ tree in here. Full details of these changes are in the shortlog. All of these have been in linux-next for a while with no reported problems" [ Note: the r8188eu merge clashed with commit 89939e890605 ("staging: rtlwifi: use siocdevprivate") from the networking tree. When resolving the issue, I noted that the whole r8188eu rtw_android code is dead since commit ae7471cae00a ("staging: r8188eu: remove rtw_ioctl function"). End result: the merge resolution was to throw all of that away, rather than do the mindless fixup to code that isn't actually reachable - Linus ] * tag 'staging-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (551 commits) staging: vt6655: Remove filenames in files staging: r8188eu: add extra TODO entries staging: vt6656: Remove filenames in files staging: wlan-ng: fix invalid assignment warning staging: r8188eu: rename fields of struct rtl_ps staging: r8188eu: remove ODM_DynamicPrimaryCCA_DupRTS() staging: r8188eu: rename fields of struct dyn_primary_cca staging: r8188eu: rename struct field Wifi_Error_Status staging: r8188eu: Provide a TODO file for this driver staging: r8188eu: remove unneeded variable staging: r8188eu: remove unneeded conversions to bool staging: r8188eu: remove {read,write}_macreg staging: r8188eu: core: remove condition with no effect staging: r8188eu: remove ethernet.h header file staging: r8188eu: remove ip.h header file staging: r8188eu: remove if_ether.h header file staging: r8188eu: make rtw_deinit_intf_priv return void staging: r8188eu: use is_multicast_ether_addr in os_dep/recv_linux.c staging: r8188eu: use is_multicast_ether_addr in hal/rtl8188eu_xmit.c staging: r8188eu: use is_multicast_ether_addr in core/rtw_xmit.c ...
2021-09-01Merge tag 'driver-core-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds2-6/+2
Pull driver core updates from Greg KH: "Here is the big set of driver core patches for 5.15-rc1. These do change a number of different things across different subsystems, and because of that, there were 2 stable tags created that might have already come into your tree from different pulls that did the following - changed the bus remove callback to return void - sysfs iomem_get_mapping rework Other than those two things, there's only a few small things in here: - kernfs performance improvements for huge numbers of sysfs users at once - tiny api cleanups - other minor changes All of these have been in linux-next for a while with no reported problems, other than the before-mentioned merge issue" * tag 'driver-core-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (33 commits) MAINTAINERS: Add dri-devel for component.[hc] driver core: platform: Remove platform_device_add_properties() ARM: tegra: paz00: Handle device properties with software node API bitmap: extend comment to bitmap_print_bitmask/list_to_buf drivers/base/node.c: use bin_attribute to break the size limitation of cpumap ABI topology: use bin_attribute to break the size limitation of cpumap ABI lib: test_bitmap: add bitmap_print_bitmask/list_to_buf test cases cpumask: introduce cpumap_print_list/bitmask_to_buf to support large bitmask and list sysfs: Rename struct bin_attribute member to f_mapping sysfs: Invoke iomem_get_mapping() from the sysfs open callback debugfs: Return error during {full/open}_proxy_open() on rmmod zorro: Drop useless (and hardly used) .driver member in struct zorro_dev zorro: Simplify remove callback sh: superhyway: Simplify check in remove callback nubus: Simplify check in remove callback nubus: Make struct nubus_driver::remove return void kernfs: dont call d_splice_alias() under kernfs node lock kernfs: use i_lock to protect concurrent inode updates kernfs: switch kernfs to use an rwsem kernfs: use VFS negative dentry caching ...
2021-08-31Merge tag 'net-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-nextLinus Torvalds12-85/+62
Pull networking updates from Jakub Kicinski: "Core: - Enable memcg accounting for various networking objects. BPF: - Introduce bpf timers. - Add perf link and opaque bpf_cookie which the program can read out again, to be used in libbpf-based USDT library. - Add bpf_task_pt_regs() helper to access user space pt_regs in kprobes, to help user space stack unwinding. - Add support for UNIX sockets for BPF sockmap. - Extend BPF iterator support for UNIX domain sockets. - Allow BPF TCP congestion control progs and bpf iterators to call bpf_setsockopt(), e.g. to switch to another congestion control algorithm. Protocols: - Support IOAM Pre-allocated Trace with IPv6. - Support Management Component Transport Protocol. - bridge: multicast: add vlan support. - netfilter: add hooks for the SRv6 lightweight tunnel driver. - tcp: - enable mid-stream window clamping (by user space or BPF) - allow data-less, empty-cookie SYN with TFO_SERVER_COOKIE_NOT_REQD - more accurate DSACK processing for RACK-TLP - mptcp: - add full mesh path manager option - add partial support for MP_FAIL - improve use of backup subflows - optimize option processing - af_unix: add OOB notification support. - ipv6: add IFLA_INET6_RA_MTU to expose MTU value advertised by the router. - mac80211: Target Wake Time support in AP mode. - can: j1939: extend UAPI to notify about RX status. Driver APIs: - Add page frag support in page pool API. - Many improvements to the DSA (distributed switch) APIs. - ethtool: extend IRQ coalesce uAPI with timer reset modes. - devlink: control which auxiliary devices are created. - Support CAN PHYs via the generic PHY subsystem. - Proper cross-chip support for tag_8021q. - Allow TX forwarding for the software bridge data path to be offloaded to capable devices. Drivers: - veth: more flexible channels number configuration. - openvswitch: introduce per-cpu upcall dispatch. - Add internet mix (IMIX) mode to pktgen. - Transparently handle XDP operations in the bonding driver. - Add LiteETH network driver. - Renesas (ravb): - support Gigabit Ethernet IP - NXP Ethernet switch (sja1105): - fast aging support - support for "H" switch topologies - traffic termination for ports under VLAN-aware bridge - Intel 1G Ethernet - support getcrosststamp() with PCIe PTM (Precision Time Measurement) for better time sync - support Credit-Based Shaper (CBS) offload, enabling HW traffic prioritization and bandwidth reservation - Broadcom Ethernet (bnxt) - support pulse-per-second output - support larger Rx rings - Mellanox Ethernet (mlx5) - support ethtool RSS contexts and MQPRIO channel mode - support LAG offload with bridging - support devlink rate limit API - support packet sampling on tunnels - Huawei Ethernet (hns3): - basic devlink support - add extended IRQ coalescing support - report extended link state - Netronome Ethernet (nfp): - add conntrack offload support - Broadcom WiFi (brcmfmac): - add WPA3 Personal with FT to supported cipher suites - support 43752 SDIO device - Intel WiFi (iwlwifi): - support scanning hidden 6GHz networks - support for a new hardware family (Bz) - Xen pv driver: - harden netfront against malicious backends - Qualcomm mobile - ipa: refactor power management and enable automatic suspend - mhi: move MBIM to WWAN subsystem interfaces Refactor: - Ambient BPF run context and cgroup storage cleanup. - Compat rework for ndo_ioctl. Old code removal: - prism54 remove the obsoleted driver, deprecated by the p54 driver. - wan: remove sbni/granch driver" * tag 'net-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1715 commits) net: Add depends on OF_NET for LiteX's LiteETH ipv6: seg6: remove duplicated include net: hns3: remove unnecessary spaces net: hns3: add some required spaces net: hns3: clean up a type mismatch warning net: hns3: refine function hns3_set_default_feature() ipv6: remove duplicated 'net/lwtunnel.h' include net: w5100: check return value after calling platform_get_resource() net/mlxbf_gige: Make use of devm_platform_ioremap_resourcexxx() net: mdio: mscc-miim: Make use of the helper function devm_platform_ioremap_resource() net: mdio-ipq4019: Make use of devm_platform_ioremap_resource() fou: remove sparse errors ipv4: fix endianness issue in inet_rtm_getroute_build_skb() octeontx2-af: Set proper errorcode for IPv4 checksum errors octeontx2-af: Fix static code analyzer reported issues octeontx2-af: Fix mailbox errors in nix_rss_flowkey_cfg octeontx2-af: Fix loop in free and unmap counter af_unix: fix potential NULL deref in unix_dgram_connect() dpaa2-eth: Replace strlcpy with strscpy octeontx2-af: Use NDC TX for transmit packet data ...
2021-08-30Merge tag 'locking-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds1-2/+2
Pull locking and atomics updates from Thomas Gleixner: "The regular pile: - A few improvements to the mutex code - Documentation updates for atomics to clarify the difference between cmpxchg() and try_cmpxchg() and to explain the forward progress expectations. - Simplification of the atomics fallback generator - The addition of arch_atomic_long*() variants and generic arch_*() bitops based on them. - Add the missing might_sleep() invocations to the down*() operations of semaphores. The PREEMPT_RT locking core: - Scheduler updates to support the state preserving mechanism for 'sleeping' spin- and rwlocks on RT. This mechanism is carefully preserving the state of the task when blocking on a 'sleeping' spin- or rwlock and takes regular wake-ups targeted at the same task into account. The preserved or updated (via a regular wakeup) state is restored when the lock has been acquired. - Restructuring of the rtmutex code so it can be utilized and extended for the RT specific lock variants. - Restructuring of the ww_mutex code to allow sharing of the ww_mutex specific functionality for rtmutex based ww_mutexes. - Header file disentangling to allow substitution of the regular lock implementations with the PREEMPT_RT variants without creating an unmaintainable #ifdef mess. - Shared base code for the PREEMPT_RT specific rw_semaphore and rwlock implementations. Contrary to the regular rw_semaphores and rwlocks the PREEMPT_RT implementation is writer unfair because it is infeasible to do priority inheritance on multiple readers. Experience over the years has shown that real-time workloads are not the typical workloads which are sensitive to writer starvation. The alternative solution would be to allow only a single reader which has been tried and discarded as it is a major bottleneck especially for mmap_sem. Aside of that many of the writer starvation critical usage sites have been converted to a writer side mutex/spinlock and RCU read side protections in the past decade so that the issue is less prominent than it used to be. - The actual rtmutex based lock substitutions for PREEMPT_RT enabled kernels which affect mutex, ww_mutex, rw_semaphore, spinlock_t and rwlock_t. The spin/rw_lock*() functions disable migration across the critical section to preserve the existing semantics vs per-CPU variables. - Rework of the futex REQUEUE_PI mechanism to handle the case of early wake-ups which interleave with a re-queue operation to prevent the situation that a task would be blocked on both the rtmutex associated to the outer futex and the rtmutex based hash bucket spinlock. While this situation cannot happen on !RT enabled kernels the changes make the underlying concurrency problems easier to understand in general. As a result the difference between !RT and RT kernels is reduced to the handling of waiting for the critical section. !RT kernels simply spin-wait as before and RT kernels utilize rcu_wait(). - The substitution of local_lock for PREEMPT_RT with a spinlock which protects the critical section while staying preemptible. The CPU locality is established by disabling migration. The underlying concepts of this code have been in use in PREEMPT_RT for way more than a decade. The code has been refactored several times over the years and this final incarnation has been optimized once again to be as non-intrusive as possible, i.e. the RT specific parts are mostly isolated. It has been extensively tested in the 5.14-rt patch series and it has been verified that !RT kernels are not affected by these changes" * tag 'locking-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (92 commits) locking/rtmutex: Return success on deadlock for ww_mutex waiters locking/rtmutex: Prevent spurious EDEADLK return caused by ww_mutexes locking/rtmutex: Dequeue waiter on ww_mutex deadlock locking/rtmutex: Dont dereference waiter lockless locking/semaphore: Add might_sleep() to down_*() family locking/ww_mutex: Initialize waiter.ww_ctx properly static_call: Update API documentation locking/local_lock: Add PREEMPT_RT support locking/spinlock/rt: Prepare for RT local_lock locking/rtmutex: Add adaptive spinwait mechanism locking/rtmutex: Implement equal priority lock stealing preempt: Adjust PREEMPT_LOCK_OFFSET for RT locking/rtmutex: Prevent lockdep false positive with PI futexes futex: Prevent requeue_pi() lock nesting issue on RT futex: Simplify handle_early_requeue_pi_wakeup() futex: Reorder sanity checks in futex_requeue() futex: Clarify comment in futex_requeue() futex: Restructure futex_requeue() futex: Correct the number of requeued waiters for PI futex: Remove bogus condition for requeue PI ...
2021-08-28staging: vt6655: Remove filenames in filesAldas Taraškevičius11-22/+0
Fix checkpatch warnings about having filenames in the files. Signed-off-by: Aldas Taraškevičius <aldas60@gmail.com> Link: https://lore.kernel.org/r/20210828072119.1395-1-aldas60@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-28staging: r8188eu: add extra TODO entriesPhillip Potter1-0/+3
Add entry for CFG80211 to reflect that it is currently being worked on and is a desirable feature to have for this driver. Leave entries for LIB80211 and MAC80211 in case anyone else wishes to work on them - they can always be removed later, but MAC80211 in particular would certainly be good to aim for. Also, include an entry for improving error handling, as this is another goal of the cleanup effort. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210828000231.1458-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-28staging: vt6656: Remove filenames in filesAldas Taraškevičius23-45/+0
checkpatch.pl warning: It's generally not useful to have the filename in the file Remove the filenames. Signed-off-by: Aldas Taraškevičius <aldas60@gmail.com> Link: https://lore.kernel.org/r/20210827163203.4100-1-aldas60@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-28staging: wlan-ng: fix invalid assignment warningAakash Hemadri1-1/+1
p80211_hdr->frame_control is u16, change to __le16 to satisfy sparse warning: wlan-ng/prism2sta.c:253:43: warning: invalid assignment: |= wlan-ng/prism2sta.c:253:43: left side has type unsigned short wlan-ng/prism2sta.c:253:43: right side has type restricted __le16 Fixes: 6277fbfdd29c ("staging: wlan-ng: Remove pointless a3/a4 union") Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com> Link: https://lore.kernel.org/r/20210828042949.2276341-1-aakashhemadri123@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27staging: r8188eu: rename fields of struct rtl_psMichael Straube2-38/+41
Rename fields of struct rtl_ps to avoid camel case. PreCCAState -> pre_cca_state CurCCAState -> cur_cca_state PreRFState -> pre_rf_state CurRFState -> cur_rf_state Rssi_val_min -> rssi_val_min Reg874 -> reg_874 RegC70 -> reg_c70 Reg85C -> reg_85c RegA74 -> reg_a74 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210827094144.13290-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27staging: r8188eu: remove ODM_DynamicPrimaryCCA_DupRTS()Michael Straube2-9/+0
Function ODM_DynamicPrimaryCCA_DupRTS() is unused, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210827094144.13290-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27staging: r8188eu: rename fields of struct dyn_primary_ccaMichael Straube2-7/+7
Rename fields of struct dyn_primary_cca to avoid camel case. PriCCA_flag -> pri_cca_flag DupRTS_flag -> dup_rts_flag Monitor_flag -> monitor_flag Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210827094144.13290-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27staging: r8188eu: rename struct field Wifi_Error_StatusMichael Straube3-12/+12
Rename struct field Wifi_Error_Status to avoid camel case. Wifi_Error_Status -> wifi_error_status Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210827094144.13290-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27staging: r8188eu: Provide a TODO file for this driverFabio M. De Francesco1-0/+13
Provide a TODO file that lists the tasks that should be carried out in order to move this driver off drivers/staging. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210827100813.18610-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27staging: r8188eu: remove unneeded variableJing Yangyang1-6/+3
Eliminate the following coccicheck warning: ./drivers/staging/r8188eu/os_dep/os_intfs.c:505:6-12: Unneeded variable "status". Return "_SUCCESS" on line 577 ./drivers/staging/r8188eu/os_dep/os_intfs.c:772: 4-7: Unneeded variable "ret". Return "_SUCCESS" on line 818 ./drivers/staging/r8188eu/os_dep/os_intfs.c:823:4-8: Unneeded variable "ret8". Return "_SUCCESS" on line 849 Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn> Link: https://lore.kernel.org/r/20210825061531.69678-1-deng.changcheng@zte.com.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27staging: r8188eu: remove unneeded conversions to boolJing Yangyang1-5/+5
Found with scripts/coccinelle/misc/boolconv.cocci. Reported-by: Zeal Robot <zealci@zte.com.cn> Reviewed-by: Pavel Skripkin <paskripkin@gmail.com> Acked-by: Michael Straube <straube.linux@gmail.com> Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn> Link: https://lore.kernel.org/r/20210824063443.59724-1-deng.changcheng@zte.com.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netJakub Kicinski4-506/+3
drivers/net/wwan/mhi_wwan_mbim.c - drop the extra arg. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-08-26staging: r8188eu: remove {read,write}_macregPavel Skripkin2-41/+0
These 2 functions are unused, so they can be simply removed Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/d591e29d77da73790c71f7a8e508a8b16fd48f65.1629789580.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: core: remove condition with no effectSaurav Girepunje1-4/+1
Remove the condition with no effect (if == else) in rtw_led.c file. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YSFgrLUfXzgcT6k4@user Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove ethernet.h header fileMichael Straube5-28/+3
There are only two definitions from ethernet.h used in the driver. Namely: #define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */ #define LLC_HEADER_SIZE 6 /* LLC Header Length */ Both are only used in the file core/rtw_recv.c. Replace the usage of ETHERNET_HEADER_SIZE with ETH_HLEN, move the definition of LLC_HEADER_SIZE into rtw_recv.h and remove the now unused ethernet.h header file. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210824123621.10801-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove ip.h header fileMichael Straube5-113/+0
The struct ip_options declared in ip.h is only unsed in the optlength macro which is also defined in ip.h and not used in the driver code. All other definitions/declarations in ip.h are duplicated from <include/uapi/linux/ip.h>. Remove the ip.h header file and its includes. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210824123621.10801-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove if_ether.h header fileMichael Straube4-97/+0
All constants, declarations and macros in if_ether.h are either duplicated from <uapi/linux/if_ether.h> or unused. Remove the file if_ether.h and its includes. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210824123621.10801-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: make rtw_deinit_intf_priv return voidPavel Skripkin1-4/+1
rtw_deinit_intf_priv() always return success, so there is no need in return value Acked-by: Michael Straube <straube.linux@gmail.com> Acked-by: Phillip Potter <phil@philpotter.co.uk> Acked-by: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210823184059.19742-1-paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in os_dep/recv_linux.cMichael Straube1-1/+1
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-9-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in hal/rtl8188eu_xmit.cMichael Straube1-2/+1
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-8-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in core/rtw_xmit.cMichael Straube1-9/+6
Use is_multicast_ether_addr instead of custom macro IS_MCAST, all buffers are properly aligned. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in core/rtw_security.cMichael Straube1-4/+4
Use is_multicast_ether_addr instead of custom macro IS_MCAST, all buffers are properly aligned. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in core/rtw_recv.cMichael Straube1-10/+10
Use is_multicast_ether_addr instead of custom macro IS_MCAST, all buffers are properly aligned. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in core/rtw_mp.cMichael Straube1-2/+2
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in core/rtw_mlme.cMichael Straube1-2/+2
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: ensure proper alignment for eth address buffersMichael Straube2-9/+9
Add __aligned(2) to eth address buffers in structs rx_pkt_attrib and pkt_attrib to ensure proper alignment for usage with functions from <linux/etherdevice.h> Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove unnecessary parenthesesMichael Straube1-2/+2
Remove unnecessary parentheses to improve readability. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210822114014.21584-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove dead codeMichael Straube1-4/+1
if (0) is never true, remove code that is never executed. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210822114014.21584-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove 5 GHz codeMichael Straube1-22/+8
The driver is for chips that do not operate in the 5 GHz band. Remove some 5 GHz related code. Acked-by: Phillip Potter <phil@philpotter.co.uk> Acked-by: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823193028.12391-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove cmd_osdep.h header fileMichael Straube3-23/+5
All functions declared in the cmd_osdep.h header file are only used in a single c source file. Make the functions static and remove the header file and its includes. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210821155151.25822-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: Make mult-byte entities in dhcp header be big endianLarry Finger1-7/+7
The 16- and 32-bit quantities in the dhcp message definition must be big endian. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20210821151459.26078-1-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: change declaration of Efuse_Read1ByteFromFakeContentPhillip Potter1-11/+3
Remove forward declaration of Efuse_Read1ByteFromFakeContent function from core/rtw_efuse.c, as the function is defined in full directly after this and therefore this forward declaration is redundant. In addition, convert the storage class of the function to static, as the function is only used with rtw_efuse.c, and tidy up the signature alignment. Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Acked-by: Michael Straube<straube.linux@gmail.com> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210821105615.6307-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: Fix a resource leak in update_bcn_wps_ieXiangyang Zhang1-1/+2
The "pbackup_remainder_ie" variable is not freed when "pwps_ie_src" is null Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver") Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Xiangyang Zhang <xyz.sun.ok@gmail.com> Link: https://lore.kernel.org/r/20210821081824.14745-1-xyz.sun.ok@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: set pipe only onceMartin Kaiser1-7/+8
Set the pipe for reading or writing in usbctrl_vendorreq only once. There's no need to set it again for every retry. This patch is an adaptation of commit 889ed8b5e374 ("staging: rtl8188eu: set pipe only once") for the new r8188eu driver. Acked-by: Phillip Potter <phil@philpotter.co.uk> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove unused members of struct _io_opsMartin Kaiser1-3/+0
Remove function pointers which are not used by the r8188eu driver. Acked-by: Michael Straube <straube.linux@gmail.com> Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: clean up the usb_writeNMartin Kaiser1-10/+5
Remove unnecessary variables, check the length. Acked-by: Michael Straube <straube.linux@gmail.com> Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: clean up the usb_writeXY functionsMartin Kaiser1-42/+8
Remove unnecessary variables, summarize declarations and assignments. Acked-by: Phillip Potter <phil@philpotter.co.uk> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: clean up the usb_readXY functionsMartin Kaiser1-23/+7
Remove unnecessary variables, summarize declarations and assignments. Acked-by: Phillip Potter <phil@philpotter.co.uk> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove an unused enumMartin Kaiser1-4/+0
The VENDOR_READ and VENDOR_WRITE defines are not used. Acked-by: Michael Straube <straube.linux@gmail.com> Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: rewrite usb vendor request definesMartin Kaiser1-2/+2
Replace the numeric values with USB constants to make their meaning clearer. Acked-by: Phillip Potter <phil@philpotter.co.uk> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: rtl8188eu: use actual request type as parameterMartin Kaiser1-34/+12
At the moment, usbctrl_vendorreq's requesttype parameter must be set to 1 for reading and 0 for writing. It's then converted to the actual bmRequestType for the USB control request. We can simplify the code and avoid this conversion if the caller passes the actual bmRequestType. This patch is an adaptation of commit 788fde031027 ("staging: rtl8188eu: use actual request type as parameter") for the new r8188eu driver. Acked-by: Phillip Potter <phil@philpotter.co.uk> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove unused defineMartin Kaiser1-2/+0
_HCI_OPS_OS_C_ is not used in the r8188eu driver. Remove it. Acked-by: Michael Straube <straube.linux@gmail.com> Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove unnecessary castMartin Kaiser1-1/+1
name is a const char * by default. This type should be ok for r8188eu. Acked-by: Phillip Potter <phil@philpotter.co.uk> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>