Skip to content

Commit c259ad1

Browse files
committed
Merge tag 'wireless-2023-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless
Kalle Valo says: ==================== wireless fixes for v6.4 A lot of fixes this time, for both the stack and the drivers. The brcmfmac resume fix has been reported by several people so I would say it's the most important here. The iwlwifi RFI workaround is also something which was reported as a regression recently. * tag 'wireless-2023-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: (31 commits) wifi: b43: fix incorrect __packed annotation wifi: rtw88: sdio: Always use two consecutive bytes for word operations mac80211_hwsim: fix memory leak in hwsim_new_radio_nl wifi: iwlwifi: mvm: Add locking to the rate read flow wifi: iwlwifi: Don't use valid_links to iterate sta links wifi: iwlwifi: mvm: don't trust firmware n_channels wifi: iwlwifi: mvm: fix OEM's name in the tas approved list wifi: iwlwifi: fix OEM's name in the ppag approved list wifi: iwlwifi: mvm: fix initialization of a return value wifi: iwlwifi: mvm: fix access to fw_id_to_mac_id wifi: iwlwifi: fw: fix DBGI dump wifi: iwlwifi: mvm: fix number of concurrent link checks wifi: iwlwifi: mvm: fix cancel_delayed_work_sync() deadlock wifi: iwlwifi: mvm: don't double-init spinlock wifi: iwlwifi: mvm: always free dup_data wifi: mac80211: recalc chanctx mindef before assigning wifi: mac80211: consider reserved chanctx for mindef wifi: mac80211: simplify chanctx allocation wifi: mac80211: Abort running color change when stopping the AP wifi: mac80211: fix min center freq offset tracing ... ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents bfa00d8 + 212457c commit c259ad1

File tree

41 files changed

+249
-136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+249
-136
lines changed

drivers/net/wireless/broadcom/b43/b43.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ struct b43_iv {
651651
union {
652652
__be16 d16;
653653
__be32 d32;
654-
} data __packed;
654+
} __packed data;
655655
} __packed;
656656

657657

drivers/net/wireless/broadcom/b43legacy/b43legacy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ struct b43legacy_iv {
379379
union {
380380
__be16 d16;
381381
__be32 d32;
382-
} data __packed;
382+
} __packed data;
383383
} __packed;
384384

385385
#define B43legacy_PHYMODE(phytype) (1 << (phytype))

drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,11 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
10391039
struct brcmf_sdio_dev *sdiodev;
10401040
struct brcmf_bus *bus_if;
10411041

1042+
if (!id) {
1043+
dev_err(&func->dev, "Error no sdio_device_id passed for %x:%x\n", func->vendor, func->device);
1044+
return -ENODEV;
1045+
}
1046+
10421047
brcmf_dbg(SDIO, "Enter\n");
10431048
brcmf_dbg(SDIO, "Class=%x\n", func->class);
10441049
brcmf_dbg(SDIO, "sdio vendor ID: 0x%04x\n", func->vendor);

drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,6 +2394,9 @@ static void brcmf_pcie_debugfs_create(struct device *dev)
23942394
}
23952395
#endif
23962396

2397+
/* Forward declaration for pci_match_id() call */
2398+
static const struct pci_device_id brcmf_pcie_devid_table[];
2399+
23972400
static int
23982401
brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
23992402
{
@@ -2404,6 +2407,14 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
24042407
struct brcmf_core *core;
24052408
struct brcmf_bus *bus;
24062409

2410+
if (!id) {
2411+
id = pci_match_id(brcmf_pcie_devid_table, pdev);
2412+
if (!id) {
2413+
pci_err(pdev, "Error could not find pci_device_id for %x:%x\n", pdev->vendor, pdev->device);
2414+
return -ENODEV;
2415+
}
2416+
}
2417+
24072418
brcmf_dbg(PCIE, "Enter %x:%x\n", pdev->vendor, pdev->device);
24082419

24092420
ret = -ENOMEM;

drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,9 @@ brcmf_usb_disconnect_cb(struct brcmf_usbdev_info *devinfo)
13311331
brcmf_usb_detach(devinfo);
13321332
}
13331333

