Miquel-Raynal/…
Commits on Jan 12, 2022
-
net: ieee802154: ca8210: Refuse most of the scan operations
The Cascada 8210 hardware transceiver is kind of a hardMAC which interfaces with the softMAC and in practice does not support sending anything else than dataframes. This means we cannot send any BEACON_REQ during active scans nor any BEACON in general. Refuse these operations officially so that the user is aware of the limitation. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: mac802154: Inform device drivers about beacon operations
Let's create a couple of driver hooks in order to tell the device drivers that beacons are being sent, allowing them to eventually apply any needed configuration, or in the worst case to refuse the operation if it is not supported. These hooks are optional and not implementing them does not prevent the beacons operation to happen. Returning an error from these implementations will however shut down the beacons configuration entirely. Co-developed-by: David Girault <david.girault@qorvo.com> Signed-off-by: David Girault <david.girault@qorvo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: mac802154: Inform device drivers about scans
Let's create a couple of driver hooks in order to tell the device drivers that a scan is ongoing, allowing them to eventually apply any needed configuration, or in the worst case to refuse the operation if it is not supported. These hooks are optional and not implementing them does not prevent the scan operation to happen. Returning an error from these implementations will however shut down the scan entirely. Co-developed-by: David Girault <david.girault@qorvo.com> Signed-off-by: David Girault <david.girault@qorvo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: mac802154: Add support for processing beacon requests
When performing an active scan, coordinators emit beacon requests which must be answered by other PANs receiving the request. Answering a beacon request is considered a duty whenever the user performs a "send beacons" command with an interval of 15. As in the softMAC we save the interval in micro-seconds, we use a negative value to discriminate between a passive beacons command and the task to answer received beacon requests. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: mac802154: Add support for active scans
Active scan support is based on the current passive scan support, cheered up with beacon requests sent after every channel change. Co-developed-by: David Girault <david.girault@qorvo.com> Signed-off-by: David Girault <david.girault@qorvo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Trace the registration of new PANs
Add an internal trace when new PANs get discovered. Signed-off-by: David Girault <david.girault@qorvo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: mac802154: Handle beacons requests
Implement the core hooks in order to provide the softMAC layer support for sending beacons. Besides being able to test the full passive scanning procedure, this will also be used when defining PAN coordinator status, in order to give a device the right to answer received BEACON_REQ. Changing the channels is prohibited while a beacon operation is ongoing. The implementation uses a workqueue triggered at a certain interval depending on the symbol duration for the current channel and the interval order provided. Sending beacons in response to an active scan request is not yet supported. Co-developed-by: David Girault <david.girault@qorvo.com> Signed-off-by: David Girault <david.girault@qorvo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Add support for beacon requests
This involves processing beacons requests: starting or stopping the flow of beacons sent passively on a specific interface. The page and channel must be changed beforehands if needed. Interval orders above 14 are reserved to tell a device it must answer BEACON_REQ coming from an active scan procedure (this is not supported yet). A beacons request structure is created to list the requirements. Mac layers may now implement the ->send_beacons() and ->stop_beacons() hooks. Co-developed-by: David Girault <david.girault@qorvo.com> Signed-off-by: David Girault <david.girault@qorvo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Full PAN management
Now that scanning is supported and PANs properly registered, give certain rights to the user, such as listing asynchronously the listed PANs as well as flushing the list. The maximum number of PANs to list and their delay before expiration can be configured. By default there is no limit. When these parameters are set, PANs are automatically dropped from the list. Co-developed-by: David Girault <david.girault@qorvo.com> Signed-off-by: David Girault <david.girault@qorvo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: mac802154: Handle scan requests
Implement the core hooks in order to provide the softMAC layer support for scan requests and aborts. Changing the channels is prohibited during the scan. As transceiver enter in a promiscuous mode during scans, they might stop checking frame validity so we ensure this gets done at mac level. The implementation uses a workqueue triggered at a certain interval depending on the symbol duration for the current channel and the duration order provided. Received beacons during a passive scanning procedure are processed and either registered in the list of known PANs or the existing entry gets updated accordingly. Active scanning is not supported yet. Co-developed-by: David Girault <david.girault@qorvo.com> Signed-off-by: David Girault <david.girault@qorvo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Add support for scanning requests
This involves processing triggering scan requests, abort scan requests, as well as providing information about if the last scan was finished or not. A scan request structure is created to list the requirements. A netlink multicast scan group is also created for the occasion so that listeners can only focus on scan activity. Mac layers may now implement the ->trigger_scan() and ->abort_scan() hooks. Co-developed-by: David Girault <david.girault@qorvo.com> Signed-off-by: David Girault <david.girault@qorvo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Define frame types
A 802.15.4 frame can be of different types, here is a definition matching the specification. This enumeration will be soon be used when adding scanning support. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Define a beacon frame header
This definition will be used when adding support for scanning and defines the content of a beacon frame header as in the 802.15.4 specification. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Add support for internal PAN management
Let's introduce the basics of PAN management: - structures defining PANs - helpers for PANs registration - helpers discarding old PANs Co-developed-by: David Girault <david.girault@qorvo.com> Signed-off-by: David Girault <david.girault@qorvo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Return meaningful error codes from the netlink helpers
Returning -1 does not indicate anything useful. Use a standard and meaningful error code instead. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Add a kernel doc header to the ieee802154_addr struc…
…ture While not being absolutely needed, it at least explain the mode vs. enum fields. Signed-off-by: David Girault <david.girault@qorvo.com> [miquel.raynal@bootlin.com: Isolate this change from a bigger commit and reword the comment] Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> -
net: ieee802154: Move the address structure earlier
Move the address structure earlier in the cfg802154.h header in order to use it in subsequent additions. There is no functional change here. Signed-off-by: David Girault <david.girault@qorvo.com> [miquel.raynal@bootlin.com: Isolate this change from a bigger commit] Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: mac802154: Include the softMAC stack inside the IEEE 802.15.4 menu
The softMAC stack has no meaning outside of the IEEE 802.15.4 stack and cannot be used without it. Signed-off-by: David Girault <david.girault@qorvo.com> [miquel.raynal@bootlin.com: Isolate this change from a bigger commit] Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Move IEEE 802.15.4 Kconfig main entry
It makes certainly more sense to have all the low-range wireless protocols such as Bluetooth, IEEE 802.11 (WiFi) and IEEE 802.15.4 together, so let's move the main IEEE 802.15.4 stack Kconfig entry at a better location. Signed-off-by: David Girault <david.girault@qorvo.com> [miquel.raynal@bootlin.com: Isolate this change from a bigger commit and rewrite the commit message.] Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Drop symbol duration settings when the core does it …
…already The core now knows how to set the symbol duration in a few cases, when drivers correctly advertise the protocols used on each channel. For these drivers, there is no more need to bother with symbol duration, so just drop the duplicated code. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: hwsim: Ensure frame checksum are valid
There is no point in accepting frames with a wrong or missing checksum, at least not outside of a promiscuous setting. Set the right flag by default in the hwsim driver to ensure checksums are not ignored. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: mac802154: Set the symbol duration automatically
Now that we have access to all the basic information to know which symbol duration should be applied, let's set the symbol duration automatically. The two locations that must call for the symbol duration to be set are: - when manually requesting a channel change though the netlink interface - at PHY creation, ieee802154_alloc_hw() already calls ieee802154_change_channel() which will now update the symbol duration accordingly. If an information is missing, the symbol duration is not touched, a debug message is eventually printed. This keeps the compatibility with the unconverted drivers for which it was too complicated for me to find their precise information. If they initially provided a symbol duration, it would be kept. If they don't, the symbol duration value is left untouched. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: mac802154: Convert the symbol duration into nanoseconds
Tdsym is often given in the spec as pretty small numbers in microseconds and hence was reflected in the code as symbol_duration and was stored as a u8. Actually, for UWB PHYs, the symbol duration is given in nanoseconds and are as precise as picoseconds. In order to handle better these PHYs, change the type of symbol_duration to u32 and store this value in nanoseconds. All the users of this variable are updated in a mechanical change. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Give more details to the core about the channel conf…
…igurations In order to let the core derive eg. the symbol duration for a given channel, it needs to know which protocol is being used, on which band, and eventually more details such as the mean PRF in the case of UWB. Create the necessary enumerations to declare all of that. Include them in the currently-almost-empty phy_channels structure which until now only declared the supported channels as bitfields. The PRF is declared in a union as this clearly is a parameter that does not apply to most of the protocols. It is very likely that other parameters will get added in the future to further define specific protocols and the union will likely be a good location for them. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: ieee802154: Improve the way supported channels are declared
The idea here is to create a structure per set of channels so that we can define much more than basic bitfields for these. The structure is currently almost empty on purpose because this change is supposed to be a mechanical update without additional information but more details will be added in the following commits. For each page, the core now has access to how many "chunks" of channels are defined. Overall up to only 3 chunks have been defined so let's hardcode this value to simplify a lot the handling. Then, for each chunk, we define an independent bitfield of channels. As there are several users of these bitfields, we also create the cfg802154_get_supported_chans() helper to reconstruct the bitfield as it was before when the only information that matters is identifying the supported/unsupported channels. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: mac802154: Ensure proper channel selection at probe time
Right now device drivers are encouraged to just set the ->current_page and ->current_channel to indicate about the current state of the hardware but this is far from ideal given the fact that we might want to configure a few things internally, such as the symbol duration. Call the ieee802154_change_channel() helper from the code section registering the hardware to ensure proper channel selection and configuration both on the device side and the core side. This change somehow "fixes" the hwsim driver which advertises using page 0 channel 13, but does not actually update its own internal pib structure to reflect that configuration. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
net: mac802154: Split the set channel hook implementation
As it is currently designed, the set_channel() cfg802154 hook implemented in the softMAC is doing a couple of checks before actually performing the channel change. However, as we enhance the support for automatically setting the symbol duration during channel changes, it will also be needed to ensure that the corresponding channel as properly be selected at probe time. In order to verify this, we will need to separate the channel change from the previous checks. These checks are actually here to speed up the process when the user request necessitates no change, so we can safely bypass them. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-
Merge tag 'locking_core_for_v5.17_rc1' of git://git.kernel.org/pub/sc…
…m/linux/kernel/git/tip/tip Pull locking updates from Borislav Petkov: "Lots of cleanups and preparation. Highlights: - futex: Cleanup and remove runtime futex_cmpxchg detection - rtmutex: Some fixes for the PREEMPT_RT locking infrastructure - kcsan: Share owner_on_cpu() between mutex,rtmutex and rwsem and annotate the racy owner->on_cpu access *once*. - atomic64: Dead-Code-Elemination" [ Description above by Peter Zijlstra ] * tag 'locking_core_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/atomic: atomic64: Remove unusable atomic ops futex: Fix additional regressions locking: Allow to include asm/spinlock_types.h from linux/spinlock_types_raw.h x86/mm: Include spinlock_t definition in pgtable. locking: Mark racy reads of owner->on_cpu locking: Make owner_on_cpu() into <linux/sched.h> lockdep/selftests: Adapt ww-tests for PREEMPT_RT lockdep/selftests: Skip the softirq related tests on PREEMPT_RT lockdep/selftests: Unbalanced migrate_disable() & rcu_read_lock(). lockdep/selftests: Avoid using local_lock_{acquire|release}(). lockdep: Remove softirq accounting on PREEMPT_RT. locking/rtmutex: Add rt_mutex_lock_nest_lock() and rt_mutex_lock_killable(). locking/rtmutex: Squash self-deadlock check for ww_rt_mutex. locking: Remove rt_rwlock_is_contended(). sched: Trigger warning if ->migration_disabled counter underflows. futex: Fix sparc32/m68k/nds32 build regression futex: Remove futex_cmpxchg detection futex: Ensure futex_atomic_cmpxchg_inatomic() is present kernel/locking: Use a pointer in ww_mutex_trylock(). -
Merge tag 'sched_core_for_v5.17_rc1' of git://git.kernel.org/pub/scm/…
…linux/kernel/git/tip/tip Pull scheduler updates from Borislav Petkov: "Mostly minor things this time; some highlights: - core-sched: Add 'Forced Idle' accounting; this allows to track how much CPU time is 'lost' due to core scheduling constraints. - psi: Fix for MEM_FULL; a task running reclaim would be counted as a runnable task and prevent MEM_FULL from being reported. - cpuacct: Long standing fixes for some cgroup accounting issues. - rt: Bandwidth timer could, under unusual circumstances, be failed to armed, leading to indefinite throttling." [ Description above by Peter Zijlstra ] * tag 'sched_core_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Replace CFS internal cpu_util() with cpu_util_cfs() sched/fair: Cleanup task_util and capacity type sched/rt: Try to restart rt period timer when rt runtime exceeded sched/fair: Document the slow path and fast path in select_task_rq_fair sched/fair: Fix per-CPU kthread and wakee stacking for asym CPU capacity sched/fair: Fix detection of per-CPU kthreads waking a task sched/cpuacct: Make user/system times in cpuacct.stat more precise sched/cpuacct: Fix user/system in shown cpuacct.usage* cpuacct: Convert BUG_ON() to WARN_ON_ONCE() cputime, cpuacct: Include guest time in user time in cpuacct.stat psi: Fix PSI_MEM_FULL state when tasks are in memstall and doing reclaim sched/core: Forced idle accounting psi: Add a missing SPDX license header psi: Remove repeated verbose comment -
Merge tag 'Wcast-function-type-5.17-rc1' of git://git.kernel.org/pub/…
…scm/linux/kernel/git/gustavoars/linux Pull cast-function-type warning addition from Gustavo A. R. Silva: "This globally enables -Wcast-function-type. We need to make sure new function cast mismatches are not introduced in the kernel in order to avoid tripping CFI checking" * tag 'Wcast-function-type-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: Makefile: Enable -Wcast-function-type
-
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King: - amba bus irq rework - add kfence support - support for Cortex M33 and M55 CPUs - kbuild updates for decompressor - let core code manage thread_info::cpu - avoid unpredictable NOP encoding in decompressor - reduce information printed in calltraces * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: reduce the information printed in call traces ARM: 9168/1: Add support for Cortex-M55 processor ARM: 9167/1: Add support for Cortex-M33 processor ARM: 9166/1: Support KFENCE for ARM ARM: 9165/1: mm: Provide is_write_fault() ARM: 9164/1: mm: Provide set_memory_valid() ARM: 9163/1: amba: Move of_amba_device_decode_irq() into amba_probe() ARM: 9162/1: amba: Kill sysfs attribute file of irq ARM: 9161/1: mm: mark private VM_FAULT_X defines as vm_fault_t ARM: 9159/1: decompressor: Avoid UNPREDICTABLE NOP encoding ARM: 9158/1: leave it to core code to manage thread_info::cpu ARM: 9154/1: decompressor: do not copy source files while building
Commits on Jan 11, 2022
-
Merge tag 'for-5.17/parisc-1' of git://git.kernel.org/pub/scm/linux/k…
…ernel/git/deller/parisc-linux Pull parisc architecture updates from Helge Deller: - Fix lpa and lpa_user defines (John David Anglin) - Fix symbol lookup of init functions with an __is_kernel() fix (Helge Deller) - Fix wrong pdc_toc_pim_11 and pdc_toc_pim_20 definitions (Helge Deller) - Add lws_atomic_xchg and lws_atomic_store syscalls (John David Anglin) - Rewrite light-weight syscall and futex code (John David Anglin) - Enable TOC (transfer of contents) feature unconditionally (Helge Deller) - Improve fault handler messages (John David Anglin) - Improve build process (Masahiro Yamada) - Reduce kernel code footprint of user access functions (Helge Deller) - Fix build error due to outX() macros (Bart Van Assche) - Ue default_groups in kobj_type in pdc_stable (Greg Kroah-Hartman) - Default to 16 CPUs on 32-bit kernel (Helge Deller) * tag 'for-5.17/parisc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Default to 16 CPUs on 32-bit kernel sections: Fix __is_kernel() to include init ranges parisc: Re-use toc_stack as hpmc_stack parisc: Enable TOC (transfer of contents) feature unconditionally parisc: io: Improve the outb(), outw() and outl() macros parisc: pdc_stable: use default_groups in kobj_type parisc: Add kgdb io_module to read chars via PDC parisc: Fix pdc_toc_pim_11 and pdc_toc_pim_20 definitions parisc: Add lws_atomic_xchg and lws_atomic_store syscalls parisc: Rewrite light-weight syscall and futex code parisc: Enhance page fault termination message parisc: Don't call faulthandler_disabled() in do_page_fault() parisc: Switch user access functions to signal errors in r29 instead of r8 parisc: Avoid calling faulthandler_disabled() twice parisc: Fix lpa and lpa_user defines parisc: Define depi_safe macro parisc: decompressor: do not copy source files while building
-
Merge tag 'x86_build_for_v5.17_rc1-p2' of git://git.kernel.org/pub/sc…
…m/linux/kernel/git/tip/tip Pull missed x86 build updates from Borislav Petkov: "In the heat of the battle between me and the tip pull requests, I've sent you the tip:x86/build branch without the two top-most commits from Ingo (it appears I hadn't fast-forwarded my local branch, sorry about that). Therefore, here's a part 2 of x86/build for 5.17. - Make x86 defconfigs more useful by enabling CONFIG_LOCALVERSION_AUTO and CONFIG_KALLSYMS_ALL And while you merge that, I'll be at the blackboard, writing: I will always fast-forward local branches before tagging and sending pull requests to Linus. I will always fast-forward local branches before tagging and sending pull requests to Linus. I will always fast-forward local branches before tagging and sending pull requests..." * tag 'x86_build_for_v5.17_rc1-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs x86/defconfig: Enable CONFIG_LOCALVERSION_AUTO=y in the defconfig -
Merge tag 'efi-next-for-v5.17' of git://git.kernel.org/pub/scm/linux/…
…kernel/git/efi/efi Pull EFI updates from Ard Biesheuvel: - support taking the measurement of the initrd when loaded via the LoadFile2 protocol - kobject API cleanup from Greg - some header file whitespace fixes * tag 'efi-next-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: use default_groups in kobj_type efi/libstub: measure loaded initrd info into the TPM efi/libstub: consolidate initrd handling across architectures efi/libstub: x86/mixed: increase supported argument count efi/libstub: add prototype of efi_tcg2_protocol::hash_log_extend_event() include/linux/efi.h: Remove unneeded whitespaces before tabs
-
Merge tag 'for-linus-5.17-rc1' of git://git.kernel.org/pub/scm/linux/…
…kernel/git/rw/uml Pull UML updates from Richard Weinberger: - set_fs removal - Devicetree support - Many cleanups from Al - Various virtio and build related fixes * tag 'for-linus-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: (31 commits) um: virtio_uml: Allow probing from devicetree um: Add devicetree support um: Extract load file helper from initrd.c um: remove set_fs hostfs: Fix writeback of dirty pages um: Use swap() to make code cleaner um: header debriding - sigio.h um: header debriding - os.h um: header debriding - net_*.h um: header debriding - mem_user.h um: header debriding - activate_ipi() um: common-offsets.h debriding... um, x86: bury crypto_tfm_ctx_offset um: unexport handle_page_fault() um: remove a dangling extern of syscall_trace() um: kill unused cpu() uml/i386: missing include in barrier.h um: stop polluting the namespace with registers.h contents logic_io instance of iounmap() needs volatile on argument um: move amd64 variant of mmap(2) to arch/x86/um/syscalls_64.c ...