Linux wireless drivers development
 help / color / mirror / Atom feed
* RE: [PATCH 1/1] dt-bindings: net: wireless: intel,iwlwifi: add binding
From: Bhatt, Avinash @ 2026-04-30 12:50 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, devicetree@vger.kernel.org,
	conor+dt@kernel.org, johannes@sipsolutions.net,
	Korenblit, Miriam Rachel, Guetta, Kobi, Grumbach, Emmanuel
In-Reply-To: <4fda911e-df77-43bd-9248-e55ed587d040@kernel.org>

Hi Krzysztof,

Thank you for the review. Responses inline.

On 29/04/2026 10:14, Krzysztof Kozlowski wrote:
> On 29/04/2026 10:14, Avinash Bhatt wrote:
>> Add a devicetree schema binding for Intel discrete Wi-Fi 7 BE200 PCIe
>> adapters.
>
> Why? Where is any user of that?

The driver implementation consuming these properties exists and will be
submitted as a companion series together with v2 of this binding.

>> +  - linux-wireless@vger.kernel.org
>
> Drop this one.

Ack. Will address in PATCH v2.

>> +description:
>> +  Intel iwlwifi IEEE 802.11be discrete Wi-Fi adapters connected over PCIe.
>
> Please wrap code according to the preferred limit expressed in Kernel
> coding style (checkpatch is not a coding style description, but only a
> tool). However don't wrap blindly (see Kernel coding style).

Ack. Will address in PATCH v2.

>> +  These bindings provide OEM platform configuration for platforms that
>> +  use Device Tree.
>
> Drop. Describe hardware.

Ack. Will address in PATCH v2.

>> +  intel,activate-channel:
>> ...
>> +  intel,force-disable-channels:
>
> I don't see how this is a DT property. Actually most of the properties
> do not look either. Do you want to say, that if I go with my device from
> EU to US on a business trip, I will need to recompile DTB? Obviously
> no...

These properties describe how the WiFi NIC was integrated into the
system by the OEM — specifically, which regulatory certifications were
obtained for this hardware SKU at manufacturing time. That is a fixed
hardware property of the board, no different from describing antenna
configuration or RF front-end capabilities.

To clarify the travel analogy: the regulatory domain (which country the
device is currently operating in) is determined at runtime by the kernel
regulatory subsystem, independently of these properties. What these
properties encode is what the hardware itself has been certified for.
For example, bit 0 of intel,activate-channel means "the OEM of this
board obtained EU indoor channel certification for this SKU." That
certification does not change when the device travels — it is a property
of the hardware, not of its location.

The per-country granularity exists because regulatory certifications are
issued independently by each country's agency (FCC for the USA, ISED
for Canada, etc.), so each country's enablement is a separate OEM
decision reflected in the board design.


Best regards,
Avinash

-----Original Message-----
From: Krzysztof Kozlowski <krzk@kernel.org> 
Sent: 29 April 2026 13:49
To: Bhatt, Avinash <avinash.bhatt@intel.com>; devicetree@vger.kernel.org
Cc: linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org; robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org; johannes@sipsolutions.net; Korenblit, Miriam Rachel <miriam.rachel.korenblit@intel.com>; Guetta, Kobi <kobi.guetta@intel.com>; Grumbach, Emmanuel <emmanuel.grumbach@intel.com>
Subject: Re: [PATCH 1/1] dt-bindings: net: wireless: intel,iwlwifi: add binding

On 29/04/2026 10:14, Avinash Bhatt wrote:
> Add a devicetree schema binding for Intel discrete Wi-Fi 7 BE200 PCIe 
> adapters.

Why? Where is any user of that?

> 
> The binding documents OEM platform configuration properties for 
> platforms that use Device Tree instead of platform firmware methods. 
> All properties mirror the existing equivalents in structure and 
> semantics, covering SAR power limits (intel,wrds),
> 6 GHz AP type support (intel,uats), static power limit (intel,splc), 
> channel puncturing (intel,wcpe), 320 MHz per-MCC enablement 
> (intel,wbem), ETSI SRD channel configuration (intel,srd), 6-7 GHz UHB 
> country enable bitmask (intel,6e-uhb), and additional regulatory 
> override properties.
> 
> Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
> ---
>  .../bindings/net/wireless/intel,iwlwifi.yaml  | 445 
> ++++++++++++++++++
>  1 file changed, 445 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/net/wireless/intel,iwlwifi.yaml
> 
> diff --git 
> a/Documentation/devicetree/bindings/net/wireless/intel,iwlwifi.yaml 
> b/Documentation/devicetree/bindings/net/wireless/intel,iwlwifi.yaml
> new file mode 100644
> index 000000000000..d97be6cc35d8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wireless/intel,iwlwifi.yam
> +++ l
> @@ -0,0 +1,445 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # Copyright 
> +(c) 2026 Intel Corporation %YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/wireless/intel,iwlwifi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Intel iwlwifi PCIe Wi-Fi devices
> +
> +maintainers:
> +  - Avinash Bhatt <avinash.bhatt@intel.com>
> +  - linux-wireless@vger.kernel.org

Drop this one.

> +
> +description:
> +  Intel iwlwifi IEEE 802.11be discrete Wi-Fi adapters connected over PCIe.

Please wrap code according to the preferred limit expressed in Kernel coding style (checkpatch is not a coding style description, but only a tool).  However don't wrap blindly (see Kernel coding style).

> +  These bindings provide OEM platform configuration for platforms that use Device Tree.

Drop. Describe hardware.

> +
> +properties:
> +  compatible:
> +    enum:
> +      - pci8086,272b
> +

...

> +
> +  intel,activate-channel:
> +    description: |
> +      Indoor channel activation bitmask. Sets specific frequency bands to
> +      active (rather than passive or disabled) when the platform is
> +      confirmed to be operating indoors.
> +
> +      Layout (2 cells):
> +        [0] revision - structure revision, must be 0x00
> +        [1] bitmap   - per-region indoor activation flags:
> +                       bit 0 = enable EU U-NII-1 (5.2 GHz) for indoors only
> +                       bit 1 = enable Japan U-NII-1 (5.2 GHz) for indoors only
> +                       bit 2 = enable China Mainland U-NII-1 (5.2 GHz) for indoors only
> +                       bit 3 = enable USA U-NII-4 (5.9 GHz) for indoors only
> +                       bit 4 = enable WW U-NII-1 (5.2 GHz) for indoors in any
> +                               country where the band is permitted
> +                       bit 5 = enable Canada U-NII-4 (5.9 GHz) for indoors only
> +                       bit 6 = enable USA + Canada + WW U-NII-4 (5.9 GHz) for
> +                               indoors only
> +                       bits 7-31: reserved, must be 0
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/uint32-array
> +      - minItems: 2
> +        maxItems: 2
> +        items:
> +          - const: 0
> +
> +  intel,force-disable-channels:

I don't see how this is a DT property. Actually most of the properties do not look either. Do you want to say, that if I go with my device from EU to US on a business trip, I will need to recompile DTB? Obviously no...

Best regards,
Krzysztof

^ permalink raw reply

* [GIT PULL] wireless-next-2026-04-30
From: Johannes Berg @ 2026-04-30 12:02 UTC (permalink / raw)
  To: netdev; +Cc: linux-wireless

Hi,

Looks like 7.2 is going to be interesting with NAN and UHR
both getting major work, but for now we have some (relatively)
minor things - the biggest is the station bandwidth rework,
which is needed en route to UHR.

Please pull and let us know if there's any problem.

Thanks,
johannes



The following changes since commit 254f49634ee16a731174d2ae34bc50bd5f45e731:

  Linux 7.1-rc1 (2026-04-26 14:19:00 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git tags/wireless-next-2026-04-30

for you to fetch changes up to 7baf5857e15d722776898510a10546d6b2f18645:

  wifi: brcmsmac: phy_lcn: Remove dead code in wlc_lcnphy_radio_2064_channel_tune_4313() (2026-04-28 10:43:27 +0200)

----------------------------------------------------------------
Some new content already, notably:
 - mac80211: major rework of station bandwidth handling,
             fixing issues with lower capability than AP
 - general: cleanups for EMLSR spec issues (drafts differed)
 - ath9k: GPIO interface improvements
 - ath12k: replace dynamic memory allocation in WMI RX path

----------------------------------------------------------------
Aaradhana Sahu (1):
      wifi: ath12k: Fix invalid IRQ requests during AHB probe

Chelsy Ratnawat (1):
      wifi: brcmsmac: phy_lcn: Remove dead code in wlc_lcnphy_radio_2064_channel_tune_4313()

Daniel Gabay (1):
      wifi: cfg80211: validate cipher suite for NAN Data keys

Dmitry Antipov (1):
      wifi: mac80211: use kstrtobool_from_user() in debugfs callbacks

Jeff Johnson (3):
      wifi: ath12k: Fix HTC prototype ath12k_base parameters
      wifi: ath12k: Fix ath12k_dp_htt_tlv_iter()'s iter() signature
      wifi: ath12k: Remove macro HAL_RX_EHT_SIG_OFDMA_EB2_MCS

Johannes Berg (24):
      wifi: mac80211: remove NAN guards on ieee80211_sta_cur_vht_bw() calls
      wifi: mac80211: set cur_max_bandwidth to maximum
      wifi: mac80211: use max BW for HT channel width update
      wifi: mac80211: use chandef in ieee80211_get_sta_bw()
      wifi: mac80211: use chandef in TDLS chanctx handling
      wifi: mac80211: remove ieee80211_sta_cap_chan_bw()
      wifi: nl80211: document channel opmode change channel width
      wifi: mac80211: simplify ieee80211_sta_rx_bw_to_chan_width()
      wifi: mac80211: clean up STA NSS handling
      wifi: mac80211: clean up initial STA NSS/bandwidth handling
      wifi: mac80211: clean up ieee80211_sta_cap_rx_bw()
      wifi: mac80211: remove ieee80211_sta_cur_vht_bw()
      wifi: cfg80211: remove HE/SAE H2E required fields
      wifi: nl80211: reject beacons with bad HE operation
      wifi: cfg80211: move AP HT/VHT/... operation to beacon info
      wifi: nl80211: reject too short HT/VHT/HE/EHT capability/operation
      wifi: cfg80211: provide HT/VHT operation for AP beacon
      wifi: nl80211: always validate AP operation/PHY regulatory
      wifi: mac80211: clarify per-STA bandwidth handling
      wifi: mac80211: fix per-station PHY capability bandwidth
      wifi: mac80211: clarify an 802.11 VHT spec reference
      wifi: nl80211: check link is beaconing for color change
      wifi: mac80211: always allow transmitting null-data on TXQs
      Merge tag 'ath-next-20260427' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath

Linus Walleij (1):
      wifi: ath9k: Obtain system GPIOS from descriptors

Louis Kotze (1):
      wifi: cfg80211: fix grammar in MLO group key error message

Nicolas Escande (1):
      wifi: ath12k: avoid dynamic alloc when parsing wmi tb

Pablo Martin-Gomez (4):
      wifi: Remove invalid 128TU transition timeout constant
      wifi: Remove EMLMR Delay subfield definitions
      wifi: Rename EMLSR delay constants and add EMLMR helpers and definitions
      wifi: Update EML function documentation to remove EMLSR-specific references

Ping-Ke Shih (1):
      wifi: mac80211: add __packed to union members of struct ieee80211_rx_status

Yuqi Xu (1):
      wifi: cfg80211: reject duplicate wiphy cipher suite entries

 drivers/gpio/gpio-ath79.c                          |  57 +++-
 drivers/net/wireless/ath/ath12k/ahb.c              |  25 +-
 drivers/net/wireless/ath/ath12k/core.c             |   6 +
 drivers/net/wireless/ath/ath12k/dp_htt.c           |   2 +-
 drivers/net/wireless/ath/ath12k/dp_htt.h           |   2 +-
 drivers/net/wireless/ath/ath12k/htc.h              |   8 +-
 drivers/net/wireless/ath/ath12k/wifi7/hal_rx.h     |   1 -
 drivers/net/wireless/ath/ath12k/wmi.c              | 217 +++++--------
 drivers/net/wireless/ath/ath12k/wmi.h              |   3 +
 drivers/net/wireless/ath/ath9k/hw.c                |  33 +-
 drivers/net/wireless/ath/ath9k/hw.h                |   3 +-
 .../broadcom/brcm80211/brcmsmac/phy/phy_lcn.c      |  13 +-
 drivers/net/wireless/intel/iwlwifi/mld/iface.c     |   2 +-
 drivers/net/wireless/intel/iwlwifi/mld/mac80211.c  |   6 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  |   6 +-
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c    |   4 +-
 drivers/net/wireless/quantenna/qtnfmac/commands.c  |   4 +-
 drivers/net/wireless/realtek/rtw89/fw.c            |   2 +-
 include/linux/ieee80211-eht.h                      | 115 +++++--
 include/net/cfg80211.h                             |  25 +-
 include/net/mac80211.h                             |  10 +-
 include/uapi/linux/nl80211.h                       |  10 +-
 net/mac80211/cfg.c                                 | 136 +++++++-
 net/mac80211/chan.c                                |  66 ++--
 net/mac80211/debugfs.c                             |  47 +--
 net/mac80211/eht.c                                 |  11 +-
 net/mac80211/he.c                                  |   9 +-
 net/mac80211/ht.c                                  |  59 +---
 net/mac80211/ibss.c                                |   3 +
 net/mac80211/ieee80211_i.h                         |  28 +-
 net/mac80211/mesh_plink.c                          |   3 +
 net/mac80211/mlme.c                                |  25 +-
 net/mac80211/ocb.c                                 |   5 +-
 net/mac80211/rate.c                                |   4 +-
 net/mac80211/sta_info.c                            | 294 ++++++++++++++++-
 net/mac80211/sta_info.h                            |  16 +-
 net/mac80211/tdls.c                                |  24 +-
 net/mac80211/tx.c                                  |   2 +-
 net/mac80211/util.c                                |  23 +-
 net/mac80211/vht.c                                 | 350 +--------------------
 net/wireless/core.c                                |  21 ++
 net/wireless/core.h                                |   3 +-
 net/wireless/nl80211.c                             | 260 +++++++++------
 net/wireless/util.c                                |  10 +
 net/wireless/wext-compat.c                         |   3 +-
 45 files changed, 1097 insertions(+), 859 deletions(-)

^ permalink raw reply

* [GIT PULL] wireless-2026-04-30
From: Johannes Berg @ 2026-04-30 11:17 UTC (permalink / raw)
  To: netdev; +Cc: linux-wireless

Hi,

So the LLM floodgates are starting to open ;-) But I'm somewhat
happy that so far we haven't gotten any really critical reports.
Here's a couple of first fixes though.

Please pull and let us know if there's any problem.

Thanks,
johannes



The following changes since commit 254f49634ee16a731174d2ae34bc50bd5f45e731:

  Linux 7.1-rc1 (2026-04-26 14:19:00 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git tags/wireless-2026-04-30

for you to fetch changes up to d997c32157d2ca06e9f3f00ba6c4bf06593b49e7:

  Merge tag 'ath-current-20260427' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath (2026-04-28 10:41:51 +0200)

----------------------------------------------------------------
Couple of initial fixes:
 - mac80211
   - remove HT NSS validation to work with broken APs
   - remove 'static' that could cause races
   - check station link lookup before further processing
 - ath12k
   - fix OF node refcount imbalance
   - fix queue flush ("REO update") in MLO
   - fix RCU assert
 - ath12k: fix Kconfig with POWER_SEQUENCING
 - rsi: fix thread lifetime race
 - brcmfmac: fix potential UAF
 - nl80211: require admin permissions for PMK management
 - various fixes to not trust values from firmware

----------------------------------------------------------------
Aaradhana Sahu (1):
      wifi: ath12k: fix OF node refcount imbalance in WSI graph traversal

Amir Mohammad Jahangirzad (1):
      wifi: libertas: fix integer underflow in process_cmdrequest()

Baochen Qiang (1):
      wifi: ath12k: prepare REO update element only for primary link

Catherine (1):
      wifi: mac80211: drop stray 'static' from fast-RX rx_result

Dmitry Baryshkov (1):
      wifi: ath10k: snoc: select POWER_SEQUENCING

Jeongjun Park (1):
      wifi: rsi: fix kthread lifetime race between self-exit and external-stop

Johannes Berg (1):
      Merge tag 'ath-current-20260427' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath

Marek Szyprowski (1):
      wifi: brcmfmac: Fix potential use-after-free issue when stopping watchdog task

Michael Bommarito (2):
      wifi: nl80211: require admin perm on SET_PMK / DEL_PMK
      wifi: mac80211: check ieee80211_rx_data_set_link return in pubsta MLO path

Rio Liu (1):
      wifi: mac80211: skip ieee80211_verify_sta_ht_mcs_support check in non-strict mode

Tristan Madani (2):
      wifi: b43: enforce bounds check on firmware key index in b43_rx()
      wifi: b43legacy: enforce bounds check on firmware key index in RX path

Yu-Hsiang Tseng (1):
      wifi: ath12k: use lockdep_assert_in_rcu_read_lock() for RCU assertions

 drivers/net/wireless/ath/ath10k/Kconfig            |  1 +
 drivers/net/wireless/ath/ath12k/core.c             | 77 ++++++++++++++--------
 drivers/net/wireless/ath/ath12k/dp_rx.c            |  3 +
 drivers/net/wireless/ath/ath12k/mac.c              |  2 +-
 drivers/net/wireless/ath/ath12k/p2p.c              |  2 +-
 drivers/net/wireless/broadcom/b43/xmit.c           |  3 +-
 drivers/net/wireless/broadcom/b43legacy/xmit.c     |  3 +-
 .../wireless/broadcom/brcm80211/brcmfmac/sdio.c    |  6 +-
 drivers/net/wireless/marvell/libertas/if_usb.c     |  5 +-
 drivers/net/wireless/rsi/rsi_common.h              |  5 +-
 net/mac80211/mlme.c                                |  9 +++
 net/mac80211/rx.c                                  |  6 +-
 net/wireless/nl80211.c                             |  2 +
 13 files changed, 82 insertions(+), 42 deletions(-)

^ permalink raw reply

* Re: [BUG] wifi: rtw88: Hard system freeze on RTL8821CE when power_save is enabled (LPS/ASPM conflict)
From: LB F @ 2026-04-30 10:56 UTC (permalink / raw)
  To: Bitterblue Smith
  Cc: Ping-Ke Shih, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <CALdGYqQio_byfdhDdc8hhebg2gDuB1MzFW0gv_39S5JJnN0FzQ@mail.gmail.com>

Hi Bitterblue, Ping-Ke,

Please excuse the quick follow-up to my previous email. After looking
at the code again, I realized my previous suggestion (changing the
`query_phy_status` callback to return an `int`) was unnecessarily
invasive, as it would require touching the `ops` struct for all
chipsets.

I wanted to share a much simpler alternative that I found, which seems
to address the issue of invalid PHY status pages without any
structural changes.

Currently, when `query_phy_status()` encounters an invalid page (the
`default:` case), it prints the "unused phy status page" warning and
returns, leaving `pkt_stat->phy_status` set to true, but the actual
signal and RSSI values uninitialized (zero).

This leads to two minor issues downstream:
1. In `rtw_rx_fill_rx_status()`, mac80211 gets passed a false `signal=0` value.
2. In `rtw_rx_addr_match()`, the frame passes the
`!pkt_stat->phy_status` check, causing `ewma_rssi_add(&si->avg_rssi,
pkt_stat->rssi)` to be called with a 0 value, which corrupts the
moving average of the RSSI.

It seems this could be completely resolved by simply adding one line
to the `default:` case in `query_phy_status()` (e.g., in
`rtw8821c.c`):

--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
@@ -677,6 +677,7 @@ static void query_phy_status(struct rtw_dev
*rtwdev, u8 *phy_status,
  break;
  default:
  rtw_warn(rtwdev, "unused phy status page (%d)\n", page);
+ pkt_stat->phy_status = false;
  return;
  }
 }

By explicitly marking the PHY status as invalid before returning:
- `rtw_rx_fill_rx_status()` will correctly fall into the `else` block
and set `rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;`.
- `rtw_rx_addr_match()` will correctly early-return, protecting the
RSSI moving average.

The frame itself is still passed to mac80211 (since the payload might
be valid), but without the bogus signal metadata.

Again, this is just an amateur observation from reviewing the code
while testing the recent RX descriptor patches. The current patches
are running flawlessly on my end. I leave it to your expertise to
decide if this one-line addition is worthwhile.

Best regards,
Oleksandr Havrylov

^ permalink raw reply

* Re: [PATCH 1/9] dt-bindings: mmc: Document support for nvmem-layout
From: Krzysztof Kozlowski @ 2026-04-30  9:59 UTC (permalink / raw)
  To: Loic Poulain
  Cc: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, Jens Axboe, Johannes Berg,
	Jeff Johnson, Bartosz Golaszewski, Marcel Holtmann,
	Luiz Augusto von Dentz, Balakrishna Godavarthi, Rocky Liao,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, linux-mmc, devicetree, linux-kernel, linux-arm-msm,
	linux-block, linux-wireless, ath10k, linux-bluetooth, netdev,
	daniel
In-Reply-To: <20260428-block-as-nvmem-v1-1-6ad23e75190a@oss.qualcomm.com>

On Tue, Apr 28, 2026 at 04:23:06PM +0200, Loic Poulain wrote:

> +                    compatible = "fixed-layout";
> +
> +                    #address-cells = <1>;
> +                    #size-cells = <1>;
> +
> +                    mac-addr@4400 {
> +                        reg = <0x4400 0x6>;

This looks incomplete. Why isn't this mac-base type of entry? And how do
you address it from NVMEM consumer?

> +                    };
> +
> +                    bd-addr@5400 {
> +                        reg = <0x5400 0x6>;
> +                    };
> +                };
> +            };
>          };
>      };
>  
> 
> -- 
> 2.34.1
> 

^ permalink raw reply