1334+
/* Forward declaration for usb_match_id() call */
1335+
static const struct usb_device_id brcmf_usb_devid_table[];
1336+
13341337
static int
13351338
brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
13361339
{
@@ -1342,6 +1345,14 @@ brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
13421345
u32 num_of_eps;
13431346
u8 endpoint_num, ep;
13441347

1348+
if (!id) {
1349+
id = usb_match_id(intf, brcmf_usb_devid_table);
1350+
if (!id) {
1351+
dev_err(&intf->dev, "Error could not find matching usb_device_id\n");
1352+
return -ENODEV;
1353+
}
1354+
}
1355+
13451356
brcmf_dbg(USB, "Enter 0x%04x:0x%04x\n", id->idVendor, id->idProduct);
13461357

13471358
devinfo = kzalloc(sizeof(*devinfo), GFP_ATOMIC);

drivers/net/wireless/intel/iwlwifi/fw/acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static const struct dmi_system_id dmi_ppag_approved_list[] = {
3838
},
3939
{ .ident = "ASUS",
4040
.matches = {
41-
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTek COMPUTER INC."),
41+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
4242
},
4343
},
4444
{}

drivers/net/wireless/intel/iwlwifi/fw/dbg.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,14 +1664,10 @@ static __le32 iwl_get_mon_reg(struct iwl_fw_runtime *fwrt, u32 alloc_id,
16641664
}
16651665

16661666
static void *
1667-
iwl_dump_ini_mon_fill_header(struct iwl_fw_runtime *fwrt,
1668-
struct iwl_dump_ini_region_data *reg_data,
1667+
iwl_dump_ini_mon_fill_header(struct iwl_fw_runtime *fwrt, u32 alloc_id,
16691668
struct iwl_fw_ini_monitor_dump *data,
16701669
const struct iwl_fw_mon_regs *addrs)
16711670
{
1672-
struct iwl_fw_ini_region_tlv *reg = (void *)reg_data->reg_tlv->data;
1673-
u32 alloc_id = le32_to_cpu(reg->dram_alloc_id);
1674-
16751671
if (!iwl_trans_grab_nic_access(fwrt->trans)) {
16761672
IWL_ERR(fwrt, "Failed to get monitor header\n");
16771673
return NULL;
@@ -1702,8 +1698,10 @@ iwl_dump_ini_mon_dram_fill_header(struct iwl_fw_runtime *fwrt,
17021698
void *data, u32 data_len)
17031699
{
17041700
struct iwl_fw_ini_monitor_dump *mon_dump = (void *)data;
1701+
struct iwl_fw_ini_region_tlv *reg = (void *)reg_data->reg_tlv->data;
1702+
u32 alloc_id = le32_to_cpu(reg->dram_alloc_id);
17051703

1706-
return iwl_dump_ini_mon_fill_header(fwrt, reg_data, mon_dump,
1704+
return iwl_dump_ini_mon_fill_header(fwrt, alloc_id, mon_dump,
17071705
&fwrt->trans->cfg->mon_dram_regs);
17081706
}
17091707

@@ -1713,8 +1711,10 @@ iwl_dump_ini_mon_smem_fill_header(struct iwl_fw_runtime *fwrt,
17131711
void *data, u32 data_len)
17141712
{
17151713
struct iwl_fw_ini_monitor_dump *mon_dump = (void *)data;
1714+
struct iwl_fw_ini_region_tlv *reg = (void *)reg_data->reg_tlv->data;
1715+
u32 alloc_id = le32_to_cpu(reg->internal_buffer.alloc_id);
17161716

1717-
return iwl_dump_ini_mon_fill_header(fwrt, reg_data, mon_dump,
1717+
return iwl_dump_ini_mon_fill_header(fwrt, alloc_id, mon_dump,
17181718
&fwrt->trans->cfg->mon_smem_regs);
17191719
}
17201720

@@ -1725,7 +1725,10 @@ iwl_dump_ini_mon_dbgi_fill_header(struct iwl_fw_runtime *fwrt,
17251725
{
17261726
struct iwl_fw_ini_monitor_dump *mon_dump = (void *)data;
17271727

1728-
return iwl_dump_ini_mon_fill_header(fwrt, reg_data, mon_dump,
1728+
return iwl_dump_ini_mon_fill_header(fwrt,
1729+
/* no offset calculation later */
1730+
IWL_FW_INI_ALLOCATION_ID_DBGC1,
1731+
mon_dump,
17291732
&fwrt->trans->cfg->mon_dbgi_regs);
17301733
}
17311734

drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,11 @@ iwl_mvm_ftm_put_target(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
526526
rcu_read_lock();
527527

528528
sta = rcu_dereference(mvm->fw_id_to_mac_id[mvmvif->deflink.ap_sta_id]);
529+
if (WARN_ON_ONCE(IS_ERR_OR_NULL(sta))) {
530+
rcu_read_unlock();
531+
return PTR_ERR_OR_ZERO(sta);
532+
}
533+
529534
if (sta->mfp && (peer->ftm.trigger_based || peer->ftm.non_trigger_based))
530535
FTM_PUT_FLAG(PMF);
531536

drivers/net/wireless/intel/iwlwifi/mvm/fw.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ static const struct dmi_system_id dmi_tas_approved_list[] = {
10911091
},
10921092
{ .ident = "LENOVO",
10931093
.matches = {
1094-
DMI_MATCH(DMI_SYS_VENDOR, "Lenovo"),
1094+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
10951095
},
10961096
},
10971097
{ .ident = "DELL",
@@ -1727,8 +1727,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
17271727
iwl_mvm_tas_init(mvm);
17281728
iwl_mvm_leds_sync(mvm);
17291729

1730-
if (fw_has_capa(&mvm->fw->ucode_capa,
1731-
IWL_UCODE_TLV_CAPA_RFIM_SUPPORT)) {
1730+
if (iwl_rfi_supported(mvm)) {
17321731
if (iwl_mvm_eval_dsm_rfi(mvm) == DSM_VALUE_RFI_ENABLE)
17331732
iwl_rfi_send_config_cmd(mvm, NULL);
17341733
}

drivers/net/wireless/intel/iwlwifi/mvm/link.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,13 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
123123
if (mvmvif->link[i]->phy_ctxt)
124124
count++;
125125

126-
/* FIXME: IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM should be
127-
* defined per HW
128-
*/
129-
if (count >= IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM)
130-
return -EINVAL;
126+
if (vif->type == NL80211_IFTYPE_AP) {
127+
if (count > mvm->fw->ucode_capa.num_beacons)
128+
return -EOPNOTSUPP;
129+
/* this should be per HW or such */
130+
} else if (count >= IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM) {
131+
return -EOPNOTSUPP;
132+
}
131133
}
132134

133135
/* Catch early if driver tries to activate or deactivate a link

0 commit comments

Comments
 (0)