aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2024-09-06wifi: mt76: mt7915: avoid long MCU command timeouts during SERFelix Fietkau1-0/+5
Immediately abort MCU commands when firmware requests DMA restart. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7996: fix uninitialized TLV dataFelix Fietkau1-1/+1
Use skb_put_zero instead of skb_put Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7915: always query station rx rate from firmwareFelix Fietkau1-2/+1
When offloading is enabled, the software rx path may not have the latest rate information. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7915: fix rx filter setting for bfee functionalityHoward Hsu1-2/+1
Fix rx filter setting to prevent dropping NDPA frames. Without this change, bfee functionality may behave abnormally. Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Howard Hsu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: shrink mt76_queue_bufFelix Fietkau1-2/+2
Reuse one bit from the length field for skip_unmap Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7915: improve hardware restart reliabilityFelix Fietkau3-12/+27
- use reconfig_complete to restart mac_work / queues - reset full wtbl after firmware init - clear wcid and vif mask to avoid leak - fix sta poll list corruption Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: connac: move mt7615_mcu_del_wtbl_all to connacFelix Fietkau5-12/+13
Preparation for reusing it in mt7915 Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7915: hold dev->mt76.mutex while disabling tx workerFelix Fietkau1-1/+3
Prevent racing against other functions disabling the same worker Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7915: add dummy HW offload of IEEE 802.11 fragmentationBenjamin Lin2-0/+8
Currently, CONNAC2 series do not support encryption for fragmented Tx frames. Therefore, add dummy function mt7915_set_frag_threshold() to prevent SW IEEE 802.11 fragmentation. Signed-off-by: Benjamin Lin <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7915: reset the device after MCU timeoutFelix Fietkau1-0/+9
On MT7915, MCU hangs do not trigger watchdog interrupts, so they can only be detected through MCU message timeouts. Ensure that the hardware gets restarted when that happens in order to prevent a permanent stuck state. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7915: retry mcu messagesFelix Fietkau3-5/+25
In some cases MCU messages can get lost. Instead of failing completely, attempt to recover by re-sending them. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7915: set MT76_MCU_RESET early in mt7915_mac_full_resetFelix Fietkau1-0/+1
This avoids running into unnecessary timeouts waiting for MCU responses Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7915: use mac80211 .sta_state opFelix Fietkau8-56/+90
Allows adding stations before assoc, though they are not passed to the firmware yet at that point. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: change .sta_assoc callback to .sta_eventFelix Fietkau14-36/+67
Also report auth/disassoc events, in order to give the driver more control over handling the station state. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: connac: add support for passing connection state directlyFelix Fietkau6-14/+22
Preparation for improvements to sta handling. No functional changes. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: connac: add support for IEEE 802.11 fragmentationBenjamin Lin2-1/+16
Add fragmentation index into TXD.DW2 to support IEEE 802.11 fragmentation. Signed-off-by: Benjamin Lin <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7915: allocate vif wcid in the same range as stationsFelix Fietkau1-1/+4
Reduces the amount of unnecessary WTBL bank switching, while still reserving WTBL entries for vifs. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7915: disable tx worker during tx BA session enable/disableFelix Fietkau1-3/+7
Avoids firmware race condition. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: add separate tx scheduling queue for off-channel txFelix Fietkau3-26/+41
Ensure that packets are not sent out to the wrong channel Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06perf: Add driver for Arm NI-700 interconnect PMURobin Murphy3-0/+789
The Arm NI-700 Network-on-Chip Interconnect has a relatively straightforward design with a hierarchy of voltage, power, and clock domains, where each clock domain then contains a number of interface units and a PMU which can monitor events thereon. As such, it begets a relatively straightforward driver to interface those PMUs with perf. Even more so than with arm-cmn, users will require detailed knowledge of the wider system topology in order to meaningfully analyse anything, since the interconnect itself cannot know what lies beyond the boundary of each inscrutably-numbered interface. Given that, for now they are also expected to refer to the NI-700 documentation for the relevant event IDs to provide as well. An identifier is implemented so we can come back and add jevents if anyone really wants to. Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/9933058d0ab8138c78a61cd6852ea5d5ff48e393.1725470837.git.robin.murphy@arm.com Signed-off-by: Will Deacon <[email protected]>
2024-09-06perf/arm-cmn: Improve format attr printingRobin Murphy1-6/+2
Take full advantage of our formats being stored in bitfield form, and make the printing even more robust and simple by letting printk do all the hard work of formatting bitlists. Signed-off-by: Robin Murphy <[email protected]> Reviewed-by: Ilkka Koskinen <[email protected]> Link: https://lore.kernel.org/r/50459f2d48fc62310a566863dbf8a7c14361d363.1725474584.git.robin.murphy@arm.com Signed-off-by: Will Deacon <[email protected]>
2024-09-06perf/arm-cmn: Clean up unnecessary NUMA_NO_NODE checkRobin Murphy1-1/+1
Checking for NUMA_NO_NODE is a misleading and, on reflection, entirely unnecessary micro-optimisation. If it ever did happen that an incoming CPU has no NUMA affinity while the current CPU does, a questionably- useful PMU migration isn't the biggest thing wrong with that picture... Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/00634da33c21269a00844140afc7cc3a2ac1eb4d.1725474584.git.robin.murphy@arm.com Signed-off-by: Will Deacon <[email protected]>
2024-09-06wifi: mac80211: handle ieee80211_radar_detected() for MLOAditya Kumar Singh13-15/+15
Currently DFS works under assumption there could be only one channel context in the hardware. Hence, drivers just calls the function ieee80211_radar_detected() passing the hardware structure. However, with MLO, this obviously will not work since number of channel contexts will be more than one and hence drivers would need to pass the channel information as well on which the radar is detected. Also, when radar is detected in one of the links, other link's CAC should not be cancelled. Hence, in order to support DFS with MLO, do the following changes - * Add channel context conf pointer as an argument to the function ieee80211_radar_detected(). During MLO, drivers would have to pass on which channel context conf radar is detected. Otherwise, drivers could just pass NULL. * ieee80211_radar_detected() will iterate over all channel contexts present and * if channel context conf is passed, only mark that as radar detected * if NULL is passed, then mark all channel contexts as radar detected * Then as usual, schedule the radar detected work. * In the worker, go over all the contexts again and for all such context which is marked with radar detected, cancel the ongoing CAC by calling ieee80211_dfs_cac_cancel() and then notify cfg80211 via cfg80211_radar_event(). * To cancel the CAC, pass the channel context as well where radar is detected to ieee80211_dfs_cac_cancel(). This ensures that CAC is canceled only on the links using the provided context, leaving other links unaffected. This would also help in scenarios where there is split phy 5 GHz radio, which is capable of DFS channels in both lower and upper band. In this case, simultaneous radars can be detected. Signed-off-by: Aditya Kumar Singh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
2024-09-06wifi: cfg80211: handle DFS per linkAditya Kumar Singh4-8/+9
Currently, during starting a radar detection, no link id information is parsed and passed down. In order to support starting radar detection during Multi Link Operation, it is required to pass link id as well. Add changes to first parse and then pass link id in the start radar detection path. Additionally, update notification APIs to allow drivers/mac80211 to pass the link ID. However, everything is handled at link 0 only until all API's are ready to handle it per link. Signed-off-by: Aditya Kumar Singh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
2024-09-06wifi: cfg80211: move DFS related members to links[] in wireless_devAditya Kumar Singh3-7/+7
A few members related to DFS handling are currently under per wireless device data structure. However, in order to support DFS with MLO, there is a need to have them on a per-link manner. Hence, as a preliminary step, move members cac_started, cac_start_time and cac_time_ms to be on a per-link basis. Since currently, link ID is not known at all places, use default value of 0 for now. Signed-off-by: Aditya Kumar Singh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
2024-09-06wifi: iwlwifi: mvm: replace CONFIG_PM by CONFIG_PM_SLEEPEmmanuel Grumbach4-8/+11
Replace the ifdef CONFIG_PM by CONFIG_PM_SLEEP. CONFIG_PM was useful when we had CONFIG_PM_RUNTIME but that was removed long ago. Use PM_SLEEP consistently across the driver. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240825191257.44e47ba584de.I64f985d0405345252b76b7157291b79677abd64d@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-09-06dm-integrity: fix a race condition when accessing recalc_sectorMikulas Patocka1-1/+3
There's a race condition when accessing the variable ic->sb->recalc_sector. The function integrity_recalc writes to this variable when it makes some progress and the function dm_integrity_map_continue may read this variable concurrently. One problem is that on 32-bit architectures the 64-bit variable is not read and written atomically - it may be possible to read garbage if read races with write. Another problem is that memory accesses to this variable are not guarded with memory barriers. This commit fixes the race - it moves reading ic->sb->recalc_sector to an earlier place where we hold &ic->endio_wait.lock. Signed-off-by: Mikulas Patocka <[email protected]> Cc: [email protected]
2024-09-06dm-integrity: support recalculation in the 'I' modeMikulas Patocka1-42/+246
In the kernel 6.11, dm-integrity was enhanced with an inline ('I') mode. This mode uses devices with non-power-of-2 sector size. The extra metadata after each sector are used to hold the integrity hash. This commit enhances the inline mode, so that there is automatic recalculation of the integrity hashes when the 'reclaculate' parameter is used. It allows us to activate the device instantly, and the recalculation is done on background. If the device is deactivated while recalculation is in progress, it will remember the point where it stopped and it will continue from this point when activated again. Signed-off-by: Mikulas Patocka <[email protected]>
2024-09-06dm integrity: Convert comma to semicolonChen Ni1-8/+8
Replace comma between expressions with semicolons. Using a ',' in place of a ';' can have unintended side effects. Although that is not the case here, it is seems best to use ';' unless ',' is intended. Found by inspection. No functional change intended. Compile tested only. Signed-off-by: Chen Ni <[email protected]> Reviewed-by: Mike Snitzer <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]>
2024-09-06media: atomisp: set lock before calling vb2_queue_init()Hans Verkuil1-1/+1
The vb2_queue_init() will expect the vb2_queue lock pointer to be set in the future. So for those drivers that set the lock later, move it up to before the vb2_queue_init() call. Signed-off-by: Hans Verkuil <[email protected]> Link: https://lore.kernel.org/r/90b8e7a40c3ed306cbeb96c2f4dad97eb7e53bfd.1725285495.git.hverkuil-cisco@xs4all.nl Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Improve binary finding debug loggingHans de Goede1-161/+95
The atomisp firmware contains a number of different pipeline binaries inside its firmware file and the driver selects the right one depending on the selected pipeline configuration. Sometimes (e.g. when the selected output resolution is too big) it fails to find a binary. This happens especially when adding support for new sensors. Improve the logging when this happens to make debugging easier: 1. Replace ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, ...) with standard dev_dbg() calls so that the logs can be enabled with dyndbg 2. Do not dump_stack() when this fails, doing so adds no useful extra info 3. With the dump_stack() call gone, remove the wrapper and rename __ia_css_binary_find() to ia_css_binary_find() 4. On error use dev_err() instead of dev_dbg() so that when things fail it is clear why they fail without needing to enable dyndbg Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Drop dev_dbg() calls from hmm_[alloc|free]()Hans de Goede1-5/+0
Debug logging every alloc + free just polutes the debug logs without adding much value, remove the alloc + free dev_dbg() calls. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: csi2-bridge: Add DMI quirk for t4ka3 on Xiaomi Mipad2Hans de Goede1-0/+2
The t4ka3 sensor on the Xiaomi Mipad2 is used as a back facing sensor, it uses 4 CSI lanes, but the _DSM has CsiLanes set to 2. Extend the existing Xiaomi Mipad2 DMI quirk to override the wrong _DSM setting. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: add missing wait_prepare/finish opsHans Verkuil1-0/+2
Without these ops the v4l2-compliance blocking wait test will fail. These ops are required to ensure that when VIDIOC_DQBUF has to wait for buffers to arrive, the queue lock is correctly released and retaken. Otherwise the wait for a buffer would block all other queue ioctls. Signed-off-by: Hans Verkuil <[email protected]> Link: https://lore.kernel.org/r/9f401f3732dd728e3d2ca508002c97b80a2eae30.1725265884.git.hverkuil-cisco@xs4all.nl Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Remove unused declarationZhang Zekun1-2/+0
v4l2_get_acpi_sensor_info() has been removed since commit d80be6a10cd3 ("media: atomisp: Drop v4l2_get_acpi_sensor_info() function"), remain the declaration untouched in the header file. So, let's remove this unused declartion. Signed-off-by: Zhang Zekun <[email protected]> Reviewed-by: Changhuang Liang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: use clamp() in compute_coring()Li Zetao1-6/+6
When it needs to get a value within a certain interval, using clamp() makes the code easier to understand than min(max()). Signed-off-by: Li Zetao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: use clamp() in ia_css_eed1_8_encode()Li Zetao1-1/+1
When it needs to get a value within a certain interval, using clamp() makes the code easier to understand than min(max()). Signed-off-by: Li Zetao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Simplify ia_css_pipe_create_cas_scaler_desc_single_output()Andy Shevchenko1-24/+20
Make ia_css_pipe_create_cas_scaler_desc_single_output() easier to read by shortening parameter names. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Replace rarely used macro from math_support.hAndy Shevchenko5-19/+16
Replace rarely used macro by generic ones from Linux kernel headers. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Remove duplicated leftover, i.e. sh_css_dvs_info.hAndy Shevchenko2-38/+0
The contents of sh_css_dvs_info.h are already included in the solely user of this header, drop the former for good. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: bnr: fix trailing statementKartik Kulkarni1-1/+2
Fix checkpatch error trailing statements should be on next line in ia_css_bnr.host.c:48 Signed-off-by: Kartik Kulkarni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: move trailing */ to separate linesSergio de Almeida Cipriano Junior1-2/+4
Fix checkpatch diagnostic "WARNING: Block comments use a trailing */ on a separate line" in assert_support.h file. Signed-off-by: Sergio de Almeida Cipriano Junior <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: move trailing statement to next line.Sakirnth Nagarasa1-1/+2
Fix checkpath error "ERROR: trailing statements should be on next line" in ia_css_fpn.host.c:46. Signed-off-by: Sakirnth Nagarasa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Fix trailing statement in ia_css_de.host.cKathara Sasikumar1-1/+2
Fix checkpatch diagostic of Error : Trailing statements should be on the next line Signed-off-by: Kathara Sasikumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Fix spelling mistakes in atomisp.hRoshan Khatri1-2/+2
codespell reported misspelled coefficients and vector in atomisp.h. This patch corrects the spellings to increase readability and searching. Signed-off-by: Roshan Khatri <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Fix spelling mistakes in atomisp_platform.hRoshan Khatri1-2/+2
Codespell reported misspelled "streams" and "corresponding" in atomisp_platform.h. This patch fixes the misspellings. Signed-off-by: Roshan Khatri <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Fix spelling mistake in csi_rx_public.hRoshan Khatri1-2/+2
codespell reported misspelled "register" in csi_rx_public.h, fix misspellings. Signed-off-by: Roshan Khatri <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06wifi: mt76: partially move channel change code to coreFelix Fietkau39-162/+116
This allows the core code to change the channel. Code deduplication and preparation for adding scanning code to the core. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: fix mt76_get_rateFelix Fietkau1-2/+3
Do not assume that the first phy has 2 GHz support. Check sband->band instead of accessing dev->phy.sband_2g. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06wifi: mt76: mt7603: initialize chainmaskFelix Fietkau1-0/+1
Fixes reported tx power by accounting for the combined output Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>