Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'ath-current-20240531' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath

Merge ath-current from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git

ath.git fixes for 6.10. Two fixes for user reported regressions in
ath11k. One dependency fix and one error path fix.

+44 -22
+1
drivers/net/wireless/ath/ath10k/Kconfig
··· 45 45 depends on ATH10K 46 46 depends on ARCH_QCOM || COMPILE_TEST 47 47 depends on QCOM_SMEM 48 + depends on QCOM_RPROC_COMMON || QCOM_RPROC_COMMON=n 48 49 select QCOM_SCM 49 50 select QCOM_QMI_HELPERS 50 51 help
+1 -1
drivers/net/wireless/ath/ath11k/core.c
··· 604 604 .coldboot_cal_ftm = true, 605 605 .cbcal_restart_fw = false, 606 606 .fw_mem_mode = 0, 607 - .num_vdevs = 16 + 1, 607 + .num_vdevs = 3, 608 608 .num_peers = 512, 609 609 .supports_suspend = false, 610 610 .hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074),
+25 -13
drivers/net/wireless/ath/ath11k/mac.c
··· 7988 7988 struct ath11k_base *ab = ar->ab; 7989 7989 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); 7990 7990 int ret; 7991 - struct cur_regulatory_info *reg_info; 7992 - enum ieee80211_ap_reg_power power_type; 7993 7991 7994 7992 mutex_lock(&ar->conf_mutex); 7995 7993 ··· 7998 8000 if (ath11k_wmi_supports_6ghz_cc_ext(ar) && 7999 8001 ctx->def.chan->band == NL80211_BAND_6GHZ && 8000 8002 arvif->vdev_type == WMI_VDEV_TYPE_STA) { 8001 - reg_info = &ab->reg_info_store[ar->pdev_idx]; 8002 - power_type = vif->bss_conf.power_type; 8003 - 8004 - ath11k_dbg(ab, ATH11K_DBG_MAC, "chanctx power type %d\n", power_type); 8005 - 8006 - if (power_type == IEEE80211_REG_UNSET_AP) { 8007 - ret = -EINVAL; 8008 - goto out; 8009 - } 8010 - 8011 - ath11k_reg_handle_chan_list(ab, reg_info, power_type); 8012 8003 arvif->chanctx = *ctx; 8013 8004 ath11k_mac_parse_tx_pwr_env(ar, vif, ctx); 8014 8005 } ··· 9613 9626 struct ath11k *ar = hw->priv; 9614 9627 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); 9615 9628 struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta); 9629 + enum ieee80211_ap_reg_power power_type; 9630 + struct cur_regulatory_info *reg_info; 9616 9631 struct ath11k_peer *peer; 9617 9632 int ret = 0; 9618 9633 ··· 9693 9704 if (ret) 9694 9705 ath11k_warn(ar->ab, "Unable to authorize peer %pM vdev %d: %d\n", 9695 9706 sta->addr, arvif->vdev_id, ret); 9707 + } 9708 + 9709 + if (!ret && 9710 + ath11k_wmi_supports_6ghz_cc_ext(ar) && 9711 + arvif->vdev_type == WMI_VDEV_TYPE_STA && 9712 + arvif->chanctx.def.chan && 9713 + arvif->chanctx.def.chan->band == NL80211_BAND_6GHZ) { 9714 + reg_info = &ar->ab->reg_info_store[ar->pdev_idx]; 9715 + power_type = vif->bss_conf.power_type; 9716 + 9717 + if (power_type == IEEE80211_REG_UNSET_AP) { 9718 + ath11k_warn(ar->ab, "invalid power type %d\n", 9719 + power_type); 9720 + ret = -EINVAL; 9721 + } else { 9722 + ret = ath11k_reg_handle_chan_list(ar->ab, 9723 + reg_info, 9724 + power_type); 9725 + if (ret) 9726 + ath11k_warn(ar->ab, 9727 + "failed to handle chan list with power type %d\n", 9728 + power_type); 9729 + } 9696 9730 } 9697 9731 } else if (old_state == IEEE80211_STA_AUTHORIZED && 9698 9732 new_state == IEEE80211_STA_ASSOC) {
+17 -8
drivers/net/wireless/ath/ath11k/pcic.c
··· 561 561 { 562 562 int i, j, n, ret, num_vectors = 0; 563 563 u32 user_base_data = 0, base_vector = 0; 564 + struct ath11k_ext_irq_grp *irq_grp; 564 565 unsigned long irq_flags; 565 566 566 567 ret = ath11k_pcic_get_user_msi_assignment(ab, "DP", &num_vectors, ··· 575 574 irq_flags |= IRQF_NOBALANCING; 576 575 577 576 for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) { 578 - struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; 577 + irq_grp = &ab->ext_irq_grp[i]; 579 578 u32 num_irq = 0; 580 579 581 580 irq_grp->ab = ab; 582 581 irq_grp->grp_id = i; 583 582 irq_grp->napi_ndev = alloc_netdev_dummy(0); 584 - if (!irq_grp->napi_ndev) 585 - return -ENOMEM; 583 + if (!irq_grp->napi_ndev) { 584 + ret = -ENOMEM; 585 + goto fail_allocate; 586 + } 586 587 587 588 netif_napi_add(irq_grp->napi_ndev, &irq_grp->napi, 588 589 ath11k_pcic_ext_grp_napi_poll); ··· 609 606 int irq = ath11k_pcic_get_msi_irq(ab, vector); 610 607 611 608 if (irq < 0) { 612 - for (n = 0; n <= i; n++) { 613 - irq_grp = &ab->ext_irq_grp[n]; 614 - free_netdev(irq_grp->napi_ndev); 615 - } 616 - return irq; 609 + ret = irq; 610 + goto fail_irq; 617 611 } 618 612 619 613 ab->irq_num[irq_idx] = irq; ··· 635 635 } 636 636 637 637 return 0; 638 + fail_irq: 639 + /* i ->napi_ndev was properly allocated. Free it also */ 640 + i += 1; 641 + fail_allocate: 642 + for (n = 0; n < i; n++) { 643 + irq_grp = &ab->ext_irq_grp[n]; 644 + free_netdev(irq_grp->napi_ndev); 645 + } 646 + return ret; 638 647 } 639 648 640 649 int ath11k_pcic_config_irq(struct ath11k_base *ab)