From nobody Sun Feb 8 15:07:49 2026 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1696B31281F for ; Wed, 7 Jan 2026 09:27:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767778079; cv=none; b=SmggjiU/a4DpkD83APnA1RxtjTs2wtXr8THKhflXtaZMIaLwP2Lyt04vTdEdvup4lwTXHGwhpUZ9EKSYOxPvni1GgdkvOjpUWW3bGYMk7jtpUFSwCOsklh+UaQj3s+ugoqo8svDxVlP+Dejc6nd8TtfRdMjN0aSkp8EYXHHp1P0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767778079; c=relaxed/simple; bh=g1WA3hhzcBNKCpDwGVcvqg8QcHrAEKl4kdMa8V2XFQs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=n+2bwQzCn4fSXtnDsc2QDcoikq1zTZeJuLLCKHh2+OPa4a+UC92A6WvRwLbdz5Ff2uO0v6SdZVsneAH5Bu8vRsvNo4AtJQkjUSTv50G0VR9rSWFgbzdJPpzHbwE+Zs+aBj6S3PSYSuUT9cG54Br8BnoEmlosdoPbpQH7M6+iLu0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Ejoapbyb; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Ejoapbyb" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-7e2762ad850so1701552b3a.3 for ; Wed, 07 Jan 2026 01:27:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1767778077; x=1768382877; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=nhb3q7cnQYnbFMmPVM1DpAFU8aH9HqYVVJx0dsKwbns=; b=EjoapbybuO41INYTRfNfb4DZP8PakMQZO7+jZ7I1YtfR99b4++DlAu0I0eV5IcrNeM a59Ba1dTdWDeQv4oQtORGlj5T7pEK4lSKGF28Y4FAMSggtVp51ExABOoszNd/+ZJX4H0 kCEA+U9v6rF9fOoaMthGiTb3kS6fVEHh0s4r4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767778077; x=1768382877; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nhb3q7cnQYnbFMmPVM1DpAFU8aH9HqYVVJx0dsKwbns=; b=sb8Toie4LAmYOYzo5NalIEREE6j9f6/Fu4ndPVCJT+N5bMb0C35pvedINGFGUyL/0y jeRkiZfnkmTHyjwk7W1R/j33hJ0OVdr2fXzzzl3V9+Jn02jTk80O6WT3we5csNi7NZqX aTNBh5KnqFQ/VpY3lW3/x9CyvTxnD8NE4b2CR6dopeTBamQEPJxTlhBupXuJz0CGzOJv w4vQ/emLY0J/LCL7B1O4hBHmWXIo/TKzapXhFzgv5o6RgGHgLpAKyW025+EhhIdq3vRx MsgL4jRhEDYRPIPRkiKHUh3FS5XlLgi2QDZLbbysLe44NzMJxigepBhqOFb+4k8ORwpP LhIg== X-Forwarded-Encrypted: i=1; AJvYcCVD3pY1FmIbMA363yrSFSf69UzqV/Qd1++tRjyeIyVTJZSGBrigPXIvDhvgdELhVgfGdZiuhuK/BMBP3Qs=@vger.kernel.org X-Gm-Message-State: AOJu0YzqeD5mQCym4OkTJuuotCxMV0idB6eWnrMDTq2bTcNU8WYvI/pb D87tLmrBBGqeR5+MOEaCf996Js+OXApdXxZk6Bl9DHvOHrTVvhxf39pqe2MM1DZkAQ== X-Gm-Gg: AY/fxX7vjVvP3m4PyCV4vygbSpkM2/dc+/cahgbrNvITMwPHxs8rmTCiUv/CoNH2qwR JClFYyMUyR6ZDrwRxxP64cS9YyNsKOgQ5fko1xL4f+zcbQBb82eGrMN5AxTrOGNQay1V+KK6uDD qTQcDPpeiC1KQISa6JHErYsiJUy13hsKjyMTuZHYNnuBHNmk1+lFiJhsu1wD/xhKqWP8c/sk3SM QhnBo0t1ORIk0mRwnicxfOqqwKXC6vvOqjrLuImRo7pLO3Y0WGC7nbkt6GUeM1hN1TYFVH9fW6S 1Q3qPWX+3zD4aLoyj3j8Rehv5OxrJIdq9UpfzGHvuW5ArLsKTPz32ppUE/q3ATdcHg9K1OQzcjY XHoStAVBCKk9MKr0f+/cBNQ+fVL6hlftlqNNX5yU5rm9Xt5svT6DZo+LrNgAkqWte0pgINBwcsJ UisSKTbWcpcSu6EH+dmgevmFPeSf8YhxAvAXGSwKMXlqpSfhNQSYai6g/dX3LwaTQ= X-Google-Smtp-Source: AGHT+IH62OQ3bsUsVU2frgQ+oZSI7idoa7HhgVZkXQGFx50QzusA3hyEAliOKuIBKTn+v4gQcTVwyg== X-Received: by 2002:a05:6a00:428c:b0:7aa:5c32:17a3 with SMTP id d2e1a72fcca58-81b7de5bed3mr1632625b3a.17.1767778077338; Wed, 07 Jan 2026 01:27:57 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2a00:79e0:201d:8:fab:ea:9a9:a24f]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-819c59e983fsm4428163b3a.55.2026.01.07.01.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jan 2026 01:27:56 -0800 (PST) From: Chen-Yu Tsai To: Brian Norris , Francesco Dolcini , Johannes Berg Cc: Chen-Yu Tsai , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] wifi: mwifiex: Allocate dev name earlier for interface workqueue name Date: Wed, 7 Jan 2026 17:27:40 +0800 Message-ID: <20260107092744.1131314-1-wenst@chromium.org> X-Mailer: git-send-email 2.52.0.351.gbe84eed79e-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The interface specific workqueues are allocated with the interface name as part of the workqueue name. However when they are allocated, the interface name has not been allocated, thus the "name" is actually the pattern for the name "mlan%d". This ends up pretty ugly and could conflict if multiple interfaces were added. Allocate the device name earlier and use that to allocate the workqueues. Also tweak the workqueue name patterns to add a separator between the prefix and the interface name parts for readability. Signed-off-by: Chen-Yu Tsai --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/= wireless/marvell/mwifiex/cfg80211.c index be23a29e7de0..a66d18e380fc 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -3147,10 +3147,14 @@ struct wireless_dev *mwifiex_add_virtual_intf(struc= t wiphy *wiphy, =20 SET_NETDEV_DEV(dev, adapter->dev); =20 - priv->dfs_cac_workqueue =3D alloc_workqueue("MWIFIEX_DFS_CAC%s", + ret =3D dev_alloc_name(dev, name); + if (ret) + goto err_alloc_name; + + priv->dfs_cac_workqueue =3D alloc_workqueue("MWIFIEX_DFS_CAC-%s", WQ_HIGHPRI | WQ_MEM_RECLAIM | - WQ_UNBOUND, 0, name); + WQ_UNBOUND, 0, dev->name); if (!priv->dfs_cac_workqueue) { mwifiex_dbg(adapter, ERROR, "cannot alloc DFS CAC queue\n"); ret =3D -ENOMEM; @@ -3159,9 +3163,9 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct = wiphy *wiphy, =20 INIT_DELAYED_WORK(&priv->dfs_cac_work, mwifiex_dfs_cac_work_queue); =20 - priv->dfs_chan_sw_workqueue =3D alloc_workqueue("MWIFIEX_DFS_CHSW%s", + priv->dfs_chan_sw_workqueue =3D alloc_workqueue("MWIFIEX_DFS_CHSW-%s", WQ_HIGHPRI | WQ_UNBOUND | - WQ_MEM_RECLAIM, 0, name); + WQ_MEM_RECLAIM, 0, dev->name); if (!priv->dfs_chan_sw_workqueue) { mwifiex_dbg(adapter, ERROR, "cannot alloc DFS channel sw queue\n"); ret =3D -ENOMEM; @@ -3198,6 +3202,7 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct = wiphy *wiphy, destroy_workqueue(priv->dfs_cac_workqueue); priv->dfs_cac_workqueue =3D NULL; err_alloc_cac: +err_alloc_name: free_netdev(dev); priv->netdev =3D NULL; err_sta_init: --=20 2.52.0.351.gbe84eed79e-goog