struct rtw89_dev *rtw89_alloc_ieee80211_hw(struct device *device,
u32 bus_data_size,
- const struct rtw89_chip_info *chip,
- const struct rtw89_chip_variant *variant)
+ const struct rtw89_driver_info *info)
{
+ const unsigned long *dev_id_quirks = &info->dev_id_quirks;
+ const struct rtw89_chip_variant *variant = info->variant;
+ const struct rtw89_chip_info *chip = info->chip;
struct rtw89_fw_info early_fw = {};
const struct firmware *firmware;
struct ieee80211_hw *hw;
rtwdev->fw.fw_format = fw_format;
rtwdev->support_mlo = support_mlo;
+ bitmap_or(rtwdev->quirks, rtwdev->quirks, dev_id_quirks,
+ NUM_OF_RTW89_QUIRKS);
+
rtw89_debug(rtwdev, RTW89_DBG_CHAN, "probe driver %s chanctx\n",
no_chanctx ? "without" : "with");
rtw89_debug(rtwdev, RTW89_DBG_CHAN, "probe driver %s MLO cap\n",
const struct rtw89_chip_info *chip;
const struct rtw89_chip_variant *variant;
const struct dmi_system_id *quirks;
+ unsigned long dev_id_quirks; /* bitmap of rtw89_quirks */
union rtw89_bus_info bus;
};
void rtw89_core_unregister(struct rtw89_dev *rtwdev);
struct rtw89_dev *rtw89_alloc_ieee80211_hw(struct device *device,
u32 bus_data_size,
- const struct rtw89_chip_info *chip,
- const struct rtw89_chip_variant *variant);
+ const struct rtw89_driver_info *info);
void rtw89_free_ieee80211_hw(struct rtw89_dev *rtwdev);
u8 rtw89_acquire_mac_id(struct rtw89_dev *rtwdev);
void rtw89_release_mac_id(struct rtw89_dev *rtwdev, u8 mac_id);
info = (const struct rtw89_driver_info *)id->driver_data;
rtwdev = rtw89_alloc_ieee80211_hw(&pdev->dev,
- sizeof(struct rtw89_pci),
- info->chip, info->variant);
+ sizeof(struct rtw89_pci), info);
if (!rtwdev) {
dev_err(&pdev->dev, "failed to allocate hw\n");
return -ENOMEM;
.chip = &rtw8851b_chip_info,
.variant = NULL,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.pci = &rtw8851b_pci_info,
},
.chip = &rtw8851b_chip_info,
.variant = NULL,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.usb = &rtw8851b_usb_info,
}
.chip = &rtw8852a_chip_info,
.variant = NULL,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.pci = &rtw8852a_pci_info,
},
.chip = &rtw8852a_chip_info,
.variant = NULL,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.usb = &rtw8852a_usb_info,
}
.chip = &rtw8852b_chip_info,
.variant = NULL,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.pci = &rtw8852b_pci_info,
},
.chip = &rtw8852bt_chip_info,
.variant = NULL,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.pci = &rtw8852bt_pci_info,
},
.chip = &rtw8852b_chip_info,
.variant = NULL,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.usb = &rtw8852b_usb_info,
}
.chip = &rtw8852c_chip_info,
.variant = NULL,
.quirks = rtw8852c_pci_quirks,
+ .dev_id_quirks = 0,
.bus = {
.pci = &rtw8852c_pci_info,
},
.chip = &rtw8852c_chip_info,
.variant = NULL,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.usb = &rtw8852c_usb_info,
},
.chip = &rtw8922a_chip_info,
.variant = NULL,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.pci = &rtw8922a_pci_info,
},
.chip = &rtw8922a_chip_info,
.variant = &rtw8922ae_vs_variant,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.pci = &rtw8922a_pci_info,
},
.chip = &rtw8922a_chip_info,
.variant = NULL,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.usb = &rtw8922a_usb_info,
},
.chip = &rtw8922d_chip_info,
.variant = &rtw8922de_vs_variant,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.pci = &rtw8922d_pci_info,
},
.chip = &rtw8922d_chip_info,
.variant = NULL,
.quirks = NULL,
+ .dev_id_quirks = 0,
.bus = {
.pci = &rtw8922d_pci_info,
},
info = (const struct rtw89_driver_info *)id->driver_info;
rtwdev = rtw89_alloc_ieee80211_hw(&intf->dev,
- sizeof(struct rtw89_usb),
- info->chip, info->variant);
+ sizeof(struct rtw89_usb), info);
if (!rtwdev) {
dev_err(&intf->dev, "failed to allocate hw\n");
return -ENOMEM;