* Re: [PATCH v4 1/3 net-next] dt-bindings: net: add st,stlc4560/p54spi binding
From: Arnd Bergmann @ 2026-04-30  9:58 UTC (permalink / raw)
  To: Rob Herring, Arnd Bergmann
  Cc: Christian Lamparter, Andreas Kemnade, Benoît Cousson,
	Eric Dumazet, Bartosz Golaszewski, Krzysztof Kozlowski,
	Johannes Berg, Jakub Kicinski, Kevin Hilman, linux-kernel,
	linux-wireless, Linux-OMAP, Felipe Balbi, Rob Herring,
	open list:GPIO SUBSYSTEM, Paolo Abeni, devicetree, Netdev,
	David S . Miller, Roger Quadros, linux-arm-kernel,
	Dmitry Torokhov, Aaro Koskinen, Tony Lindgren, Linus Walleij
In-Reply-To: <177754112702.3678889.4847926893667561974.robh@kernel.org>

On Thu, Apr 30, 2026, at 11:25, Rob Herring (Arm) wrote:
> On Thu, 30 Apr 2026 10:12:40 +0200, Arnd Bergmann wrote:
>>  .../bindings/net/wireless/st,stlc4560.yaml    | 61 +++++++++++++++++++
>>  MAINTAINERS                                   |  1 +
>>  2 files changed, 62 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/net/wireless/st,stlc4560.yaml
>> 
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> $id: Cannot determine base path from $id, relative path/filename 
> doesn't match actual path or filename
>  	 $id: http://devicetree.org/schemas/net/wireless/st,stlc45xx.yaml
>  	file: 

Thanks for the report, I've fixed it now for v5, to adjust for the
renamed file.

      Arnd

^ permalink raw reply

* Re: [PATCH 2/9] arm64: dts: qcom: arduino-imola: Describe boot1 NVMEM layout
From: Krzysztof Kozlowski @ 2026-04-30  9:43 UTC (permalink / raw)
  To: Loic Poulain
  Cc: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, Jens Axboe, Johannes Berg,
	Jeff Johnson, Bartosz Golaszewski, Marcel Holtmann,
	Luiz Augusto von Dentz, Balakrishna Godavarthi, Rocky Liao,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, linux-mmc, devicetree, linux-kernel, linux-arm-msm,
	linux-block, linux-wireless, ath10k, linux-bluetooth, netdev,
	daniel
In-Reply-To: <20260428-block-as-nvmem-v1-2-6ad23e75190a@oss.qualcomm.com>

On Tue, Apr 28, 2026 at 04:23:07PM +0200, Loic Poulain wrote:
> On Arduino Uno-Q, the eMMC boot1 partition is factory provisioned
> with device-specific information such as the WiFi MAC address
> and the Bluetooth BD address. This partition can serve as an
> alternative to additional non-volatile memory, such as a
> dedicated EEPROM.
> 
> The eMMC boot partitions are typically good candidates, as they
> are realively small, read-only by default (and can be enforced
> as hardware read-only), and are not affected by board reflashing
> procedures, which generally target the eMMC user or GP partitions.
> 
> Describe the corresponding nvmem-layout for the WiFi and
> Bluetooth addresses.
> 
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
>  arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts | 24 ++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
> index bf088fa9807f040f0c8f405f9111b01790b09377..dc85cf94f71cac8666cab30ccf37cc2d2f8fd941 100644
> --- a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
> +++ b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
> @@ -409,7 +409,31 @@ &sdhc_1 {
>  	no-sdio;
>  	no-sd;
>  
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +
>  	status = "okay";
> +
> +	card@0 {
> +		compatible = "mmc-card";
> +		reg = <0>;

> +
> +		partitions-boot1 {
> +			nvmem-layout {

This should not be a separate patch. You add the layout AND you use it.

> +				compatible = "fixed-layout";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +
> +				wifi_mac_addr: mac-addr@4400 {
> +					reg = <0x4400 0x6>;
> +				};
> +
> +				bd_addr: bd-addr@5400 {
> +					reg = <0x5400 0x6>;
> +				};
> +			};
> +		};
> +	};
>  };
>  
>  &spi5 {
> 
> -- 
> 2.34.1
> 

^ permalink raw reply

* Re: [PATCH v4 1/3 net-next] dt-bindings: net: add st,stlc4560/p54spi binding
From: Rob Herring (Arm) @ 2026-04-30  9:25 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Christian Lamparter, Andreas Kemnade, Benoît Cousson,
	Eric Dumazet, Bartosz Golaszewski, Krzysztof Kozlowski,
	Johannes Berg, Jakub Kicinski, Kevin Hilman, Arnd Bergmann,
	linux-kernel, linux-wireless, linux-omap, Felipe Balbi,
	Rob Herring, linux-gpio, Paolo Abeni, devicetree, netdev,
	David S. Miller, Roger Quadros, linux-arm-kernel, Dmitry Torokhov,
	Aaro Koskinen, Tony Lindgren, Linus Walleij
In-Reply-To: <20260430081242.3686993-2-arnd@kernel.org>


On Thu, 30 Apr 2026 10:12:40 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The SPI version of Prism54 was sold under a couple of different
> names and supported by the Linux p54spi driver, but there was
> never a DT binding for it.
> 
> Document the four known names of this device and the properties
> that are sufficient for its use on the Nokia N8x0 tablet.
> 
> As I don't have this hardware or documentation for it, this is
> purely based on existing usage in the driver.
> 
> Link: https://lore.kernel.org/all/e8dc9acb-6f85-e0a9-a145-d101ca6da201@gmail.com/
> Acked-by: Christian Lamparter <chunkeey@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v4: renamed file to st,stlc4560, matching the primary compatible string
>     require st,stlc4560 string
> ---
>  .../bindings/net/wireless/st,stlc4560.yaml    | 61 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 62 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/wireless/st,stlc4560.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/st,stlc4560.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename
 	 $id: http://devicetree.org/schemas/net/wireless/st,stlc45xx.yaml
 	file: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/st,stlc4560.yaml

doc reference errors (make refcheckdocs):
Warning: MAINTAINERS references a file that doesn't exist: Documentation/devicetree/bindings/net/wireless/st,stlc45xx.yaml
MAINTAINERS: Documentation/devicetree/bindings/net/wireless/st,stlc45xx.yaml

See https://patchwork.kernel.org/project/devicetree/patch/20260430081242.3686993-2-arnd@kernel.org

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply

* Re: [PATCH net-next] net: Consistently define pci_device_ids using named initializers
From: Markus Schneider-Pargmann @ 2026-04-30  8:55 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub), Michael Grzeschik,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Marc Kleine-Budde, Vincent Mailhol, Krzysztof Halasa,
	Johannes Berg
  Cc: Markus Schneider-Pargmann, Steffen Klassert, David Dillow,
	Ion Badulescu, Mark Einon, Rasesh Mody, GR-Linux-NIC-Dev,
	Sudarsana Kalluru, Manish Chopra, Potnuri Bharat Teja,
	Denis Kirjanov, Jijie Shao, Jian Shen, Cai Huoqing, Fan Gong,
	Tony Nguyen, Przemek Kitszel, Tariq Toukan, Saeed Mahameed,
	Leon Romanovsky, Mark Bloch, Ido Schimmel, Petr Machata,
	Yibo Dong, Simon Horman, Heiner Kallweit, nic_swsd, Jiri Pirko,
	Francois Romieu, Daniele Venzano, Samuel Chessman, Jiawen Wu,
	Mengyuan Lou, Kevin Curtis, Arend van Spriel, Stanislav Yakovlev,
	Richard Cochran, Kees Cook, Thomas Gleixner, Thomas Fourier,
	Ingo Molnar, Kory Maincent, Zilin Guan, Marco Crivellari,
	Vadim Fedorenko, Jacob Keller, Philipp Stanner, Bjorn Helgaas,
	Yeounsu Moon, Denis Benato, Peiyang Wang, Yonglong Liu,
	Andy Shevchenko, Yicong Hui, Randy Dunlap, MD Danish Anwar,
	Nathan Chancellor, Sai Krishna, Ethan Nelson-Moore,
	Larysa Zaremba, Joe Damato, Double Lo, Chi-hsien Lin,
	Colin Ian King, netdev, linux-kernel, linux-can, linux-parisc,
	intel-wired-lan, linux-rdma, oss-drivers, linux-wireless,
	brcm80211, brcm80211-dev-list.pdl
In-Reply-To: <20260428171845.2288395-2-u.kleine-koenig@baylibre.com>

[-- Attachment #1: Type: text/plain, Size: 2572 bytes --]

Hi Uwe,

On Tue Apr 28, 2026 at 7:18 PM CEST, Uwe Kleine-König (The Capable Hub) wrote:
> ... and PCI device helpers.
>
> The various struct pci_device_id arrays were initialized mostly by one
> the PCI_DEVICE macros and then list expressions. The latter isn't easily
> readable if you're not into PCI. Using named initializers is more
> explicit and thus easier to parse.
>
> Also use PCI_DEVICE* helper macros to assign .vendor, .device,
> .subvendor and .subdevice where appropriate and skip explicit
> assignments of 0 (which the compiler takes care of).
>
> The secret plan is to make struct pci_device_id::driver_data an
> anonymous union (similar to
> https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/)
> and that requires named initializers. But it's also a nice cleanup on
> its own.
>
> This change doesn't introduce changes to the compiled pci_device_id
> arrays. Tested on x86 and arm64.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> Hello,
>
> the mentioned follow-up quest allows to do
>
> 			PCI_DEVICE(0x1571, 0xa203),
> 	+		.driver_data = (kernel_ulong_t)&card_info_10mbit,
> 	-		.driver_data_ptr = &card_info_10mbit,
>
> which gets rid of a bunch of casts and so brings a little bit more type
> safety. This patch is a preparation for that.
>
> I handled all of drivers/net/ in a single patch, please tell me if I
> should split by subsystem.
>
> Best regards
> Uwe
> ---

[...]

> diff --git a/drivers/net/can/m_can/m_can_pci.c b/drivers/net/can/m_can/m_can_pci.c
> index eb31ed1f9644..cb9335c1d3ea 100644
> --- a/drivers/net/can/m_can/m_can_pci.c
> +++ b/drivers/net/can/m_can/m_can_pci.c
> @@ -183,9 +183,9 @@ static SIMPLE_DEV_PM_OPS(m_can_pci_pm_ops,
>  			 m_can_pci_suspend, m_can_pci_resume);
>  
>  static const struct pci_device_id m_can_pci_id_table[] = {
> -	{ PCI_VDEVICE(INTEL, 0x4bc1), M_CAN_CLOCK_FREQ_EHL, },
> -	{ PCI_VDEVICE(INTEL, 0x4bc2), M_CAN_CLOCK_FREQ_EHL, },
> -	{  }	/* Terminating Entry */
> +	{ PCI_VDEVICE(INTEL, 0x4bc1), .driver_data = M_CAN_CLOCK_FREQ_EHL, },
> +	{ PCI_VDEVICE(INTEL, 0x4bc2), .driver_data = M_CAN_CLOCK_FREQ_EHL, },
> +	{ }	/* terminating entry */

M_CAN_CLOCK_FREQ_EHL is basically hardcoded for all PCI devices since
2020. I don't think we need this driver data at all and can just drop it
and use M_CAN_CLOCK_FREQ_EHL directly in the code for the frequency.
Once a real new PCI device gets added we can see if and what driver_data
is needed.

Best
Markus

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 289 bytes --]

^ permalink raw reply

* [PATCH] wifi: mt76: mt792x: fix use-after-free in mt76_rx_poll_complete
From: JB Tsai @ 2026-04-30  8:45 UTC (permalink / raw)
  To: nbd, lorenzo
  Cc: linux-wireless, linux-mediatek, Deren.Wu, Sean.Wang, Quan.Zhou,
	Ryder.Lee, Leon.Yen, litien.chang, eason.lai, jb.tsai, Eason Lai

From: Eason Lai <Eason.Lai@mediatek.com>

A use-after-free issue occurs in mt76_rx_poll_complete due to a race
condition. The STA has already been removed, but the rx_status still
had a pointer to the wcid in the STA.

Use wcid_idx instead of storing the wcid pointer, and look up the wcid
via rcu_dereference() by wcid_idx.

BUG: KASAN: invalid-access in mt76_rx_poll_complete+0x280/0x470 [mt76]
Call trace:
dump_backtrace+0xec/0x128
show_stack+0x18/0x28
dump_stack_lvl+0x40/0xc8
print_report+0x1b8/0x710
kasan_report+0xe0/0x144
do_bad_area+0x120/0x260
do_tag_check_fault+0x20/0x34
do_mem_abort+0x54/0xa8
el1_abort+0x3c/0x5c
el1h_64_sync_handler+0x40/0xcc
el1h_64_sync+0x7c/0x80
mt76_rx_poll_complete+0x280/0x470
mt76_dma_rx_poll+0x114/0x51c
mt792x_poll_rx+0x60/0xf8
napi_threaded_poll_loop+0xe0/0x450
napi_threaded_poll+0x80/0x9c
kthread+0x11c/0x158
ret_from_fork+0x10/0x20

Signed-off-by: Eason Lai <Eason.Lai@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/agg-rx.c   | 18 ++++---
 drivers/net/wireless/mediatek/mt76/mac80211.c | 47 ++++++++-----------
 drivers/net/wireless/mediatek/mt76/mt76.h     |  7 ++-
 .../net/wireless/mediatek/mt76/mt7603/mac.c   |  6 ++-
 .../net/wireless/mediatek/mt76/mt7615/mac.c   | 19 +++++---
 .../net/wireless/mediatek/mt76/mt76_connac.h  |  3 +-
 .../wireless/mediatek/mt76/mt76_connac_mac.c  | 12 ++++-
 .../net/wireless/mediatek/mt76/mt7915/mac.c   | 16 +++++--
 .../net/wireless/mediatek/mt76/mt7921/mac.c   | 13 +++--
 .../net/wireless/mediatek/mt76/mt7925/mac.c   | 19 +++++---
 .../net/wireless/mediatek/mt76/mt7996/mac.c   | 29 ++++++++----
 11 files changed, 114 insertions(+), 75 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/agg-rx.c b/drivers/net/wireless/mediatek/mt76/agg-rx.c
index bf1babac3895..b72d13975466 100644
--- a/drivers/net/wireless/mediatek/mt76/agg-rx.c
+++ b/drivers/net/wireless/mediatek/mt76/agg-rx.c
@@ -116,14 +116,15 @@ mt76_rx_aggr_reorder_work(struct work_struct *work)
 }
 
 static void
-mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames)
+mt76_rx_aggr_check_ctl(struct mt76_dev *dev, struct sk_buff *skb,
+		       struct sk_buff_head *frames)
 {
 	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
 	struct ieee80211_bar *bar = mt76_skb_get_hdr(skb);
-	struct mt76_wcid *wcid = status->wcid;
 	struct mt76_rx_tid *tid;
-	u8 tidno;
+	struct mt76_wcid *wcid;
 	u16 seqno;
+	u8 tidno;
 
 	if (!ieee80211_is_ctl(bar->frame_control))
 		return;
@@ -131,6 +132,10 @@ mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames)
 	if (!ieee80211_is_back_req(bar->frame_control))
 		return;
 
+	wcid = __mt76_wcid_ptr(dev, status->wcid_idx);
+	if (!wcid)
+		return;
+
 	status->qos_ctl = tidno = le16_to_cpu(bar->control) >> 12;
 	seqno = IEEE80211_SEQ_TO_SN(le16_to_cpu(bar->start_seq_num));
 	tid = rcu_dereference(wcid->aggr[tidno]);
@@ -145,10 +150,11 @@ mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames)
 	spin_unlock_bh(&tid->lock);
 }
 
-void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames)
+void mt76_rx_aggr_reorder(struct mt76_dev *dev, struct sk_buff *skb,
+			  struct sk_buff_head *frames)
 {
 	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct mt76_wcid *wcid = status->wcid;
+	struct mt76_wcid *wcid = __mt76_wcid_ptr(dev, status->wcid_idx);
 	struct ieee80211_sta *sta;
 	struct mt76_rx_tid *tid;
 	bool sn_less;
@@ -164,7 +170,7 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames)
 
 	if (!status->aggr) {
 		if (!(status->flag & RX_FLAG_8023))
-			mt76_rx_aggr_check_ctl(skb, frames);
+			mt76_rx_aggr_check_ctl(dev, skb, frames);
 		return;
 	}
 
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 4ae5e4715a9c..2933b29782d3 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -1283,21 +1283,24 @@ mt76_rx_convert(struct mt76_dev *dev, struct sk_buff *skb,
 	memcpy(status->chain_signal, mstat.chain_signal,
 	       sizeof(mstat.chain_signal));
 
-	if (mstat.wcid) {
-		status->link_valid = mstat.wcid->link_valid;
-		status->link_id = mstat.wcid->link_id;
-	}
+	if (mstat.wcid_idx != MT76_WCID_IDX_INVALID) {
+		struct mt76_wcid *wcid = __mt76_wcid_ptr(dev, mstat.wcid_idx);
 
-	*sta = wcid_to_sta(mstat.wcid);
+		if (wcid) {
+			status->link_valid = wcid->link_valid;
+			status->link_id = wcid->link_id;
+			*sta = wcid_to_sta(wcid);
+		}
+	}
 	*hw = mt76_phy_hw(dev, mstat.phy_idx);
 }
 
 static void
-mt76_check_ccmp_pn(struct sk_buff *skb)
+mt76_check_ccmp_pn(struct mt76_dev *dev, struct sk_buff *skb)
 {
 	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct mt76_wcid *wcid = status->wcid;
 	struct ieee80211_hdr *hdr;
+	struct mt76_wcid *wcid;
 	int security_idx;
 	int ret;
 
@@ -1307,6 +1310,7 @@ mt76_check_ccmp_pn(struct sk_buff *skb)
 	if (status->flag & RX_FLAG_ONLY_MONITOR)
 		return;
 
+	wcid = __mt76_wcid_ptr(dev, status->wcid_idx);
 	if (!wcid || !wcid->rx_check_pn)
 		return;
 
@@ -1354,7 +1358,7 @@ static void
 mt76_airtime_report(struct mt76_dev *dev, struct mt76_rx_status *status,
 		    int len)
 {
-	struct mt76_wcid *wcid = status->wcid;
+	struct mt76_wcid *wcid = __mt76_wcid_ptr(dev, status->wcid_idx);
 	struct ieee80211_rx_status info = {
 		.enc_flags = status->enc_flags,
 		.rate_idx = status->rate_idx,
@@ -1382,19 +1386,9 @@ mt76_airtime_report(struct mt76_dev *dev, struct mt76_rx_status *status,
 static void
 mt76_airtime_flush_ampdu(struct mt76_dev *dev)
 {
-	struct mt76_wcid *wcid;
-	int wcid_idx;
-
 	if (!dev->rx_ampdu_len)
 		return;
 
-	wcid_idx = dev->rx_ampdu_status.wcid_idx;
-	if (wcid_idx < ARRAY_SIZE(dev->wcid))
-		wcid = rcu_dereference(dev->wcid[wcid_idx]);
-	else
-		wcid = NULL;
-	dev->rx_ampdu_status.wcid = wcid;
-
 	mt76_airtime_report(dev, &dev->rx_ampdu_status, dev->rx_ampdu_len);
 
 	dev->rx_ampdu_len = 0;
@@ -1405,7 +1399,7 @@ static void
 mt76_airtime_check(struct mt76_dev *dev, struct sk_buff *skb)
 {
 	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct mt76_wcid *wcid = status->wcid;
+	struct mt76_wcid *wcid = __mt76_wcid_ptr(dev, status->wcid_idx);
 
 	if (!(dev->drv->drv_flags & MT_DRV_SW_RX_AIRTIME))
 		return;
@@ -1418,8 +1412,6 @@ mt76_airtime_check(struct mt76_dev *dev, struct sk_buff *skb)
 
 		if (!ether_addr_equal(hdr->addr1, dev->phy.macaddr))
 			return;
-
-		wcid = NULL;
 	}
 
 	if (!(status->flag & RX_FLAG_AMPDU_DETAILS) ||
@@ -1430,7 +1422,6 @@ mt76_airtime_check(struct mt76_dev *dev, struct sk_buff *skb)
 		if (!dev->rx_ampdu_len ||
 		    status->ampdu_ref != dev->rx_ampdu_ref) {
 			dev->rx_ampdu_status = *status;
-			dev->rx_ampdu_status.wcid_idx = wcid ? wcid->idx : 0xff;
 			dev->rx_ampdu_ref = status->ampdu_ref;
 		}
 
@@ -1448,7 +1439,7 @@ mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
 	struct ieee80211_hdr *hdr = mt76_skb_get_hdr(skb);
 	struct ieee80211_sta *sta;
 	struct ieee80211_hw *hw;
-	struct mt76_wcid *wcid = status->wcid;
+	struct mt76_wcid *wcid = __mt76_wcid_ptr(dev, status->wcid_idx);
 	u8 tidno = status->qos_ctl & IEEE80211_QOS_CTL_TID_MASK;
 	bool ps;
 
@@ -1456,8 +1447,10 @@ mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
 	if (ieee80211_is_pspoll(hdr->frame_control) && !wcid &&
 	    !(status->flag & RX_FLAG_8023)) {
 		sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr2, NULL);
-		if (sta)
-			wcid = status->wcid = (struct mt76_wcid *)sta->drv_priv;
+		if (sta) {
+			wcid = (struct mt76_wcid *)sta->drv_priv;
+			status->wcid_idx = wcid->idx;
+		}
 	}
 
 	mt76_airtime_check(dev, skb);
@@ -1521,7 +1514,7 @@ void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
 	while ((skb = __skb_dequeue(frames)) != NULL) {
 		struct sk_buff *nskb = skb_shinfo(skb)->frag_list;
 
-		mt76_check_ccmp_pn(skb);
+		mt76_check_ccmp_pn(dev, skb);
 		skb_shinfo(skb)->frag_list = NULL;
 		mt76_rx_convert(dev, skb, &hw, &sta);
 		ieee80211_rx_list(hw, sta, skb, &list);
@@ -1563,7 +1556,7 @@ void mt76_rx_poll_complete(struct mt76_dev *dev, enum mt76_rxq_id q,
 		    mt76_npu_device_active(dev))
 			__skb_queue_tail(&frames, skb);
 		else
-			mt76_rx_aggr_reorder(skb, &frames);
+			mt76_rx_aggr_reorder(dev, skb, &frames);
 	}
 
 	mt76_rx_complete(dev, &frames, napi);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 527bef97e122..fd449298fb11 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -364,6 +364,7 @@ enum mt76_wcid_flags {
 };
 
 #define MT76_N_WCIDS 1088
+#define MT76_WCID_IDX_INVALID		0xffff
 #define MT76_BEACON_MON_MAX_MISS	7
 
 /* stored in ieee80211_tx_info::hw_queue */
@@ -728,10 +729,7 @@ struct mt76_mmio {
 };
 
 struct mt76_rx_status {
-	union {
-		struct mt76_wcid *wcid;
 		u16 wcid_idx;
-	};
 
 	u32 reorder_time;
 
@@ -1793,7 +1791,8 @@ void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
 		      struct napi_struct *napi);
 void mt76_rx_poll_complete(struct mt76_dev *dev, enum mt76_rxq_id q,
 			   struct napi_struct *napi);
-void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames);
+void mt76_rx_aggr_reorder(struct mt76_dev *dev, struct sk_buff *skb,
+			  struct sk_buff_head *frames);
 void mt76_testmode_tx_pending(struct mt76_phy *phy);
 void mt76_queue_tx_complete(struct mt76_dev *dev, struct mt76_queue *q,
 			    struct mt76_queue_entry *e);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index d3110eeb45d7..aeb890df808e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -513,6 +513,7 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb)
 	u32 rxd2 = le32_to_cpu(rxd[2]);
 	bool unicast = rxd1 & MT_RXD1_NORMAL_U2M;
 	bool insert_ccmp_hdr = false;
+	struct mt76_wcid *wcid;
 	bool remove_pad;
 	int idx;
 	int i;
@@ -524,7 +525,8 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb)
 	i >>= 1;
 
 	idx = FIELD_GET(MT_RXD2_NORMAL_WLAN_IDX, rxd2);
-	status->wcid = mt7603_rx_get_wcid(dev, idx, unicast);
+	wcid = mt7603_rx_get_wcid(dev, idx, unicast);
+	status->wcid_idx = wcid ? wcid->idx : MT76_WCID_IDX_INVALID;
 
 	status->band = sband->band;
 	if (i < sband->n_channels)
@@ -672,7 +674,7 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb)
 	}
 
 	hdr = (struct ieee80211_hdr *)skb->data;
-	if (!status->wcid || !ieee80211_is_data_qos(hdr->frame_control))
+	if (!wcid || !ieee80211_is_data_qos(hdr->frame_control))
 		return 0;
 
 	status->aggr = unicast &&
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
index ce0051468501..84be00a13930 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
@@ -246,17 +246,20 @@ static void mt7615_mac_fill_tm_rx(struct mt7615_phy *phy, __le32 *rxv)
 }
 
 /* The HW does not translate the mac header to 802.3 for mesh point */
-static int mt7615_reverse_frag0_hdr_trans(struct sk_buff *skb, u16 hdr_gap)
+static int mt7615_reverse_frag0_hdr_trans(struct mt7615_dev *dev,
+					  struct sk_buff *skb, u16 hdr_gap)
 {
 	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
 	struct ethhdr *eth_hdr = (struct ethhdr *)(skb->data + hdr_gap);
-	struct mt7615_sta *msta = (struct mt7615_sta *)status->wcid;
 	__le32 *rxd = (__le32 *)skb->data;
 	struct ieee80211_sta *sta;
 	struct ieee80211_vif *vif;
 	struct ieee80211_hdr hdr;
+	struct mt7615_sta *msta;
 	u16 frame_control;
 
+	msta = (struct mt7615_sta *)mt76_wcid_ptr(dev, status->wcid_idx);
+
 	if (le32_get_bits(rxd[1], MT_RXD1_NORMAL_ADDR_TYPE) !=
 	    MT_RXD1_NORMAL_U2M)
 		return -EINVAL;
@@ -335,6 +338,7 @@ static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
 	struct ieee80211_supported_band *sband;
 	struct ieee80211_hdr *hdr;
 	struct mt7615_phy *phy2;
+	struct mt76_wcid *wcid;
 	__le32 *rxd = (__le32 *)skb->data;
 	u32 rxd0 = le32_to_cpu(rxd[0]);
 	u32 rxd1 = le32_to_cpu(rxd[1]);
@@ -378,12 +382,13 @@ static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
 
 	unicast = (rxd1 & MT_RXD1_NORMAL_ADDR_TYPE) == MT_RXD1_NORMAL_U2M;
 	idx = FIELD_GET(MT_RXD2_NORMAL_WLAN_IDX, rxd2);
-	status->wcid = mt7615_rx_get_wcid(dev, idx, unicast);
+	wcid = mt7615_rx_get_wcid(dev, idx, unicast);
+	status->wcid_idx = wcid ? wcid->idx : MT76_WCID_IDX_INVALID;
 
-	if (status->wcid) {
+	if (wcid) {
 		struct mt7615_sta *msta;
 
-		msta = container_of(status->wcid, struct mt7615_sta, wcid);
+		msta = container_of(wcid, struct mt7615_sta, wcid);
 		mt76_wcid_add_poll(&dev->mt76, &msta->wcid);
 	}
 
@@ -590,7 +595,7 @@ static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
 
 	hdr_gap = (u8 *)rxd - skb->data + 2 * remove_pad;
 	if (hdr_trans && ieee80211_has_morefrags(fc)) {
-		if (mt7615_reverse_frag0_hdr_trans(skb, hdr_gap))
+		if (mt7615_reverse_frag0_hdr_trans(dev, skb, hdr_gap))
 			return -EINVAL;
 		hdr_trans = false;
 	} else {
@@ -638,7 +643,7 @@ static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
 		status->flag |= RX_FLAG_8023;
 	}
 
-	if (!status->wcid || !ieee80211_is_data_qos(fc))
+	if (!wcid || !ieee80211_is_data_qos(fc))
 		return 0;
 
 	status->aggr = unicast &&
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac.h b/drivers/net/wireless/mediatek/mt76/mt76_connac.h
index 51423c7740bd..d9ae8d204442 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac.h
@@ -448,7 +448,8 @@ bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
 void mt76_connac2_mac_decode_he_radiotap(struct mt76_dev *dev,
 					 struct sk_buff *skb,
 					 __le32 *rxv, u32 mode);
-int mt76_connac2_reverse_frag0_hdr_trans(struct ieee80211_vif *vif,
+int mt76_connac2_reverse_frag0_hdr_trans(struct mt76_dev *dev,
+					 struct ieee80211_vif *vif,
 					 struct sk_buff *skb, u16 hdr_offset);
 int mt76_connac2_mac_fill_rx_rate(struct mt76_dev *dev,
 				  struct mt76_rx_status *status,
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c
index 0339e2e7ab60..376d59d517cc 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c
@@ -952,7 +952,8 @@ void mt76_connac2_mac_decode_he_radiotap(struct mt76_dev *dev,
 EXPORT_SYMBOL_GPL(mt76_connac2_mac_decode_he_radiotap);
 
 /* The HW does not translate the mac header to 802.3 for mesh point */
-int mt76_connac2_reverse_frag0_hdr_trans(struct ieee80211_vif *vif,
+int mt76_connac2_reverse_frag0_hdr_trans(struct mt76_dev *dev,
+					 struct ieee80211_vif *vif,
 					 struct sk_buff *skb, u16 hdr_offset)
 {
 	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
@@ -960,6 +961,7 @@ int mt76_connac2_reverse_frag0_hdr_trans(struct ieee80211_vif *vif,
 	__le32 *rxd = (__le32 *)skb->data;
 	struct ieee80211_sta *sta;
 	struct ieee80211_hdr hdr;
+	struct mt76_wcid *wcid;
 	u16 frame_control;
 
 	if (le32_get_bits(rxd[3], MT_RXD3_NORMAL_ADDR_TYPE) !=
@@ -969,7 +971,13 @@ int mt76_connac2_reverse_frag0_hdr_trans(struct ieee80211_vif *vif,
 	if (!(le32_to_cpu(rxd[1]) & MT_RXD1_NORMAL_GROUP_4))
 		return -EINVAL;
 
-	sta = container_of((void *)status->wcid, struct ieee80211_sta, drv_priv);
+	wcid = __mt76_wcid_ptr(dev, status->wcid_idx);
+	if (!wcid)
+		return -EINVAL;
+
+	sta = container_of((void *)wcid, struct ieee80211_sta, drv_priv);
+	if (!sta)
+		return -EINVAL;
 
 	/* store the info from RXD and ethhdr to avoid being overridden */
 	frame_control = le32_get_bits(rxd[6], MT_RXD6_FRAME_CONTROL);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index cec2c4208255..30672713323f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -280,6 +280,7 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
 	u8 mode = 0, qos_ctl = 0;
 	struct mt7915_sta *msta = NULL;
 	u32 csum_status = *(u32 *)skb->cb;
+	struct mt76_wcid *wcid;
 	bool hdr_trans;
 	u16 hdr_gap;
 	u16 seq_ctrl = 0;
@@ -313,10 +314,13 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
 
 	unicast = FIELD_GET(MT_RXD3_NORMAL_ADDR_TYPE, rxd3) == MT_RXD3_NORMAL_U2M;
 	idx = FIELD_GET(MT_RXD1_NORMAL_WLAN_IDX, rxd1);
-	status->wcid = mt7915_rx_get_wcid(dev, idx, unicast);
 
-	if (status->wcid) {
-		msta = container_of(status->wcid, struct mt7915_sta, wcid);
+	wcid = mt7915_rx_get_wcid(dev, idx, unicast);
+
+	status->wcid_idx = wcid ? wcid->idx : MT76_WCID_IDX_INVALID;
+
+	if (wcid) {
+		msta = container_of(wcid, struct mt7915_sta, wcid);
 		mt76_wcid_add_poll(&dev->mt76, &msta->wcid);
 	}
 
@@ -475,7 +479,8 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
 
 		vif = container_of((void *)msta->vif, struct ieee80211_vif,
 				   drv_priv);
-		err = mt76_connac2_reverse_frag0_hdr_trans(vif, skb, hdr_gap);
+		err = mt76_connac2_reverse_frag0_hdr_trans(&dev->mt76, vif,
+							   skb, hdr_gap);
 		if (err)
 			return err;
 
@@ -532,7 +537,8 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
 	if (rxv && mode >= MT_PHY_TYPE_HE_SU && !(status->flag & RX_FLAG_8023))
 		mt76_connac2_mac_decode_he_radiotap(&dev->mt76, skb, rxv, mode);
 
-	if (!status->wcid || !ieee80211_is_data_qos(fc))
+	if (status->wcid_idx == MT76_WCID_IDX_INVALID ||
+	    !ieee80211_is_data_qos(fc))
 		return 0;
 
 	status->aggr = unicast &&
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
index 03b4960db73f..59c64b951678 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
@@ -184,6 +184,7 @@ mt7921_mac_fill_rx(struct mt792x_dev *dev, struct sk_buff *skb)
 	u32 rxd4 = le32_to_cpu(rxd[4]);
 	struct mt792x_sta *msta = NULL;
 	struct mt792x_link_sta *mlink;
+	struct mt76_wcid *wcid;
 	u16 seq_ctrl = 0;
 	__le16 fc = 0;
 	u8 mode = 0;
@@ -211,10 +212,11 @@ mt7921_mac_fill_rx(struct mt792x_dev *dev, struct sk_buff *skb)
 	chfreq = FIELD_GET(MT_RXD3_NORMAL_CH_FREQ, rxd3);
 	unicast = FIELD_GET(MT_RXD3_NORMAL_ADDR_TYPE, rxd3) == MT_RXD3_NORMAL_U2M;
 	idx = FIELD_GET(MT_RXD1_NORMAL_WLAN_IDX, rxd1);
-	status->wcid = mt792x_rx_get_wcid(dev, idx, unicast);
+	wcid = mt792x_rx_get_wcid(dev, idx, unicast);
+	status->wcid_idx = wcid ? wcid->idx : MT76_WCID_IDX_INVALID;
 
-	if (status->wcid) {
-		mlink = container_of(status->wcid, struct mt792x_link_sta, wcid);
+	if (wcid) {
+		mlink = container_of(wcid, struct mt792x_link_sta, wcid);
 		msta = container_of(mlink, struct mt792x_sta, deflink);
 		mt76_wcid_add_poll(&dev->mt76, &mlink->wcid);
 	}
@@ -395,7 +397,8 @@ mt7921_mac_fill_rx(struct mt792x_dev *dev, struct sk_buff *skb)
 
 		vif = container_of((void *)msta->vif, struct ieee80211_vif,
 				   drv_priv);
-		err = mt76_connac2_reverse_frag0_hdr_trans(vif, skb, hdr_gap);
+		err = mt76_connac2_reverse_frag0_hdr_trans(&dev->mt76, vif,
+							   skb, hdr_gap);
 		if (err)
 			return err;
 
@@ -433,7 +436,7 @@ mt7921_mac_fill_rx(struct mt792x_dev *dev, struct sk_buff *skb)
 	if (rxv && mode >= MT_PHY_TYPE_HE_SU && !(status->flag & RX_FLAG_8023))
 		mt76_connac2_mac_decode_he_radiotap(&dev->mt76, skb, rxv, mode);
 
-	if (!status->wcid || !ieee80211_is_data_qos(fc))
+	if (!wcid || !ieee80211_is_data_qos(fc))
 		return 0;
 
 	status->aggr = unicast && !ieee80211_is_qos_nullfunc(fc);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
index c47bd812b66b..e429f78596e2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
@@ -166,17 +166,20 @@ void mt7925_mac_set_fixed_rate_table(struct mt792x_dev *dev,
 }
 
 /* The HW does not translate the mac header to 802.3 for mesh point */
-static int mt7925_reverse_frag0_hdr_trans(struct sk_buff *skb, u16 hdr_gap)
+static int mt7925_reverse_frag0_hdr_trans(struct mt792x_dev *dev,
+					  struct sk_buff *skb, u16 hdr_gap)
 {
 	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
 	struct ethhdr *eth_hdr = (struct ethhdr *)(skb->data + hdr_gap);
-	struct mt792x_sta *msta = (struct mt792x_sta *)status->wcid;
 	__le32 *rxd = (__le32 *)skb->data;
 	struct ieee80211_sta *sta;
 	struct ieee80211_vif *vif;
 	struct ieee80211_hdr hdr;
+	struct mt792x_sta *msta;
 	u16 frame_control;
 
+	msta = (struct mt792x_sta *)mt76_wcid_ptr(dev, status->wcid_idx);
+
 	if (le32_get_bits(rxd[3], MT_RXD3_NORMAL_ADDR_TYPE) !=
 	    MT_RXD3_NORMAL_U2M)
 		return -EINVAL;
@@ -368,6 +371,7 @@ mt7925_mac_fill_rx(struct mt792x_dev *dev, struct sk_buff *skb)
 	u32 rxd3 = le32_to_cpu(rxd[3]);
 	u32 rxd4 = le32_to_cpu(rxd[4]);
 	struct mt792x_link_sta *mlink;
+	struct mt76_wcid *wcid;
 	u8 mode = 0; /* , band_idx; */
 	u16 seq_ctrl = 0;
 	__le16 fc = 0;
@@ -392,10 +396,11 @@ mt7925_mac_fill_rx(struct mt792x_dev *dev, struct sk_buff *skb)
 	chfreq = FIELD_GET(MT_RXD3_NORMAL_CH_FREQ, rxd3);
 	unicast = FIELD_GET(MT_RXD3_NORMAL_ADDR_TYPE, rxd3) == MT_RXD3_NORMAL_U2M;
 	idx = FIELD_GET(MT_RXD1_NORMAL_WLAN_IDX, rxd1);
-	status->wcid = mt792x_rx_get_wcid(dev, idx, unicast);
+	wcid = mt792x_rx_get_wcid(dev, idx, unicast);
+	status->wcid_idx = wcid ? wcid->idx : MT76_WCID_IDX_INVALID;
 
-	if (status->wcid) {
-		mlink = container_of(status->wcid, struct mt792x_link_sta, wcid);
+	if (wcid) {
+		mlink = container_of(wcid, struct mt792x_link_sta, wcid);
 		mt76_wcid_add_poll(&dev->mt76, &mlink->wcid);
 	}
 
@@ -545,7 +550,7 @@ mt7925_mac_fill_rx(struct mt792x_dev *dev, struct sk_buff *skb)
 
 	hdr_gap = (u8 *)rxd - skb->data + 2 * remove_pad;
 	if (hdr_trans && ieee80211_has_morefrags(fc)) {
-		if (mt7925_reverse_frag0_hdr_trans(skb, hdr_gap))
+		if (mt7925_reverse_frag0_hdr_trans(dev, skb, hdr_gap))
 			return -EINVAL;
 		hdr_trans = false;
 	} else {
@@ -608,7 +613,7 @@ mt7925_mac_fill_rx(struct mt792x_dev *dev, struct sk_buff *skb)
 		}
 	}
 
-	if (!status->wcid || !ieee80211_is_data_qos(fc))
+	if (!wcid || !ieee80211_is_data_qos(fc))
 		return 0;
 
 	status->aggr = unicast && !ieee80211_is_qos_nullfunc(fc);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index e2a83da3a09c..98c30957dd76 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -186,17 +186,19 @@ static void mt7996_mac_sta_poll(struct mt7996_dev *dev)
 }
 
 /* The HW does not translate the mac header to 802.3 for mesh point */
-static int mt7996_reverse_frag0_hdr_trans(struct sk_buff *skb, u16 hdr_gap)
+static int mt7996_reverse_frag0_hdr_trans(struct mt7996_dev *dev,
+					  struct sk_buff *skb, u16 hdr_gap)
 {
 	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
 	struct ethhdr *eth_hdr = (struct ethhdr *)(skb->data + hdr_gap);
-	struct mt7996_sta_link *msta_link = (void *)status->wcid;
-	struct mt7996_sta *msta = msta_link->sta;
+	struct mt76_wcid *wcid = mt76_wcid_ptr(dev, status->wcid_idx);
+	struct mt7996_sta_link *msta_link;
 	struct ieee80211_bss_conf *link_conf;
 	__le32 *rxd = (__le32 *)skb->data;
 	struct ieee80211_sta *sta;
 	struct ieee80211_vif *vif;
 	struct ieee80211_hdr hdr;
+	struct mt7996_sta *msta;
 	u16 frame_control;
 
 	if (le32_get_bits(rxd[3], MT_RXD3_NORMAL_ADDR_TYPE) !=
@@ -206,10 +208,16 @@ static int mt7996_reverse_frag0_hdr_trans(struct sk_buff *skb, u16 hdr_gap)
 	if (!(le32_to_cpu(rxd[1]) & MT_RXD1_NORMAL_GROUP_4))
 		return -EINVAL;
 
+	if (!wcid)
+		return -EINVAL;
+
+	msta_link = container_of(wcid, struct mt7996_sta_link, wcid);
+	msta = msta_link->sta;
+
 	if (!msta || !msta->vif)
 		return -EINVAL;
 
-	sta = wcid_to_sta(status->wcid);
+	sta = wcid_to_sta(wcid);
 	vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv);
 	link_conf = rcu_dereference(vif->link_conf[msta_link->wcid.link_id]);
 	if (!link_conf)
@@ -429,6 +437,7 @@ mt7996_mac_fill_rx(struct mt7996_dev *dev, enum mt76_rxq_id q,
 	bool unicast, insert_ccmp_hdr = false;
 	u8 remove_pad, amsdu_info, band_idx;
 	u8 mode = 0, qos_ctl = 0;
+	struct mt76_wcid *wcid;
 	bool hdr_trans;
 	u16 hdr_gap;
 	u16 seq_ctrl = 0;
@@ -461,12 +470,14 @@ mt7996_mac_fill_rx(struct mt7996_dev *dev, enum mt76_rxq_id q,
 
 	unicast = FIELD_GET(MT_RXD3_NORMAL_ADDR_TYPE, rxd3) == MT_RXD3_NORMAL_U2M;
 	idx = FIELD_GET(MT_RXD1_NORMAL_WLAN_IDX, rxd1);
-	status->wcid = mt7996_rx_get_wcid(dev, idx, band_idx);
 
-	if (status->wcid) {
+	wcid = mt7996_rx_get_wcid(dev, idx, band_idx);
+	status->wcid_idx = wcid ? wcid->idx : MT76_WCID_IDX_INVALID;
+
+	if (wcid) {
 		struct mt7996_sta_link *msta_link;
 
-		msta_link = container_of(status->wcid, struct mt7996_sta_link,
+		msta_link = container_of(wcid, struct mt7996_sta_link,
 					 wcid);
 		msta = msta_link->sta;
 		mt76_wcid_add_poll(&dev->mt76, &msta_link->wcid);
@@ -620,7 +631,7 @@ mt7996_mac_fill_rx(struct mt7996_dev *dev, enum mt76_rxq_id q,
 
 	hdr_gap = (u8 *)rxd - skb->data + 2 * remove_pad;
 	if (hdr_trans && ieee80211_has_morefrags(fc)) {
-		if (mt7996_reverse_frag0_hdr_trans(skb, hdr_gap))
+		if (mt7996_reverse_frag0_hdr_trans(dev, skb, hdr_gap))
 			return -EINVAL;
 		hdr_trans = false;
 	} else {
@@ -697,7 +708,7 @@ mt7996_mac_fill_rx(struct mt7996_dev *dev, enum mt76_rxq_id q,
 		}
 	}
 
-	if (!status->wcid || !ieee80211_is_data_qos(fc) || hw_aggr)
+	if (!wcid || !ieee80211_is_data_qos(fc) || hw_aggr)
 		return 0;
 
 	status->aggr = unicast &&
-- 
2.45.2


^ permalink raw reply related

* [PATCH v2 RESEND 3/5] wifi: mt76x2u: drop redundant device reference
From: Johan Hovold @ 2026-04-30  8:33 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Jakub Kicinski
  Cc: Shayne Chen, Sean Wang, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-wireless, linux-mediatek,
	linux-kernel, Johan Hovold
In-Reply-To: <20260430083335.215239-1-johan@kernel.org>

Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.

Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt76x2/usb.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
index 01cb3b2830f3..8af360bca643 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
@@ -57,7 +57,6 @@ static int mt76x2u_probe(struct usb_interface *intf,
 
 	dev = container_of(mdev, struct mt76x02_dev, mt76);
 
-	udev = usb_get_dev(udev);
 	usb_reset_device(udev);
 
 	usb_set_intfdata(intf, dev);
@@ -84,14 +83,12 @@ static int mt76x2u_probe(struct usb_interface *intf,
 	mt76u_queues_deinit(&dev->mt76);
 	mt76_free_device(&dev->mt76);
 	usb_set_intfdata(intf, NULL);
-	usb_put_dev(udev);
 
 	return err;
 }
 
 static void mt76x2u_disconnect(struct usb_interface *intf)
 {
-	struct usb_device *udev = interface_to_usbdev(intf);
 	struct mt76x02_dev *dev = usb_get_intfdata(intf);
 	struct ieee80211_hw *hw = mt76_hw(dev);
 
@@ -100,7 +97,6 @@ static void mt76x2u_disconnect(struct usb_interface *intf)
 	mt76x2u_cleanup(dev);
 	mt76_free_device(&dev->mt76);
 	usb_set_intfdata(intf, NULL);
-	usb_put_dev(udev);
 }
 
 static int __maybe_unused mt76x2u_suspend(struct usb_interface *intf,
-- 
2.53.0


^ permalink raw reply related

* [PATCH v2 RESEND 4/5] wifi: mt76: mt792xu: drop redundant device reference
From: Johan Hovold @ 2026-04-30  8:33 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Jakub Kicinski
  Cc: Shayne Chen, Sean Wang, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-wireless, linux-mediatek,
	linux-kernel, Johan Hovold
In-Reply-To: <20260430083335.215239-1-johan@kernel.org>

Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.

Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 2 --
 drivers/net/wireless/mediatek/mt76/mt7925/usb.c | 2 --
 drivers/net/wireless/mediatek/mt76/mt792x_usb.c | 1 -
 3 files changed, 5 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
index 17057e68bf21..9bfc234f306f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
@@ -197,7 +197,6 @@ static int mt7921u_probe(struct usb_interface *usb_intf,
 	dev->fw_features = features;
 	dev->hif_ops = &hif_ops;
 
-	udev = usb_get_dev(udev);
 	usb_reset_device(udev);
 
 	usb_set_intfdata(usb_intf, dev);
@@ -246,7 +245,6 @@ static int mt7921u_probe(struct usb_interface *usb_intf,
 	mt76u_queues_deinit(&dev->mt76);
 
 	usb_set_intfdata(usb_intf, NULL);
-	usb_put_dev(interface_to_usbdev(usb_intf));
 
 	mt76_free_device(&dev->mt76);
 
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/usb.c b/drivers/net/wireless/mediatek/mt76/mt7925/usb.c
index d9968f03856d..84bcebbf009a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/usb.c
@@ -185,7 +185,6 @@ static int mt7925u_probe(struct usb_interface *usb_intf,
 	dev->fw_features = features;
 	dev->hif_ops = &hif_ops;
 
-	udev = usb_get_dev(udev);
 	usb_reset_device(udev);
 
 	usb_set_intfdata(usb_intf, dev);
@@ -234,7 +233,6 @@ static int mt7925u_probe(struct usb_interface *usb_intf,
 	mt76u_queues_deinit(&dev->mt76);
 
 	usb_set_intfdata(usb_intf, NULL);
-	usb_put_dev(interface_to_usbdev(usb_intf));
 
 	mt76_free_device(&dev->mt76);
 
diff --git a/drivers/net/wireless/mediatek/mt76/mt792x_usb.c b/drivers/net/wireless/mediatek/mt76/mt792x_usb.c
index 47827d1c5ccb..0d9dbd0aaf9e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt792x_usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt792x_usb.c
@@ -341,7 +341,6 @@ void mt792xu_disconnect(struct usb_interface *usb_intf)
 	mt792xu_cleanup(dev);
 
 	usb_set_intfdata(usb_intf, NULL);
-	usb_put_dev(interface_to_usbdev(usb_intf));
 
 	mt76_free_device(&dev->mt76);
 }
-- 
2.53.0


^ permalink raw reply related

* [PATCH v2 RESEND 1/5] wifi: mt76: drop redundant device reference
From: Johan Hovold @ 2026-04-30  8:33 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Jakub Kicinski
  Cc: Shayne Chen, Sean Wang, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-wireless, linux-mediatek,
	linux-kernel, Johan Hovold
In-Reply-To: <20260430083335.215239-1-johan@kernel.org>

Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.

Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/usb.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/usb.c b/drivers/net/wireless/mediatek/mt76/mt7615/usb.c
index d91feffadda9..bab7b91f14be 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/usb.c
@@ -151,7 +151,6 @@ static int mt7663u_probe(struct usb_interface *usb_intf,
 		return -ENOMEM;
 
 	dev = container_of(mdev, struct mt7615_dev, mt76);
-	udev = usb_get_dev(udev);
 	usb_reset_device(udev);
 
 	usb_set_intfdata(usb_intf, dev);
@@ -193,7 +192,6 @@ static int mt7663u_probe(struct usb_interface *usb_intf,
 error:
 	mt76u_queues_deinit(&dev->mt76);
 	usb_set_intfdata(usb_intf, NULL);
-	usb_put_dev(interface_to_usbdev(usb_intf));
 
 	mt76_free_device(&dev->mt76);
 
@@ -211,7 +209,6 @@ static void mt7663u_disconnect(struct usb_interface *usb_intf)
 	mt7663u_cleanup(dev);
 
 	usb_set_intfdata(usb_intf, NULL);
-	usb_put_dev(interface_to_usbdev(usb_intf));
 
 	mt76_free_device(&dev->mt76);
 }
-- 
2.53.0


^ permalink raw reply related

* [PATCH v2 RESEND 5/5] wifi: mt7601u: drop redundant device reference
From: Johan Hovold @ 2026-04-30  8:33 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Jakub Kicinski
  Cc: Shayne Chen, Sean Wang, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-wireless, linux-mediatek,
	linux-kernel, Johan Hovold
In-Reply-To: <20260430083335.215239-1-johan@kernel.org>

Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.

Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/wireless/mediatek/mt7601u/usb.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt7601u/usb.c b/drivers/net/wireless/mediatek/mt7601u/usb.c
index c41ae251cb95..9306870cbc91 100644
--- a/drivers/net/wireless/mediatek/mt7601u/usb.c
+++ b/drivers/net/wireless/mediatek/mt7601u/usb.c
@@ -274,7 +274,6 @@ static int mt7601u_probe(struct usb_interface *usb_intf,
 	if (!dev)
 		return -ENOMEM;
 
-	usb_dev = usb_get_dev(usb_dev);
 	usb_reset_device(usb_dev);
 
 	usb_set_intfdata(usb_intf, dev);
@@ -319,7 +318,6 @@ static int mt7601u_probe(struct usb_interface *usb_intf,
 	mt7601u_cleanup(dev);
 err:
 	usb_set_intfdata(usb_intf, NULL);
-	usb_put_dev(interface_to_usbdev(usb_intf));
 
 	destroy_workqueue(dev->stat_wq);
 	ieee80211_free_hw(dev->hw);
@@ -334,7 +332,6 @@ static void mt7601u_disconnect(struct usb_interface *usb_intf)
 	mt7601u_cleanup(dev);
 
 	usb_set_intfdata(usb_intf, NULL);
-	usb_put_dev(interface_to_usbdev(usb_intf));
 
 	destroy_workqueue(dev->stat_wq);
 	ieee80211_free_hw(dev->hw);
-- 
2.53.0


^ permalink raw reply related

* [PATCH v2 RESEND 0/5] wifi: mediatek: drop redundant USB device references
From: Johan Hovold @ 2026-04-30  8:33 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Jakub Kicinski
  Cc: Shayne Chen, Sean Wang, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-wireless, linux-mediatek,
	linux-kernel, Johan Hovold

[ This is a resend (with trimmed CC) of the five Mediatek patches which
  still haven't been picked up from [1]. ]

Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.

Drop redundant device references to reduce cargo culting, make it easier
to spot drivers where an extra reference is needed, and reduce the risk
of memory leaks when drivers fail to release them.

Johan

[1] https://lore.kernel.org/all/20260306085144.12064-1-johan@kernel.org/


Johan Hovold (5):
  wifi: mt76: drop redundant device reference
  wifi: mt76x0u: drop redundant device reference
  wifi: mt76x2u: drop redundant device reference
  wifi: mt76: mt792xu: drop redundant device reference
  wifi: mt7601u: drop redundant device reference

 drivers/net/wireless/mediatek/mt76/mt7615/usb.c | 3 ---
 drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 3 ---
 drivers/net/wireless/mediatek/mt76/mt76x2/usb.c | 4 ----
 drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 2 --
 drivers/net/wireless/mediatek/mt76/mt7925/usb.c | 2 --
 drivers/net/wireless/mediatek/mt76/mt792x_usb.c | 1 -
 drivers/net/wireless/mediatek/mt7601u/usb.c     | 3 ---
 7 files changed, 18 deletions(-)

-- 
2.53.0


^ permalink raw reply

* [PATCH v2 RESEND 2/5] wifi: mt76x0u: drop redundant device reference
From: Johan Hovold @ 2026-04-30  8:33 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Jakub Kicinski
  Cc: Shayne Chen, Sean Wang, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-wireless, linux-mediatek,
	linux-kernel, Johan Hovold
In-Reply-To: <20260430083335.215239-1-johan@kernel.org>

Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.

Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
index 90e5666c0857..2acce121fb14 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
@@ -245,7 +245,6 @@ static int mt76x0u_probe(struct usb_interface *usb_intf,
 	if (id->driver_info)
 		dev->no_2ghz = true;
 
-	usb_dev = usb_get_dev(usb_dev);
 	usb_reset_device(usb_dev);
 
 	usb_set_intfdata(usb_intf, dev);
@@ -284,7 +283,6 @@ static int mt76x0u_probe(struct usb_interface *usb_intf,
 
 err:
 	usb_set_intfdata(usb_intf, NULL);
-	usb_put_dev(interface_to_usbdev(usb_intf));
 	mt76u_queues_deinit(&dev->mt76);
 	mt76_free_device(&dev->mt76);
 
@@ -303,7 +301,6 @@ static void mt76x0_disconnect(struct usb_interface *usb_intf)
 	mt76x0u_cleanup(dev);
 
 	usb_set_intfdata(usb_intf, NULL);
-	usb_put_dev(interface_to_usbdev(usb_intf));
 
 	mt76_free_device(&dev->mt76);
 }
-- 
2.53.0


^ permalink raw reply related

* [PATCH v4 3/3 omap] ARM: dts: omap2: add stlc4560 spi-wireless node
From: Arnd Bergmann @ 2026-04-30  8:12 UTC (permalink / raw)
  To: netdev
  Cc: Arnd Bergmann, Aaro Koskinen, Andreas Kemnade,
	Bartosz Golaszewski, Benoît Cousson, David S. Miller,
	Dmitry Torokhov, Eric Dumazet, Felipe Balbi, Jakub Kicinski,
	Johannes Berg, Kevin Hilman, Krzysztof Kozlowski, Linus Walleij,
	Paolo Abeni, Rob Herring, Roger Quadros, Tony Lindgren,
	linux-wireless, devicetree, linux-kernel, linux-arm-kernel,
	linux-gpio, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20260430081242.3686993-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

Converted from the platform_device creation in board-n8x0.c.

Link: https://lore.kernel.org/all/20230314163201.955689-1-arnd@kernel.org/
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/boot/dts/ti/omap/omap2.dtsi                |  4 ++++
 arch/arm/boot/dts/ti/omap/omap2420-n8x0-common.dtsi | 12 ++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/ti/omap/omap2.dtsi b/arch/arm/boot/dts/ti/omap/omap2.dtsi
index afabb36a8ac1..fdc1790adf43 100644
--- a/arch/arm/boot/dts/ti/omap/omap2.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap2.dtsi
@@ -129,6 +129,8 @@ i2c2: i2c@48072000 {
 		};
 
 		mcspi1: spi@48098000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
 			compatible = "ti,omap2-mcspi";
 			ti,hwmods = "mcspi1";
 			reg = <0x48098000 0x100>;
@@ -140,6 +142,8 @@ mcspi1: spi@48098000 {
 		};
 
 		mcspi2: spi@4809a000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
 			compatible = "ti,omap2-mcspi";
 			ti,hwmods = "mcspi2";
 			reg = <0x4809a000 0x100>;
diff --git a/arch/arm/boot/dts/ti/omap/omap2420-n8x0-common.dtsi b/arch/arm/boot/dts/ti/omap/omap2420-n8x0-common.dtsi
index 63b0b4921e4e..fe9dd8bbfc85 100644
--- a/arch/arm/boot/dts/ti/omap/omap2420-n8x0-common.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap2420-n8x0-common.dtsi
@@ -109,3 +109,15 @@ partition@5 {
 		};
 	};
 };
+
+&mcspi2 {
+	status = "okay";
+
+	wifi@0 {
+		reg = <0>;
+		compatible = "st,stlc4560";
+		spi-max-frequency = <48000000>;
+		interrupts-extended = <&gpio3 23 IRQ_TYPE_EDGE_RISING>;
+		powerdown-gpios = <&gpio4 1 GPIO_ACTIVE_LOW>; /* gpio 97 */
+	};
+};
-- 
2.39.5


^ permalink raw reply related

* [PATCH v4 2/3 net-next] p54spi: convert to devicetree
From: Arnd Bergmann @ 2026-04-30  8:12 UTC (permalink / raw)
  To: netdev
  Cc: Arnd Bergmann, Aaro Koskinen, Andreas Kemnade,
	Bartosz Golaszewski, Benoît Cousson, David S. Miller,
	Dmitry Torokhov, Eric Dumazet, Felipe Balbi, Jakub Kicinski,
	Johannes Berg, Kevin Hilman, Krzysztof Kozlowski, Linus Walleij,
	Paolo Abeni, Rob Herring, Roger Quadros, Tony Lindgren,
	linux-wireless, devicetree, linux-kernel, linux-arm-kernel,
	linux-gpio, linux-omap, Christian Lamparter
In-Reply-To: <20260430081242.3686993-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

The Prism54 SPI driver hardcodes GPIO numbers and expects users to
pass them as module parameters, apparently a relic from its life as a
staging driver. This works because there is only one user, the Nokia
N8x0 tablet.

Convert this to the gpio descriptor interface and DT based probing
to improve this and simplify the code at the same time.

Acked-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v4:
 - make gpio line optional again
 - fix EPROBE_DEFER handling
 - match only st,stlc4560 compatible value, with binding change

v3:
 - rebase an older patch
---
 arch/arm/mach-omap2/board-n8x0.c           | 18 ------
 drivers/net/wireless/intersil/p54/p54spi.c | 66 ++++++++--------------
 drivers/net/wireless/intersil/p54/p54spi.h |  3 +
 3 files changed, 25 insertions(+), 62 deletions(-)

diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 969265d5d5c6..d9acd32c5457 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -20,7 +20,6 @@
 #include <linux/spi/spi.h>
 #include <linux/usb/musb.h>
 #include <linux/mmc/host.h>
-#include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/platform_data/mmc-omap.h>
 #include <linux/mfd/menelaus.h>
 
@@ -106,21 +105,6 @@ static void __init n8x0_usb_init(void) {}
 
 #endif /*CONFIG_USB_MUSB_TUSB6010 */
 
-
-static struct omap2_mcspi_device_config p54spi_mcspi_config = {
-	.turbo_mode	= 0,
-};
-
-static struct spi_board_info n800_spi_board_info[] __initdata = {
-	{
-		.modalias	= "p54spi",
-		.bus_num	= 2,
-		.chip_select	= 0,
-		.max_speed_hz   = 48000000,
-		.controller_data = &p54spi_mcspi_config,
-	},
-};
-
 #if defined(CONFIG_MENELAUS) && IS_ENABLED(CONFIG_MMC_OMAP)
 
 /*
@@ -524,7 +508,5 @@ omap_late_initcall(n8x0_late_initcall);
 void * __init n8x0_legacy_init(void)
 {
 	board_check_revision();
-	spi_register_board_info(n800_spi_board_info,
-				ARRAY_SIZE(n800_spi_board_info));
 	return &mmc1_data;
 }
diff --git a/drivers/net/wireless/intersil/p54/p54spi.c b/drivers/net/wireless/intersil/p54/p54spi.c
index 9d66dcae54e0..806761580759 100644
--- a/drivers/net/wireless/intersil/p54/p54spi.c
+++ b/drivers/net/wireless/intersil/p54/p54spi.c
@@ -8,6 +8,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
 #include <linux/firmware.h>
@@ -15,7 +16,7 @@
 #include <linux/irq.h>
 #include <linux/spi/spi.h>
 #include <linux/etherdevice.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/slab.h>
 
 #include "p54spi.h"
@@ -30,19 +31,6 @@
 MODULE_FIRMWARE("3826.arm");
 MODULE_FIRMWARE("3826.eeprom");
 
-/* gpios should be handled in board files and provided via platform data,
- * but because it's currently impossible for p54spi to have a header file
- * in include/linux, let's use module parameters for now
- */
-
-static int p54spi_gpio_power = 97;
-module_param(p54spi_gpio_power, int, 0444);
-MODULE_PARM_DESC(p54spi_gpio_power, "gpio number for power line");
-
-static int p54spi_gpio_irq = 87;
-module_param(p54spi_gpio_irq, int, 0444);
-MODULE_PARM_DESC(p54spi_gpio_irq, "gpio number for irq line");
-
 static void p54spi_spi_read(struct p54s_priv *priv, u8 address,
 			      void *buf, size_t len)
 {
@@ -262,14 +250,14 @@ static int p54spi_upload_firmware(struct ieee80211_hw *dev)
 
 static void p54spi_power_off(struct p54s_priv *priv)
 {
-	disable_irq(gpio_to_irq(p54spi_gpio_irq));
-	gpio_set_value(p54spi_gpio_power, 0);
+	disable_irq(priv->irq);
+	gpiod_set_value(priv->gpio_powerdown, 1);
 }
 
 static void p54spi_power_on(struct p54s_priv *priv)
 {
-	gpio_set_value(p54spi_gpio_power, 1);
-	enable_irq(gpio_to_irq(p54spi_gpio_irq));
+	gpiod_set_value(priv->gpio_powerdown, 0);
+	enable_irq(priv->irq);
 
 	/* need to wait a while before device can be accessed, the length
 	 * is just a guess
@@ -608,31 +596,19 @@ static int p54spi_probe(struct spi_device *spi)
 		goto err_free;
 	}
 
-	ret = gpio_request(p54spi_gpio_power, "p54spi power");
-	if (ret < 0) {
-		dev_err(&priv->spi->dev, "power GPIO request failed: %d", ret);
+	priv->gpio_powerdown = gpiod_get_optional(&spi->dev, "powerdown", GPIOD_OUT_HIGH);
+	if (IS_ERR(priv->gpio_powerdown)) {
+		ret = dev_err_probe(&priv->spi->dev, PTR_ERR(priv->gpio_powerdown),
+				    "powerdown GPIO request failed\n");
 		goto err_free;
 	}
 
-	ret = gpio_request(p54spi_gpio_irq, "p54spi irq");
-	if (ret < 0) {
-		dev_err(&priv->spi->dev, "irq GPIO request failed: %d", ret);
-		goto err_free_gpio_power;
-	}
-
-	gpio_direction_output(p54spi_gpio_power, 0);
-	gpio_direction_input(p54spi_gpio_irq);
-
-	ret = request_irq(gpio_to_irq(p54spi_gpio_irq),
-			  p54spi_interrupt, IRQF_NO_AUTOEN, "p54spi",
-			  priv->spi);
+	ret = request_irq(spi->irq, p54spi_interrupt, IRQF_NO_AUTOEN, "p54spi", priv->spi);
 	if (ret < 0) {
 		dev_err(&priv->spi->dev, "request_irq() failed");
-		goto err_free_gpio_irq;
+		goto err_free_gpio_power;
 	}
 
-	irq_set_irq_type(gpio_to_irq(p54spi_gpio_irq), IRQ_TYPE_EDGE_RISING);
-
 	INIT_WORK(&priv->work, p54spi_work);
 	init_completion(&priv->fw_comp);
 	INIT_LIST_HEAD(&priv->tx_pending);
@@ -659,11 +635,9 @@ static int p54spi_probe(struct spi_device *spi)
 
 err_free_common:
 	release_firmware(priv->firmware);
-	free_irq(gpio_to_irq(p54spi_gpio_irq), spi);
-err_free_gpio_irq:
-	gpio_free(p54spi_gpio_irq);
+	free_irq(priv->irq, spi);
 err_free_gpio_power:
-	gpio_free(p54spi_gpio_power);
+	gpiod_put(priv->gpio_powerdown);
 err_free:
 	p54_free_common(priv->hw);
 	return ret;
@@ -675,10 +649,8 @@ static void p54spi_remove(struct spi_device *spi)
 
 	p54_unregister_common(priv->hw);
 
-	free_irq(gpio_to_irq(p54spi_gpio_irq), spi);
-
-	gpio_free(p54spi_gpio_power);
-	gpio_free(p54spi_gpio_irq);
+	free_irq(priv->irq, spi);
+	gpiod_put(priv->gpio_powerdown);
 	release_firmware(priv->firmware);
 
 	mutex_destroy(&priv->mutex);
@@ -686,10 +658,16 @@ static void p54spi_remove(struct spi_device *spi)
 	p54_free_common(priv->hw);
 }
 
+static const struct of_device_id p54spi_of_ids[] = {
+	{ .compatible = "st,stlc4560", },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, p54spi_of_ids);
 
 static struct spi_driver p54spi_driver = {
 	.driver = {
 		.name		= "p54spi",
+		.of_match_table = p54spi_of_ids,
 	},
 
 	.probe		= p54spi_probe,
diff --git a/drivers/net/wireless/intersil/p54/p54spi.h b/drivers/net/wireless/intersil/p54/p54spi.h
index e5619a13fd61..118785cc635a 100644
--- a/drivers/net/wireless/intersil/p54/p54spi.h
+++ b/drivers/net/wireless/intersil/p54/p54spi.h
@@ -107,6 +107,9 @@ struct p54s_priv {
 
 	enum fw_state fw_state;
 	const struct firmware *firmware;
+
+	struct gpio_desc *gpio_powerdown;
+	int irq;
 };
 
 #endif /* P54SPI_H */
-- 
2.39.5


^ permalink raw reply related

* [PATCH v4 1/3 net-next] dt-bindings: net: add st,stlc4560/p54spi binding
From: Arnd Bergmann @ 2026-04-30  8:12 UTC (permalink / raw)
  To: netdev
  Cc: Arnd Bergmann, Aaro Koskinen, Andreas Kemnade,
	Bartosz Golaszewski, Benoît Cousson, David S. Miller,
	Dmitry Torokhov, Eric Dumazet, Felipe Balbi, Jakub Kicinski,
	Johannes Berg, Kevin Hilman, Krzysztof Kozlowski, Linus Walleij,
	Paolo Abeni, Rob Herring, Roger Quadros, Tony Lindgren,
	linux-wireless, devicetree, linux-kernel, linux-arm-kernel,
	linux-gpio, linux-omap, Christian Lamparter
In-Reply-To: <20260430081242.3686993-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

The SPI version of Prism54 was sold under a couple of different
names and supported by the Linux p54spi driver, but there was
never a DT binding for it.

Document the four known names of this device and the properties
that are sufficient for its use on the Nokia N8x0 tablet.

As I don't have this hardware or documentation for it, this is
purely based on existing usage in the driver.

Link: https://lore.kernel.org/all/e8dc9acb-6f85-e0a9-a145-d101ca6da201@gmail.com/
Acked-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v4: renamed file to st,stlc4560, matching the primary compatible string
    require st,stlc4560 string
---
 .../bindings/net/wireless/st,stlc4560.yaml    | 61 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 62 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/st,stlc4560.yaml

diff --git a/Documentation/devicetree/bindings/net/wireless/st,stlc4560.yaml b/Documentation/devicetree/bindings/net/wireless/st,stlc4560.yaml
new file mode 100644
index 000000000000..979c8d7d859a
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wireless/st,stlc4560.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/wireless/st,stlc45xx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ST/Intersil/Conexant stlc45xx/p54spi/cx3110x SPI wireless device
+
+maintainers:
+  - Christian Lamparter <chunkeey@gmail.com>
+
+description:
+  The SPI variant of the Intersil Prism54 wireless device was sold
+  under a variety of names, including Conexant CX3110x and
+  ST Microelectronics STLC5460.
+
+allOf:
+  - $ref: ieee80211.yaml#
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+  compatible:
+    oneOf:
+      - const: st,stlc4560
+      - items:
+          - enum:
+              - cnxt,3110x
+              - isil,p54spi
+              - st,stlc4550
+          - const: st,stlc4560
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  powerdown-gpios:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        wifi@0 {
+            compatible = "st,stlc4560";
+            reg = <0>;
+            spi-max-frequency = <48000000>;
+            interrupts-extended = <&gpio 23>;
+            powerdown-gpios = <&gpio 1>;
+        };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 86ca9297edab..67cf5ae5b652 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20093,6 +20093,7 @@ M:	Christian Lamparter <chunkeey@googlemail.com>
 L:	linux-wireless@vger.kernel.org
 S:	Maintained
 W:	https://wireless.wiki.kernel.org/en/users/Drivers/p54
+F:	Documentation/devicetree/bindings/net/wireless/st,stlc45xx.yaml
 F:	drivers/net/wireless/intersil/
 
 PACKET SOCKETS
-- 
2.39.5


^ permalink raw reply related

* [PATCH v4 0/3] wireless: p54 devicetree conversion
From: Arnd Bergmann @ 2026-04-30  8:12 UTC (permalink / raw)
  To: netdev
  Cc: Arnd Bergmann, Aaro Koskinen, Andreas Kemnade,
	Bartosz Golaszewski, Benoît Cousson, David S. Miller,
	Dmitry Torokhov, Eric Dumazet, Felipe Balbi, Jakub Kicinski,
	Johannes Berg, Kevin Hilman, Krzysztof Kozlowski, Linus Walleij,
	Paolo Abeni, Rob Herring, Roger Quadros, Tony Lindgren,
	linux-wireless, devicetree, linux-kernel, linux-arm-kernel,
	linux-gpio, linux-omap

From: Arnd Bergmann <arnd@arndb.de>

This is an older patch of mine that I lost track of. We already decided
a while ago that the OMAP2 platform should probably be removed entirely,
and this is the only known user, but it's probably a good idea to still
get the driver changes in, in case there are other out-of-tree users.

We probably don't have to worry about bisectability any more though,
so the devicetree and driver changes can just get merged independently
through the OMAP and wireless trees, respectively.

     Arnd

v3 Link: https://lore.kernel.org/all/20260427142355.2532714-1-arnd@kernel.org/
v2 Link: https://lore.kernel.org/all/20230404082401.1087835-1-arnd@kernel.org/

Cc: "Aaro Koskinen" <aaro.koskinen@iki.fi>
Cc: "Andreas Kemnade" <andreas@kemnade.info>
Cc: "Arnd Bergmann" <arnd@arndb.de>
Cc: "Bartosz Golaszewski" <brgl@kernel.org>
Cc: "Benoît Cousson" <bcousson@baylibre.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: "Eric Dumazet" <edumazet@google.com>
Cc: "Felipe Balbi" <balbi@kernel.org>
Cc: "Jakub Kicinski" <kuba@kernel.org>
Cc: "Johannes Berg" <johannes@sipsolutions.net>
Cc: "Kevin Hilman" <khilman@baylibre.com>
Cc: "Krzysztof Kozlowski" <krzk+dt@kernel.org>
Cc: "Linus Walleij" <linusw@kernel.org>
Cc: "Paolo Abeni" <pabeni@redhat.com>
Cc: "Rob Herring" <robh+dt@kernel.org>
Cc: "Roger Quadros" <rogerq@kernel.org>
Cc: "Tony Lindgren" <tony@atomide.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-gpio@vger.kernel.org
Cc: linux-omap@vger.kernel.org


Arnd Bergmann (3):
  [net-next][v4] dt-bindings: net: add st,stlc4560/p54spi binding
  [net-next][v4] p54spi: convert to devicetree
  [omap][v4] ARM: dts: omap2: add stlc4560 spi-wireless node

 .../bindings/net/wireless/st,stlc4560.yaml    | 61 +++++++++++++++++
 MAINTAINERS                                   |  1 +
 arch/arm/boot/dts/ti/omap/omap2.dtsi          |  4 ++
 .../dts/ti/omap/omap2420-n8x0-common.dtsi     | 12 ++++
 arch/arm/mach-omap2/board-n8x0.c              | 18 -----
 drivers/net/wireless/intersil/p54/p54spi.c    | 66 +++++++------------
 drivers/net/wireless/intersil/p54/p54spi.h    |  3 +
 7 files changed, 103 insertions(+), 62 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/st,stlc4560.yaml

-- 
2.39.5


^ permalink raw reply

* Re: [PATCH] wifi: cfg80211: don't allow negative key_len values
From: Dan Carpenter @ 2026-04-30  7:52 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Kalle Valo, Raja Mani, Vasanthakumar Thiagarajan, Jouni Malinen,
	linux-wireless, linux-kernel, kernel-janitors
In-Reply-To: <fd142d26dbc632b26fe39ba8be29d4915a9f92d6.camel@sipsolutions.net>

On Thu, Apr 30, 2026 at 09:05:35AM +0200, Johannes Berg wrote:
> On Thu, 2026-04-30 at 09:15 +0300, Dan Carpenter wrote:
> > The ath6kl_cfg80211_add_key() function has an upper bounds check on
> > params->key_len which ensures that it can't go over WLAN_MAX_KEY_LEN but
> > it doesn't check for negatives.  This could potentially lead to memory
> > corruption.
> > 
> > Put a bounds check on negative values in cfg80211_validate_key_settings()
> > to prevent this sort of bug in the future.
> 
> Clearly this commit doesn't seem problematic, but I'm not sure I see the
> path to it mattering? The key_len should only ever be set by
> wext/nl80211, and that can't really end up with a negative length?
> 
> We should probably just make it a u8 there, no way it's ever bigger than
> that, but I'm not seeing through why this would matter much right now.

Ah.  Yeah.  You're right.  :/  Sorry for the noise.

regards,
dan carpenter


^ permalink raw reply

* Re: [PATCH 0/1] dt-bindings: net: wireless: intel,iwlwifi: add binding
From: Krzysztof Kozlowski @ 2026-04-30  7:50 UTC (permalink / raw)
  To: Avinash Bhatt, devicetree
  Cc: linux-wireless, linux-kernel, robh, krzk+dt, conor+dt, johannes,
	miriam.rachel.korenblit, kobi.guetta, emmanuel.grumbach
In-Reply-To: <20260429081403.46087-1-avinash.bhatt@intel.com>

On 29/04/2026 10:14, Avinash Bhatt wrote:
> Add Device Tree binding schema for Intel discrete Wi-Fi 7 BE200 PCIe
> adapters. The binding documents optional OEM platform configuration
> properties for platforms using Device Tree instead of ACPI/UEFI firmware
> methods.
> 
> Link to RFC: https://patchwork.kernel.org/project/devicetree/patch/20260408055709.11579-2-avinash.bhatt@intel.com/

So that's a v2. Please version your patches correctly.

Also, I don't understand how could you claim that RFC passes tests but
this obviously was not tested.

Best regards,
Krzysztof

^ permalink raw reply

* Re: [PATCH] wifi: cfg80211: don't allow negative key_len values
From: Johannes Berg @ 2026-04-30  7:05 UTC (permalink / raw)
  To: Dan Carpenter, Kalle Valo
  Cc: Raja Mani, Vasanthakumar Thiagarajan, Jouni Malinen,
	linux-wireless, linux-kernel, kernel-janitors
In-Reply-To: <afLzlDT5VF4D746w@stanley.mountain>

On Thu, 2026-04-30 at 09:15 +0300, Dan Carpenter wrote:
> The ath6kl_cfg80211_add_key() function has an upper bounds check on
> params->key_len which ensures that it can't go over WLAN_MAX_KEY_LEN but
> it doesn't check for negatives.  This could potentially lead to memory
> corruption.
> 
> Put a bounds check on negative values in cfg80211_validate_key_settings()
> to prevent this sort of bug in the future.

Clearly this commit doesn't seem problematic, but I'm not sure I see the
path to it mattering? The key_len should only ever be set by
wext/nl80211, and that can't really end up with a negative length?

We should probably just make it a u8 there, no way it's ever bigger than
that, but I'm not seeing through why this would matter much right now.

johannes

^ permalink raw reply

* Re: [PATCH net-next] net: Consistently define pci_device_ids using named initializers
From: Jijie Shao @ 2026-04-30  6:53 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub), Michael Grzeschik,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Marc Kleine-Budde, Vincent Mailhol, Krzysztof Halasa,
	Johannes Berg
  Cc: shaojijie, Markus Schneider-Pargmann, Steffen Klassert,
	David Dillow, Ion Badulescu, Mark Einon, Rasesh Mody,
	GR-Linux-NIC-Dev, Sudarsana Kalluru, Manish Chopra,
	Potnuri Bharat Teja, Denis Kirjanov, Jian Shen, Cai Huoqing,
	Fan Gong, Tony Nguyen, Przemek Kitszel, Tariq Toukan,
	Saeed Mahameed, Leon Romanovsky, Mark Bloch, Ido Schimmel,
	Petr Machata, Yibo Dong, Simon Horman, Heiner Kallweit, nic_swsd,
	Jiri Pirko, Francois Romieu, Daniele Venzano, Samuel Chessman,
	Jiawen Wu, Mengyuan Lou, Kevin Curtis, Arend van Spriel,
	Stanislav Yakovlev, Richard Cochran, Kees Cook, Thomas Gleixner,
	Thomas Fourier, Ingo Molnar, Kory Maincent, Zilin Guan,
	Marco Crivellari, Vadim Fedorenko, Jacob Keller, Philipp Stanner,
	Bjorn Helgaas, Yeounsu Moon, Denis Benato, Peiyang Wang,
	Yonglong Liu, Andy Shevchenko, Yicong Hui, Randy Dunlap,
	MD Danish Anwar, Nathan Chancellor, Sai Krishna,
	Ethan Nelson-Moore, Larysa Zaremba, Joe Damato, Double Lo,
	Chi-hsien Lin, Colin Ian King, netdev, linux-kernel, linux-can,
	linux-parisc, intel-wired-lan, linux-rdma, oss-drivers,
	linux-wireless, brcm80211, brcm80211-dev-list.pdl
In-Reply-To: <20260428171845.2288395-2-u.kleine-koenig@baylibre.com>


on 2026/4/29 1:18, Uwe Kleine-König (The Capable Hub) wrote:
> ... and PCI device helpers.
>
> The various struct pci_device_id arrays were initialized mostly by one
> the PCI_DEVICE macros and then list expressions. The latter isn't easily
> readable if you're not into PCI. Using named initializers is more
> explicit and thus easier to parse.
>
> Also use PCI_DEVICE* helper macros to assign .vendor, .device,
> .subvendor and .subdevice where appropriate and skip explicit
> assignments of 0 (which the compiler takes care of).
>
> The secret plan is to make struct pci_device_id::driver_data an
> anonymous union (similar to
> https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/)
> and that requires named initializers. But it's also a nice cleanup on
> its own.
>
> This change doesn't introduce changes to the compiled pci_device_id
> arrays. Tested on x86 and arm64.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>

...

>   
> diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
> index 068da2fd1fea..b3e01b2f8319 100644
> --- a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
> +++ b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
> @@ -489,7 +489,7 @@ static void hbg_shutdown(struct pci_dev *pdev)
>   }
>   
>   static const struct pci_device_id hbg_pci_tbl[] = {
> -	{PCI_VDEVICE(HUAWEI, 0x3730), 0},
> +	{ PCI_VDEVICE(HUAWEI, 0x3730) },
>   	{ }
>   };

Reviewed-by: Jijie Shao <shaojijie@huawei.com>

>   MODULE_DEVICE_TABLE(pci, hbg_pci_tbl);
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> index a3206c97923e..4c34a144d21c 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> @@ -86,25 +86,39 @@ module_param(page_pool_enabled, bool, 0400);
>    *   Class, Class Mask, private data (not used) }
>    */
>   static const struct pci_device_id hns3_pci_tbl[] = {
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_GE), 0},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE), 0},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA),
> -	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA_MACSEC),
> -	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA),
> -	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA_MACSEC),
> -	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_MACSEC),
> -	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_200G_RDMA),
> -	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_VF), 0},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
> -	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
> +	{
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_GE),
> +		.driver_data = 0,
> +	}, {
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE),
> +		.driver_data = 0,

Thanks for your work.

If .driver_data = 0, is it possible to delete it to be consistent with other parts, for example:

{ PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_GE) }

Jijie Shao


> +	}, {
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA),
> +		.driver_data = HNAE3_DEV_SUPPORT_ROCE_DCB_BITS,
> +	}, {
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA_MACSEC),
> +		.driver_data = HNAE3_DEV_SUPPORT_ROCE_DCB_BITS,
> +	}, {
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA),
> +		.driver_data = HNAE3_DEV_SUPPORT_ROCE_DCB_BITS,
> +	}, {
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA_MACSEC),
> +		.driver_data = HNAE3_DEV_SUPPORT_ROCE_DCB_BITS,
> +	}, {
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_MACSEC),
> +		.driver_data = HNAE3_DEV_SUPPORT_ROCE_DCB_BITS,
> +	}, {
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_200G_RDMA),
> +		.driver_data = HNAE3_DEV_SUPPORT_ROCE_DCB_BITS,
> +	}, {
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_VF),
> +		.driver_data = 0,
> +	}, {
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
> +		.driver_data = HNAE3_DEV_SUPPORT_ROCE_DCB_BITS,
> +	},
>   	/* required last entry */
> -	{0,}
> +	{ }
>   };
>   MODULE_DEVICE_TABLE(pci, hns3_pci_tbl);
>   
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> index dd4045c773d4..e17b92a411a2 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> @@ -72,16 +72,16 @@ static struct hnae3_ae_algo ae_algo;
>   static struct workqueue_struct *hclge_wq;
>   
>   static const struct pci_device_id ae_algo_pci_tbl[] = {
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_GE), 0},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE), 0},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA), 0},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA_MACSEC), 0},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA), 0},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA_MACSEC), 0},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_MACSEC), 0},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_200G_RDMA), 0},
> +	{ PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_GE) },
> +	{ PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE) },
> +	{ PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA) },
> +	{ PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA_MACSEC) },
> +	{ PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA) },
> +	{ PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA_MACSEC) },
> +	{ PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_MACSEC) },
> +	{ PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_200G_RDMA) },
>   	/* required last entry */
> -	{0, }
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, ae_algo_pci_tbl);
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
> index 0cc911e6c732..063a692c2b41 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
> @@ -26,11 +26,15 @@ static struct hnae3_ae_algo ae_algovf;
>   static struct workqueue_struct *hclgevf_wq;
>   
>   static const struct pci_device_id ae_algovf_pci_tbl[] = {
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_VF), 0},
> -	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
> -	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
> +	{
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_VF),
> +		.driver_data = 0,
> +	}, {
> +		PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
> +		.driver_data = HNAE3_DEV_SUPPORT_ROCE_DCB_BITS,
> +	},
>   	/* required last entry */
> -	{0, }
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, ae_algovf_pci_tbl);
> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
> index ae1f523d6841..42f4792d255b 100644
> --- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
> +++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
> @@ -1467,12 +1467,12 @@ static void hinic_shutdown(struct pci_dev *pdev)
>   }
>   
>   static const struct pci_device_id hinic_pci_table[] = {
> -	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_QUAD_PORT_25GE), 0},
> -	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_DUAL_PORT_100GE), 0},
> -	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_DUAL_PORT_100GE_MEZZ), 0},
> -	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_QUAD_PORT_25GE_MEZZ), 0},
> -	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_VF), 0},
> -	{ 0, 0}
> +	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_QUAD_PORT_25GE) },
> +	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_DUAL_PORT_100GE) },
> +	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_DUAL_PORT_100GE_MEZZ) },
> +	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_QUAD_PORT_25GE_MEZZ) },
> +	{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_VF) },
> +	{ }
>   };
>   MODULE_DEVICE_TABLE(pci, hinic_pci_table);
>   
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_lld.c b/drivers/net/ethernet/huawei/hinic3/hinic3_lld.c
> index f83d5bd1041e..36df807cbe09 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_lld.c
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_lld.c
> @@ -426,10 +426,9 @@ static void hinic3_remove(struct pci_dev *pdev)
>   }
>   
>   static const struct pci_device_id hinic3_pci_table[] = {
> -	{PCI_VDEVICE(HUAWEI, PCI_DEV_ID_HINIC3_PF), 0},
> -	{PCI_VDEVICE(HUAWEI, PCI_DEV_ID_HINIC3_VF), 0},
> -	{0, 0}
> -
> +	{ PCI_VDEVICE(HUAWEI, PCI_DEV_ID_HINIC3_PF) },
> +	{ PCI_VDEVICE(HUAWEI, PCI_DEV_ID_HINIC3_VF) },
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, hinic3_pci_table);
> diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
> index 9074b558de35..5ef82a4e6184 100644
> --- a/drivers/net/ethernet/intel/e100.c
> +++ b/drivers/net/ethernet/intel/e100.c
> @@ -177,8 +177,8 @@ MODULE_PARM_DESC(eeprom_bad_csum_allow, "Allow bad eeprom checksums");
>   MODULE_PARM_DESC(use_io, "Force use of i/o access mode");
>   
>   #define INTEL_8255X_ETHERNET_DEVICE(device_id, ich) {\
> -	PCI_VENDOR_ID_INTEL, device_id, PCI_ANY_ID, PCI_ANY_ID, \
> -	PCI_CLASS_NETWORK_ETHERNET << 8, 0xFFFF00, ich }
> +	PCI_VDEVICE(INTEL, device_id), \
> +	.class = PCI_CLASS_NETWORK_ETHERNET << 8, .class_mask = 0xFFFF00, .driver_data = ich }
>   static const struct pci_device_id e100_id_table[] = {
>   	INTEL_8255X_ETHERNET_DEVICE(0x1029, 0),
>   	INTEL_8255X_ETHERNET_DEVICE(0x1030, 0),
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> index 7ce0cc8ab8f4..5b7ba1594f0d 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -7799,137 +7799,370 @@ static const struct pci_error_handlers e1000_err_handler = {
>   };
>   
>   static const struct pci_device_id e1000_pci_tbl[] = {
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_COPPER), board_82571 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_FIBER), board_82571 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER), board_82571 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER_LP),
> -	  board_82571 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_QUAD_FIBER), board_82571 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_SERDES), board_82571 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_SERDES_DUAL), board_82571 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_SERDES_QUAD), board_82571 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571PT_QUAD_COPPER), board_82571 },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_COPPER),
> +		.driver_data = board_82571,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_FIBER),
> +		.driver_data = board_82571,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER),
> +		.driver_data = board_82571,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER_LP),
> +		.driver_data = board_82571,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_QUAD_FIBER),
> +		.driver_data = board_82571,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_SERDES),
> +		.driver_data = board_82571,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_SERDES_DUAL),
> +		.driver_data = board_82571,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_SERDES_QUAD),
> +		.driver_data = board_82571,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82571PT_QUAD_COPPER),
> +		.driver_data = board_82571,
> +	},
>   
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82572EI), board_82572 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82572EI_COPPER), board_82572 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82572EI_FIBER), board_82572 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82572EI_SERDES), board_82572 },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82572EI),
> +		.driver_data = board_82572,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82572EI_COPPER),
> +		.driver_data = board_82572,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82572EI_FIBER),
> +		.driver_data = board_82572,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82572EI_SERDES),
> +		.driver_data = board_82572,
> +	},
>   
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82573E), board_82573 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82573E_IAMT), board_82573 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82573L), board_82573 },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82573E),
> +		.driver_data = board_82573,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82573E_IAMT),
> +		.driver_data = board_82573,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82573L),
> +		.driver_data = board_82573,
> +	},
>   
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82574L), board_82574 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82574LA), board_82574 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82583V), board_82583 },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82574L),
> +		.driver_data = board_82574,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82574LA),
> +		.driver_data = board_82574,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_82583V),
> +		.driver_data = board_82583,
> +	},
>   
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_COPPER_DPT),
> -	  board_80003es2lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_COPPER_SPT),
> -	  board_80003es2lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_SERDES_DPT),
> -	  board_80003es2lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_SERDES_SPT),
> -	  board_80003es2lan },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_COPPER_DPT),
> +		.driver_data = board_80003es2lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_COPPER_SPT),
> +		.driver_data = board_80003es2lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_SERDES_DPT),
> +		.driver_data = board_80003es2lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_SERDES_SPT),
> +		.driver_data = board_80003es2lan,
> +	},
>   
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IFE), board_ich8lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IFE_G), board_ich8lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IFE_GT), board_ich8lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_AMT), board_ich8lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_C), board_ich8lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_M), board_ich8lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_M_AMT), board_ich8lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_82567V_3), board_ich8lan },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IFE),
> +		.driver_data = board_ich8lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IFE_G),
> +		.driver_data = board_ich8lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IFE_GT),
> +		.driver_data = board_ich8lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_AMT),
> +		.driver_data = board_ich8lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_C),
> +		.driver_data = board_ich8lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_M),
> +		.driver_data = board_ich8lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_M_AMT),
> +		.driver_data = board_ich8lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_82567V_3),
> +		.driver_data = board_ich8lan,
> +	},
>   
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE), board_ich9lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE_G), board_ich9lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE_GT), board_ich9lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_AMT), board_ich9lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_C), board_ich9lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_BM), board_ich9lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M), board_ich9lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_AMT), board_ich9lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_V), board_ich9lan },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE),
> +		.driver_data = board_ich9lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE_G),
> +		.driver_data = board_ich9lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE_GT),
> +		.driver_data = board_ich9lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_AMT),
> +		.driver_data = board_ich9lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_C),
> +		.driver_data = board_ich9lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_BM),
> +		.driver_data = board_ich9lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M),
> +		.driver_data = board_ich9lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_AMT),
> +		.driver_data = board_ich9lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_V),
> +		.driver_data = board_ich9lan
> +	},
>   
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LM), board_ich9lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LF), board_ich9lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_V), board_ich9lan },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LM),
> +		.driver_data = board_ich9lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LF),
> +		.driver_data = board_ich9lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_V),
> +		.driver_data = board_ich9lan,
> +	},
>   
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_D_BM_LM), board_ich10lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_D_BM_LF), board_ich10lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_D_BM_V), board_ich10lan },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_D_BM_LM),
> +		.driver_data = board_ich10lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_D_BM_LF),
> +		.driver_data = board_ich10lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_D_BM_V),
> +		.driver_data = board_ich10lan,
> +	},
>   
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_M_HV_LM), board_pchlan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_M_HV_LC), board_pchlan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_D_HV_DM), board_pchlan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_D_HV_DC), board_pchlan },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_M_HV_LM),
> +		.driver_data = board_pchlan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_M_HV_LC),
> +		.driver_data = board_pchlan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_D_HV_DM),
> +		.driver_data = board_pchlan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_D_HV_DC),
> +		.driver_data = board_pchlan
> +	},
>   
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH2_LV_LM), board_pch2lan },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH2_LV_V), board_pch2lan },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH2_LV_LM),
> +		.driver_data = board_pch2lan,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH2_LV_V),
> +		.driver_data = board_pch2lan
> +	},
>   
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LPT_I217_LM), board_pch_lpt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LPT_I217_V), board_pch_lpt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LPTLP_I218_LM), board_pch_lpt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LPTLP_I218_V), board_pch_lpt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_I218_LM2), board_pch_lpt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_I218_V2), board_pch_lpt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_I218_LM3), board_pch_lpt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_I218_V3), board_pch_lpt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM), board_pch_spt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V), board_pch_spt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM2), board_pch_spt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V2), board_pch_spt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LBG_I219_LM3), board_pch_spt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM4), board_pch_spt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V4), board_pch_spt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM5), board_pch_spt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V5), board_pch_spt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CNP_I219_LM6), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CNP_I219_V6), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CNP_I219_LM7), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CNP_I219_V7), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_LM8), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_V8), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_LM9), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_V9), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM10), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V10), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM11), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V11), board_pch_cnp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM12), board_pch_spt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V12), board_pch_spt },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_LM13), board_pch_tgp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V13), board_pch_tgp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_LM14), board_pch_tgp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V14), board_pch_tgp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_LM15), board_pch_tgp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V15), board_pch_tgp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM23), board_pch_adp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V23), board_pch_adp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM16), board_pch_adp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V16), board_pch_adp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM17), board_pch_adp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V17), board_pch_adp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM22), board_pch_adp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V22), board_pch_adp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM19), board_pch_adp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V19), board_pch_adp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM18), board_pch_mtp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V18), board_pch_mtp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM20), board_pch_mtp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V20), board_pch_mtp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM21), board_pch_mtp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V21), board_pch_mtp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ARL_I219_LM24), board_pch_mtp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ARL_I219_V24), board_pch_mtp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_PTP_I219_LM25), board_pch_ptp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_PTP_I219_V25), board_pch_ptp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_PTP_I219_LM27), board_pch_ptp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_PTP_I219_V27), board_pch_ptp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_NVL_I219_LM29), board_pch_ptp },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_NVL_I219_V29), board_pch_ptp },
> +	{
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LPT_I217_LM),
> +		.driver_data = board_pch_lpt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LPT_I217_V),
> +		.driver_data = board_pch_lpt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LPTLP_I218_LM),
> +		.driver_data = board_pch_lpt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LPTLP_I218_V),
> +		.driver_data = board_pch_lpt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_I218_LM2),
> +		.driver_data = board_pch_lpt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_I218_V2),
> +		.driver_data = board_pch_lpt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_I218_LM3),
> +		.driver_data = board_pch_lpt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_I218_V3),
> +		.driver_data = board_pch_lpt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM),
> +		.driver_data = board_pch_spt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V),
> +		.driver_data = board_pch_spt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM2),
> +		.driver_data = board_pch_spt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V2),
> +		.driver_data = board_pch_spt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LBG_I219_LM3),
> +		.driver_data = board_pch_spt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM4),
> +		.driver_data = board_pch_spt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V4),
> +		.driver_data = board_pch_spt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM5),
> +		.driver_data = board_pch_spt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V5),
> +		.driver_data = board_pch_spt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CNP_I219_LM6),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CNP_I219_V6),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CNP_I219_LM7),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CNP_I219_V7),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_LM8),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_V8),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_LM9),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_V9),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM10),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V10),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM11),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V11),
> +		.driver_data = board_pch_cnp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM12),
> +		.driver_data = board_pch_spt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V12),
> +		.driver_data = board_pch_spt,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_LM13),
> +		.driver_data = board_pch_tgp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V13),
> +		.driver_data = board_pch_tgp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_LM14),
> +		.driver_data = board_pch_tgp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V14),
> +		.driver_data = board_pch_tgp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_LM15),
> +		.driver_data = board_pch_tgp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V15),
> +		.driver_data = board_pch_tgp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM23),
> +		.driver_data = board_pch_adp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V23),
> +		.driver_data = board_pch_adp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM16),
> +		.driver_data = board_pch_adp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V16),
> +		.driver_data = board_pch_adp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM17),
> +		.driver_data = board_pch_adp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V17),
> +		.driver_data = board_pch_adp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM22),
> +		.driver_data = board_pch_adp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V22),
> +		.driver_data = board_pch_adp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM19),
> +		.driver_data = board_pch_adp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V19),
> +		.driver_data = board_pch_adp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM18),
> +		.driver_data = board_pch_mtp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V18),
> +		.driver_data = board_pch_mtp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM20),
> +		.driver_data = board_pch_mtp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V20),
> +		.driver_data = board_pch_mtp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM21),
> +		.driver_data = board_pch_mtp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V21),
> +		.driver_data = board_pch_mtp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ARL_I219_LM24),
> +		.driver_data = board_pch_mtp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ARL_I219_V24),
> +		.driver_data = board_pch_mtp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_PTP_I219_LM25),
> +		.driver_data = board_pch_ptp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_PTP_I219_V25),
> +		.driver_data = board_pch_ptp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_PTP_I219_LM27),
> +		.driver_data = board_pch_ptp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_PTP_I219_V27),
> +		.driver_data = board_pch_ptp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_NVL_I219_LM29),
> +		.driver_data = board_pch_ptp,
> +	}, {
> +		PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_NVL_I219_V29),
> +		.driver_data = board_pch_ptp
> +	},
>   
> -	{ 0, 0, 0, 0, 0, 0, 0 }	/* terminate list */
> +	{ }	/* terminate list */
>   };
>   MODULE_DEVICE_TABLE(pci, e1000_pci_tbl);
>   
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> index d75b8a50413d..f5b4d062709a 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> @@ -21,12 +21,12 @@ static const struct fm10k_info *fm10k_info_tbl[] = {
>    *   Class, Class Mask, private data (not used) }
>    */
>   static const struct pci_device_id fm10k_pci_tbl[] = {
> -	{ PCI_VDEVICE(INTEL, FM10K_DEV_ID_PF), fm10k_device_pf },
> -	{ PCI_VDEVICE(INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2), fm10k_device_pf },
> -	{ PCI_VDEVICE(INTEL, FM10K_DEV_ID_SDI_FM10420_DA2), fm10k_device_pf },
> -	{ PCI_VDEVICE(INTEL, FM10K_DEV_ID_VF), fm10k_device_vf },
> +	{ PCI_VDEVICE(INTEL, FM10K_DEV_ID_PF), .driver_data = fm10k_device_pf },
> +	{ PCI_VDEVICE(INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2), .driver_data = fm10k_device_pf },
> +	{ PCI_VDEVICE(INTEL, FM10K_DEV_ID_SDI_FM10420_DA2), .driver_data = fm10k_device_pf },
> +	{ PCI_VDEVICE(INTEL, FM10K_DEV_ID_VF), .driver_data = fm10k_device_vf },
>   	/* required last entry */
> -	{ 0, }
> +	{ }
>   };
>   MODULE_DEVICE_TABLE(pci, fm10k_pci_tbl);
>   
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 028bd500603a..93faada2d328 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -63,40 +63,43 @@ static bool i40e_is_total_port_shutdown_enabled(struct i40e_pf *pf);
>    *   Class, Class Mask, private data (not used) }
>    */
>   static const struct pci_device_id i40e_pci_tbl[] = {
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_XL710), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_QEMU), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_B), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_C), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_A), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_B), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_C), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_1G_BASE_T_BC), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T4), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T_BC), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_SFP), 0},
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_XL710) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_QEMU) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_B) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_C) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_A) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_B) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_C) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_1G_BASE_T_BC) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T4) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T_BC) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_SFP) },
>   	/*
>   	 * This ID conflicts with ipw2200, but the devices can be differentiated
>   	 * because i40e devices use PCI_CLASS_NETWORK_ETHERNET and ipw2200
>   	 * devices use PCI_CLASS_NETWORK_OTHER.
>   	 */
> -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_B),
> -		PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_X722), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_X722), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_X722), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_1G_BASE_T_X722), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T_X722), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_I_X722), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_X722_A), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2_A), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_X710_N3000), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_XXV710_N3000), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_25G_B), 0},
> -	{PCI_VDEVICE(INTEL, I40E_DEV_ID_25G_SFP28), 0},
> +	{
> +		PCI_DEVICE(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_B),
> +		.class = PCI_CLASS_NETWORK_ETHERNET << 8,
> +		.class_mask = 0xffff00,
> +	},
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_X722) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_X722) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_X722) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_1G_BASE_T_X722) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T_X722) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_I_X722) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_X722_A) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2_A) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_X710_N3000) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_XXV710_N3000) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_25G_B) },
> +	{ PCI_VDEVICE(INTEL, I40E_DEV_ID_25G_SFP28) },
>   	/* required last entry */
> -	{0, }
> +	{ }
>   };
>   MODULE_DEVICE_TABLE(pci, i40e_pci_tbl);
>   
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index 3c1465cf0515..f00692f1e459 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -36,12 +36,12 @@ static const char iavf_copyright[] =
>    *   Class, Class Mask, private data (not used) }
>    */
>   static const struct pci_device_id iavf_pci_tbl[] = {
> -	{PCI_VDEVICE(INTEL, IAVF_DEV_ID_VF), 0},
> -	{PCI_VDEVICE(INTEL, IAVF_DEV_ID_VF_HV), 0},
> -	{PCI_VDEVICE(INTEL, IAVF_DEV_ID_X722_VF), 0},
> -	{PCI_VDEVICE(INTEL, IAVF_DEV_ID_ADAPTIVE_VF), 0},
> +	{ PCI_VDEVICE(INTEL, IAVF_DEV_ID_VF) },
> +	{ PCI_VDEVICE(INTEL, IAVF_DEV_ID_VF_HV) },
> +	{ PCI_VDEVICE(INTEL, IAVF_DEV_ID_X722_VF) },
> +	{ PCI_VDEVICE(INTEL, IAVF_DEV_ID_ADAPTIVE_VF) },
>   	/* required last entry */
> -	{0, }
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, iavf_pci_tbl);
> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
> index ce91dda00ec0..49d46670695f 100644
> --- a/drivers/net/ethernet/intel/igb/igb_main.c
> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
> @@ -63,40 +63,40 @@ static const struct pci_device_id igb_pci_tbl[] = {
>   	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) },
>   	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_SGMII) },
>   	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I211_COPPER), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_COPPER), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_FIBER), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_SERDES), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_SGMII), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_COPPER_FLASHLESS), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_SERDES_FLASHLESS), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_COPPER), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_FIBER), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_SERDES), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_SGMII), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_COPPER), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_FIBER), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_QUAD_FIBER), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_SERDES), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_SGMII), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_COPPER_DUAL), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_SGMII), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_SERDES), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_SFP), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_NS), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_NS_SERDES), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_FIBER), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES_QUAD), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_COPPER), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES), board_82575 },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER), board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I211_COPPER), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_COPPER), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_FIBER), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_SERDES), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_SGMII), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_COPPER_FLASHLESS), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_SERDES_FLASHLESS), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_COPPER), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_FIBER), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_SERDES), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_SGMII), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_COPPER), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_FIBER), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_QUAD_FIBER), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_SERDES), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_SGMII), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_COPPER_DUAL), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_SGMII), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_SERDES), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_SFP), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_NS), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_NS_SERDES), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_FIBER), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES_QUAD), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_COPPER), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES), .driver_data = board_82575 },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER), .driver_data = board_82575 },
>   	/* required last entry */
> -	{0, }
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, igb_pci_tbl);
> diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
> index 5d04541072b3..0a3d0a1cba43 100644
> --- a/drivers/net/ethernet/intel/igbvf/netdev.c
> +++ b/drivers/net/ethernet/intel/igbvf/netdev.c
> @@ -2937,8 +2937,8 @@ static const struct pci_error_handlers igbvf_err_handler = {
>   };
>   
>   static const struct pci_device_id igbvf_pci_tbl[] = {
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_VF), board_vf },
> -	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_VF), board_i350_vf },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_VF), .driver_data = board_vf },
> +	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_VF), .driver_data = board_i350_vf },
>   	{ } /* terminate list */
>   };
>   MODULE_DEVICE_TABLE(pci, igbvf_pci_tbl);
> diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
> index 8ac16808023c..89b9e1d00fc7 100644
> --- a/drivers/net/ethernet/intel/igc/igc_main.c
> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> @@ -47,24 +47,24 @@ static const struct igc_info *igc_info_tbl[] = {
>   };
>   
>   static const struct pci_device_id igc_pci_tbl[] = {
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_LM), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_V), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_I), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I220_V), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_K), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_K2), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_K), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_LMVP), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_LMVP), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_IT), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_LM), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_V), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_IT), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I221_V), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_BLANK_NVM), board_base },
> -	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_BLANK_NVM), board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_LM), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_V), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_I), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I220_V), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_K), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_K2), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_K), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_LMVP), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_LMVP), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_IT), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_LM), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_V), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_IT), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I221_V), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_BLANK_NVM), .driver_data = board_base },
> +	{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_BLANK_NVM), .driver_data = board_base },
>   	/* required last entry */
> -	{0, }
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, igc_pci_tbl);
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 2646ee6f295f..730a35658c76 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -88,60 +88,60 @@ static const struct ixgbe_info *ixgbe_info_tbl[] = {
>    *   Class, Class Mask, private data (not used) }
>    */
>   static const struct pci_device_id ixgbe_pci_tbl[] = {
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AT), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AT2), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_XF_LR), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_BX), board_82598 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_KX4), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_XAUI_LOM), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_KR), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_EM), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_CX4), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_BACKPLANE_FCOE), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_FCOE), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_T3_LOM), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_COMBO_BACKPLANE), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540T), board_X540 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_SF2), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_LS), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_QSFP_SF_QP), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599EN_SFP), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP), board_82599 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540T1), board_X540 },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550T), board_X550},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550T1), board_X550},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_KX4), board_X550EM_x},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_XFI), board_X550EM_x},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_KR), board_X550EM_x},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_10G_T), board_X550EM_x},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_SFP), board_X550EM_x},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_1G_T), board_x550em_x_fw},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_KR), board_x550em_a },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_KR_L), board_x550em_a },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SFP_N), board_x550em_a },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SGMII), board_x550em_a },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SGMII_L), board_x550em_a },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_10G_T), board_x550em_a},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SFP), board_x550em_a },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_1G_T), board_x550em_a_fw },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_1G_T_L), board_x550em_a_fw },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_BACKPLANE), board_e610},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_SFP), board_e610},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_10G_T), board_e610},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_2_5G_T), board_e610},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_SGMII), board_e610},
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AT), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AT2), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_XF_LR), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_BX), .driver_data = board_82598 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_KX4), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_XAUI_LOM), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_KR), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_EM), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_CX4), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_BACKPLANE_FCOE), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_FCOE), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_T3_LOM), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_COMBO_BACKPLANE), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540T), .driver_data = board_X540 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_SF2), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_LS), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_QSFP_SF_QP), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599EN_SFP), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP), .driver_data = board_82599 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540T1), .driver_data = board_X540 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550T), .driver_data = board_X550 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550T1), .driver_data = board_X550 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_KX4), .driver_data = board_X550EM_x },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_XFI), .driver_data = board_X550EM_x },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_KR), .driver_data = board_X550EM_x },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_10G_T), .driver_data = board_X550EM_x },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_SFP), .driver_data = board_X550EM_x },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_1G_T), .driver_data = board_x550em_x_fw },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_KR), .driver_data = board_x550em_a },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_KR_L), .driver_data = board_x550em_a },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SFP_N), .driver_data = board_x550em_a },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SGMII), .driver_data = board_x550em_a },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SGMII_L), .driver_data = board_x550em_a },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_10G_T), .driver_data = board_x550em_a },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SFP), .driver_data = board_x550em_a },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_1G_T), .driver_data = board_x550em_a_fw },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_1G_T_L), .driver_data = board_x550em_a_fw },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_BACKPLANE), .driver_data = board_e610 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_SFP), .driver_data = board_e610 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_10G_T), .driver_data = board_e610 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_2_5G_T), .driver_data = board_e610 },
> +	{ PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_SGMII), .driver_data = board_e610 },
>   	/* required last entry */
> -	{0, }
> +	{ }
>   };
>   MODULE_DEVICE_TABLE(pci, ixgbe_pci_tbl);
>   
> diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> index 42f89a179a3f..b5d15c1f0d4f 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> @@ -64,20 +64,43 @@ static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
>    *   Class, Class Mask, private data (not used) }
>    */
>   static const struct pci_device_id ixgbevf_pci_tbl[] = {
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF), board_82599_vf },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF_HV), board_82599_vf_hv },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF), board_X540_vf },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF_HV), board_X540_vf_hv },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF), board_X550_vf },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF_HV), board_X550_vf_hv },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF), board_X550EM_x_vf },
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF_HV), board_X550EM_x_vf_hv},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_VF), board_x550em_a_vf },
> -	{PCI_VDEVICE_SUB(INTEL, IXGBE_DEV_ID_E610_VF, PCI_ANY_ID,
> -			 IXGBE_SUBDEV_ID_E610_VF_HV), board_e610_vf_hv},
> -	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_VF), board_e610_vf},
> +	{
> +		PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF),
> +		.driver_data = board_82599_vf,
> +	}, {
> +		PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF_HV),
> +		.driver_data = board_82599_vf_hv,
> +	}, {
> +		PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF),
> +		.driver_data = board_X540_vf,
> +	}, {
> +		PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF_HV),
> +		.driver_data = board_X540_vf_hv,
> +	}, {
> +		PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF),
> +		.driver_data = board_X550_vf,
> +	}, {
> +		PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF_HV),
> +		.driver_data = board_X550_vf_hv,
> +	}, {
> +		PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF),
> +		.driver_data = board_X550EM_x_vf,
> +	}, {
> +		PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF_HV),
> +		.driver_data = board_X550EM_x_vf_hv
> +	}, {
> +		PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_VF),
> +		.driver_data = board_x550em_a_vf,
> +	}, {
> +		PCI_VDEVICE_SUB(INTEL, IXGBE_DEV_ID_E610_VF,
> +				PCI_ANY_ID, IXGBE_SUBDEV_ID_E610_VF_HV),
> +		.driver_data = board_e610_vf_hv,
> +	}, {
> +		PCI_VDEVICE(INTEL, IXGBE_DEV_ID_E610_VF),
> +		.driver_data = board_e610_vf,
> +	},
>   	/* required last entry */
> -	{0, }
> +	{ }
>   };
>   MODULE_DEVICE_TABLE(pci, ixgbevf_pci_tbl);
>   
> diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
> index e6b7e75894ff..4fe6dbf0942f 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/main.c
> @@ -4274,9 +4274,9 @@ int mlx4_restart_one(struct pci_dev *pdev)
>   	return mlx4_restart_one_up(pdev, false, NULL);
>   }
>   
> -#define MLX_SP(id) { PCI_VDEVICE(MELLANOX, id), MLX4_PCI_DEV_FORCE_SENSE_PORT }
> -#define MLX_VF(id) { PCI_VDEVICE(MELLANOX, id), MLX4_PCI_DEV_IS_VF }
> -#define MLX_GN(id) { PCI_VDEVICE(MELLANOX, id), 0 }
> +#define MLX_SP(id) { PCI_VDEVICE(MELLANOX, id), .driver_data = MLX4_PCI_DEV_FORCE_SENSE_PORT }
> +#define MLX_VF(id) { PCI_VDEVICE(MELLANOX, id), .driver_data = MLX4_PCI_DEV_IS_VF }
> +#define MLX_GN(id) { PCI_VDEVICE(MELLANOX, id), .driver_data = 0 }
>   
>   static const struct pci_device_id mlx4_pci_table[] = {
>   #ifdef CONFIG_MLX4_CORE_GEN2
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> index 74827e8ca125..ff450269ce37 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> @@ -2203,19 +2203,26 @@ static int mlx5_resume(struct pci_dev *pdev)
>   
>   static const struct pci_device_id mlx5_core_pci_table[] = {
>   	{ PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_CONNECTIB) },
> -	{ PCI_VDEVICE(MELLANOX, 0x1012), MLX5_PCI_DEV_IS_VF},	/* Connect-IB VF */
> +	{ PCI_VDEVICE(MELLANOX, 0x1012),
> +	  .driver_data = MLX5_PCI_DEV_IS_VF },			/* Connect-IB VF */
>   	{ PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_CONNECTX4) },
> -	{ PCI_VDEVICE(MELLANOX, 0x1014), MLX5_PCI_DEV_IS_VF},	/* ConnectX-4 VF */
> +	{ PCI_VDEVICE(MELLANOX, 0x1014),
> +	  .driver_data = MLX5_PCI_DEV_IS_VF },			/* ConnectX-4 VF */
>   	{ PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_CONNECTX4_LX) },
> -	{ PCI_VDEVICE(MELLANOX, 0x1016), MLX5_PCI_DEV_IS_VF},	/* ConnectX-4LX VF */
> +	{ PCI_VDEVICE(MELLANOX, 0x1016),
> +	  .driver_data = MLX5_PCI_DEV_IS_VF },			/* ConnectX-4LX VF */
>   	{ PCI_VDEVICE(MELLANOX, 0x1017) },			/* ConnectX-5, PCIe 3.0 */
> -	{ PCI_VDEVICE(MELLANOX, 0x1018), MLX5_PCI_DEV_IS_VF},	/* ConnectX-5 VF */
> +	{ PCI_VDEVICE(MELLANOX, 0x1018),
> +	  .driver_data = MLX5_PCI_DEV_IS_VF },			/* ConnectX-5 VF */
>   	{ PCI_VDEVICE(MELLANOX, 0x1019) },			/* ConnectX-5 Ex */
> -	{ PCI_VDEVICE(MELLANOX, 0x101a), MLX5_PCI_DEV_IS_VF},	/* ConnectX-5 Ex VF */
> +	{ PCI_VDEVICE(MELLANOX, 0x101a),
> +	  .driver_data = MLX5_PCI_DEV_IS_VF },			/* ConnectX-5 Ex VF */
>   	{ PCI_VDEVICE(MELLANOX, 0x101b) },			/* ConnectX-6 */
> -	{ PCI_VDEVICE(MELLANOX, 0x101c), MLX5_PCI_DEV_IS_VF},	/* ConnectX-6 VF */
> +	{ PCI_VDEVICE(MELLANOX, 0x101c),
> +	  .driver_data = MLX5_PCI_DEV_IS_VF },			/* ConnectX-6 VF */
>   	{ PCI_VDEVICE(MELLANOX, 0x101d) },			/* ConnectX-6 Dx */
> -	{ PCI_VDEVICE(MELLANOX, 0x101e), MLX5_PCI_DEV_IS_VF},	/* ConnectX Family mlx5Gen Virtual Function */
> +	{ PCI_VDEVICE(MELLANOX, 0x101e),
> +	  .driver_data = MLX5_PCI_DEV_IS_VF },			/* ConnectX Family mlx5Gen Virtual Function */
>   	{ PCI_VDEVICE(MELLANOX, 0x101f) },			/* ConnectX-6 LX */
>   	{ PCI_VDEVICE(MELLANOX, 0x1021) },			/* ConnectX-7 */
>   	{ PCI_VDEVICE(MELLANOX, 0x1023) },			/* ConnectX-8 */
> @@ -2223,11 +2230,12 @@ static const struct pci_device_id mlx5_core_pci_table[] = {
>   	{ PCI_VDEVICE(MELLANOX, 0x1027) },			/* ConnectX-10 */
>   	{ PCI_VDEVICE(MELLANOX, 0x2101) },			/* ConnectX-10 NVLink-C2C */
>   	{ PCI_VDEVICE(MELLANOX, 0xa2d2) },			/* BlueField integrated ConnectX-5 network controller */
> -	{ PCI_VDEVICE(MELLANOX, 0xa2d3), MLX5_PCI_DEV_IS_VF},	/* BlueField integrated ConnectX-5 network controller VF */
> +	{ PCI_VDEVICE(MELLANOX, 0xa2d3),
> +	  .driver_data = MLX5_PCI_DEV_IS_VF },			/* BlueField integrated ConnectX-5 network controller VF */
>   	{ PCI_VDEVICE(MELLANOX, 0xa2d6) },			/* BlueField-2 integrated ConnectX-6 Dx network controller */
>   	{ PCI_VDEVICE(MELLANOX, 0xa2dc) },			/* BlueField-3 integrated ConnectX-7 network controller */
>   	{ PCI_VDEVICE(MELLANOX, 0xa2df) },			/* BlueField-4 integrated ConnectX-8 network controller */
> -	{ 0, }
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, mlx5_core_pci_table);
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
> index 3a65420fa1ad..1aaa75b47fe3 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
> @@ -5277,8 +5277,8 @@ static int mlxsw_sp_netdevice_event(struct notifier_block *nb,
>   }
>   
>   static const struct pci_device_id mlxsw_sp1_pci_id_table[] = {
> -	{PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_SPECTRUM), 0},
> -	{0, },
> +	{PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_SPECTRUM) },
> +	{ },
>   };
>   
>   static struct pci_driver mlxsw_sp1_pci_driver = {
> @@ -5287,8 +5287,8 @@ static struct pci_driver mlxsw_sp1_pci_driver = {
>   };
>   
>   static const struct pci_device_id mlxsw_sp2_pci_id_table[] = {
> -	{PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_SPECTRUM2), 0},
> -	{0, },
> +	{PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_SPECTRUM2) },
> +	{ },
>   };
>   
>   static struct pci_driver mlxsw_sp2_pci_driver = {
> @@ -5297,8 +5297,8 @@ static struct pci_driver mlxsw_sp2_pci_driver = {
>   };
>   
>   static const struct pci_device_id mlxsw_sp3_pci_id_table[] = {
> -	{PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_SPECTRUM3), 0},
> -	{0, },
> +	{PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_SPECTRUM3) },
> +	{ },
>   };
>   
>   static struct pci_driver mlxsw_sp3_pci_driver = {
> @@ -5307,8 +5307,8 @@ static struct pci_driver mlxsw_sp3_pci_driver = {
>   };
>   
>   static const struct pci_device_id mlxsw_sp4_pci_id_table[] = {
> -	{PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_SPECTRUM4), 0},
> -	{0, },
> +	{PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_SPECTRUM4) },
> +	{ },
>   };
>   
>   static struct pci_driver mlxsw_sp4_pci_driver = {
> diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
> index 26557cd32008..773fdd215a15 100644
> --- a/drivers/net/ethernet/micrel/ksz884x.c
> +++ b/drivers/net/ethernet/micrel/ksz884x.c
> @@ -6839,11 +6839,9 @@ static int __maybe_unused pcidev_suspend(struct device *dev_d)
>   static char pcidev_name[] = "ksz884xp";
>   
>   static const struct pci_device_id pcidev_table[] = {
> -	{ PCI_VENDOR_ID_MICREL_KS, 0x8841,
> -		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
> -	{ PCI_VENDOR_ID_MICREL_KS, 0x8842,
> -		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
> -	{ 0 }
> +	{ PCI_VDEVICE(MICREL_KS, 0x8841) },
> +	{ PCI_VDEVICE(MICREL_KS, 0x8842) },
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, pcidev_table);
> diff --git a/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
> index 316f941629d4..70a2b0082ba8 100644
> --- a/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
> +++ b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
> @@ -17,12 +17,12 @@ static const char rnpgbe_driver_name[] = "rnpgbe";
>    *   private_data (used for different hw chip) }
>    */
>   static struct pci_device_id rnpgbe_pci_tbl[] = {
> -	{ PCI_VDEVICE(MUCSE, RNPGBE_DEVICE_ID_N210), board_n210 },
> -	{ PCI_VDEVICE(MUCSE, RNPGBE_DEVICE_ID_N210L), board_n210 },
> -	{ PCI_VDEVICE(MUCSE, RNPGBE_DEVICE_ID_N500_DUAL_PORT), board_n500 },
> -	{ PCI_VDEVICE(MUCSE, RNPGBE_DEVICE_ID_N500_QUAD_PORT), board_n500 },
> +	{ PCI_VDEVICE(MUCSE, RNPGBE_DEVICE_ID_N210), .driver_data = board_n210 },
> +	{ PCI_VDEVICE(MUCSE, RNPGBE_DEVICE_ID_N210L), .driver_data = board_n210 },
> +	{ PCI_VDEVICE(MUCSE, RNPGBE_DEVICE_ID_N500_DUAL_PORT), .driver_data = board_n500 },
> +	{ PCI_VDEVICE(MUCSE, RNPGBE_DEVICE_ID_N500_QUAD_PORT), .driver_data = board_n500 },
>   	/* required last entry */
> -	{0, },
> +	{ },
>   };
>   
>   /**
> diff --git a/drivers/net/ethernet/natsemi/natsemi.c b/drivers/net/ethernet/natsemi/natsemi.c
> index b253734dbc80..35a63b78880b 100644
> --- a/drivers/net/ethernet/natsemi/natsemi.c
> +++ b/drivers/net/ethernet/natsemi/natsemi.c
> @@ -248,8 +248,8 @@ static struct {
>   };
>   
>   static const struct pci_device_id natsemi_pci_tbl[] = {
> -	{ PCI_VENDOR_ID_NS, 0x0020, 0x12d9,     0x000c,     0, 0, 0 },
> -	{ PCI_VENDOR_ID_NS, 0x0020, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
> +	{ PCI_VDEVICE_SUB(NS, 0x0020, 0x12d9, 0x000c), .driver_data = 0 },
> +	{ PCI_VDEVICE(NS, 0x0020), .driver_data = 1 },
>   	{ }	/* terminate list */
>   };
>   MODULE_DEVICE_TABLE(pci, natsemi_pci_tbl);
> diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/nfp/nfp_main.c
> index 48390b2fd44d..e8e4b84d505a 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfp_main.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c
> @@ -33,39 +33,56 @@
>   static const char nfp_driver_name[] = "nfp";
>   
>   static const struct pci_device_id nfp_pci_device_ids[] = {
> -	{ PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NFP3800,
> -	  PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP3800,
> +	{
> +		PCI_VDEVICE_SUB(NETRONOME, PCI_DEVICE_ID_NFP3800,
> +				PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP3800,
> +	}, {
> +		PCI_VDEVICE_SUB(NETRONOME, PCI_DEVICE_ID_NFP4000,
> +				PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP6000,
> +	}, {
> +		PCI_VDEVICE_SUB(NETRONOME, PCI_DEVICE_ID_NFP5000,
> +				PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP6000,
> +	}, {
> +		PCI_VDEVICE_SUB(NETRONOME, PCI_DEVICE_ID_NFP6000,
> +				PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP6000,
> +	}, {
> +		PCI_VDEVICE_SUB(CORIGINE, PCI_DEVICE_ID_NFP3800,
> +				PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP3800,
> +	}, {
> +		PCI_VDEVICE_SUB(CORIGINE, PCI_DEVICE_ID_NFP4000,
> +				PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP6000,
> +	}, {
> +		PCI_VDEVICE_SUB(CORIGINE, PCI_DEVICE_ID_NFP5000,
> +				PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP6000,
> +	}, {
> +		PCI_VDEVICE_SUB(CORIGINE, PCI_DEVICE_ID_NFP6000,
> +				PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP6000,
>   	},
> -	{ PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NFP4000,
> -	  PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP6000,
> -	},
> -	{ PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NFP5000,
> -	  PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP6000,
> -	},
> -	{ PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NFP6000,
> -	  PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP6000,
> -	},
> -	{ PCI_VENDOR_ID_CORIGINE, PCI_DEVICE_ID_NFP3800,
> -	  PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP3800,
> -	},
> -	{ PCI_VENDOR_ID_CORIGINE, PCI_DEVICE_ID_NFP4000,
> -	  PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP6000,
> -	},
> -	{ PCI_VENDOR_ID_CORIGINE, PCI_DEVICE_ID_NFP5000,
> -	  PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP6000,
> -	},
> -	{ PCI_VENDOR_ID_CORIGINE, PCI_DEVICE_ID_NFP6000,
> -	  PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP6000,
> -	},
> -	{ 0, } /* Required last entry. */
> +	{ } /* Required last entry. */
>   };
>   MODULE_DEVICE_TABLE(pci, nfp_pci_device_ids);
>   
> diff --git a/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c b/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c
> index b5646c884371..cf557e0ce011 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c
> @@ -38,23 +38,32 @@ struct nfp_net_vf {
>   static const char nfp_net_driver_name[] = "nfp_netvf";
>   
>   static const struct pci_device_id nfp_netvf_pci_device_ids[] = {
> -	{ PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NFP3800_VF,
> -	  PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP3800_VF,
> +	{
> +		PCI_VDEVICE_SUB(NETRONOME, PCI_DEVICE_ID_NFP3800_VF,
> +				PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP3800_VF,
> +	}, {
> +		PCI_VDEVICE_SUB(NETRONOME, PCI_DEVICE_ID_NFP6000_VF,
> +				PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP6000_VF,
> +	}, {
> +		PCI_VDEVICE_SUB(CORIGINE, PCI_DEVICE_ID_NFP3800_VF,
> +				PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP3800_VF,
> +	}, {
> +		PCI_VDEVICE_SUB(CORIGINE, PCI_DEVICE_ID_NFP6000_VF,
> +				PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID),
> +		.class = PCI_ANY_ID,
> +		.class_mask = 0,
> +		.driver_data = NFP_DEV_NFP6000_VF,
>   	},
> -	{ PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NFP6000_VF,
> -	  PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP6000_VF,
> -	},
> -	{ PCI_VENDOR_ID_CORIGINE, PCI_DEVICE_ID_NFP3800_VF,
> -	  PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP3800_VF,
> -	},
> -	{ PCI_VENDOR_ID_CORIGINE, PCI_DEVICE_ID_NFP6000_VF,
> -	  PCI_VENDOR_ID_CORIGINE, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, NFP_DEV_NFP6000_VF,
> -	},
> -	{ 0, } /* Required last entry. */
> +	{ } /* Required last entry. */
>   };
>   MODULE_DEVICE_TABLE(pci, nfp_netvf_pci_device_ids);
>   
> diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
> index 39842eb73bc3..cb0ae0650905 100644
> --- a/drivers/net/ethernet/qlogic/qede/qede_main.c
> +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
> @@ -76,20 +76,20 @@ enum qede_pci_private {
>   };
>   
>   static const struct pci_device_id qede_pci_tbl[] = {
> -	{PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_40), QEDE_PRIVATE_PF},
> -	{PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_10), QEDE_PRIVATE_PF},
> -	{PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_MF), QEDE_PRIVATE_PF},
> -	{PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_100), QEDE_PRIVATE_PF},
> -	{PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_50), QEDE_PRIVATE_PF},
> -	{PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_25), QEDE_PRIVATE_PF},
> +	{ PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_40), .driver_data = QEDE_PRIVATE_PF },
> +	{ PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_10), .driver_data = QEDE_PRIVATE_PF },
> +	{ PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_MF), .driver_data = QEDE_PRIVATE_PF },
> +	{ PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_100), .driver_data = QEDE_PRIVATE_PF },
> +	{ PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_50), .driver_data = QEDE_PRIVATE_PF },
> +	{ PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_25), .driver_data = QEDE_PRIVATE_PF },
>   #ifdef CONFIG_QED_SRIOV
> -	{PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_IOV), QEDE_PRIVATE_VF},
> +	{ PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_57980S_IOV), .driver_data = QEDE_PRIVATE_VF },
>   #endif
> -	{PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_AH), QEDE_PRIVATE_PF},
> +	{ PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_AH), .driver_data = QEDE_PRIVATE_PF },
>   #ifdef CONFIG_QED_SRIOV
> -	{PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_AH_IOV), QEDE_PRIVATE_VF},
> +	{ PCI_VDEVICE(QLOGIC, PCI_DEVICE_ID_AH_IOV), .driver_data = QEDE_PRIVATE_VF },
>   #endif
> -	{ 0 }
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, qede_pci_tbl);
> diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c
> index a8532ebd42ec..8241bcf76664 100644
> --- a/drivers/net/ethernet/realtek/8139too.c
> +++ b/drivers/net/ethernet/realtek/8139too.c
> @@ -235,44 +235,44 @@ static const struct {
>   
>   
>   static const struct pci_device_id rtl8139_pci_tbl[] = {
> -	{0x10ec, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x10ec, 0x8138, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x1113, 0x1211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x1500, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x4033, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x1186, 0x1300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x1186, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x13d1, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x1259, 0xa117, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x1259, 0xa11e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x14ea, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x14ea, 0xab07, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x11db, 0x1234, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x1432, 0x9130, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x02ac, 0x1012, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x018a, 0x0106, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x126c, 0x1211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x1743, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x021b, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> -	{0x16ec, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> +	{ PCI_DEVICE(0x10ec, 0x8139), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x10ec, 0x8138), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x1113, 0x1211), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x1500, 0x1360), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x4033, 0x1360), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x1186, 0x1300), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x1186, 0x1340), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x13d1, 0xab06), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x1259, 0xa117), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x1259, 0xa11e), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x14ea, 0xab06), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x14ea, 0xab07), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x11db, 0x1234), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x1432, 0x9130), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x02ac, 0x1012), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x018a, 0x0106), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x126c, 0x1211), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x1743, 0x8139), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x021b, 0x8139), .driver_data = RTL8139 },
> +	{ PCI_DEVICE(0x16ec, 0xab06), .driver_data = RTL8139 },
>   
>   #ifdef CONFIG_SH_SECUREEDGE5410
>   	/* Bogus 8139 silicon reports 8129 without external PROM :-( */
> -	{0x10ec, 0x8129, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
> +	{ PCI_DEVICE(0x10ec, 0x8129), .driver_data = RTL8139 },
>   #endif
>   #ifdef CONFIG_8139TOO_8129
> -	{0x10ec, 0x8129, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8129 },
> +	{ PCI_DEVICE(0x10ec, 0x8129), .driver_data = RTL8129 },
>   #endif
>   
>   	/* some crazy cards report invalid vendor ids like
>   	 * 0x0001 here.  The other ids are valid and constant,
>   	 * so we simply don't match on the main vendor id.
>   	 */
> -	{PCI_ANY_ID, 0x8139, 0x10ec, 0x8139, 0, 0, RTL8139 },
> -	{PCI_ANY_ID, 0x8139, 0x1186, 0x1300, 0, 0, RTL8139 },
> -	{PCI_ANY_ID, 0x8139, 0x13d1, 0xab06, 0, 0, RTL8139 },
> +	{ PCI_DEVICE_SUB(PCI_ANY_ID, 0x8139, 0x10ec, 0x8139), .driver_data = RTL8139 },
> +	{ PCI_DEVICE_SUB(PCI_ANY_ID, 0x8139, 0x1186, 0x1300), .driver_data = RTL8139 },
> +	{ PCI_DEVICE_SUB(PCI_ANY_ID, 0x8139, 0x13d1, 0xab06), .driver_data = RTL8139 },
>   
> -	{0,}
> +	{ }
>   };
>   MODULE_DEVICE_TABLE (pci, rtl8139_pci_tbl);
>   
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 791277e750ba..ec4fc21fa21f 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -229,7 +229,7 @@ static const struct pci_device_id rtl8169_pci_tbl[] = {
>   	{ PCI_VDEVICE(REALTEK,	0x2502) },
>   	{ PCI_VDEVICE(REALTEK,	0x2600) },
>   	{ PCI_VDEVICE(REALTEK,	0x8129) },
> -	{ PCI_VDEVICE(REALTEK,	0x8136), RTL_CFG_NO_GBIT },
> +	{ PCI_VDEVICE(REALTEK,	0x8136), .driver_data = RTL_CFG_NO_GBIT },
>   	{ PCI_VDEVICE(REALTEK,	0x8161) },
>   	{ PCI_VDEVICE(REALTEK,	0x8162) },
>   	{ PCI_VDEVICE(REALTEK,	0x8167) },
> @@ -240,15 +240,15 @@ static const struct pci_device_id rtl8169_pci_tbl[] = {
>   	{ PCI_VDEVICE(DLINK,	0x4302) },
>   	{ PCI_VDEVICE(AT,	0xc107) },
>   	{ PCI_VDEVICE(USR,	0x0116) },
> -	{ PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0024 },
> -	{ 0x0001, 0x8168, PCI_ANY_ID, 0x2410 },
> +	{ PCI_VDEVICE_SUB(LINKSYS, 0x1032, PCI_ANY_ID, 0x0024) },
> +	{ PCI_DEVICE_SUB(0x0001, 0x8168, PCI_ANY_ID, 0x2410) },
>   	{ PCI_VDEVICE(REALTEK,	0x8125) },
>   	{ PCI_VDEVICE(REALTEK,	0x8126) },
>   	{ PCI_VDEVICE(REALTEK,	0x8127) },
>   	{ PCI_VDEVICE(REALTEK,	0x3000) },
>   	{ PCI_VDEVICE(REALTEK,	0x5000) },
>   	{ PCI_VDEVICE(REALTEK,	0x0e10) },
> -	{}
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);
> diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
> index ff6ca7b2cd4f..84a55f2b48ff 100644
> --- a/drivers/net/ethernet/rocker/rocker_main.c
> +++ b/drivers/net/ethernet/rocker/rocker_main.c
> @@ -40,8 +40,8 @@
>   static const char rocker_driver_name[] = "rocker";
>   
>   static const struct pci_device_id rocker_pci_id_table[] = {
> -	{PCI_VDEVICE(REDHAT, PCI_DEVICE_ID_REDHAT_ROCKER), 0},
> -	{0, }
> +	{ PCI_VDEVICE(REDHAT, PCI_DEVICE_ID_REDHAT_ROCKER) },
> +	{ }
>   };
>   
>   struct rocker_wait {
> diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
> index 12ddea514910..ed5276d492b9 100644
> --- a/drivers/net/ethernet/sis/sis190.c
> +++ b/drivers/net/ethernet/sis/sis190.c
> @@ -331,9 +331,9 @@ static const struct {
>   };
>   
>   static const struct pci_device_id sis190_pci_tbl[] = {
> -	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 },
> -	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 },
> -	{ 0, },
> +	{ PCI_VDEVICE(SI, 0x0190), .driver_data = 0 },
> +	{ PCI_VDEVICE(SI, 0x0191), .driver_data = 1 },
> +	{ },
>   };
>   
>   MODULE_DEVICE_TABLE(pci, sis190_pci_tbl);
> diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c
> index 1349ef50cd26..6e9afd9042f7 100644
> --- a/drivers/net/ethernet/sis/sis900.c
> +++ b/drivers/net/ethernet/sis/sis900.c
> @@ -104,11 +104,11 @@ static const char * card_names[] = {
>   };
>   
>   static const struct pci_device_id sis900_pci_tbl[] = {
> -	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_900,
> -	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_900},
> -	{PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7016,
> -	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_7016},
> -	{0,}
> +	{ PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_900),
> +	  .driver_data = SIS_900 },
> +	{ PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_7016),
> +	  .driver_data = SIS_7016 },
> +	{ }
>   };
>   MODULE_DEVICE_TABLE (pci, sis900_pci_tbl);
>   
> diff --git a/drivers/net/ethernet/smsc/epic100.c b/drivers/net/ethernet/smsc/epic100.c
> index 389659db06a8..60538b7fe684 100644
> --- a/drivers/net/ethernet/smsc/epic100.c
> +++ b/drivers/net/ethernet/smsc/epic100.c
> @@ -166,11 +166,19 @@ static const struct epic_chip_info pci_id_tbl[] = {
>   
>   
>   static const struct pci_device_id epic_pci_tbl[] = {
> -	{ 0x10B8, 0x0005, 0x1092, 0x0AB4, 0, 0, SMSC_83C170_0 },
> -	{ 0x10B8, 0x0005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SMSC_83C170 },
> -	{ 0x10B8, 0x0006, PCI_ANY_ID, PCI_ANY_ID,
> -	  PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, SMSC_83C175 },
> -	{ 0,}
> +	{
> +		PCI_DEVICE_SUB(0x10B8, 0x0005, 0x1092, 0x0AB4),
> +		.driver_data = SMSC_83C170_0,
> +	}, {
> +		PCI_DEVICE(0x10B8, 0x0005),
> +		.driver_data = SMSC_83C170,
> +	}, {
> +		PCI_DEVICE(0x10B8, 0x0006),
> +		.class = PCI_CLASS_NETWORK_ETHERNET << 8,
> +		.class_mask = 0xffff00,
> +		.driver_data = SMSC_83C175,
> +	},
> +	{ }
>   };
>   MODULE_DEVICE_TABLE (pci, epic_pci_tbl);
>   
> diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
> index fe00e7dd3fe4..823870c999bf 100644
> --- a/drivers/net/ethernet/sun/cassini.c
> +++ b/drivers/net/ethernet/sun/cassini.c
> @@ -218,11 +218,9 @@ static u16 link_modes[] = {
>   };
>   
>   static const struct pci_device_id cas_pci_tbl[] = {
> -	{ PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_CASSINI,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> -	{ PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SATURN,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> -	{ 0, }
> +	{ PCI_VDEVICE(SUN, PCI_DEVICE_ID_SUN_CASSINI) },
> +	{ PCI_VDEVICE(NS, PCI_DEVICE_ID_NS_SATURN) },
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, cas_pci_tbl);
> diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c
> index 8e69d917d827..234ffc3c6a61 100644
> --- a/drivers/net/ethernet/sun/sungem.c
> +++ b/drivers/net/ethernet/sun/sungem.c
> @@ -85,8 +85,7 @@ MODULE_LICENSE("GPL");
>   #define GEM_MODULE_NAME	"gem"
>   
>   static const struct pci_device_id gem_pci_tbl[] = {
> -	{ PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_GEM,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> +	{ PCI_VDEVICE(SUN, PCI_DEVICE_ID_SUN_GEM) },
>   
>   	/* These models only differ from the original GEM in
>   	 * that their tx/rx fifos are of a different size and
> @@ -95,21 +94,14 @@ static const struct pci_device_id gem_pci_tbl[] = {
>   	 * Apple's GMAC does support gigabit on machines with
>   	 * the BCM54xx PHYs. -BenH
>   	 */
> -	{ PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_RIO_GEM,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> -	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMAC,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> -	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMACP,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> -	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMAC2,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> -	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_K2_GMAC,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> -	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_SH_SUNGEM,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> -	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID2_GMAC,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> -	{0, }
> +	{ PCI_VDEVICE(SUN, PCI_DEVICE_ID_SUN_RIO_GEM) },
> +	{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMAC) },
> +	{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMACP) },
> +	{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMAC2) },
> +	{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_K2_GMAC) },
> +	{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_SH_SUNGEM) },
> +	{ PCI_VDEVICE(APPLE, PCI_DEVICE_ID_APPLE_IPID2_GMAC) },
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, gem_pci_tbl);
> diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
> index a55b0f951181..274a1837025c 100644
> --- a/drivers/net/ethernet/ti/tlan.c
> +++ b/drivers/net/ethernet/ti/tlan.c
> @@ -119,33 +119,20 @@ static struct board {
>   };
>   
>   static const struct pci_device_id tlan_pci_tbl[] = {
> -	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL10,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
> -	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
> -	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3I,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 },
> -	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_THUNDER,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 },
> -	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3B,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
> -	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100PI,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 },
> -	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100D,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6 },
> -	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100I,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7 },
> -	{ PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2183,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
> -	{ PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2325,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9 },
> -	{ PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2326,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10 },
> -	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_100_WS_5100,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11 },
> -	{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_T2,
> -	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12 },
> -	{ 0,}
> +	{ PCI_VDEVICE(COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL10), .driver_data = 0 },
> +	{ PCI_VDEVICE(COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100), .driver_data = 1 },
> +	{ PCI_VDEVICE(COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3I), .driver_data = 2 },
> +	{ PCI_VDEVICE(COMPAQ, PCI_DEVICE_ID_COMPAQ_THUNDER), .driver_data = 3 },
> +	{ PCI_VDEVICE(COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3B), .driver_data = 4 },
> +	{ PCI_VDEVICE(COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100PI), .driver_data = 5 },
> +	{ PCI_VDEVICE(COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100D), .driver_data = 6 },
> +	{ PCI_VDEVICE(COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100I), .driver_data = 7 },
> +	{ PCI_VDEVICE(OLICOM, PCI_DEVICE_ID_OLICOM_OC2183), .driver_data = 8 },
> +	{ PCI_VDEVICE(OLICOM, PCI_DEVICE_ID_OLICOM_OC2325), .driver_data = 9 },
> +	{ PCI_VDEVICE(OLICOM, PCI_DEVICE_ID_OLICOM_OC2326), .driver_data = 10 },
> +	{ PCI_VDEVICE(COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_100_WS_5100), .driver_data = 11 },
> +	{ PCI_VDEVICE(COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_T2), .driver_data = 12 },
> +	{ }
>   };
>   MODULE_DEVICE_TABLE(pci, tlan_pci_tbl);
>   
> diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
> index d8e3827a8b1f..d51d8db95a76 100644
> --- a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
> +++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
> @@ -30,20 +30,20 @@ char ngbe_driver_name[] = "ngbe";
>    *   Class, Class Mask, private data (not used) }
>    */
>   static const struct pci_device_id ngbe_pci_tbl[] = {
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860AL_W), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A2), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A2S), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A4), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A4S), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860AL2), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860AL2S), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860AL4), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860AL4S), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860LC), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A1), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A1L), 0},
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860AL_W) },
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A2) },
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A2S) },
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A4) },
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A4S) },
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860AL2) },
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860AL2S) },
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860AL4) },
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860AL4S) },
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860LC) },
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A1) },
> +	{ PCI_VDEVICE(WANGXUN, NGBE_DEV_ID_EM_WX1860A1L) },
>   	/* required last entry */
> -	{ .device = 0 }
> +	{ }
>   };
>   
>   /**
> diff --git a/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c b/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c
> index 6ef43adcc425..d79cf8d8484f 100644
> --- a/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c
> +++ b/drivers/net/ethernet/wangxun/ngbevf/ngbevf_main.c
> @@ -26,20 +26,20 @@
>    *   Class, Class Mask, private data (not used) }
>    */
>   static const struct pci_device_id ngbevf_pci_tbl[] = {
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL_W), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860A2), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860A2S), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860A4), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860A4S), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL2), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL2S), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL4), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL4S), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860NCSI), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860A1), 0},
> -	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL1), 0},
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL_W) },
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860A2) },
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860A2S) },
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860A4) },
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860A4S) },
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL2) },
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL2S) },
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL4) },
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL4S) },
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860NCSI) },
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860A1) },
> +	{ PCI_VDEVICE(WANGXUN, NGBEVF_DEV_ID_EM_WX1860AL1) },
>   	/* required last entry */
> -	{ .device = 0 }
> +	{ }
>   };
>   
>   static const struct net_device_ops ngbevf_netdev_ops = {
> diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
> index 8b7c3753bb6a..4c549c2644ab 100644
> --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
> +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
> @@ -37,16 +37,16 @@ char txgbe_driver_name[] = "txgbe";
>    *   Class, Class Mask, private data (not used) }
>    */
>   static const struct pci_device_id txgbe_pci_tbl[] = {
> -	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_SP1000), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_WX1820), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5010), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5110), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5025), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5125), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5040), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5140), 0},
> +	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_SP1000) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_WX1820) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5010) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5110) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5025) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5125) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5040) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_AML5140) },
>   	/* required last entry */
> -	{ .device = 0 }
> +	{ }
>   };
>   
>   #define DEFAULT_DEBUG_LEVEL_SHIFT 3
> diff --git a/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c b/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c
> index 37e4ec487afd..8b16b900820a 100644
> --- a/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c
> +++ b/drivers/net/ethernet/wangxun/txgbevf/txgbevf_main.c
> @@ -26,16 +26,16 @@
>    *   Class, Class Mask, private data (not used) }
>    */
>   static const struct pci_device_id txgbevf_pci_tbl[] = {
> -	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_SP1000), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_WX1820), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML500F), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML510F), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML5024), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML5124), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML503F), 0},
> -	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML513F), 0},
> +	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_SP1000) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_WX1820) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML500F) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML510F) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML5024) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML5124) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML503F) },
> +	{ PCI_VDEVICE(WANGXUN, TXGBEVF_DEV_ID_AML513F) },
>   	/* required last entry */
> -	{ .device = 0 }
> +	{ }
>   };
>   
>   static const struct net_device_ops txgbevf_netdev_ops = {
> diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
> index 73f393900710..6508c53bdc24 100644
> --- a/drivers/net/wan/farsync.c
> +++ b/drivers/net/wan/farsync.c
> @@ -524,27 +524,21 @@ do {								\
>   /*      PCI ID lookup table
>    */
>   static const struct pci_device_id fst_pci_dev_id[] = {
> -	{PCI_VENDOR_ID_FARSITE, PCI_DEVICE_ID_FARSITE_T2P, PCI_ANY_ID,
> -	 PCI_ANY_ID, 0, 0, FST_TYPE_T2P},
> +	{ PCI_VDEVICE(FARSITE, PCI_DEVICE_ID_FARSITE_T2P), .driver_data = FST_TYPE_T2P },
>   
> -	{PCI_VENDOR_ID_FARSITE, PCI_DEVICE_ID_FARSITE_T4P, PCI_ANY_ID,
> -	 PCI_ANY_ID, 0, 0, FST_TYPE_T4P},
> +	{ PCI_VDEVICE(FARSITE, PCI_DEVICE_ID_FARSITE_T4P), .driver_data = FST_TYPE_T4P },
>   
> -	{PCI_VENDOR_ID_FARSITE, PCI_DEVICE_ID_FARSITE_T1U, PCI_ANY_ID,
> -	 PCI_ANY_ID, 0, 0, FST_TYPE_T1U},
> +	{ PCI_VDEVICE(FARSITE, PCI_DEVICE_ID_FARSITE_T1U), .driver_data = FST_TYPE_T1U },
>   
> -	{PCI_VENDOR_ID_FARSITE, PCI_DEVICE_ID_FARSITE_T2U, PCI_ANY_ID,
> -	 PCI_ANY_ID, 0, 0, FST_TYPE_T2U},
> +	{ PCI_VDEVICE(FARSITE, PCI_DEVICE_ID_FARSITE_T2U), .driver_data = FST_TYPE_T2U },
>   
> -	{PCI_VENDOR_ID_FARSITE, PCI_DEVICE_ID_FARSITE_T4U, PCI_ANY_ID,
> -	 PCI_ANY_ID, 0, 0, FST_TYPE_T4U},
> +	{ PCI_VDEVICE(FARSITE, PCI_DEVICE_ID_FARSITE_T4U), .driver_data = FST_TYPE_T4U },
>   
> -	{PCI_VENDOR_ID_FARSITE, PCI_DEVICE_ID_FARSITE_TE1, PCI_ANY_ID,
> -	 PCI_ANY_ID, 0, 0, FST_TYPE_TE1},
> +	{ PCI_VDEVICE(FARSITE, PCI_DEVICE_ID_FARSITE_TE1), .driver_data = FST_TYPE_TE1 },
>   
> -	{PCI_VENDOR_ID_FARSITE, PCI_DEVICE_ID_FARSITE_TE1C, PCI_ANY_ID,
> -	 PCI_ANY_ID, 0, 0, FST_TYPE_TE1},
> -	{0,}			/* End */
> +	{ PCI_VDEVICE(FARSITE, PCI_DEVICE_ID_FARSITE_TE1C), .driver_data = FST_TYPE_TE1 },
> +
> +	{ }			/* End */
>   };
>   
>   MODULE_DEVICE_TABLE(pci, fst_pci_dev_id);
> diff --git a/drivers/net/wan/pc300too.c b/drivers/net/wan/pc300too.c
> index 7e57d289b62c..a91564e53caa 100644
> --- a/drivers/net/wan/pc300too.c
> +++ b/drivers/net/wan/pc300too.c
> @@ -461,15 +461,11 @@ static int pc300_pci_init_one(struct pci_dev *pdev,
>   }
>   
>   static const struct pci_device_id pc300_pci_tbl[] = {
> -	{ PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_PC300_RX_1, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, 0, 0 },
> -	{ PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_PC300_RX_2, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, 0, 0 },
> -	{ PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_PC300_TE_1, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, 0, 0 },
> -	{ PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_PC300_TE_2, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, 0, 0 },
> -	{ 0, }
> +	{ PCI_VDEVICE(CYCLADES, PCI_DEVICE_ID_PC300_RX_1) },
> +	{ PCI_VDEVICE(CYCLADES, PCI_DEVICE_ID_PC300_RX_2) },
> +	{ PCI_VDEVICE(CYCLADES, PCI_DEVICE_ID_PC300_TE_1) },
> +	{ PCI_VDEVICE(CYCLADES, PCI_DEVICE_ID_PC300_TE_2) },
> +	{ }
>   };
>   
>   static struct pci_driver pc300_pci_driver = {
> diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c
> index 89f4b4584a33..9503130fd9a8 100644
> --- a/drivers/net/wan/pci200syn.c
> +++ b/drivers/net/wan/pci200syn.c
> @@ -397,9 +397,9 @@ static int pci200_pci_init_one(struct pci_dev *pdev,
>   }
>   
>   static const struct pci_device_id pci200_pci_tbl[] = {
> -	{ PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, PCI_VENDOR_ID_PLX,
> -	  PCI_DEVICE_ID_PLX_PCI200SYN, 0, 0, 0 },
> -	{ 0, }
> +	{ PCI_VDEVICE_SUB(PLX, PCI_DEVICE_ID_PLX_9050,
> +			  PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_PCI200SYN) },
> +	{ }
>   };
>   
>   static struct pci_driver pci200_pci_driver = {
> diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c
> index 3f7707118450..d4da88c77112 100644
> --- a/drivers/net/wan/wanxl.c
> +++ b/drivers/net/wan/wanxl.c
> @@ -806,13 +806,10 @@ static int wanxl_pci_init_one(struct pci_dev *pdev,
>   }
>   
>   static const struct pci_device_id wanxl_pci_tbl[] = {
> -	{ PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_SBE_WANXL100, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, 0, 0 },
> -	{ PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_SBE_WANXL200, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, 0, 0 },
> -	{ PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_SBE_WANXL400, PCI_ANY_ID,
> -	  PCI_ANY_ID, 0, 0, 0 },
> -	{ 0, }
> +	{ PCI_VDEVICE(SBE, PCI_DEVICE_ID_SBE_WANXL100) },
> +	{ PCI_VDEVICE(SBE, PCI_DEVICE_ID_SBE_WANXL200) },
> +	{ PCI_VDEVICE(SBE, PCI_DEVICE_ID_SBE_WANXL400) },
> +	{ }
>   };
>   
>   static struct pci_driver wanxl_pci_driver = {
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> index 45b342ea0637..13662aa4b4ea 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> @@ -2708,17 +2708,18 @@ static const struct dev_pm_ops brcmf_pciedrvr_pm = {
>   
>   #define BRCMF_PCIE_DEVICE(dev_id, fw_vend) \
>   	{ \
> -		BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \
> -		PCI_ANY_ID, PCI_ANY_ID, \
> -		PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, \
> -		BRCMF_DRVDATA_ ## fw_vend \
> +		PCI_DEVICE(BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id)), \
> +		.class = PCI_CLASS_NETWORK_OTHER << 8, \
> +		.class_mask = 0xffff00, \
> +		.driver_data = BRCMF_DRVDATA_ ## fw_vend, \
>   	}
>   #define BRCMF_PCIE_DEVICE_SUB(dev_id, subvend, subdev, fw_vend) \
>   	{ \
> -		BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \
> -		(subvend), (subdev), \
> -		PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, \
> -		BRCMF_DRVDATA_ ## fw_vend \
> +		PCI_DEVICE_SUB(BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \
> +			       (subvend), (subdev)), \
> +		.class = PCI_CLASS_NETWORK_OTHER << 8, \
> +		.class_mask = 0xffff00, \
> +		.driver_data = BRCMF_DRVDATA_ ## fw_vend, \
>   	}
>   
>   static const struct pci_device_id brcmf_pcie_devid_table[] = {
> diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
> index dd64d21174e3..4bc9bb406e8e 100644
> --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
> +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
> @@ -11366,37 +11366,41 @@ static int ipw_wdev_init(struct net_device *dev)
>   
>   /* PCI driver stuff */
>   static const struct pci_device_id card_ids[] = {
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2701, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2702, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2711, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2712, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2721, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2722, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2731, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2732, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2741, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x103c, 0x2741, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2742, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2751, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2752, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2753, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2754, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2761, 0, 0, 0},
> -	{PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2762, 0, 0, 0},
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2701) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2702) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2711) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2712) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2721) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2722) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2731) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2732) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2741) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x103c, 0x2741) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2742) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2751) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2752) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2753) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2754) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2761) },
> +	{ PCI_VDEVICE_SUB(INTEL, 0x1043, 0x8086, 0x2762) },
> +
>   	/*
>   	 * This ID conflicts with i40e, but the devices can be differentiated
>   	 * because i40e devices use PCI_CLASS_NETWORK_ETHERNET and ipw2200
>   	 * devices use PCI_CLASS_NETWORK_OTHER.
>   	 */
> -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x104f),
> -		PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, 0},
> -	{PCI_VDEVICE(INTEL, 0x4220), 0},	/* BG */
> -	{PCI_VDEVICE(INTEL, 0x4221), 0},	/* BG */
> -	{PCI_VDEVICE(INTEL, 0x4223), 0},	/* ABG */
> -	{PCI_VDEVICE(INTEL, 0x4224), 0},	/* ABG */
> +	{
> +		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x104f),
> +		.class = PCI_CLASS_NETWORK_OTHER << 8,
> +		.class_mask = 0xffff00,
> +	},
> +	{ PCI_VDEVICE(INTEL, 0x4220) },	/* BG */
> +	{ PCI_VDEVICE(INTEL, 0x4221) },	/* BG */
> +	{ PCI_VDEVICE(INTEL, 0x4223) },	/* ABG */
> +	{ PCI_VDEVICE(INTEL, 0x4224) },	/* ABG */
>   
>   	/* required last entry */
> -	{0,}
> +	{ }
>   };
>   
>   MODULE_DEVICE_TABLE(pci, card_ids);
>
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731

^ permalink raw reply

* [PATCH] wifi: cfg80211: don't allow negative key_len values
From: Dan Carpenter @ 2026-04-30  6:15 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Johannes Berg, Raja Mani, Vasanthakumar Thiagarajan,
	Jouni Malinen, linux-wireless, linux-kernel, kernel-janitors

The ath6kl_cfg80211_add_key() function has an upper bounds check on
params->key_len which ensures that it can't go over WLAN_MAX_KEY_LEN but
it doesn't check for negatives.  This could potentially lead to memory
corruption.

Put a bounds check on negative values in cfg80211_validate_key_settings()
to prevent this sort of bug in the future.

Fixes: bdcd81707973 ("Add ath6kl cleaned up driver")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
This is from static analysis.  I can't think why a driver would ever
want a negative length and I think this is the safest solution.  But
I have not tested it.

 net/wireless/util.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/wireless/util.c b/net/wireless/util.c
index b78530c3e3f8..4552229eb2d2 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -397,6 +397,8 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev,
 		 * or not the driver supports this algorithm,
 		 * of course.
 		 */
+		if (params->key_len < 0)
+			return -EINVAL;
 		break;
 	}
 
-- 
2.53.0


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox