mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
Notable changes this time around:
MAINTAINERS * add missing driver git trees ath11k * factory test mode support iwlwifi * config rework to drop test devices and split the different families * major update for new firmware and MLO stack * initial multi-link reconfiguration suppor * multi-BSSID and MLO improvements other * fix the last few W=1 warnings from GCC 13 * merged wireless tree to avoid conflicts -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEpeA8sTs3M8SN2hR410qiO8sPaAAFAmSUmQwACgkQ10qiO8sP aAB2DQ//ZuU93rYpch/NGQcl8dmcOH7SeSo2CMU8niBMkQxn2O4oz/05L2EFjRsx xqF8GQoVCOK4UWsJ4luEJzqTn7ZTvzkfpy77YHMRStTx0jbQqC+5SPp1pKU7TNAE jjMngYVIi3ZDCwqe44bw79+ybyMySf9vSjPVgLDtX00WdUWvectw2wcrR1vrKwq1 DbIwuwe8Nn0Qn3BGyJAP4iaYi9wxi+c+tS2VY+7bP+0sZEYemZP4rEQ/LPKn8zl3 +IDv9VwR1ns6d+2+3pvf6ihtZilrHuNRtEYbaBA0TdG4M00tPEsS+YUjwFEmeieJ E/wM+lR4/LIHC3rsY6Cwl8TyvdjLka3HqpytHWGCXF0wicjia1UtTkzlJDiM9esi ptnb1d26o2SGOPONOlMyKt8NooccAt3MIlYq25teshDr1P4tXD92j7oNVk7RhwAM XYzBDGDQYJsAMo/tqzkbOQeUS1ojpsftGf2sQy5qYGRrHZCMquJApwKP1IfbEsF8 FR3/gZxLKdZfr06rWZJccH4Y7gnGm+EEmPBnREPdm6ABR/Rvm0orhJZSrhNY7IdB bgvnwn5CWyrYXjkywcqMBzZRWPD0vZLLbPuRkneuOMmroA1oCjFzbj06/7UT6jpe gZPPelIq1GvRHguCI+8jRgxlCiBOI5+GT6FY+9YTLAOFYBY1AZI= =KSBu -----END PGP SIGNATURE----- Merge tag 'wireless-next-2023-06-22' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Johannes Berg says: ==================== Notable changes this time around: MAINTAINERS - add missing driver git trees ath11k - factory test mode support iwlwifi - config rework to drop test devices and split the different families - major update for new firmware and MLO stack - initial multi-link reconfiguration suppor - multi-BSSID and MLO improvements other - fix the last few W=1 warnings from GCC 13 - merged wireless tree to avoid conflicts * tag 'wireless-next-2023-06-22' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (245 commits) wifi: ieee80211: fix erroneous NSTR bitmap size checks wifi: rtlwifi: cleanup USB interface wifi: rtlwifi: simplify LED management wifi: ath10k: improve structure padding wifi: ath9k: convert msecs to jiffies where needed wifi: iwlwifi: mvm: Add support for IGTK in D3 resume flow wifi: iwlwifi: mvm: update two most recent GTKs on D3 resume flow wifi: iwlwifi: mvm: Refactor security key update after D3 wifi: mac80211: mark keys as uploaded when added by the driver wifi: iwlwifi: remove support of A0 version of FM RF wifi: iwlwifi: cfg: clean up Bz module firmware lines wifi: iwlwifi: pcie: add device id 51F1 for killer 1675 wifi: iwlwifi: bump FW API to 83 for AX/BZ/SC devices wifi: iwlwifi: cfg: remove trailing dash from FW_PRE constants wifi: iwlwifi: also unify Ma device configurations wifi: iwlwifi: also unify Sc device configurations wifi: iwlwifi: unify Bz/Gl device configurations wifi: iwlwifi: pcie: also drop jacket from info macro wifi: iwlwifi: remove support for *nJ devices wifi: iwlwifi: don't load old firmware for 22000 ... ==================== Link: https://lore.kernel.org/r/20230622185602.147650-2-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
e6988447c1
@ -84,6 +84,8 @@ properties:
|
||||
required:
|
||||
- iommus
|
||||
|
||||
ieee80211-freq-limit: true
|
||||
|
||||
qcom,ath10k-calibration-data:
|
||||
$ref: /schemas/types.yaml#/definitions/uint8-array
|
||||
description:
|
||||
@ -164,6 +166,7 @@ required:
|
||||
additionalProperties: false
|
||||
|
||||
allOf:
|
||||
- $ref: ieee80211.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
@ -355,4 +358,5 @@ examples:
|
||||
"msi14",
|
||||
"msi15",
|
||||
"legacy";
|
||||
ieee80211-freq-limit = <5470000 5875000>;
|
||||
};
|
||||
|
@ -13224,6 +13224,7 @@ R: Shayne Chen <shayne.chen@mediatek.com>
|
||||
R: Sean Wang <sean.wang@mediatek.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git https://github.com/nbd168/wireless
|
||||
F: Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
|
||||
F: drivers/net/wireless/mediatek/mt76/
|
||||
|
||||
@ -17375,6 +17376,8 @@ QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
|
||||
M: Kalle Valo <kvalo@kernel.org>
|
||||
L: ath11k@lists.infradead.org
|
||||
S: Supported
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k
|
||||
B: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k/bugreport
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
F: Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
|
||||
F: drivers/net/wireless/ath/ath11k/
|
||||
@ -17384,6 +17387,7 @@ M: Toke Høiland-Jørgensen <toke@toke.dk>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
|
||||
F: Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
|
||||
F: drivers/net/wireless/ath/ath9k/
|
||||
|
||||
|
@ -27,7 +27,7 @@ MODULE_DEVICE_TABLE(of, ath10k_ahb_of_match);
|
||||
|
||||
static inline struct ath10k_ahb *ath10k_ahb_priv(struct ath10k *ar)
|
||||
{
|
||||
return &((struct ath10k_pci *)ar->drv_priv)->ahb[0];
|
||||
return &ath10k_pci_priv(ar)->ahb[0];
|
||||
}
|
||||
|
||||
static void ath10k_ahb_write32(struct ath10k *ar, u32 offset, u32 value)
|
||||
@ -816,23 +816,13 @@ err_resource_deinit:
|
||||
|
||||
err_core_destroy:
|
||||
ath10k_core_destroy(ar);
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ath10k_ahb_remove(struct platform_device *pdev)
|
||||
static void ath10k_ahb_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ath10k *ar = platform_get_drvdata(pdev);
|
||||
struct ath10k_ahb *ar_ahb;
|
||||
|
||||
if (!ar)
|
||||
return -EINVAL;
|
||||
|
||||
ar_ahb = ath10k_ahb_priv(ar);
|
||||
|
||||
if (!ar_ahb)
|
||||
return -EINVAL;
|
||||
|
||||
ath10k_dbg(ar, ATH10K_DBG_AHB, "ahb remove\n");
|
||||
|
||||
@ -844,10 +834,6 @@ static int ath10k_ahb_remove(struct platform_device *pdev)
|
||||
ath10k_ahb_clock_disable(ar);
|
||||
ath10k_ahb_resource_deinit(ar);
|
||||
ath10k_core_destroy(ar);
|
||||
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver ath10k_ahb_driver = {
|
||||
@ -856,7 +842,7 @@ static struct platform_driver ath10k_ahb_driver = {
|
||||
.of_match_table = ath10k_ahb_of_match,
|
||||
},
|
||||
.probe = ath10k_ahb_probe,
|
||||
.remove = ath10k_ahb_remove,
|
||||
.remove_new = ath10k_ahb_remove,
|
||||
};
|
||||
|
||||
int ath10k_ahb_init(void)
|
||||
|
@ -2504,7 +2504,6 @@ EXPORT_SYMBOL(ath10k_core_napi_sync_disable);
|
||||
static void ath10k_core_restart(struct work_struct *work)
|
||||
{
|
||||
struct ath10k *ar = container_of(work, struct ath10k, restart_work);
|
||||
struct ath10k_vif *arvif;
|
||||
int ret;
|
||||
|
||||
set_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags);
|
||||
@ -2543,14 +2542,6 @@ static void ath10k_core_restart(struct work_struct *work)
|
||||
ar->state = ATH10K_STATE_RESTARTING;
|
||||
ath10k_halt(ar);
|
||||
ath10k_scan_finish(ar);
|
||||
if (ar->hw_params.hw_restart_disconnect) {
|
||||
list_for_each_entry(arvif, &ar->arvifs, list) {
|
||||
if (arvif->is_up &&
|
||||
arvif->vdev_type == WMI_VDEV_TYPE_STA)
|
||||
ieee80211_hw_restart_disconnect(arvif->vif);
|
||||
}
|
||||
}
|
||||
|
||||
ieee80211_restart_hw(ar->hw);
|
||||
break;
|
||||
case ATH10K_STATE_OFF:
|
||||
|
@ -707,7 +707,7 @@ struct htt_rx_indication_prefix {
|
||||
__le16 fw_rx_desc_bytes;
|
||||
u8 pad0;
|
||||
u8 pad1;
|
||||
};
|
||||
} __packed;
|
||||
|
||||
struct htt_rx_indication {
|
||||
struct htt_rx_indication_hdr hdr;
|
||||
@ -1565,7 +1565,7 @@ struct htt_tx_fetch_ind {
|
||||
/* ath10k_htt_get_tx_fetch_ind_resp_ids() */
|
||||
DECLARE_FLEX_ARRAY(__le32, resp_ids);
|
||||
DECLARE_FLEX_ARRAY(struct htt_tx_fetch_record, records);
|
||||
};
|
||||
} __packed;
|
||||
} __packed;
|
||||
|
||||
static inline void *
|
||||
@ -1723,7 +1723,7 @@ struct htt_resp {
|
||||
struct htt_tx_mode_switch_ind tx_mode_switch_ind;
|
||||
struct htt_channel_change chan_change;
|
||||
struct htt_peer_tx_stats peer_tx_stats;
|
||||
};
|
||||
} __packed;
|
||||
} __packed;
|
||||
|
||||
/*** host side structures follow ***/
|
||||
|
@ -8109,6 +8109,7 @@ static void ath10k_reconfig_complete(struct ieee80211_hw *hw,
|
||||
enum ieee80211_reconfig_type reconfig_type)
|
||||
{
|
||||
struct ath10k *ar = hw->priv;
|
||||
struct ath10k_vif *arvif;
|
||||
|
||||
if (reconfig_type != IEEE80211_RECONFIG_TYPE_RESTART)
|
||||
return;
|
||||
@ -8123,6 +8124,12 @@ static void ath10k_reconfig_complete(struct ieee80211_hw *hw,
|
||||
ar->state = ATH10K_STATE_ON;
|
||||
ieee80211_wake_queues(ar->hw);
|
||||
clear_bit(ATH10K_FLAG_RESTARTING, &ar->dev_flags);
|
||||
if (ar->hw_params.hw_restart_disconnect) {
|
||||
list_for_each_entry(arvif, &ar->arvifs, list) {
|
||||
if (arvif->is_up && arvif->vdev_type == WMI_VDEV_TYPE_STA)
|
||||
ieee80211_hw_restart_disconnect(arvif->vif);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
|
@ -1848,7 +1848,7 @@ static int ath10k_snoc_free_resources(struct ath10k *ar)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ath10k_snoc_remove(struct platform_device *pdev)
|
||||
static void ath10k_snoc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ath10k *ar = platform_get_drvdata(pdev);
|
||||
struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
|
||||
@ -1861,8 +1861,6 @@ static int ath10k_snoc_remove(struct platform_device *pdev)
|
||||
wait_for_completion_timeout(&ar->driver_recovery, 3 * HZ);
|
||||
|
||||
ath10k_snoc_free_resources(ar);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ath10k_snoc_shutdown(struct platform_device *pdev)
|
||||
@ -1875,8 +1873,8 @@ static void ath10k_snoc_shutdown(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver ath10k_snoc_driver = {
|
||||
.probe = ath10k_snoc_probe,
|
||||
.remove = ath10k_snoc_remove,
|
||||
.shutdown = ath10k_snoc_shutdown,
|
||||
.remove_new = ath10k_snoc_remove,
|
||||
.shutdown = ath10k_snoc_shutdown,
|
||||
.driver = {
|
||||
.name = "ath10k_snoc",
|
||||
.of_match_table = ath10k_snoc_dt_match,
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@ -734,7 +734,7 @@ static int ath11k_ahb_hif_suspend(struct ath11k_base *ab)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_AHB, "ahb device suspended\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_AHB, "device suspended\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -777,7 +777,7 @@ static int ath11k_ahb_hif_resume(struct ath11k_base *ab)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_AHB, "ahb device resumed\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_AHB, "device resumed\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1127,6 +1127,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
|
||||
switch (hw_rev) {
|
||||
case ATH11K_HW_IPQ8074:
|
||||
case ATH11K_HW_IPQ6018_HW10:
|
||||
case ATH11K_HW_IPQ5018_HW10:
|
||||
hif_ops = &ath11k_ahb_hif_ops_ipq8074;
|
||||
pci_ops = NULL;
|
||||
break;
|
||||
@ -1155,6 +1156,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
|
||||
ab->hif.ops = hif_ops;
|
||||
ab->pdev = pdev;
|
||||
ab->hw_rev = hw_rev;
|
||||
ab->fw_mode = ATH11K_FIRMWARE_MODE_NORMAL;
|
||||
platform_set_drvdata(pdev, ab);
|
||||
|
||||
ret = ath11k_pcic_register_pci_ops(ab, pci_ops);
|
||||
|
@ -442,7 +442,7 @@ static void ath11k_ce_recv_process_cb(struct ath11k_ce_pipe *pipe)
|
||||
}
|
||||
|
||||
while ((skb = __skb_dequeue(&list))) {
|
||||
ath11k_dbg(ab, ATH11K_DBG_AHB, "rx ce pipe %d len %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_CE, "rx ce pipe %d len %d\n",
|
||||
pipe->pipe_num, skb->len);
|
||||
pipe->recv_cb(ab, skb);
|
||||
}
|
||||
@ -520,7 +520,7 @@ static void ath11k_ce_tx_process_cb(struct ath11k_ce_pipe *pipe)
|
||||
}
|
||||
|
||||
while ((skb = __skb_dequeue(&list))) {
|
||||
ath11k_dbg(ab, ATH11K_DBG_AHB, "tx ce pipe %d len %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_CE, "tx ce pipe %d len %d\n",
|
||||
pipe->pipe_num, skb->len);
|
||||
pipe->send_cb(ab, skb);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@ -32,6 +32,10 @@ module_param_named(frame_mode, ath11k_frame_mode, uint, 0644);
|
||||
MODULE_PARM_DESC(frame_mode,
|
||||
"Datapath frame mode (0: raw, 1: native wifi (default), 2: ethernet)");
|
||||
|
||||
bool ath11k_ftm_mode;
|
||||
module_param_named(ftm_mode, ath11k_ftm_mode, bool, 0444);
|
||||
MODULE_PARM_DESC(ftm_mode, "Boots up in factory test mode");
|
||||
|
||||
static const struct ath11k_hw_params ath11k_hw_params[] = {
|
||||
{
|
||||
.hw_rev = ATH11K_HW_IPQ8074,
|
||||
@ -664,6 +668,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
||||
.hal_params = &ath11k_hw_hal_params_ipq8074,
|
||||
.single_pdev_only = false,
|
||||
.cold_boot_calib = true,
|
||||
.cbcal_restart_fw = true,
|
||||
.fix_l1ss = true,
|
||||
.supports_dynamic_smps_6ghz = false,
|
||||
.alloc_cacheable_memory = true,
|
||||
@ -874,16 +879,16 @@ static void ath11k_core_check_cc_code_bdfext(const struct dmi_header *hdr, void
|
||||
case ATH11K_SMBIOS_CC_ISO:
|
||||
ab->new_alpha2[0] = (smbios->cc_code >> 8) & 0xff;
|
||||
ab->new_alpha2[1] = smbios->cc_code & 0xff;
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot smbios cc_code %c%c\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "smbios cc_code %c%c\n",
|
||||
ab->new_alpha2[0], ab->new_alpha2[1]);
|
||||
break;
|
||||
case ATH11K_SMBIOS_CC_WW:
|
||||
ab->new_alpha2[0] = '0';
|
||||
ab->new_alpha2[1] = '0';
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot smbios worldwide regdomain\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "smbios worldwide regdomain\n");
|
||||
break;
|
||||
default:
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot ignore smbios country code setting %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "ignore smbios country code setting %d\n",
|
||||
smbios->country_code_flag);
|
||||
break;
|
||||
}
|
||||
@ -961,7 +966,8 @@ int ath11k_core_check_dt(struct ath11k_base *ab)
|
||||
}
|
||||
|
||||
static int __ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
|
||||
size_t name_len, bool with_variant)
|
||||
size_t name_len, bool with_variant,
|
||||
bool bus_type_mode)
|
||||
{
|
||||
/* strlen(',variant=') + strlen(ab->qmi.target.bdf_ext) */
|
||||
char variant[9 + ATH11K_QMI_BDF_EXT_STR_LENGTH] = { 0 };
|
||||
@ -972,15 +978,20 @@ static int __ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
|
||||
|
||||
switch (ab->id.bdf_search) {
|
||||
case ATH11K_BDF_SEARCH_BUS_AND_BOARD:
|
||||
scnprintf(name, name_len,
|
||||
"bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s",
|
||||
ath11k_bus_str(ab->hif.bus),
|
||||
ab->id.vendor, ab->id.device,
|
||||
ab->id.subsystem_vendor,
|
||||
ab->id.subsystem_device,
|
||||
ab->qmi.target.chip_id,
|
||||
ab->qmi.target.board_id,
|
||||
variant);
|
||||
if (bus_type_mode)
|
||||
scnprintf(name, name_len,
|
||||
"bus=%s",
|
||||
ath11k_bus_str(ab->hif.bus));
|
||||
else
|
||||
scnprintf(name, name_len,
|
||||
"bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s",
|
||||
ath11k_bus_str(ab->hif.bus),
|
||||
ab->id.vendor, ab->id.device,
|
||||
ab->id.subsystem_vendor,
|
||||
ab->id.subsystem_device,
|
||||
ab->qmi.target.chip_id,
|
||||
ab->qmi.target.board_id,
|
||||
variant);
|
||||
break;
|
||||
default:
|
||||
scnprintf(name, name_len,
|
||||
@ -991,7 +1002,7 @@ static int __ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
|
||||
break;
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot using board name '%s'\n", name);
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "using board name '%s'\n", name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -999,13 +1010,19 @@ static int __ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
|
||||
static int ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
|
||||
size_t name_len)
|
||||
{
|
||||
return __ath11k_core_create_board_name(ab, name, name_len, true);
|
||||
return __ath11k_core_create_board_name(ab, name, name_len, true, false);
|
||||
}
|
||||
|
||||
static int ath11k_core_create_fallback_board_name(struct ath11k_base *ab, char *name,
|
||||
size_t name_len)
|
||||
{
|
||||
return __ath11k_core_create_board_name(ab, name, name_len, false);
|
||||
return __ath11k_core_create_board_name(ab, name, name_len, false, false);
|
||||
}
|
||||
|
||||
static int ath11k_core_create_bus_type_board_name(struct ath11k_base *ab, char *name,
|
||||
size_t name_len)
|
||||
{
|
||||
return __ath11k_core_create_board_name(ab, name, name_len, false, true);
|
||||
}
|
||||
|
||||
const struct firmware *ath11k_core_firmware_request(struct ath11k_base *ab,
|
||||
@ -1024,7 +1041,7 @@ const struct firmware *ath11k_core_firmware_request(struct ath11k_base *ab,
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot firmware request %s size %zu\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "firmware request %s size %zu\n",
|
||||
path, fw->size);
|
||||
|
||||
return fw;
|
||||
@ -1085,7 +1102,7 @@ static int ath11k_core_parse_bd_ie_board(struct ath11k_base *ab,
|
||||
|
||||
name_match_found = true;
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
||||
"boot found match %s for name '%s'",
|
||||
"found match %s for name '%s'",
|
||||
ath11k_bd_ie_type_str(ie_id),
|
||||
boardname);
|
||||
} else if (board_ie_id == data_id) {
|
||||
@ -1094,7 +1111,7 @@ static int ath11k_core_parse_bd_ie_board(struct ath11k_base *ab,
|
||||
goto next;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
||||
"boot found %s for '%s'",
|
||||
"found %s for '%s'",
|
||||
ath11k_bd_ie_type_str(ie_id),
|
||||
boardname);
|
||||
|
||||
@ -1309,7 +1326,7 @@ success:
|
||||
|
||||
int ath11k_core_fetch_regdb(struct ath11k_base *ab, struct ath11k_board_data *bd)
|
||||
{
|
||||
char boardname[BOARD_NAME_SIZE];
|
||||
char boardname[BOARD_NAME_SIZE], default_boardname[BOARD_NAME_SIZE];
|
||||
int ret;
|
||||
|
||||
ret = ath11k_core_create_board_name(ab, boardname, BOARD_NAME_SIZE);
|
||||
@ -1326,6 +1343,21 @@ int ath11k_core_fetch_regdb(struct ath11k_base *ab, struct ath11k_board_data *bd
|
||||
if (!ret)
|
||||
goto exit;
|
||||
|
||||
ret = ath11k_core_create_bus_type_board_name(ab, default_boardname,
|
||||
BOARD_NAME_SIZE);
|
||||
if (ret) {
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
||||
"failed to create default board name for regdb: %d", ret);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ret = ath11k_core_fetch_board_data_api_n(ab, bd, default_boardname,
|
||||
ATH11K_BD_IE_REGDB,
|
||||
ATH11K_BD_IE_REGDB_NAME,
|
||||
ATH11K_BD_IE_REGDB_DATA);
|
||||
if (!ret)
|
||||
goto exit;
|
||||
|
||||
ret = ath11k_core_fetch_board_data_api_1(ab, bd, ATH11K_REGDB_FILE_NAME);
|
||||
if (ret)
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "failed to fetch %s from %s\n",
|
||||
@ -1354,6 +1386,11 @@ static int ath11k_core_soc_create(struct ath11k_base *ab)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (ath11k_ftm_mode) {
|
||||
ab->fw_mode = ATH11K_FIRMWARE_MODE_FTM;
|
||||
ath11k_info(ab, "Booting in factory test mode\n");
|
||||
}
|
||||
|
||||
ret = ath11k_qmi_init_service(ab);
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed to initialize qmi :%d\n", ret);
|
||||
@ -1580,7 +1617,7 @@ int ath11k_core_qmi_firmware_ready(struct ath11k_base *ab)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ath11k_core_start_firmware(ab, ATH11K_FIRMWARE_MODE_NORMAL);
|
||||
ret = ath11k_core_start_firmware(ab, ab->fw_mode);
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed to start firmware: %d\n", ret);
|
||||
return ret;
|
||||
@ -1745,7 +1782,8 @@ void ath11k_core_pre_reconfigure_recovery(struct ath11k_base *ab)
|
||||
for (i = 0; i < ab->num_radios; i++) {
|
||||
pdev = &ab->pdevs[i];
|
||||
ar = pdev->ar;
|
||||
if (!ar || ar->state == ATH11K_STATE_OFF)
|
||||
if (!ar || ar->state == ATH11K_STATE_OFF ||
|
||||
ar->state == ATH11K_STATE_FTM)
|
||||
continue;
|
||||
|
||||
ieee80211_stop_queues(ar->hw);
|
||||
@ -1814,7 +1852,12 @@ static void ath11k_core_post_reconfigure_recovery(struct ath11k_base *ab)
|
||||
ath11k_warn(ab,
|
||||
"device is wedged, will not restart radio %d\n", i);
|
||||
break;
|
||||
case ATH11K_STATE_FTM:
|
||||
ath11k_dbg(ab, ATH11K_DBG_TESTMODE,
|
||||
"fw mode reset done radio %d\n", i);
|
||||
break;
|
||||
}
|
||||
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
}
|
||||
complete(&ab->driver_recovery);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef ATH11K_CORE_H
|
||||
@ -52,6 +52,7 @@
|
||||
#define ATH11K_SMBIOS_BDF_EXT_MAGIC "BDF_"
|
||||
|
||||
extern unsigned int ath11k_frame_mode;
|
||||
extern bool ath11k_ftm_mode;
|
||||
|
||||
#define ATH11K_SCAN_TIMEOUT_HZ (20 * HZ)
|
||||
|
||||
@ -277,6 +278,7 @@ enum ath11k_dev_flags {
|
||||
ATH11K_FLAG_FIXED_MEM_RGN,
|
||||
ATH11K_FLAG_DEVICE_INIT_DONE,
|
||||
ATH11K_FLAG_MULTI_MSI_VECTORS,
|
||||
ATH11K_FLAG_FTM_SEGMENTED,
|
||||
};
|
||||
|
||||
enum ath11k_monitor_flags {
|
||||
@ -530,6 +532,7 @@ enum ath11k_state {
|
||||
ATH11K_STATE_RESTARTING,
|
||||
ATH11K_STATE_RESTARTED,
|
||||
ATH11K_STATE_WEDGED,
|
||||
ATH11K_STATE_FTM,
|
||||
/* Add other states as required */
|
||||
};
|
||||
|
||||
@ -709,6 +712,8 @@ struct ath11k {
|
||||
u32 last_ppdu_id;
|
||||
u32 cached_ppdu_id;
|
||||
int monitor_vdev_id;
|
||||
struct completion fw_mode_reset;
|
||||
u8 ftm_msgref;
|
||||
#ifdef CONFIG_ATH11K_DEBUGFS
|
||||
struct ath11k_debug debug;
|
||||
#endif
|
||||
@ -838,6 +843,7 @@ struct ath11k_msi_config {
|
||||
/* Master structure to hold the hw data which may be used in core module */
|
||||
struct ath11k_base {
|
||||
enum ath11k_hw_rev hw_rev;
|
||||
enum ath11k_firmware_mode fw_mode;
|
||||
struct platform_device *pdev;
|
||||
struct device *dev;
|
||||
struct ath11k_qmi qmi;
|
||||
@ -978,6 +984,14 @@ struct ath11k_base {
|
||||
const struct ath11k_pci_ops *ops;
|
||||
} pci;
|
||||
|
||||
#ifdef CONFIG_NL80211_TESTMODE
|
||||
struct {
|
||||
u32 data_pos;
|
||||
u32 expected_seq;
|
||||
u8 *eventdata;
|
||||
} testmode;
|
||||
#endif
|
||||
|
||||
/* must be last */
|
||||
u8 drv_priv[] __aligned(sizeof(void *));
|
||||
};
|
||||
|
@ -66,7 +66,7 @@ void __ath11k_dbg(struct ath11k_base *ab, enum ath11k_debug_mask mask,
|
||||
vaf.va = &args;
|
||||
|
||||
if (ath11k_debug_mask & mask)
|
||||
dev_printk(KERN_DEBUG, ab->dev, "%pV", &vaf);
|
||||
dev_printk(KERN_DEBUG, ab->dev, "%s %pV", ath11k_dbg_str(mask), &vaf);
|
||||
|
||||
trace_ath11k_log_dbg(ab, mask, &vaf);
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _ATH11K_DEBUG_H_
|
||||
@ -21,13 +22,57 @@ enum ath11k_debug_mask {
|
||||
ATH11K_DBG_MGMT = 0x00000100,
|
||||
ATH11K_DBG_REG = 0x00000200,
|
||||
ATH11K_DBG_TESTMODE = 0x00000400,
|
||||
ATH11k_DBG_HAL = 0x00000800,
|
||||
ATH11K_DBG_HAL = 0x00000800,
|
||||
ATH11K_DBG_PCI = 0x00001000,
|
||||
ATH11K_DBG_DP_TX = 0x00002000,
|
||||
ATH11K_DBG_DP_RX = 0x00004000,
|
||||
ATH11K_DBG_ANY = 0xffffffff,
|
||||
ATH11K_DBG_CE = 0x00008000,
|
||||
};
|
||||
|
||||
static inline const char *ath11k_dbg_str(enum ath11k_debug_mask mask)
|
||||
{
|
||||
switch (mask) {
|
||||
case ATH11K_DBG_AHB:
|
||||
return "ahb";
|
||||
case ATH11K_DBG_WMI:
|
||||
return "wmi";
|
||||
case ATH11K_DBG_HTC:
|
||||
return "htc";
|
||||
case ATH11K_DBG_DP_HTT:
|
||||
return "dp_htt";
|
||||
case ATH11K_DBG_MAC:
|
||||
return "mac";
|
||||
case ATH11K_DBG_BOOT:
|
||||
return "boot";
|
||||
case ATH11K_DBG_QMI:
|
||||
return "qmi";
|
||||
case ATH11K_DBG_DATA:
|
||||
return "data";
|
||||
case ATH11K_DBG_MGMT:
|
||||
return "mgmt";
|
||||
case ATH11K_DBG_REG:
|
||||
return "reg";
|
||||
case ATH11K_DBG_TESTMODE:
|
||||
return "testmode";
|
||||
case ATH11K_DBG_HAL:
|
||||
return "hal";
|
||||
case ATH11K_DBG_PCI:
|
||||
return "pci";
|
||||
case ATH11K_DBG_DP_TX:
|
||||
return "dp_tx";
|
||||
case ATH11K_DBG_DP_RX:
|
||||
return "dp_rx";
|
||||
case ATH11K_DBG_CE:
|
||||
return "ce";
|
||||
|
||||
/* no default handler to allow compiler to check that the
|
||||
* enum is fully handled
|
||||
*/
|
||||
}
|
||||
|
||||
return "<?>";
|
||||
}
|
||||
|
||||
__printf(2, 3) void ath11k_info(struct ath11k_base *ab, const char *fmt, ...);
|
||||
__printf(2, 3) void ath11k_err(struct ath11k_base *ab, const char *fmt, ...);
|
||||
__printf(2, 3) void ath11k_warn(struct ath11k_base *ab, const char *fmt, ...);
|
||||
|
@ -4011,6 +4011,114 @@ void htt_print_phy_stats_tlv(const void *tag_buf,
|
||||
stats_req->buf_len = len;
|
||||
}
|
||||
|
||||
static inline void
|
||||
htt_print_phy_reset_counters_tlv(const void *tag_buf,
|
||||
u16 tag_len,
|
||||
struct debug_htt_stats_req *stats_req)
|
||||
{
|
||||
const struct htt_phy_reset_counters_tlv *htt_stats_buf = tag_buf;
|
||||
u8 *buf = stats_req->buf;
|
||||
u32 len = stats_req->buf_len;
|
||||
u32 buf_len = ATH11K_HTT_STATS_BUF_SIZE;
|
||||
|
||||
if (tag_len < sizeof(*htt_stats_buf))
|
||||
return;
|
||||
|
||||
len += scnprintf(buf + len, buf_len - len, "HTT_PHY_RESET_COUNTERS_TLV:\n");
|
||||
|
||||
len += scnprintf(buf + len, buf_len - len, "pdev_id = %u\n",
|
||||
htt_stats_buf->pdev_id);
|
||||
len += scnprintf(buf + len, buf_len - len, "cf_active_low_fail_cnt = %u\n",
|
||||
htt_stats_buf->cf_active_low_fail_cnt);
|
||||
len += scnprintf(buf + len, buf_len - len, "cf_active_low_pass_cnt = %u\n",
|
||||
htt_stats_buf->cf_active_low_pass_cnt);
|
||||
len += scnprintf(buf + len, buf_len - len, "phy_off_through_vreg_cnt = %u\n",
|
||||
htt_stats_buf->phy_off_through_vreg_cnt);
|
||||
len += scnprintf(buf + len, buf_len - len, "force_calibration_cnt = %u\n",
|
||||
htt_stats_buf->force_calibration_cnt);
|
||||
len += scnprintf(buf + len, buf_len - len, "rf_mode_switch_phy_off_cnt = %u\n",
|
||||
htt_stats_buf->rf_mode_switch_phy_off_cnt);
|
||||
|
||||
stats_req->buf_len = len;
|
||||
}
|
||||
|
||||
static inline void
|
||||
htt_print_phy_reset_stats_tlv(const void *tag_buf,
|
||||
u16 tag_len,
|
||||
struct debug_htt_stats_req *stats_req)
|
||||
{
|
||||
const struct htt_phy_reset_stats_tlv *htt_stats_buf = tag_buf;
|
||||
u8 *buf = stats_req->buf;
|
||||
u32 len = stats_req->buf_len;
|
||||
u32 buf_len = ATH11K_HTT_STATS_BUF_SIZE;
|
||||
|
||||
if (tag_len < sizeof(*htt_stats_buf))
|
||||
return;
|
||||
|
||||
len += scnprintf(buf + len, buf_len - len, "HTT_PHY_RESET_STATS_TLV:\n");
|
||||
|
||||
len += scnprintf(buf + len, buf_len - len, "pdev_id = %u\n",
|
||||
htt_stats_buf->pdev_id);
|
||||
len += scnprintf(buf + len, buf_len - len, "chan_mhz = %u\n",
|
||||
htt_stats_buf->chan_mhz);
|
||||
len += scnprintf(buf + len, buf_len - len, "chan_band_center_freq1 = %u\n",
|
||||
htt_stats_buf->chan_band_center_freq1);
|
||||
len += scnprintf(buf + len, buf_len - len, "chan_band_center_freq2 = %u\n",
|
||||
htt_stats_buf->chan_band_center_freq2);
|
||||
len += scnprintf(buf + len, buf_len - len, "chan_phy_mode = %u\n",
|
||||
htt_stats_buf->chan_phy_mode);
|
||||
len += scnprintf(buf + len, buf_len - len, "chan_flags = 0x%0x\n",
|
||||
htt_stats_buf->chan_flags);
|
||||
len += scnprintf(buf + len, buf_len - len, "chan_num = %u\n",
|
||||
htt_stats_buf->chan_num);
|
||||
len += scnprintf(buf + len, buf_len - len, "reset_cause = 0x%0x\n",
|
||||
htt_stats_buf->reset_cause);
|
||||
len += scnprintf(buf + len, buf_len - len, "prev_reset_cause = 0x%0x\n",
|
||||
htt_stats_buf->prev_reset_cause);
|
||||
len += scnprintf(buf + len, buf_len - len, "phy_warm_reset_src = 0x%0x\n",
|
||||
htt_stats_buf->phy_warm_reset_src);
|
||||
len += scnprintf(buf + len, buf_len - len, "rx_gain_tbl_mode = %d\n",
|
||||
htt_stats_buf->rx_gain_tbl_mode);
|
||||
len += scnprintf(buf + len, buf_len - len, "xbar_val = 0x%0x\n",
|
||||
htt_stats_buf->xbar_val);
|
||||
len += scnprintf(buf + len, buf_len - len, "force_calibration = %u\n",
|
||||
htt_stats_buf->force_calibration);
|
||||
len += scnprintf(buf + len, buf_len - len, "phyrf_mode = %u\n",
|
||||
htt_stats_buf->phyrf_mode);
|
||||
len += scnprintf(buf + len, buf_len - len, "phy_homechan = %u\n",
|
||||
htt_stats_buf->phy_homechan);
|
||||
len += scnprintf(buf + len, buf_len - len, "phy_tx_ch_mask = 0x%0x\n",
|
||||
htt_stats_buf->phy_tx_ch_mask);
|
||||
len += scnprintf(buf + len, buf_len - len, "phy_rx_ch_mask = 0x%0x\n",
|
||||
htt_stats_buf->phy_rx_ch_mask);
|
||||
len += scnprintf(buf + len, buf_len - len, "phybb_ini_mask = 0x%0x\n",
|
||||
htt_stats_buf->phybb_ini_mask);
|
||||
len += scnprintf(buf + len, buf_len - len, "phyrf_ini_mask = 0x%0x\n",
|
||||
htt_stats_buf->phyrf_ini_mask);
|
||||
len += scnprintf(buf + len, buf_len - len, "phy_dfs_en_mask = 0x%0x\n",
|
||||
htt_stats_buf->phy_dfs_en_mask);
|
||||
len += scnprintf(buf + len, buf_len - len, "phy_sscan_en_mask = 0x%0x\n",
|
||||
htt_stats_buf->phy_sscan_en_mask);
|
||||
len += scnprintf(buf + len, buf_len - len, "phy_synth_sel_mask = 0x%0x\n",
|
||||
htt_stats_buf->phy_synth_sel_mask);
|
||||
len += scnprintf(buf + len, buf_len - len, "phy_adfs_freq = %u\n",
|
||||
htt_stats_buf->phy_adfs_freq);
|
||||
len += scnprintf(buf + len, buf_len - len, "cck_fir_settings = 0x%0x\n",
|
||||
htt_stats_buf->cck_fir_settings);
|
||||
len += scnprintf(buf + len, buf_len - len, "phy_dyn_pri_chan = %u\n",
|
||||
htt_stats_buf->phy_dyn_pri_chan);
|
||||
len += scnprintf(buf + len, buf_len - len, "cca_thresh = 0x%0x\n",
|
||||
htt_stats_buf->cca_thresh);
|
||||
len += scnprintf(buf + len, buf_len - len, "dyn_cca_status = %u\n",
|
||||
htt_stats_buf->dyn_cca_status);
|
||||
len += scnprintf(buf + len, buf_len - len, "rxdesense_thresh_hw = 0x%x\n",
|
||||
htt_stats_buf->rxdesense_thresh_hw);
|
||||
len += scnprintf(buf + len, buf_len - len, "rxdesense_thresh_sw = 0x%x\n",
|
||||
htt_stats_buf->rxdesense_thresh_sw);
|
||||
|
||||
stats_req->buf_len = len;
|
||||
}
|
||||
|
||||
static inline
|
||||
void htt_print_peer_ctrl_path_txrx_stats_tlv(const void *tag_buf,
|
||||
struct debug_htt_stats_req *stats_req)
|
||||
@ -4425,6 +4533,12 @@ static int ath11k_dbg_htt_ext_stats_parse(struct ath11k_base *ab,
|
||||
case HTT_STATS_PHY_STATS_TAG:
|
||||
htt_print_phy_stats_tlv(tag_buf, stats_req);
|
||||
break;
|
||||
case HTT_STATS_PHY_RESET_COUNTERS_TAG:
|
||||
htt_print_phy_reset_counters_tlv(tag_buf, len, stats_req);
|
||||
break;
|
||||
case HTT_STATS_PHY_RESET_STATS_TAG:
|
||||
htt_print_phy_reset_stats_tlv(tag_buf, len, stats_req);
|
||||
break;
|
||||
case HTT_STATS_PEER_CTRL_PATH_TXRX_STATS_TAG:
|
||||
htt_print_peer_ctrl_path_txrx_stats_tlv(tag_buf, stats_req);
|
||||
break;
|
||||
|
@ -111,6 +111,8 @@ enum htt_tlv_tag_t {
|
||||
HTT_STATS_TXBF_OFDMA_STEER_STATS_TAG = 116,
|
||||
HTT_STATS_PHY_COUNTERS_TAG = 121,
|
||||
HTT_STATS_PHY_STATS_TAG = 122,
|
||||
HTT_STATS_PHY_RESET_COUNTERS_TAG = 123,
|
||||
HTT_STATS_PHY_RESET_STATS_TAG = 124,
|
||||
|
||||
HTT_STATS_MAX_TAG,
|
||||
};
|
||||
@ -1964,6 +1966,47 @@ struct htt_phy_stats_tlv {
|
||||
u32 fw_run_time;
|
||||
};
|
||||
|
||||
struct htt_phy_reset_counters_tlv {
|
||||
u32 pdev_id;
|
||||
u32 cf_active_low_fail_cnt;
|
||||
u32 cf_active_low_pass_cnt;
|
||||
u32 phy_off_through_vreg_cnt;
|
||||
u32 force_calibration_cnt;
|
||||
u32 rf_mode_switch_phy_off_cnt;
|
||||
};
|
||||
|
||||
struct htt_phy_reset_stats_tlv {
|
||||
u32 pdev_id;
|
||||
u32 chan_mhz;
|
||||
u32 chan_band_center_freq1;
|
||||
u32 chan_band_center_freq2;
|
||||
u32 chan_phy_mode;
|
||||
u32 chan_flags;
|
||||
u32 chan_num;
|
||||
u32 reset_cause;
|
||||
u32 prev_reset_cause;
|
||||
u32 phy_warm_reset_src;
|
||||
u32 rx_gain_tbl_mode;
|
||||
u32 xbar_val;
|
||||
u32 force_calibration;
|
||||
u32 phyrf_mode;
|
||||
u32 phy_homechan;
|
||||
u32 phy_tx_ch_mask;
|
||||
u32 phy_rx_ch_mask;
|
||||
u32 phybb_ini_mask;
|
||||
u32 phyrf_ini_mask;
|
||||
u32 phy_dfs_en_mask;
|
||||
u32 phy_sscan_en_mask;
|
||||
u32 phy_synth_sel_mask;
|
||||
u32 phy_adfs_freq;
|
||||
u32 cck_fir_settings;
|
||||
u32 phy_dyn_pri_chan;
|
||||
u32 cca_thresh;
|
||||
u32 dyn_cca_status;
|
||||
u32 rxdesense_thresh_hw;
|
||||
u32 rxdesense_thresh_sw;
|
||||
};
|
||||
|
||||
struct htt_peer_ctrl_path_txrx_stats_tlv {
|
||||
/* peer mac address */
|
||||
u8 peer_mac_addr[ETH_ALEN];
|
||||
|
@ -1651,7 +1651,7 @@ static void ath11k_htt_backpressure_event_handler(struct ath11k_base *ab,
|
||||
|
||||
backpressure_time = *data;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "htt backpressure event, pdev %d, ring type %d,ring id %d, hp %d tp %d, backpressure time %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "backpressure event, pdev %d, ring type %d,ring id %d, hp %d tp %d, backpressure time %d\n",
|
||||
pdev_id, ring_type, ring_id, hp, tp, backpressure_time);
|
||||
|
||||
if (ring_type == HTT_BACKPRESSURE_UMAC_RING_TYPE) {
|
||||
@ -2466,7 +2466,7 @@ static void ath11k_dp_rx_deliver_msdu(struct ath11k *ar, struct napi_struct *nap
|
||||
spin_unlock_bh(&ar->ab->base_lock);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_DATA,
|
||||
"rx skb %pK len %u peer %pM %d %s sn %u %s%s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",
|
||||
"rx skb %p len %u peer %pM %d %s sn %u %s%s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",
|
||||
msdu,
|
||||
msdu->len,
|
||||
peer ? peer->addr : NULL,
|
||||
@ -4908,7 +4908,7 @@ ath11k_dp_rx_mon_merg_msdus(struct ath11k *ar,
|
||||
goto err_merge_fail;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_DATA,
|
||||
"mpdu_buf %pK mpdu_buf->len %u",
|
||||
"mpdu_buf %p mpdu_buf->len %u",
|
||||
prev_buf, prev_buf->len);
|
||||
} else {
|
||||
ath11k_dbg(ab, ATH11K_DBG_DATA,
|
||||
@ -5099,7 +5099,7 @@ static void ath11k_dp_rx_mon_dest_process(struct ath11k *ar, int mac_id,
|
||||
|
||||
if (!mon_dst_srng) {
|
||||
ath11k_warn(ar->ab,
|
||||
"HAL Monitor Destination Ring Init Failed -- %pK",
|
||||
"HAL Monitor Destination Ring Init Failed -- %p",
|
||||
mon_dst_srng);
|
||||
return;
|
||||
}
|
||||
|
@ -964,14 +964,10 @@ int ath11k_dp_tx_htt_srng_setup(struct ath11k_base *ab, u32 ring_id,
|
||||
params.low_threshold);
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL,
|
||||
"%s msi_addr_lo:0x%x, msi_addr_hi:0x%x, msi_data:0x%x\n",
|
||||
__func__, cmd->ring_msi_addr_lo, cmd->ring_msi_addr_hi,
|
||||
cmd->msi_data);
|
||||
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL,
|
||||
"ring_id:%d, ring_type:%d, intr_info:0x%x, flags:0x%x\n",
|
||||
ring_id, ring_type, cmd->intr_info, cmd->info2);
|
||||
ath11k_dbg(ab, ATH11K_DBG_DP_TX,
|
||||
"htt srng setup msi_addr_lo 0x%x msi_addr_hi 0x%x msi_data 0x%x ring_id %d ring_type %d intr_info 0x%x flags 0x%x\n",
|
||||
cmd->ring_msi_addr_lo, cmd->ring_msi_addr_hi,
|
||||
cmd->msi_data, ring_id, ring_type, cmd->intr_info, cmd->info2);
|
||||
|
||||
ret = ath11k_htc_send(&ab->htc, ab->dp.eid, skb);
|
||||
if (ret)
|
||||
|
@ -1009,8 +1009,8 @@ int ath11k_hal_srng_setup(struct ath11k_base *ab, enum hal_ring_type type,
|
||||
srng->u.src_ring.hp_addr =
|
||||
(u32 *)((unsigned long)ab->mem + reg_base);
|
||||
else
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL,
|
||||
"hal type %d ring_num %d reg_base 0x%x shadow 0x%lx\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL,
|
||||
"type %d ring_num %d reg_base 0x%x shadow 0x%lx\n",
|
||||
type, ring_num,
|
||||
reg_base,
|
||||
(unsigned long)srng->u.src_ring.hp_addr -
|
||||
@ -1043,7 +1043,7 @@ int ath11k_hal_srng_setup(struct ath11k_base *ab, enum hal_ring_type type,
|
||||
(u32 *)((unsigned long)ab->mem + reg_base +
|
||||
(HAL_REO1_RING_TP(ab) - HAL_REO1_RING_HP(ab)));
|
||||
else
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL,
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL,
|
||||
"type %d ring_num %d target_reg 0x%x shadow 0x%lx\n",
|
||||
type, ring_num,
|
||||
reg_base + (HAL_REO1_RING_TP(ab) -
|
||||
@ -1118,8 +1118,8 @@ int ath11k_hal_srng_update_shadow_config(struct ath11k_base *ab,
|
||||
ath11k_hal_srng_update_hp_tp_addr(ab, shadow_cfg_idx, ring_type,
|
||||
ring_num);
|
||||
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL,
|
||||
"target_reg %x, shadow reg 0x%x shadow_idx 0x%x, ring_type %d, ring num %d",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL,
|
||||
"update shadow config target_reg %x shadow reg 0x%x shadow_idx 0x%x ring_type %d ring num %d",
|
||||
target_reg,
|
||||
HAL_SHADOW_REG(ab, shadow_cfg_idx),
|
||||
shadow_cfg_idx,
|
||||
|
@ -442,54 +442,54 @@ void ath11k_hal_reo_status_queue_stats(struct ath11k_base *ab, u32 *reo_desc,
|
||||
FIELD_GET(HAL_REO_STATUS_HDR_INFO0_EXEC_STATUS,
|
||||
desc->hdr.info0);
|
||||
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL, "Queue stats status:\n");
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL, "header: cmd_num %d status %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL, "Queue stats status:\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL, "header: cmd_num %d status %d\n",
|
||||
status->uniform_hdr.cmd_num,
|
||||
status->uniform_hdr.cmd_status);
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL, "ssn %ld cur_idx %ld\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL, "ssn %ld cur_idx %ld\n",
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_SSN,
|
||||
desc->info0),
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_CUR_IDX,
|
||||
desc->info0));
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL, "pn = [%08x, %08x, %08x, %08x]\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL, "pn = [%08x, %08x, %08x, %08x]\n",
|
||||
desc->pn[0], desc->pn[1], desc->pn[2], desc->pn[3]);
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL,
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL,
|
||||
"last_rx: enqueue_tstamp %08x dequeue_tstamp %08x\n",
|
||||
desc->last_rx_enqueue_timestamp,
|
||||
desc->last_rx_dequeue_timestamp);
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL,
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL,
|
||||
"rx_bitmap [%08x %08x %08x %08x %08x %08x %08x %08x]\n",
|
||||
desc->rx_bitmap[0], desc->rx_bitmap[1], desc->rx_bitmap[2],
|
||||
desc->rx_bitmap[3], desc->rx_bitmap[4], desc->rx_bitmap[5],
|
||||
desc->rx_bitmap[6], desc->rx_bitmap[7]);
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL, "count: cur_mpdu %ld cur_msdu %ld\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL, "count: cur_mpdu %ld cur_msdu %ld\n",
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MPDU_COUNT,
|
||||
desc->info1),
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MSDU_COUNT,
|
||||
desc->info1));
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL, "fwd_timeout %ld fwd_bar %ld dup_count %ld\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL, "fwd_timeout %ld fwd_bar %ld dup_count %ld\n",
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_TIMEOUT_COUNT,
|
||||
desc->info2),
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_FDTB_COUNT,
|
||||
desc->info2),
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_DUPLICATE_COUNT,
|
||||
desc->info2));
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL, "frames_in_order %ld bar_rcvd %ld\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL, "frames_in_order %ld bar_rcvd %ld\n",
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_FIO_COUNT,
|
||||
desc->info3),
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_BAR_RCVD_CNT,
|
||||
desc->info3));
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL, "num_mpdus %d num_msdus %d total_bytes %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL, "num_mpdus %d num_msdus %d total_bytes %d\n",
|
||||
desc->num_mpdu_frames, desc->num_msdu_frames,
|
||||
desc->total_bytes);
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL, "late_rcvd %ld win_jump_2k %ld hole_cnt %ld\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL, "late_rcvd %ld win_jump_2k %ld hole_cnt %ld\n",
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_LATE_RX_MPDU,
|
||||
desc->info4),
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_WINDOW_JMP2K,
|
||||
desc->info4),
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_HOLE_COUNT,
|
||||
desc->info4));
|
||||
ath11k_dbg(ab, ATH11k_DBG_HAL, "looping count %ld\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HAL, "looping count %ld\n",
|
||||
FIELD_GET(HAL_REO_GET_QUEUE_STATS_STATUS_INFO5_LOOPING_CNT,
|
||||
desc->info5));
|
||||
}
|
||||
|
@ -46,7 +46,6 @@ static struct sk_buff *ath11k_htc_build_tx_ctrl_skb(void *ab)
|
||||
skb_cb = ATH11K_SKB_CB(skb);
|
||||
memset(skb_cb, 0, sizeof(*skb_cb));
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC, "%s: skb %pK\n", __func__, skb);
|
||||
return skb;
|
||||
}
|
||||
|
||||
@ -96,7 +95,7 @@ int ath11k_htc_send(struct ath11k_htc *htc,
|
||||
spin_lock_bh(&htc->tx_lock);
|
||||
if (ep->tx_credits < credits) {
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC,
|
||||
"htc insufficient credits ep %d required %d available %d\n",
|
||||
"ep %d insufficient credits required %d total %d\n",
|
||||
eid, credits, ep->tx_credits);
|
||||
spin_unlock_bh(&htc->tx_lock);
|
||||
ret = -EAGAIN;
|
||||
@ -104,7 +103,7 @@ int ath11k_htc_send(struct ath11k_htc *htc,
|
||||
}
|
||||
ep->tx_credits -= credits;
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC,
|
||||
"htc ep %d consumed %d credits (total %d)\n",
|
||||
"ep %d credits consumed %d total %d\n",
|
||||
eid, credits, ep->tx_credits);
|
||||
spin_unlock_bh(&htc->tx_lock);
|
||||
}
|
||||
@ -119,6 +118,9 @@ int ath11k_htc_send(struct ath11k_htc *htc,
|
||||
goto err_credits;
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC, "tx skb %p eid %d paddr %pad\n",
|
||||
skb, skb_cb->eid, &skb_cb->paddr);
|
||||
|
||||
ret = ath11k_ce_send(htc->ab, skb, ep->ul_pipe_id, ep->eid);
|
||||
if (ret)
|
||||
goto err_unmap;
|
||||
@ -132,7 +134,7 @@ err_credits:
|
||||
spin_lock_bh(&htc->tx_lock);
|
||||
ep->tx_credits += credits;
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC,
|
||||
"htc ep %d reverted %d credits back (total %d)\n",
|
||||
"ep %d credits reverted %d total %d\n",
|
||||
eid, credits, ep->tx_credits);
|
||||
spin_unlock_bh(&htc->tx_lock);
|
||||
|
||||
@ -167,7 +169,7 @@ ath11k_htc_process_credit_report(struct ath11k_htc *htc,
|
||||
ep = &htc->endpoint[report->eid];
|
||||
ep->tx_credits += report->credits;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC, "htc ep %d got %d credits (total %d)\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC, "ep %d credits got %d total %d\n",
|
||||
report->eid, report->credits, ep->tx_credits);
|
||||
|
||||
if (ep->ep_ops.ep_tx_credits) {
|
||||
@ -239,7 +241,7 @@ static int ath11k_htc_process_trailer(struct ath11k_htc *htc,
|
||||
|
||||
static void ath11k_htc_suspend_complete(struct ath11k_base *ab, bool ack)
|
||||
{
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot suspend complete %d\n", ack);
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "suspend complete %d\n", ack);
|
||||
|
||||
if (ack)
|
||||
set_bit(ATH11K_FLAG_HTC_SUSPEND_COMPLETE, &ab->dev_flags);
|
||||
@ -276,7 +278,7 @@ void ath11k_htc_tx_completion_handler(struct ath11k_base *ab,
|
||||
|
||||
static void ath11k_htc_wakeup_from_suspend(struct ath11k_base *ab)
|
||||
{
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot wakeup from suspend is received\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "wakeup from suspend is received\n");
|
||||
}
|
||||
|
||||
void ath11k_htc_rx_completion_handler(struct ath11k_base *ab,
|
||||
@ -287,7 +289,7 @@ void ath11k_htc_rx_completion_handler(struct ath11k_base *ab,
|
||||
struct ath11k_htc_hdr *hdr;
|
||||
struct ath11k_htc_ep *ep;
|
||||
u16 payload_len;
|
||||
u32 trailer_len = 0;
|
||||
u32 message_id, trailer_len = 0;
|
||||
size_t min_len;
|
||||
u8 eid;
|
||||
bool trailer_present;
|
||||
@ -322,6 +324,9 @@ void ath11k_htc_rx_completion_handler(struct ath11k_base *ab,
|
||||
trailer_present = (FIELD_GET(HTC_HDR_FLAGS, hdr->htc_info)) &
|
||||
ATH11K_HTC_FLAG_TRAILER_PRESENT;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC, "rx ep %d skb %p trailer_present %d\n",
|
||||
eid, skb, trailer_present);
|
||||
|
||||
if (trailer_present) {
|
||||
u8 *trailer;
|
||||
|
||||
@ -354,7 +359,12 @@ void ath11k_htc_rx_completion_handler(struct ath11k_base *ab,
|
||||
if (eid == ATH11K_HTC_EP_0) {
|
||||
struct ath11k_htc_msg *msg = (struct ath11k_htc_msg *)skb->data;
|
||||
|
||||
switch (FIELD_GET(HTC_MSG_MESSAGEID, msg->msg_svc_id)) {
|
||||
message_id = FIELD_GET(HTC_MSG_MESSAGEID, msg->msg_svc_id);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC, "rx ep %d skb %p message_id %d\n",
|
||||
eid, skb, message_id);
|
||||
|
||||
switch (message_id) {
|
||||
case ATH11K_HTC_MSG_READY_ID:
|
||||
case ATH11K_HTC_MSG_CONNECT_SERVICE_RESP_ID:
|
||||
/* handle HTC control message */
|
||||
@ -393,8 +403,6 @@ void ath11k_htc_rx_completion_handler(struct ath11k_base *ab,
|
||||
goto out;
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC, "htc rx completion ep %d skb %pK\n",
|
||||
eid, skb);
|
||||
ep->ep_ops.ep_rx_complete(ab, skb);
|
||||
|
||||
/* poll tx completion for interrupt disabled CE's */
|
||||
@ -564,7 +572,7 @@ int ath11k_htc_wait_target(struct ath11k_htc *htc)
|
||||
htc->target_credit_size = credit_size;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC,
|
||||
"Target ready! transmit resources: %d size:%d\n",
|
||||
"target ready total_transmit_credits %d target_credit_size %d\n",
|
||||
htc->total_transmit_credits, htc->target_credit_size);
|
||||
|
||||
if ((htc->total_transmit_credits == 0) ||
|
||||
@ -615,7 +623,7 @@ int ath11k_htc_connect_service(struct ath11k_htc *htc,
|
||||
conn_req->service_id);
|
||||
if (!tx_alloc)
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
||||
"boot htc service %s does not allocate target credits\n",
|
||||
"htc service %s does not allocate target credits\n",
|
||||
htc_service_name(conn_req->service_id));
|
||||
|
||||
skb = ath11k_htc_build_tx_ctrl_skb(htc->ab);
|
||||
@ -680,7 +688,7 @@ int ath11k_htc_connect_service(struct ath11k_htc *htc,
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC,
|
||||
"HTC Service %s connect response: status: 0x%lx, assigned ep: 0x%lx\n",
|
||||
"service %s connect response status 0x%lx assigned ep 0x%lx\n",
|
||||
htc_service_name(service_id),
|
||||
FIELD_GET(HTC_SVC_RESP_MSG_STATUS, resp_msg->flags_len),
|
||||
FIELD_GET(HTC_SVC_RESP_MSG_ENDPOINTID, resp_msg->flags_len));
|
||||
@ -740,14 +748,14 @@ setup:
|
||||
return status;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
||||
"boot htc service '%s' ul pipe %d dl pipe %d eid %d ready\n",
|
||||
"htc service '%s' ul pipe %d dl pipe %d eid %d ready\n",
|
||||
htc_service_name(ep->service_id), ep->ul_pipe_id,
|
||||
ep->dl_pipe_id, ep->eid);
|
||||
|
||||
if (disable_credit_flow_ctrl && ep->tx_credit_flow_enabled) {
|
||||
ep->tx_credit_flow_enabled = false;
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
||||
"boot htc service '%s' eid %d TX flow control disabled\n",
|
||||
"htc service '%s' eid %d tx flow control disabled\n",
|
||||
htc_service_name(ep->service_id), assigned_eid);
|
||||
}
|
||||
|
||||
@ -773,7 +781,7 @@ int ath11k_htc_start(struct ath11k_htc *htc)
|
||||
ATH11K_HTC_MSG_SETUP_COMPLETE_EX_ID);
|
||||
|
||||
if (ab->hw_params.credit_flow)
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC, "HTC is using TX credit flow control\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_HTC, "using tx credit flow control\n");
|
||||
else
|
||||
msg->flags |= ATH11K_GLOBAL_DISABLE_CREDIT_FLOW;
|
||||
|
||||
|
@ -1178,7 +1178,7 @@ const struct ath11k_hw_ops ipq5018_ops = {
|
||||
.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
|
||||
.rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid,
|
||||
.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2,
|
||||
|
||||
.get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
|
||||
};
|
||||
|
||||
#define ATH11K_TX_RING_MASK_0 BIT(0)
|
||||
|
@ -643,7 +643,10 @@ struct ath11k *ath11k_mac_get_ar_by_pdev_id(struct ath11k_base *ab, u32 pdev_id)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < ab->num_radios; i++) {
|
||||
pdev = rcu_dereference(ab->pdevs_active[i]);
|
||||
if (ab->fw_mode == ATH11K_FIRMWARE_MODE_FTM)
|
||||
pdev = &ab->pdevs[i];
|
||||
else
|
||||
pdev = rcu_dereference(ab->pdevs_active[i]);
|
||||
|
||||
if (pdev && pdev->pdev_id == pdev_id)
|
||||
return (pdev->ar ? pdev->ar : NULL);
|
||||
@ -815,7 +818,7 @@ static int ath11k_recalc_rtscts_prot(struct ath11k_vif *arvif)
|
||||
|
||||
arvif->rtscts_prot_mode = rts_cts;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac vdev %d recalc rts/cts prot %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "vdev %d recalc rts/cts prot %d\n",
|
||||
arvif->vdev_id, rts_cts);
|
||||
|
||||
ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
|
||||
@ -971,7 +974,7 @@ static int ath11k_mac_monitor_vdev_start(struct ath11k *ar, int vdev_id,
|
||||
goto vdev_stop;
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac monitor vdev %i started\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "monitor vdev %i started\n",
|
||||
vdev_id);
|
||||
|
||||
return 0;
|
||||
@ -1025,7 +1028,7 @@ static int ath11k_mac_monitor_vdev_stop(struct ath11k *ar)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac monitor vdev %i stopped\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "monitor vdev %i stopped\n",
|
||||
ar->monitor_vdev_id);
|
||||
|
||||
return 0;
|
||||
@ -1096,7 +1099,7 @@ static int ath11k_mac_monitor_vdev_create(struct ath11k *ar)
|
||||
ar->num_created_vdevs++;
|
||||
set_bit(ATH11K_FLAG_MONITOR_VDEV_CREATED, &ar->monitor_flags);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac monitor vdev %d created\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "monitor vdev %d created\n",
|
||||
ar->monitor_vdev_id);
|
||||
|
||||
return 0;
|
||||
@ -1131,7 +1134,7 @@ static int ath11k_mac_monitor_vdev_delete(struct ath11k *ar)
|
||||
if (time_left == 0) {
|
||||
ath11k_warn(ar->ab, "Timeout in receiving vdev delete response\n");
|
||||
} else {
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac monitor vdev %d deleted\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "monitor vdev %d deleted\n",
|
||||
ar->monitor_vdev_id);
|
||||
|
||||
ar->allocated_vdev_map &= ~(1LL << ar->monitor_vdev_id);
|
||||
@ -1177,7 +1180,7 @@ static int ath11k_mac_monitor_start(struct ath11k *ar)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac monitor started\n");
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "monitor started\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1207,7 +1210,7 @@ static int ath11k_mac_monitor_stop(struct ath11k *ar)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac monitor stopped ret %d\n", ret);
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "monitor stopped ret %d\n", ret);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1258,7 +1261,7 @@ static int ath11k_mac_vif_setup_ps(struct ath11k_vif *arvif)
|
||||
psmode = WMI_STA_PS_MODE_DISABLED;
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac vdev %d psmode %s\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "vdev %d psmode %s\n",
|
||||
arvif->vdev_id, psmode ? "enable" : "disable");
|
||||
|
||||
ret = ath11k_wmi_pdev_set_ps_mode(ar, arvif->vdev_id, psmode);
|
||||
@ -1638,7 +1641,7 @@ static void ath11k_control_beaconing(struct ath11k_vif *arvif,
|
||||
|
||||
arvif->is_up = true;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac vdev %d up\n", arvif->vdev_id);
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "vdev %d up\n", arvif->vdev_id);
|
||||
}
|
||||
|
||||
static void ath11k_mac_handle_beacon_iter(void *data, u8 *mac,
|
||||
@ -1961,7 +1964,7 @@ static void ath11k_peer_assoc_h_ht(struct ath11k *ar,
|
||||
arg->peer_nss = min(sta->deflink.rx_nss, max_nss);
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "ht peer %pM mcs cnt %d nss %d\n",
|
||||
arg->peer_mac,
|
||||
arg->peer_ht_rates.num_rates,
|
||||
arg->peer_nss);
|
||||
@ -2125,7 +2128,7 @@ static void ath11k_peer_assoc_h_vht(struct ath11k *ar,
|
||||
}
|
||||
|
||||
if (!user_rate_valid) {
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac setting vht range mcs value to peer supported nss %d for peer %pM\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "setting vht range mcs value to peer supported nss %d for peer %pM\n",
|
||||
sta->deflink.rx_nss, sta->addr);
|
||||
vht_mcs_mask[sta->deflink.rx_nss - 1] = vht_mcs_mask[vht_nss - 1];
|
||||
}
|
||||
@ -2182,7 +2185,7 @@ static void ath11k_peer_assoc_h_vht(struct ath11k *ar,
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac vht peer %pM max_mpdu %d flags 0x%x nss_override 0x%x\n",
|
||||
"vht peer %pM max_mpdu %d flags 0x%x nss_override 0x%x\n",
|
||||
sta->addr, arg->peer_max_mpdu, arg->peer_flags,
|
||||
arg->peer_bw_rxnss_override);
|
||||
}
|
||||
@ -2407,7 +2410,7 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,
|
||||
}
|
||||
|
||||
if (!user_rate_valid) {
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac setting he range mcs value to peer supported nss %d for peer %pM\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "setting he range mcs value to peer supported nss %d for peer %pM\n",
|
||||
sta->deflink.rx_nss, sta->addr);
|
||||
he_mcs_mask[sta->deflink.rx_nss - 1] = he_mcs_mask[he_nss - 1];
|
||||
}
|
||||
@ -2488,7 +2491,7 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac he peer %pM nss %d mcs cnt %d nss_override 0x%x\n",
|
||||
"he peer %pM nss %d mcs cnt %d nss_override 0x%x\n",
|
||||
sta->addr, arg->peer_nss,
|
||||
arg->peer_he_mcs_count,
|
||||
arg->peer_bw_rxnss_override);
|
||||
@ -2608,7 +2611,7 @@ static void ath11k_peer_assoc_h_qos(struct ath11k *ar,
|
||||
break;
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac peer %pM qos %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "peer %pM qos %d\n",
|
||||
sta->addr, arg->qos_flag);
|
||||
}
|
||||
|
||||
@ -2625,7 +2628,7 @@ static int ath11k_peer_assoc_qos_ap(struct ath11k *ar,
|
||||
|
||||
params.vdev_id = arvif->vdev_id;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac uapsd_queues 0x%x max_sp %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "uapsd_queues 0x%x max_sp %d\n",
|
||||
sta->uapsd_queues, sta->max_sp);
|
||||
|
||||
uapsd = 0;
|
||||
@ -2811,7 +2814,7 @@ static void ath11k_peer_assoc_h_phymode(struct ath11k *ar,
|
||||
break;
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac peer %pM phymode %s\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "peer %pM phymode %s\n",
|
||||
sta->addr, ath11k_wmi_phymode_str(phymode));
|
||||
|
||||
arg->peer_phymode = phymode;
|
||||
@ -3002,7 +3005,7 @@ static void ath11k_bss_assoc(struct ieee80211_hw *hw,
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac vdev %i assoc bssid %pM aid %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "vdev %i assoc bssid %pM aid %d\n",
|
||||
arvif->vdev_id, arvif->bssid, arvif->aid);
|
||||
|
||||
rcu_read_lock();
|
||||
@ -3068,7 +3071,7 @@ static void ath11k_bss_assoc(struct ieee80211_hw *hw,
|
||||
arvif->rekey_data.enable_offload = false;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac vdev %d up (associated) bssid %pM aid %d\n",
|
||||
"vdev %d up (associated) bssid %pM aid %d\n",
|
||||
arvif->vdev_id, bss_conf->bssid, vif->cfg.aid);
|
||||
|
||||
spin_lock_bh(&ar->ab->base_lock);
|
||||
@ -3113,7 +3116,7 @@ static void ath11k_bss_disassoc(struct ieee80211_hw *hw,
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac vdev %i disassoc bssid %pM\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "vdev %i disassoc bssid %pM\n",
|
||||
arvif->vdev_id, arvif->bssid);
|
||||
|
||||
ret = ath11k_wmi_vdev_down(ar, arvif->vdev_id);
|
||||
@ -3262,7 +3265,7 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac obss pd sr_ctrl %x non_srg_thres %u srg_max %u\n",
|
||||
"obss pd sr_ctrl %x non_srg_thres %u srg_max %u\n",
|
||||
he_obss_pd->sr_ctrl, he_obss_pd->non_srg_max_offset,
|
||||
he_obss_pd->max_offset);
|
||||
|
||||
@ -3590,7 +3593,7 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_TXPOWER) {
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac vdev_id %i txpower %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "vdev_id %i txpower %d\n",
|
||||
arvif->vdev_id, info->txpower);
|
||||
|
||||
arvif->txpower = info->txpower;
|
||||
@ -3631,7 +3634,7 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
rate = ATH11K_HW_RATE_CODE(hw_value, 0, preamble);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac vdev %d mcast_rate %x\n",
|
||||
"vdev %d mcast_rate %x\n",
|
||||
arvif->vdev_id, rate);
|
||||
|
||||
vdev_param = WMI_VDEV_PARAM_MCAST_DATA_RATE;
|
||||
@ -3740,7 +3743,7 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
memcpy(arvif->arp_ns_offload.mac_addr, vif->addr, ETH_ALEN);
|
||||
arvif->arp_ns_offload.ipv4_count = ipv4_cnt;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac arp_addr_cnt %d vif->addr %pM, offload_addr %pI4\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "arp_addr_cnt %d vif->addr %pM, offload_addr %pI4\n",
|
||||
vif->cfg.arp_addr_cnt,
|
||||
vif->addr, arvif->arp_ns_offload.ipv4_addr);
|
||||
}
|
||||
@ -4462,7 +4465,7 @@ ath11k_mac_set_peer_he_fixed_rate(struct ath11k_vif *arvif,
|
||||
return -EINVAL;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac setting fixed he rate for peer %pM, device will not switch to any other selected rates",
|
||||
"setting fixed he rate for peer %pM, device will not switch to any other selected rates",
|
||||
sta->addr);
|
||||
|
||||
rate_code = ATH11K_HW_RATE_CODE(he_rate, nss - 1,
|
||||
@ -4704,14 +4707,14 @@ static void ath11k_sta_rc_update_wk(struct work_struct *wk)
|
||||
ath11k_peer_assoc_h_phymode(ar, arvif->vif, sta, &peer_arg);
|
||||
peer_phymode = peer_arg.peer_phymode;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac update sta %pM peer bw %d phymode %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "update sta %pM peer bw %d phymode %d\n",
|
||||
sta->addr, bw, peer_phymode);
|
||||
|
||||
if (bw > bw_prev) {
|
||||
/* BW is upgraded. In this case we send WMI_PEER_PHYMODE
|
||||
* followed by WMI_PEER_CHWIDTH
|
||||
*/
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac BW upgrade for sta %pM new BW %d, old BW %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "BW upgrade for sta %pM new BW %d, old BW %d\n",
|
||||
sta->addr, bw, bw_prev);
|
||||
|
||||
err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
|
||||
@ -4733,7 +4736,7 @@ static void ath11k_sta_rc_update_wk(struct work_struct *wk)
|
||||
/* BW is downgraded. In this case we send WMI_PEER_CHWIDTH
|
||||
* followed by WMI_PEER_PHYMODE
|
||||
*/
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac BW downgrade for sta %pM new BW %d,old BW %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "BW downgrade for sta %pM new BW %d,old BW %d\n",
|
||||
sta->addr, bw, bw_prev);
|
||||
|
||||
err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
|
||||
@ -4755,7 +4758,7 @@ static void ath11k_sta_rc_update_wk(struct work_struct *wk)
|
||||
}
|
||||
|
||||
if (changed & IEEE80211_RC_NSS_CHANGED) {
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac update sta %pM nss %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "update sta %pM nss %d\n",
|
||||
sta->addr, nss);
|
||||
|
||||
err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
|
||||
@ -4766,7 +4769,7 @@ static void ath11k_sta_rc_update_wk(struct work_struct *wk)
|
||||
}
|
||||
|
||||
if (changed & IEEE80211_RC_SMPS_CHANGED) {
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac update sta %pM smps %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "update sta %pM smps %d\n",
|
||||
sta->addr, smps);
|
||||
|
||||
err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
|
||||
@ -5224,7 +5227,7 @@ static void ath11k_mac_op_sta_rc_update(struct ieee80211_hw *hw,
|
||||
spin_unlock_bh(&ar->ab->base_lock);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac sta rc update for %pM changed %08x bw %d nss %d smps %d\n",
|
||||
"sta rc update for %pM changed %08x bw %d nss %d smps %d\n",
|
||||
sta->addr, changed, sta->deflink.bandwidth,
|
||||
sta->deflink.rx_nss,
|
||||
sta->deflink.smps_mode);
|
||||
@ -6035,7 +6038,7 @@ static int ath11k_mac_mgmt_tx_wmi(struct ath11k *ar, struct ath11k_vif *arvif,
|
||||
spin_unlock_bh(&ar->txmgmt_idr_lock);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac tx mgmt frame, buf id %d\n", buf_id);
|
||||
"tx mgmt frame, buf id %d\n", buf_id);
|
||||
|
||||
if (buf_id < 0)
|
||||
return -ENOSPC;
|
||||
@ -6112,7 +6115,7 @@ static void ath11k_mgmt_over_wmi_tx_work(struct work_struct *work)
|
||||
ath11k_mgmt_over_wmi_tx_drop(ar, skb);
|
||||
} else {
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac tx mgmt frame, vdev_id %d\n",
|
||||
"tx mgmt frame, vdev_id %d\n",
|
||||
arvif->vdev_id);
|
||||
}
|
||||
} else {
|
||||
@ -6271,6 +6274,11 @@ static int ath11k_mac_op_start(struct ieee80211_hw *hw)
|
||||
struct ath11k_pdev *pdev = ar->pdev;
|
||||
int ret;
|
||||
|
||||
if (ath11k_ftm_mode) {
|
||||
ath11k_warn(ab, "mac operations not supported in factory test mode\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
ath11k_mac_drain_tx(ar);
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
@ -6285,6 +6293,7 @@ static int ath11k_mac_op_start(struct ieee80211_hw *hw)
|
||||
case ATH11K_STATE_RESTARTED:
|
||||
case ATH11K_STATE_WEDGED:
|
||||
case ATH11K_STATE_ON:
|
||||
case ATH11K_STATE_FTM:
|
||||
WARN_ON(1);
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
@ -6578,7 +6587,7 @@ void ath11k_mac_11d_scan_start(struct ath11k *ar, u32 vdev_id)
|
||||
|
||||
mutex_lock(&ar->ab->vdev_id_11d_lock);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac vdev id for 11d scan %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "vdev id for 11d scan %d\n",
|
||||
ar->vdev_id_11d_scan);
|
||||
|
||||
if (ar->regdom_set_by_user)
|
||||
@ -6597,7 +6606,7 @@ void ath11k_mac_11d_scan_start(struct ath11k *ar, u32 vdev_id)
|
||||
param.start_interval_msec = 0;
|
||||
param.scan_period_msec = ATH11K_SCAN_11D_INTERVAL;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac start 11d scan\n");
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "start 11d scan\n");
|
||||
|
||||
ret = ath11k_wmi_send_11d_scan_start_cmd(ar, ¶m);
|
||||
if (ret) {
|
||||
@ -6626,11 +6635,11 @@ void ath11k_mac_11d_scan_stop(struct ath11k *ar)
|
||||
if (!test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ar->ab->wmi_ab.svc_map))
|
||||
return;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac stop 11d scan\n");
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "stop 11d scan\n");
|
||||
|
||||
mutex_lock(&ar->ab->vdev_id_11d_lock);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac stop 11d vdev id %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "stop 11d vdev id %d\n",
|
||||
ar->vdev_id_11d_scan);
|
||||
|
||||
if (ar->state_11d == ATH11K_11D_PREPARING) {
|
||||
@ -6661,7 +6670,7 @@ void ath11k_mac_11d_scan_stop_all(struct ath11k_base *ab)
|
||||
struct ath11k_pdev *pdev;
|
||||
int i;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC, "mac stop soc 11d scan\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC, "stop soc 11d scan\n");
|
||||
|
||||
for (i = 0; i < ab->num_radios; i++) {
|
||||
pdev = &ab->pdevs[i];
|
||||
@ -6789,7 +6798,7 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
|
||||
break;
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac add interface id %d type %d subtype %d map %llx\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "add interface id %d type %d subtype %d map %llx\n",
|
||||
arvif->vdev_id, arvif->vdev_type, arvif->vdev_subtype,
|
||||
ab->free_vdev_map);
|
||||
|
||||
@ -6980,7 +6989,7 @@ static void ath11k_mac_op_remove_interface(struct ieee80211_hw *hw,
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC, "mac remove interface (vdev %d)\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC, "remove interface (vdev %d)\n",
|
||||
arvif->vdev_id);
|
||||
|
||||
ret = ath11k_spectral_vif_stop(arvif);
|
||||
@ -7135,7 +7144,7 @@ static int ath11k_mac_op_add_chanctx(struct ieee80211_hw *hw,
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC,
|
||||
"mac chanctx add freq %u width %d ptr %pK\n",
|
||||
"chanctx add freq %u width %d ptr %p\n",
|
||||
ctx->def.chan->center_freq, ctx->def.width, ctx);
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
@ -7159,7 +7168,7 @@ static void ath11k_mac_op_remove_chanctx(struct ieee80211_hw *hw,
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC,
|
||||
"mac chanctx remove freq %u width %d ptr %pK\n",
|
||||
"chanctx remove freq %u width %d ptr %p\n",
|
||||
ctx->def.chan->center_freq, ctx->def.width, ctx);
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
@ -7239,7 +7248,7 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
|
||||
arg.channel.passive |= !!(chandef->chan->flags & IEEE80211_CHAN_NO_IR);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC,
|
||||
"mac vdev %d start center_freq %d phymode %s\n",
|
||||
"vdev %d start center_freq %d phymode %s\n",
|
||||
arg.vdev_id, arg.channel.freq,
|
||||
ath11k_wmi_phymode_str(arg.channel.mode));
|
||||
|
||||
@ -7513,7 +7522,7 @@ static void ath11k_mac_op_change_chanctx(struct ieee80211_hw *hw,
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC,
|
||||
"mac chanctx change freq %u width %d ptr %pK changed %x\n",
|
||||
"chanctx change freq %u width %d ptr %p changed %x\n",
|
||||
ctx->def.chan->center_freq, ctx->def.width, ctx, changed);
|
||||
|
||||
/* This shouldn't really happen because channel switching should use
|
||||
@ -7594,7 +7603,7 @@ ath11k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC,
|
||||
"mac chanctx assign ptr %pK vdev_id %i\n",
|
||||
"chanctx assign ptr %p vdev_id %i\n",
|
||||
ctx, arvif->vdev_id);
|
||||
|
||||
/* for QCA6390 bss peer must be created before vdev_start */
|
||||
@ -7684,7 +7693,7 @@ ath11k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC,
|
||||
"mac chanctx unassign ptr %pK vdev_id %i\n",
|
||||
"chanctx unassign ptr %p vdev_id %i\n",
|
||||
ctx, arvif->vdev_id);
|
||||
|
||||
WARN_ON(!arvif->is_started);
|
||||
@ -7728,7 +7737,7 @@ ath11k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
arvif->bssid, arvif->vdev_id, ret);
|
||||
else
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac removed peer %pM vdev %d after vdev stop\n",
|
||||
"removed peer %pM vdev %d after vdev stop\n",
|
||||
arvif->bssid, arvif->vdev_id);
|
||||
}
|
||||
|
||||
@ -7763,7 +7772,7 @@ ath11k_mac_op_switch_vif_chanctx(struct ieee80211_hw *hw,
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac chanctx switch n_vifs %d mode %d\n",
|
||||
"chanctx switch n_vifs %d mode %d\n",
|
||||
n_vifs, mode);
|
||||
ath11k_mac_update_vif_chan(ar, vifs, n_vifs);
|
||||
|
||||
@ -8095,7 +8104,7 @@ static int ath11k_mac_set_rate_params(struct ath11k_vif *arvif,
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac set rate params vdev %i rate 0x%02x nss 0x%02x sgi 0x%02x ldpc 0x%02x he_gi 0x%02x he_ltf 0x%02x he_fixed_rate %d\n",
|
||||
"set rate params vdev %i rate 0x%02x nss 0x%02x sgi 0x%02x ldpc 0x%02x he_gi 0x%02x he_ltf 0x%02x he_fixed_rate %d\n",
|
||||
arvif->vdev_id, rate, nss, sgi, ldpc, he_gi,
|
||||
he_ltf, he_fixed_rate);
|
||||
|
||||
@ -8600,7 +8609,7 @@ static void ath11k_mac_put_chain_rssi(struct station_info *sinfo,
|
||||
arsta->chain_signal[i] = ATH11K_INVALID_RSSI_FULL;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac sta statistics %s rssi[%d] %d\n", pre, i, rssi);
|
||||
"sta statistics %s rssi[%d] %d\n", pre, i, rssi);
|
||||
|
||||
if (rssi != ATH11K_DEFAULT_NOISE_FLOOR &&
|
||||
rssi != ATH11K_INVALID_RSSI_FULL &&
|
||||
@ -8664,7 +8673,7 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw,
|
||||
signal = arsta->rssi_beacon;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac sta statistics db2dbm %u rssi comb %d rssi beacon %d\n",
|
||||
"sta statistics db2dbm %u rssi comb %d rssi beacon %d\n",
|
||||
db2dbm, arsta->rssi_comb, arsta->rssi_beacon);
|
||||
|
||||
if (signal) {
|
||||
@ -8711,7 +8720,7 @@ static void ath11k_mac_op_ipv6_changed(struct ieee80211_hw *hw,
|
||||
struct list_head *p;
|
||||
u32 count, scope;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac op ipv6 changed\n");
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "op ipv6 changed\n");
|
||||
|
||||
offload = &arvif->arp_ns_offload;
|
||||
count = 0;
|
||||
@ -8736,7 +8745,7 @@ static void ath11k_mac_op_ipv6_changed(struct ieee80211_hw *hw,
|
||||
memcpy(offload->ipv6_addr[count], &ifa6->addr.s6_addr,
|
||||
sizeof(ifa6->addr.s6_addr));
|
||||
offload->ipv6_type[count] = ATH11K_IPV6_UC_TYPE;
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac count %d ipv6 uc %pI6 scope %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "count %d ipv6 uc %pI6 scope %d\n",
|
||||
count, offload->ipv6_addr[count],
|
||||
scope);
|
||||
count++;
|
||||
@ -8756,7 +8765,7 @@ static void ath11k_mac_op_ipv6_changed(struct ieee80211_hw *hw,
|
||||
memcpy(offload->ipv6_addr[count], &ifaca6->aca_addr,
|
||||
sizeof(ifaca6->aca_addr));
|
||||
offload->ipv6_type[count] = ATH11K_IPV6_AC_TYPE;
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac count %d ipv6 ac %pI6 scope %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "count %d ipv6 ac %pI6 scope %d\n",
|
||||
count, offload->ipv6_addr[count],
|
||||
scope);
|
||||
count++;
|
||||
@ -8782,7 +8791,7 @@ static void ath11k_mac_op_set_rekey_data(struct ieee80211_hw *hw,
|
||||
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
|
||||
struct ath11k_rekey_data *rekey_data = &arvif->rekey_data;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac set rekey data vdev %d\n",
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "set rekey data vdev %d\n",
|
||||
arvif->vdev_id);
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
@ -9783,6 +9792,7 @@ void ath11k_mac_destroy(struct ath11k_base *ab)
|
||||
if (!ar)
|
||||
continue;
|
||||
|
||||
ath11k_fw_stats_free(&ar->fw_stats);
|
||||
ieee80211_free_hw(ar->hw);
|
||||
pdev->ar = NULL;
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ void ath11k_mhi_set_mhictrl_reset(struct ath11k_base *ab)
|
||||
|
||||
val = ath11k_pcic_read32(ab, MHISTATUS);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "MHISTATUS 0x%x\n", val);
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "mhistatus 0x%x\n", val);
|
||||
|
||||
/* Observed on QCA6390 that after SOC_GLOBAL_RESET, MHISTATUS
|
||||
* has SYSERR bit set and thus need to set MHICTRL_RESET
|
||||
@ -263,7 +263,7 @@ static int ath11k_mhi_get_msi(struct ath11k_pci *ab_pci)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "Number of assigned MSI for MHI is %d, base vector is %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "num_vectors %d base_vector %d\n",
|
||||
num_vectors, base_vector);
|
||||
|
||||
irq = kcalloc(num_vectors, sizeof(int), GFP_KERNEL);
|
||||
@ -325,7 +325,7 @@ static void ath11k_mhi_op_status_cb(struct mhi_controller *mhi_cntrl,
|
||||
{
|
||||
struct ath11k_base *ab = dev_get_drvdata(mhi_cntrl->cntrl_dev);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "mhi notify status reason %s\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "notify status reason %s\n",
|
||||
ath11k_mhi_op_callback_to_str(cb));
|
||||
|
||||
switch (cb) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@ -203,10 +203,10 @@ static void ath11k_pci_clear_dbg_registers(struct ath11k_base *ab)
|
||||
|
||||
/* read cookie */
|
||||
val = ath11k_pcic_read32(ab, PCIE_Q6_COOKIE_ADDR);
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "cookie:0x%x\n", val);
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "pcie_q6_cookie_addr 0x%x\n", val);
|
||||
|
||||
val = ath11k_pcic_read32(ab, WLAON_WARM_SW_ENTRY);
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "WLAON_WARM_SW_ENTRY 0x%x\n", val);
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "wlaon_warm_sw_entry 0x%x\n", val);
|
||||
|
||||
/* TODO: exact time to sleep is uncertain */
|
||||
mdelay(10);
|
||||
@ -218,13 +218,13 @@ static void ath11k_pci_clear_dbg_registers(struct ath11k_base *ab)
|
||||
mdelay(10);
|
||||
|
||||
val = ath11k_pcic_read32(ab, WLAON_WARM_SW_ENTRY);
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "WLAON_WARM_SW_ENTRY 0x%x\n", val);
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "wlaon_warm_sw_entry 0x%x\n", val);
|
||||
|
||||
/* A read clear register. clear the register to prevent
|
||||
* Q6 from entering wrong code path.
|
||||
*/
|
||||
val = ath11k_pcic_read32(ab, WLAON_SOC_RESET_CAUSE_REG);
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "soc reset cause:%d\n", val);
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "soc reset cause %d\n", val);
|
||||
}
|
||||
|
||||
static int ath11k_pci_set_link_reg(struct ath11k_base *ab,
|
||||
@ -312,14 +312,14 @@ static void ath11k_pci_enable_ltssm(struct ath11k_base *ab)
|
||||
val = ath11k_pcic_read32(ab, PCIE_PCIE_PARF_LTSSM);
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "pci ltssm 0x%x\n", val);
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "ltssm 0x%x\n", val);
|
||||
|
||||
val = ath11k_pcic_read32(ab, GCC_GCC_PCIE_HOT_RST);
|
||||
val |= GCC_GCC_PCIE_HOT_RST_VAL;
|
||||
ath11k_pcic_write32(ab, GCC_GCC_PCIE_HOT_RST, val);
|
||||
val = ath11k_pcic_read32(ab, GCC_GCC_PCIE_HOT_RST);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "pci pcie_hot_rst 0x%x\n", val);
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "pcie_hot_rst 0x%x\n", val);
|
||||
|
||||
mdelay(5);
|
||||
}
|
||||
@ -433,7 +433,7 @@ static int ath11k_pci_alloc_msi(struct ath11k_pci *ab_pci)
|
||||
}
|
||||
clear_bit(ATH11K_FLAG_MULTI_MSI_VECTORS, &ab->dev_flags);
|
||||
ab->pci.msi.config = &msi_config_one_msi;
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "request MSI one vector\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "request one msi vector\n");
|
||||
}
|
||||
ath11k_info(ab, "MSI vectors: %d\n", num_vectors);
|
||||
|
||||
@ -487,7 +487,7 @@ static int ath11k_pci_config_msi_data(struct ath11k_pci *ab_pci)
|
||||
|
||||
ab_pci->ab->pci.msi.ep_base_data = msi_desc->msg.data;
|
||||
|
||||
ath11k_dbg(ab_pci->ab, ATH11K_DBG_PCI, "pci after request_irq msi_ep_base_data %d\n",
|
||||
ath11k_dbg(ab_pci->ab, ATH11K_DBG_PCI, "after request_irq msi_ep_base_data %d\n",
|
||||
ab_pci->ab->pci.msi.ep_base_data);
|
||||
|
||||
return 0;
|
||||
@ -545,7 +545,7 @@ static int ath11k_pci_claim(struct ath11k_pci *ab_pci, struct pci_dev *pdev)
|
||||
|
||||
ab->mem_ce = ab->mem;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot pci_mem 0x%pK\n", ab->mem);
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "pci_mem 0x%p\n", ab->mem);
|
||||
return 0;
|
||||
|
||||
release_region:
|
||||
@ -575,7 +575,7 @@ static void ath11k_pci_aspm_disable(struct ath11k_pci *ab_pci)
|
||||
pcie_capability_read_word(ab_pci->pdev, PCI_EXP_LNKCTL,
|
||||
&ab_pci->link_ctl);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "pci link_ctl 0x%04x L0s %d L1 %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "link_ctl 0x%04x L0s %d L1 %d\n",
|
||||
ab_pci->link_ctl,
|
||||
u16_get_bits(ab_pci->link_ctl, PCI_EXP_LNKCTL_ASPM_L0S),
|
||||
u16_get_bits(ab_pci->link_ctl, PCI_EXP_LNKCTL_ASPM_L1));
|
||||
@ -709,7 +709,7 @@ static void ath11k_pci_read_hw_version(struct ath11k_base *ab, u32 *major, u32 *
|
||||
*minor = FIELD_GET(TCSR_SOC_HW_VERSION_MINOR_MASK,
|
||||
soc_hw_version);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "pci tcsr_soc_hw_version major %d minor %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI, "tcsr_soc_hw_version major %d minor %d\n",
|
||||
*major, *minor);
|
||||
}
|
||||
|
||||
@ -745,6 +745,7 @@ static int ath11k_pci_probe(struct pci_dev *pdev,
|
||||
ab_pci->ab = ab;
|
||||
ab_pci->pdev = pdev;
|
||||
ab->hif.ops = &ath11k_pci_hif_ops;
|
||||
ab->fw_mode = ATH11K_FIRMWARE_MODE_NORMAL;
|
||||
pci_set_drvdata(pdev, ab);
|
||||
spin_lock_init(&ab_pci->window_lock);
|
||||
|
||||
|
@ -263,7 +263,7 @@ int ath11k_pcic_get_user_msi_assignment(struct ath11k_base *ab, char *user_name,
|
||||
*user_base_data = *base_vector + ab->pci.msi.ep_base_data;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI,
|
||||
"Assign MSI to user: %s, num_vectors: %d, user_base_data: %u, base_vector: %u\n",
|
||||
"msi assignment %s num_vectors %d user_base_data %u base_vector %u\n",
|
||||
user_name, *num_vectors, *user_base_data,
|
||||
*base_vector);
|
||||
|
||||
@ -527,7 +527,7 @@ static irqreturn_t ath11k_pcic_ext_interrupt_handler(int irq, void *arg)
|
||||
if (!test_bit(ATH11K_FLAG_EXT_IRQ_ENABLED, &ab->dev_flags))
|
||||
return IRQ_HANDLED;
|
||||
|
||||
ath11k_dbg(irq_grp->ab, ATH11K_DBG_PCI, "ext irq:%d\n", irq);
|
||||
ath11k_dbg(irq_grp->ab, ATH11K_DBG_PCI, "ext irq %d\n", irq);
|
||||
|
||||
/* last interrupt received for this group */
|
||||
irq_grp->timestamp = jiffies;
|
||||
@ -597,7 +597,7 @@ static int ath11k_pcic_ext_irq_config(struct ath11k_base *ab)
|
||||
ab->irq_num[irq_idx] = irq;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_PCI,
|
||||
"irq:%d group:%d\n", irq, i);
|
||||
"irq %d group %d\n", irq, i);
|
||||
|
||||
irq_set_status_flags(irq, IRQ_DISABLE_UNLAZY);
|
||||
ret = request_irq(irq, ath11k_pcic_ext_interrupt_handler,
|
||||
|
@ -106,7 +106,7 @@ void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "htt peer unmap vdev %d peer %pM id %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "peer unmap vdev %d peer %pM id %d\n",
|
||||
peer->vdev_id, peer->addr, peer_id);
|
||||
|
||||
list_del(&peer->list);
|
||||
@ -138,7 +138,7 @@ void ath11k_peer_map_event(struct ath11k_base *ab, u8 vdev_id, u16 peer_id,
|
||||
wake_up(&ab->peer_mapping_wq);
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "htt peer map vdev %d peer %pM id %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "peer map vdev %d peer %pM id %d\n",
|
||||
vdev_id, mac_addr, peer_id);
|
||||
|
||||
exit:
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/elf.h>
|
||||
@ -1755,7 +1755,7 @@ static int ath11k_qmi_host_cap_send(struct ath11k_base *ab)
|
||||
|
||||
req.nm_modem |= PLATFORM_CAP_PCIE_PME_D3COLD;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi host cap request\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "host cap request\n");
|
||||
|
||||
ret = qmi_txn_init(&ab->qmi.handle, &txn,
|
||||
qmi_wlanfw_host_cap_resp_msg_v01_ei, &resp);
|
||||
@ -1833,7 +1833,7 @@ static int ath11k_qmi_fw_ind_register_send(struct ath11k_base *ab)
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi indication register request\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "indication register request\n");
|
||||
|
||||
ret = qmi_send_request(&ab->qmi.handle, NULL, &txn,
|
||||
QMI_WLANFW_IND_REGISTER_REQ_V01,
|
||||
@ -1889,7 +1889,7 @@ static int ath11k_qmi_respond_fw_mem_request(struct ath11k_base *ab)
|
||||
test_bit(ATH11K_FLAG_FIXED_MEM_RGN, &ab->dev_flags)) &&
|
||||
ab->qmi.target_mem_delayed) {
|
||||
delayed = true;
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi delays mem_request %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "delays mem_request %d\n",
|
||||
ab->qmi.mem_seg_count);
|
||||
memset(req, 0, sizeof(*req));
|
||||
} else {
|
||||
@ -1901,7 +1901,7 @@ static int ath11k_qmi_respond_fw_mem_request(struct ath11k_base *ab)
|
||||
req->mem_seg[i].size = ab->qmi.target_mem[i].size;
|
||||
req->mem_seg[i].type = ab->qmi.target_mem[i].type;
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI,
|
||||
"qmi req mem_seg[%d] %pad %u %u\n", i,
|
||||
"req mem_seg[%d] %pad %u %u\n", i,
|
||||
&ab->qmi.target_mem[i].paddr,
|
||||
ab->qmi.target_mem[i].size,
|
||||
ab->qmi.target_mem[i].type);
|
||||
@ -1913,7 +1913,7 @@ static int ath11k_qmi_respond_fw_mem_request(struct ath11k_base *ab)
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi respond memory request delayed %i\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "respond memory request delayed %i\n",
|
||||
delayed);
|
||||
|
||||
ret = qmi_send_request(&ab->qmi.handle, NULL, &txn,
|
||||
@ -2002,7 +2002,7 @@ static int ath11k_qmi_alloc_target_mem_chunk(struct ath11k_base *ab)
|
||||
if (!chunk->vaddr) {
|
||||
if (ab->qmi.mem_seg_count <= ATH11K_QMI_FW_MEM_REQ_SEGMENT_CNT) {
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI,
|
||||
"qmi dma allocation failed (%d B type %u), will try later with small size\n",
|
||||
"dma allocation failed (%d B type %u), will try later with small size\n",
|
||||
chunk->size,
|
||||
chunk->type);
|
||||
ath11k_qmi_free_target_mem_chunk(ab);
|
||||
@ -2036,7 +2036,7 @@ static int ath11k_qmi_assign_target_mem_chunk(struct ath11k_base *ab)
|
||||
hremote_node = of_parse_phandle(dev->of_node, "memory-region", 0);
|
||||
if (!hremote_node) {
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI,
|
||||
"qmi fail to get hremote_node\n");
|
||||
"fail to get hremote_node\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@ -2044,13 +2044,13 @@ static int ath11k_qmi_assign_target_mem_chunk(struct ath11k_base *ab)
|
||||
of_node_put(hremote_node);
|
||||
if (ret) {
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI,
|
||||
"qmi fail to get reg from hremote\n");
|
||||
"fail to get reg from hremote\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (res.end - res.start + 1 < ab->qmi.target_mem[i].size) {
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI,
|
||||
"qmi fail to assign memory of sz\n");
|
||||
"fail to assign memory of sz\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -2058,6 +2058,9 @@ static int ath11k_qmi_assign_target_mem_chunk(struct ath11k_base *ab)
|
||||
ab->qmi.target_mem[idx].iaddr =
|
||||
ioremap(ab->qmi.target_mem[idx].paddr,
|
||||
ab->qmi.target_mem[i].size);
|
||||
if (!ab->qmi.target_mem[idx].iaddr)
|
||||
return -EIO;
|
||||
|
||||
ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size;
|
||||
host_ddr_sz = ab->qmi.target_mem[i].size;
|
||||
ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type;
|
||||
@ -2083,6 +2086,8 @@ static int ath11k_qmi_assign_target_mem_chunk(struct ath11k_base *ab)
|
||||
ab->qmi.target_mem[idx].iaddr =
|
||||
ioremap(ab->qmi.target_mem[idx].paddr,
|
||||
ab->qmi.target_mem[i].size);
|
||||
if (!ab->qmi.target_mem[idx].iaddr)
|
||||
return -EIO;
|
||||
} else {
|
||||
ab->qmi.target_mem[idx].paddr =
|
||||
ATH11K_QMI_CALDB_ADDRESS;
|
||||
@ -2198,7 +2203,7 @@ static int ath11k_qmi_request_target_cap(struct ath11k_base *ab)
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi target cap request\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "target cap request\n");
|
||||
|
||||
ret = qmi_send_request(&ab->qmi.handle, NULL, &txn,
|
||||
QMI_WLANFW_CAP_REQ_V01,
|
||||
@ -2251,7 +2256,7 @@ static int ath11k_qmi_request_target_cap(struct ath11k_base *ab)
|
||||
if (resp.eeprom_read_timeout_valid) {
|
||||
ab->qmi.target.eeprom_caldata =
|
||||
resp.eeprom_read_timeout;
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi cal data supported from eeprom\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "cal data supported from eeprom\n");
|
||||
}
|
||||
|
||||
fw_build_id = ab->qmi.target.fw_build_id;
|
||||
@ -2348,7 +2353,7 @@ static int ath11k_qmi_load_file_target_mem(struct ath11k_base *ab,
|
||||
if (ret < 0)
|
||||
goto err_iounmap;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi bdf download req fixed addr type %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "bdf download req fixed addr type %d\n",
|
||||
type);
|
||||
|
||||
ret = qmi_send_request(&ab->qmi.handle, NULL, &txn,
|
||||
@ -2381,7 +2386,7 @@ static int ath11k_qmi_load_file_target_mem(struct ath11k_base *ab,
|
||||
remaining -= req->data_len;
|
||||
temp += req->data_len;
|
||||
req->seg_id++;
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi bdf download request remaining %i\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "bdf download request remaining %i\n",
|
||||
remaining);
|
||||
}
|
||||
}
|
||||
@ -2427,7 +2432,7 @@ static int ath11k_qmi_load_bdf_qmi(struct ath11k_base *ab,
|
||||
else
|
||||
bdf_type = ATH11K_QMI_BDF_TYPE_BIN;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi bdf_type %d\n", bdf_type);
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "bdf_type %d\n", bdf_type);
|
||||
|
||||
fw_size = min_t(u32, ab->hw_params.fw.board_size, bd.len);
|
||||
|
||||
@ -2457,6 +2462,14 @@ static int ath11k_qmi_load_bdf_qmi(struct ath11k_base *ab,
|
||||
|
||||
fw_entry = ath11k_core_firmware_request(ab, ATH11K_DEFAULT_CAL_FILE);
|
||||
if (IS_ERR(fw_entry)) {
|
||||
/* Caldata may not be present during first time calibration in
|
||||
* factory hence allow to boot without loading caldata in ftm mode
|
||||
*/
|
||||
if (ath11k_ftm_mode) {
|
||||
ath11k_info(ab,
|
||||
"Booting without cal data file in factory test mode\n");
|
||||
return 0;
|
||||
}
|
||||
ret = PTR_ERR(fw_entry);
|
||||
ath11k_warn(ab,
|
||||
"qmi failed to load CAL data file:%s\n",
|
||||
@ -2474,14 +2487,14 @@ success:
|
||||
goto out_qmi_cal;
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi caldata type: %u\n", file_type);
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "caldata type: %u\n", file_type);
|
||||
|
||||
out_qmi_cal:
|
||||
if (!ab->qmi.target.eeprom_caldata)
|
||||
release_firmware(fw_entry);
|
||||
out:
|
||||
ath11k_core_free_bdf(ab, &bd);
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi BDF download sequence completed\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "BDF download sequence completed\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -2566,7 +2579,7 @@ static int ath11k_qmi_wlanfw_m3_info_send(struct ath11k_base *ab)
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi m3 info req\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "m3 info req\n");
|
||||
|
||||
ret = qmi_send_request(&ab->qmi.handle, NULL, &txn,
|
||||
QMI_WLANFW_M3_INFO_REQ_V01,
|
||||
@ -2615,7 +2628,7 @@ static int ath11k_qmi_wlanfw_mode_send(struct ath11k_base *ab,
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi wlan mode req mode %d\n", mode);
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "wlan mode req mode %d\n", mode);
|
||||
|
||||
ret = qmi_send_request(&ab->qmi.handle, NULL, &txn,
|
||||
QMI_WLANFW_WLAN_MODE_REQ_V01,
|
||||
@ -2710,7 +2723,7 @@ static int ath11k_qmi_wlanfw_wlan_cfg_send(struct ath11k_base *ab)
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi wlan cfg req\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "wlan cfg req\n");
|
||||
|
||||
ret = qmi_send_request(&ab->qmi.handle, NULL, &txn,
|
||||
QMI_WLANFW_WLAN_CFG_REQ_V01,
|
||||
@ -2787,7 +2800,7 @@ void ath11k_qmi_firmware_stop(struct ath11k_base *ab)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi firmware stop\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "firmware stop\n");
|
||||
|
||||
ret = ath11k_qmi_wlanfw_mode_send(ab, ATH11K_FIRMWARE_MODE_OFF);
|
||||
if (ret < 0) {
|
||||
@ -2801,7 +2814,7 @@ int ath11k_qmi_firmware_start(struct ath11k_base *ab,
|
||||
{
|
||||
int ret;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi firmware start\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "firmware start\n");
|
||||
|
||||
if (ab->hw_params.fw_wmi_diag_event) {
|
||||
ret = ath11k_qmi_wlanfw_wlan_ini_send(ab, true);
|
||||
@ -2959,7 +2972,7 @@ static void ath11k_qmi_msg_mem_request_cb(struct qmi_handle *qmi_hdl,
|
||||
const struct qmi_wlanfw_request_mem_ind_msg_v01 *msg = data;
|
||||
int i, ret;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi firmware request memory request\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "firmware request memory request\n");
|
||||
|
||||
if (msg->mem_seg_len == 0 ||
|
||||
msg->mem_seg_len > ATH11K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01)
|
||||
@ -2971,7 +2984,7 @@ static void ath11k_qmi_msg_mem_request_cb(struct qmi_handle *qmi_hdl,
|
||||
for (i = 0; i < qmi->mem_seg_count ; i++) {
|
||||
ab->qmi.target_mem[i].type = msg->mem_seg[i].type;
|
||||
ab->qmi.target_mem[i].size = msg->mem_seg[i].size;
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi mem seg type %d size %d\n",
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "mem seg type %d size %d\n",
|
||||
msg->mem_seg[i].type, msg->mem_seg[i].size);
|
||||
}
|
||||
|
||||
@ -3003,7 +3016,7 @@ static void ath11k_qmi_msg_mem_ready_cb(struct qmi_handle *qmi_hdl,
|
||||
struct ath11k_qmi *qmi = container_of(qmi_hdl, struct ath11k_qmi, handle);
|
||||
struct ath11k_base *ab = qmi->ab;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi firmware memory ready indication\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "firmware memory ready indication\n");
|
||||
ath11k_qmi_driver_event_post(qmi, ATH11K_QMI_EVENT_FW_MEM_READY, NULL);
|
||||
}
|
||||
|
||||
@ -3015,7 +3028,7 @@ static void ath11k_qmi_msg_fw_ready_cb(struct qmi_handle *qmi_hdl,
|
||||
struct ath11k_qmi *qmi = container_of(qmi_hdl, struct ath11k_qmi, handle);
|
||||
struct ath11k_base *ab = qmi->ab;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi firmware ready\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "firmware ready\n");
|
||||
|
||||
if (!ab->qmi.cal_done) {
|
||||
ab->qmi.cal_done = 1;
|
||||
@ -3036,7 +3049,7 @@ static void ath11k_qmi_msg_cold_boot_cal_done_cb(struct qmi_handle *qmi_hdl,
|
||||
|
||||
ab->qmi.cal_done = 1;
|
||||
wake_up(&ab->qmi.cold_boot_waitq);
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi cold boot calibration done\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "cold boot calibration done\n");
|
||||
}
|
||||
|
||||
static void ath11k_qmi_msg_fw_init_done_cb(struct qmi_handle *qmi_hdl,
|
||||
@ -3049,7 +3062,7 @@ static void ath11k_qmi_msg_fw_init_done_cb(struct qmi_handle *qmi_hdl,
|
||||
struct ath11k_base *ab = qmi->ab;
|
||||
|
||||
ath11k_qmi_driver_event_post(qmi, ATH11K_QMI_EVENT_FW_INIT_DONE, NULL);
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi firmware init done\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "firmware init done\n");
|
||||
}
|
||||
|
||||
static const struct qmi_msg_handler ath11k_qmi_msg_handlers[] = {
|
||||
@ -3114,7 +3127,7 @@ static int ath11k_qmi_ops_new_server(struct qmi_handle *qmi_hdl,
|
||||
return ret;
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi wifi fw qmi service connected\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "wifi fw qmi service connected\n");
|
||||
ath11k_qmi_driver_event_post(qmi, ATH11K_QMI_EVENT_SERVER_ARRIVE, NULL);
|
||||
|
||||
return ret;
|
||||
@ -3126,7 +3139,7 @@ static void ath11k_qmi_ops_del_server(struct qmi_handle *qmi_hdl,
|
||||
struct ath11k_qmi *qmi = container_of(qmi_hdl, struct ath11k_qmi, handle);
|
||||
struct ath11k_base *ab = qmi->ab;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi wifi fw del server\n");
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "wifi fw del server\n");
|
||||
ath11k_qmi_driver_event_post(qmi, ATH11K_QMI_EVENT_SERVER_EXIT, NULL);
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ int ath11k_reg_update_chan_list(struct ath11k *ar, bool wait)
|
||||
ar->state_11d = ATH11K_11D_IDLE;
|
||||
}
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_REG,
|
||||
"reg 11d scan wait left time %d\n", left);
|
||||
"11d scan wait left time %d\n", left);
|
||||
}
|
||||
|
||||
if (wait &&
|
||||
@ -136,7 +136,7 @@ int ath11k_reg_update_chan_list(struct ath11k *ar, bool wait)
|
||||
"failed to receive hw scan complete: timed out\n");
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_REG,
|
||||
"reg hw scan wait left time %d\n", left);
|
||||
"hw scan wait left time %d\n", left);
|
||||
}
|
||||
|
||||
if (ar->state == ATH11K_STATE_RESTARTING)
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "testmode.h"
|
||||
@ -11,6 +12,9 @@
|
||||
#include "core.h"
|
||||
#include "testmode_i.h"
|
||||
|
||||
#define ATH11K_FTM_SEGHDR_CURRENT_SEQ GENMASK(3, 0)
|
||||
#define ATH11K_FTM_SEGHDR_TOTAL_SEGMENTS GENMASK(7, 4)
|
||||
|
||||
static const struct nla_policy ath11k_tm_policy[ATH11K_TM_ATTR_MAX + 1] = {
|
||||
[ATH11K_TM_ATTR_CMD] = { .type = NLA_U32 },
|
||||
[ATH11K_TM_ATTR_DATA] = { .type = NLA_BINARY,
|
||||
@ -20,58 +24,162 @@ static const struct nla_policy ath11k_tm_policy[ATH11K_TM_ATTR_MAX + 1] = {
|
||||
[ATH11K_TM_ATTR_VERSION_MINOR] = { .type = NLA_U32 },
|
||||
};
|
||||
|
||||
/* Returns true if callee consumes the skb and the skb should be discarded.
|
||||
* Returns false if skb is not used. Does not sleep.
|
||||
static struct ath11k *ath11k_tm_get_ar(struct ath11k_base *ab)
|
||||
{
|
||||
struct ath11k_pdev *pdev;
|
||||
struct ath11k *ar = NULL;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ab->num_radios; i++) {
|
||||
pdev = &ab->pdevs[i];
|
||||
ar = pdev->ar;
|
||||
|
||||
if (ar && ar->state == ATH11K_STATE_FTM)
|
||||
break;
|
||||
}
|
||||
|
||||
return ar;
|
||||
}
|
||||
|
||||
/* This function handles unsegmented events. Data in various events are aggregated
|
||||
* in application layer, this event is unsegmented from host perspective.
|
||||
*/
|
||||
bool ath11k_tm_event_wmi(struct ath11k *ar, u32 cmd_id, struct sk_buff *skb)
|
||||
static void ath11k_tm_wmi_event_unsegmented(struct ath11k_base *ab, u32 cmd_id,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
struct sk_buff *nl_skb;
|
||||
bool consumed;
|
||||
int ret;
|
||||
struct ath11k *ar;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_TESTMODE,
|
||||
"testmode event wmi cmd_id %d skb %pK skb->len %d\n",
|
||||
cmd_id, skb, skb->len);
|
||||
ath11k_dbg(ab, ATH11K_DBG_TESTMODE,
|
||||
"event wmi cmd_id %d skb length %d\n",
|
||||
cmd_id, skb->len);
|
||||
ath11k_dbg_dump(ab, ATH11K_DBG_TESTMODE, NULL, "", skb->data, skb->len);
|
||||
|
||||
ath11k_dbg_dump(ar->ab, ATH11K_DBG_TESTMODE, NULL, "", skb->data, skb->len);
|
||||
ar = ath11k_tm_get_ar(ab);
|
||||
if (!ar) {
|
||||
ath11k_warn(ab, "testmode event not handled due to invalid pdev\n");
|
||||
return;
|
||||
}
|
||||
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
|
||||
consumed = true;
|
||||
|
||||
nl_skb = cfg80211_testmode_alloc_event_skb(ar->hw->wiphy,
|
||||
2 * sizeof(u32) + skb->len,
|
||||
2 * nla_total_size(sizeof(u32)) +
|
||||
nla_total_size(skb->len),
|
||||
GFP_ATOMIC);
|
||||
if (!nl_skb) {
|
||||
ath11k_warn(ar->ab,
|
||||
"failed to allocate skb for testmode wmi event\n");
|
||||
ath11k_warn(ab,
|
||||
"failed to allocate skb for unsegmented testmode wmi event\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = nla_put_u32(nl_skb, ATH11K_TM_ATTR_CMD, ATH11K_TM_CMD_WMI);
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab,
|
||||
"failed to put testmode wmi event cmd attribute: %d\n",
|
||||
ret);
|
||||
if (nla_put_u32(nl_skb, ATH11K_TM_ATTR_CMD, ATH11K_TM_CMD_WMI) ||
|
||||
nla_put_u32(nl_skb, ATH11K_TM_ATTR_WMI_CMDID, cmd_id) ||
|
||||
nla_put(nl_skb, ATH11K_TM_ATTR_DATA, skb->len, skb->data)) {
|
||||
ath11k_warn(ab, "failed to populate testmode unsegmented event\n");
|
||||
kfree_skb(nl_skb);
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = nla_put_u32(nl_skb, ATH11K_TM_ATTR_WMI_CMDID, cmd_id);
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab,
|
||||
"failed to put testmode wmi even cmd_id: %d\n",
|
||||
ret);
|
||||
kfree_skb(nl_skb);
|
||||
cfg80211_testmode_event(nl_skb, GFP_ATOMIC);
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
return;
|
||||
|
||||
out:
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
ath11k_warn(ab, "Failed to send testmode event to higher layers\n");
|
||||
}
|
||||
|
||||
/* This function handles segmented events. Data of various events received
|
||||
* from firmware is aggregated and sent to application layer
|
||||
*/
|
||||
static int ath11k_tm_process_event(struct ath11k_base *ab, u32 cmd_id,
|
||||
const struct wmi_ftm_event_msg *ftm_msg,
|
||||
u16 length)
|
||||
{
|
||||
struct sk_buff *nl_skb;
|
||||
int ret = 0;
|
||||
struct ath11k *ar;
|
||||
u8 const *buf_pos;
|
||||
u16 datalen;
|
||||
u8 total_segments, current_seq;
|
||||
u32 data_pos;
|
||||
u32 pdev_id;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_TESTMODE,
|
||||
"event wmi cmd_id %d ftm event msg %pK datalen %d\n",
|
||||
cmd_id, ftm_msg, length);
|
||||
ath11k_dbg_dump(ab, ATH11K_DBG_TESTMODE, NULL, "", ftm_msg, length);
|
||||
pdev_id = DP_HW2SW_MACID(ftm_msg->seg_hdr.pdev_id);
|
||||
|
||||
if (pdev_id >= ab->num_radios) {
|
||||
ath11k_warn(ab, "testmode event not handled due to invalid pdev id: %d\n",
|
||||
pdev_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ar = ab->pdevs[pdev_id].ar;
|
||||
if (!ar) {
|
||||
ath11k_warn(ab, "testmode event not handled due to absence of pdev\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
current_seq = FIELD_GET(ATH11K_FTM_SEGHDR_CURRENT_SEQ,
|
||||
ftm_msg->seg_hdr.segmentinfo);
|
||||
total_segments = FIELD_GET(ATH11K_FTM_SEGHDR_TOTAL_SEGMENTS,
|
||||
ftm_msg->seg_hdr.segmentinfo);
|
||||
datalen = length - (sizeof(struct wmi_ftm_seg_hdr));
|
||||
buf_pos = ftm_msg->data;
|
||||
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
|
||||
if (current_seq == 0) {
|
||||
ab->testmode.expected_seq = 0;
|
||||
ab->testmode.data_pos = 0;
|
||||
}
|
||||
|
||||
data_pos = ab->testmode.data_pos;
|
||||
|
||||
if ((data_pos + datalen) > ATH11K_FTM_EVENT_MAX_BUF_LENGTH) {
|
||||
ath11k_warn(ab, "Invalid ftm event length at %d: %d\n",
|
||||
data_pos, datalen);
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = nla_put(nl_skb, ATH11K_TM_ATTR_DATA, skb->len, skb->data);
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab,
|
||||
"failed to copy skb to testmode wmi event: %d\n",
|
||||
ret);
|
||||
memcpy(&ab->testmode.eventdata[data_pos], buf_pos, datalen);
|
||||
data_pos += datalen;
|
||||
|
||||
if (++ab->testmode.expected_seq != total_segments) {
|
||||
ab->testmode.data_pos = data_pos;
|
||||
ath11k_dbg(ab, ATH11K_DBG_TESTMODE,
|
||||
"partial data received current_seq %d total_seg %d\n",
|
||||
current_seq, total_segments);
|
||||
goto out;
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_TESTMODE,
|
||||
"total data length pos %d len %d\n",
|
||||
data_pos, ftm_msg->seg_hdr.len);
|
||||
nl_skb = cfg80211_testmode_alloc_event_skb(ar->hw->wiphy,
|
||||
2 * nla_total_size(sizeof(u32)) +
|
||||
nla_total_size(data_pos),
|
||||
GFP_ATOMIC);
|
||||
if (!nl_skb) {
|
||||
ath11k_warn(ab,
|
||||
"failed to allocate skb for segmented testmode wmi event\n");
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (nla_put_u32(nl_skb, ATH11K_TM_ATTR_CMD,
|
||||
ATH11K_TM_CMD_WMI_FTM) ||
|
||||
nla_put_u32(nl_skb, ATH11K_TM_ATTR_WMI_CMDID, cmd_id) ||
|
||||
nla_put(nl_skb, ATH11K_TM_ATTR_DATA, data_pos,
|
||||
&ab->testmode.eventdata[0])) {
|
||||
ath11k_warn(ab, "failed to populate segmented testmode event");
|
||||
kfree_skb(nl_skb);
|
||||
ret = -ENOBUFS;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -79,8 +187,45 @@ bool ath11k_tm_event_wmi(struct ath11k *ar, u32 cmd_id, struct sk_buff *skb)
|
||||
|
||||
out:
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return consumed;
|
||||
static void ath11k_tm_wmi_event_segmented(struct ath11k_base *ab, u32 cmd_id,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
const void **tb;
|
||||
const struct wmi_ftm_event_msg *ev;
|
||||
u16 length;
|
||||
int ret;
|
||||
|
||||
tb = ath11k_wmi_tlv_parse_alloc(ab, skb->data, skb->len, GFP_ATOMIC);
|
||||
if (IS_ERR(tb)) {
|
||||
ret = PTR_ERR(tb);
|
||||
ath11k_warn(ab, "failed to parse ftm event tlv: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
ev = tb[WMI_TAG_ARRAY_BYTE];
|
||||
if (!ev) {
|
||||
ath11k_warn(ab, "failed to fetch ftm msg\n");
|
||||
kfree(tb);
|
||||
return;
|
||||
}
|
||||
|
||||
length = skb->len - TLV_HDR_SIZE;
|
||||
ret = ath11k_tm_process_event(ab, cmd_id, ev, length);
|
||||
if (ret)
|
||||
ath11k_warn(ab, "Failed to process ftm event\n");
|
||||
|
||||
kfree(tb);
|
||||
}
|
||||
|
||||
void ath11k_tm_wmi_event(struct ath11k_base *ab, u32 cmd_id, struct sk_buff *skb)
|
||||
{
|
||||
if (test_bit(ATH11K_FLAG_FTM_SEGMENTED, &ab->dev_flags))
|
||||
ath11k_tm_wmi_event_segmented(ab, cmd_id, skb);
|
||||
else
|
||||
ath11k_tm_wmi_event_unsegmented(ab, cmd_id, skb);
|
||||
}
|
||||
|
||||
static int ath11k_tm_cmd_get_version(struct ath11k *ar, struct nlattr *tb[])
|
||||
@ -89,7 +234,7 @@ static int ath11k_tm_cmd_get_version(struct ath11k *ar, struct nlattr *tb[])
|
||||
int ret;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_TESTMODE,
|
||||
"testmode cmd get version_major %d version_minor %d\n",
|
||||
"cmd get version_major %d version_minor %d\n",
|
||||
ATH11K_TESTMODE_VERSION_MAJOR,
|
||||
ATH11K_TESTMODE_VERSION_MINOR);
|
||||
|
||||
@ -115,21 +260,56 @@ static int ath11k_tm_cmd_get_version(struct ath11k *ar, struct nlattr *tb[])
|
||||
return cfg80211_testmode_reply(skb);
|
||||
}
|
||||
|
||||
static int ath11k_tm_cmd_wmi(struct ath11k *ar, struct nlattr *tb[])
|
||||
static int ath11k_tm_cmd_testmode_start(struct ath11k *ar, struct nlattr *tb[])
|
||||
{
|
||||
struct ath11k_pdev_wmi *wmi = ar->wmi;
|
||||
struct sk_buff *skb;
|
||||
u32 cmd_id, buf_len;
|
||||
int ret;
|
||||
void *buf;
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
if (ar->state != ATH11K_STATE_ON) {
|
||||
ret = -ENETDOWN;
|
||||
goto out;
|
||||
if (ar->state == ATH11K_STATE_FTM) {
|
||||
ret = -EALREADY;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* start utf only when the driver is not in use */
|
||||
if (ar->state != ATH11K_STATE_OFF) {
|
||||
ret = -EBUSY;
|
||||
goto err;
|
||||
}
|
||||
|
||||
ar->ab->testmode.eventdata = kzalloc(ATH11K_FTM_EVENT_MAX_BUF_LENGTH,
|
||||
GFP_KERNEL);
|
||||
if (!ar->ab->testmode.eventdata) {
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
ar->state = ATH11K_STATE_FTM;
|
||||
ar->ftm_msgref = 0;
|
||||
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_TESTMODE, "cmd start\n");
|
||||
return 0;
|
||||
|
||||
err:
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ath11k_tm_cmd_wmi(struct ath11k *ar, struct nlattr *tb[],
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct ath11k_pdev_wmi *wmi = ar->wmi;
|
||||
struct sk_buff *skb;
|
||||
struct ath11k_vif *arvif;
|
||||
u32 cmd_id, buf_len;
|
||||
int ret, tag;
|
||||
void *buf;
|
||||
u32 *ptr;
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
if (!tb[ATH11K_TM_ATTR_DATA]) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
@ -142,11 +322,45 @@ static int ath11k_tm_cmd_wmi(struct ath11k *ar, struct nlattr *tb[])
|
||||
|
||||
buf = nla_data(tb[ATH11K_TM_ATTR_DATA]);
|
||||
buf_len = nla_len(tb[ATH11K_TM_ATTR_DATA]);
|
||||
if (!buf_len) {
|
||||
ath11k_warn(ar->ab, "No data present in testmode wmi command\n");
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
cmd_id = nla_get_u32(tb[ATH11K_TM_ATTR_WMI_CMDID]);
|
||||
|
||||
/* Make sure that the buffer length is long enough to
|
||||
* hold TLV and pdev/vdev id.
|
||||
*/
|
||||
if (buf_len < sizeof(struct wmi_tlv) + sizeof(u32)) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ptr = buf;
|
||||
tag = FIELD_GET(WMI_TLV_TAG, *ptr);
|
||||
|
||||
/* pdev/vdev id start after TLV header */
|
||||
ptr++;
|
||||
|
||||
if (tag == WMI_TAG_PDEV_SET_PARAM_CMD)
|
||||
*ptr = ar->pdev->pdev_id;
|
||||
|
||||
if (ar->ab->fw_mode != ATH11K_FIRMWARE_MODE_FTM &&
|
||||
(tag == WMI_TAG_VDEV_SET_PARAM_CMD || tag == WMI_TAG_UNIT_TEST_CMD)) {
|
||||
if (vif) {
|
||||
arvif = (struct ath11k_vif *)vif->drv_priv;
|
||||
*ptr = arvif->vdev_id;
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_TESTMODE,
|
||||
"testmode cmd wmi cmd_id %d buf %pK buf_len %d\n",
|
||||
cmd_id, buf, buf_len);
|
||||
"cmd wmi cmd_id %d buf length %d\n",
|
||||
cmd_id, buf_len);
|
||||
|
||||
ath11k_dbg_dump(ar->ab, ATH11K_DBG_TESTMODE, NULL, "", buf, buf_len);
|
||||
|
||||
@ -173,6 +387,91 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ath11k_tm_cmd_wmi_ftm(struct ath11k *ar, struct nlattr *tb[])
|
||||
{
|
||||
struct ath11k_pdev_wmi *wmi = ar->wmi;
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
struct sk_buff *skb;
|
||||
u32 cmd_id, buf_len, hdr_info;
|
||||
int ret;
|
||||
void *buf;
|
||||
u8 segnumber = 0, seginfo;
|
||||
u16 chunk_len, total_bytes, num_segments;
|
||||
u8 *bufpos;
|
||||
struct wmi_ftm_cmd *ftm_cmd;
|
||||
|
||||
set_bit(ATH11K_FLAG_FTM_SEGMENTED, &ab->dev_flags);
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
if (ar->state != ATH11K_STATE_FTM) {
|
||||
ret = -ENETDOWN;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!tb[ATH11K_TM_ATTR_DATA]) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
buf = nla_data(tb[ATH11K_TM_ATTR_DATA]);
|
||||
buf_len = nla_len(tb[ATH11K_TM_ATTR_DATA]);
|
||||
cmd_id = WMI_PDEV_UTF_CMDID;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_TESTMODE,
|
||||
"cmd wmi ftm cmd_id %d buffer length %d\n",
|
||||
cmd_id, buf_len);
|
||||
ath11k_dbg_dump(ar->ab, ATH11K_DBG_TESTMODE, NULL, "", buf, buf_len);
|
||||
|
||||
bufpos = buf;
|
||||
total_bytes = buf_len;
|
||||
num_segments = total_bytes / MAX_WMI_UTF_LEN;
|
||||
|
||||
if (buf_len - (num_segments * MAX_WMI_UTF_LEN))
|
||||
num_segments++;
|
||||
|
||||
while (buf_len) {
|
||||
chunk_len = min_t(u16, buf_len, MAX_WMI_UTF_LEN);
|
||||
|
||||
skb = ath11k_wmi_alloc_skb(wmi->wmi_ab, (chunk_len +
|
||||
sizeof(struct wmi_ftm_cmd)));
|
||||
if (!skb) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ftm_cmd = (struct wmi_ftm_cmd *)skb->data;
|
||||
hdr_info = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_ARRAY_BYTE) |
|
||||
FIELD_PREP(WMI_TLV_LEN, (chunk_len +
|
||||
sizeof(struct wmi_ftm_seg_hdr)));
|
||||
ftm_cmd->tlv_header = hdr_info;
|
||||
ftm_cmd->seg_hdr.len = total_bytes;
|
||||
ftm_cmd->seg_hdr.msgref = ar->ftm_msgref;
|
||||
seginfo = FIELD_PREP(ATH11K_FTM_SEGHDR_TOTAL_SEGMENTS, num_segments) |
|
||||
FIELD_PREP(ATH11K_FTM_SEGHDR_CURRENT_SEQ, segnumber);
|
||||
ftm_cmd->seg_hdr.segmentinfo = seginfo;
|
||||
segnumber++;
|
||||
|
||||
memcpy(&ftm_cmd->data, bufpos, chunk_len);
|
||||
|
||||
ret = ath11k_wmi_cmd_send(wmi, skb, cmd_id);
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to send wmi ftm command: %d\n", ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
buf_len -= chunk_len;
|
||||
bufpos += chunk_len;
|
||||
}
|
||||
|
||||
ar->ftm_msgref++;
|
||||
ret = 0;
|
||||
|
||||
out:
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ath11k_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
void *data, int len)
|
||||
{
|
||||
@ -192,7 +491,11 @@ int ath11k_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
case ATH11K_TM_CMD_GET_VERSION:
|
||||
return ath11k_tm_cmd_get_version(ar, tb);
|
||||
case ATH11K_TM_CMD_WMI:
|
||||
return ath11k_tm_cmd_wmi(ar, tb);
|
||||
return ath11k_tm_cmd_wmi(ar, tb, vif);
|
||||
case ATH11K_TM_CMD_TESTMODE_START:
|
||||
return ath11k_tm_cmd_testmode_start(ar, tb);
|
||||
case ATH11K_TM_CMD_WMI_FTM:
|
||||
return ath11k_tm_cmd_wmi_ftm(ar, tb);
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -1,22 +1,22 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "core.h"
|
||||
|
||||
#ifdef CONFIG_NL80211_TESTMODE
|
||||
|
||||
bool ath11k_tm_event_wmi(struct ath11k *ar, u32 cmd_id, struct sk_buff *skb);
|
||||
void ath11k_tm_wmi_event(struct ath11k_base *ab, u32 cmd_id, struct sk_buff *skb);
|
||||
int ath11k_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
void *data, int len);
|
||||
|
||||
#else
|
||||
|
||||
static inline bool ath11k_tm_event_wmi(struct ath11k *ar, u32 cmd_id,
|
||||
static inline void ath11k_tm_wmi_event(struct ath11k_base *ab, u32 cmd_id,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline int ath11k_tm_cmd(struct ieee80211_hw *hw,
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
/* "API" level of the ath11k testmode interface. Bump it after every
|
||||
@ -11,9 +12,10 @@
|
||||
/* Bump this after every _compatible_ interface change, for example
|
||||
* addition of a new command or an attribute.
|
||||
*/
|
||||
#define ATH11K_TESTMODE_VERSION_MINOR 0
|
||||
#define ATH11K_TESTMODE_VERSION_MINOR 1
|
||||
|
||||
#define ATH11K_TM_DATA_MAX_LEN 5000
|
||||
#define ATH11K_FTM_EVENT_MAX_BUF_LENGTH 2048
|
||||
|
||||
enum ath11k_tm_attr {
|
||||
__ATH11K_TM_ATTR_INVALID = 0,
|
||||
@ -47,4 +49,18 @@ enum ath11k_tm_cmd {
|
||||
* ATH11K_TM_ATTR_DATA.
|
||||
*/
|
||||
ATH11K_TM_CMD_WMI = 1,
|
||||
|
||||
/* Boots the UTF firmware, the netdev interface must be down at the
|
||||
* time.
|
||||
*/
|
||||
ATH11K_TM_CMD_TESTMODE_START = 2,
|
||||
|
||||
/* The command used to transmit a FTM WMI command to the firmware
|
||||
* and the event to receive WMI events from the firmware. The data
|
||||
* received only contain the payload, need to add the tlv header
|
||||
* and send the cmd to firmware with command id WMI_PDEV_UTF_CMDID.
|
||||
* The data payload size could be large and the driver needs to
|
||||
* send segmented data to firmware.
|
||||
*/
|
||||
ATH11K_TM_CMD_WMI_FTM = 3,
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef ATH11K_WMI_H
|
||||
@ -68,6 +69,7 @@ struct wmi_tlv {
|
||||
|
||||
#define WMI_APPEND_TO_EXISTING_CHAN_LIST_FLAG 1
|
||||
|
||||
#define MAX_WMI_UTF_LEN 252
|
||||
#define WMI_BA_MODE_BUFFER_SIZE_256 3
|
||||
/*
|
||||
* HW mode config type replicated from FW header
|
||||
@ -3564,6 +3566,24 @@ struct wmi_get_pdev_temperature_cmd {
|
||||
u32 pdev_id;
|
||||
} __packed;
|
||||
|
||||
struct wmi_ftm_seg_hdr {
|
||||
u32 len;
|
||||
u32 msgref;
|
||||
u32 segmentinfo;
|
||||
u32 pdev_id;
|
||||
} __packed;
|
||||
|
||||
struct wmi_ftm_cmd {
|
||||
u32 tlv_header;
|
||||
struct wmi_ftm_seg_hdr seg_hdr;
|
||||
u8 data[];
|
||||
} __packed;
|
||||
|
||||
struct wmi_ftm_event_msg {
|
||||
struct wmi_ftm_seg_hdr seg_hdr;
|
||||
u8 data[];
|
||||
} __packed;
|
||||
|
||||
#define WMI_BEACON_TX_BUFFER_SIZE 512
|
||||
|
||||
#define WMI_EMA_TMPL_IDX_SHIFT 8
|
||||
@ -6300,6 +6320,8 @@ enum wmi_sta_keepalive_method {
|
||||
#define WMI_STA_KEEPALIVE_INTERVAL_DEFAULT 30
|
||||
#define WMI_STA_KEEPALIVE_INTERVAL_DISABLE 0
|
||||
|
||||
const void **ath11k_wmi_tlv_parse_alloc(struct ath11k_base *ab, const void *ptr,
|
||||
size_t len, gfp_t gfp);
|
||||
int ath11k_wmi_cmd_send(struct ath11k_pdev_wmi *wmi, struct sk_buff *skb,
|
||||
u32 cmd_id);
|
||||
struct sk_buff *ath11k_wmi_alloc_skb(struct ath11k_wmi_base *wmi_sc, u32 len);
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/delay.h>
|
||||
@ -838,6 +838,7 @@ exit:
|
||||
case ATH11K_STATE_RESTARTING:
|
||||
case ATH11K_STATE_RESTARTED:
|
||||
case ATH11K_STATE_WEDGED:
|
||||
case ATH11K_STATE_FTM:
|
||||
ath11k_warn(ar->ab, "encountered unexpected device state %d on resume, cannot recover\n",
|
||||
ar->state);
|
||||
ret = -EIO;
|
||||
|
@ -886,6 +886,7 @@ void ath12k_core_deinit(struct ath12k_base *ab)
|
||||
|
||||
void ath12k_core_free(struct ath12k_base *ab)
|
||||
{
|
||||
timer_delete_sync(&ab->rx_replenish_retry);
|
||||
destroy_workqueue(ab->workqueue_aux);
|
||||
destroy_workqueue(ab->workqueue);
|
||||
kfree(ab);
|
||||
|
@ -193,11 +193,11 @@ static void ath12k_dp_rxdesc_set_msdu_len(struct ath12k_base *ab,
|
||||
ab->hw_params->hal_ops->rx_desc_set_msdu_len(desc, len);
|
||||
}
|
||||
|
||||
static bool ath12k_dp_rx_h_is_mcbc(struct ath12k_base *ab,
|
||||
struct hal_rx_desc *desc)
|
||||
static bool ath12k_dp_rx_h_is_da_mcbc(struct ath12k_base *ab,
|
||||
struct hal_rx_desc *desc)
|
||||
{
|
||||
return (ath12k_dp_rx_h_first_msdu(ab, desc) &&
|
||||
ab->hw_params->hal_ops->rx_desc_is_mcbc(desc));
|
||||
ab->hw_params->hal_ops->rx_desc_is_da_mcbc(desc));
|
||||
}
|
||||
|
||||
static bool ath12k_dp_rxdesc_mac_addr2_valid(struct ath12k_base *ab,
|
||||
@ -2208,7 +2208,7 @@ static void ath12k_dp_rx_h_mpdu(struct ath12k *ar,
|
||||
|
||||
/* PN for multicast packets will be checked in mac80211 */
|
||||
rxcb = ATH12K_SKB_RXCB(msdu);
|
||||
fill_crypto_hdr = ath12k_dp_rx_h_is_mcbc(ar->ab, rx_desc);
|
||||
fill_crypto_hdr = ath12k_dp_rx_h_is_da_mcbc(ar->ab, rx_desc);
|
||||
rxcb->is_mcbc = fill_crypto_hdr;
|
||||
|
||||
if (rxcb->is_mcbc)
|
||||
|
@ -447,10 +447,10 @@ static u8 *ath12k_hw_qcn9274_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc)
|
||||
return desc->u.qcn9274.mpdu_start.addr2;
|
||||
}
|
||||
|
||||
static bool ath12k_hw_qcn9274_rx_desc_is_mcbc(struct hal_rx_desc *desc)
|
||||
static bool ath12k_hw_qcn9274_rx_desc_is_da_mcbc(struct hal_rx_desc *desc)
|
||||
{
|
||||
return __le32_to_cpu(desc->u.qcn9274.mpdu_start.info6) &
|
||||
RX_MPDU_START_INFO6_MCAST_BCAST;
|
||||
return __le16_to_cpu(desc->u.qcn9274.msdu_end.info5) &
|
||||
RX_MSDU_END_INFO5_DA_IS_MCBC;
|
||||
}
|
||||
|
||||
static void ath12k_hw_qcn9274_rx_desc_get_dot11_hdr(struct hal_rx_desc *desc,
|
||||
@ -708,7 +708,7 @@ const struct hal_ops hal_qcn9274_ops = {
|
||||
.rx_desc_get_msdu_end_offset = ath12k_hw_qcn9274_rx_desc_get_msdu_end_offset,
|
||||
.rx_desc_mac_addr2_valid = ath12k_hw_qcn9274_rx_desc_mac_addr2_valid,
|
||||
.rx_desc_mpdu_start_addr2 = ath12k_hw_qcn9274_rx_desc_mpdu_start_addr2,
|
||||
.rx_desc_is_mcbc = ath12k_hw_qcn9274_rx_desc_is_mcbc,
|
||||
.rx_desc_is_da_mcbc = ath12k_hw_qcn9274_rx_desc_is_da_mcbc,
|
||||
.rx_desc_get_dot11_hdr = ath12k_hw_qcn9274_rx_desc_get_dot11_hdr,
|
||||
.rx_desc_get_crypto_header = ath12k_hw_qcn9274_rx_desc_get_crypto_hdr,
|
||||
.rx_desc_get_mpdu_frame_ctl = ath12k_hw_qcn9274_rx_desc_get_mpdu_frame_ctl,
|
||||
@ -887,10 +887,10 @@ static u8 *ath12k_hw_wcn7850_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc)
|
||||
return desc->u.wcn7850.mpdu_start.addr2;
|
||||
}
|
||||
|
||||
static bool ath12k_hw_wcn7850_rx_desc_is_mcbc(struct hal_rx_desc *desc)
|
||||
static bool ath12k_hw_wcn7850_rx_desc_is_da_mcbc(struct hal_rx_desc *desc)
|
||||
{
|
||||
return __le32_to_cpu(desc->u.wcn7850.mpdu_start.info6) &
|
||||
RX_MPDU_START_INFO6_MCAST_BCAST;
|
||||
return __le16_to_cpu(desc->u.wcn7850.msdu_end.info5) &
|
||||
RX_MSDU_END_INFO5_DA_IS_MCBC;
|
||||
}
|
||||
|
||||
static void ath12k_hw_wcn7850_rx_desc_get_dot11_hdr(struct hal_rx_desc *desc,
|
||||
@ -1163,7 +1163,7 @@ const struct hal_ops hal_wcn7850_ops = {
|
||||
.rx_desc_get_msdu_end_offset = ath12k_hw_wcn7850_rx_desc_get_msdu_end_offset,
|
||||
.rx_desc_mac_addr2_valid = ath12k_hw_wcn7850_rx_desc_mac_addr2_valid,
|
||||
.rx_desc_mpdu_start_addr2 = ath12k_hw_wcn7850_rx_desc_mpdu_start_addr2,
|
||||
.rx_desc_is_mcbc = ath12k_hw_wcn7850_rx_desc_is_mcbc,
|
||||
.rx_desc_is_da_mcbc = ath12k_hw_wcn7850_rx_desc_is_da_mcbc,
|
||||
.rx_desc_get_dot11_hdr = ath12k_hw_wcn7850_rx_desc_get_dot11_hdr,
|
||||
.rx_desc_get_crypto_header = ath12k_hw_wcn7850_rx_desc_get_crypto_hdr,
|
||||
.rx_desc_get_mpdu_frame_ctl = ath12k_hw_wcn7850_rx_desc_get_mpdu_frame_ctl,
|
||||
|
@ -1063,7 +1063,7 @@ struct hal_ops {
|
||||
u32 (*rx_desc_get_msdu_end_offset)(void);
|
||||
bool (*rx_desc_mac_addr2_valid)(struct hal_rx_desc *desc);
|
||||
u8* (*rx_desc_mpdu_start_addr2)(struct hal_rx_desc *desc);
|
||||
bool (*rx_desc_is_mcbc)(struct hal_rx_desc *desc);
|
||||
bool (*rx_desc_is_da_mcbc)(struct hal_rx_desc *desc);
|
||||
void (*rx_desc_get_dot11_hdr)(struct hal_rx_desc *desc,
|
||||
struct ieee80211_hdr *hdr);
|
||||
u16 (*rx_desc_get_mpdu_frame_ctl)(struct hal_rx_desc *desc);
|
||||
|
@ -4443,6 +4443,7 @@ static int ath12k_mac_mgmt_tx_wmi(struct ath12k *ar, struct ath12k_vif *arvif,
|
||||
int buf_id;
|
||||
int ret;
|
||||
|
||||
ATH12K_SKB_CB(skb)->ar = ar;
|
||||
spin_lock_bh(&ar->txmgmt_idr_lock);
|
||||
buf_id = idr_alloc(&ar->txmgmt_idr, skb, 0,
|
||||
ATH12K_TX_MGMT_NUM_PENDING_MAX, GFP_ATOMIC);
|
||||
@ -5927,7 +5928,6 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
arvif->is_started = false;
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
}
|
||||
|
||||
ret = ath12k_mac_vdev_stop(arvif);
|
||||
|
@ -1227,8 +1227,20 @@ static int ath12k_pci_probe(struct pci_dev *pdev,
|
||||
case WCN7850_DEVICE_ID:
|
||||
ab_pci->msi_config = &ath12k_msi_config[0];
|
||||
ab->static_window_map = false;
|
||||
ab->hw_rev = ATH12K_HW_WCN7850_HW20;
|
||||
ab_pci->pci_ops = &ath12k_pci_ops_wcn7850;
|
||||
ath12k_pci_read_hw_version(ab, &soc_hw_version_major,
|
||||
&soc_hw_version_minor);
|
||||
switch (soc_hw_version_major) {
|
||||
case ATH12K_PCI_SOC_HW_VERSION_2:
|
||||
ab->hw_rev = ATH12K_HW_WCN7850_HW20;
|
||||
break;
|
||||
default:
|
||||
dev_err(&pdev->dev,
|
||||
"Unknown hardware version found for WCN7850: 0x%x\n",
|
||||
soc_hw_version_major);
|
||||
ret = -EOPNOTSUPP;
|
||||
goto err_pci_free_region;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -3181,8 +3181,8 @@ ath12k_wmi_copy_resource_config(struct ath12k_wmi_resource_config_params *wmi_cf
|
||||
wmi_cfg->sched_params = cpu_to_le32(tg_cfg->sched_params);
|
||||
wmi_cfg->twt_ap_pdev_count = cpu_to_le32(tg_cfg->twt_ap_pdev_count);
|
||||
wmi_cfg->twt_ap_sta_count = cpu_to_le32(tg_cfg->twt_ap_sta_count);
|
||||
wmi_cfg->host_service_flags =
|
||||
cpu_to_le32(1 << WMI_RSRC_CFG_HOST_SVC_FLAG_REG_CC_EXT_SUPPORT_BIT);
|
||||
wmi_cfg->host_service_flags = cpu_to_le32(tg_cfg->is_reg_cc_ext_event_supported <<
|
||||
WMI_RSRC_CFG_HOST_SVC_FLAG_REG_CC_EXT_SUPPORT_BIT);
|
||||
}
|
||||
|
||||
static int ath12k_init_cmd_send(struct ath12k_wmi_pdev *wmi,
|
||||
@ -3390,6 +3390,10 @@ int ath12k_wmi_cmd_init(struct ath12k_base *ab)
|
||||
struct ath12k_wmi_base *wmi_sc = &ab->wmi_ab;
|
||||
struct ath12k_wmi_init_cmd_arg arg = {};
|
||||
|
||||
if (test_bit(WMI_TLV_SERVICE_REG_CC_EXT_EVENT_SUPPORT,
|
||||
ab->wmi_ab.svc_map))
|
||||
arg.res_cfg.is_reg_cc_ext_event_supported = true;
|
||||
|
||||
ab->hw_params->wmi_init(ab, &arg.res_cfg);
|
||||
|
||||
arg.num_mem_chunks = wmi_sc->num_mem_chunks;
|
||||
@ -5985,47 +5989,72 @@ static void ath12k_vdev_install_key_compl_event(struct ath12k_base *ab,
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
static void ath12k_service_available_event(struct ath12k_base *ab, struct sk_buff *skb)
|
||||
static int ath12k_wmi_tlv_services_parser(struct ath12k_base *ab,
|
||||
u16 tag, u16 len,
|
||||
const void *ptr,
|
||||
void *data)
|
||||
{
|
||||
const void **tb;
|
||||
const struct wmi_service_available_event *ev;
|
||||
int ret;
|
||||
u32 *wmi_ext2_service_bitmap;
|
||||
int i, j;
|
||||
u16 expected_len;
|
||||
|
||||
tb = ath12k_wmi_tlv_parse_alloc(ab, skb->data, skb->len, GFP_ATOMIC);
|
||||
if (IS_ERR(tb)) {
|
||||
ret = PTR_ERR(tb);
|
||||
ath12k_warn(ab, "failed to parse tlv: %d\n", ret);
|
||||
return;
|
||||
expected_len = WMI_SERVICE_SEGMENT_BM_SIZE32 * sizeof(u32);
|
||||
if (len < expected_len) {
|
||||
ath12k_warn(ab, "invalid length %d for the WMI services available tag 0x%x\n",
|
||||
len, tag);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ev = tb[WMI_TAG_SERVICE_AVAILABLE_EVENT];
|
||||
if (!ev) {
|
||||
ath12k_warn(ab, "failed to fetch svc available ev");
|
||||
kfree(tb);
|
||||
return;
|
||||
switch (tag) {
|
||||
case WMI_TAG_SERVICE_AVAILABLE_EVENT:
|
||||
ev = (struct wmi_service_available_event *)ptr;
|
||||
for (i = 0, j = WMI_MAX_SERVICE;
|
||||
i < WMI_SERVICE_SEGMENT_BM_SIZE32 && j < WMI_MAX_EXT_SERVICE;
|
||||
i++) {
|
||||
do {
|
||||
if (le32_to_cpu(ev->wmi_service_segment_bitmap[i]) &
|
||||
BIT(j % WMI_AVAIL_SERVICE_BITS_IN_SIZE32))
|
||||
set_bit(j, ab->wmi_ab.svc_map);
|
||||
} while (++j % WMI_AVAIL_SERVICE_BITS_IN_SIZE32);
|
||||
}
|
||||
|
||||
ath12k_dbg(ab, ATH12K_DBG_WMI,
|
||||
"wmi_ext_service_bitmap 0x%x 0x%x 0x%x 0x%x",
|
||||
ev->wmi_service_segment_bitmap[0],
|
||||
ev->wmi_service_segment_bitmap[1],
|
||||
ev->wmi_service_segment_bitmap[2],
|
||||
ev->wmi_service_segment_bitmap[3]);
|
||||
break;
|
||||
case WMI_TAG_ARRAY_UINT32:
|
||||
wmi_ext2_service_bitmap = (u32 *)ptr;
|
||||
for (i = 0, j = WMI_MAX_EXT_SERVICE;
|
||||
i < WMI_SERVICE_SEGMENT_BM_SIZE32 && j < WMI_MAX_EXT2_SERVICE;
|
||||
i++) {
|
||||
do {
|
||||
if (wmi_ext2_service_bitmap[i] &
|
||||
BIT(j % WMI_AVAIL_SERVICE_BITS_IN_SIZE32))
|
||||
set_bit(j, ab->wmi_ab.svc_map);
|
||||
} while (++j % WMI_AVAIL_SERVICE_BITS_IN_SIZE32);
|
||||
}
|
||||
|
||||
ath12k_dbg(ab, ATH12K_DBG_WMI,
|
||||
"wmi_ext2_service_bitmap 0x%04x 0x%04x 0x%04x 0x%04x",
|
||||
wmi_ext2_service_bitmap[0], wmi_ext2_service_bitmap[1],
|
||||
wmi_ext2_service_bitmap[2], wmi_ext2_service_bitmap[3]);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* TODO: Use wmi_service_segment_offset information to get the service
|
||||
* especially when more services are advertised in multiple service
|
||||
* available events.
|
||||
*/
|
||||
for (i = 0, j = WMI_MAX_SERVICE;
|
||||
i < WMI_SERVICE_SEGMENT_BM_SIZE32 && j < WMI_MAX_EXT_SERVICE;
|
||||
i++) {
|
||||
do {
|
||||
if (le32_to_cpu(ev->wmi_service_segment_bitmap[i]) &
|
||||
BIT(j % WMI_AVAIL_SERVICE_BITS_IN_SIZE32))
|
||||
set_bit(j, ab->wmi_ab.svc_map);
|
||||
} while (++j % WMI_AVAIL_SERVICE_BITS_IN_SIZE32);
|
||||
}
|
||||
static int ath12k_service_available_event(struct ath12k_base *ab, struct sk_buff *skb)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ath12k_dbg(ab, ATH12K_DBG_WMI,
|
||||
"wmi_ext_service_bitmap 0:0x%x, 1:0x%x, 2:0x%x, 3:0x%x",
|
||||
ev->wmi_service_segment_bitmap[0], ev->wmi_service_segment_bitmap[1],
|
||||
ev->wmi_service_segment_bitmap[2], ev->wmi_service_segment_bitmap[3]);
|
||||
|
||||
kfree(tb);
|
||||
ret = ath12k_wmi_tlv_iter(ab, skb->data, skb->len,
|
||||
ath12k_wmi_tlv_services_parser,
|
||||
NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void ath12k_peer_assoc_conf_event(struct ath12k_base *ab, struct sk_buff *skb)
|
||||
|
@ -2148,7 +2148,10 @@ enum wmi_tlv_service {
|
||||
WMI_TLV_SERVICE_FREQINFO_IN_METADATA = 219,
|
||||
WMI_TLV_SERVICE_EXT2_MSG = 220,
|
||||
|
||||
WMI_MAX_EXT_SERVICE
|
||||
WMI_MAX_EXT_SERVICE = 256,
|
||||
|
||||
WMI_TLV_SERVICE_REG_CC_EXT_EVENT_SUPPORT = 281,
|
||||
WMI_MAX_EXT2_SERVICE,
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -2333,6 +2336,7 @@ struct ath12k_wmi_resource_config_arg {
|
||||
u32 sched_params;
|
||||
u32 twt_ap_pdev_count;
|
||||
u32 twt_ap_sta_count;
|
||||
bool is_reg_cc_ext_event_supported;
|
||||
};
|
||||
|
||||
struct ath12k_wmi_init_cmd_arg {
|
||||
@ -4664,7 +4668,7 @@ struct ath12k_wmi_base {
|
||||
|
||||
struct completion service_ready;
|
||||
struct completion unified_ready;
|
||||
DECLARE_BITMAP(svc_map, WMI_MAX_EXT_SERVICE);
|
||||
DECLARE_BITMAP(svc_map, WMI_MAX_EXT2_SERVICE);
|
||||
wait_queue_head_t tx_credits_wq;
|
||||
const struct wmi_peer_flags_map *peer_flags;
|
||||
u32 num_mem_chunks;
|
||||
|
@ -114,7 +114,13 @@ static void htc_process_conn_rsp(struct htc_target *target,
|
||||
|
||||
if (svc_rspmsg->status == HTC_SERVICE_SUCCESS) {
|
||||
epid = svc_rspmsg->endpoint_id;
|
||||
if (epid < 0 || epid >= ENDPOINT_MAX)
|
||||
|
||||
/* Check that the received epid for the endpoint to attach
|
||||
* a new service is valid. ENDPOINT0 can't be used here as it
|
||||
* is already reserved for HTC_CTRL_RSVD_SVC service and thus
|
||||
* should not be modified.
|
||||
*/
|
||||
if (epid <= ENDPOINT0 || epid >= ENDPOINT_MAX)
|
||||
return;
|
||||
|
||||
service_id = be16_to_cpu(svc_rspmsg->service_id);
|
||||
|
@ -203,7 +203,7 @@ void ath_cancel_work(struct ath_softc *sc)
|
||||
void ath_restart_work(struct ath_softc *sc)
|
||||
{
|
||||
ieee80211_queue_delayed_work(sc->hw, &sc->hw_check_work,
|
||||
ATH_HW_CHECK_POLL_INT);
|
||||
msecs_to_jiffies(ATH_HW_CHECK_POLL_INT));
|
||||
|
||||
if (AR_SREV_9340(sc->sc_ah) || AR_SREV_9330(sc->sc_ah))
|
||||
ieee80211_queue_delayed_work(sc->hw, &sc->hw_pll_work,
|
||||
@ -850,7 +850,7 @@ static bool ath9k_txq_list_has_key(struct list_head *txq_list, u32 keyix)
|
||||
static bool ath9k_txq_has_key(struct ath_softc *sc, u32 keyix)
|
||||
{
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
int i;
|
||||
int i, j;
|
||||
struct ath_txq *txq;
|
||||
bool key_in_use = false;
|
||||
|
||||
@ -868,8 +868,9 @@ static bool ath9k_txq_has_key(struct ath_softc *sc, u32 keyix)
|
||||
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
|
||||
int idx = txq->txq_tailidx;
|
||||
|
||||
while (!key_in_use &&
|
||||
!list_empty(&txq->txq_fifo[idx])) {
|
||||
for (j = 0; !key_in_use &&
|
||||
!list_empty(&txq->txq_fifo[idx]) &&
|
||||
j < ATH_TXFIFO_DEPTH; j++) {
|
||||
key_in_use = ath9k_txq_list_has_key(
|
||||
&txq->txq_fifo[idx], keyix);
|
||||
INCR(idx, ATH_TXFIFO_DEPTH);
|
||||
@ -2239,7 +2240,7 @@ void __ath9k_flush(struct ieee80211_hw *hw, u32 queues, bool drop,
|
||||
}
|
||||
|
||||
ieee80211_queue_delayed_work(hw, &sc->hw_check_work,
|
||||
ATH_HW_CHECK_POLL_INT);
|
||||
msecs_to_jiffies(ATH_HW_CHECK_POLL_INT));
|
||||
}
|
||||
|
||||
static bool ath9k_tx_frames_pending(struct ieee80211_hw *hw)
|
||||
|
@ -47,7 +47,7 @@ struct wil_fw_record_fill { /* type == wil_fw_type_fill */
|
||||
* for informational purpose, data_size is @head.size from record header
|
||||
*/
|
||||
struct wil_fw_record_comment { /* type == wil_fw_type_comment */
|
||||
u8 data[0]; /* free-form data [data_size], see above */
|
||||
DECLARE_FLEX_ARRAY(u8, data); /* free-form data [data_size], see above */
|
||||
} __packed;
|
||||
|
||||
/* Comment header - common for all comment record types */
|
||||
@ -131,7 +131,7 @@ struct wil_fw_data_dwrite {
|
||||
* data_size is @head.size where @head is record header
|
||||
*/
|
||||
struct wil_fw_record_direct_write { /* type == wil_fw_type_direct_write */
|
||||
struct wil_fw_data_dwrite data[0];
|
||||
DECLARE_FLEX_ARRAY(struct wil_fw_data_dwrite, data);
|
||||
} __packed;
|
||||
|
||||
/* verify condition: [@addr] & @mask == @value
|
||||
|
@ -2763,7 +2763,7 @@ struct wmi_rf_xpm_write_result_event {
|
||||
|
||||
/* WMI_TX_MGMT_PACKET_EVENTID */
|
||||
struct wmi_tx_mgmt_packet_event {
|
||||
u8 payload[0];
|
||||
DECLARE_FLEX_ARRAY(u8, payload);
|
||||
} __packed;
|
||||
|
||||
/* WMI_RX_MGMT_PACKET_EVENTID */
|
||||
|
@ -28,6 +28,11 @@ static inline void trace_ ## name(proto) {}
|
||||
|
||||
#define MAX_MSG_LEN 100
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#ifndef __clang__
|
||||
#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
|
||||
#endif
|
||||
|
||||
TRACE_EVENT(brcmf_err,
|
||||
TP_PROTO(const char *func, struct va_format *vaf),
|
||||
TP_ARGS(func, vaf),
|
||||
@ -123,6 +128,8 @@ TRACE_EVENT(brcmf_sdpcm_hdr,
|
||||
__entry->len, ((u8 *)__get_dynamic_array(hdr))[4])
|
||||
);
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#ifdef CONFIG_BRCM_TRACING
|
||||
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
|
@ -24,6 +24,11 @@
|
||||
|
||||
#define MAX_MSG_LEN 100
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#ifndef __clang__
|
||||
#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
|
||||
#endif
|
||||
|
||||
DECLARE_EVENT_CLASS(brcms_msg_event,
|
||||
TP_PROTO(struct va_format *vaf),
|
||||
TP_ARGS(vaf),
|
||||
@ -71,6 +76,9 @@ TRACE_EVENT(brcms_dbg,
|
||||
),
|
||||
TP_printk("%s: %s", __get_str(func), __get_str(msg))
|
||||
);
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#endif /* __TRACE_BRCMSMAC_MSG_H */
|
||||
|
||||
#ifdef CONFIG_BRCM_TRACING
|
||||
|
@ -11,6 +11,7 @@ iwlwifi-objs += pcie/ctxt-info.o pcie/ctxt-info-gen3.o
|
||||
iwlwifi-objs += pcie/trans-gen2.o pcie/tx-gen2.o
|
||||
iwlwifi-$(CONFIG_IWLDVM) += cfg/1000.o cfg/2000.o cfg/5000.o cfg/6000.o
|
||||
iwlwifi-$(CONFIG_IWLMVM) += cfg/7000.o cfg/8000.o cfg/9000.o cfg/22000.o
|
||||
iwlwifi-$(CONFIG_IWLMVM) += cfg/ax210.o cfg/bz.o cfg/sc.o
|
||||
iwlwifi-objs += iwl-dbg-tlv.o
|
||||
iwlwifi-objs += iwl-trans.o
|
||||
iwlwifi-objs += queue/tx.o
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2018 - 2020 Intel Corporation
|
||||
* Copyright(c) 2018 - 2020, 2023 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
@ -22,11 +22,11 @@
|
||||
#define EEPROM_1000_TX_POWER_VERSION (4)
|
||||
#define EEPROM_1000_EEPROM_VERSION (0x15C)
|
||||
|
||||
#define IWL1000_FW_PRE "iwlwifi-1000-"
|
||||
#define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL1000_FW_PRE "iwlwifi-1000"
|
||||
#define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL100_FW_PRE "iwlwifi-100-"
|
||||
#define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL100_FW_PRE "iwlwifi-100"
|
||||
#define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
|
||||
static const struct iwl_base_params iwl1000_base_params = {
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2018 - 2020 Intel Corporation
|
||||
* Copyright(c) 2018 - 2020, 2023 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
@ -28,17 +28,17 @@
|
||||
#define EEPROM_2000_EEPROM_VERSION (0x805)
|
||||
|
||||
|
||||
#define IWL2030_FW_PRE "iwlwifi-2030-"
|
||||
#define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL2030_FW_PRE "iwlwifi-2030"
|
||||
#define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL2000_FW_PRE "iwlwifi-2000-"
|
||||
#define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL2000_FW_PRE "iwlwifi-2000"
|
||||
#define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL105_FW_PRE "iwlwifi-105-"
|
||||
#define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL105_FW_PRE "iwlwifi-105"
|
||||
#define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL135_FW_PRE "iwlwifi-135-"
|
||||
#define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL135_FW_PRE "iwlwifi-135"
|
||||
#define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl2000_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/stringify.h>
|
||||
@ -10,11 +10,10 @@
|
||||
#include "fw/api/txq.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL_22000_UCODE_API_MAX 78
|
||||
#define IWL_22500_UCODE_API_MAX 77
|
||||
#define IWL_22000_UCODE_API_MAX 77
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_22000_UCODE_API_MIN 39
|
||||
#define IWL_22000_UCODE_API_MIN 50
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_22000_NVM_VERSION 0x0a1d
|
||||
@ -27,162 +26,26 @@
|
||||
#define IWL_22000_SMEM_OFFSET 0x400000
|
||||
#define IWL_22000_SMEM_LEN 0xD0000
|
||||
|
||||
#define IWL_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-"
|
||||
#define IWL_QNJ_B_HR_B_FW_PRE "iwlwifi-QuQnj-b0-hr-b0-"
|
||||
#define IWL_QU_C_HR_B_FW_PRE "iwlwifi-Qu-c0-hr-b0-"
|
||||
#define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0-"
|
||||
#define IWL_QU_C_JF_B_FW_PRE "iwlwifi-Qu-c0-jf-b0-"
|
||||
#define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0-"
|
||||
#define IWL_QUZ_A_JF_B_FW_PRE "iwlwifi-QuZ-a0-jf-b0-"
|
||||
#define IWL_QNJ_B_JF_B_FW_PRE "iwlwifi-QuQnj-b0-jf-b0-"
|
||||
#define IWL_CC_A_FW_PRE "iwlwifi-cc-a0-"
|
||||
#define IWL_SO_A_JF_B_FW_PRE "iwlwifi-so-a0-jf-b0-"
|
||||
#define IWL_SO_A_HR_B_FW_PRE "iwlwifi-so-a0-hr-b0-"
|
||||
#define IWL_SO_A_GF_A_FW_PRE "iwlwifi-so-a0-gf-a0-"
|
||||
#define IWL_TY_A_GF_A_FW_PRE "iwlwifi-ty-a0-gf-a0-"
|
||||
#define IWL_SO_A_GF4_A_FW_PRE "iwlwifi-so-a0-gf4-a0-"
|
||||
#define IWL_SO_A_MR_A_FW_PRE "iwlwifi-so-a0-mr-a0-"
|
||||
#define IWL_SNJ_A_GF4_A_FW_PRE "iwlwifi-SoSnj-a0-gf4-a0-"
|
||||
#define IWL_SNJ_A_GF_A_FW_PRE "iwlwifi-SoSnj-a0-gf-a0-"
|
||||
#define IWL_SNJ_A_HR_B_FW_PRE "iwlwifi-SoSnj-a0-hr-b0-"
|
||||
#define IWL_SNJ_A_JF_B_FW_PRE "iwlwifi-SoSnj-a0-jf-b0-"
|
||||
#define IWL_MA_A_HR_B_FW_PRE "iwlwifi-ma-a0-hr-b0-"
|
||||
#define IWL_MA_A_GF_A_FW_PRE "iwlwifi-ma-a0-gf-a0-"
|
||||
#define IWL_MA_A_GF4_A_FW_PRE "iwlwifi-ma-a0-gf4-a0-"
|
||||
#define IWL_MA_A_MR_A_FW_PRE "iwlwifi-ma-a0-mr-a0-"
|
||||
#define IWL_MA_A_FM_A_FW_PRE "iwlwifi-ma-a0-fm-a0-"
|
||||
#define IWL_MA_B_HR_B_FW_PRE "iwlwifi-ma-b0-hr-b0-"
|
||||
#define IWL_MA_B_GF_A_FW_PRE "iwlwifi-ma-b0-gf-a0-"
|
||||
#define IWL_MA_B_GF4_A_FW_PRE "iwlwifi-ma-b0-gf4-a0-"
|
||||
#define IWL_MA_B_MR_A_FW_PRE "iwlwifi-ma-b0-mr-a0-"
|
||||
#define IWL_MA_B_FM_A_FW_PRE "iwlwifi-ma-b0-fm-a0-"
|
||||
#define IWL_SNJ_A_MR_A_FW_PRE "iwlwifi-SoSnj-a0-mr-a0-"
|
||||
#define IWL_BZ_A_HR_A_FW_PRE "iwlwifi-bz-a0-hr-b0-"
|
||||
#define IWL_BZ_A_HR_B_FW_PRE "iwlwifi-bz-a0-hr-b0-"
|
||||
#define IWL_BZ_A_GF_A_FW_PRE "iwlwifi-bz-a0-gf-a0-"
|
||||
#define IWL_BZ_A_GF4_A_FW_PRE "iwlwifi-bz-a0-gf4-a0-"
|
||||
#define IWL_BZ_A_MR_A_FW_PRE "iwlwifi-bz-a0-mr-a0-"
|
||||
#define IWL_BZ_A_FM_A_FW_PRE "iwlwifi-bz-a0-fm-a0-"
|
||||
#define IWL_BZ_A_FM4_A_FW_PRE "iwlwifi-bz-a0-fm4-a0-"
|
||||
#define IWL_BZ_A_FM_B_FW_PRE "iwlwifi-bz-a0-fm-b0-"
|
||||
#define IWL_BZ_A_FM4_B_FW_PRE "iwlwifi-bz-a0-fm4-b0-"
|
||||
#define IWL_GL_A_FM_A_FW_PRE "iwlwifi-gl-a0-fm-a0-"
|
||||
#define IWL_GL_B_FM_B_FW_PRE "iwlwifi-gl-b0-fm-b0-"
|
||||
#define IWL_BZ_Z_GF_A_FW_PRE "iwlwifi-bz-z0-gf-a0-"
|
||||
#define IWL_BNJ_A_FM_A_FW_PRE "iwlwifi-BzBnj-a0-fm-a0-"
|
||||
#define IWL_BNJ_A_FM4_A_FW_PRE "iwlwifi-BzBnj-a0-fm4-a0-"
|
||||
#define IWL_BNJ_B_FM4_B_FW_PRE "iwlwifi-BzBnj-b0-fm4-b0-"
|
||||
#define IWL_BNJ_A_GF_A_FW_PRE "iwlwifi-BzBnj-a0-gf-a0-"
|
||||
#define IWL_BNJ_B_GF_A_FW_PRE "iwlwifi-BzBnj-b0-gf-a0-"
|
||||
#define IWL_BNJ_A_GF4_A_FW_PRE "iwlwifi-BzBnj-a0-gf4-a0-"
|
||||
#define IWL_BNJ_B_GF4_A_FW_PRE "iwlwifi-BzBnj-b0-gf4-a0-"
|
||||
#define IWL_BNJ_A_HR_A_FW_PRE "iwlwifi-BzBnj-a0-hr-b0-"
|
||||
#define IWL_BNJ_A_HR_B_FW_PRE "iwlwifi-BzBnj-a0-hr-b0-"
|
||||
#define IWL_BNJ_B_HR_A_FW_PRE "iwlwifi-BzBnj-b0-hr-b0-"
|
||||
#define IWL_BNJ_B_HR_B_FW_PRE "iwlwifi-BzBnj-b0-hr-b0-"
|
||||
#define IWL_BNJ_B_FM_B_FW_PRE "iwlwifi-BzBnj-b0-fm-b0-"
|
||||
|
||||
#define IWL_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0"
|
||||
#define IWL_QU_C_HR_B_FW_PRE "iwlwifi-Qu-c0-hr-b0"
|
||||
#define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0"
|
||||
#define IWL_QU_C_JF_B_FW_PRE "iwlwifi-Qu-c0-jf-b0"
|
||||
#define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0"
|
||||
#define IWL_QUZ_A_JF_B_FW_PRE "iwlwifi-QuZ-a0-jf-b0"
|
||||
#define IWL_CC_A_FW_PRE "iwlwifi-cc-a0"
|
||||
|
||||
#define IWL_QU_B_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_QU_B_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_QNJ_B_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_QNJ_B_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
IWL_QU_B_HR_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_QUZ_A_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_QUZ_A_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
IWL_QUZ_A_HR_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_QUZ_A_JF_B_MODULE_FIRMWARE(api) \
|
||||
IWL_QUZ_A_JF_B_FW_PRE __stringify(api) ".ucode"
|
||||
IWL_QUZ_A_JF_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_QU_C_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_QU_C_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
IWL_QU_C_HR_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \
|
||||
IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_QNJ_B_JF_B_MODULE_FIRMWARE(api) \
|
||||
IWL_QNJ_B_JF_B_FW_PRE __stringify(api) ".ucode"
|
||||
IWL_QU_B_JF_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_CC_A_MODULE_FIRMWARE(api) \
|
||||
IWL_CC_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_SO_A_JF_B_MODULE_FIRMWARE(api) \
|
||||
IWL_SO_A_JF_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_SO_A_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_SO_A_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_SO_A_GF_A_MODULE_FIRMWARE(api) \
|
||||
IWL_SO_A_GF_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_TY_A_GF_A_MODULE_FIRMWARE(api) \
|
||||
IWL_TY_A_GF_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_SNJ_A_GF4_A_MODULE_FIRMWARE(api) \
|
||||
IWL_SNJ_A_GF4_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_SNJ_A_GF_A_MODULE_FIRMWARE(api) \
|
||||
IWL_SNJ_A_GF_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_SNJ_A_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_SNJ_A_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_SNJ_A_JF_B_MODULE_FIRMWARE(api) \
|
||||
IWL_SNJ_A_JF_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_MA_A_HR_B_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_A_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_MA_A_GF_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_A_GF_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_MA_A_GF4_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_A_GF4_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_MA_A_MR_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_A_MR_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_MA_A_FM_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_A_FM_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_MA_B_HR_B_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_B_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_MA_B_GF_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_B_GF_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_MA_B_GF4_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_B_GF4_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_MA_B_MR_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_B_MR_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_MA_B_FM_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_B_FM_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_SNJ_A_MR_A_MODULE_FIRMWARE(api) \
|
||||
IWL_SNJ_A_MR_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_HR_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_HR_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_GF_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_GF_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_GF4_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_GF4_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_MR_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_MR_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_FM_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_FM_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_FM4_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_FM4_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_FM_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_FM_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_FM4_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_FM4_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_GL_A_FM_A_MODULE_FIRMWARE(api) \
|
||||
IWL_GL_A_FM_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_GL_B_FM_B_MODULE_FIRMWARE(api) \
|
||||
IWL_GL_B_FM_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_A_FM_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_A_FM_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_A_FM4_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_A_FM4_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_B_FM4_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_B_FM4_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_A_GF_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_A_GF_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_B_GF_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_B_GF_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_A_GF4_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_A_GF4_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_B_GF4_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_B_GF4_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_A_HR_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_A_HR_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_A_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_A_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_B_HR_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_B_HR_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_B_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_B_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BNJ_B_FM_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_B_FM_B_FW_PRE __stringify(api) ".ucode"
|
||||
IWL_CC_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl_22000_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
@ -196,32 +59,13 @@ static const struct iwl_base_params iwl_22000_base_params = {
|
||||
.pcie_l1_allowed = true,
|
||||
};
|
||||
|
||||
static const struct iwl_base_params iwl_ax210_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
.num_of_queues = 512,
|
||||
.max_tfd_queue_size = 65536,
|
||||
.shadow_ram_support = true,
|
||||
.led_compensation = 57,
|
||||
.wd_timeout = IWL_LONG_WD_TIMEOUT,
|
||||
.max_event_log_size = 512,
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
};
|
||||
|
||||
static const struct iwl_ht_params iwl_22000_ht_params = {
|
||||
const struct iwl_ht_params iwl_22000_ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ) |
|
||||
BIT(NL80211_BAND_6GHZ),
|
||||
};
|
||||
|
||||
static const struct iwl_ht_params iwl_gl_a_ht_params = {
|
||||
.stbc = false, /* we explicitly disable STBC for GL step A */
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ) |
|
||||
BIT(NL80211_BAND_6GHZ),
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_22000_COMMON \
|
||||
.ucode_api_min = IWL_22000_UCODE_API_MIN, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
@ -261,7 +105,7 @@ static const struct iwl_ht_params iwl_gl_a_ht_params = {
|
||||
|
||||
#define IWL_DEVICE_22500 \
|
||||
IWL_DEVICE_22000_COMMON, \
|
||||
.ucode_api_max = IWL_22500_UCODE_API_MAX, \
|
||||
.ucode_api_max = IWL_22000_UCODE_API_MAX, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_22000, \
|
||||
.trans.base_params = &iwl_22000_base_params, \
|
||||
.gp2_reg_addr = 0xa02c68, \
|
||||
@ -276,109 +120,6 @@ static const struct iwl_ht_params iwl_gl_a_ht_params = {
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_AX210 \
|
||||
IWL_DEVICE_22000_COMMON, \
|
||||
.ucode_api_max = IWL_22000_UCODE_API_MAX, \
|
||||
.trans.umac_prph_offset = 0x300000, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_AX210, \
|
||||
.trans.base_params = &iwl_ax210_base_params, \
|
||||
.min_txq_size = 128, \
|
||||
.gp2_reg_addr = 0xd02c68, \
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_HE, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cur_frag = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_BZ_COMMON \
|
||||
.ucode_api_max = IWL_22000_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL_22000_UCODE_API_MIN, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 10, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.dccm_offset = IWL_22000_DCCM_OFFSET, \
|
||||
.dccm_len = IWL_22000_DCCM_LEN, \
|
||||
.dccm2_offset = IWL_22000_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL_22000_DCCM2_LEN, \
|
||||
.smem_offset = IWL_22000_SMEM_OFFSET, \
|
||||
.smem_len = IWL_22000_SMEM_LEN, \
|
||||
.apmg_not_supported = true, \
|
||||
.trans.mq_rx_supported = true, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.mac_addr_from_csr = 0x30, \
|
||||
.nvm_ver = IWL_22000_NVM_VERSION, \
|
||||
.trans.use_tfh = true, \
|
||||
.trans.rf_id = true, \
|
||||
.trans.gen2 = true, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0xD0000, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 60 * 1024, \
|
||||
.mon_smem_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = LDBG_M2S_BUF_WPTR, \
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT, \
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.trans.umac_prph_offset = 0x300000, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_BZ, \
|
||||
.trans.base_params = &iwl_ax210_base_params, \
|
||||
.min_txq_size = 128, \
|
||||
.gp2_reg_addr = 0xd02c68, \
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cur_frag = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.mon_dbgi_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGI_SRAM_FIFO_POINTERS, \
|
||||
.mask = DBGI_SRAM_FIFO_POINTERS_WR_PTR_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_BZ \
|
||||
IWL_DEVICE_BZ_COMMON, \
|
||||
.ht_params = &iwl_22000_ht_params
|
||||
|
||||
#define IWL_DEVICE_GL_A \
|
||||
IWL_DEVICE_BZ_COMMON, \
|
||||
.ht_params = &iwl_gl_a_ht_params
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_qnj_trans_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.use_tfh = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_22000,
|
||||
.base_params = &iwl_22000_base_params,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_qu_trans_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.use_tfh = true,
|
||||
@ -416,59 +157,6 @@ const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = {
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_snj_trans_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.use_tfh = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.umac_prph_offset = 0x300000,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_so_trans_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.use_tfh = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.integrated = true,
|
||||
/* TODO: the following values need to be checked */
|
||||
.xtal_latency = 500,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_200US,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_so_long_latency_trans_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.use_tfh = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.integrated = true,
|
||||
.low_latency_xtal = true,
|
||||
.xtal_latency = 12000,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_so_long_latency_imr_trans_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.use_tfh = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.integrated = true,
|
||||
.low_latency_xtal = true,
|
||||
.xtal_latency = 12000,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
.imr_enabled = true,
|
||||
};
|
||||
|
||||
/*
|
||||
* If the device doesn't support HE, no need to have that many buffers.
|
||||
* 22000 devices can split multiple frames into a single RB, so fewer are
|
||||
@ -478,7 +166,6 @@ const struct iwl_cfg_trans_params iwl_so_long_latency_imr_trans_cfg = {
|
||||
*/
|
||||
#define IWL_NUM_RBDS_NON_HE 512
|
||||
#define IWL_NUM_RBDS_22000_HE 2048
|
||||
#define IWL_NUM_RBDS_AX210_HE 4096
|
||||
|
||||
/*
|
||||
* All JF radio modules are part of the 9000 series, but the MAC part
|
||||
@ -509,18 +196,6 @@ const struct iwl_cfg iwl9560_quz_a0_jf_b0_cfg = {
|
||||
.num_rbds = IWL_NUM_RBDS_NON_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl9560_qnj_b0_jf_b0_cfg = {
|
||||
.fw_name_pre = IWL_QNJ_B_JF_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_NON_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_ax200_trans_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_22000,
|
||||
.base_params = &iwl_22000_base_params,
|
||||
@ -531,41 +206,11 @@ const struct iwl_cfg_trans_params iwl_ax200_trans_cfg = {
|
||||
.bisr_workaround = 1,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_ma_trans_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.mq_rx_supported = true,
|
||||
.use_tfh = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.integrated = true,
|
||||
.umac_prph_offset = 0x300000
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_bz_trans_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_BZ,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.mq_rx_supported = true,
|
||||
.use_tfh = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.integrated = true,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.xtal_latency = 12000,
|
||||
.low_latency_xtal = true,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
const char iwl_ax101_name[] = "Intel(R) Wi-Fi 6 AX101";
|
||||
const char iwl_ax200_name[] = "Intel(R) Wi-Fi 6 AX200 160MHz";
|
||||
const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz";
|
||||
const char iwl_ax203_name[] = "Intel(R) Wi-Fi 6 AX203";
|
||||
const char iwl_ax204_name[] = "Intel(R) Wi-Fi 6 AX204 160MHz";
|
||||
const char iwl_ax211_name[] = "Intel(R) Wi-Fi 6E AX211 160MHz";
|
||||
const char iwl_ax221_name[] = "Intel(R) Wi-Fi 6E AX221 160MHz";
|
||||
const char iwl_ax231_name[] = "Intel(R) Wi-Fi 6E AX231 160MHz";
|
||||
const char iwl_ax411_name[] = "Intel(R) Wi-Fi 6E AX411 160MHz";
|
||||
const char iwl_bz_name[] = "Intel(R) TBD Bz device";
|
||||
|
||||
const char iwl_ax200_killer_1650w_name[] =
|
||||
"Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)";
|
||||
@ -575,18 +220,6 @@ const char iwl_ax201_killer_1650s_name[] =
|
||||
"Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)";
|
||||
const char iwl_ax201_killer_1650i_name[] =
|
||||
"Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)";
|
||||
const char iwl_ax210_killer_1675w_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675w 160MHz Wireless Network Adapter (210D2W)";
|
||||
const char iwl_ax210_killer_1675x_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675x 160MHz Wireless Network Adapter (210NGW)";
|
||||
const char iwl_ax211_killer_1675s_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW)";
|
||||
const char iwl_ax211_killer_1675i_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW)";
|
||||
const char iwl_ax411_killer_1690s_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W)";
|
||||
const char iwl_ax411_killer_1690i_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW)";
|
||||
|
||||
const struct iwl_cfg iwl_qu_b0_hr1_b0 = {
|
||||
.fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
|
||||
@ -780,203 +413,6 @@ const struct iwl_cfg killer1650i_2ax_cfg_qu_c0_hr_b0 = {
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_qnj_b0_hr_b0_cfg = {
|
||||
.fw_name_pre = IWL_QNJ_B_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0 = {
|
||||
.name = "Intel(R) Wireless-AC 9560 160MHz",
|
||||
.fw_name_pre = IWL_SO_A_JF_B_FW_PRE,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_NON_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0 = {
|
||||
.name = iwl_ax211_name,
|
||||
.fw_name_pre = IWL_SO_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0_long = {
|
||||
.name = iwl_ax211_name,
|
||||
.fw_name_pre = IWL_SO_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
.trans.xtal_latency = 12000,
|
||||
.trans.low_latency_xtal = true,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = {
|
||||
.name = "Intel(R) Wi-Fi 6 AX210 160MHz",
|
||||
.fw_name_pre = IWL_TY_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = {
|
||||
.name = iwl_ax411_name,
|
||||
.fw_name_pre = IWL_SO_A_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long = {
|
||||
.name = iwl_ax411_name,
|
||||
.fw_name_pre = IWL_SO_A_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
.trans.xtal_latency = 12000,
|
||||
.trans.low_latency_xtal = true,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax411_2ax_cfg_sosnj_gf4_a0 = {
|
||||
.name = iwl_ax411_name,
|
||||
.fw_name_pre = IWL_SNJ_A_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax211_cfg_snj_gf_a0 = {
|
||||
.name = iwl_ax211_name,
|
||||
.fw_name_pre = IWL_SNJ_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_snj_hr_b0 = {
|
||||
.fw_name_pre = IWL_SNJ_A_HR_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_snj_a0_jf_b0 = {
|
||||
.fw_name_pre = IWL_SNJ_A_JF_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma_a0_hr_b0 = {
|
||||
.fw_name_pre = IWL_MA_A_HR_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma_a0_gf_a0 = {
|
||||
.fw_name_pre = IWL_MA_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma_a0_gf4_a0 = {
|
||||
.fw_name_pre = IWL_MA_A_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma_a0_mr_a0 = {
|
||||
.fw_name_pre = IWL_MA_A_MR_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma_a0_ms_a0 = {
|
||||
.fw_name_pre = IWL_MA_A_MR_A_FW_PRE,
|
||||
.uhb_supported = false,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma_b0_fm_a0 = {
|
||||
.fw_name_pre = IWL_MA_B_FM_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma_b0_hr_b0 = {
|
||||
.fw_name_pre = IWL_MA_B_HR_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma_b0_gf_a0 = {
|
||||
.fw_name_pre = IWL_MA_B_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma_b0_gf4_a0 = {
|
||||
.fw_name_pre = IWL_MA_B_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma_b0_mr_a0 = {
|
||||
.fw_name_pre = IWL_MA_B_MR_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_so_a0_ms_a0 = {
|
||||
.fw_name_pre = IWL_SO_A_MR_A_FW_PRE,
|
||||
.uhb_supported = false,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma_a0_fm_a0 = {
|
||||
.fw_name_pre = IWL_MA_A_FM_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_snj_a0_mr_a0 = {
|
||||
.fw_name_pre = IWL_SNJ_A_MR_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_snj_a0_ms_a0 = {
|
||||
.fw_name_pre = IWL_SNJ_A_MR_A_FW_PRE,
|
||||
.uhb_supported = false,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_so_a0_hr_a0 = {
|
||||
.fw_name_pre = IWL_SO_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_quz_a0_hr_b0 = {
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
@ -989,243 +425,9 @@ const struct iwl_cfg iwl_cfg_quz_a0_hr_b0 = {
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz_a0_hr_a0 = {
|
||||
.fw_name_pre = IWL_BZ_A_HR_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz_a0_hr_b0 = {
|
||||
.fw_name_pre = IWL_BZ_A_HR_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz_a0_gf_a0 = {
|
||||
.fw_name_pre = IWL_BZ_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz_a0_gf4_a0 = {
|
||||
.fw_name_pre = IWL_BZ_A_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz_a0_mr_a0 = {
|
||||
.fw_name_pre = IWL_BZ_A_MR_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz_a0_fm_a0 = {
|
||||
.fw_name_pre = IWL_BZ_A_FM_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz_a0_fm4_a0 = {
|
||||
.fw_name_pre = IWL_BZ_A_FM4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz_a0_fm_b0 = {
|
||||
.fw_name_pre = IWL_BZ_A_FM_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz_a0_fm4_b0 = {
|
||||
.fw_name_pre = IWL_BZ_A_FM4_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_gl_a0_fm_a0 = {
|
||||
.fw_name_pre = IWL_GL_A_FM_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_GL_A,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_gl_b0_fm_b0 = {
|
||||
.fw_name_pre = IWL_GL_B_FM_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz_z0_gf_a0 = {
|
||||
.fw_name_pre = IWL_BZ_Z_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_a0_fm_a0 = {
|
||||
.fw_name_pre = IWL_BNJ_A_FM_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_a0_fm4_a0 = {
|
||||
.fw_name_pre = IWL_BNJ_A_FM4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_b0_fm4_b0 = {
|
||||
.fw_name_pre = IWL_BNJ_B_FM4_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_a0_gf_a0 = {
|
||||
.fw_name_pre = IWL_BNJ_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_b0_gf_a0 = {
|
||||
.fw_name_pre = IWL_BNJ_B_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_a0_gf4_a0 = {
|
||||
.fw_name_pre = IWL_BNJ_A_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_b0_gf4_a0 = {
|
||||
.fw_name_pre = IWL_BNJ_B_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_a0_hr_a0 = {
|
||||
.fw_name_pre = IWL_BNJ_A_HR_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_a0_hr_b0 = {
|
||||
.fw_name_pre = IWL_BNJ_A_HR_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_b0_hr_a0 = {
|
||||
.fw_name_pre = IWL_BNJ_B_HR_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_b0_hr_b0 = {
|
||||
.fw_name_pre = IWL_BNJ_B_HR_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bnj_b0_fm_b0 = {
|
||||
.fw_name_pre = IWL_BNJ_B_FM_B_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
MODULE_FIRMWARE(IWL_QU_B_HR_B_MODULE_FIRMWARE(IWL_22500_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QNJ_B_HR_B_MODULE_FIRMWARE(IWL_22500_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22500_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22500_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22500_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QUZ_A_JF_B_MODULE_FIRMWARE(IWL_22500_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QNJ_B_JF_B_MODULE_FIRMWARE(IWL_22500_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_CC_A_MODULE_FIRMWARE(IWL_22500_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SO_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SO_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SO_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_TY_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SNJ_A_GF4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SNJ_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SNJ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SNJ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_A_HR_B_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_A_GF_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_A_GF4_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_A_MR_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_A_FM_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_B_HR_B_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_B_GF_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_B_GF4_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_B_MR_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_B_FM_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SNJ_A_MR_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_HR_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_GF4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_MR_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_FM_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_FM_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_GL_A_FM_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BNJ_A_FM_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BNJ_A_FM4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BNJ_B_FM4_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BNJ_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BNJ_B_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BNJ_A_GF4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BNJ_B_GF4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BNJ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BNJ_B_HR_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BNJ_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_FM4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_FM4_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_GL_B_FM_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BNJ_B_FM_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QUZ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_CC_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2018 - 2020 Intel Corporation
|
||||
* Copyright(c) 2018 - 2020, 2023 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
@ -24,11 +24,11 @@
|
||||
#define EEPROM_5050_TX_POWER_VERSION (4)
|
||||
#define EEPROM_5050_EEPROM_VERSION (0x21E)
|
||||
|
||||
#define IWL5000_FW_PRE "iwlwifi-5000-"
|
||||
#define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL5000_FW_PRE "iwlwifi-5000"
|
||||
#define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL5150_FW_PRE "iwlwifi-5150-"
|
||||
#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL5150_FW_PRE "iwlwifi-5150"
|
||||
#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl5000_base_params = {
|
||||
.eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2018 - 2020 Intel Corporation
|
||||
* Copyright(c) 2018 - 2020, 2023 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
@ -37,17 +37,17 @@
|
||||
#define EEPROM_6035_TX_POWER_VERSION (6)
|
||||
#define EEPROM_6035_EEPROM_VERSION (0x753)
|
||||
|
||||
#define IWL6000_FW_PRE "iwlwifi-6000-"
|
||||
#define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL6000_FW_PRE "iwlwifi-6000"
|
||||
#define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL6050_FW_PRE "iwlwifi-6050-"
|
||||
#define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL6050_FW_PRE "iwlwifi-6050"
|
||||
#define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL6005_FW_PRE "iwlwifi-6000g2a-"
|
||||
#define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL6005_FW_PRE "iwlwifi-6000g2a"
|
||||
#define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL6030_FW_PRE "iwlwifi-6000g2b-"
|
||||
#define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL6030_FW_PRE "iwlwifi-6000g2b"
|
||||
#define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl6000_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2020, 2023 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -34,20 +34,20 @@
|
||||
#define IWL3160_DCCM_LEN 0x10000
|
||||
#define IWL7265_DCCM_LEN 0x17A00
|
||||
|
||||
#define IWL7260_FW_PRE "iwlwifi-7260-"
|
||||
#define IWL7260_MODULE_FIRMWARE(api) IWL7260_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL7260_FW_PRE "iwlwifi-7260"
|
||||
#define IWL7260_MODULE_FIRMWARE(api) IWL7260_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL3160_FW_PRE "iwlwifi-3160-"
|
||||
#define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL3160_FW_PRE "iwlwifi-3160"
|
||||
#define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL3168_FW_PRE "iwlwifi-3168-"
|
||||
#define IWL3168_MODULE_FIRMWARE(api) IWL3168_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL3168_FW_PRE "iwlwifi-3168"
|
||||
#define IWL3168_MODULE_FIRMWARE(api) IWL3168_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL7265_FW_PRE "iwlwifi-7265-"
|
||||
#define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL7265_FW_PRE "iwlwifi-7265"
|
||||
#define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL7265D_FW_PRE "iwlwifi-7265D-"
|
||||
#define IWL7265D_MODULE_FIRMWARE(api) IWL7265D_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL7265D_FW_PRE "iwlwifi-7265D"
|
||||
#define IWL7265D_MODULE_FIRMWARE(api) IWL7265D_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl7000_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_16K,
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2014, 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2014, 2018-2020, 2023 Intel Corporation
|
||||
* Copyright (C) 2014-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -27,13 +27,13 @@
|
||||
#define IWL8260_SMEM_OFFSET 0x400000
|
||||
#define IWL8260_SMEM_LEN 0x68000
|
||||
|
||||
#define IWL8000_FW_PRE "iwlwifi-8000C-"
|
||||
#define IWL8000_FW_PRE "iwlwifi-8000C"
|
||||
#define IWL8000_MODULE_FIRMWARE(api) \
|
||||
IWL8000_FW_PRE __stringify(api) ".ucode"
|
||||
IWL8000_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define IWL8265_FW_PRE "iwlwifi-8265-"
|
||||
#define IWL8265_FW_PRE "iwlwifi-8265"
|
||||
#define IWL8265_MODULE_FIRMWARE(api) \
|
||||
IWL8265_FW_PRE __stringify(api) ".ucode"
|
||||
IWL8265_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define DEFAULT_NVM_FILE_FAMILY_8000C "nvmData-8000C"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2021, 2023 Intel Corporation
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/stringify.h>
|
||||
@ -26,12 +26,12 @@
|
||||
#define IWL9000_SMEM_OFFSET 0x400000
|
||||
#define IWL9000_SMEM_LEN 0x68000
|
||||
|
||||
#define IWL9000_FW_PRE "iwlwifi-9000-pu-b0-jf-b0-"
|
||||
#define IWL9260_FW_PRE "iwlwifi-9260-th-b0-jf-b0-"
|
||||
#define IWL9000_FW_PRE "iwlwifi-9000-pu-b0-jf-b0"
|
||||
#define IWL9260_FW_PRE "iwlwifi-9260-th-b0-jf-b0"
|
||||
#define IWL9000_MODULE_FIRMWARE(api) \
|
||||
IWL9000_FW_PRE __stringify(api) ".ucode"
|
||||
IWL9000_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL9260_MODULE_FIRMWARE(api) \
|
||||
IWL9260_FW_PRE __stringify(api) ".ucode"
|
||||
IWL9260_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl9000_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
|
301
drivers/net/wireless/intel/iwlwifi/cfg/ax210.c
Normal file
301
drivers/net/wireless/intel/iwlwifi/cfg/ax210.c
Normal file
@ -0,0 +1,301 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/stringify.h>
|
||||
#include "iwl-config.h"
|
||||
#include "iwl-prph.h"
|
||||
#include "fw/api/txq.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL_AX210_UCODE_API_MAX 83
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_AX210_UCODE_API_MIN 59
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_AX210_NVM_VERSION 0x0a1d
|
||||
|
||||
/* Memory offsets and lengths */
|
||||
#define IWL_AX210_DCCM_OFFSET 0x800000 /* LMAC1 */
|
||||
#define IWL_AX210_DCCM_LEN 0x10000 /* LMAC1 */
|
||||
#define IWL_AX210_DCCM2_OFFSET 0x880000
|
||||
#define IWL_AX210_DCCM2_LEN 0x8000
|
||||
#define IWL_AX210_SMEM_OFFSET 0x400000
|
||||
#define IWL_AX210_SMEM_LEN 0xD0000
|
||||
|
||||
#define IWL_SO_A_JF_B_FW_PRE "iwlwifi-so-a0-jf-b0"
|
||||
#define IWL_SO_A_HR_B_FW_PRE "iwlwifi-so-a0-hr-b0"
|
||||
#define IWL_SO_A_GF_A_FW_PRE "iwlwifi-so-a0-gf-a0"
|
||||
#define IWL_TY_A_GF_A_FW_PRE "iwlwifi-ty-a0-gf-a0"
|
||||
#define IWL_SO_A_GF4_A_FW_PRE "iwlwifi-so-a0-gf4-a0"
|
||||
#define IWL_SO_A_MR_A_FW_PRE "iwlwifi-so-a0-mr-a0"
|
||||
#define IWL_MA_A_HR_B_FW_PRE "iwlwifi-ma-a0-hr-b0"
|
||||
#define IWL_MA_A_GF_A_FW_PRE "iwlwifi-ma-a0-gf-a0"
|
||||
#define IWL_MA_A_GF4_A_FW_PRE "iwlwifi-ma-a0-gf4-a0"
|
||||
#define IWL_MA_A_MR_A_FW_PRE "iwlwifi-ma-a0-mr-a0"
|
||||
#define IWL_MA_B_HR_B_FW_PRE "iwlwifi-ma-b0-hr-b0"
|
||||
#define IWL_MA_B_GF_A_FW_PRE "iwlwifi-ma-b0-gf-a0"
|
||||
#define IWL_MA_B_GF4_A_FW_PRE "iwlwifi-ma-b0-gf4-a0"
|
||||
#define IWL_MA_B_MR_A_FW_PRE "iwlwifi-ma-b0-mr-a0"
|
||||
|
||||
#define IWL_SO_A_JF_B_MODULE_FIRMWARE(api) \
|
||||
IWL_SO_A_JF_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SO_A_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_SO_A_HR_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SO_A_GF_A_MODULE_FIRMWARE(api) \
|
||||
IWL_SO_A_GF_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_TY_A_GF_A_MODULE_FIRMWARE(api) \
|
||||
IWL_TY_A_GF_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_MA_A_HR_B_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_A_HR_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_MA_A_GF_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_A_GF_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_MA_A_GF4_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_A_GF4_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_MA_A_MR_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_A_MR_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_MA_B_HR_B_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_B_HR_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_MA_B_GF_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_B_GF_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_MA_B_GF4_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_B_GF4_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_MA_B_MR_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_B_MR_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl_ax210_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
.num_of_queues = 512,
|
||||
.max_tfd_queue_size = 65536,
|
||||
.shadow_ram_support = true,
|
||||
.led_compensation = 57,
|
||||
.wd_timeout = IWL_LONG_WD_TIMEOUT,
|
||||
.max_event_log_size = 512,
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_AX210_COMMON \
|
||||
.ucode_api_min = IWL_AX210_UCODE_API_MIN, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 10, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.dccm_offset = IWL_AX210_DCCM_OFFSET, \
|
||||
.dccm_len = IWL_AX210_DCCM_LEN, \
|
||||
.dccm2_offset = IWL_AX210_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL_AX210_DCCM2_LEN, \
|
||||
.smem_offset = IWL_AX210_SMEM_OFFSET, \
|
||||
.smem_len = IWL_AX210_SMEM_LEN, \
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
|
||||
.apmg_not_supported = true, \
|
||||
.trans.mq_rx_supported = true, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.mac_addr_from_csr = 0x380, \
|
||||
.ht_params = &iwl_22000_ht_params, \
|
||||
.nvm_ver = IWL_AX210_NVM_VERSION, \
|
||||
.trans.rf_id = true, \
|
||||
.trans.gen2 = true, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0x400000, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 60 * 1024, \
|
||||
.mon_smem_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = LDBG_M2S_BUF_WPTR, \
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT, \
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_AX210 \
|
||||
IWL_DEVICE_AX210_COMMON, \
|
||||
.ucode_api_max = IWL_AX210_UCODE_API_MAX, \
|
||||
.trans.umac_prph_offset = 0x300000, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_AX210, \
|
||||
.trans.base_params = &iwl_ax210_base_params, \
|
||||
.min_txq_size = 128, \
|
||||
.gp2_reg_addr = 0xd02c68, \
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_HE, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cur_frag = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_so_trans_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.integrated = true,
|
||||
/* TODO: the following values need to be checked */
|
||||
.xtal_latency = 500,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_200US,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_so_long_latency_trans_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.integrated = true,
|
||||
.low_latency_xtal = true,
|
||||
.xtal_latency = 12000,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_so_long_latency_imr_trans_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.integrated = true,
|
||||
.low_latency_xtal = true,
|
||||
.xtal_latency = 12000,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
.imr_enabled = true,
|
||||
};
|
||||
|
||||
/*
|
||||
* If the device doesn't support HE, no need to have that many buffers.
|
||||
* AX210 devices can split multiple frames into a single RB, so fewer are
|
||||
* needed; AX210 cannot (but use smaller RBs by default) - these sizes
|
||||
* were picked according to 8 MSDUs inside 256 A-MSDUs in an A-MPDU, with
|
||||
* additional overhead to account for processing time.
|
||||
*/
|
||||
#define IWL_NUM_RBDS_NON_HE 512
|
||||
#define IWL_NUM_RBDS_AX210_HE 4096
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_ma_trans_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.integrated = true,
|
||||
.umac_prph_offset = 0x300000
|
||||
};
|
||||
|
||||
const char iwl_ax211_name[] = "Intel(R) Wi-Fi 6E AX211 160MHz";
|
||||
const char iwl_ax221_name[] = "Intel(R) Wi-Fi 6E AX221 160MHz";
|
||||
const char iwl_ax231_name[] = "Intel(R) Wi-Fi 6E AX231 160MHz";
|
||||
const char iwl_ax411_name[] = "Intel(R) Wi-Fi 6E AX411 160MHz";
|
||||
|
||||
const char iwl_ax210_killer_1675w_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675w 160MHz Wireless Network Adapter (210D2W)";
|
||||
const char iwl_ax210_killer_1675x_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675x 160MHz Wireless Network Adapter (210NGW)";
|
||||
const char iwl_ax211_killer_1675s_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW)";
|
||||
const char iwl_ax211_killer_1675i_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW)";
|
||||
const char iwl_ax411_killer_1690s_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W)";
|
||||
const char iwl_ax411_killer_1690i_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW)";
|
||||
|
||||
const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0 = {
|
||||
.name = "Intel(R) Wireless-AC 9560 160MHz",
|
||||
.fw_name_pre = IWL_SO_A_JF_B_FW_PRE,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_NON_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0 = {
|
||||
.name = iwl_ax211_name,
|
||||
.fw_name_pre = IWL_SO_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0_long = {
|
||||
.name = iwl_ax211_name,
|
||||
.fw_name_pre = IWL_SO_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
.trans.xtal_latency = 12000,
|
||||
.trans.low_latency_xtal = true,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = {
|
||||
.name = "Intel(R) Wi-Fi 6 AX210 160MHz",
|
||||
.fw_name_pre = IWL_TY_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = {
|
||||
.name = iwl_ax411_name,
|
||||
.fw_name_pre = IWL_SO_A_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long = {
|
||||
.name = iwl_ax411_name,
|
||||
.fw_name_pre = IWL_SO_A_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
.trans.xtal_latency = 12000,
|
||||
.trans.low_latency_xtal = true,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_so_a0_ms_a0 = {
|
||||
.fw_name_pre = IWL_SO_A_MR_A_FW_PRE,
|
||||
.uhb_supported = false,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma = {
|
||||
.fw_name_mac = "ma",
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_so_a0_hr_a0 = {
|
||||
.fw_name_pre = IWL_SO_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL_SO_A_JF_B_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SO_A_HR_B_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SO_A_GF_A_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_TY_A_GF_A_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_A_HR_B_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_A_GF_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_A_GF4_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_A_MR_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_B_HR_B_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_B_GF_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_B_GF4_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_B_MR_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
183
drivers/net/wireless/intel/iwlwifi/cfg/bz.c
Normal file
183
drivers/net/wireless/intel/iwlwifi/cfg/bz.c
Normal file
@ -0,0 +1,183 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/stringify.h>
|
||||
#include "iwl-config.h"
|
||||
#include "iwl-prph.h"
|
||||
#include "fw/api/txq.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL_BZ_UCODE_API_MAX 83
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_BZ_UCODE_API_MIN 80
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_BZ_NVM_VERSION 0x0a1d
|
||||
|
||||
/* Memory offsets and lengths */
|
||||
#define IWL_BZ_DCCM_OFFSET 0x800000 /* LMAC1 */
|
||||
#define IWL_BZ_DCCM_LEN 0x10000 /* LMAC1 */
|
||||
#define IWL_BZ_DCCM2_OFFSET 0x880000
|
||||
#define IWL_BZ_DCCM2_LEN 0x8000
|
||||
#define IWL_BZ_SMEM_OFFSET 0x400000
|
||||
#define IWL_BZ_SMEM_LEN 0xD0000
|
||||
|
||||
#define IWL_BZ_A_HR_B_FW_PRE "iwlwifi-bz-a0-hr-b0"
|
||||
#define IWL_BZ_A_GF_A_FW_PRE "iwlwifi-bz-a0-gf-a0"
|
||||
#define IWL_BZ_A_GF4_A_FW_PRE "iwlwifi-bz-a0-gf4-a0"
|
||||
#define IWL_BZ_A_FM_B_FW_PRE "iwlwifi-bz-a0-fm-b0"
|
||||
#define IWL_BZ_A_FM_C_FW_PRE "iwlwifi-bz-a0-fm-c0"
|
||||
#define IWL_BZ_A_FM4_B_FW_PRE "iwlwifi-bz-a0-fm4-b0"
|
||||
#define IWL_GL_B_FM_B_FW_PRE "iwlwifi-gl-b0-fm-b0"
|
||||
#define IWL_GL_C_FM_C_FW_PRE "iwlwifi-gl-c0-fm-c0"
|
||||
|
||||
#define IWL_BZ_A_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_HR_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_GF_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_GF_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_GF4_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_GF4_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_FM_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_FM_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_FM_C_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_FM_C_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_BZ_A_FM4_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_FM4_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_GL_B_FM_B_MODULE_FIRMWARE(api) \
|
||||
IWL_GL_B_FM_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_GL_C_FM_C_MODULE_FIRMWARE(api) \
|
||||
IWL_GL_C_FM_C_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl_bz_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
.num_of_queues = 512,
|
||||
.max_tfd_queue_size = 65536,
|
||||
.shadow_ram_support = true,
|
||||
.led_compensation = 57,
|
||||
.wd_timeout = IWL_LONG_WD_TIMEOUT,
|
||||
.max_event_log_size = 512,
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_BZ_COMMON \
|
||||
.ucode_api_max = IWL_BZ_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL_BZ_UCODE_API_MIN, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 10, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.dccm_offset = IWL_BZ_DCCM_OFFSET, \
|
||||
.dccm_len = IWL_BZ_DCCM_LEN, \
|
||||
.dccm2_offset = IWL_BZ_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL_BZ_DCCM2_LEN, \
|
||||
.smem_offset = IWL_BZ_SMEM_OFFSET, \
|
||||
.smem_len = IWL_BZ_SMEM_LEN, \
|
||||
.apmg_not_supported = true, \
|
||||
.trans.mq_rx_supported = true, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.mac_addr_from_csr = 0x30, \
|
||||
.nvm_ver = IWL_BZ_NVM_VERSION, \
|
||||
.trans.rf_id = true, \
|
||||
.trans.gen2 = true, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0xD0000, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 60 * 1024, \
|
||||
.mon_smem_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = LDBG_M2S_BUF_WPTR, \
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT, \
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.trans.umac_prph_offset = 0x300000, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_BZ, \
|
||||
.trans.base_params = &iwl_bz_base_params, \
|
||||
.min_txq_size = 128, \
|
||||
.gp2_reg_addr = 0xd02c68, \
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cur_frag = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.mon_dbgi_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGI_SRAM_FIFO_POINTERS, \
|
||||
.mask = DBGI_SRAM_FIFO_POINTERS_WR_PTR_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_BZ \
|
||||
IWL_DEVICE_BZ_COMMON, \
|
||||
.ht_params = &iwl_22000_ht_params
|
||||
|
||||
#define IWL_DEVICE_GL_A \
|
||||
IWL_DEVICE_BZ_COMMON, \
|
||||
.ht_params = &iwl_gl_a_ht_params
|
||||
|
||||
/*
|
||||
* If the device doesn't support HE, no need to have that many buffers.
|
||||
* These sizes were picked according to 8 MSDUs inside 256 A-MSDUs in an
|
||||
* A-MPDU, with additional overhead to account for processing time.
|
||||
*/
|
||||
#define IWL_NUM_RBDS_NON_HE 512
|
||||
#define IWL_NUM_RBDS_BZ_HE 4096
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_bz_trans_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_BZ,
|
||||
.base_params = &iwl_bz_base_params,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.integrated = true,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.xtal_latency = 12000,
|
||||
.low_latency_xtal = true,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
const char iwl_bz_name[] = "Intel(R) TBD Bz device";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz = {
|
||||
.fw_name_mac = "bz",
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_BZ_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_gl = {
|
||||
.fw_name_mac = "gl",
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_BZ_HE,
|
||||
};
|
||||
|
||||
|
||||
MODULE_FIRMWARE(IWL_BZ_A_HR_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_GF_A_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_GF4_A_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_FM_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_FM_C_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BZ_A_FM4_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_GL_B_FM_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_GL_C_FM_C_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
166
drivers/net/wireless/intel/iwlwifi/cfg/sc.c
Normal file
166
drivers/net/wireless/intel/iwlwifi/cfg/sc.c
Normal file
@ -0,0 +1,166 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/stringify.h>
|
||||
#include "iwl-config.h"
|
||||
#include "iwl-prph.h"
|
||||
#include "fw/api/txq.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL_SC_UCODE_API_MAX 83
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_SC_UCODE_API_MIN 82
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_SC_NVM_VERSION 0x0a1d
|
||||
|
||||
/* Memory offsets and lengths */
|
||||
#define IWL_SC_DCCM_OFFSET 0x800000 /* LMAC1 */
|
||||
#define IWL_SC_DCCM_LEN 0x10000 /* LMAC1 */
|
||||
#define IWL_SC_DCCM2_OFFSET 0x880000
|
||||
#define IWL_SC_DCCM2_LEN 0x8000
|
||||
#define IWL_SC_SMEM_OFFSET 0x400000
|
||||
#define IWL_SC_SMEM_LEN 0xD0000
|
||||
|
||||
#define IWL_SC_A_FM_B_FW_PRE "iwlwifi-sc-a0-fm-b0"
|
||||
#define IWL_SC_A_FM_C_FW_PRE "iwlwifi-sc-a0-fm-c0"
|
||||
#define IWL_SC_A_HR_A_FW_PRE "iwlwifi-sc-a0-hr-b0"
|
||||
#define IWL_SC_A_HR_B_FW_PRE "iwlwifi-sc-a0-hr-b0"
|
||||
#define IWL_SC_A_GF_A_FW_PRE "iwlwifi-sc-a0-gf-a0"
|
||||
#define IWL_SC_A_GF4_A_FW_PRE "iwlwifi-sc-a0-gf4-a0"
|
||||
#define IWL_SC_A_WH_A_FW_PRE "iwlwifi-sc-a0-wh-a0"
|
||||
|
||||
#define IWL_SC_A_FM_B_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC_A_FM_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SC_A_FM_C_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC_A_FM_C_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SC_A_HR_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC_A_HR_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SC_A_HR_B_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC_A_HR_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SC_A_GF_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC_A_GF_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SC_A_GF4_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC_A_GF4_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SC_A_WH_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC_A_WH_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl_sc_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
.num_of_queues = 512,
|
||||
.max_tfd_queue_size = 65536,
|
||||
.shadow_ram_support = true,
|
||||
.led_compensation = 57,
|
||||
.wd_timeout = IWL_LONG_WD_TIMEOUT,
|
||||
.max_event_log_size = 512,
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_BZ_COMMON \
|
||||
.ucode_api_max = IWL_SC_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL_SC_UCODE_API_MIN, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 10, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.dccm_offset = IWL_SC_DCCM_OFFSET, \
|
||||
.dccm_len = IWL_SC_DCCM_LEN, \
|
||||
.dccm2_offset = IWL_SC_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL_SC_DCCM2_LEN, \
|
||||
.smem_offset = IWL_SC_SMEM_OFFSET, \
|
||||
.smem_len = IWL_SC_SMEM_LEN, \
|
||||
.apmg_not_supported = true, \
|
||||
.trans.mq_rx_supported = true, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.mac_addr_from_csr = 0x30, \
|
||||
.nvm_ver = IWL_SC_NVM_VERSION, \
|
||||
.trans.rf_id = true, \
|
||||
.trans.gen2 = true, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0xD0000, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 60 * 1024, \
|
||||
.mon_smem_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = LDBG_M2S_BUF_WPTR, \
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT, \
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.trans.umac_prph_offset = 0x300000, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_SC, \
|
||||
.trans.base_params = &iwl_sc_base_params, \
|
||||
.min_txq_size = 128, \
|
||||
.gp2_reg_addr = 0xd02c68, \
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cur_frag = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.mon_dbgi_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGI_SRAM_FIFO_POINTERS, \
|
||||
.mask = DBGI_SRAM_FIFO_POINTERS_WR_PTR_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_SC \
|
||||
IWL_DEVICE_BZ_COMMON, \
|
||||
.ht_params = &iwl_22000_ht_params
|
||||
|
||||
/*
|
||||
* If the device doesn't support HE, no need to have that many buffers.
|
||||
* These sizes were picked according to 8 MSDUs inside 256 A-MSDUs in an
|
||||
* A-MPDU, with additional overhead to account for processing time.
|
||||
*/
|
||||
#define IWL_NUM_RBDS_NON_HE 512
|
||||
#define IWL_NUM_RBDS_SC_HE 4096
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_sc_trans_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_SC,
|
||||
.base_params = &iwl_sc_base_params,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.integrated = true,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.xtal_latency = 12000,
|
||||
.low_latency_xtal = true,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
const char iwl_sc_name[] = "Intel(R) TBD Sc device";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_sc = {
|
||||
.fw_name_mac = "sc",
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_SC,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_SC_HE,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL_SC_A_FM_B_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC_A_FM_C_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC_A_HR_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC_A_HR_B_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC_A_GF_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC_A_GF4_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC_A_WH_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2019 - 2020, 2022 Intel Corporation
|
||||
* Copyright (C) 2019 - 2020, 2022 - 2023 Intel Corporation
|
||||
*****************************************************************************/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/skbuff.h>
|
||||
@ -125,7 +125,7 @@ static int iwl_hwrate_to_plcp_idx(u32 rate_n_flags)
|
||||
return idx;
|
||||
}
|
||||
|
||||
return -1;
|
||||
return IWL_RATE_INVALID;
|
||||
}
|
||||
|
||||
static void rs_rate_scale_perform(struct iwl_priv *priv,
|
||||
@ -203,23 +203,6 @@ static const u16 expected_tpt_mimo3_40MHz[4][IWL_RATE_COUNT] = {
|
||||
{0, 0, 0, 0, 277, 0, 478, 624, 737, 911, 1026, 1070, 1109}, /* AGG+SGI */
|
||||
};
|
||||
|
||||
/* mbps, mcs */
|
||||
static const struct iwl_rate_mcs_info iwl_rate_mcs[IWL_RATE_COUNT] = {
|
||||
{ "1", "BPSK DSSS"},
|
||||
{ "2", "QPSK DSSS"},
|
||||
{"5.5", "BPSK CCK"},
|
||||
{ "11", "QPSK CCK"},
|
||||
{ "6", "BPSK 1/2"},
|
||||
{ "9", "BPSK 1/2"},
|
||||
{ "12", "QPSK 1/2"},
|
||||
{ "18", "QPSK 3/4"},
|
||||
{ "24", "16QAM 1/2"},
|
||||
{ "36", "16QAM 3/4"},
|
||||
{ "48", "64QAM 2/3"},
|
||||
{ "54", "64QAM 3/4"},
|
||||
{ "60", "64QAM 5/6"},
|
||||
};
|
||||
|
||||
#define MCS_INDEX_PER_STREAM (8)
|
||||
|
||||
static void rs_rate_scale_clear_window(struct iwl_rate_scale_data *window)
|
||||
@ -3089,6 +3072,23 @@ static ssize_t rs_sta_dbgfs_scale_table_read(struct file *file,
|
||||
int index = 0;
|
||||
ssize_t ret;
|
||||
|
||||
/* mbps, mcs */
|
||||
static const struct iwl_rate_mcs_info iwl_rate_mcs[IWL_RATE_COUNT] = {
|
||||
{ "1", "BPSK DSSS"},
|
||||
{ "2", "QPSK DSSS"},
|
||||
{"5.5", "BPSK CCK"},
|
||||
{ "11", "QPSK CCK"},
|
||||
{ "6", "BPSK 1/2"},
|
||||
{ "9", "BPSK 1/2"},
|
||||
{ "12", "QPSK 1/2"},
|
||||
{ "18", "QPSK 3/4"},
|
||||
{ "24", "16QAM 1/2"},
|
||||
{ "36", "16QAM 3/4"},
|
||||
{ "48", "64QAM 2/3"},
|
||||
{ "54", "64QAM 3/4"},
|
||||
{ "60", "64QAM 5/6"},
|
||||
};
|
||||
|
||||
struct iwl_lq_sta *lq_sta = file->private_data;
|
||||
struct iwl_priv *priv;
|
||||
struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
|
||||
@ -3146,7 +3146,10 @@ static ssize_t rs_sta_dbgfs_scale_table_read(struct file *file,
|
||||
for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) {
|
||||
index = iwl_hwrate_to_plcp_idx(
|
||||
le32_to_cpu(lq_sta->lq.rs_table[i].rate_n_flags));
|
||||
if (is_legacy(tbl->lq_type)) {
|
||||
if (index == IWL_RATE_INVALID) {
|
||||
desc += sprintf(buff + desc, " rate[%d] 0x%X invalid rate\n",
|
||||
i, le32_to_cpu(lq_sta->lq.rs_table[i].rate_n_flags));
|
||||
} else if (is_legacy(tbl->lq_type)) {
|
||||
desc += sprintf(buff+desc, " rate[%d] 0x%X %smbps\n",
|
||||
i, le32_to_cpu(lq_sta->lq.rs_table[i].rate_n_flags),
|
||||
iwl_rate_mcs[index].mbps);
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*/
|
||||
#include <linux/uuid.h>
|
||||
#include <linux/dmi.h>
|
||||
@ -94,7 +94,7 @@ static int iwl_acpi_get_handle(struct device *dev, acpi_string method,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *iwl_acpi_get_object(struct device *dev, acpi_string method)
|
||||
static void *iwl_acpi_get_object(struct device *dev, acpi_string method)
|
||||
{
|
||||
struct acpi_buffer buf = {ACPI_ALLOCATE_BUFFER, NULL};
|
||||
acpi_handle handle;
|
||||
@ -115,7 +115,6 @@ void *iwl_acpi_get_object(struct device *dev, acpi_string method)
|
||||
}
|
||||
return buf.pointer;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_acpi_get_object);
|
||||
|
||||
/*
|
||||
* Generic function for evaluating a method defined in the device specific
|
||||
@ -237,11 +236,12 @@ int iwl_acpi_get_dsm_u32(struct device *dev, int rev, int func,
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_acpi_get_dsm_u32);
|
||||
|
||||
union acpi_object *iwl_acpi_get_wifi_pkg_range(struct device *dev,
|
||||
union acpi_object *data,
|
||||
int min_data_size,
|
||||
int max_data_size,
|
||||
int *tbl_rev)
|
||||
static union acpi_object *
|
||||
iwl_acpi_get_wifi_pkg_range(struct device *dev,
|
||||
union acpi_object *data,
|
||||
int min_data_size,
|
||||
int max_data_size,
|
||||
int *tbl_rev)
|
||||
{
|
||||
int i;
|
||||
union acpi_object *wifi_pkg;
|
||||
@ -292,7 +292,16 @@ union acpi_object *iwl_acpi_get_wifi_pkg_range(struct device *dev,
|
||||
found:
|
||||
return wifi_pkg;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_acpi_get_wifi_pkg_range);
|
||||
|
||||
static union acpi_object *
|
||||
iwl_acpi_get_wifi_pkg(struct device *dev,
|
||||
union acpi_object *data,
|
||||
int data_size, int *tbl_rev)
|
||||
{
|
||||
return iwl_acpi_get_wifi_pkg_range(dev, data, data_size, data_size,
|
||||
tbl_rev);
|
||||
}
|
||||
|
||||
|
||||
int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt,
|
||||
union iwl_tas_config_cmd *cmd, int fw_ver)
|
||||
@ -1169,41 +1178,48 @@ int iwl_read_ppag_table(struct iwl_fw_runtime *fwrt, union iwl_ppag_table_cmd *c
|
||||
*/
|
||||
cmd->v1.flags = cpu_to_le32(fwrt->ppag_flags);
|
||||
|
||||
IWL_DEBUG_RADIO(fwrt, "PPAG cmd ver is %d\n", cmd_ver);
|
||||
if (cmd_ver == 1) {
|
||||
num_sub_bands = IWL_NUM_SUB_BANDS_V1;
|
||||
gain = cmd->v1.gain[0];
|
||||
*cmd_size = sizeof(cmd->v1);
|
||||
if (fwrt->ppag_ver == 1 || fwrt->ppag_ver == 2) {
|
||||
/* in this case FW supports revision 0 */
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"PPAG table rev is %d but FW supports v1, sending truncated table\n",
|
||||
"PPAG table rev is %d, send truncated table\n",
|
||||
fwrt->ppag_ver);
|
||||
if (!fw_has_capa(&fwrt->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_PPAG_CHINA_BIOS_SUPPORT)) {
|
||||
cmd->v1.flags &= cpu_to_le32(IWL_PPAG_ETSI_MASK);
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"FW doesn't support ppag China bit\n");
|
||||
} else {
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"FW supports ppag China bit\n");
|
||||
}
|
||||
}
|
||||
} else if (cmd_ver >= 2 && cmd_ver <= 4) {
|
||||
num_sub_bands = IWL_NUM_SUB_BANDS_V2;
|
||||
gain = cmd->v2.gain[0];
|
||||
*cmd_size = sizeof(cmd->v2);
|
||||
if (fwrt->ppag_ver == 0) {
|
||||
/* in this case FW supports revisions 1 or 2 */
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"PPAG table is v1 but FW supports v2, sending padded table\n");
|
||||
} else if (cmd_ver == 2 && fwrt->ppag_ver == 2) {
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"PPAG table is v3 but FW supports v2, sending partial bitmap.\n");
|
||||
cmd->v1.flags &= cpu_to_le32(IWL_PPAG_ETSI_MASK);
|
||||
"PPAG table rev is 0, send padded table\n");
|
||||
}
|
||||
} else {
|
||||
IWL_DEBUG_RADIO(fwrt, "Unsupported PPAG command version\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* ppag mode */
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"PPAG MODE bits were read from bios: %d\n",
|
||||
cmd->v1.flags & cpu_to_le32(ACPI_PPAG_MASK));
|
||||
if ((cmd_ver == 1 && !fw_has_capa(&fwrt->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_PPAG_CHINA_BIOS_SUPPORT)) ||
|
||||
(cmd_ver == 2 && fwrt->ppag_ver == 2)) {
|
||||
cmd->v1.flags &= cpu_to_le32(IWL_PPAG_ETSI_MASK);
|
||||
IWL_DEBUG_RADIO(fwrt, "masking ppag China bit\n");
|
||||
} else {
|
||||
IWL_DEBUG_RADIO(fwrt, "isn't masking ppag China bit\n");
|
||||
}
|
||||
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"PPAG MODE bits going to be sent: %d\n",
|
||||
cmd->v1.flags & cpu_to_le32(ACPI_PPAG_MASK));
|
||||
|
||||
for (i = 0; i < IWL_NUM_CHAIN_LIMITS; i++) {
|
||||
for (j = 0; j < num_sub_bands; j++) {
|
||||
gain[i * num_sub_bands + j] =
|
||||
@ -1232,3 +1248,40 @@ bool iwl_acpi_is_ppag_approved(struct iwl_fw_runtime *fwrt)
|
||||
return true;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_acpi_is_ppag_approved);
|
||||
|
||||
void iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_phy_specific_cfg *filters)
|
||||
{
|
||||
struct iwl_phy_specific_cfg tmp = {};
|
||||
union acpi_object *wifi_pkg, *data;
|
||||
int tbl_rev, i;
|
||||
|
||||
data = iwl_acpi_get_object(fwrt->dev, ACPI_WPFC_METHOD);
|
||||
if (IS_ERR(data))
|
||||
return;
|
||||
|
||||
/* try to read wtas table revision 1 or revision 0*/
|
||||
wifi_pkg = iwl_acpi_get_wifi_pkg(fwrt->dev, data,
|
||||
ACPI_WPFC_WIFI_DATA_SIZE,
|
||||
&tbl_rev);
|
||||
if (IS_ERR(wifi_pkg))
|
||||
goto out_free;
|
||||
|
||||
if (tbl_rev != 0)
|
||||
goto out_free;
|
||||
|
||||
BUILD_BUG_ON(ARRAY_SIZE(filters->filter_cfg_chains) != ACPI_WPFC_WIFI_DATA_SIZE);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(filters->filter_cfg_chains); i++) {
|
||||
if (wifi_pkg->package.elements[i].type != ACPI_TYPE_INTEGER)
|
||||
return;
|
||||
tmp.filter_cfg_chains[i] =
|
||||
cpu_to_le32(wifi_pkg->package.elements[i].integer.value);
|
||||
}
|
||||
|
||||
IWL_DEBUG_RADIO(fwrt, "Loaded WPFC filter config from ACPI\n");
|
||||
*filters = tmp;
|
||||
out_free:
|
||||
kfree(data);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_acpi_get_phy_filters);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_fw_acpi__
|
||||
#define __iwl_fw_acpi__
|
||||
@ -11,6 +11,7 @@
|
||||
#include "fw/api/power.h"
|
||||
#include "fw/api/phy.h"
|
||||
#include "fw/api/nvm-reg.h"
|
||||
#include "fw/api/config.h"
|
||||
#include "fw/img.h"
|
||||
#include "iwl-trans.h"
|
||||
|
||||
@ -23,6 +24,7 @@
|
||||
#define ACPI_ECKV_METHOD "ECKV"
|
||||
#define ACPI_PPAG_METHOD "PPAG"
|
||||
#define ACPI_WTAS_METHOD "WTAS"
|
||||
#define ACPI_WPFC_METHOD "WPFC"
|
||||
|
||||
#define ACPI_WIFI_DOMAIN (0x07)
|
||||
|
||||
@ -54,6 +56,7 @@
|
||||
#define ACPI_EWRD_WIFI_DATA_SIZE_REV2 ((ACPI_SAR_PROFILE_NUM - 1) * \
|
||||
ACPI_SAR_NUM_CHAINS_REV2 * \
|
||||
ACPI_SAR_NUM_SUB_BANDS_REV2 + 3)
|
||||
#define ACPI_WPFC_WIFI_DATA_SIZE 4 /* 4 filter config words */
|
||||
|
||||
/* revision 0 and 1 are identical, except for the semantics in the FW */
|
||||
#define ACPI_GEO_NUM_BANDS_REV0 2
|
||||
@ -168,19 +171,12 @@ struct iwl_fw_runtime;
|
||||
extern const guid_t iwl_guid;
|
||||
extern const guid_t iwl_rfi_guid;
|
||||
|
||||
void *iwl_acpi_get_object(struct device *dev, acpi_string method);
|
||||
|
||||
int iwl_acpi_get_dsm_u8(struct device *dev, int rev, int func,
|
||||
const guid_t *guid, u8 *value);
|
||||
|
||||
int iwl_acpi_get_dsm_u32(struct device *dev, int rev, int func,
|
||||
const guid_t *guid, u32 *value);
|
||||
|
||||
union acpi_object *iwl_acpi_get_wifi_pkg_range(struct device *dev,
|
||||
union acpi_object *data,
|
||||
int min_data_size,
|
||||
int max_data_size,
|
||||
int *tbl_rev);
|
||||
/**
|
||||
* iwl_acpi_get_mcc - read MCC from ACPI, if available
|
||||
*
|
||||
@ -232,12 +228,10 @@ int iwl_read_ppag_table(struct iwl_fw_runtime *fwrt, union iwl_ppag_table_cmd *c
|
||||
|
||||
bool iwl_acpi_is_ppag_approved(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
#else /* CONFIG_ACPI */
|
||||
void iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_phy_specific_cfg *filters);
|
||||
|
||||
static inline void *iwl_acpi_get_object(struct device *dev, acpi_string method)
|
||||
{
|
||||
return ERR_PTR(-ENOENT);
|
||||
}
|
||||
#else /* CONFIG_ACPI */
|
||||
|
||||
static inline void *iwl_acpi_get_dsm_object(struct device *dev, int rev,
|
||||
int func, union acpi_object *args)
|
||||
@ -257,15 +251,6 @@ static inline int iwl_acpi_get_dsm_u32(struct device *dev, int rev, int func,
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline union acpi_object *
|
||||
iwl_acpi_get_wifi_pkg_range(struct device *dev,
|
||||
union acpi_object *data,
|
||||
int min_data_size, int max_data_size,
|
||||
int *tbl_rev)
|
||||
{
|
||||
return ERR_PTR(-ENOENT);
|
||||
}
|
||||
|
||||
static inline int iwl_acpi_get_mcc(struct device *dev, char *mcc)
|
||||
{
|
||||
return -ENOENT;
|
||||
@ -335,15 +320,11 @@ static inline bool iwl_acpi_is_ppag_approved(struct iwl_fw_runtime *fwrt)
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ACPI */
|
||||
|
||||
static inline union acpi_object *
|
||||
iwl_acpi_get_wifi_pkg(struct device *dev,
|
||||
union acpi_object *data,
|
||||
int data_size, int *tbl_rev)
|
||||
static inline void iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_phy_specific_cfg *filters)
|
||||
{
|
||||
return iwl_acpi_get_wifi_pkg_range(dev, data, data_size, data_size,
|
||||
tbl_rev);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ACPI */
|
||||
|
||||
#endif /* __iwl_fw_acpi__ */
|
||||
|
@ -59,14 +59,6 @@ struct iwl_binding_cmd {
|
||||
#define IWL_LMAC_24G_INDEX 0
|
||||
#define IWL_LMAC_5G_INDEX 1
|
||||
|
||||
static inline u32 iwl_mvm_get_lmac_id(const struct iwl_fw *fw,
|
||||
enum nl80211_band band){
|
||||
if (!fw_has_capa(&fw->ucode_capa, IWL_UCODE_TLV_CAPA_CDB_SUPPORT) ||
|
||||
band == NL80211_BAND_2GHZ)
|
||||
return IWL_LMAC_24G_INDEX;
|
||||
return IWL_LMAC_5G_INDEX;
|
||||
}
|
||||
|
||||
/* The maximal number of fragments in the FW's schedule session */
|
||||
#define IWL_MVM_MAX_QUOTA 128
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2019 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2019, 2023 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -67,17 +67,12 @@ enum iwl_calib_cfg {
|
||||
* Sent as part of the phy configuration command (v3) to configure specific FW
|
||||
* defined PHY filters that can be applied to each antenna.
|
||||
*
|
||||
* @filter_cfg_chain_a: filter config id for LMAC1 chain A
|
||||
* @filter_cfg_chain_b: filter config id for LMAC1 chain B
|
||||
* @filter_cfg_chain_c: filter config id for LMAC2 chain A
|
||||
* @filter_cfg_chain_d: filter config id for LMAC2 chain B
|
||||
* values: 0 - no filter; 0xffffffff - reserved; otherwise - filter id
|
||||
* @filter_cfg_chains: filter config id for LMAC1 chain A, LMAC1 chain B,
|
||||
* LMAC2 chain A, LMAC2 chain B (in that order)
|
||||
* values: 0: no filter; 0xffffffff: reserved; otherwise: filter id
|
||||
*/
|
||||
struct iwl_phy_specific_cfg {
|
||||
__le32 filter_cfg_chain_a;
|
||||
__le32 filter_cfg_chain_b;
|
||||
__le32 filter_cfg_chain_c;
|
||||
__le32 filter_cfg_chain_d;
|
||||
__le32 filter_cfg_chains[4];
|
||||
} __packed; /* PHY_SPECIFIC_CONFIGURATION_API_VER_1*/
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -47,14 +47,14 @@ struct iwl_d3_manager_config {
|
||||
* @IWL_D3_PROTO_OFFLOAD_NS: NS (Neighbor Solicitation) is enabled
|
||||
* @IWL_D3_PROTO_IPV4_VALID: IPv4 data is valid
|
||||
* @IWL_D3_PROTO_IPV6_VALID: IPv6 data is valid
|
||||
* @IWL_D3_PROTO_REJECT_BTM: reject BTM request
|
||||
* @IWL_D3_PROTO_OFFLOAD_BTM: BTM offload is enabled
|
||||
*/
|
||||
enum iwl_proto_offloads {
|
||||
IWL_D3_PROTO_OFFLOAD_ARP = BIT(0),
|
||||
IWL_D3_PROTO_OFFLOAD_NS = BIT(1),
|
||||
IWL_D3_PROTO_IPV4_VALID = BIT(2),
|
||||
IWL_D3_PROTO_IPV6_VALID = BIT(3),
|
||||
IWL_D3_PROTO_REJECT_BTM = BIT(4),
|
||||
IWL_D3_PROTO_OFFLOAD_BTM = BIT(4),
|
||||
};
|
||||
|
||||
#define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V1 2
|
||||
@ -396,6 +396,7 @@ struct iwl_wowlan_config_cmd {
|
||||
#define WOWLAN_KEY_MAX_SIZE 32
|
||||
#define WOWLAN_GTK_KEYS_NUM 2
|
||||
#define WOWLAN_IGTK_KEYS_NUM 2
|
||||
#define WOWLAN_IGTK_MIN_INDEX 4
|
||||
|
||||
/*
|
||||
* WOWLAN_TSC_RSC_PARAMS
|
||||
@ -612,6 +613,7 @@ struct iwl_wowlan_gtk_status_v3 {
|
||||
} __packed; /* WOWLAN_GTK_MATERIAL_VER_3 */
|
||||
|
||||
#define IWL_WOWLAN_GTK_IDX_MASK (BIT(0) | BIT(1))
|
||||
#define IWL_WOWLAN_IGTK_BIGTK_IDX_MASK (BIT(0))
|
||||
|
||||
/**
|
||||
* struct iwl_wowlan_igtk_status - IGTK status
|
||||
|
@ -236,7 +236,7 @@ struct iwl_mac_low_latency_cmd {
|
||||
* Available only from version 2 of the command.
|
||||
* This values comes from the EMLSR transition delay in the EML
|
||||
* Capabilities subfield.
|
||||
* @reserved: alignment
|
||||
* @medium_sync_delay: the value as it appeasr in P802.11be_D2.2 Figure 9-1002j.
|
||||
* @assoc_id: unique ID assigned by the AP during association
|
||||
* @reserved1: alignment
|
||||
* @data_policy: see &enum iwl_mac_data_policy
|
||||
@ -247,7 +247,7 @@ struct iwl_mac_low_latency_cmd {
|
||||
struct iwl_mac_client_data {
|
||||
u8 is_assoc;
|
||||
u8 esr_transition_timeout;
|
||||
__le16 reserved;
|
||||
__le16 medium_sync_delay;
|
||||
|
||||
__le16 assoc_id;
|
||||
__le16 reserved1;
|
||||
|
@ -322,7 +322,7 @@ struct iwl_mcc_update_resp_v3 {
|
||||
} __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_3 */
|
||||
|
||||
/**
|
||||
* struct iwl_mcc_update_resp - response to MCC_UPDATE_CMD.
|
||||
* struct iwl_mcc_update_resp_v4 - response to MCC_UPDATE_CMD.
|
||||
* Contains the new channel control profile map, if changed, and the new MCC
|
||||
* (mobile country code).
|
||||
* The new MCC may be different than what was requested in MCC_UPDATE_CMD.
|
||||
@ -338,7 +338,7 @@ struct iwl_mcc_update_resp_v3 {
|
||||
* @channels: channel control data map, DWORD for each channel. Only the first
|
||||
* 16bits are used.
|
||||
*/
|
||||
struct iwl_mcc_update_resp {
|
||||
struct iwl_mcc_update_resp_v4 {
|
||||
__le32 status;
|
||||
__le16 mcc;
|
||||
__le16 cap;
|
||||
@ -350,6 +350,37 @@ struct iwl_mcc_update_resp {
|
||||
__le32 channels[];
|
||||
} __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_4 */
|
||||
|
||||
/**
|
||||
* struct iwl_mcc_update_resp_v8 - response to MCC_UPDATE_CMD.
|
||||
* Contains the new channel control profile map, if changed, and the new MCC
|
||||
* (mobile country code).
|
||||
* The new MCC may be different than what was requested in MCC_UPDATE_CMD.
|
||||
* @status: see &enum iwl_mcc_update_status
|
||||
* @mcc: the new applied MCC
|
||||
* @padding: padding for 2 bytes.
|
||||
* @cap: capabilities for all channels which matches the MCC
|
||||
* @time: time elapsed from the MCC test start (in units of 30 seconds)
|
||||
* @geo_info: geographic specific profile information
|
||||
* see &enum iwl_geo_information.
|
||||
* @source_id: the MCC source, see iwl_mcc_source
|
||||
* @reserved: for four bytes alignment.
|
||||
* @n_channels: number of channels in @channels_data.
|
||||
* @channels: channel control data map, DWORD for each channel. Only the first
|
||||
* 16bits are used.
|
||||
*/
|
||||
struct iwl_mcc_update_resp_v8 {
|
||||
__le32 status;
|
||||
__le16 mcc;
|
||||
u8 padding[2];
|
||||
__le32 cap;
|
||||
__le16 time;
|
||||
__le16 geo_info;
|
||||
u8 source_id;
|
||||
u8 reserved[3];
|
||||
__le32 n_channels;
|
||||
__le32 channels[];
|
||||
} __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_8 */
|
||||
|
||||
/**
|
||||
* struct iwl_mcc_chub_notif - chub notifies of mcc change
|
||||
* (MCC_CHUB_UPDATE_CMD = 0xc9)
|
||||
|
@ -21,6 +21,7 @@
|
||||
* @IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_2_MSK: enable HE Dual Carrier Modulation
|
||||
* for BPSK (MCS 0) with 2 spatial
|
||||
* streams
|
||||
* @IWL_TLC_MNG_CFG_FLAGS_EHT_EXTRA_LTF_MSK: enable support for EHT extra LTF
|
||||
*/
|
||||
enum iwl_tlc_mng_cfg_flags {
|
||||
IWL_TLC_MNG_CFG_FLAGS_STBC_MSK = BIT(0),
|
||||
@ -28,6 +29,7 @@ enum iwl_tlc_mng_cfg_flags {
|
||||
IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK = BIT(2),
|
||||
IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_1_MSK = BIT(3),
|
||||
IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_2_MSK = BIT(4),
|
||||
IWL_TLC_MNG_CFG_FLAGS_EHT_EXTRA_LTF_MSK = BIT(6),
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -292,7 +292,7 @@ enum iwl_rx_phy_he_data0 {
|
||||
/* TSF overload low dword */
|
||||
enum iwl_rx_phy_eht_data0 {
|
||||
/* info type: EHT any */
|
||||
/* 1 bits reserved */
|
||||
IWL_RX_PHY_DATA0_EHT_VALIDATE = BIT(0),
|
||||
IWL_RX_PHY_DATA0_EHT_UPLINK = BIT(1),
|
||||
IWL_RX_PHY_DATA0_EHT_BSS_COLOR_MASK = 0x000000fc,
|
||||
IWL_RX_PHY_DATA0_ETH_SPATIAL_REUSE_MASK = 0x00000f00,
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -727,8 +727,10 @@ enum iwl_umac_scan_general_params_flags2 {
|
||||
* @iter_interval: interval between two scan iterations on one channel.
|
||||
*/
|
||||
struct iwl_scan_channel_cfg_umac {
|
||||
#define IWL_CHAN_CFG_FLAGS_BAND_POS 30
|
||||
__le32 flags;
|
||||
/* Both versions are of the same size, so use a union without adjusting
|
||||
|
||||
/* All versions are of the same size, so use a union without adjusting
|
||||
* the command size later
|
||||
*/
|
||||
union {
|
||||
@ -746,6 +748,12 @@ struct iwl_scan_channel_cfg_umac {
|
||||
* SCAN_CHANNEL_CONFIG_API_S_VER_3
|
||||
* SCAN_CHANNEL_CONFIG_API_S_VER_4
|
||||
*/
|
||||
struct {
|
||||
u8 channel_num;
|
||||
u8 psd_20;
|
||||
u8 iter_count;
|
||||
u8 iter_interval;
|
||||
} v5; /* SCAN_CHANNEL_CONFIG_API_S_VER_5 */
|
||||
};
|
||||
} __packed;
|
||||
|
||||
@ -982,7 +990,7 @@ struct iwl_scan_channel_params_v4 {
|
||||
SCAN_CHANNEL_PARAMS_API_S_VER_5 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_channel_params_v6
|
||||
* struct iwl_scan_channel_params_v7
|
||||
* @flags: channel flags &enum iwl_scan_channel_flags
|
||||
* @count: num of channels in scan request
|
||||
* @n_aps_override: override the number of APs the FW uses to calculate dwell
|
||||
@ -992,7 +1000,7 @@ struct iwl_scan_channel_params_v4 {
|
||||
* @channel_config: array of explicit channel configurations
|
||||
* for 2.4Ghz and 5.2Ghz bands
|
||||
*/
|
||||
struct iwl_scan_channel_params_v6 {
|
||||
struct iwl_scan_channel_params_v7 {
|
||||
u8 flags;
|
||||
u8 count;
|
||||
u8 n_aps_override[2];
|
||||
@ -1003,7 +1011,8 @@ struct iwl_scan_channel_params_v6 {
|
||||
* struct iwl_scan_general_params_v11
|
||||
* @flags: &enum iwl_umac_scan_general_flags_v2
|
||||
* @reserved: reserved for future
|
||||
* @scan_start_mac_id: report the scan start TSF time according to this mac TSF
|
||||
* @scan_start_mac_or_link_id: report the scan start TSF time according to this
|
||||
* mac (up to verion 11) or link (starting with version 12) TSF
|
||||
* @active_dwell: dwell time for active scan per LMAC
|
||||
* @adwell_default_2g: adaptive dwell default number of APs
|
||||
* for 2.4GHz channel
|
||||
@ -1026,7 +1035,7 @@ struct iwl_scan_channel_params_v6 {
|
||||
struct iwl_scan_general_params_v11 {
|
||||
__le16 flags;
|
||||
u8 reserved;
|
||||
u8 scan_start_mac_id;
|
||||
u8 scan_start_mac_or_link_id;
|
||||
u8 active_dwell[SCAN_TWO_LMACS];
|
||||
u8 adwell_default_2g;
|
||||
u8 adwell_default_5g;
|
||||
@ -1038,7 +1047,7 @@ struct iwl_scan_general_params_v11 {
|
||||
__le32 scan_priority;
|
||||
u8 passive_dwell[SCAN_TWO_LMACS];
|
||||
u8 num_of_fragments[SCAN_TWO_LMACS];
|
||||
} __packed; /* SCAN_GENERAL_PARAMS_API_S_VER_11 and *_VER_10 */
|
||||
} __packed; /* SCAN_GENERAL_PARAMS_API_S_VER_12, *_VER_11 and *_VER_10 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_periodic_parms_v1
|
||||
@ -1067,18 +1076,18 @@ struct iwl_scan_req_params_v12 {
|
||||
} __packed; /* SCAN_REQUEST_PARAMS_API_S_VER_12 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_req_params_v15
|
||||
* struct iwl_scan_req_params_v16
|
||||
* @general_params: &struct iwl_scan_general_params_v11
|
||||
* @channel_params: &struct iwl_scan_channel_params_v6
|
||||
* @channel_params: &struct iwl_scan_channel_params_v7
|
||||
* @periodic_params: &struct iwl_scan_periodic_parms_v1
|
||||
* @probe_params: &struct iwl_scan_probe_params_v4
|
||||
*/
|
||||
struct iwl_scan_req_params_v15 {
|
||||
struct iwl_scan_req_params_v17 {
|
||||
struct iwl_scan_general_params_v11 general_params;
|
||||
struct iwl_scan_channel_params_v6 channel_params;
|
||||
struct iwl_scan_channel_params_v7 channel_params;
|
||||
struct iwl_scan_periodic_parms_v1 periodic_params;
|
||||
struct iwl_scan_probe_params_v4 probe_params;
|
||||
} __packed; /* SCAN_REQUEST_PARAMS_API_S_VER_15 and *_VER_14 */
|
||||
} __packed; /* SCAN_REQUEST_PARAMS_API_S_VER_17 - 14 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_req_umac_v12
|
||||
@ -1093,16 +1102,16 @@ struct iwl_scan_req_umac_v12 {
|
||||
} __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_12 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_req_umac_v15
|
||||
* struct iwl_scan_req_umac_v16
|
||||
* @uid: scan id, &enum iwl_umac_scan_uid_offsets
|
||||
* @ooc_priority: out of channel priority - &enum iwl_scan_priority
|
||||
* @scan_params: scan parameters
|
||||
*/
|
||||
struct iwl_scan_req_umac_v15 {
|
||||
struct iwl_scan_req_umac_v17 {
|
||||
__le32 uid;
|
||||
__le32 ooc_priority;
|
||||
struct iwl_scan_req_params_v15 scan_params;
|
||||
} __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_15 and *_VER_14 */
|
||||
struct iwl_scan_req_params_v17 scan_params;
|
||||
} __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_17 - 14 */
|
||||
|
||||
/**
|
||||
* struct iwl_umac_scan_abort
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
#ifndef __iwl_fw_api_tx_h__
|
||||
@ -177,17 +177,6 @@ enum iwl_tx_offload_assist_flags_pos {
|
||||
#define IWL_TX_CMD_OFFLD_MH_MASK 0x1f
|
||||
#define IWL_TX_CMD_OFFLD_IP_HDR_MASK 0x3f
|
||||
|
||||
enum iwl_tx_offload_assist_bz {
|
||||
IWL_TX_CMD_OFFLD_BZ_RESULT_OFFS = 0x000003ff,
|
||||
IWL_TX_CMD_OFFLD_BZ_START_OFFS = 0x001ff800,
|
||||
IWL_TX_CMD_OFFLD_BZ_MH_LEN = 0x07c00000,
|
||||
IWL_TX_CMD_OFFLD_BZ_MH_PAD = 0x08000000,
|
||||
IWL_TX_CMD_OFFLD_BZ_AMSDU = 0x10000000,
|
||||
IWL_TX_CMD_OFFLD_BZ_ZERO2ONES = 0x20000000,
|
||||
IWL_TX_CMD_OFFLD_BZ_ENABLE_CSUM = 0x40000000,
|
||||
IWL_TX_CMD_OFFLD_BZ_PARTIAL_CSUM = 0x80000000,
|
||||
};
|
||||
|
||||
/* TODO: complete documentation for try_cnt and btkill_cnt */
|
||||
/**
|
||||
* struct iwl_tx_cmd - TX command struct to FW
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -1038,7 +1038,7 @@ iwl_dump_ini_prph_mac_iter(struct iwl_fw_runtime *fwrt,
|
||||
range->range_data_size = reg->dev_addr.size;
|
||||
for (i = 0; i < le32_to_cpu(reg->dev_addr.size); i += 4) {
|
||||
prph_val = iwl_read_prph(fwrt->trans, addr + i);
|
||||
if ((prph_val & ~0xf) == 0xa5a5a5a0)
|
||||
if (iwl_trans_is_hw_error_value(prph_val))
|
||||
return -EBUSY;
|
||||
*val++ = cpu_to_le32(prph_val);
|
||||
}
|
||||
@ -1562,7 +1562,7 @@ iwl_dump_ini_dbgi_sram_iter(struct iwl_fw_runtime *fwrt,
|
||||
prph_data = iwl_read_prph_no_grab(fwrt->trans, (i % 2) ?
|
||||
DBGI_SRAM_TARGET_ACCESS_RDATA_MSB :
|
||||
DBGI_SRAM_TARGET_ACCESS_RDATA_LSB);
|
||||
if ((prph_data & ~0xf) == 0xa5a5a5a0) {
|
||||
if (iwl_trans_is_hw_error_value(prph_data)) {
|
||||
iwl_trans_release_nic_access(fwrt->trans);
|
||||
return -EBUSY;
|
||||
}
|
||||
@ -3154,6 +3154,51 @@ static int iwl_fw_dbg_restart_recording(struct iwl_trans *trans,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iwl_fw_send_timestamp_marker_cmd(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
struct iwl_mvm_marker marker = {
|
||||
.dw_len = sizeof(struct iwl_mvm_marker) / 4,
|
||||
.marker_id = MARKER_ID_SYNC_CLOCK,
|
||||
};
|
||||
struct iwl_host_cmd hcmd = {
|
||||
.flags = CMD_ASYNC,
|
||||
.id = WIDE_ID(LONG_GROUP, MARKER_CMD),
|
||||
.dataflags = {},
|
||||
};
|
||||
struct iwl_mvm_marker_rsp *resp;
|
||||
int cmd_ver = iwl_fw_lookup_cmd_ver(fwrt->fw,
|
||||
WIDE_ID(LONG_GROUP, MARKER_CMD),
|
||||
IWL_FW_CMD_VER_UNKNOWN);
|
||||
int ret;
|
||||
|
||||
if (cmd_ver == 1) {
|
||||
/* the real timestamp is taken from the ftrace clock
|
||||
* this is for finding the match between fw and kernel logs
|
||||
*/
|
||||
marker.timestamp = cpu_to_le64(fwrt->timestamp.seq++);
|
||||
} else if (cmd_ver == 2) {
|
||||
marker.timestamp = cpu_to_le64(ktime_get_boottime_ns());
|
||||
} else {
|
||||
IWL_DEBUG_INFO(fwrt,
|
||||
"Invalid version of Marker CMD. Ver = %d\n",
|
||||
cmd_ver);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hcmd.data[0] = ▮
|
||||
hcmd.len[0] = sizeof(marker);
|
||||
|
||||
ret = iwl_trans_send_cmd(fwrt->trans, &hcmd);
|
||||
|
||||
if (cmd_ver > 1 && hcmd.resp_pkt) {
|
||||
resp = (void *)hcmd.resp_pkt->data;
|
||||
IWL_DEBUG_INFO(fwrt, "FW GP2 time: %u\n",
|
||||
le32_to_cpu(resp->gp2));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_fw_dbg_params *params,
|
||||
bool stop)
|
||||
@ -3164,12 +3209,15 @@ void iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt,
|
||||
return;
|
||||
|
||||
if (fw_has_capa(&fwrt->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_DBG_SUSPEND_RESUME_CMD_SUPP))
|
||||
IWL_UCODE_TLV_CAPA_DBG_SUSPEND_RESUME_CMD_SUPP)) {
|
||||
if (stop)
|
||||
iwl_fw_send_timestamp_marker_cmd(fwrt);
|
||||
ret = iwl_fw_dbg_suspend_resume_hcmd(fwrt->trans, stop);
|
||||
else if (stop)
|
||||
} else if (stop) {
|
||||
iwl_fw_dbg_stop_recording(fwrt->trans, params);
|
||||
else
|
||||
} else {
|
||||
ret = iwl_fw_dbg_restart_recording(fwrt->trans, params);
|
||||
}
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
if (!ret) {
|
||||
if (stop)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2019, 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2019, 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -227,6 +227,8 @@ static inline void iwl_fw_flush_dumps(struct iwl_fw_runtime *fwrt)
|
||||
flush_delayed_work(&fwrt->dump.wks[i].wk);
|
||||
}
|
||||
|
||||
int iwl_fw_send_timestamp_marker_cmd(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
static inline void iwl_fw_cancel_timestamp(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
@ -327,4 +329,18 @@ void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt);
|
||||
void iwl_send_dbg_dump_complete_cmd(struct iwl_fw_runtime *fwrt,
|
||||
u32 timepoint,
|
||||
u32 timepoint_data);
|
||||
|
||||
#define IWL_FW_CHECK_FAILED(_obj, _fmt, ...) \
|
||||
IWL_ERR_LIMIT(_obj, _fmt, __VA_ARGS__)
|
||||
|
||||
#define IWL_FW_CHECK(_obj, _cond, _fmt, ...) \
|
||||
({ \
|
||||
bool __cond = (_cond); \
|
||||
\
|
||||
if (unlikely(__cond)) \
|
||||
IWL_FW_CHECK_FAILED(_obj, _fmt, __VA_ARGS__); \
|
||||
\
|
||||
unlikely(__cond); \
|
||||
})
|
||||
|
||||
#endif /* __iwl_fw_dbg_h__ */
|
||||
|
@ -123,28 +123,6 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
|
||||
#define FWRT_DEBUGFS_ADD_FILE(name, parent, mode) \
|
||||
FWRT_DEBUGFS_ADD_FILE_ALIAS(#name, name, parent, mode)
|
||||
|
||||
static int iwl_fw_send_timestamp_marker_cmd(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
struct iwl_mvm_marker marker = {
|
||||
.dw_len = sizeof(struct iwl_mvm_marker) / 4,
|
||||
.marker_id = MARKER_ID_SYNC_CLOCK,
|
||||
|
||||
/* the real timestamp is taken from the ftrace clock
|
||||
* this is for finding the match between fw and kernel logs
|
||||
*/
|
||||
.timestamp = cpu_to_le64(fwrt->timestamp.seq++),
|
||||
};
|
||||
|
||||
struct iwl_host_cmd hcmd = {
|
||||
.id = MARKER_CMD,
|
||||
.flags = CMD_ASYNC,
|
||||
.data[0] = &marker,
|
||||
.len[0] = sizeof(marker),
|
||||
};
|
||||
|
||||
return iwl_trans_send_cmd(fwrt->trans, &hcmd);
|
||||
}
|
||||
|
||||
static int iwl_dbgfs_enabled_severities_write(struct iwl_fw_runtime *fwrt,
|
||||
char *buf, size_t count)
|
||||
{
|
||||
@ -354,9 +332,18 @@ static int iwl_dbgfs_fw_info_seq_show(struct seq_file *seq, void *v)
|
||||
const struct iwl_fw *fw = priv->fwrt->fw;
|
||||
const struct iwl_fw_cmd_version *ver;
|
||||
u32 cmd_id;
|
||||
int has_capa;
|
||||
|
||||
if (!state->pos)
|
||||
if (!state->pos) {
|
||||
seq_puts(seq, "fw_capa:\n");
|
||||
has_capa = fw_has_capa(&fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_PPAG_CHINA_BIOS_SUPPORT) ? 1 : 0;
|
||||
seq_printf(seq,
|
||||
" %d: %d\n",
|
||||
IWL_UCODE_TLV_CAPA_PPAG_CHINA_BIOS_SUPPORT,
|
||||
has_capa);
|
||||
seq_puts(seq, "fw_api_ver:\n");
|
||||
}
|
||||
|
||||
ver = &fw->ucode_capa.cmd_versions[state->pos];
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -194,7 +194,7 @@ static void iwl_fwrt_dump_lmac_error_log(struct iwl_fw_runtime *fwrt, u8 lmac_nu
|
||||
|
||||
/* check if there is a HW error */
|
||||
val = iwl_trans_read_mem32(trans, base);
|
||||
if (((val & ~0xf) == 0xa5a5a5a0) || ((val & ~0xf) == 0x5a5a5a50)) {
|
||||
if (iwl_trans_is_hw_error_value(val)) {
|
||||
int err;
|
||||
|
||||
IWL_ERR(trans, "HW error, resetting before reading\n");
|
||||
@ -467,6 +467,10 @@ static void iwl_fwrt_dump_fseq_regs(struct iwl_fw_runtime *fwrt)
|
||||
FSEQ_REG(CNVR_AUX_MISC_CHIP),
|
||||
FSEQ_REG(CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM),
|
||||
FSEQ_REG(CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR),
|
||||
FSEQ_REG(FSEQ_PREV_CNVIO_INIT_VERSION),
|
||||
FSEQ_REG(FSEQ_WIFI_FSEQ_VERSION),
|
||||
FSEQ_REG(FSEQ_BT_FSEQ_VERSION),
|
||||
FSEQ_REG(FSEQ_CLASS_TP_VERSION),
|
||||
};
|
||||
|
||||
if (!iwl_trans_grab_nic_access(trans))
|
||||
@ -507,11 +511,16 @@ void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt)
|
||||
iwl_fwrt_dump_fseq_regs(fwrt);
|
||||
if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000) {
|
||||
pc_data = fwrt->trans->dbg.pc_data;
|
||||
|
||||
if (!iwl_trans_grab_nic_access(fwrt->trans))
|
||||
return;
|
||||
for (count = 0; count < fwrt->trans->dbg.num_pc;
|
||||
count++, pc_data++)
|
||||
IWL_ERR(fwrt, "%s: 0x%x\n",
|
||||
pc_data->pc_name,
|
||||
pc_data->pc_address);
|
||||
iwl_read_prph_no_grab(fwrt->trans,
|
||||
pc_data->pc_address));
|
||||
iwl_trans_release_nic_access(fwrt->trans);
|
||||
}
|
||||
|
||||
if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ) {
|
||||
|
@ -465,8 +465,9 @@ enum iwl_ucode_tlv_capa {
|
||||
IWL_UCODE_TLV_CAPA_MLD_API_SUPPORT = (__force iwl_ucode_tlv_capa_t)110,
|
||||
IWL_UCODE_TLV_CAPA_SCAN_DONT_TOGGLE_ANT = (__force iwl_ucode_tlv_capa_t)111,
|
||||
IWL_UCODE_TLV_CAPA_PPAG_CHINA_BIOS_SUPPORT = (__force iwl_ucode_tlv_capa_t)112,
|
||||
IWL_UCODE_TLV_CAPA_OFFLOAD_REJ_BTM_SUPPORT = (__force iwl_ucode_tlv_capa_t)113,
|
||||
IWL_UCODE_TLV_CAPA_OFFLOAD_BTM_SUPPORT = (__force iwl_ucode_tlv_capa_t)113,
|
||||
IWL_UCODE_TLV_CAPA_STA_EXP_MFP_SUPPORT = (__force iwl_ucode_tlv_capa_t)114,
|
||||
IWL_UCODE_TLV_CAPA_SNIFF_VALIDATE_SUPPORT = (__force iwl_ucode_tlv_capa_t)116,
|
||||
|
||||
#ifdef __CHECKER__
|
||||
/* sparse says it cannot increment the previous enum member */
|
||||
|
@ -1,13 +1,11 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2020-2022 Intel Corporation
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright(c) 2020-2023 Intel Corporation
|
||||
*/
|
||||
#ifndef __IWL_PNVM_H__
|
||||
#define __IWL_PNVM_H__
|
||||
|
||||
#include "iwl-drv.h"
|
||||
#include "fw/notif-wait.h"
|
||||
|
||||
#define MVM_UCODE_PNVM_TIMEOUT (HZ / 4)
|
||||
@ -22,18 +20,10 @@ static inline
|
||||
void iwl_pnvm_get_fs_name(struct iwl_trans *trans,
|
||||
u8 *pnvm_name, size_t max_len)
|
||||
{
|
||||
int pre_len;
|
||||
char _fw_name_pre[FW_NAME_PRE_BUFSIZE];
|
||||
|
||||
/*
|
||||
* The prefix unfortunately includes a hyphen at the end, so
|
||||
* don't add the dot here...
|
||||
*/
|
||||
snprintf(pnvm_name, max_len, "%spnvm", trans->cfg->fw_name_pre);
|
||||
|
||||
/* ...but replace the hyphen with the dot here. */
|
||||
pre_len = strlen(trans->cfg->fw_name_pre);
|
||||
if (pre_len < max_len && pre_len > 0)
|
||||
pnvm_name[pre_len - 1] = '.';
|
||||
snprintf(pnvm_name, max_len, "%s.pnvm",
|
||||
iwl_drv_get_fwname_pre(trans, _fw_name_pre));
|
||||
}
|
||||
|
||||
#endif /* __IWL_PNVM_H__ */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_fw_runtime_h__
|
||||
#define __iwl_fw_runtime_h__
|
||||
@ -146,12 +146,14 @@ struct iwl_fw_runtime {
|
||||
u32 umac_minor;
|
||||
} fw_ver;
|
||||
} dump;
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
struct {
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
struct delayed_work wk;
|
||||
u32 delay;
|
||||
#endif
|
||||
u64 seq;
|
||||
} timestamp;
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
bool tpc_enabled;
|
||||
#endif /* CONFIG_IWLWIFI_DEBUGFS */
|
||||
#ifdef CONFIG_ACPI
|
||||
|
@ -2,6 +2,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*/
|
||||
#ifndef __IWL_CONFIG_H__
|
||||
#define __IWL_CONFIG_H__
|
||||
@ -34,6 +35,7 @@ enum iwl_device_family {
|
||||
IWL_DEVICE_FAMILY_22000,
|
||||
IWL_DEVICE_FAMILY_AX210,
|
||||
IWL_DEVICE_FAMILY_BZ,
|
||||
IWL_DEVICE_FAMILY_SC,
|
||||
};
|
||||
|
||||
/*
|
||||
@ -307,7 +309,9 @@ struct iwl_fw_mon_regs {
|
||||
* @name: Official name of the device
|
||||
* @fw_name_pre: Firmware filename prefix. The api version and extension
|
||||
* (.ucode) will be added to filename before loading from disk. The
|
||||
* filename is constructed as fw_name_pre<api>.ucode.
|
||||
* filename is constructed as <fw_name_pre>-<api>.ucode.
|
||||
* @fw_name_mac: MAC name for this config, the remaining pieces of the
|
||||
* name will be generated dynamically
|
||||
* @ucode_api_max: Highest version of uCode API supported by driver.
|
||||
* @ucode_api_min: Lowest version of uCode API supported by driver.
|
||||
* @max_inst_size: The maximal length of the fw inst section (only DVM)
|
||||
@ -361,6 +365,7 @@ struct iwl_cfg {
|
||||
/* params specific to an individual device within a device family */
|
||||
const char *name;
|
||||
const char *fw_name_pre;
|
||||
const char *fw_name_mac;
|
||||
/* params likely to change within a device family */
|
||||
const struct iwl_ht_params *ht_params;
|
||||
const struct iwl_eeprom_params *eeprom_params;
|
||||
@ -388,7 +393,6 @@ struct iwl_cfg {
|
||||
high_temp:1,
|
||||
mac_addr_from_csr:10,
|
||||
lp_xtal_workaround:1,
|
||||
disable_dummy_notification:1,
|
||||
apmg_not_supported:1,
|
||||
vht_mu_mimo_supported:1,
|
||||
cdb:1,
|
||||
@ -416,17 +420,15 @@ struct iwl_cfg {
|
||||
#define IWL_CFG_ANY (~0)
|
||||
|
||||
#define IWL_CFG_MAC_TYPE_PU 0x31
|
||||
#define IWL_CFG_MAC_TYPE_PNJ 0x32
|
||||
#define IWL_CFG_MAC_TYPE_TH 0x32
|
||||
#define IWL_CFG_MAC_TYPE_QU 0x33
|
||||
#define IWL_CFG_MAC_TYPE_QUZ 0x35
|
||||
#define IWL_CFG_MAC_TYPE_QNJ 0x36
|
||||
#define IWL_CFG_MAC_TYPE_SO 0x37
|
||||
#define IWL_CFG_MAC_TYPE_SNJ 0x42
|
||||
#define IWL_CFG_MAC_TYPE_SOF 0x43
|
||||
#define IWL_CFG_MAC_TYPE_MA 0x44
|
||||
#define IWL_CFG_MAC_TYPE_BZ 0x46
|
||||
#define IWL_CFG_MAC_TYPE_GL 0x47
|
||||
#define IWL_CFG_MAC_TYPE_SC 0x48
|
||||
|
||||
#define IWL_CFG_RF_TYPE_TH 0x105
|
||||
#define IWL_CFG_RF_TYPE_TH1 0x108
|
||||
@ -438,6 +440,7 @@ struct iwl_cfg {
|
||||
#define IWL_CFG_RF_TYPE_MR 0x110
|
||||
#define IWL_CFG_RF_TYPE_MS 0x111
|
||||
#define IWL_CFG_RF_TYPE_FM 0x112
|
||||
#define IWL_CFG_RF_TYPE_WH 0x113
|
||||
|
||||
#define IWL_CFG_RF_ID_TH 0x1
|
||||
#define IWL_CFG_RF_ID_TH1 0x1
|
||||
@ -486,17 +489,16 @@ extern const struct iwl_cfg_trans_params iwl9000_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl9560_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl9560_long_latency_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl9560_shared_clk_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_qnj_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_qu_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_qu_medium_latency_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_ax200_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_snj_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_so_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_so_long_latency_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_so_long_latency_imr_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_ma_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_bz_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_sc_trans_cfg;
|
||||
extern const char iwl9162_name[];
|
||||
extern const char iwl9260_name[];
|
||||
extern const char iwl9260_1_name[];
|
||||
@ -535,6 +537,7 @@ extern const char iwl_ax221_name[];
|
||||
extern const char iwl_ax231_name[];
|
||||
extern const char iwl_ax411_name[];
|
||||
extern const char iwl_bz_name[];
|
||||
extern const char iwl_sc_name[];
|
||||
#if IS_ENABLED(CONFIG_IWLDVM)
|
||||
extern const struct iwl_cfg iwl5300_agn_cfg;
|
||||
extern const struct iwl_cfg iwl5100_agn_cfg;
|
||||
@ -580,6 +583,7 @@ extern const struct iwl_cfg iwl105_bgn_d_cfg;
|
||||
extern const struct iwl_cfg iwl135_bgn_cfg;
|
||||
#endif /* CONFIG_IWLDVM */
|
||||
#if IS_ENABLED(CONFIG_IWLMVM)
|
||||
extern const struct iwl_ht_params iwl_22000_ht_params;
|
||||
extern const struct iwl_cfg iwl7260_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl7260_2ac_cfg_high_temp;
|
||||
extern const struct iwl_cfg iwl7260_2n_cfg;
|
||||
@ -604,7 +608,6 @@ extern const struct iwl_cfg iwl9260_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl9560_qu_b0_jf_b0_cfg;
|
||||
extern const struct iwl_cfg iwl9560_qu_c0_jf_b0_cfg;
|
||||
extern const struct iwl_cfg iwl9560_quz_a0_jf_b0_cfg;
|
||||
extern const struct iwl_cfg iwl9560_qnj_b0_jf_b0_cfg;
|
||||
extern const struct iwl_cfg iwl9560_2ac_cfg_soc;
|
||||
extern const struct iwl_cfg iwl_qu_b0_hr1_b0;
|
||||
extern const struct iwl_cfg iwl_qu_c0_hr1_b0;
|
||||
@ -623,57 +626,23 @@ extern const struct iwl_cfg killer1650s_2ax_cfg_qu_c0_hr_b0;
|
||||
extern const struct iwl_cfg killer1650i_2ax_cfg_qu_c0_hr_b0;
|
||||
extern const struct iwl_cfg killer1650x_2ax_cfg;
|
||||
extern const struct iwl_cfg killer1650w_2ax_cfg;
|
||||
extern const struct iwl_cfg iwl_qnj_b0_hr_b0_cfg;
|
||||
extern const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0;
|
||||
extern const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0;
|
||||
extern const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0_long;
|
||||
extern const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0;
|
||||
extern const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0;
|
||||
extern const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long;
|
||||
extern const struct iwl_cfg iwlax411_2ax_cfg_sosnj_gf4_a0;
|
||||
extern const struct iwl_cfg iwlax211_cfg_snj_gf_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_snj_hr_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_snj_a0_jf_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_ma_a0_hr_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_ma_a0_gf_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_ma_a0_gf4_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_ma_a0_mr_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_ma_a0_ms_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_ma_a0_fm_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_ma_b0_hr_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_ma_b0_gf_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_ma_b0_gf4_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_ma_b0_mr_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_ma_b0_fm_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_snj_a0_mr_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_snj_a0_ms_a0;
|
||||
|
||||
extern const struct iwl_cfg iwl_cfg_ma;
|
||||
|
||||
extern const struct iwl_cfg iwl_cfg_so_a0_hr_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_so_a0_ms_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_quz_a0_hr_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_bz_a0_hr_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bz_a0_hr_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_bz_a0_gf_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bz_a0_gf4_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bz_a0_mr_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bz_a0_fm_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bz_a0_fm4_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bz_a0_fm_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_bz_a0_fm4_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_gl_a0_fm_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_gl_b0_fm_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_bz_z0_gf_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_a0_fm_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_a0_fm4_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_a0_gf_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_b0_gf_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_a0_gf4_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_b0_gf4_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_a0_hr_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_a0_hr_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_b0_hr_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_b0_hr_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_b0_fm_b0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_b0_fm4_b0;
|
||||
|
||||
extern const struct iwl_cfg iwl_cfg_bz;
|
||||
extern const struct iwl_cfg iwl_cfg_gl;
|
||||
|
||||
extern const struct iwl_cfg iwl_cfg_sc;
|
||||
#endif /* CONFIG_IWLMVM */
|
||||
|
||||
#endif /* __IWL_CONFIG_H__ */
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*/
|
||||
#include <linux/firmware.h>
|
||||
#include "iwl-drv.h"
|
||||
@ -586,8 +586,14 @@ static int iwl_dbg_tlv_alloc_fragments(struct iwl_fw_runtime *fwrt,
|
||||
fw_mon_cfg = &fwrt->trans->dbg.fw_mon_cfg[alloc_id];
|
||||
fw_mon = &fwrt->trans->dbg.fw_mon_ini[alloc_id];
|
||||
|
||||
if (fw_mon->num_frags ||
|
||||
fw_mon_cfg->buf_location !=
|
||||
if (fw_mon->num_frags) {
|
||||
for (i = 0; i < fw_mon->num_frags; i++)
|
||||
memset(fw_mon->frags[i].block, 0,
|
||||
fw_mon->frags[i].size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (fw_mon_cfg->buf_location !=
|
||||
cpu_to_le32(IWL_FW_INI_LOCATION_DRAM_PATH))
|
||||
return 0;
|
||||
|
||||
@ -795,8 +801,7 @@ static void iwl_dbg_tlv_update_drams(struct iwl_fw_runtime *fwrt)
|
||||
IWL_UCODE_TLV_CAPA_DRAM_FRAG_SUPPORT))
|
||||
return;
|
||||
|
||||
dram_info->first_word = cpu_to_le32(DRAM_INFO_FIRST_MAGIC_WORD);
|
||||
dram_info->second_word = cpu_to_le32(DRAM_INFO_SECOND_MAGIC_WORD);
|
||||
memset(dram_info, 0, sizeof(*dram_info));
|
||||
|
||||
for (i = IWL_FW_INI_ALLOCATION_ID_DBGC1;
|
||||
i < IWL_FW_INI_ALLOCATION_NUM; i++) {
|
||||
@ -813,11 +818,10 @@ static void iwl_dbg_tlv_update_drams(struct iwl_fw_runtime *fwrt)
|
||||
i, ret);
|
||||
}
|
||||
|
||||
if (dram_alloc)
|
||||
IWL_DEBUG_FW(fwrt, "block data after %08x\n",
|
||||
dram_info->first_word);
|
||||
else
|
||||
memset(frags->block, 0, sizeof(*dram_info));
|
||||
if (dram_alloc) {
|
||||
dram_info->first_word = cpu_to_le32(DRAM_INFO_FIRST_MAGIC_WORD);
|
||||
dram_info->second_word = cpu_to_le32(DRAM_INFO_SECOND_MAGIC_WORD);
|
||||
}
|
||||
}
|
||||
|
||||
static void iwl_dbg_tlv_send_hcmds(struct iwl_fw_runtime *fwrt,
|
||||
@ -1274,18 +1278,23 @@ static void iwl_dbg_tlv_init_cfg(struct iwl_fw_runtime *fwrt)
|
||||
int ret, i;
|
||||
u32 failed_alloc = 0;
|
||||
|
||||
if (*ini_dest != IWL_FW_INI_LOCATION_INVALID)
|
||||
if (*ini_dest == IWL_FW_INI_LOCATION_INVALID) {
|
||||
IWL_DEBUG_FW(fwrt,
|
||||
"WRT: Generating active triggers list, domain 0x%x\n",
|
||||
fwrt->trans->dbg.domains_bitmap);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(fwrt->trans->dbg.time_point); i++) {
|
||||
struct iwl_dbg_tlv_time_point_data *tp =
|
||||
&fwrt->trans->dbg.time_point[i];
|
||||
|
||||
iwl_dbg_tlv_gen_active_trig_list(fwrt, tp);
|
||||
}
|
||||
} else if (*ini_dest != IWL_FW_INI_LOCATION_DRAM_PATH) {
|
||||
/* For DRAM, go through the loop below to clear all the buffers
|
||||
* properly on restart, otherwise garbage may be left there and
|
||||
* leak into new debug dumps.
|
||||
*/
|
||||
return;
|
||||
|
||||
IWL_DEBUG_FW(fwrt,
|
||||
"WRT: Generating active triggers list, domain 0x%x\n",
|
||||
fwrt->trans->dbg.domains_bitmap);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(fwrt->trans->dbg.time_point); i++) {
|
||||
struct iwl_dbg_tlv_time_point_data *tp =
|
||||
&fwrt->trans->dbg.time_point[i];
|
||||
|
||||
iwl_dbg_tlv_gen_active_trig_list(fwrt, tp);
|
||||
}
|
||||
|
||||
*ini_dest = IWL_FW_INI_LOCATION_INVALID;
|
||||
|
@ -158,12 +158,71 @@ static int iwl_alloc_fw_desc(struct iwl_drv *drv, struct fw_desc *desc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline char iwl_drv_get_step(int step)
|
||||
{
|
||||
if (step == SILICON_Z_STEP)
|
||||
return 'z';
|
||||
return 'a' + step;
|
||||
}
|
||||
|
||||
const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf)
|
||||
{
|
||||
char mac_step, rf_step;
|
||||
const char *rf, *cdb;
|
||||
|
||||
if (trans->cfg->fw_name_pre)
|
||||
return trans->cfg->fw_name_pre;
|
||||
|
||||
if (WARN_ON(!trans->cfg->fw_name_mac))
|
||||
return "unconfigured";
|
||||
|
||||
mac_step = iwl_drv_get_step(trans->hw_rev_step);
|
||||
|
||||
switch (CSR_HW_RFID_TYPE(trans->hw_rf_id)) {
|
||||
case IWL_CFG_RF_TYPE_HR1:
|
||||
case IWL_CFG_RF_TYPE_HR2:
|
||||
rf = "hr";
|
||||
break;
|
||||
case IWL_CFG_RF_TYPE_GF:
|
||||
rf = "gf";
|
||||
break;
|
||||
case IWL_CFG_RF_TYPE_MR:
|
||||
rf = "mr";
|
||||
break;
|
||||
case IWL_CFG_RF_TYPE_MS:
|
||||
rf = "ms";
|
||||
break;
|
||||
case IWL_CFG_RF_TYPE_FM:
|
||||
rf = "fm";
|
||||
break;
|
||||
case IWL_CFG_RF_TYPE_WH:
|
||||
rf = "wh";
|
||||
break;
|
||||
default:
|
||||
return "unknown-rf";
|
||||
}
|
||||
|
||||
cdb = CSR_HW_RFID_IS_CDB(trans->hw_rf_id) ? "4" : "";
|
||||
|
||||
rf_step = iwl_drv_get_step(CSR_HW_RFID_STEP(trans->hw_rf_id));
|
||||
|
||||
scnprintf(buf, FW_NAME_PRE_BUFSIZE,
|
||||
"iwlwifi-%s-%c0-%s%s-%c0",
|
||||
trans->cfg->fw_name_mac, mac_step,
|
||||
rf, cdb, rf_step);
|
||||
|
||||
return buf;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_drv_get_fwname_pre);
|
||||
|
||||
static void iwl_req_fw_callback(const struct firmware *ucode_raw,
|
||||
void *context);
|
||||
|
||||
static int iwl_request_firmware(struct iwl_drv *drv, bool first)
|
||||
{
|
||||
const struct iwl_cfg *cfg = drv->trans->cfg;
|
||||
char _fw_name_pre[FW_NAME_PRE_BUFSIZE];
|
||||
const char *fw_name_pre;
|
||||
|
||||
if (drv->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
|
||||
(drv->trans->hw_rev_step != SILICON_B_STEP &&
|
||||
@ -174,6 +233,8 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
fw_name_pre = iwl_drv_get_fwname_pre(drv->trans, _fw_name_pre);
|
||||
|
||||
if (first)
|
||||
drv->fw_index = cfg->ucode_api_max;
|
||||
else
|
||||
@ -183,13 +244,13 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
|
||||
IWL_ERR(drv, "no suitable firmware found!\n");
|
||||
|
||||
if (cfg->ucode_api_min == cfg->ucode_api_max) {
|
||||
IWL_ERR(drv, "%s%d is required\n", cfg->fw_name_pre,
|
||||
IWL_ERR(drv, "%s-%d is required\n", fw_name_pre,
|
||||
cfg->ucode_api_max);
|
||||
} else {
|
||||
IWL_ERR(drv, "minimum version required: %s%d\n",
|
||||
cfg->fw_name_pre, cfg->ucode_api_min);
|
||||
IWL_ERR(drv, "maximum version supported: %s%d\n",
|
||||
cfg->fw_name_pre, cfg->ucode_api_max);
|
||||
IWL_ERR(drv, "minimum version required: %s-%d\n",
|
||||
fw_name_pre, cfg->ucode_api_min);
|
||||
IWL_ERR(drv, "maximum version supported: %s-%d\n",
|
||||
fw_name_pre, cfg->ucode_api_max);
|
||||
}
|
||||
|
||||
IWL_ERR(drv,
|
||||
@ -197,8 +258,8 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
snprintf(drv->firmware_name, sizeof(drv->firmware_name), "%s%d.ucode",
|
||||
cfg->fw_name_pre, drv->fw_index);
|
||||
snprintf(drv->firmware_name, sizeof(drv->firmware_name), "%s-%d.ucode",
|
||||
fw_name_pre, drv->fw_index);
|
||||
|
||||
IWL_DEBUG_FW_INFO(drv, "attempting to load firmware '%s'\n",
|
||||
drv->firmware_name);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2020-2021, 2023 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
*/
|
||||
#ifndef __iwl_drv_h__
|
||||
@ -92,4 +92,8 @@ void iwl_drv_stop(struct iwl_drv *drv);
|
||||
/* max retry for init flow */
|
||||
#define IWL_MAX_INIT_RETRY 2
|
||||
|
||||
#define FW_NAME_PRE_BUFSIZE 64
|
||||
struct iwl_trans;
|
||||
const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf);
|
||||
|
||||
#endif /* __iwl_drv_h__ */
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2003-2014, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2003-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2015-2016 Intel Deutschland GmbH
|
||||
*/
|
||||
#include <linux/delay.h>
|
||||
@ -72,6 +72,7 @@ u32 iwl_read_direct32(struct iwl_trans *trans, u32 reg)
|
||||
return value;
|
||||
}
|
||||
|
||||
/* return as if we have a HW timeout/failure */
|
||||
return 0x5a5a5a5a;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_read_direct32);
|
||||
@ -143,6 +144,7 @@ u32 iwl_read_prph(struct iwl_trans *trans, u32 ofs)
|
||||
return val;
|
||||
}
|
||||
|
||||
/* return as if we have a HW timeout/failure */
|
||||
return 0x5a5a5a5a;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_read_prph);
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -173,34 +173,34 @@ enum iwl_nvm_channel_flags {
|
||||
};
|
||||
|
||||
/**
|
||||
* enum iwl_reg_capa_flags - global flags applied for the whole regulatory
|
||||
* enum iwl_reg_capa_flags_v1 - global flags applied for the whole regulatory
|
||||
* domain.
|
||||
* @REG_CAPA_BF_CCD_LOW_BAND: Beam-forming or Cyclic Delay Diversity in the
|
||||
* @REG_CAPA_V1_BF_CCD_LOW_BAND: Beam-forming or Cyclic Delay Diversity in the
|
||||
* 2.4Ghz band is allowed.
|
||||
* @REG_CAPA_BF_CCD_HIGH_BAND: Beam-forming or Cyclic Delay Diversity in the
|
||||
* @REG_CAPA_V1_BF_CCD_HIGH_BAND: Beam-forming or Cyclic Delay Diversity in the
|
||||
* 5Ghz band is allowed.
|
||||
* @REG_CAPA_160MHZ_ALLOWED: 11ac channel with a width of 160Mhz is allowed
|
||||
* @REG_CAPA_V1_160MHZ_ALLOWED: 11ac channel with a width of 160Mhz is allowed
|
||||
* for this regulatory domain (valid only in 5Ghz).
|
||||
* @REG_CAPA_80MHZ_ALLOWED: 11ac channel with a width of 80Mhz is allowed
|
||||
* @REG_CAPA_V1_80MHZ_ALLOWED: 11ac channel with a width of 80Mhz is allowed
|
||||
* for this regulatory domain (valid only in 5Ghz).
|
||||
* @REG_CAPA_MCS_8_ALLOWED: 11ac with MCS 8 is allowed.
|
||||
* @REG_CAPA_MCS_9_ALLOWED: 11ac with MCS 9 is allowed.
|
||||
* @REG_CAPA_40MHZ_FORBIDDEN: 11n channel with a width of 40Mhz is forbidden
|
||||
* @REG_CAPA_V1_MCS_8_ALLOWED: 11ac with MCS 8 is allowed.
|
||||
* @REG_CAPA_V1_MCS_9_ALLOWED: 11ac with MCS 9 is allowed.
|
||||
* @REG_CAPA_V1_40MHZ_FORBIDDEN: 11n channel with a width of 40Mhz is forbidden
|
||||
* for this regulatory domain (valid only in 5Ghz).
|
||||
* @REG_CAPA_DC_HIGH_ENABLED: DC HIGH allowed.
|
||||
* @REG_CAPA_11AX_DISABLED: 11ax is forbidden for this regulatory domain.
|
||||
* @REG_CAPA_V1_DC_HIGH_ENABLED: DC HIGH allowed.
|
||||
* @REG_CAPA_V1_11AX_DISABLED: 11ax is forbidden for this regulatory domain.
|
||||
*/
|
||||
enum iwl_reg_capa_flags {
|
||||
REG_CAPA_BF_CCD_LOW_BAND = BIT(0),
|
||||
REG_CAPA_BF_CCD_HIGH_BAND = BIT(1),
|
||||
REG_CAPA_160MHZ_ALLOWED = BIT(2),
|
||||
REG_CAPA_80MHZ_ALLOWED = BIT(3),
|
||||
REG_CAPA_MCS_8_ALLOWED = BIT(4),
|
||||
REG_CAPA_MCS_9_ALLOWED = BIT(5),
|
||||
REG_CAPA_40MHZ_FORBIDDEN = BIT(7),
|
||||
REG_CAPA_DC_HIGH_ENABLED = BIT(9),
|
||||
REG_CAPA_11AX_DISABLED = BIT(10),
|
||||
};
|
||||
enum iwl_reg_capa_flags_v1 {
|
||||
REG_CAPA_V1_BF_CCD_LOW_BAND = BIT(0),
|
||||
REG_CAPA_V1_BF_CCD_HIGH_BAND = BIT(1),
|
||||
REG_CAPA_V1_160MHZ_ALLOWED = BIT(2),
|
||||
REG_CAPA_V1_80MHZ_ALLOWED = BIT(3),
|
||||
REG_CAPA_V1_MCS_8_ALLOWED = BIT(4),
|
||||
REG_CAPA_V1_MCS_9_ALLOWED = BIT(5),
|
||||
REG_CAPA_V1_40MHZ_FORBIDDEN = BIT(7),
|
||||
REG_CAPA_V1_DC_HIGH_ENABLED = BIT(9),
|
||||
REG_CAPA_V1_11AX_DISABLED = BIT(10),
|
||||
}; /* GEO_CHANNEL_CAPABILITIES_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
* enum iwl_reg_capa_flags_v2 - global flags applied for the whole regulatory
|
||||
@ -234,7 +234,31 @@ enum iwl_reg_capa_flags_v2 {
|
||||
REG_CAPA_V2_WEATHER_DISABLED = BIT(7),
|
||||
REG_CAPA_V2_40MHZ_ALLOWED = BIT(8),
|
||||
REG_CAPA_V2_11AX_DISABLED = BIT(10),
|
||||
};
|
||||
}; /* GEO_CHANNEL_CAPABILITIES_API_S_VER_2 */
|
||||
|
||||
/**
|
||||
* enum iwl_reg_capa_flags_v4 - global flags applied for the whole regulatory
|
||||
* domain.
|
||||
* @REG_CAPA_V4_160MHZ_ALLOWED: 11ac channel with a width of 160Mhz is allowed
|
||||
* for this regulatory domain (valid only in 5Ghz).
|
||||
* @REG_CAPA_V4_80MHZ_ALLOWED: 11ac channel with a width of 80Mhz is allowed
|
||||
* for this regulatory domain (valid only in 5Ghz).
|
||||
* @REG_CAPA_V4_MCS_12_ALLOWED: 11ac with MCS 12 is allowed.
|
||||
* @REG_CAPA_V4_MCS_13_ALLOWED: 11ac with MCS 13 is allowed.
|
||||
* @REG_CAPA_V4_11BE_DISABLED: 11be is forbidden for this regulatory domain.
|
||||
* @REG_CAPA_V4_11AX_DISABLED: 11ax is forbidden for this regulatory domain.
|
||||
* @REG_CAPA_V4_320MHZ_ALLOWED: 11be channel with a width of 320Mhz is allowed
|
||||
* for this regulatory domain (valid only in 5GHz).
|
||||
*/
|
||||
enum iwl_reg_capa_flags_v4 {
|
||||
REG_CAPA_V4_160MHZ_ALLOWED = BIT(3),
|
||||
REG_CAPA_V4_80MHZ_ALLOWED = BIT(4),
|
||||
REG_CAPA_V4_MCS_12_ALLOWED = BIT(5),
|
||||
REG_CAPA_V4_MCS_13_ALLOWED = BIT(6),
|
||||
REG_CAPA_V4_11BE_DISABLED = BIT(8),
|
||||
REG_CAPA_V4_11AX_DISABLED = BIT(13),
|
||||
REG_CAPA_V4_320MHZ_ALLOWED = BIT(16),
|
||||
}; /* GEO_CHANNEL_CAPABILITIES_API_S_VER_4 */
|
||||
|
||||
/*
|
||||
* API v2 for reg_capa_flags is relevant from version 6 and onwards of the
|
||||
@ -242,23 +266,33 @@ enum iwl_reg_capa_flags_v2 {
|
||||
*/
|
||||
#define REG_CAPA_V2_RESP_VER 6
|
||||
|
||||
/* API v4 for reg_capa_flags is relevant from version 8 and onwards of the
|
||||
* MCC update command response.
|
||||
*/
|
||||
#define REG_CAPA_V4_RESP_VER 8
|
||||
|
||||
/**
|
||||
* struct iwl_reg_capa - struct for global regulatory capabilities, Used for
|
||||
* handling the different APIs of reg_capa_flags.
|
||||
*
|
||||
* @allow_40mhz: 11n channel with a width of 40Mhz is allowed
|
||||
* for this regulatory domain (valid only in 5Ghz).
|
||||
* for this regulatory domain.
|
||||
* @allow_80mhz: 11ac channel with a width of 80Mhz is allowed
|
||||
* for this regulatory domain (valid only in 5Ghz).
|
||||
* for this regulatory domain (valid only in 5 and 6 Ghz).
|
||||
* @allow_160mhz: 11ac channel with a width of 160Mhz is allowed
|
||||
* for this regulatory domain (valid only in 5Ghz).
|
||||
* for this regulatory domain (valid only in 5 and 6 Ghz).
|
||||
* @allow_320mhz: 11be channel with a width of 320Mhz is allowed
|
||||
* for this regulatory domain (valid only in 6 Ghz).
|
||||
* @disable_11ax: 11ax is forbidden for this regulatory domain.
|
||||
* @disable_11be: 11be is forbidden for this regulatory domain.
|
||||
*/
|
||||
struct iwl_reg_capa {
|
||||
u16 allow_40mhz;
|
||||
u16 allow_80mhz;
|
||||
u16 allow_160mhz;
|
||||
u16 disable_11ax;
|
||||
bool allow_40mhz;
|
||||
bool allow_80mhz;
|
||||
bool allow_160mhz;
|
||||
bool allow_320mhz;
|
||||
bool disable_11ax;
|
||||
bool disable_11be;
|
||||
};
|
||||
|
||||
static inline void iwl_nvm_print_channel_flags(struct device *dev, u32 level,
|
||||
@ -482,7 +516,7 @@ static void iwl_init_vht_hw_capab(struct iwl_trans *trans,
|
||||
num_tx_ants = 1;
|
||||
}
|
||||
|
||||
if (num_tx_ants > 1)
|
||||
if (trans->cfg->ht_params->stbc && num_tx_ants > 1)
|
||||
vht_cap->cap |= IEEE80211_VHT_CAP_TXSTBC;
|
||||
else
|
||||
vht_cap->cap |= IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN;
|
||||
@ -646,8 +680,7 @@ static const struct ieee80211_sband_iftype_data iwl_he_eht_capa[] = {
|
||||
IEEE80211_EHT_PHY_CAP0_BEAMFORMEE_SS_80MHZ_MASK,
|
||||
.phy_cap_info[1] =
|
||||
IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_80MHZ_MASK |
|
||||
IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_160MHZ_MASK |
|
||||
IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_320MHZ_MASK,
|
||||
IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_160MHZ_MASK,
|
||||
.phy_cap_info[3] =
|
||||
IEEE80211_EHT_PHY_CAP3_NG_16_SU_FEEDBACK |
|
||||
IEEE80211_EHT_PHY_CAP3_NG_16_MU_FEEDBACK |
|
||||
@ -856,6 +889,10 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
||||
const struct iwl_fw *fw)
|
||||
{
|
||||
bool is_ap = iftype_data->types_mask & BIT(NL80211_IFTYPE_AP);
|
||||
bool no_320;
|
||||
|
||||
no_320 = !trans->trans_cfg->integrated &&
|
||||
trans->pcie_link_speed < PCI_EXP_LNKSTA_CLS_8_0GB;
|
||||
|
||||
if (!data->sku_cap_11be_enable || iwlwifi_mod_params.disable_11be)
|
||||
iftype_data->eht_cap.has_eht = false;
|
||||
@ -882,8 +919,12 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
||||
IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_MASK);
|
||||
break;
|
||||
case NL80211_BAND_6GHZ:
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[0] |=
|
||||
IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ;
|
||||
if (!no_320) {
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[0] |=
|
||||
IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ;
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[1] |=
|
||||
IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_320MHZ_MASK;
|
||||
}
|
||||
fallthrough;
|
||||
case NL80211_BAND_5GHZ:
|
||||
iftype_data->he_cap.he_cap_elem.phy_cap_info[0] |=
|
||||
@ -978,6 +1019,8 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[6] &=
|
||||
~(IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_MASK |
|
||||
IEEE80211_EHT_PHY_CAP6_EHT_DUP_6GHZ_SUPP);
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[5] |=
|
||||
IEEE80211_EHT_PHY_CAP5_SUPP_EXTRA_EHT_LTF;
|
||||
}
|
||||
|
||||
if (fw_has_capa(&fw->ucode_capa, IWL_UCODE_TLV_CAPA_BROADCAST_TWT))
|
||||
@ -1531,27 +1574,41 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan,
|
||||
|
||||
if (!reg_capa.allow_160mhz)
|
||||
flags |= NL80211_RRF_NO_160MHZ;
|
||||
|
||||
if (!reg_capa.allow_320mhz)
|
||||
flags |= NL80211_RRF_NO_320MHZ;
|
||||
}
|
||||
|
||||
if (reg_capa.disable_11ax)
|
||||
flags |= NL80211_RRF_NO_HE;
|
||||
|
||||
if (reg_capa.disable_11be)
|
||||
flags |= NL80211_RRF_NO_EHT;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static struct iwl_reg_capa iwl_get_reg_capa(u16 flags, u8 resp_ver)
|
||||
static struct iwl_reg_capa iwl_get_reg_capa(u32 flags, u8 resp_ver)
|
||||
{
|
||||
struct iwl_reg_capa reg_capa;
|
||||
struct iwl_reg_capa reg_capa = {};
|
||||
|
||||
if (resp_ver >= REG_CAPA_V2_RESP_VER) {
|
||||
if (resp_ver >= REG_CAPA_V4_RESP_VER) {
|
||||
reg_capa.allow_40mhz = true;
|
||||
reg_capa.allow_80mhz = flags & REG_CAPA_V4_80MHZ_ALLOWED;
|
||||
reg_capa.allow_160mhz = flags & REG_CAPA_V4_160MHZ_ALLOWED;
|
||||
reg_capa.allow_320mhz = flags & REG_CAPA_V4_320MHZ_ALLOWED;
|
||||
reg_capa.disable_11ax = flags & REG_CAPA_V4_11AX_DISABLED;
|
||||
reg_capa.disable_11be = flags & REG_CAPA_V4_11BE_DISABLED;
|
||||
} else if (resp_ver >= REG_CAPA_V2_RESP_VER) {
|
||||
reg_capa.allow_40mhz = flags & REG_CAPA_V2_40MHZ_ALLOWED;
|
||||
reg_capa.allow_80mhz = flags & REG_CAPA_V2_80MHZ_ALLOWED;
|
||||
reg_capa.allow_160mhz = flags & REG_CAPA_V2_160MHZ_ALLOWED;
|
||||
reg_capa.disable_11ax = flags & REG_CAPA_V2_11AX_DISABLED;
|
||||
} else {
|
||||
reg_capa.allow_40mhz = !(flags & REG_CAPA_40MHZ_FORBIDDEN);
|
||||
reg_capa.allow_80mhz = flags & REG_CAPA_80MHZ_ALLOWED;
|
||||
reg_capa.allow_160mhz = flags & REG_CAPA_160MHZ_ALLOWED;
|
||||
reg_capa.disable_11ax = flags & REG_CAPA_11AX_DISABLED;
|
||||
reg_capa.allow_40mhz = !(flags & REG_CAPA_V1_40MHZ_FORBIDDEN);
|
||||
reg_capa.allow_80mhz = flags & REG_CAPA_V1_80MHZ_ALLOWED;
|
||||
reg_capa.allow_160mhz = flags & REG_CAPA_V1_160MHZ_ALLOWED;
|
||||
reg_capa.disable_11ax = flags & REG_CAPA_V1_11AX_DISABLED;
|
||||
}
|
||||
return reg_capa;
|
||||
}
|
||||
@ -1559,7 +1616,7 @@ static struct iwl_reg_capa iwl_get_reg_capa(u16 flags, u8 resp_ver)
|
||||
struct ieee80211_regdomain *
|
||||
iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
|
||||
int num_of_ch, __le32 *channels, u16 fw_mcc,
|
||||
u16 geo_info, u16 cap, u8 resp_ver)
|
||||
u16 geo_info, u32 cap, u8 resp_ver)
|
||||
{
|
||||
int ch_idx;
|
||||
u16 ch_flags;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2015, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2005-2015, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
#ifndef __iwl_nvm_parse_h__
|
||||
@ -50,7 +50,7 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
struct ieee80211_regdomain *
|
||||
iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
|
||||
int num_of_ch, __le32 *channels, u16 fw_mcc,
|
||||
u16 geo_info, u16 cap, u8 resp_ver);
|
||||
u16 geo_info, u32 cap, u8 resp_ver);
|
||||
|
||||
/**
|
||||
* struct iwl_nvm_section - describes an NVM section in memory.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -486,6 +486,10 @@ enum {
|
||||
#define FSEQ_ALIVE_TOKEN 0xA340F0
|
||||
#define FSEQ_CNVI_ID 0xA3408C
|
||||
#define FSEQ_CNVR_ID 0xA34090
|
||||
#define FSEQ_PREV_CNVIO_INIT_VERSION 0xA34084
|
||||
#define FSEQ_WIFI_FSEQ_VERSION 0xA34040
|
||||
#define FSEQ_BT_FSEQ_VERSION 0xA34044
|
||||
#define FSEQ_CLASS_TP_VERSION 0xA34078
|
||||
|
||||
#define IWL_D3_SLEEP_STATUS_SUSPEND 0xD3
|
||||
#define IWL_D3_SLEEP_STATUS_RESUME 0xD0
|
||||
|
@ -1067,6 +1067,8 @@ struct iwl_trans_txqs {
|
||||
* @iwl_trans_txqs: transport tx queues data.
|
||||
* @mbx_addr_0_step: step address data 0
|
||||
* @mbx_addr_1_step: step address data 1
|
||||
* @pcie_link_speed: current PCIe link speed (%PCI_EXP_LNKSTA_CLS_*),
|
||||
* only valid for discrete (not integrated) NICs
|
||||
*/
|
||||
struct iwl_trans {
|
||||
bool csme_own;
|
||||
@ -1129,6 +1131,8 @@ struct iwl_trans {
|
||||
u32 mbx_addr_0_step;
|
||||
u32 mbx_addr_1_step;
|
||||
|
||||
u8 pcie_link_speed;
|
||||
|
||||
/* pointer to trans specific struct */
|
||||
/*Ensure that this pointer will always be aligned to sizeof pointer */
|
||||
char trans_specific[] __aligned(sizeof(void *));
|
||||
@ -1613,6 +1617,11 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
|
||||
int iwl_trans_init(struct iwl_trans *trans);
|
||||
void iwl_trans_free(struct iwl_trans *trans);
|
||||
|
||||
static inline bool iwl_trans_is_hw_error_value(u32 val)
|
||||
{
|
||||
return ((val & ~0xf) == 0xa5a5a5a0) || ((val & ~0xf) == 0x5a5a5a50);
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
* driver (transport) register/unregister functions
|
||||
******************************************************/
|
||||
|
@ -32,7 +32,7 @@ static int iwl_mvm_binding_cmd(struct iwl_mvm *mvm, u32 action,
|
||||
if (fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT)) {
|
||||
size = sizeof(cmd);
|
||||
cmd.lmac_id = cpu_to_le32(iwl_mvm_get_lmac_id(mvm->fw,
|
||||
cmd.lmac_id = cpu_to_le32(iwl_mvm_get_lmac_id(mvm,
|
||||
phyctxt->channel->band));
|
||||
} else {
|
||||
size = IWL_BINDING_CMD_SIZE_V1;
|
||||
@ -164,3 +164,11 @@ int iwl_mvm_binding_remove_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
u32 iwl_mvm_get_lmac_id(struct iwl_mvm *mvm, enum nl80211_band band)
|
||||
{
|
||||
if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_CDB_SUPPORT) ||
|
||||
band == NL80211_BAND_2GHZ)
|
||||
return IWL_LMAC_24G_INDEX;
|
||||
return IWL_LMAC_5G_INDEX;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2013-2014, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2013-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2015 Intel Deutschland GmbH
|
||||
*/
|
||||
#ifndef __MVM_CONSTANTS_H
|
||||
@ -109,10 +109,6 @@
|
||||
#define IWL_MVM_USE_TWT true
|
||||
#define IWL_MVM_AMPDU_CONSEC_DROPS_DELBA 20
|
||||
#define IWL_MVM_USE_NSSN_SYNC 0
|
||||
#define IWL_MVM_PHY_FILTER_CHAIN_A 0
|
||||
#define IWL_MVM_PHY_FILTER_CHAIN_B 0
|
||||
#define IWL_MVM_PHY_FILTER_CHAIN_C 0
|
||||
#define IWL_MVM_PHY_FILTER_CHAIN_D 0
|
||||
#define IWL_MVM_FTM_INITIATOR_ENABLE_SMOOTH false
|
||||
#define IWL_MVM_FTM_INITIATOR_SMOOTH_ALPHA 40
|
||||
/* 20016 pSec is 6 meter RTT, meaning 3 meter range */
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -1380,6 +1380,14 @@ int iwl_mvm_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
|
||||
return __iwl_mvm_suspend(hw, wowlan, false);
|
||||
}
|
||||
|
||||
struct iwl_multicast_key_data {
|
||||
u8 key[WOWLAN_KEY_MAX_SIZE];
|
||||
u8 len;
|
||||
u8 flags;
|
||||
u8 id;
|
||||
u8 ipn[6];
|
||||
};
|
||||
|
||||
/* converted data from the different status responses */
|
||||
struct iwl_wowlan_status_data {
|
||||
u64 replay_ctr;
|
||||
@ -1398,7 +1406,8 @@ struct iwl_wowlan_status_data {
|
||||
u8 key[WOWLAN_KEY_MAX_SIZE];
|
||||
u8 len;
|
||||
u8 flags;
|
||||
} gtk;
|
||||
u8 id;
|
||||
} gtk[WOWLAN_GTK_KEYS_NUM];
|
||||
|
||||
struct {
|
||||
/*
|
||||
@ -1428,12 +1437,7 @@ struct iwl_wowlan_status_data {
|
||||
} tkip, aes;
|
||||
} ptk;
|
||||
|
||||
struct {
|
||||
u64 ipn;
|
||||
u8 key[WOWLAN_KEY_MAX_SIZE];
|
||||
u8 len;
|
||||
u8 flags;
|
||||
} igtk;
|
||||
struct iwl_multicast_key_data igtk;
|
||||
|
||||
u8 *wake_packet;
|
||||
};
|
||||
@ -1758,7 +1762,7 @@ static void iwl_mvm_set_key_rx_seq(struct ieee80211_key_conf *key,
|
||||
s8 new_key_id = -1;
|
||||
|
||||
if (status->num_of_gtk_rekeys)
|
||||
new_key_id = status->gtk.flags &
|
||||
new_key_id = status->gtk[0].flags &
|
||||
IWL_WOWLAN_GTK_IDX_MASK;
|
||||
|
||||
/* Don't install a new key's value to an old key */
|
||||
@ -1777,20 +1781,18 @@ static void iwl_mvm_set_key_rx_seq(struct ieee80211_key_conf *key,
|
||||
struct iwl_mvm_d3_gtk_iter_data {
|
||||
struct iwl_mvm *mvm;
|
||||
struct iwl_wowlan_status_data *status;
|
||||
void *last_gtk;
|
||||
u32 cipher;
|
||||
bool find_phase, unhandled_cipher;
|
||||
u32 gtk_cipher, igtk_cipher;
|
||||
bool unhandled_cipher, igtk_support;
|
||||
int num_keys;
|
||||
};
|
||||
|
||||
static void iwl_mvm_d3_update_keys(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
struct ieee80211_key_conf *key,
|
||||
void *_data)
|
||||
static void iwl_mvm_d3_find_last_keys(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
struct ieee80211_key_conf *key,
|
||||
void *_data)
|
||||
{
|
||||
struct iwl_mvm_d3_gtk_iter_data *data = _data;
|
||||
struct iwl_wowlan_status_data *status = data->status;
|
||||
|
||||
if (data->unhandled_cipher)
|
||||
return;
|
||||
@ -1805,51 +1807,230 @@ static void iwl_mvm_d3_update_keys(struct ieee80211_hw *hw,
|
||||
case WLAN_CIPHER_SUITE_GCMP_256:
|
||||
case WLAN_CIPHER_SUITE_TKIP:
|
||||
/* we support these */
|
||||
data->gtk_cipher = key->cipher;
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_BIP_GMAC_128:
|
||||
case WLAN_CIPHER_SUITE_BIP_GMAC_256:
|
||||
case WLAN_CIPHER_SUITE_BIP_CMAC_256:
|
||||
case WLAN_CIPHER_SUITE_AES_CMAC:
|
||||
/* we support these */
|
||||
if (data->igtk_support &&
|
||||
(key->keyidx == 4 || key->keyidx == 5)) {
|
||||
data->igtk_cipher = key->cipher;
|
||||
} else {
|
||||
data->unhandled_cipher = true;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* everything else (even CMAC for MFP) - disconnect from AP */
|
||||
/* everything else - disconnect from AP */
|
||||
data->unhandled_cipher = true;
|
||||
return;
|
||||
}
|
||||
|
||||
data->num_keys++;
|
||||
}
|
||||
|
||||
/*
|
||||
* pairwise key - update sequence counters only;
|
||||
* note that this assumes no TDLS sessions are active
|
||||
*/
|
||||
if (sta) {
|
||||
if (data->find_phase)
|
||||
return;
|
||||
static void
|
||||
iwl_mvm_d3_set_igtk_bigtk_ipn(const struct iwl_multicast_key_data *key,
|
||||
struct ieee80211_key_seq *seq, u32 cipher)
|
||||
{
|
||||
switch (cipher) {
|
||||
case WLAN_CIPHER_SUITE_BIP_GMAC_128:
|
||||
case WLAN_CIPHER_SUITE_BIP_GMAC_256:
|
||||
BUILD_BUG_ON(sizeof(seq->aes_gmac.pn) != sizeof(key->ipn));
|
||||
memcpy(seq->aes_gmac.pn, key->ipn, sizeof(seq->aes_gmac.pn));
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_BIP_CMAC_256:
|
||||
BUILD_BUG_ON(sizeof(seq->aes_cmac.pn) != sizeof(key->ipn));
|
||||
memcpy(seq->aes_cmac.pn, key->ipn, sizeof(seq->aes_cmac.pn));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (key->cipher) {
|
||||
case WLAN_CIPHER_SUITE_CCMP:
|
||||
case WLAN_CIPHER_SUITE_GCMP:
|
||||
case WLAN_CIPHER_SUITE_GCMP_256:
|
||||
static void iwl_mvm_d3_update_keys(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
struct ieee80211_key_conf *key,
|
||||
void *_data)
|
||||
{
|
||||
struct iwl_mvm_d3_gtk_iter_data *data = _data;
|
||||
struct iwl_wowlan_status_data *status = data->status;
|
||||
s8 keyidx;
|
||||
|
||||
if (data->unhandled_cipher)
|
||||
return;
|
||||
|
||||
switch (key->cipher) {
|
||||
case WLAN_CIPHER_SUITE_WEP40:
|
||||
case WLAN_CIPHER_SUITE_WEP104:
|
||||
/* ignore WEP completely, nothing to do */
|
||||
return;
|
||||
case WLAN_CIPHER_SUITE_CCMP:
|
||||
case WLAN_CIPHER_SUITE_GCMP:
|
||||
case WLAN_CIPHER_SUITE_GCMP_256:
|
||||
if (sta) {
|
||||
atomic64_set(&key->tx_pn, status->ptk.aes.tx_pn);
|
||||
iwl_mvm_set_aes_ptk_rx_seq(data->mvm, status, sta, key);
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_TKIP:
|
||||
return;
|
||||
}
|
||||
fallthrough;
|
||||
case WLAN_CIPHER_SUITE_TKIP:
|
||||
if (sta) {
|
||||
atomic64_set(&key->tx_pn, status->ptk.tkip.tx_pn);
|
||||
iwl_mvm_set_key_rx_seq_tids(key, status->ptk.tkip.seq);
|
||||
break;
|
||||
return;
|
||||
}
|
||||
keyidx = key->keyidx;
|
||||
/* The current key is always sent by the FW, even if it wasn't
|
||||
* rekeyed during D3.
|
||||
* We remove an existing key if it has the same index as
|
||||
* a new key
|
||||
*/
|
||||
if (status->num_of_gtk_rekeys &&
|
||||
((status->gtk[0].len && keyidx == status->gtk[0].id) ||
|
||||
(status->gtk[1].len && keyidx == status->gtk[1].id))) {
|
||||
ieee80211_remove_key(key);
|
||||
} else {
|
||||
iwl_mvm_set_key_rx_seq(key, data->status, false);
|
||||
}
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_BIP_GMAC_128:
|
||||
case WLAN_CIPHER_SUITE_BIP_GMAC_256:
|
||||
case WLAN_CIPHER_SUITE_BIP_CMAC_256:
|
||||
case WLAN_CIPHER_SUITE_AES_CMAC:
|
||||
if (key->keyidx == 4 || key->keyidx == 5) {
|
||||
/* remove rekeyed key */
|
||||
if (status->num_of_gtk_rekeys) {
|
||||
ieee80211_remove_key(key);
|
||||
} else {
|
||||
struct ieee80211_key_seq seq;
|
||||
|
||||
/* that's it for this key */
|
||||
return;
|
||||
iwl_mvm_d3_set_igtk_bigtk_ipn(&status->igtk,
|
||||
&seq,
|
||||
key->cipher);
|
||||
ieee80211_set_key_rx_seq(key, 0, &seq);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool iwl_mvm_gtk_rekey(struct iwl_wowlan_status_data *status,
|
||||
struct ieee80211_vif *vif,
|
||||
struct iwl_mvm *mvm, u32 gtk_cipher)
|
||||
{
|
||||
int i;
|
||||
struct ieee80211_key_conf *key;
|
||||
struct {
|
||||
struct ieee80211_key_conf conf;
|
||||
u8 key[32];
|
||||
} conf = {
|
||||
.conf.cipher = gtk_cipher,
|
||||
};
|
||||
|
||||
BUILD_BUG_ON(WLAN_KEY_LEN_CCMP != WLAN_KEY_LEN_GCMP);
|
||||
BUILD_BUG_ON(sizeof(conf.key) < WLAN_KEY_LEN_CCMP);
|
||||
BUILD_BUG_ON(sizeof(conf.key) < WLAN_KEY_LEN_GCMP_256);
|
||||
BUILD_BUG_ON(sizeof(conf.key) < WLAN_KEY_LEN_TKIP);
|
||||
BUILD_BUG_ON(sizeof(conf.key) < sizeof(status->gtk[0].key));
|
||||
|
||||
switch (gtk_cipher) {
|
||||
case WLAN_CIPHER_SUITE_CCMP:
|
||||
case WLAN_CIPHER_SUITE_GCMP:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_CCMP;
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_GCMP_256:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_GCMP_256;
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_TKIP:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_TKIP;
|
||||
break;
|
||||
default:
|
||||
WARN_ON(1);
|
||||
}
|
||||
|
||||
if (data->find_phase) {
|
||||
data->last_gtk = key;
|
||||
data->cipher = key->cipher;
|
||||
return;
|
||||
for (i = 0; i < ARRAY_SIZE(status->gtk); i++) {
|
||||
if (!status->gtk[i].len)
|
||||
continue;
|
||||
|
||||
conf.conf.keyidx = status->gtk[i].id;
|
||||
IWL_DEBUG_WOWLAN(mvm,
|
||||
"Received from FW GTK cipher %d, key index %d\n",
|
||||
conf.conf.cipher, conf.conf.keyidx);
|
||||
memcpy(conf.conf.key, status->gtk[i].key,
|
||||
sizeof(status->gtk[i].key));
|
||||
|
||||
key = ieee80211_gtk_rekey_add(vif, &conf.conf);
|
||||
if (IS_ERR(key))
|
||||
return false;
|
||||
iwl_mvm_set_key_rx_seq_idx(key, status, i);
|
||||
}
|
||||
|
||||
if (data->status->num_of_gtk_rekeys)
|
||||
ieee80211_remove_key(key);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (data->last_gtk == key)
|
||||
iwl_mvm_set_key_rx_seq(key, data->status, false);
|
||||
static bool
|
||||
iwl_mvm_d3_igtk_bigtk_rekey_add(struct iwl_wowlan_status_data *status,
|
||||
struct ieee80211_vif *vif, u32 cipher,
|
||||
struct iwl_multicast_key_data *key_data)
|
||||
{
|
||||
struct ieee80211_key_conf *key_config;
|
||||
struct {
|
||||
struct ieee80211_key_conf conf;
|
||||
u8 key[WOWLAN_KEY_MAX_SIZE];
|
||||
} conf = {
|
||||
.conf.cipher = cipher,
|
||||
.conf.keyidx = key_data->id,
|
||||
};
|
||||
struct ieee80211_key_seq seq;
|
||||
|
||||
if (!key_data->len)
|
||||
return true;
|
||||
|
||||
iwl_mvm_d3_set_igtk_bigtk_ipn(key_data, &seq, conf.conf.cipher);
|
||||
|
||||
switch (cipher) {
|
||||
case WLAN_CIPHER_SUITE_BIP_GMAC_128:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_BIP_GMAC_128;
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_BIP_GMAC_256:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_BIP_GMAC_256;
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_AES_CMAC:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_AES_CMAC;
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_BIP_CMAC_256:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_BIP_CMAC_256;
|
||||
break;
|
||||
default:
|
||||
WARN_ON(1);
|
||||
}
|
||||
BUILD_BUG_ON(sizeof(conf.key) < sizeof(key_data->key));
|
||||
memcpy(conf.conf.key, key_data->key, conf.conf.keylen);
|
||||
|
||||
key_config = ieee80211_gtk_rekey_add(vif, &conf.conf);
|
||||
if (IS_ERR(key_config))
|
||||
return false;
|
||||
ieee80211_set_key_rx_seq(key_config, 0, &seq);
|
||||
return true;
|
||||
}
|
||||
|
||||
static int iwl_mvm_lookup_wowlan_status_ver(struct iwl_mvm *mvm)
|
||||
{
|
||||
u8 notif_ver;
|
||||
|
||||
if (!fw_has_api(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_API_WOWLAN_KEY_MATERIAL))
|
||||
return 6;
|
||||
|
||||
/* default to 7 (when we have IWL_UCODE_TLV_API_WOWLAN_KEY_MATERIAL) */
|
||||
notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, LONG_GROUP,
|
||||
WOWLAN_GET_STATUSES, 0);
|
||||
if (!notif_ver)
|
||||
notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP,
|
||||
WOWLAN_GET_STATUSES, 7);
|
||||
|
||||
return notif_ver;
|
||||
}
|
||||
|
||||
static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,
|
||||
@ -1871,71 +2052,41 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,
|
||||
if (status->wakeup_reasons & disconnection_reasons)
|
||||
return false;
|
||||
|
||||
if (iwl_mvm_lookup_wowlan_status_ver(mvm) > 6 ||
|
||||
iwl_fw_lookup_notif_ver(mvm->fw, PROT_OFFLOAD_GROUP,
|
||||
WOWLAN_INFO_NOTIFICATION,
|
||||
0))
|
||||
gtkdata.igtk_support = true;
|
||||
|
||||
/* find last GTK that we used initially, if any */
|
||||
gtkdata.find_phase = true;
|
||||
ieee80211_iter_keys(mvm->hw, vif,
|
||||
iwl_mvm_d3_update_keys, >kdata);
|
||||
iwl_mvm_d3_find_last_keys, >kdata);
|
||||
/* not trying to keep connections with MFP/unhandled ciphers */
|
||||
if (gtkdata.unhandled_cipher)
|
||||
return false;
|
||||
if (!gtkdata.num_keys)
|
||||
goto out;
|
||||
if (!gtkdata.last_gtk)
|
||||
return false;
|
||||
|
||||
/*
|
||||
* invalidate all other GTKs that might still exist and update
|
||||
* the one that we used
|
||||
*/
|
||||
gtkdata.find_phase = false;
|
||||
ieee80211_iter_keys(mvm->hw, vif,
|
||||
iwl_mvm_d3_update_keys, >kdata);
|
||||
|
||||
IWL_DEBUG_WOWLAN(mvm, "num of GTK rekeying %d\n",
|
||||
status->num_of_gtk_rekeys);
|
||||
if (status->num_of_gtk_rekeys) {
|
||||
struct ieee80211_key_conf *key;
|
||||
struct {
|
||||
struct ieee80211_key_conf conf;
|
||||
u8 key[32];
|
||||
} conf = {
|
||||
.conf.cipher = gtkdata.cipher,
|
||||
.conf.keyidx =
|
||||
status->gtk.flags & IWL_WOWLAN_GTK_IDX_MASK,
|
||||
};
|
||||
__be64 replay_ctr;
|
||||
__be64 replay_ctr = cpu_to_be64(status->replay_ctr);
|
||||
|
||||
IWL_DEBUG_WOWLAN(mvm,
|
||||
"Received from FW GTK cipher %d, key index %d\n",
|
||||
conf.conf.cipher, conf.conf.keyidx);
|
||||
IWL_DEBUG_WOWLAN(mvm, "num of GTK rekeying %d\n",
|
||||
status->num_of_gtk_rekeys);
|
||||
|
||||
BUILD_BUG_ON(WLAN_KEY_LEN_CCMP != WLAN_KEY_LEN_GCMP);
|
||||
BUILD_BUG_ON(sizeof(conf.key) < WLAN_KEY_LEN_CCMP);
|
||||
BUILD_BUG_ON(sizeof(conf.key) < WLAN_KEY_LEN_GCMP_256);
|
||||
BUILD_BUG_ON(sizeof(conf.key) < WLAN_KEY_LEN_TKIP);
|
||||
BUILD_BUG_ON(sizeof(conf.key) < sizeof(status->gtk.key));
|
||||
|
||||
memcpy(conf.conf.key, status->gtk.key, sizeof(status->gtk.key));
|
||||
|
||||
switch (gtkdata.cipher) {
|
||||
case WLAN_CIPHER_SUITE_CCMP:
|
||||
case WLAN_CIPHER_SUITE_GCMP:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_CCMP;
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_GCMP_256:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_GCMP_256;
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_TKIP:
|
||||
conf.conf.keylen = WLAN_KEY_LEN_TKIP;
|
||||
break;
|
||||
}
|
||||
|
||||
key = ieee80211_gtk_rekey_add(vif, &conf.conf);
|
||||
if (IS_ERR(key))
|
||||
if (!iwl_mvm_gtk_rekey(status, vif, mvm, gtkdata.gtk_cipher))
|
||||
return false;
|
||||
iwl_mvm_set_key_rx_seq(key, status, true);
|
||||
|
||||
replay_ctr = cpu_to_be64(status->replay_ctr);
|
||||
if (!iwl_mvm_d3_igtk_bigtk_rekey_add(status, vif,
|
||||
gtkdata.igtk_cipher,
|
||||
&status->igtk))
|
||||
return false;
|
||||
|
||||
ieee80211_gtk_rekey_notify(vif, vif->bss_conf.bssid,
|
||||
(void *)&replay_ctr, GFP_KERNEL);
|
||||
@ -1955,60 +2106,70 @@ out:
|
||||
static void iwl_mvm_convert_gtk_v2(struct iwl_wowlan_status_data *status,
|
||||
struct iwl_wowlan_gtk_status_v2 *data)
|
||||
{
|
||||
BUILD_BUG_ON(sizeof(status->gtk.key) < sizeof(data->key));
|
||||
BUILD_BUG_ON(sizeof(status->gtk[0].key) < sizeof(data->key));
|
||||
BUILD_BUG_ON(NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY +
|
||||
sizeof(data->tkip_mic_key) >
|
||||
sizeof(status->gtk.key));
|
||||
sizeof(status->gtk[0].key));
|
||||
|
||||
status->gtk.len = data->key_len;
|
||||
status->gtk.flags = data->key_flags;
|
||||
status->gtk[0].len = data->key_len;
|
||||
status->gtk[0].flags = data->key_flags;
|
||||
|
||||
memcpy(status->gtk.key, data->key, sizeof(data->key));
|
||||
memcpy(status->gtk[0].key, data->key, sizeof(data->key));
|
||||
|
||||
/* if it's as long as the TKIP encryption key, copy MIC key */
|
||||
if (status->gtk.len == NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY)
|
||||
memcpy(status->gtk.key + NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY,
|
||||
if (status->gtk[0].len == NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY)
|
||||
memcpy(status->gtk[0].key + NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY,
|
||||
data->tkip_mic_key, sizeof(data->tkip_mic_key));
|
||||
}
|
||||
|
||||
static void iwl_mvm_convert_gtk_v3(struct iwl_wowlan_status_data *status,
|
||||
struct iwl_wowlan_gtk_status_v3 *data)
|
||||
{
|
||||
/* The parts we need are identical in v2 and v3 */
|
||||
#define CHECK(_f) do { \
|
||||
BUILD_BUG_ON(offsetof(struct iwl_wowlan_gtk_status_v2, _f) != \
|
||||
offsetof(struct iwl_wowlan_gtk_status_v3, _f)); \
|
||||
BUILD_BUG_ON(offsetofend(struct iwl_wowlan_gtk_status_v2, _f) !=\
|
||||
offsetofend(struct iwl_wowlan_gtk_status_v3, _f)); \
|
||||
} while (0)
|
||||
int data_idx, status_idx = 0;
|
||||
|
||||
CHECK(key);
|
||||
CHECK(key_len);
|
||||
CHECK(key_flags);
|
||||
CHECK(tkip_mic_key);
|
||||
#undef CHECK
|
||||
BUILD_BUG_ON(sizeof(status->gtk[0].key) < sizeof(data[0].key));
|
||||
BUILD_BUG_ON(NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY +
|
||||
sizeof(data[0].tkip_mic_key) >
|
||||
sizeof(status->gtk[0].key));
|
||||
BUILD_BUG_ON(ARRAY_SIZE(status->gtk) < WOWLAN_GTK_KEYS_NUM);
|
||||
for (data_idx = 0; data_idx < ARRAY_SIZE(status->gtk); data_idx++) {
|
||||
if (!(data[data_idx].key_len))
|
||||
continue;
|
||||
status->gtk[status_idx].len = data[data_idx].key_len;
|
||||
status->gtk[status_idx].flags = data[data_idx].key_flags;
|
||||
status->gtk[status_idx].id = status->gtk[status_idx].flags &
|
||||
IWL_WOWLAN_GTK_IDX_MASK;
|
||||
|
||||
iwl_mvm_convert_gtk_v2(status, (void *)data);
|
||||
memcpy(status->gtk[status_idx].key, data[data_idx].key,
|
||||
sizeof(data[data_idx].key));
|
||||
|
||||
/* if it's as long as the TKIP encryption key, copy MIC key */
|
||||
if (status->gtk[status_idx].len ==
|
||||
NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY)
|
||||
memcpy(status->gtk[status_idx].key +
|
||||
NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY,
|
||||
data[data_idx].tkip_mic_key,
|
||||
sizeof(data[data_idx].tkip_mic_key));
|
||||
status_idx++;
|
||||
}
|
||||
}
|
||||
|
||||
static void iwl_mvm_convert_igtk(struct iwl_wowlan_status_data *status,
|
||||
struct iwl_wowlan_igtk_status *data)
|
||||
{
|
||||
const u8 *ipn = data->ipn;
|
||||
|
||||
BUILD_BUG_ON(sizeof(status->igtk.key) < sizeof(data->key));
|
||||
|
||||
if (!data->key_len)
|
||||
return;
|
||||
|
||||
status->igtk.len = data->key_len;
|
||||
status->igtk.flags = data->key_flags;
|
||||
status->igtk.id = u32_get_bits(data->key_flags,
|
||||
IWL_WOWLAN_IGTK_BIGTK_IDX_MASK)
|
||||
+ WOWLAN_IGTK_MIN_INDEX;
|
||||
|
||||
memcpy(status->igtk.key, data->key, sizeof(data->key));
|
||||
|
||||
status->igtk.ipn = ((u64)ipn[5] << 0) |
|
||||
((u64)ipn[4] << 8) |
|
||||
((u64)ipn[3] << 16) |
|
||||
((u64)ipn[2] << 24) |
|
||||
((u64)ipn[1] << 32) |
|
||||
((u64)ipn[0] << 40);
|
||||
memcpy(status->igtk.ipn, data->ipn, sizeof(data->ipn));
|
||||
}
|
||||
|
||||
static void iwl_mvm_parse_wowlan_info_notif(struct iwl_mvm *mvm,
|
||||
@ -2031,7 +2192,7 @@ static void iwl_mvm_parse_wowlan_info_notif(struct iwl_mvm *mvm,
|
||||
}
|
||||
|
||||
iwl_mvm_convert_key_counters_v5(status, &data->gtk[0].sc);
|
||||
iwl_mvm_convert_gtk_v3(status, &data->gtk[0]);
|
||||
iwl_mvm_convert_gtk_v3(status, data->gtk);
|
||||
iwl_mvm_convert_igtk(status, &data->igtk[0]);
|
||||
|
||||
status->replay_ctr = le64_to_cpu(data->replay_ctr);
|
||||
@ -2139,14 +2300,9 @@ iwl_mvm_send_wowlan_get_status(struct iwl_mvm *mvm, u8 sta_id)
|
||||
len = iwl_rx_packet_payload_len(cmd.resp_pkt);
|
||||
|
||||
/* default to 7 (when we have IWL_UCODE_TLV_API_WOWLAN_KEY_MATERIAL) */
|
||||
notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, LONG_GROUP,
|
||||
WOWLAN_GET_STATUSES, 0);
|
||||
if (!notif_ver)
|
||||
notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP,
|
||||
WOWLAN_GET_STATUSES, 7);
|
||||
notif_ver = iwl_mvm_lookup_wowlan_status_ver(mvm);
|
||||
|
||||
if (!fw_has_api(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_API_WOWLAN_KEY_MATERIAL)) {
|
||||
if (notif_ver < 7) {
|
||||
struct iwl_wowlan_status_v6 *v6 = (void *)cmd.resp_pkt->data;
|
||||
|
||||
status = iwl_mvm_parse_wowlan_status_common_v6(mvm, v6, len);
|
||||
@ -2154,29 +2310,29 @@ iwl_mvm_send_wowlan_get_status(struct iwl_mvm *mvm, u8 sta_id)
|
||||
goto out_free_resp;
|
||||
|
||||
BUILD_BUG_ON(sizeof(v6->gtk.decrypt_key) >
|
||||
sizeof(status->gtk.key));
|
||||
sizeof(status->gtk[0].key));
|
||||
BUILD_BUG_ON(NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY +
|
||||
sizeof(v6->gtk.tkip_mic_key) >
|
||||
sizeof(status->gtk.key));
|
||||
sizeof(status->gtk[0].key));
|
||||
|
||||
/* copy GTK info to the right place */
|
||||
memcpy(status->gtk.key, v6->gtk.decrypt_key,
|
||||
memcpy(status->gtk[0].key, v6->gtk.decrypt_key,
|
||||
sizeof(v6->gtk.decrypt_key));
|
||||
memcpy(status->gtk.key + NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY,
|
||||
memcpy(status->gtk[0].key + NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY,
|
||||
v6->gtk.tkip_mic_key,
|
||||
sizeof(v6->gtk.tkip_mic_key));
|
||||
|
||||
iwl_mvm_convert_key_counters(status, &v6->gtk.rsc.all_tsc_rsc);
|
||||
|
||||
/* hardcode the key length to 16 since v6 only supports 16 */
|
||||
status->gtk.len = 16;
|
||||
status->gtk[0].len = 16;
|
||||
|
||||
/*
|
||||
* The key index only uses 2 bits (values 0 to 3) and
|
||||
* we always set bit 7 which means this is the
|
||||
* currently used key.
|
||||
*/
|
||||
status->gtk.flags = v6->gtk.key_index | BIT(7);
|
||||
status->gtk[0].flags = v6->gtk.key_index | BIT(7);
|
||||
} else if (notif_ver == 7) {
|
||||
struct iwl_wowlan_status_v7 *v7 = (void *)cmd.resp_pkt->data;
|
||||
|
||||
@ -2210,7 +2366,7 @@ iwl_mvm_send_wowlan_get_status(struct iwl_mvm *mvm, u8 sta_id)
|
||||
goto out_free_resp;
|
||||
|
||||
iwl_mvm_convert_key_counters_v5(status, &v12->gtk[0].sc);
|
||||
iwl_mvm_convert_gtk_v3(status, &v12->gtk[0]);
|
||||
iwl_mvm_convert_gtk_v3(status, v12->gtk);
|
||||
iwl_mvm_convert_igtk(status, &v12->igtk[0]);
|
||||
|
||||
status->tid_tear_down = v12->tid_tear_down;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -554,7 +554,7 @@ static ssize_t iwl_dbgfs_uapsd_misbehaving_read(struct file *file,
|
||||
char buf[20];
|
||||
int len;
|
||||
|
||||
len = sprintf(buf, "%pM\n", mvmvif->uapsd_misbehaving_bssid);
|
||||
len = sprintf(buf, "%pM\n", mvmvif->uapsd_misbehaving_ap_addr);
|
||||
return simple_read_from_buffer(user_buf, count, ppos, buf, len);
|
||||
}
|
||||
|
||||
@ -567,7 +567,7 @@ static ssize_t iwl_dbgfs_uapsd_misbehaving_write(struct ieee80211_vif *vif,
|
||||
bool ret;
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
ret = mac_pton(buf, mvmvif->uapsd_misbehaving_bssid);
|
||||
ret = mac_pton(buf, mvmvif->uapsd_misbehaving_ap_addr);
|
||||
mutex_unlock(&mvm->mutex);
|
||||
|
||||
return ret ? count : -EINVAL;
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "iwl-io.h"
|
||||
#include "debugfs.h"
|
||||
#include "iwl-modparams.h"
|
||||
#include "iwl-drv.h"
|
||||
#include "fw/error-dump.h"
|
||||
#include "fw/api/phy-ctxt.h"
|
||||
|
||||
@ -391,13 +392,14 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf,
|
||||
return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
|
||||
}
|
||||
|
||||
static ssize_t iwl_dbgfs_rs_data_read(struct file *file, char __user *user_buf,
|
||||
static ssize_t iwl_dbgfs_rs_data_read(struct ieee80211_link_sta *link_sta,
|
||||
struct iwl_mvm_sta *mvmsta,
|
||||
struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_link_sta *mvm_link_sta,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct ieee80211_sta *sta = file->private_data;
|
||||
struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
||||
struct iwl_lq_sta_rs_fw *lq_sta = &mvmsta->deflink.lq_sta.rs_fw;
|
||||
struct iwl_mvm *mvm = lq_sta->pers.drv;
|
||||
struct iwl_lq_sta_rs_fw *lq_sta = &mvm_link_sta->lq_sta.rs_fw;
|
||||
static const size_t bufsz = 2048;
|
||||
char *buff;
|
||||
int desc = 0;
|
||||
@ -407,8 +409,6 @@ static ssize_t iwl_dbgfs_rs_data_read(struct file *file, char __user *user_buf,
|
||||
if (!buff)
|
||||
return -ENOMEM;
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
|
||||
desc += scnprintf(buff + desc, bufsz - desc, "sta_id %d\n",
|
||||
lq_sta->pers.sta_id);
|
||||
desc += scnprintf(buff + desc, bufsz - desc,
|
||||
@ -429,18 +429,19 @@ static ssize_t iwl_dbgfs_rs_data_read(struct file *file, char __user *user_buf,
|
||||
lq_sta->last_rate_n_flags);
|
||||
if (desc < bufsz - 1)
|
||||
buff[desc++] = '\n';
|
||||
mutex_unlock(&mvm->mutex);
|
||||
|
||||
ret = simple_read_from_buffer(user_buf, count, ppos, buff, desc);
|
||||
kfree(buff);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t iwl_dbgfs_amsdu_len_write(struct ieee80211_sta *sta,
|
||||
static ssize_t iwl_dbgfs_amsdu_len_write(struct ieee80211_link_sta *link_sta,
|
||||
struct iwl_mvm_sta *mvmsta,
|
||||
struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_link_sta *mvm_link_sta,
|
||||
char *buf, size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
||||
int i;
|
||||
u16 amsdu_len;
|
||||
|
||||
@ -448,36 +449,39 @@ static ssize_t iwl_dbgfs_amsdu_len_write(struct ieee80211_sta *sta,
|
||||
return -EINVAL;
|
||||
|
||||
/* only change from debug set <-> debug unset */
|
||||
if (amsdu_len && mvmsta->orig_amsdu_len)
|
||||
if (amsdu_len && mvm_link_sta->orig_amsdu_len)
|
||||
return -EBUSY;
|
||||
|
||||
if (amsdu_len) {
|
||||
mvmsta->orig_amsdu_len = sta->cur->max_amsdu_len;
|
||||
sta->deflink.agg.max_amsdu_len = amsdu_len;
|
||||
sta->deflink.agg.max_amsdu_len = amsdu_len;
|
||||
for (i = 0; i < ARRAY_SIZE(sta->deflink.agg.max_tid_amsdu_len); i++)
|
||||
sta->deflink.agg.max_tid_amsdu_len[i] = amsdu_len;
|
||||
mvm_link_sta->orig_amsdu_len = link_sta->agg.max_amsdu_len;
|
||||
link_sta->agg.max_amsdu_len = amsdu_len;
|
||||
link_sta->agg.max_amsdu_len = amsdu_len;
|
||||
for (i = 0; i < ARRAY_SIZE(link_sta->agg.max_tid_amsdu_len); i++)
|
||||
link_sta->agg.max_tid_amsdu_len[i] = amsdu_len;
|
||||
} else {
|
||||
sta->deflink.agg.max_amsdu_len = mvmsta->orig_amsdu_len;
|
||||
mvmsta->orig_amsdu_len = 0;
|
||||
link_sta->agg.max_amsdu_len = mvm_link_sta->orig_amsdu_len;
|
||||
mvm_link_sta->orig_amsdu_len = 0;
|
||||
}
|
||||
|
||||
ieee80211_sta_recalc_aggregates(link_sta->sta);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t iwl_dbgfs_amsdu_len_read(struct file *file,
|
||||
static ssize_t iwl_dbgfs_amsdu_len_read(struct ieee80211_link_sta *link_sta,
|
||||
struct iwl_mvm_sta *mvmsta,
|
||||
struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_link_sta *mvm_link_sta,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct ieee80211_sta *sta = file->private_data;
|
||||
struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
||||
|
||||
char buf[32];
|
||||
int pos;
|
||||
|
||||
pos = scnprintf(buf, sizeof(buf), "current %d ", sta->cur->max_amsdu_len);
|
||||
pos = scnprintf(buf, sizeof(buf), "current %d ",
|
||||
link_sta->agg.max_amsdu_len);
|
||||
pos += scnprintf(buf + pos, sizeof(buf) - pos, "stored %d\n",
|
||||
mvmsta->orig_amsdu_len);
|
||||
mvm_link_sta->orig_amsdu_len);
|
||||
|
||||
return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
|
||||
}
|
||||
@ -712,6 +716,7 @@ static ssize_t iwl_dbgfs_fw_ver_read(struct file *file, char __user *user_buf,
|
||||
struct iwl_mvm *mvm = file->private_data;
|
||||
char *buff, *pos, *endpos;
|
||||
static const size_t bufsz = 1024;
|
||||
char _fw_name_pre[FW_NAME_PRE_BUFSIZE];
|
||||
int ret;
|
||||
|
||||
buff = kmalloc(bufsz, GFP_KERNEL);
|
||||
@ -722,7 +727,7 @@ static ssize_t iwl_dbgfs_fw_ver_read(struct file *file, char __user *user_buf,
|
||||
endpos = pos + bufsz;
|
||||
|
||||
pos += scnprintf(pos, endpos - pos, "FW prefix: %s\n",
|
||||
mvm->trans->cfg->fw_name_pre);
|
||||
iwl_drv_get_fwname_pre(mvm->trans, _fw_name_pre));
|
||||
pos += scnprintf(pos, endpos - pos, "FW: %s\n",
|
||||
mvm->fwrt.fw->human_readable);
|
||||
pos += scnprintf(pos, endpos - pos, "Device: %s\n",
|
||||
@ -1596,17 +1601,127 @@ static ssize_t iwl_dbgfs_dbg_time_point_write(struct iwl_mvm *mvm,
|
||||
#define MVM_DEBUGFS_ADD_FILE(name, parent, mode) \
|
||||
MVM_DEBUGFS_ADD_FILE_ALIAS(#name, name, parent, mode)
|
||||
|
||||
#define MVM_DEBUGFS_WRITE_STA_FILE_OPS(name, bufsz) \
|
||||
_MVM_DEBUGFS_WRITE_FILE_OPS(name, bufsz, struct ieee80211_sta)
|
||||
#define MVM_DEBUGFS_READ_WRITE_STA_FILE_OPS(name, bufsz) \
|
||||
_MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, bufsz, struct ieee80211_sta)
|
||||
static ssize_t
|
||||
_iwl_dbgfs_link_sta_wrap_write(ssize_t (*real)(struct ieee80211_link_sta *,
|
||||
struct iwl_mvm_sta *,
|
||||
struct iwl_mvm *,
|
||||
struct iwl_mvm_link_sta *,
|
||||
char *,
|
||||
size_t, loff_t *),
|
||||
struct file *file,
|
||||
char *buf, size_t buf_size, loff_t *ppos)
|
||||
{
|
||||
struct ieee80211_link_sta *link_sta = file->private_data;
|
||||
struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(link_sta->sta);
|
||||
struct iwl_mvm *mvm = iwl_mvm_vif_from_mac80211(mvmsta->vif)->mvm;
|
||||
struct iwl_mvm_link_sta *mvm_link_sta;
|
||||
ssize_t ret;
|
||||
|
||||
#define MVM_DEBUGFS_ADD_STA_FILE_ALIAS(alias, name, parent, mode) do { \
|
||||
debugfs_create_file(alias, mode, parent, sta, \
|
||||
&iwl_dbgfs_##name##_ops); \
|
||||
} while (0)
|
||||
#define MVM_DEBUGFS_ADD_STA_FILE(name, parent, mode) \
|
||||
MVM_DEBUGFS_ADD_STA_FILE_ALIAS(#name, name, parent, mode)
|
||||
mutex_lock(&mvm->mutex);
|
||||
|
||||
mvm_link_sta = rcu_dereference_protected(mvmsta->link[link_sta->link_id],
|
||||
lockdep_is_held(&mvm->mutex));
|
||||
if (WARN_ON(!mvm_link_sta)) {
|
||||
mutex_unlock(&mvm->mutex);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = real(link_sta, mvmsta, mvm, mvm_link_sta, buf, buf_size, ppos);
|
||||
|
||||
mutex_unlock(&mvm->mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
_iwl_dbgfs_link_sta_wrap_read(ssize_t (*real)(struct ieee80211_link_sta *,
|
||||
struct iwl_mvm_sta *,
|
||||
struct iwl_mvm *,
|
||||
struct iwl_mvm_link_sta *,
|
||||
char __user *,
|
||||
size_t, loff_t *),
|
||||
struct file *file,
|
||||
char __user *user_buf, size_t count, loff_t *ppos)
|
||||
{
|
||||
struct ieee80211_link_sta *link_sta = file->private_data;
|
||||
struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(link_sta->sta);
|
||||
struct iwl_mvm *mvm = iwl_mvm_vif_from_mac80211(mvmsta->vif)->mvm;
|
||||
struct iwl_mvm_link_sta *mvm_link_sta;
|
||||
ssize_t ret;
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
|
||||
mvm_link_sta = rcu_dereference_protected(mvmsta->link[link_sta->link_id],
|
||||
lockdep_is_held(&mvm->mutex));
|
||||
if (WARN_ON(!mvm_link_sta)) {
|
||||
mutex_unlock(&mvm->mutex);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = real(link_sta, mvmsta, mvm, mvm_link_sta, user_buf, count, ppos);
|
||||
|
||||
mutex_unlock(&mvm->mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define MVM_DEBUGFS_LINK_STA_WRITE_WRAPPER(name, buflen) \
|
||||
static ssize_t _iwl_dbgfs_link_sta_##name##_write(struct file *file, \
|
||||
const char __user *user_buf, \
|
||||
size_t count, loff_t *ppos) \
|
||||
{ \
|
||||
char buf[buflen] = {}; \
|
||||
size_t buf_size = min(count, sizeof(buf) - 1); \
|
||||
\
|
||||
if (copy_from_user(buf, user_buf, sizeof(buf))) \
|
||||
return -EFAULT; \
|
||||
\
|
||||
return _iwl_dbgfs_link_sta_wrap_write(iwl_dbgfs_##name##_write, \
|
||||
file, \
|
||||
buf, buf_size, ppos); \
|
||||
} \
|
||||
|
||||
#define MVM_DEBUGFS_LINK_STA_READ_WRAPPER(name) \
|
||||
static ssize_t _iwl_dbgfs_link_sta_##name##_read(struct file *file, \
|
||||
char __user *user_buf, \
|
||||
size_t count, loff_t *ppos) \
|
||||
{ \
|
||||
return _iwl_dbgfs_link_sta_wrap_read(iwl_dbgfs_##name##_read, \
|
||||
file, \
|
||||
user_buf, count, ppos); \
|
||||
} \
|
||||
|
||||
#define MVM_DEBUGFS_WRITE_LINK_STA_FILE_OPS(name, bufsz) \
|
||||
MVM_DEBUGFS_LINK_STA_WRITE_WRAPPER(name, bufsz) \
|
||||
static const struct file_operations iwl_dbgfs_link_sta_##name##_ops = { \
|
||||
.write = _iwl_dbgfs_link_sta_##name##_write, \
|
||||
.open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
#define MVM_DEBUGFS_READ_LINK_STA_FILE_OPS(name) \
|
||||
MVM_DEBUGFS_LINK_STA_READ_WRAPPER(name) \
|
||||
static const struct file_operations iwl_dbgfs_link_sta_##name##_ops = { \
|
||||
.read = _iwl_dbgfs_link_sta_##name##_read, \
|
||||
.open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
#define MVM_DEBUGFS_READ_WRITE_LINK_STA_FILE_OPS(name, bufsz) \
|
||||
MVM_DEBUGFS_LINK_STA_READ_WRAPPER(name) \
|
||||
MVM_DEBUGFS_LINK_STA_WRITE_WRAPPER(name, bufsz) \
|
||||
static const struct file_operations iwl_dbgfs_link_sta_##name##_ops = { \
|
||||
.read = _iwl_dbgfs_link_sta_##name##_read, \
|
||||
.write = _iwl_dbgfs_link_sta_##name##_write, \
|
||||
.open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
#define MVM_DEBUGFS_ADD_LINK_STA_FILE_ALIAS(alias, name, parent, mode) \
|
||||
debugfs_create_file(alias, mode, parent, link_sta, \
|
||||
&iwl_dbgfs_link_sta_##name##_ops)
|
||||
#define MVM_DEBUGFS_ADD_LINK_STA_FILE(name, parent, mode) \
|
||||
MVM_DEBUGFS_ADD_LINK_STA_FILE_ALIAS(#name, name, parent, mode)
|
||||
|
||||
static ssize_t
|
||||
iwl_dbgfs_prph_reg_read(struct file *file,
|
||||
@ -1891,7 +2006,7 @@ MVM_DEBUGFS_READ_WRITE_FILE_OPS(sram, 64);
|
||||
MVM_DEBUGFS_READ_WRITE_FILE_OPS(set_nic_temperature, 64);
|
||||
MVM_DEBUGFS_READ_FILE_OPS(nic_temp);
|
||||
MVM_DEBUGFS_READ_FILE_OPS(stations);
|
||||
MVM_DEBUGFS_READ_FILE_OPS(rs_data);
|
||||
MVM_DEBUGFS_READ_LINK_STA_FILE_OPS(rs_data);
|
||||
MVM_DEBUGFS_READ_FILE_OPS(bt_notif);
|
||||
MVM_DEBUGFS_READ_FILE_OPS(bt_cmd);
|
||||
MVM_DEBUGFS_READ_WRITE_FILE_OPS(disable_power_off, 64);
|
||||
@ -1921,7 +2036,7 @@ MVM_DEBUGFS_READ_FILE_OPS(sar_geo_profile);
|
||||
MVM_DEBUGFS_READ_FILE_OPS(wifi_6e_enable);
|
||||
#endif
|
||||
|
||||
MVM_DEBUGFS_READ_WRITE_STA_FILE_OPS(amsdu_len, 16);
|
||||
MVM_DEBUGFS_READ_WRITE_LINK_STA_FILE_OPS(amsdu_len, 16);
|
||||
|
||||
MVM_DEBUGFS_READ_WRITE_FILE_OPS(he_sniffer_params, 32);
|
||||
|
||||
@ -2068,17 +2183,18 @@ static const struct file_operations iwl_dbgfs_mem_ops = {
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
void iwl_mvm_sta_add_debugfs(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
struct dentry *dir)
|
||||
void iwl_mvm_link_sta_add_debugfs(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_link_sta *link_sta,
|
||||
struct dentry *dir)
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
|
||||
if (iwl_mvm_has_tlc_offload(mvm)) {
|
||||
MVM_DEBUGFS_ADD_STA_FILE(rs_data, dir, 0400);
|
||||
MVM_DEBUGFS_ADD_LINK_STA_FILE(rs_data, dir, 0400);
|
||||
}
|
||||
MVM_DEBUGFS_ADD_STA_FILE(amsdu_len, dir, 0600);
|
||||
|
||||
MVM_DEBUGFS_ADD_LINK_STA_FILE(amsdu_len, dir, 0600);
|
||||
}
|
||||
|
||||
void iwl_mvm_dbgfs_register(struct iwl_mvm *mvm)
|
||||
|
@ -72,15 +72,24 @@ int iwl_mvm_ftm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
* the TK is already configured for this station, so it
|
||||
* shouldn't be set again here.
|
||||
*/
|
||||
if (vif->cfg.assoc &&
|
||||
!memcmp(addr, vif->bss_conf.bssid, ETH_ALEN)) {
|
||||
if (vif->cfg.assoc) {
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct ieee80211_bss_conf *link_conf;
|
||||
unsigned int link_id;
|
||||
struct ieee80211_sta *sta;
|
||||
u8 sta_id;
|
||||
|
||||
rcu_read_lock();
|
||||
sta = rcu_dereference(mvm->fw_id_to_mac_id[mvmvif->deflink.ap_sta_id]);
|
||||
if (!IS_ERR_OR_NULL(sta) && sta->mfp)
|
||||
expected_tk_len = 0;
|
||||
for_each_vif_active_link(vif, link_conf, link_id) {
|
||||
if (memcmp(addr, link_conf->bssid, ETH_ALEN))
|
||||
continue;
|
||||
|
||||
sta_id = mvmvif->link[link_id]->ap_sta_id;
|
||||
sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]);
|
||||
if (!IS_ERR_OR_NULL(sta) && sta->mfp)
|
||||
expected_tk_len = 0;
|
||||
break;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
@ -518,25 +527,30 @@ iwl_mvm_ftm_put_target(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
|
||||
iwl_mvm_ftm_put_target_common(mvm, peer, target);
|
||||
|
||||
if (vif->cfg.assoc &&
|
||||
!memcmp(peer->addr, vif->bss_conf.bssid, ETH_ALEN)) {
|
||||
if (vif->cfg.assoc) {
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct ieee80211_sta *sta;
|
||||
struct ieee80211_bss_conf *link_conf;
|
||||
unsigned int link_id;
|
||||
|
||||
rcu_read_lock();
|
||||
for_each_vif_active_link(vif, link_conf, link_id) {
|
||||
if (memcmp(peer->addr, link_conf->bssid, ETH_ALEN))
|
||||
continue;
|
||||
|
||||
sta = rcu_dereference(mvm->fw_id_to_mac_id[mvmvif->deflink.ap_sta_id]);
|
||||
if (WARN_ON_ONCE(IS_ERR_OR_NULL(sta))) {
|
||||
rcu_read_unlock();
|
||||
return PTR_ERR_OR_ZERO(sta);
|
||||
target->sta_id = mvmvif->link[link_id]->ap_sta_id;
|
||||
sta = rcu_dereference(mvm->fw_id_to_mac_id[target->sta_id]);
|
||||
if (WARN_ON_ONCE(IS_ERR_OR_NULL(sta))) {
|
||||
rcu_read_unlock();
|
||||
return PTR_ERR_OR_ZERO(sta);
|
||||
}
|
||||
|
||||
if (sta->mfp && (peer->ftm.trigger_based ||
|
||||
peer->ftm.non_trigger_based))
|
||||
FTM_PUT_FLAG(PMF);
|
||||
break;
|
||||
}
|
||||
|
||||
if (sta->mfp && (peer->ftm.trigger_based || peer->ftm.non_trigger_based))
|
||||
FTM_PUT_FLAG(PMF);
|
||||
|
||||
rcu_read_unlock();
|
||||
|
||||
target->sta_id = mvmvif->deflink.ap_sta_id;
|
||||
} else {
|
||||
target->sta_id = IWL_MVM_INVALID_STA;
|
||||
}
|
||||
|
@ -104,7 +104,8 @@ iwl_mvm_ftm_responder_set_ndp(struct iwl_mvm *mvm,
|
||||
static int
|
||||
iwl_mvm_ftm_responder_cmd(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
struct cfg80211_chan_def *chandef)
|
||||
struct cfg80211_chan_def *chandef,
|
||||
struct ieee80211_bss_conf *link_conf)
|
||||
{
|
||||
u32 cmd_id = WIDE_ID(LOCATION_GROUP, TOF_RESPONDER_CONFIG_CMD);
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
@ -119,7 +120,7 @@ iwl_mvm_ftm_responder_cmd(struct iwl_mvm *mvm,
|
||||
cpu_to_le32(IWL_TOF_RESPONDER_CMD_VALID_CHAN_INFO |
|
||||
IWL_TOF_RESPONDER_CMD_VALID_BSSID |
|
||||
IWL_TOF_RESPONDER_CMD_VALID_STA_ID),
|
||||
.sta_id = mvmvif->deflink.bcast_sta.sta_id,
|
||||
.sta_id = mvmvif->link[link_conf->link_id]->bcast_sta.sta_id,
|
||||
};
|
||||
u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 6);
|
||||
int err;
|
||||
@ -386,7 +387,8 @@ int iwl_mvm_ftm_resp_remove_pasn_sta(struct iwl_mvm *mvm,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int iwl_mvm_ftm_start_responder(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
int iwl_mvm_ftm_start_responder(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
{
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct ieee80211_ftm_responder_params *params;
|
||||
@ -395,11 +397,11 @@ int iwl_mvm_ftm_start_responder(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
struct iwl_mvm_phy_ctxt *phy_ctxt;
|
||||
int ret;
|
||||
|
||||
params = vif->bss_conf.ftmr_params;
|
||||
params = bss_conf->ftmr_params;
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
if (WARN_ON_ONCE(!vif->bss_conf.ftm_responder))
|
||||
if (WARN_ON_ONCE(!bss_conf->ftm_responder))
|
||||
return -EINVAL;
|
||||
|
||||
if (vif->p2p || vif->type != NL80211_IFTYPE_AP ||
|
||||
@ -409,7 +411,7 @@ int iwl_mvm_ftm_start_responder(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
}
|
||||
|
||||
rcu_read_lock();
|
||||
pctx = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
pctx = rcu_dereference(bss_conf->chanctx_conf);
|
||||
/* Copy the ctx to unlock the rcu and send the phy ctxt. We don't care
|
||||
* about changes in the ctx after releasing the lock because the driver
|
||||
* is still protected by the mutex. */
|
||||
@ -424,7 +426,7 @@ int iwl_mvm_ftm_start_responder(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = iwl_mvm_ftm_responder_cmd(mvm, vif, &ctx.def);
|
||||
ret = iwl_mvm_ftm_responder_cmd(mvm, vif, &ctx.def, bss_conf);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -446,13 +448,14 @@ void iwl_mvm_ftm_responder_clear(struct iwl_mvm *mvm,
|
||||
}
|
||||
|
||||
void iwl_mvm_ftm_restart_responder(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif)
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
{
|
||||
if (!vif->bss_conf.ftm_responder)
|
||||
if (!bss_conf->ftm_responder)
|
||||
return;
|
||||
|
||||
iwl_mvm_ftm_responder_clear(mvm, vif);
|
||||
iwl_mvm_ftm_start_responder(mvm, vif);
|
||||
iwl_mvm_ftm_start_responder(mvm, vif, bss_conf);
|
||||
}
|
||||
|
||||
void iwl_mvm_ftm_responder_stats(struct iwl_mvm *mvm,
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -478,40 +478,13 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void iwl_mvm_phy_filter_init(struct iwl_mvm *mvm,
|
||||
struct iwl_phy_specific_cfg *phy_filters)
|
||||
{
|
||||
#ifdef CONFIG_ACPI
|
||||
static void iwl_mvm_phy_filter_init(struct iwl_mvm *mvm,
|
||||
struct iwl_phy_specific_cfg *phy_filters)
|
||||
{
|
||||
/*
|
||||
* TODO: read specific phy config from BIOS
|
||||
* ACPI table for this feature has not been defined yet,
|
||||
* so for now we use hardcoded values.
|
||||
*/
|
||||
|
||||
if (IWL_MVM_PHY_FILTER_CHAIN_A) {
|
||||
phy_filters->filter_cfg_chain_a =
|
||||
cpu_to_le32(IWL_MVM_PHY_FILTER_CHAIN_A);
|
||||
}
|
||||
if (IWL_MVM_PHY_FILTER_CHAIN_B) {
|
||||
phy_filters->filter_cfg_chain_b =
|
||||
cpu_to_le32(IWL_MVM_PHY_FILTER_CHAIN_B);
|
||||
}
|
||||
if (IWL_MVM_PHY_FILTER_CHAIN_C) {
|
||||
phy_filters->filter_cfg_chain_c =
|
||||
cpu_to_le32(IWL_MVM_PHY_FILTER_CHAIN_C);
|
||||
}
|
||||
if (IWL_MVM_PHY_FILTER_CHAIN_D) {
|
||||
phy_filters->filter_cfg_chain_d =
|
||||
cpu_to_le32(IWL_MVM_PHY_FILTER_CHAIN_D);
|
||||
}
|
||||
}
|
||||
#else /* CONFIG_ACPI */
|
||||
|
||||
static void iwl_mvm_phy_filter_init(struct iwl_mvm *mvm,
|
||||
struct iwl_phy_specific_cfg *phy_filters)
|
||||
{
|
||||
}
|
||||
*phy_filters = mvm->phy_filters;
|
||||
#endif /* CONFIG_ACPI */
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ACPI) && defined(CONFIG_EFI)
|
||||
static int iwl_mvm_sgom_init(struct iwl_mvm *mvm)
|
||||
@ -560,7 +533,6 @@ static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm)
|
||||
u32 cmd_id = PHY_CONFIGURATION_CMD;
|
||||
struct iwl_phy_cfg_cmd_v3 phy_cfg_cmd;
|
||||
enum iwl_ucode_type ucode_type = mvm->fwrt.cur_fw_img;
|
||||
struct iwl_phy_specific_cfg phy_filters = {};
|
||||
u8 cmd_ver;
|
||||
size_t cmd_size;
|
||||
|
||||
@ -591,11 +563,8 @@ static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm)
|
||||
|
||||
cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id,
|
||||
IWL_FW_CMD_VER_UNKNOWN);
|
||||
if (cmd_ver == 3) {
|
||||
iwl_mvm_phy_filter_init(mvm, &phy_filters);
|
||||
memcpy(&phy_cfg_cmd.phy_specific_cfg, &phy_filters,
|
||||
sizeof(struct iwl_phy_specific_cfg));
|
||||
}
|
||||
if (cmd_ver >= 3)
|
||||
iwl_mvm_phy_filter_init(mvm, &phy_cfg_cmd.phy_specific_cfg);
|
||||
|
||||
IWL_DEBUG_INFO(mvm, "Sending Phy CFG command: 0x%x\n",
|
||||
phy_cfg_cmd.phy_cfg);
|
||||
@ -1182,7 +1151,7 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm)
|
||||
if (ret == 0)
|
||||
return;
|
||||
|
||||
if (!dmi_check_system(dmi_tas_approved_list)) {
|
||||
if (!iwl_mvm_is_vendor_in_approved_list()) {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"System vendor '%s' is not in the approved list, disabling TAS in US and Canada.\n",
|
||||
dmi_get_system_info(DMI_SYS_VENDOR));
|
||||
@ -1380,6 +1349,8 @@ void iwl_mvm_get_acpi_tables(struct iwl_mvm *mvm)
|
||||
/* we don't fail if the table is not available */
|
||||
}
|
||||
}
|
||||
|
||||
iwl_acpi_get_phy_filters(&mvm->fwrt, &mvm->phy_filters);
|
||||
}
|
||||
#else /* CONFIG_ACPI */
|
||||
|
||||
@ -1595,6 +1566,8 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
||||
goto error;
|
||||
}
|
||||
|
||||
iwl_mvm_lari_cfg(mvm);
|
||||
|
||||
/* Init RSS configuration */
|
||||
ret = iwl_configure_rxq(&mvm->fwrt);
|
||||
if (ret)
|
||||
@ -1637,7 +1610,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
||||
* internal aux station for all aux activities that don't
|
||||
* requires a dedicated data queue.
|
||||
*/
|
||||
if (iwl_fw_lookup_cmd_ver(mvm->fw, ADD_STA, 0) < 12) {
|
||||
if (!iwl_mvm_has_new_station_api(mvm->fw)) {
|
||||
/*
|
||||
* In old version the aux station uses mac id like other
|
||||
* station and not lmac id
|
||||
@ -1705,7 +1678,6 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
iwl_mvm_lari_cfg(mvm);
|
||||
/*
|
||||
* RTNL is not taken during Ct-kill, but we don't need to scan/Tx
|
||||
* anyway, so don't init MCC.
|
||||
@ -1806,7 +1778,7 @@ int iwl_mvm_load_d3_fw(struct iwl_mvm *mvm)
|
||||
RCU_INIT_POINTER(mvm->fw_id_to_link_sta[i], NULL);
|
||||
}
|
||||
|
||||
if (iwl_fw_lookup_cmd_ver(mvm->fw, ADD_STA, 0) < 12) {
|
||||
if (!iwl_mvm_has_new_station_api(mvm->fw)) {
|
||||
/*
|
||||
* Add auxiliary station for scanning.
|
||||
* Newer versions of this command implies that the fw uses
|
||||
|
@ -89,6 +89,8 @@ int iwl_mvm_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
if (vif->type == NL80211_IFTYPE_ADHOC && link_conf->bssid)
|
||||
memcpy(cmd.ibss_bssid_addr, link_conf->bssid, ETH_ALEN);
|
||||
|
||||
cmd.listen_lmac = cpu_to_le32(link_info->listen_lmac);
|
||||
|
||||
return iwl_mvm_link_cmd_send(mvm, &cmd, FW_CTXT_ACTION_ADD);
|
||||
}
|
||||
|
||||
@ -118,24 +120,6 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
if (!link_info->phy_ctxt)
|
||||
return 0;
|
||||
|
||||
/* check there aren't too many active links */
|
||||
if (!link_info->active && active) {
|
||||
int i, count = 0;
|
||||
|
||||
/* link with phy_ctxt is active in FW */
|
||||
for_each_mvm_vif_valid_link(mvmvif, i)
|
||||
if (mvmvif->link[i]->phy_ctxt)
|
||||
count++;
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_AP) {
|
||||
if (count > mvm->fw->ucode_capa.num_beacons)
|
||||
return -EOPNOTSUPP;
|
||||
/* this should be per HW or such */
|
||||
} else if (count >= IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM) {
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
}
|
||||
|
||||
/* Catch early if driver tries to activate or deactivate a link
|
||||
* twice.
|
||||
*/
|
||||
@ -167,10 +151,6 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
if (vif->type == NL80211_IFTYPE_ADHOC && link_conf->bssid)
|
||||
memcpy(cmd.ibss_bssid_addr, link_conf->bssid, ETH_ALEN);
|
||||
|
||||
/* TODO: set a value to cmd.listen_lmac when system requiremens
|
||||
* will define it
|
||||
*/
|
||||
|
||||
iwl_mvm_set_fw_basic_rates(mvm, vif, link_conf,
|
||||
&cmd.cck_rates, &cmd.ofdm_rates);
|
||||
|
||||
@ -183,7 +163,7 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
&cmd.protection_flags,
|
||||
ht_flag, LINK_PROT_FLG_TGG_PROTECT);
|
||||
|
||||
iwl_mvm_set_fw_qos_params(mvm, vif, link_conf, &cmd.ac[0],
|
||||
iwl_mvm_set_fw_qos_params(mvm, vif, link_conf, cmd.ac,
|
||||
&cmd.qos_flags);
|
||||
|
||||
|
||||
@ -208,7 +188,7 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
|
||||
/* TODO how to set ndp_fdbk_buff_th_exp? */
|
||||
|
||||
if (iwl_mvm_set_fw_mu_edca_params(mvm, mvmvif,
|
||||
if (iwl_mvm_set_fw_mu_edca_params(mvm, mvmvif->link[link_id],
|
||||
&cmd.trig_based_txf[0])) {
|
||||
flags |= LINK_FLG_MU_EDCA_CW;
|
||||
flags_mask |= LINK_FLG_MU_EDCA_CW;
|
||||
@ -245,6 +225,8 @@ send_cmd:
|
||||
cmd.modify_mask = cpu_to_le32(changes);
|
||||
cmd.flags = cpu_to_le32(flags);
|
||||
cmd.flags_mask = cpu_to_le32(flags_mask);
|
||||
cmd.spec_link_id = link_conf->link_id;
|
||||
cmd.listen_lmac = cpu_to_le32(link_info->listen_lmac);
|
||||
|
||||
ret = iwl_mvm_link_cmd_send(mvm, &cmd, FW_CTXT_ACTION_MODIFY);
|
||||
if (!ret && (changes & LINK_CONTEXT_MODIFY_ACTIVE))
|
||||
@ -271,6 +253,7 @@ int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
cmd.link_id = cpu_to_le32(link_info->fw_link_id);
|
||||
iwl_mvm_release_fw_link_id(mvm, link_info->fw_link_id);
|
||||
link_info->fw_link_id = IWL_MVM_FW_LINK_ID_INVALID;
|
||||
cmd.spec_link_id = link_conf->link_id;
|
||||
|
||||
ret = iwl_mvm_link_cmd_send(mvm, &cmd, FW_CTXT_ACTION_REMOVE);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -470,19 +470,24 @@ void iwl_mvm_set_fw_qos_params(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct iwl_ac_qos *ac, __le32 *qos_flags)
|
||||
{
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct iwl_mvm_vif_link_info *mvm_link =
|
||||
mvmvif->link[link_conf->link_id];
|
||||
int i;
|
||||
|
||||
if (!mvm_link)
|
||||
return;
|
||||
|
||||
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
|
||||
u8 txf = iwl_mvm_mac_ac_to_tx_fifo(mvm, i);
|
||||
u8 ucode_ac = iwl_mvm_mac80211_ac_to_ucode_ac(i);
|
||||
|
||||
ac[ucode_ac].cw_min =
|
||||
cpu_to_le16(mvmvif->deflink.queue_params[i].cw_min);
|
||||
cpu_to_le16(mvm_link->queue_params[i].cw_min);
|
||||
ac[ucode_ac].cw_max =
|
||||
cpu_to_le16(mvmvif->deflink.queue_params[i].cw_max);
|
||||
cpu_to_le16(mvm_link->queue_params[i].cw_max);
|
||||
ac[ucode_ac].edca_txop =
|
||||
cpu_to_le16(mvmvif->deflink.queue_params[i].txop * 32);
|
||||
ac[ucode_ac].aifsn = mvmvif->deflink.queue_params[i].aifs;
|
||||
cpu_to_le16(mvm_link->queue_params[i].txop * 32);
|
||||
ac[ucode_ac].aifsn = mvm_link->queue_params[i].aifs;
|
||||
ac[ucode_ac].fifos_mask = BIT(txf);
|
||||
}
|
||||
|
||||
@ -558,7 +563,7 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
|
||||
|
||||
cmd->filter_flags = 0;
|
||||
|
||||
iwl_mvm_set_fw_qos_params(mvm, vif, &vif->bss_conf, &cmd->ac[0],
|
||||
iwl_mvm_set_fw_qos_params(mvm, vif, &vif->bss_conf, cmd->ac,
|
||||
&cmd->qos_flags);
|
||||
|
||||
/* The fw does not distinguish between ht and fat */
|
||||
@ -888,7 +893,7 @@ u8 iwl_mvm_mac_ctxt_get_lowest_rate(struct iwl_mvm *mvm,
|
||||
u8 rate;
|
||||
u32 i;
|
||||
|
||||
if (link_id == IEEE80211_LINK_UNSPECIFIED && vif->valid_links) {
|
||||
if (link_id == IEEE80211_LINK_UNSPECIFIED && ieee80211_vif_is_mld(vif)) {
|
||||
for (i = 0; i < ARRAY_SIZE(mvmvif->link); i++) {
|
||||
if (!mvmvif->link[i])
|
||||
continue;
|
||||
@ -1111,6 +1116,10 @@ static int iwl_mvm_mac_ctxt_send_beacon_v9(struct iwl_mvm *mvm,
|
||||
|
||||
beacon_cmd.flags = cpu_to_le16(flags);
|
||||
beacon_cmd.byte_cnt = cpu_to_le16((u16)beacon->len);
|
||||
|
||||
if (WARN_ON(!mvmvif->link[link_conf->link_id]))
|
||||
return -EINVAL;
|
||||
|
||||
if (iwl_fw_lookup_cmd_ver(mvm->fw, BEACON_TEMPLATE_CMD, 0) > 12)
|
||||
beacon_cmd.link_id =
|
||||
cpu_to_le32(mvmvif->link[link_conf->link_id]->fw_link_id);
|
||||
@ -1754,6 +1763,7 @@ void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm,
|
||||
u32 id;
|
||||
u8 notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP,
|
||||
CHANNEL_SWITCH_START_NOTIF, 0);
|
||||
bool csa_active;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
@ -1769,6 +1779,7 @@ void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm,
|
||||
goto out_unlock;
|
||||
|
||||
id = mac_id;
|
||||
csa_active = vif->bss_conf.csa_active;
|
||||
} else {
|
||||
struct iwl_channel_switch_start_notif *notif = (void *)pkt->data;
|
||||
u32 link_id = le32_to_cpu(notif->link_id);
|
||||
@ -1780,6 +1791,7 @@ void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm,
|
||||
|
||||
id = link_id;
|
||||
vif = bss_conf->vif;
|
||||
csa_active = bss_conf->csa_active;
|
||||
}
|
||||
|
||||
mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
@ -1819,7 +1831,7 @@ void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm,
|
||||
*/
|
||||
if (iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP,
|
||||
CHANNEL_SWITCH_ERROR_NOTIF,
|
||||
0) && !vif->bss_conf.csa_active) {
|
||||
0) && !csa_active) {
|
||||
IWL_DEBUG_INFO(mvm, "Channel Switch was canceled\n");
|
||||
iwl_mvm_cancel_channel_switch(mvm, vif, id);
|
||||
break;
|
||||
|
@ -108,7 +108,7 @@ struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy,
|
||||
struct ieee80211_regdomain *regd = NULL;
|
||||
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
struct iwl_mcc_update_resp *resp;
|
||||
struct iwl_mcc_update_resp_v8 *resp;
|
||||
u8 resp_ver;
|
||||
|
||||
IWL_DEBUG_LAR(mvm, "Getting regdomain data for %s from FW\n", alpha2);
|
||||
@ -138,7 +138,7 @@ struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy,
|
||||
resp->channels,
|
||||
__le16_to_cpu(resp->mcc),
|
||||
__le16_to_cpu(resp->geo_info),
|
||||
__le16_to_cpu(resp->cap), resp_ver);
|
||||
le32_to_cpu(resp->cap), resp_ver);
|
||||
/* Store the return source id */
|
||||
src_id = resp->source_id;
|
||||
if (IS_ERR_OR_NULL(regd)) {
|
||||
@ -245,12 +245,21 @@ static const u8 tm_if_types_ext_capa_sta[] = {
|
||||
/* Additional interface types for which extended capabilities are
|
||||
* specified separately
|
||||
*/
|
||||
|
||||
#define IWL_MVM_EMLSR_CAPA (IEEE80211_EML_CAP_EMLSR_SUPP | \
|
||||
IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_32US << \
|
||||
__bf_shf(IEEE80211_EML_CAP_EMLSR_PADDING_DELAY) | \
|
||||
IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_64US << \
|
||||
__bf_shf(IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY))
|
||||
|
||||
static const struct wiphy_iftype_ext_capab add_iftypes_ext_capa[] = {
|
||||
{
|
||||
.iftype = NL80211_IFTYPE_STATION,
|
||||
.extended_capabilities = he_if_types_ext_capa_sta,
|
||||
.extended_capabilities_mask = he_if_types_ext_capa_sta,
|
||||
.extended_capabilities_len = sizeof(he_if_types_ext_capa_sta),
|
||||
/* relevant only if EHT is supported */
|
||||
.eml_capabilities = IWL_MVM_EMLSR_CAPA,
|
||||
},
|
||||
{
|
||||
.iftype = NL80211_IFTYPE_STATION,
|
||||
@ -258,7 +267,7 @@ static const struct wiphy_iftype_ext_capab add_iftypes_ext_capa[] = {
|
||||
.extended_capabilities_mask = tm_if_types_ext_capa_sta,
|
||||
.extended_capabilities_len = sizeof(tm_if_types_ext_capa_sta),
|
||||
/* relevant only if EHT is supported */
|
||||
.eml_capabilities = IEEE80211_EML_CAP_EMLSR_SUPP,
|
||||
.eml_capabilities = IWL_MVM_EMLSR_CAPA,
|
||||
},
|
||||
};
|
||||
|
||||
@ -1029,6 +1038,7 @@ static void iwl_mvm_cleanup_iterator(void *data, u8 *mac,
|
||||
mvmvif->link[link_id]->fw_link_id = IWL_MVM_FW_LINK_ID_INVALID;
|
||||
mvmvif->link[link_id]->phy_ctxt = NULL;
|
||||
mvmvif->link[link_id]->active = 0;
|
||||
mvmvif->link[link_id]->igtk = NULL;
|
||||
}
|
||||
|
||||
probe_data = rcu_dereference_protected(mvmvif->deflink.probe_resp_data,
|
||||
@ -1233,7 +1243,7 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
|
||||
|
||||
/* async_handlers_wk is now blocked */
|
||||
|
||||
if (iwl_fw_lookup_cmd_ver(mvm->fw, ADD_STA, 0) < 12)
|
||||
if (!iwl_mvm_has_new_station_api(mvm->fw))
|
||||
iwl_mvm_rm_aux_sta(mvm);
|
||||
|
||||
iwl_mvm_stop_device(mvm);
|
||||
@ -2230,7 +2240,7 @@ int iwl_mvm_set_sta_pkt_ext(struct iwl_mvm *mvm,
|
||||
* is enabled or not
|
||||
*/
|
||||
bool iwl_mvm_set_fw_mu_edca_params(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_vif *mvmvif,
|
||||
const struct iwl_mvm_vif_link_info *link_info,
|
||||
struct iwl_he_backoff_conf *trig_based_txf)
|
||||
{
|
||||
int i;
|
||||
@ -2238,11 +2248,11 @@ bool iwl_mvm_set_fw_mu_edca_params(struct iwl_mvm *mvm,
|
||||
bool mu_edca_enabled = true;
|
||||
|
||||
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
|
||||
struct ieee80211_he_mu_edca_param_ac_rec *mu_edca =
|
||||
&mvmvif->deflink.queue_params[i].mu_edca_param_rec;
|
||||
const struct ieee80211_he_mu_edca_param_ac_rec *mu_edca =
|
||||
&link_info->queue_params[i].mu_edca_param_rec;
|
||||
u8 ac = iwl_mvm_mac80211_ac_to_ucode_ac(i);
|
||||
|
||||
if (!mvmvif->deflink.queue_params[i].mu_edca) {
|
||||
if (!link_info->queue_params[i].mu_edca) {
|
||||
mu_edca_enabled = false;
|
||||
break;
|
||||
}
|
||||
@ -2269,8 +2279,7 @@ bool iwl_mvm_is_nic_ack_enabled(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
* so take it from one of them.
|
||||
*/
|
||||
sband = mvm->hw->wiphy->bands[NL80211_BAND_2GHZ];
|
||||
own_he_cap = ieee80211_get_he_iftype_cap(sband,
|
||||
ieee80211_vif_type_p2p(vif));
|
||||
own_he_cap = ieee80211_get_he_iftype_cap_vif(sband, vif);
|
||||
|
||||
return (own_he_cap && (own_he_cap->he_cap_elem.mac_cap_info[2] &
|
||||
IEEE80211_HE_MAC_CAP2_ACK_EN));
|
||||
@ -2389,7 +2398,7 @@ static void iwl_mvm_cfg_he_sta(struct iwl_mvm *mvm,
|
||||
|
||||
rcu_read_unlock();
|
||||
|
||||
if (iwl_mvm_set_fw_mu_edca_params(mvm, mvmvif,
|
||||
if (iwl_mvm_set_fw_mu_edca_params(mvm, &mvmvif->deflink,
|
||||
&sta_ctxt_cmd.trig_based_txf[0]))
|
||||
flags |= STA_CTXT_HE_MU_EDCA_CW;
|
||||
|
||||
@ -2882,7 +2891,7 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw,
|
||||
if (iwl_mvm_phy_ctx_count(mvm) > 1)
|
||||
iwl_mvm_teardown_tdls_peers(mvm);
|
||||
|
||||
iwl_mvm_ftm_restart_responder(mvm, vif);
|
||||
iwl_mvm_ftm_restart_responder(mvm, vif, &vif->bss_conf);
|
||||
|
||||
goto out_unlock;
|
||||
|
||||
@ -3024,7 +3033,7 @@ iwl_mvm_bss_info_changed_ap_ibss(struct iwl_mvm *mvm,
|
||||
IWL_WARN(mvm, "Failed updating beacon data\n");
|
||||
|
||||
if (changes & BSS_CHANGED_FTM_RESPONDER) {
|
||||
int ret = iwl_mvm_ftm_start_responder(mvm, vif);
|
||||
int ret = iwl_mvm_ftm_start_responder(mvm, vif, &vif->bss_conf);
|
||||
|
||||
if (ret)
|
||||
IWL_WARN(mvm, "Failed to enable FTM responder (%d)\n",
|
||||
@ -3452,8 +3461,7 @@ static void iwl_mvm_reset_cca_40mhz_workaround(struct iwl_mvm *mvm,
|
||||
|
||||
sband->ht_cap.cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
||||
|
||||
he_cap = ieee80211_get_he_iftype_cap(sband,
|
||||
ieee80211_vif_type_p2p(vif));
|
||||
he_cap = ieee80211_get_he_iftype_cap_vif(sband, vif);
|
||||
|
||||
if (he_cap) {
|
||||
/* we know that ours is writable */
|
||||
@ -3828,6 +3836,7 @@ int iwl_mvm_mac_sta_state_common(struct ieee80211_hw *hw,
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
|
||||
struct ieee80211_link_sta *link_sta;
|
||||
unsigned int link_id;
|
||||
int ret;
|
||||
|
||||
@ -3869,7 +3878,7 @@ int iwl_mvm_mac_sta_state_common(struct ieee80211_hw *hw,
|
||||
mutex_lock(&mvm->mutex);
|
||||
|
||||
/* this would be a mac80211 bug ... but don't crash */
|
||||
for_each_mvm_vif_valid_link(mvmvif, link_id) {
|
||||
for_each_sta_active_link(vif, sta, link_sta, link_id) {
|
||||
if (WARN_ON_ONCE(!mvmvif->link[link_id]->phy_ctxt)) {
|
||||
mutex_unlock(&mvm->mutex);
|
||||
return test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED,
|
||||
@ -4513,7 +4522,7 @@ static int iwl_mvm_add_aux_sta_for_hs20(struct iwl_mvm *mvm, u32 lmac_id)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (iwl_fw_lookup_cmd_ver(mvm->fw, ADD_STA, 0) >= 12) {
|
||||
if (iwl_mvm_has_new_station_api(mvm->fw)) {
|
||||
ret = iwl_mvm_add_aux_sta(mvm, lmac_id);
|
||||
WARN(ret, "Failed to allocate aux station");
|
||||
}
|
||||
@ -4588,7 +4597,7 @@ int iwl_mvm_roc_common(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
|
||||
switch (vif->type) {
|
||||
case NL80211_IFTYPE_STATION:
|
||||
lmac_id = iwl_mvm_get_lmac_id(mvm->fw, channel->band);
|
||||
lmac_id = iwl_mvm_get_lmac_id(mvm, channel->band);
|
||||
|
||||
/* Use aux roc framework (HS20) */
|
||||
ret = ops->add_aux_sta_for_hs20(mvm, lmac_id);
|
||||
@ -5644,6 +5653,30 @@ void iwl_mvm_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
iwl_trans_wait_tx_queues_empty(mvm->trans, msk);
|
||||
}
|
||||
|
||||
void iwl_mvm_mac_flush_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
int i;
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
for (i = 0; i < mvm->fw->ucode_capa.num_stations; i++) {
|
||||
struct iwl_mvm_sta *mvmsta;
|
||||
struct ieee80211_sta *tmp;
|
||||
|
||||
tmp = rcu_dereference_protected(mvm->fw_id_to_mac_id[i],
|
||||
lockdep_is_held(&mvm->mutex));
|
||||
if (tmp != sta)
|
||||
continue;
|
||||
|
||||
mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
||||
|
||||
if (iwl_mvm_flush_sta(mvm, mvmsta, false))
|
||||
IWL_ERR(mvm, "flush request fail\n");
|
||||
}
|
||||
mutex_unlock(&mvm->mutex);
|
||||
}
|
||||
|
||||
int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
struct survey_info *survey)
|
||||
{
|
||||
@ -6134,10 +6167,6 @@ static bool iwl_mvm_mac_can_aggregate(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
|
||||
if (iwl_mvm_has_new_tx_csum(mvm))
|
||||
return iwl_mvm_tx_csum_bz(mvm, head, true) ==
|
||||
iwl_mvm_tx_csum_bz(mvm, skb, true);
|
||||
|
||||
/* For now don't aggregate IPv6 in AMSDU */
|
||||
if (skb->protocol != htons(ETH_P_IP))
|
||||
return false;
|
||||
@ -6200,6 +6229,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
|
||||
.mgd_complete_tx = iwl_mvm_mac_mgd_complete_tx,
|
||||
.mgd_protect_tdls_discover = iwl_mvm_mac_mgd_protect_tdls_discover,
|
||||
.flush = iwl_mvm_mac_flush,
|
||||
.flush_sta = iwl_mvm_mac_flush_sta,
|
||||
.sched_scan_start = iwl_mvm_mac_sched_scan_start,
|
||||
.sched_scan_stop = iwl_mvm_mac_sched_scan_stop,
|
||||
.set_key = iwl_mvm_mac_set_key,
|
||||
@ -6257,7 +6287,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
|
||||
|
||||
.can_aggregate_in_amsdu = iwl_mvm_mac_can_aggregate,
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
.sta_add_debugfs = iwl_mvm_sta_add_debugfs,
|
||||
.link_sta_add_debugfs = iwl_mvm_link_sta_add_debugfs,
|
||||
#endif
|
||||
.set_hw_timestamp = iwl_mvm_set_hw_timestamp,
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022 - 2023 Intel Corporation
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <net/mac80211.h>
|
||||
@ -42,7 +42,7 @@ static u32 iwl_mvm_get_sec_sta_mask(struct iwl_mvm *mvm,
|
||||
* Of course the same can be done during add as well, but we must do
|
||||
* it during remove, since we don't have the mvmvif->ap_sta pointer.
|
||||
*/
|
||||
if (!sta && (keyconf->link_id >= 0 || !vif->valid_links))
|
||||
if (!sta && (keyconf->link_id >= 0 || !ieee80211_vif_is_mld(vif)))
|
||||
return BIT(link_info->ap_sta_id);
|
||||
|
||||
/* STA should be non-NULL now, but iwl_mvm_sta_fw_id_mask() checks */
|
||||
@ -175,9 +175,14 @@ int iwl_mvm_mld_send_key(struct iwl_mvm *mvm, u32 sta_mask, u32 key_flags,
|
||||
.u.add.key_flags = cpu_to_le32(key_flags),
|
||||
.u.add.tx_seq = cpu_to_le64(atomic64_read(&keyconf->tx_pn)),
|
||||
};
|
||||
int max_key_len = sizeof(cmd.u.add.key);
|
||||
int ret;
|
||||
|
||||
if (WARN_ON(keyconf->keylen > sizeof(cmd.u.add.key)))
|
||||
if (keyconf->cipher == WLAN_CIPHER_SUITE_WEP40 ||
|
||||
keyconf->cipher == WLAN_CIPHER_SUITE_WEP104)
|
||||
max_key_len -= IWL_SEC_WEP_KEY_OFFSET;
|
||||
|
||||
if (WARN_ON(keyconf->keylen > max_key_len))
|
||||
return -EINVAL;
|
||||
|
||||
if (WARN_ON(!sta_mask))
|
||||
@ -226,8 +231,49 @@ int iwl_mvm_sec_key_add(struct iwl_mvm *mvm,
|
||||
{
|
||||
u32 sta_mask = iwl_mvm_get_sec_sta_mask(mvm, vif, sta, keyconf);
|
||||
u32 key_flags = iwl_mvm_get_sec_flags(mvm, vif, sta, keyconf);
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct iwl_mvm_vif_link_info *mvm_link = NULL;
|
||||
int ret;
|
||||
|
||||
return iwl_mvm_mld_send_key(mvm, sta_mask, key_flags, keyconf);
|
||||
if (keyconf->keyidx == 4 || keyconf->keyidx == 5) {
|
||||
unsigned int link_id = 0;
|
||||
|
||||
/* set to -1 for non-MLO right now */
|
||||
if (keyconf->link_id >= 0)
|
||||
link_id = keyconf->link_id;
|
||||
|
||||
mvm_link = mvmvif->link[link_id];
|
||||
if (WARN_ON(!mvm_link))
|
||||
return -EINVAL;
|
||||
|
||||
if (mvm_link->igtk) {
|
||||
IWL_DEBUG_MAC80211(mvm, "remove old IGTK %d\n",
|
||||
mvm_link->igtk->keyidx);
|
||||
ret = iwl_mvm_sec_key_del(mvm, vif, sta,
|
||||
mvm_link->igtk);
|
||||
if (ret)
|
||||
IWL_ERR(mvm,
|
||||
"failed to remove old IGTK (ret=%d)\n",
|
||||
ret);
|
||||
}
|
||||
|
||||
WARN_ON(mvm_link->igtk);
|
||||
}
|
||||
|
||||
ret = iwl_mvm_mld_send_key(mvm, sta_mask, key_flags, keyconf);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (mvm_link)
|
||||
mvm_link->igtk = keyconf;
|
||||
|
||||
/* We don't really need this, but need it to be not invalid,
|
||||
* and if we switch links multiple times it might go to be
|
||||
* invalid when removed.
|
||||
*/
|
||||
keyconf->hw_key_idx = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _iwl_mvm_sec_key_del(struct iwl_mvm *mvm,
|
||||
@ -238,11 +284,31 @@ static int _iwl_mvm_sec_key_del(struct iwl_mvm *mvm,
|
||||
{
|
||||
u32 sta_mask = iwl_mvm_get_sec_sta_mask(mvm, vif, sta, keyconf);
|
||||
u32 key_flags = iwl_mvm_get_sec_flags(mvm, vif, sta, keyconf);
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
int ret;
|
||||
|
||||
if (WARN_ON(!sta_mask))
|
||||
return -EINVAL;
|
||||
|
||||
if (keyconf->keyidx == 4 || keyconf->keyidx == 5) {
|
||||
struct iwl_mvm_vif_link_info *mvm_link;
|
||||
unsigned int link_id = 0;
|
||||
|
||||
/* set to -1 for non-MLO right now */
|
||||
if (keyconf->link_id >= 0)
|
||||
link_id = keyconf->link_id;
|
||||
|
||||
mvm_link = mvmvif->link[link_id];
|
||||
if (WARN_ON(!mvm_link))
|
||||
return -EINVAL;
|
||||
|
||||
if (mvm_link->igtk == keyconf) {
|
||||
/* no longer in HW - mark for later */
|
||||
mvm_link->igtk->hw_key_idx = STA_KEY_IDX_INVALID;
|
||||
mvm_link->igtk = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
ret = __iwl_mvm_sec_key_del(mvm, sta_mask, key_flags, keyconf->keyidx,
|
||||
flags);
|
||||
if (ret)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user