* Re: [PATCH ath-next v5 2/6] wifi: ath12k: Add ath12k_hw_params for IPQ5424
From: Rameshkumar Sundaram @ 2026-04-07 16:20 UTC (permalink / raw)
To: Raj Kumar Bhagat, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Jeff Johnson
Cc: linux-wireless, devicetree, linux-kernel, ath12k,
Saravanakumar Duraisamy, Baochen Qiang
In-Reply-To: <20260407-ath12k-ipq5424-v5-2-8e96aa660ec4@oss.qualcomm.com>
On 4/7/2026 10:56 AM, Raj Kumar Bhagat wrote:
> From: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
>
> Add ath12k_hw_params for the ath12k AHB-based WiFi 7 device IPQ5424.
> The WiFi device IPQ5424 is similar to IPQ5332. Most of the hardware
> parameters like hw_ops, wmi_init, ring_mask, etc., are the same between
> IPQ5424 and IPQ5332, hence use these same parameters for IPQ5424.
> Some parameters are specific to IPQ5424; initially set these to
> 0 or NULL, and populate them in subsequent patches.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
> Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
> Tested-on: IPQ5424 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
> Signed-off-by: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>
> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath12k/core.h | 1 +
> drivers/net/wireless/ath/ath12k/wifi7/hw.c | 79 ++++++++++++++++++++++++++++++
> 2 files changed, 80 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
> index 59c193b24764..68453594eba8 100644
> --- a/drivers/net/wireless/ath/ath12k/core.h
> +++ b/drivers/net/wireless/ath/ath12k/core.h
> @@ -157,6 +157,7 @@ enum ath12k_hw_rev {
> ATH12K_HW_WCN7850_HW20,
> ATH12K_HW_IPQ5332_HW10,
> ATH12K_HW_QCC2072_HW10,
> + ATH12K_HW_IPQ5424_HW10,
> };
>
> enum ath12k_firmware_mode {
> diff --git a/drivers/net/wireless/ath/ath12k/wifi7/hw.c b/drivers/net/wireless/ath/ath12k/wifi7/hw.c
> index ec6dba96640b..2b5d1f7e9e04 100644
> --- a/drivers/net/wireless/ath/ath12k/wifi7/hw.c
> +++ b/drivers/net/wireless/ath/ath12k/wifi7/hw.c
> @@ -753,6 +753,85 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
>
> .dp_primary_link_only = false,
> },
> + {
> + .name = "ipq5424 hw1.0",
> + .hw_rev = ATH12K_HW_IPQ5424_HW10,
> + .fw = {
> + .dir = "IPQ5424/hw1.0",
> + .board_size = 256 * 1024,
> + .cal_offset = 128 * 1024,
> + .m3_loader = ath12k_m3_fw_loader_remoteproc,
> + .download_aux_ucode = false,
> + },
> + .max_radios = 1,
> + .single_pdev_only = false,
> + .qmi_service_ins_id = ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ5332,
> + .internal_sleep_clock = false,
> +
> + .hw_ops = &qcn9274_ops,
> + .ring_mask = &ath12k_wifi7_hw_ring_mask_ipq5332,
> +
> + .host_ce_config = ath12k_wifi7_host_ce_config_ipq5332,
> + .ce_count = 12,
> + .target_ce_config = ath12k_wifi7_target_ce_config_wlan_ipq5332,
> + .target_ce_count = 12,
> + .svc_to_ce_map =
> + ath12k_wifi7_target_service_to_ce_map_wlan_ipq5332,
> + .svc_to_ce_map_len = 18,
> +
> + .rxdma1_enable = true,
> + .num_rxdma_per_pdev = 1,
> + .num_rxdma_dst_ring = 0,
> + .rx_mac_buf_ring = false,
> + .vdev_start_delay = false,
> +
> + .interface_modes = BIT(NL80211_IFTYPE_STATION) |
> + BIT(NL80211_IFTYPE_AP) |
> + BIT(NL80211_IFTYPE_MESH_POINT),
> + .supports_monitor = true,
> +
> + .idle_ps = false,
> + .download_calib = true,
> + .supports_suspend = false,
> + .tcl_ring_retry = true,
> + .reoq_lut_support = false,
> + .supports_shadow_regs = false,
> +
> + .num_tcl_banks = 48,
> + .max_tx_ring = 4,
> +
> + .mhi_config = NULL,
> +
> + .wmi_init = &ath12k_wifi7_wmi_init_qcn9274,
> +
> + .qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
> +
> + .rfkill_pin = 0,
> + .rfkill_cfg = 0,
> + .rfkill_on_level = 0,
> +
> + .rddm_size = 0,
> +
> + .def_num_link = 0,
> + .max_mlo_peer = 256,
> +
> + .otp_board_id_register = 0,
> +
> + .supports_sta_ps = false,
> +
> + .acpi_guid = NULL,
> + .supports_dynamic_smps_6ghz = false,
> + .iova_mask = 0,
> + .supports_aspm = false,
> +
> + .ce_ie_addr = NULL,
> + .ce_remap = NULL,
> + .bdf_addr_offset = 0x940000,
> +
> + .current_cc_support = false,
> +
> + .dp_primary_link_only = true,
> + },
> };
>
> /* Note: called under rcu_read_lock() */
>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
^ permalink raw reply
* Re: [PATCH wireless 4/4] wifi: mt76: mt7925: fix RCPI chain 3 mask in sta_poll RSSI extraction
From: Joshua Klinesmith @ 2026-04-07 16:00 UTC (permalink / raw)
To: Ben Greear
Cc: linux-wireless, nbd, lorenzo, ryder.lee, shayne.chen, sean.wang,
linux-kernel, stable
In-Reply-To: <d4622e31-4012-4c05-9288-529b0bb0aebd@candelatech.com>
On 4/7/26 11:25, Ben Greear wrote:
> How much of this is AI driven? As far as I know, mt7925 is a 2x2 chipset
> at max. So while the patch may be correct, it may also not matter in practice
> and at least may not need to be backported into stable.
Hi Ben,
Please accept my apologies. You are correct that the mt7925 is a 2x2
chipset, so this does not have a practical impact and should not have
been tagged for stable. I did not read the documentation in its
entirety before submitting, and that is on me.
I will be much more careful and diligent with testing and review going forward.
Thanks for the feedback.
Joshua
On Tue, Apr 7, 2026 at 11:25 AM Ben Greear <greearb@candelatech.com> wrote:
>
> On 4/6/26 16:47, Joshua Klinesmith wrote:
> > The fourth receive chain RCPI uses GENMASK(31, 14), an 18-bit mask
> > spanning bits 14-31. It should be GENMASK(31, 24), an 8-bit mask
> > for the fourth byte, consistent with the other three chains and
> > with the RCPI3 definitions used elsewhere in the driver
> > (MT_PRXV_RCPI3 and MT_TXS7_F0_RCPI_3 both use GENMASK(31, 24)).
>
> Hello Joshua,
>
> How much of this is AI driven? As far as I know, mt7925 is a 2x2 chipset
> at max. So while the patch may be correct, it may also not matter in practice
> and at least may not need to be backported into stable. If it is a minor
> cleanup that doesn't actually matter, that should be described more clearly
> in the commit message?
>
> Some of your patches are touching tricky parts of the code and making
> subtle comparisons against how the vendor's driver is written. How well has
> this been tested and reviewed by a knowledgeable human in general?
>
> Thanks,
> Ben
>
> >
> > On devices with fewer than 4 antenna chains, the corrupted value
> > is masked out by antenna_mask in mt76_rx_signal(). On 4-chain
> > devices, this produces incorrect ACK signal strength readings.
> >
> > Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Joshua Klinesmith <joshuaklinesmith@gmail.com>
> > ---
> > drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
> > index 6334019249..85e91ca84f 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
> > @@ -144,7 +144,7 @@ static void mt7925_mac_sta_poll(struct mt792x_dev *dev)
> > rssi[0] = to_rssi(GENMASK(7, 0), val);
> > rssi[1] = to_rssi(GENMASK(15, 8), val);
> > rssi[2] = to_rssi(GENMASK(23, 16), val);
> > - rssi[3] = to_rssi(GENMASK(31, 14), val);
> > + rssi[3] = to_rssi(GENMASK(31, 24), val);
> >
> > mlink->ack_signal =
> > mt76_rx_signal(msta->vif->phy->mt76->antenna_mask, rssi);
>
> --
> Ben Greear <greearb@candelatech.com>
> Candela Technologies Inc http://www.candelatech.com
>
^ permalink raw reply
* Re: [PATCH 3/3] wifi: Transition/Padding delay subfields are for both EMLSR and EMLMR
From: Pablo MARTIN-GOMEZ @ 2026-04-07 15:47 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <6900294c6c10fb7336e8ca6c7217e970db2cc3a1.camel@sipsolutions.net>
On 07/04/2026 16:00, Johannes Berg wrote:
> On Fri, 2026-03-27 at 21:11 +0100, Pablo Martin-Gomez wrote:
>> -#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY 0x0070
>> +#define IEEE80211_EML_CAP_EMLSR_EMLMR_TRANSITION_DELAY 0x0070
>> #define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_0US 0
>> #define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_16US 1
>> #define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_32US 2
>
> I think this is confusing. You have the "EMLSR_EMLMR_" prefix in the
> definition for the mask, but not in the values, but also the prefix
> itself gets very long, not sure what to do about that. Maybe just
> ..._EML_TRANSITION_DELAY even if it doesn't match the spec completely.
In the standard, there is two different tables to convert the field
value to a delay: 9-417j for EMLSR and 9-417l for EMLMR. E.g. if the
field has the value 1, in EMLSR mode, it's a 16 µs delay, in EMLMR mode,
it's a 32 µs delay.
As no driver implements EMLMR, I was expecting the first one to
implement it to create the defines:
```
#define IEEE80211_EML_CAP_EMLMR_TRANSITION_DELAY_0US 0
#define IEEE80211_EML_CAP_EMLMR_TRANSITION_DELAY_32US 1
[...]
```
If you prefer, I can implement it +
`ieee80211_emlmr_[trans/pad]_delay_in_us` but it will be dead code for now.
>
> And then another thing - I was going to apply the other two patches, but
> really then looked at my git log and saw that no, really, the subjects
> are stating a spec thing rather than describing a change, so please fix
> that too.
I'll fix that in a v2
>
> johannes
Pablo MG
^ permalink raw reply
* [PATCH mt76] wifi: mt76: mt76x2u: Add support for ELECOM WDC-867SU3S
From: Zenm Chen @ 2026-04-07 15:44 UTC (permalink / raw)
To: nbd, lorenzo, ryder.lee, shayne.chen, sean.wang, matthias.bgg,
angelogioacchino.delregno, linux-wireless, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: zenmchen, stable
Add the ID 056e:400a to the table to support an additional MT7612U
adapter: ELECOM WDC-867SU3S.
Compile tested only.
Cc: stable@vger.kernel.org # 5.10.x
Signed-off-by: Zenm Chen <zenmchen@gmail.com>
---
This ID was found from [1] and adding it to the device table should be
enough to make it work. Hardware probes at [2] can prove its existence.
[1] https://bushowhige.blogspot.com/2019/08/ubuntu-1804-mediatek-usb-wi-fi.html
[2] https://linux-hardware.org/?id=usb:056e-400a
---
drivers/net/wireless/mediatek/mt76/mt76x2/usb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
index 01cb3b283..459c4044f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
@@ -16,6 +16,7 @@ static const struct usb_device_id mt76x2u_device_table[] = {
{ USB_DEVICE(0x0e8d, 0x7612) }, /* Aukey USBAC1200 - Alfa AWUS036ACM */
{ USB_DEVICE(0x057c, 0x8503) }, /* Avm FRITZ!WLAN AC860 */
{ USB_DEVICE(0x7392, 0xb711) }, /* Edimax EW 7722 UAC */
+ { USB_DEVICE(0x056e, 0x400a) }, /* ELECOM WDC-867SU3S */
{ USB_DEVICE(0x0e8d, 0x7632) }, /* HC-M7662BU1 */
{ USB_DEVICE(0x0471, 0x2126) }, /* LiteOn WN4516R module, nonstandard USB connector */
{ USB_DEVICE(0x0471, 0x7600) }, /* LiteOn WN4519R module, nonstandard USB connector */
--
2.53.0
^ permalink raw reply related
* Re: [PATCH wireless 4/4] wifi: mt76: mt7925: fix RCPI chain 3 mask in sta_poll RSSI extraction
From: Ben Greear @ 2026-04-07 15:25 UTC (permalink / raw)
To: Joshua Klinesmith, linux-wireless
Cc: nbd, lorenzo, ryder.lee, shayne.chen, sean.wang, linux-kernel,
stable
In-Reply-To: <20260406234739.29926-5-joshuaklinesmith@gmail.com>
On 4/6/26 16:47, Joshua Klinesmith wrote:
> The fourth receive chain RCPI uses GENMASK(31, 14), an 18-bit mask
> spanning bits 14-31. It should be GENMASK(31, 24), an 8-bit mask
> for the fourth byte, consistent with the other three chains and
> with the RCPI3 definitions used elsewhere in the driver
> (MT_PRXV_RCPI3 and MT_TXS7_F0_RCPI_3 both use GENMASK(31, 24)).
Hello Joshua,
How much of this is AI driven? As far as I know, mt7925 is a 2x2 chipset
at max. So while the patch may be correct, it may also not matter in practice
and at least may not need to be backported into stable. If it is a minor
cleanup that doesn't actually matter, that should be described more clearly
in the commit message?
Some of your patches are touching tricky parts of the code and making
subtle comparisons against how the vendor's driver is written. How well has
this been tested and reviewed by a knowledgeable human in general?
Thanks,
Ben
>
> On devices with fewer than 4 antenna chains, the corrupted value
> is masked out by antenna_mask in mt76_rx_signal(). On 4-chain
> devices, this produces incorrect ACK signal strength readings.
>
> Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
> Cc: stable@vger.kernel.org
> Signed-off-by: Joshua Klinesmith <joshuaklinesmith@gmail.com>
> ---
> drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
> index 6334019249..85e91ca84f 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
> @@ -144,7 +144,7 @@ static void mt7925_mac_sta_poll(struct mt792x_dev *dev)
> rssi[0] = to_rssi(GENMASK(7, 0), val);
> rssi[1] = to_rssi(GENMASK(15, 8), val);
> rssi[2] = to_rssi(GENMASK(23, 16), val);
> - rssi[3] = to_rssi(GENMASK(31, 14), val);
> + rssi[3] = to_rssi(GENMASK(31, 24), val);
>
> mlink->ack_signal =
> mt76_rx_signal(msta->vif->phy->mt76->antenna_mask, rssi);
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH ath-next] wifi: ath12k: Support channel change stats
From: Jeff Johnson @ 2026-04-07 15:22 UTC (permalink / raw)
To: Baochen Qiang, Roopni Devanathan, ath12k
Cc: linux-wireless, Harish Rachakonda
In-Reply-To: <63acfa83-753c-4b45-8f11-8e18e760cbf2@oss.qualcomm.com>
On 4/6/2026 8:23 PM, Baochen Qiang wrote:
> On 3/26/2026 1:06 PM, Roopni Devanathan wrote:
>> Note: WCN7850 firmware does not support HTT stats type 76.
>
> this note also applies to QCC2072.
I've updated this in 'pending'
https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git/commit/?h=pending&id=a9adb8f605d5660f1db49f8cbec51ff73b4b7be8
^ permalink raw reply
* Re: [PATCH v4 net-next] net: use get_random_u{16,32,64}() where appropriate
From: Eric Dumazet @ 2026-04-07 15:14 UTC (permalink / raw)
To: David Carlier
Cc: Jakub Kicinski, David S . Miller, Paolo Abeni, Andrew Lunn,
Simon Horman, Ilya Dryomov, Johannes Berg, Matthieu Baerts,
Mat Martineau, Geliang Tang, Aaron Conole, Ilya Maximets,
Marcelo Ricardo Leitner, Xin Long, Jon Maloy, netdev,
linux-wireless, mptcp, dev, linux-sctp, tipc-discussion,
linux-kernel
In-Reply-To: <20260407150758.5889-1-devnexen@gmail.com>
On Tue, Apr 7, 2026 at 8:08 AM David Carlier <devnexen@gmail.com> wrote:
>
> Use the typed random integer helpers instead of
> get_random_bytes() when filling a single integer variable.
> The helpers return the value directly, require no pointer
> or size argument, and better express intent.
>
> Skipped sites writing into __be16 (netdevsim) and __le64
> (ceph) fields where a direct assignment would trigger
> sparse endianness warnings.
>
> Signed-off-by: David Carlier <devnexen@gmail.com>
> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply
* Re: [PATCH v6] wifi: ath9k: Obtain system GPIOS from descriptors
From: Michał Kępień @ 2026-04-07 15:13 UTC (permalink / raw)
To: Linus Walleij
Cc: Jeff Johnson, Andy Shevchenko, Arnd Bergmann, Alban Bedel,
Bartosz Golaszewski, Toke Høiland-Jørgensen,
linux-wireless, brcm80211-dev-list.pdl, linux-gpio,
Bartosz Golaszewski
In-Reply-To: <20260317-descriptors-wireless-v6-1-b19ecff9cd2b@kernel.org>
Linus,
> The ath9k has an odd use of system-wide GPIOs: if the chip
> does not have internal GPIO capability, it will try to obtain a
> GPIO line from the system GPIO controller:
>
> if (BIT(gpio) & ah->caps.gpio_mask)
> ath9k_hw_gpio_cfg_wmac(...);
> else if (AR_SREV_SOC(ah))
> ath9k_hw_gpio_cfg_soc(ah, gpio, out, label);
>
> Where ath9k_hw_gpio_cfg_soc() will attempt to issue
> gpio_request_one() passing the local GPIO number of the controller
> (0..31) to gpio_request_one().
>
> This is somewhat peculiar and possibly even dangerous: there is
> nowadays no guarantee of the numbering of these system-wide
> GPIOs, and assuming that GPIO 0..31 as used by ath9k would
> correspond to GPIOs 0..31 on the system as a whole seems a bit
> wild.
>
> Register all 32 GPIOs at index 0..31 directly in the ATH79K
> GPIO driver and associate with the NULL device (making them
> widely available) if and only if we are probing ATH79K wifi
> from the AHB bus (used for SoCs). We obtain these offsets from
> the NULL device if necessary.
>
> These GPIOs should ideally be defined in the device tree
> instead, but we have no control over that for the legacy
> code path.
>
> Testcompiled with the ath79 defconfig.
I could only test a 6.12 backport of v6 on real hardware as that is the
kernel version that OpenWRT's current main branch uses for my router.
That being said, the only conflict I had to resolve was the one caused
by commit 551a097118391018ddc4079cbcec6fe4e7d64bc5 ("gpio: ath79: use
new generic GPIO chip API") in ath79_gpio_probe(), i.e. no functional
changes were necessary.
After replacing the "tweaked" version of v2 with a 6.12 backport of v6
in OpenWRT's source tree, the WiFi LED still works fine on my router.
For the above:
Tested-by: Michał Kępień <kernel@kempniu.pl>
--
Best regards,
Michał Kępień
^ permalink raw reply
* [PATCH v2 3/3] wifi: libertas_tf: refactor endpoint lookup
From: Johan Hovold @ 2026-04-07 15:11 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, libertas-dev, linux-kernel, Johan Hovold
In-Reply-To: <20260407151111.3187826-1-johan@kernel.org>
Use the common USB helpers for looking up bulk and interrupt endpoints
(and determining max packet size) instead of open coding.
Note that the driver has an implicit max packet size check which is
kept.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
.../net/wireless/marvell/libertas_tf/if_usb.c | 46 +++++++++----------
1 file changed, 21 insertions(+), 25 deletions(-)
diff --git a/drivers/net/wireless/marvell/libertas_tf/if_usb.c b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
index 07b38f2b8f58..b85c6d783bf7 100644
--- a/drivers/net/wireless/marvell/libertas_tf/if_usb.c
+++ b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
@@ -144,12 +144,12 @@ static const struct lbtf_ops if_usb_ops = {
static int if_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
+ struct usb_endpoint_descriptor *ep_in, *ep_out;
struct usb_device *udev;
struct usb_host_interface *iface_desc;
- struct usb_endpoint_descriptor *endpoint;
struct lbtf_private *priv;
struct if_usb_card *cardp;
- int i;
+ int ret;
lbtf_deb_enter(LBTF_DEB_USB);
udev = interface_to_usbdev(intf);
@@ -171,31 +171,27 @@ static int if_usb_probe(struct usb_interface *intf,
udev->descriptor.bDeviceSubClass,
udev->descriptor.bDeviceProtocol);
- for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
- endpoint = &iface_desc->endpoint[i].desc;
- if (usb_endpoint_is_bulk_in(endpoint)) {
- cardp->ep_in_size =
- le16_to_cpu(endpoint->wMaxPacketSize);
- cardp->ep_in = usb_endpoint_num(endpoint);
-
- lbtf_deb_usbd(&udev->dev, "in_endpoint = %d\n",
- cardp->ep_in);
- lbtf_deb_usbd(&udev->dev, "Bulk in size is %d\n",
- cardp->ep_in_size);
- } else if (usb_endpoint_is_bulk_out(endpoint)) {
- cardp->ep_out_size =
- le16_to_cpu(endpoint->wMaxPacketSize);
- cardp->ep_out = usb_endpoint_num(endpoint);
-
- lbtf_deb_usbd(&udev->dev, "out_endpoint = %d\n",
- cardp->ep_out);
- lbtf_deb_usbd(&udev->dev, "Bulk out size is %d\n",
- cardp->ep_out_size);
- }
+ ret = usb_find_common_endpoints_reverse(iface_desc, &ep_in, &ep_out,
+ NULL, NULL);
+ if (ret) {
+ lbtf_deb_usbd(&udev->dev, "Endpoints not found\n");
+ goto dealloc;
}
+
+ cardp->ep_in_size = usb_endpoint_maxp(ep_in);
+ cardp->ep_in = usb_endpoint_num(ep_in);
+
+ lbtf_deb_usbd(&udev->dev, "in_endpoint = %d\n", cardp->ep_in);
+ lbtf_deb_usbd(&udev->dev, "Bulk in size is %d\n", cardp->ep_in_size);
+
+ cardp->ep_out_size = usb_endpoint_maxp(ep_out);
+ cardp->ep_out = usb_endpoint_num(ep_out);
+
+ lbtf_deb_usbd(&udev->dev, "out_endpoint = %d\n", cardp->ep_out);
+ lbtf_deb_usbd(&udev->dev, "Bulk out size is %d\n", cardp->ep_out_size);
+
if (!cardp->ep_out_size || !cardp->ep_in_size) {
- lbtf_deb_usbd(&udev->dev, "Endpoints not found\n");
- /* Endpoints not found */
+ lbtf_deb_usbd(&udev->dev, "Endpoints not valid\n");
goto dealloc;
}
--
2.52.0
^ permalink raw reply related
* [PATCH v2 2/3] wifi: libertas: refactor endpoint lookup
From: Johan Hovold @ 2026-04-07 15:11 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, libertas-dev, linux-kernel, Johan Hovold
In-Reply-To: <20260407151111.3187826-1-johan@kernel.org>
Use the common USB helpers for looking up bulk and interrupt endpoints
(and determining max packet size) instead of open coding.
Note that the driver has an implicit max packet size check which is
kept.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
.../net/wireless/marvell/libertas/if_usb.c | 33 +++++++++----------
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/drivers/net/wireless/marvell/libertas/if_usb.c b/drivers/net/wireless/marvell/libertas/if_usb.c
index 176f2106bab6..4fae0e335136 100644
--- a/drivers/net/wireless/marvell/libertas/if_usb.c
+++ b/drivers/net/wireless/marvell/libertas/if_usb.c
@@ -193,13 +193,12 @@ static void if_usb_reset_olpc_card(struct lbs_private *priv)
static int if_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
+ struct usb_endpoint_descriptor *ep_in, *ep_out;
struct usb_device *udev;
struct usb_host_interface *iface_desc;
- struct usb_endpoint_descriptor *endpoint;
struct lbs_private *priv;
struct if_usb_card *cardp;
int r = -ENOMEM;
- int i;
udev = interface_to_usbdev(intf);
@@ -224,25 +223,25 @@ static int if_usb_probe(struct usb_interface *intf,
init_usb_anchor(&cardp->rx_submitted);
init_usb_anchor(&cardp->tx_submitted);
- for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
- endpoint = &iface_desc->endpoint[i].desc;
- if (usb_endpoint_is_bulk_in(endpoint)) {
- cardp->ep_in_size = le16_to_cpu(endpoint->wMaxPacketSize);
- cardp->ep_in = usb_endpoint_num(endpoint);
+ if (usb_find_common_endpoints_reverse(iface_desc, &ep_in, &ep_out, NULL, NULL)) {
+ lbs_deb_usbd(&udev->dev, "Endpoints not found\n");
+ goto dealloc;
+ }
- lbs_deb_usbd(&udev->dev, "in_endpoint = %d\n", cardp->ep_in);
- lbs_deb_usbd(&udev->dev, "Bulk in size is %d\n", cardp->ep_in_size);
+ cardp->ep_in_size = usb_endpoint_maxp(ep_in);
+ cardp->ep_in = usb_endpoint_num(ep_in);
- } else if (usb_endpoint_is_bulk_out(endpoint)) {
- cardp->ep_out_size = le16_to_cpu(endpoint->wMaxPacketSize);
- cardp->ep_out = usb_endpoint_num(endpoint);
+ lbs_deb_usbd(&udev->dev, "in_endpoint = %d\n", cardp->ep_in);
+ lbs_deb_usbd(&udev->dev, "Bulk in size is %d\n", cardp->ep_in_size);
+
+ cardp->ep_out_size = usb_endpoint_maxp(ep_out);
+ cardp->ep_out = usb_endpoint_num(ep_out);
+
+ lbs_deb_usbd(&udev->dev, "out_endpoint = %d\n", cardp->ep_out);
+ lbs_deb_usbd(&udev->dev, "Bulk out size is %d\n", cardp->ep_out_size);
- lbs_deb_usbd(&udev->dev, "out_endpoint = %d\n", cardp->ep_out);
- lbs_deb_usbd(&udev->dev, "Bulk out size is %d\n", cardp->ep_out_size);
- }
- }
if (!cardp->ep_out_size || !cardp->ep_in_size) {
- lbs_deb_usbd(&udev->dev, "Endpoints not found\n");
+ lbs_deb_usbd(&udev->dev, "Endpoints not valid\n");
goto dealloc;
}
if (!(cardp->rx_urb = usb_alloc_urb(0, GFP_KERNEL))) {
--
2.52.0
^ permalink raw reply related
* [PATCH v2 0/3] wifi: refactor USB endpoint lookups
From: Johan Hovold @ 2026-04-07 15:11 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, libertas-dev, linux-kernel, Johan Hovold
Use the common USB helper for looking up bulk and interrupt endpoints
instead of open coding.
Johan
Changes in v2:
- rebase on wireless-next
Johan Hovold (3):
wifi: at76c50x: refactor endpoint lookup
wifi: libertas: refactor endpoint lookup
wifi: libertas_tf: refactor endpoint lookup
drivers/net/wireless/atmel/at76c50x-usb.c | 22 ++-------
.../net/wireless/marvell/libertas/if_usb.c | 33 +++++++------
.../net/wireless/marvell/libertas_tf/if_usb.c | 46 +++++++++----------
3 files changed, 41 insertions(+), 60 deletions(-)
--
2.52.0
^ permalink raw reply
* [PATCH v2 1/3] wifi: at76c50x: refactor endpoint lookup
From: Johan Hovold @ 2026-04-07 15:11 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, libertas-dev, linux-kernel, Johan Hovold
In-Reply-To: <20260407151111.3187826-1-johan@kernel.org>
Use the common USB helper for looking up bulk and interrupt endpoints
instead of open coding.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/wireless/atmel/at76c50x-usb.c | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)
diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c
index 44b04ea3cc8b..32e3e09e7680 100644
--- a/drivers/net/wireless/atmel/at76c50x-usb.c
+++ b/drivers/net/wireless/atmel/at76c50x-usb.c
@@ -2226,34 +2226,20 @@ static struct at76_priv *at76_alloc_new_device(struct usb_device *udev)
static int at76_alloc_urbs(struct at76_priv *priv,
struct usb_interface *interface)
{
- struct usb_endpoint_descriptor *endpoint, *ep_in, *ep_out;
- int i;
+ struct usb_endpoint_descriptor *ep_in, *ep_out;
int buffer_size;
struct usb_host_interface *iface_desc;
+ int ret;
at76_dbg(DBG_PROC_ENTRY, "%s: ENTER", __func__);
at76_dbg(DBG_URB, "%s: NumEndpoints %d ", __func__,
interface->cur_altsetting->desc.bNumEndpoints);
- ep_in = NULL;
- ep_out = NULL;
iface_desc = interface->cur_altsetting;
- for (i = 0; i < iface_desc->desc.bNumEndpoints; i++) {
- endpoint = &iface_desc->endpoint[i].desc;
-
- at76_dbg(DBG_URB, "%s: %d. endpoint: addr 0x%x attr 0x%x",
- __func__, i, endpoint->bEndpointAddress,
- endpoint->bmAttributes);
-
- if (!ep_in && usb_endpoint_is_bulk_in(endpoint))
- ep_in = endpoint;
- if (!ep_out && usb_endpoint_is_bulk_out(endpoint))
- ep_out = endpoint;
- }
-
- if (!ep_in || !ep_out) {
+ ret = usb_find_common_endpoints(iface_desc, &ep_in, &ep_out, NULL, NULL);
+ if (ret) {
dev_err(&interface->dev, "bulk endpoints missing\n");
return -ENXIO;
}
--
2.52.0
^ permalink raw reply related
* [PATCH v4 net-next] net: use get_random_u{16,32,64}() where appropriate
From: David Carlier @ 2026-04-07 15:07 UTC (permalink / raw)
To: Jakub Kicinski, David S . Miller, Eric Dumazet, Paolo Abeni
Cc: Andrew Lunn, Simon Horman, Ilya Dryomov, Johannes Berg,
Matthieu Baerts, Mat Martineau, Geliang Tang, Aaron Conole,
Ilya Maximets, Marcelo Ricardo Leitner, Xin Long, Jon Maloy,
netdev, linux-wireless, mptcp, dev, linux-sctp, tipc-discussion,
linux-kernel, David Carlier
Use the typed random integer helpers instead of
get_random_bytes() when filling a single integer variable.
The helpers return the value directly, require no pointer
or size argument, and better express intent.
Skipped sites writing into __be16 (netdevsim) and __le64
(ceph) fields where a direct assignment would trigger
sparse endianness warnings.
Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Notes:
Changes v3 -> v4:
- Dropped net/ceph/auth_x.c site: client_challenge is __le64,
direct assignment triggers sparse endianness warning
(Matthieu Baerts)
- Added Reviewed-by from Matthieu Baerts for net/mptcp changes
v3: https://lore.kernel.org/netdev/20260405154816.4774-1-devnexen@gmail.com/
v2: https://lore.kernel.org/netdev/Z/BfE0zn+DJxhBH7@debian/
drivers/net/netdevsim/psample.c | 4 ++--
net/core/net_namespace.c | 2 +-
net/mac80211/mesh_plink.c | 2 +-
net/mptcp/subflow.c | 4 ++--
net/openvswitch/flow_table.c | 2 +-
net/sctp/sm_make_chunk.c | 4 ++--
net/tipc/node.c | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/netdevsim/psample.c b/drivers/net/netdevsim/psample.c
index 47d24bc64ee4..717d157c3ae2 100644
--- a/drivers/net/netdevsim/psample.c
+++ b/drivers/net/netdevsim/psample.c
@@ -94,7 +94,7 @@ static void nsim_dev_psample_md_prepare(const struct nsim_dev_psample *psample,
if (psample->out_tc_occ_max) {
u64 out_tc_occ;
- get_random_bytes(&out_tc_occ, sizeof(u64));
+ out_tc_occ = get_random_u64();
md->out_tc_occ = out_tc_occ & (psample->out_tc_occ_max - 1);
md->out_tc_occ_valid = 1;
}
@@ -102,7 +102,7 @@ static void nsim_dev_psample_md_prepare(const struct nsim_dev_psample *psample,
if (psample->latency_max) {
u64 latency;
- get_random_bytes(&latency, sizeof(u64));
+ latency = get_random_u64();
md->latency = latency & (psample->latency_max - 1);
md->latency_valid = 1;
}
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 1057d16d5dd2..deb8b2ec5674 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -411,7 +411,7 @@ static __net_init int preinit_net(struct net *net, struct user_namespace *user_n
ref_tracker_dir_init(&net->refcnt_tracker, 128, "net_refcnt");
ref_tracker_dir_init(&net->notrefcnt_tracker, 128, "net_notrefcnt");
- get_random_bytes(&net->hash_mix, sizeof(u32));
+ net->hash_mix = get_random_u32();
net->dev_base_seq = 1;
net->user_ns = user_ns;
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 803106fc3134..7cbab90c8784 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -712,7 +712,7 @@ void mesh_plink_timer(struct timer_list *t)
"Mesh plink for %pM (retry, timeout): %d %d\n",
sta->sta.addr, sta->mesh->plink_retries,
sta->mesh->plink_timeout);
- get_random_bytes(&rand, sizeof(u32));
+ rand = get_random_u32();
sta->mesh->plink_timeout = sta->mesh->plink_timeout +
rand % sta->mesh->plink_timeout;
++sta->mesh->plink_retries;
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 5cfe19990f31..1a7736145dbc 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -72,7 +72,7 @@ static void subflow_req_create_thmac(struct mptcp_subflow_request_sock *subflow_
struct mptcp_sock *msk = subflow_req->msk;
u8 hmac[SHA256_DIGEST_SIZE];
- get_random_bytes(&subflow_req->local_nonce, sizeof(u32));
+ subflow_req->local_nonce = get_random_u32();
subflow_generate_hmac(READ_ONCE(msk->local_key),
READ_ONCE(msk->remote_key),
@@ -1639,7 +1639,7 @@ int __mptcp_subflow_connect(struct sock *sk, const struct mptcp_pm_local *local,
ssk = sf->sk;
subflow = mptcp_subflow_ctx(ssk);
do {
- get_random_bytes(&subflow->local_nonce, sizeof(u32));
+ subflow->local_nonce = get_random_u32();
} while (!subflow->local_nonce);
/* if 'IPADDRANY', the ID will be set later, after the routing */
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index 61c6a5f77c2e..67d5b8c0fe79 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -167,7 +167,7 @@ static struct table_instance *table_instance_alloc(int new_size)
ti->n_buckets = new_size;
ti->node_ver = 0;
- get_random_bytes(&ti->hash_seed, sizeof(u32));
+ ti->hash_seed = get_random_u32();
return ti;
}
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 2c0017d058d4..de86ac088289 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -2727,7 +2727,7 @@ __u32 sctp_generate_tag(const struct sctp_endpoint *ep)
__u32 x;
do {
- get_random_bytes(&x, sizeof(__u32));
+ x = get_random_u32();
} while (x == 0);
return x;
@@ -2738,7 +2738,7 @@ __u32 sctp_generate_tsn(const struct sctp_endpoint *ep)
{
__u32 retval;
- get_random_bytes(&retval, sizeof(__u32));
+ retval = get_random_u32();
return retval;
}
diff --git a/net/tipc/node.c b/net/tipc/node.c
index af442a5ef8f3..97aa970a0d83 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -1275,7 +1275,7 @@ void tipc_node_check_dest(struct net *net, u32 addr,
goto exit;
if_name = strchr(b->name, ':') + 1;
- get_random_bytes(&session, sizeof(u16));
+ session = get_random_u16();
if (!tipc_link_create(net, if_name, b->identity, b->tolerance,
b->net_plane, b->mtu, b->priority,
b->min_win, b->max_win, session,
--
2.53.0
^ permalink raw reply related
* Re: [PATCH wireless v2] wifi: mt76: mt7996: replace direct WTBL access with MCU for station statistics
From: kernel test robot @ 2026-04-07 14:56 UTC (permalink / raw)
To: Joshua Klinesmith, linux-wireless
Cc: llvm, oe-kbuild-all, nbd, lorenzo, ryder.lee, shayne.chen,
sean.wang, Joshua Klinesmith
In-Reply-To: <20260407053855.75828-1-joshuaklinesmith@gmail.com>
Hi Joshua,
kernel test robot noticed the following build errors:
[auto build test ERROR on wireless/main]
[also build test ERROR on linus/master v7.0-rc7 next-20260406]
[cannot apply to wireless-next/main]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Joshua-Klinesmith/wifi-mt76-mt7996-replace-direct-WTBL-access-with-MCU-for-station-statistics/20260407-151612
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git main
patch link: https://lore.kernel.org/r/20260407053855.75828-1-joshuaklinesmith%40gmail.com
patch subject: [PATCH wireless v2] wifi: mt76: mt7996: replace direct WTBL access with MCU for station statistics
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20260407/202604072218.tGCSoRNR-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260407/202604072218.tGCSoRNR-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604072218.tGCSoRNR-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4870:10: error: incompatible pointer types assigning to 'struct mt76_vif_link *' from 'struct mt76_vif_data *' [-Werror,-Wincompatible-pointer-types]
4870 | mvif = &msta_link->sta->vif->mt76;
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
include/linux/rcupdate.h:752:50: note: expanded from macro 'rcu_dereference'
752 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^
include/linux/rcupdate.h:662:27: note: expanded from macro 'rcu_dereference_check'
662 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
| ^
include/linux/rcupdate.h:514:10: note: expanded from macro '__rcu_dereference_check'
514 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
include/linux/rcupdate.h:752:50: note: expanded from macro 'rcu_dereference'
752 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^
include/linux/rcupdate.h:662:27: note: expanded from macro 'rcu_dereference_check'
662 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
| ^
include/linux/rcupdate.h:514:31: note: expanded from macro '__rcu_dereference_check'
514 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
include/linux/rcupdate.h:752:50: note: expanded from macro 'rcu_dereference'
752 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^
include/linux/rcupdate.h:662:27: note: expanded from macro 'rcu_dereference_check'
662 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
| ^
include/linux/rcupdate.h:514:53: note: expanded from macro '__rcu_dereference_check'
514 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:706:22: note: expanded from macro 'compiletime_assert'
706 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:694:23: note: expanded from macro '_compiletime_assert'
694 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:686:9: note: expanded from macro '__compiletime_assert'
686 | if (!(condition)) \
| ^~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
include/linux/rcupdate.h:752:50: note: expanded from macro 'rcu_dereference'
752 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^
include/linux/rcupdate.h:662:27: note: expanded from macro 'rcu_dereference_check'
662 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
| ^
include/linux/rcupdate.h:514:53: note: expanded from macro '__rcu_dereference_check'
514 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:706:22: note: expanded from macro 'compiletime_assert'
706 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:694:23: note: expanded from macro '_compiletime_assert'
694 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:686:9: note: expanded from macro '__compiletime_assert'
686 | if (!(condition)) \
| ^~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
include/linux/rcupdate.h:752:50: note: expanded from macro 'rcu_dereference'
752 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^
include/linux/rcupdate.h:662:27: note: expanded from macro 'rcu_dereference_check'
662 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
| ^
include/linux/rcupdate.h:514:53: note: expanded from macro '__rcu_dereference_check'
514 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:706:22: note: expanded from macro 'compiletime_assert'
706 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:694:23: note: expanded from macro '_compiletime_assert'
694 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:686:9: note: expanded from macro '__compiletime_assert'
686 | if (!(condition)) \
| ^~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
include/linux/rcupdate.h:752:50: note: expanded from macro 'rcu_dereference'
752 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^
include/linux/rcupdate.h:662:27: note: expanded from macro 'rcu_dereference_check'
662 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
| ^
include/linux/rcupdate.h:514:53: note: expanded from macro '__rcu_dereference_check'
514 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:706:22: note: expanded from macro 'compiletime_assert'
706 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:694:23: note: expanded from macro '_compiletime_assert'
694 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:686:9: note: expanded from macro '__compiletime_assert'
686 | if (!(condition)) \
| ^~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
include/linux/rcupdate.h:752:50: note: expanded from macro 'rcu_dereference'
752 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^
include/linux/rcupdate.h:662:27: note: expanded from macro 'rcu_dereference_check'
662 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
| ^
include/linux/rcupdate.h:514:53: note: expanded from macro '__rcu_dereference_check'
514 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:706:22: note: expanded from macro 'compiletime_assert'
706 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:694:23: note: expanded from macro '_compiletime_assert'
694 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:686:9: note: expanded from macro '__compiletime_assert'
686 | if (!(condition)) \
| ^~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
include/linux/rcupdate.h:752:50: note: expanded from macro 'rcu_dereference'
752 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^
include/linux/rcupdate.h:662:27: note: expanded from macro 'rcu_dereference_check'
662 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
| ^
include/linux/rcupdate.h:514:53: note: expanded from macro '__rcu_dereference_check'
514 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
50 | __READ_ONCE(x); \
| ^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/compiler_types.h:642:53: note: expanded from macro '__unqual_scalar_typeof'
642 | #define __unqual_scalar_typeof(x) __typeof_unqual__(x)
| ^
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
include/linux/rcupdate.h:752:50: note: expanded from macro 'rcu_dereference'
752 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^
include/linux/rcupdate.h:662:27: note: expanded from macro 'rcu_dereference_check'
662 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
| ^
include/linux/rcupdate.h:514:53: note: expanded from macro '__rcu_dereference_check'
514 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
50 | __READ_ONCE(x); \
| ^
include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
include/linux/rcupdate.h:752:50: note: expanded from macro 'rcu_dereference'
752 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^
include/linux/rcupdate.h:662:27: note: expanded from macro 'rcu_dereference_check'
662 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
| ^
include/linux/rcupdate.h:517:12: note: expanded from macro '__rcu_dereference_check'
517 | ((typeof(*p) __force __kernel *)(local)); \
| ^
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:11: error: assigning to 'struct mt76_vif_link *' from incompatible type 'void'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 errors generated.
vim +4870 drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
4786
4787 int mt7996_mcu_get_per_sta_info(struct mt7996_phy *phy, u16 tag)
4788 {
4789 struct mt7996_dev *dev = phy->dev;
4790 struct mt7996_mcu_per_sta_info_event *res;
4791 struct mt76_wcid *wcid;
4792 struct sk_buff *skb;
4793 int i, ret, sta_num, resp_sta_num;
4794 int wcid_idx = 0;
4795 struct {
4796 u8 _rsv1;
4797 u8 unsolicit;
4798 u8 _rsv2[2];
4799
4800 __le16 tag;
4801 __le16 len;
4802 __le16 sta_num;
4803 u8 _rsv3[2];
4804 __le16 wlan_idx[PER_STA_INFO_MAX_NUM];
4805 } __packed req = {
4806 .tag = cpu_to_le16(tag),
4807 .len = cpu_to_le16(sizeof(req) - 4),
4808 };
4809
4810 while (wcid_idx < mt7996_wtbl_size(dev)) {
4811 sta_num = 0;
4812
4813 rcu_read_lock();
4814 for (i = wcid_idx;
4815 i < mt7996_wtbl_size(dev) && sta_num < PER_STA_INFO_MAX_NUM;
4816 i++) {
4817 wcid = rcu_dereference(dev->mt76.wcid[i]);
4818 if (!wcid || !wcid->sta)
4819 continue;
4820 req.wlan_idx[sta_num++] = cpu_to_le16(i);
4821 }
4822 rcu_read_unlock();
4823 wcid_idx = i;
4824
4825 if (!sta_num)
4826 continue;
4827
4828 req.sta_num = cpu_to_le16(sta_num);
4829
4830 ret = mt76_mcu_send_and_get_msg(&dev->mt76,
4831 MCU_WM_UNI_CMD(PER_STA_INFO),
4832 &req, sizeof(req), true, &skb);
4833 if (ret)
4834 return ret;
4835
4836 res = (struct mt7996_mcu_per_sta_info_event *)skb->data;
4837
4838 resp_sta_num = le16_to_cpu(res->sta_num);
4839 if (resp_sta_num > sta_num ||
4840 skb->len < struct_size(res, rssi, resp_sta_num)) {
4841 dev_kfree_skb(skb);
4842 return -EINVAL;
4843 }
4844
4845 rcu_read_lock();
4846 for (i = 0; i < resp_sta_num; i++) {
4847 struct mt7996_sta_link *msta_link;
4848 struct mt76_vif_link *mvif;
4849 struct mt76_vif_link *mlink;
4850 struct mt76_phy *mphy;
4851 u16 wlan_idx;
4852 s8 rssi[4];
4853
4854 switch (tag) {
4855 case UNI_PER_STA_RSSI:
4856 wlan_idx = le16_to_cpu(res->rssi[i].wlan_idx);
4857 wcid = mt76_wcid_ptr(dev, wlan_idx);
4858 if (!wcid || !wcid->sta)
4859 break;
4860
4861 msta_link = container_of(wcid,
4862 struct mt7996_sta_link,
4863 wcid);
4864
4865 rssi[0] = (res->rssi[i].rcpi[0] - 220) / 2;
4866 rssi[1] = (res->rssi[i].rcpi[1] - 220) / 2;
4867 rssi[2] = (res->rssi[i].rcpi[2] - 220) / 2;
4868 rssi[3] = (res->rssi[i].rcpi[3] - 220) / 2;
4869
> 4870 mvif = &msta_link->sta->vif->mt76;
> 4871 mlink = rcu_dereference(mvif->link[wcid->link_id]);
4872 if (mlink) {
4873 mphy = mt76_vif_link_phy(mlink);
4874 if (mphy)
4875 msta_link->ack_signal =
4876 mt76_rx_signal(mphy->antenna_mask,
4877 rssi);
4878 }
4879
4880 ewma_avg_signal_add(&msta_link->avg_ack_signal,
4881 -msta_link->ack_signal);
4882 break;
4883 }
4884 }
4885 rcu_read_unlock();
4886
4887 dev_kfree_skb(skb);
4888 }
4889
4890 return 0;
4891 }
4892
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [PATCH wireless v2] wifi: mt76: mt7996: replace direct WTBL access with MCU for station statistics
From: kernel test robot @ 2026-04-07 14:56 UTC (permalink / raw)
To: Joshua Klinesmith, linux-wireless
Cc: llvm, oe-kbuild-all, nbd, lorenzo, ryder.lee, shayne.chen,
sean.wang, Joshua Klinesmith
In-Reply-To: <20260407053855.75828-1-joshuaklinesmith@gmail.com>
Hi Joshua,
kernel test robot noticed the following build errors:
[auto build test ERROR on wireless/main]
[also build test ERROR on linus/master v7.0-rc7 next-20260406]
[cannot apply to wireless-next/main]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Joshua-Klinesmith/wifi-mt76-mt7996-replace-direct-WTBL-access-with-MCU-for-station-statistics/20260407-151612
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git main
patch link: https://lore.kernel.org/r/20260407053855.75828-1-joshuaklinesmith%40gmail.com
patch subject: [PATCH wireless v2] wifi: mt76: mt7996: replace direct WTBL access with MCU for station statistics
config: riscv-allmodconfig (https://download.01.org/0day-ci/archive/20260407/202604072310.QZ9n9tFj-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c80443cd37b2e2788cba67ffa180a6331e5f0791)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260407/202604072310.QZ9n9tFj-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604072310.QZ9n9tFj-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4870:10: error: incompatible pointer types assigning to 'struct mt76_vif_link *' from 'struct mt76_vif_data *' [-Wincompatible-pointer-types]
4870 | mvif = &msta_link->sta->vif->mt76;
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
11 errors generated.
vim +4870 drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
4786
4787 int mt7996_mcu_get_per_sta_info(struct mt7996_phy *phy, u16 tag)
4788 {
4789 struct mt7996_dev *dev = phy->dev;
4790 struct mt7996_mcu_per_sta_info_event *res;
4791 struct mt76_wcid *wcid;
4792 struct sk_buff *skb;
4793 int i, ret, sta_num, resp_sta_num;
4794 int wcid_idx = 0;
4795 struct {
4796 u8 _rsv1;
4797 u8 unsolicit;
4798 u8 _rsv2[2];
4799
4800 __le16 tag;
4801 __le16 len;
4802 __le16 sta_num;
4803 u8 _rsv3[2];
4804 __le16 wlan_idx[PER_STA_INFO_MAX_NUM];
4805 } __packed req = {
4806 .tag = cpu_to_le16(tag),
4807 .len = cpu_to_le16(sizeof(req) - 4),
4808 };
4809
4810 while (wcid_idx < mt7996_wtbl_size(dev)) {
4811 sta_num = 0;
4812
4813 rcu_read_lock();
4814 for (i = wcid_idx;
4815 i < mt7996_wtbl_size(dev) && sta_num < PER_STA_INFO_MAX_NUM;
4816 i++) {
4817 wcid = rcu_dereference(dev->mt76.wcid[i]);
4818 if (!wcid || !wcid->sta)
4819 continue;
4820 req.wlan_idx[sta_num++] = cpu_to_le16(i);
4821 }
4822 rcu_read_unlock();
4823 wcid_idx = i;
4824
4825 if (!sta_num)
4826 continue;
4827
4828 req.sta_num = cpu_to_le16(sta_num);
4829
4830 ret = mt76_mcu_send_and_get_msg(&dev->mt76,
4831 MCU_WM_UNI_CMD(PER_STA_INFO),
4832 &req, sizeof(req), true, &skb);
4833 if (ret)
4834 return ret;
4835
4836 res = (struct mt7996_mcu_per_sta_info_event *)skb->data;
4837
4838 resp_sta_num = le16_to_cpu(res->sta_num);
4839 if (resp_sta_num > sta_num ||
4840 skb->len < struct_size(res, rssi, resp_sta_num)) {
4841 dev_kfree_skb(skb);
4842 return -EINVAL;
4843 }
4844
4845 rcu_read_lock();
4846 for (i = 0; i < resp_sta_num; i++) {
4847 struct mt7996_sta_link *msta_link;
4848 struct mt76_vif_link *mvif;
4849 struct mt76_vif_link *mlink;
4850 struct mt76_phy *mphy;
4851 u16 wlan_idx;
4852 s8 rssi[4];
4853
4854 switch (tag) {
4855 case UNI_PER_STA_RSSI:
4856 wlan_idx = le16_to_cpu(res->rssi[i].wlan_idx);
4857 wcid = mt76_wcid_ptr(dev, wlan_idx);
4858 if (!wcid || !wcid->sta)
4859 break;
4860
4861 msta_link = container_of(wcid,
4862 struct mt7996_sta_link,
4863 wcid);
4864
4865 rssi[0] = (res->rssi[i].rcpi[0] - 220) / 2;
4866 rssi[1] = (res->rssi[i].rcpi[1] - 220) / 2;
4867 rssi[2] = (res->rssi[i].rcpi[2] - 220) / 2;
4868 rssi[3] = (res->rssi[i].rcpi[3] - 220) / 2;
4869
> 4870 mvif = &msta_link->sta->vif->mt76;
4871 mlink = rcu_dereference(mvif->link[wcid->link_id]);
4872 if (mlink) {
4873 mphy = mt76_vif_link_phy(mlink);
4874 if (mphy)
4875 msta_link->ack_signal =
4876 mt76_rx_signal(mphy->antenna_mask,
4877 rssi);
4878 }
4879
4880 ewma_avg_signal_add(&msta_link->avg_ack_signal,
4881 -msta_link->ack_signal);
4882 break;
4883 }
4884 }
4885 rcu_read_unlock();
4886
4887 dev_kfree_skb(skb);
4888 }
4889
4890 return 0;
4891 }
4892
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [PATCH 0/3] wifi: refactor USB endpoint lookups
From: Johannes Berg @ 2026-04-07 14:01 UTC (permalink / raw)
To: Johan Hovold, linux-wireless; +Cc: libertas-dev, linux-kernel
In-Reply-To: <20260330103207.1671926-1-johan@kernel.org>
On Mon, 2026-03-30 at 12:32 +0200, Johan Hovold wrote:
> Use the common USB helper for looking up bulk and interrupt endpoints
> instead of open coding.
>
> Johan
>
>
> Johan Hovold (3):
> wifi: at76c50x: refactor endpoint lookup
> wifi: libertas: refactor endpoint lookup
> wifi: libertas_tf: refactor endpoint lookup
These didn't apply on wireless-next, please fix and resend.
johannes
^ permalink raw reply
* Re: [PATCH 3/3] wifi: Transition/Padding delay subfields are for both EMLSR and EMLMR
From: Johannes Berg @ 2026-04-07 14:00 UTC (permalink / raw)
To: Pablo Martin-Gomez; +Cc: linux-wireless
In-Reply-To: <20260327201135.905852-4-pmartin-gomez@freebox.fr>
On Fri, 2026-03-27 at 21:11 +0100, Pablo Martin-Gomez wrote:
> -#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY 0x0070
> +#define IEEE80211_EML_CAP_EMLSR_EMLMR_TRANSITION_DELAY 0x0070
> #define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_0US 0
> #define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_16US 1
> #define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_32US 2
I think this is confusing. You have the "EMLSR_EMLMR_" prefix in the
definition for the mask, but not in the values, but also the prefix
itself gets very long, not sure what to do about that. Maybe just
..._EML_TRANSITION_DELAY even if it doesn't match the spec completely.
And then another thing - I was going to apply the other two patches, but
really then looked at my git log and saw that no, really, the subjects
are stating a spec thing rather than describing a change, so please fix
that too.
johannes
^ permalink raw reply
* Re: [PATCH] mac80211_hwsim: change hwsim_class to a const struct
From: Johannes Berg @ 2026-04-07 13:46 UTC (permalink / raw)
To: Jori Koolstra; +Cc: Greg Kroah-Hartman, open list:MAC80211, open list
In-Reply-To: <20260401165938.3843784-1-jkoolstra@xs4all.nl>
Hi,
The subject should have a "wifi: " prefix. Maybe we need a MAINTAINERS
thing for that ...
Also, this patch doesn't apply on wireless-next, please respin.
johannes
^ permalink raw reply
* Re: [PATCH v2 7/7] arm64: dts: qcom: milos-fairphone-fp6: Enable WiFi
From: Konrad Dybcio @ 2026-04-07 13:16 UTC (permalink / raw)
To: Dmitry Baryshkov, Luca Weiss, Jeff Johnson, Baochen Qiang
Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Alexander Koskovich, Liam Girdwood, Mark Brown,
Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz,
Balakrishna Godavarthi, Rocky Liao, Johannes Berg, Jeff Johnson,
~postmarketos/upstreaming, phone-devel, linux-arm-msm,
linux-kernel, devicetree, linux-bluetooth, linux-wireless, ath11k
In-Reply-To: <4fbs4arx6sez6fffy75ctmzecfvitr6aocau3cczlr2ps2ptld@v7wpa2irsihl>
On 4/3/26 9:35 PM, Dmitry Baryshkov wrote:
> On Fri, Apr 03, 2026 at 03:52:53PM +0200, Luca Weiss wrote:
>> Configure and enable the WiFi node, and add the required pinctrl to
>> provide the sleep clock from the PMK8550 (PMK7635) to WCN6755.
>>
>> Thanks to Alexander Koskovich for helping with the bringup, adding
>> the missing pinctrl to make the WPSS stop crashing.
>>
>> Link: https://lore.kernel.org/linux-arm-msm/DBF7OWAWQ94M.FSCP4DPF8ZJY@fairphone.com/
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>> ---
>> arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts | 19 ++++++++++++++++++-
>> 1 file changed, 18 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts b/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts
>> index db72418b7195..d8ac495ca7c8 100644
>> --- a/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts
>> +++ b/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts
>> @@ -242,7 +242,7 @@ wcn6750-pmu {
>>
>> clocks = <&rpmhcc RPMH_RF_CLK1>;
>>
>> - pinctrl-0 = <&bluetooth_enable_default>;
>> + pinctrl-0 = <&bluetooth_enable_default>, <&pmk8550_sleep_clk_default>;
>> pinctrl-names = "default";
>>
>> regulators {
>> @@ -766,6 +766,17 @@ &pmiv0104_eusb2_repeater {
>> qcom,tune-usb2-preem = /bits/ 8 <0x6>;
>> };
>>
>> +&pmk8550_gpios {
>> + pmk8550_sleep_clk_default: sleep-clk-default-state {
>> + pins = "gpio5";
>> + function = "func1";
>> + input-disable;
>> + output-enable;
>
> Hmm, if it's a sleep_clk, should it not be handled via the power
> sequencer?
If you mean that it may be needed to toggle it with specific timings,
possibly.. seems that WCN6855 has a "xo-clk" GPIO defined. I requested
access to some docs that I think should have the answer, hopefully should
get it soon.
Or maybe +Jeff/Baochen could answer faster?
Konrad
^ permalink raw reply
* Re: [PATCH v2 6/7] arm64: dts: qcom: milos-fairphone-fp6: Enable Bluetooth
From: Konrad Dybcio @ 2026-04-07 13:10 UTC (permalink / raw)
To: Luca Weiss, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alexander Koskovich,
Liam Girdwood, Mark Brown, Bartosz Golaszewski, Marcel Holtmann,
Luiz Augusto von Dentz, Balakrishna Godavarthi, Rocky Liao,
Johannes Berg, Jeff Johnson
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
linux-kernel, devicetree, linux-bluetooth, linux-wireless, ath11k
In-Reply-To: <20260403-milos-fp6-bt-wifi-v2-6-393322b27c5f@fairphone.com>
On 4/3/26 3:52 PM, Luca Weiss wrote:
> Add the nodes to describe the WCN6755 chip with its PMU and Bluetooth
> parts.
>
> Thanks to Alexander Koskovich for helping with the bringup, adding
> 'clocks' to the PMU node to make Bluetooth work.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
[...]
> + wcn6750-pmu {
> + compatible = "qcom,wcn6755-pmu", "qcom,wcn6750-pmu";
> +
> + vddaon-supply = <&vreg_s3b>;
> + vddasd-supply = <&vreg_l7b>;
> + vddpmu-supply = <&vreg_s3b>;
> + vddrfa0p8-supply = <&vreg_s3b>;
> + vddrfa1p2-supply = <&vreg_s2b>;
> + vddrfa1p7-supply = <&vreg_s1b>;
> + vddrfa2p2-supply = <&vreg_s1j>;
> +
> + bt-enable-gpios = <&tlmm 53 GPIO_ACTIVE_HIGH>;
> +
> + clocks = <&rpmhcc RPMH_RF_CLK1>;
nit: I should have caught this.. intriguing order of properties where
supplies are topmost during r3g2 review, which is presumably where
this originated from.. not a big deal though..
[...]
> + bluetooth_enable_default: bluetooth-enable-default-state {
> + pins = "gpio53";
> + function = "gpio";
> + output-low;
> + bias-disable;
nit: you shouldn't need to initially actively drive the pin, a
pull-down should be sufficient
(if insist you do, output-foo is usually below bias properties)
with or without changes:
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply
* Re: [PATCH v2 4/7] arm64: dts: qcom: milos: Split up uart11 pinctrl
From: Konrad Dybcio @ 2026-04-07 13:07 UTC (permalink / raw)
To: Luca Weiss, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alexander Koskovich,
Liam Girdwood, Mark Brown, Bartosz Golaszewski, Marcel Holtmann,
Luiz Augusto von Dentz, Balakrishna Godavarthi, Rocky Liao,
Johannes Berg, Jeff Johnson
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
linux-kernel, devicetree, linux-bluetooth, linux-wireless, ath11k
In-Reply-To: <20260403-milos-fp6-bt-wifi-v2-4-393322b27c5f@fairphone.com>
On 4/3/26 3:52 PM, Luca Weiss wrote:
> In order to set the pinctrl for the individual CTS, RTS, TX and RX pins,
> split up the pinctrl configuration into 4 nodes so that boards can set
> some properties separately.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply
* [PATCH v2] rtlwifi: rtl8821ae: Remove dead code in rtl8821ae_update_hal_rate_table()
From: Chelsy Ratnawat @ 2026-04-07 12:34 UTC (permalink / raw)
To: pkshih
Cc: colin.i.king, johannes.berg, bhelgaas, arnd, linux-wireless,
Chelsy Ratnawat
The variable 'mimo_ps' is initialized to IEEE80211_SMPS_OFF and never
modified throughout the function. This makes the condition checking for
IEEE80211_SMPS_STATIC always evaluate to false, rendering the entire
if-branch unreachable dead code.
The error was reported by Coverity Scan.
Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>
---
Changes in v2:
- Declared local variable u32 ratr_mask at top of function.
.../wireless/realtek/rtlwifi/rtl8821ae/hw.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
index 3a4a33476205..c4dcae2d375e 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
@@ -3257,9 +3257,9 @@ static void rtl8821ae_update_hal_rate_table(struct ieee80211_hw *hw,
u32 ratr_value;
u8 ratr_index = 0;
u8 b_nmode = mac->ht_enable;
- u8 mimo_ps = IEEE80211_SMPS_OFF;
u16 shortgi_rate;
u32 tmp_ratr_value;
+ u32 ratr_mask;
u8 curtxbw_40mhz = mac->bw_40;
u8 b_curshortgi_40mhz = (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ?
1 : 0;
@@ -3288,19 +3288,14 @@ static void rtl8821ae_update_hal_rate_table(struct ieee80211_hw *hw,
case WIRELESS_MODE_N_24G:
case WIRELESS_MODE_N_5G:
b_nmode = 1;
- if (mimo_ps == IEEE80211_SMPS_STATIC) {
- ratr_value &= 0x0007F005;
- } else {
- u32 ratr_mask;
- if (get_rf_type(rtlphy) == RF_1T2R ||
- get_rf_type(rtlphy) == RF_1T1R)
- ratr_mask = 0x000ff005;
- else
- ratr_mask = 0x0f0ff005;
+ if (get_rf_type(rtlphy) == RF_1T2R ||
+ get_rf_type(rtlphy) == RF_1T1R)
+ ratr_mask = 0x000ff005;
+ else
+ ratr_mask = 0x0f0ff005;
- ratr_value &= ratr_mask;
- }
+ ratr_value &= ratr_mask;
break;
default:
if (rtlphy->rf_type == RF_1T2R)
--
2.43.0
^ permalink raw reply related
* Re: [PATCH] mac80211: stop hardware before clearing driver state on reconfig failure
From: Johannes Berg @ 2026-04-07 10:53 UTC (permalink / raw)
To: Masi Osmani; +Cc: linux-wireless, Christian Lamparter
In-Reply-To: <GVYP280MB151883A5BB2910EE6439DE2F9453A@GVYP280MB1518.SWEP280.PROD.OUTLOOK.COM>
On Tue, 2026-03-31 at 12:00 +0200, Masi Osmani wrote:
> This patch fixes a hard system freeze (requires power cycle) observed
> when unplugging an AR9170 USB WiFi adapter while under traffic, or when
> any driver that uses ieee80211_reconfig() encounters a firmware deadlock.
>
> The race: ieee80211_handle_reconfig_failure() tears down station tables
> while USB RX tasklets can still deliver frames that reference them
> (use-after-free). Calling drv_stop() before clearing IN_DRIVER state
> closes the race at the root cause.
You can really stop resending this patch, I'm not taking it.
https://lore.kernel.org/linux-wireless/e7f3ba3acca1308bc0871a3892da9e15525d5038.camel@sipsolutions.net/
johannes
^ permalink raw reply
* Re: [PATCH] carl9170: main: track sw_scan state and suppress transient channel-change errors
From: Johannes Berg @ 2026-04-07 10:52 UTC (permalink / raw)
To: Masi Osmani, Christian Lamparter; +Cc: linux-wireless, ath9k-devel
In-Reply-To: <GVYP280MB15183AA20A65C0C5C03D09699453A@GVYP280MB1518.SWEP280.PROD.OUTLOOK.COM>
FWIW, all wifi patches should have "wifi: " prefix.
(but I think you're not going to get my email, hotmail doesn't like me)
johannes
^ permalink raw reply
* Re: [PATCH v2] iwlwifi: dvm: add missing cleaup for on error path
From: Johannes Berg @ 2026-04-07 10:50 UTC (permalink / raw)
To: Markus Elfring, Haoxiang Li, linux-wireless, Miri Korenblit; +Cc: LKML
In-Reply-To: <604fd5a1-135b-4a47-b752-52cb21d8863e@web.de>
On Thu, 2026-04-02 at 08:10 +0200, Markus Elfring wrote:
>
>
> 3. Would you like to avoid a typo in the summary phrase?
>
See also
https://lore.kernel.org/linux-wireless/3a7022fcd18fdaf98044f8a3a21b09a2f7cba914.camel@sipsolutions.net/
johannes
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox