wireless-drivers-next patches for v5.17
Third set of patches for v5.17, and the final one if all goes well. We have Specific Absorption Rate (SAR) support for both mt76 and rtw88. Also iwlwifi should be now W=1 warning free. But otherwise nothing really special this time, business as usual. Major changes: mt76 * Specific Absorption Rate (SAR) support * mt7921: new PCI ids * mt7921: 160 MHz channel support iwlwifi * fix W=1 and sparse warnings * BNJ hardware support * add new killer device ids * support for Time-Aware-SAR (TAS) from the BIOS * Optimized Connectivity Experience (OCE) scan support rtw88 * hardware scan * Specific Absorption Rate (SAR) support ath11k * qca6390/wcn6855: report signal and tx bitrate * qca6390: rfkill support * qca6390/wcn6855: regdb.bin support ath5k * switch to rate table based lookup wilc1000 * spi: reset/enable GPIO support -----BEGIN PGP SIGNATURE----- iQFFBAABCgAvFiEEiBjanGPFTz4PRfLobhckVSbrbZsFAmHEgv4RHGt2YWxvQGtl cm5lbC5vcmcACgkQbhckVSbrbZt7jQf/W1J8lkaMw6mYnr+inmwKaP11VIk765Sf 4FXZl4xks5rs5zJOs61c/zInNIbu7QVsJzQLmM/bhTB1zoZMRo6ugXXrZ/LPMT1u X0mul1rC+NLZLlgaimNXRZUXJ2tGUsYYhGoZLHbcILx7XF7/9WtE4h7tLviLdMYk l42yjjP6s/I/zQHrLQdA9/puGl7g8CItbwaNZg6+PjgbS9NPGATrw9UZdOWjPcl4 JLMRHVgKtdlYL/U/IvsYg6o3Vbo0r+KEI2IMg5fOSpNwqbeQRIN4cZG4TDeRDqD/ k4/ZiFYlNdfVeWmZxHyqX6D3sroIquKglyah34fjzsJ2TbJC1zMvjw== =VHFz -----END PGP SIGNATURE----- Merge tag 'wireless-drivers-next-2021-12-23' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.17 Third set of patches for v5.17, and the final one if all goes well. We have Specific Absorption Rate (SAR) support for both mt76 and rtw88. Also iwlwifi should be now W=1 warning free. But otherwise nothing really special this time, business as usual. Major changes: mt76 * Specific Absorption Rate (SAR) support * mt7921: new PCI ids * mt7921: 160 MHz channel support iwlwifi * fix W=1 and sparse warnings * BNJ hardware support * add new killer device ids * support for Time-Aware-SAR (TAS) from the BIOS * Optimized Connectivity Experience (OCE) scan support rtw88 * hardware scan * Specific Absorption Rate (SAR) support ath11k * qca6390/wcn6855: report signal and tx bitrate * qca6390: rfkill support * qca6390/wcn6855: regdb.bin support ath5k * switch to rate table based lookup wilc1000 * spi: reset/enable GPIO support * tag 'wireless-drivers-next-2021-12-23' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next: (148 commits) mt76: mt7921: fix a possible race enabling/disabling runtime-pm wilc1000: Document enable-gpios and reset-gpios properties wilc1000: Add reset/enable GPIO support to SPI driver wilc1000: Convert static "chipid" variable to device-local variable rtw89: 8852a: correct bit definition of dfs_en rtw88: don't consider deep PS mode when transmitting packet ath11k: Fix unexpected return buffer manager error for QCA6390 ath11k: add support of firmware logging for WCN6855 ath11k: Fix napi related hang ath10k: replace strlcpy with strscpy rtw88: support SAR via kernel common API rtw88: 8822c: add ieee80211_ops::hw_scan iwlwifi: mei: wait before mapping the shared area iwlwifi: mei: clear the ownership when the driver goes down iwlwifi: yoyo: fix issue with new DBGI_SRAM region read. iwlwifi: fw: fix some scan kernel-doc iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ iwlwifi: mvm: remove card state notification code iwlwifi: mvm: drop too short packets silently iwlwifi: mvm: fix AUX ROC removal ... ==================== Link: https://lore.kernel.org/r/20211223141108.78808C36AE9@smtp.kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
f2b551fad8
|
@ -32,6 +32,21 @@ properties:
|
|||
clock-names:
|
||||
const: rtc
|
||||
|
||||
enable-gpios:
|
||||
maxItems: 1
|
||||
description: Used by wilc1000-spi to determine the GPIO line
|
||||
connected to the ENABLE line. If specified, reset-gpios
|
||||
must be specified as well as otherwise the driver cannot
|
||||
ensure the timing required between asserting ENABLE
|
||||
and deasserting RESET. This should be declared as an
|
||||
active-high signal.
|
||||
|
||||
reset-gpios:
|
||||
maxItems: 1
|
||||
description: Used by wilc1000-spi to determine the GPIO line
|
||||
connected to the RESET line. This should be declared as an
|
||||
active-low signal.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- interrupts
|
||||
|
@ -40,6 +55,8 @@ additionalProperties: false
|
|||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -51,6 +68,8 @@ examples:
|
|||
interrupts = <27 0>;
|
||||
clocks = <&pck1>;
|
||||
clock-names = "rtc";
|
||||
enable-gpios = <&pioA 5 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&pioA 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1522,7 +1522,7 @@ static struct ath10k_dump_file_data *ath10k_coredump_build(struct ath10k *ar)
|
|||
mutex_lock(&ar->dump_mutex);
|
||||
|
||||
dump_data = (struct ath10k_dump_file_data *)(buf);
|
||||
strlcpy(dump_data->df_magic, "ATH10K-FW-DUMP",
|
||||
strscpy(dump_data->df_magic, "ATH10K-FW-DUMP",
|
||||
sizeof(dump_data->df_magic));
|
||||
dump_data->len = cpu_to_le32(len);
|
||||
|
||||
|
@ -1543,11 +1543,11 @@ static struct ath10k_dump_file_data *ath10k_coredump_build(struct ath10k *ar)
|
|||
dump_data->vht_cap_info = cpu_to_le32(ar->vht_cap_info);
|
||||
dump_data->num_rf_chains = cpu_to_le32(ar->num_rf_chains);
|
||||
|
||||
strlcpy(dump_data->fw_ver, ar->hw->wiphy->fw_version,
|
||||
strscpy(dump_data->fw_ver, ar->hw->wiphy->fw_version,
|
||||
sizeof(dump_data->fw_ver));
|
||||
|
||||
dump_data->kernel_ver_code = 0;
|
||||
strlcpy(dump_data->kernel_ver, init_utsname()->release,
|
||||
strscpy(dump_data->kernel_ver, init_utsname()->release,
|
||||
sizeof(dump_data->kernel_ver));
|
||||
|
||||
dump_data->tv_sec = cpu_to_le64(crash_data->timestamp.tv_sec);
|
||||
|
|
|
@ -175,8 +175,11 @@ static void __ath11k_ahb_ext_irq_disable(struct ath11k_base *ab)
|
|||
|
||||
ath11k_ahb_ext_grp_disable(irq_grp);
|
||||
|
||||
if (irq_grp->napi_enabled) {
|
||||
napi_synchronize(&irq_grp->napi);
|
||||
napi_disable(&irq_grp->napi);
|
||||
irq_grp->napi_enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,7 +303,10 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
|
|||
for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) {
|
||||
struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
|
||||
|
||||
if (!irq_grp->napi_enabled) {
|
||||
napi_enable(&irq_grp->napi);
|
||||
irq_grp->napi_enabled = true;
|
||||
}
|
||||
ath11k_ahb_ext_grp_enable(irq_grp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.target_ce_count = 11,
|
||||
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_ipq8074,
|
||||
.svc_to_ce_map_len = 21,
|
||||
.rfkill_pin = 0,
|
||||
.rfkill_cfg = 0,
|
||||
.rfkill_on_level = 0,
|
||||
.single_pdev_only = false,
|
||||
.rxdma1_enable = true,
|
||||
.num_rxmda_per_pdev = 1,
|
||||
|
@ -84,6 +87,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.num_peers = 512,
|
||||
.supports_suspend = false,
|
||||
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
|
||||
.supports_regdb = false,
|
||||
.fix_l1ss = true,
|
||||
.credit_flow = false,
|
||||
.max_tx_ring = DP_TCL_NUM_RING_MAX,
|
||||
|
@ -91,6 +95,8 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.supports_dynamic_smps_6ghz = false,
|
||||
.alloc_cacheable_memory = true,
|
||||
.wakeup_mhi = false,
|
||||
.supports_rssi_stats = false,
|
||||
.fw_wmi_diag_event = false,
|
||||
},
|
||||
{
|
||||
.hw_rev = ATH11K_HW_IPQ6018_HW10,
|
||||
|
@ -113,6 +119,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.target_ce_count = 11,
|
||||
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_ipq6018,
|
||||
.svc_to_ce_map_len = 19,
|
||||
.rfkill_pin = 0,
|
||||
.rfkill_cfg = 0,
|
||||
.rfkill_on_level = 0,
|
||||
.single_pdev_only = false,
|
||||
.rxdma1_enable = true,
|
||||
.num_rxmda_per_pdev = 1,
|
||||
|
@ -142,6 +151,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.num_peers = 512,
|
||||
.supports_suspend = false,
|
||||
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
|
||||
.supports_regdb = false,
|
||||
.fix_l1ss = true,
|
||||
.credit_flow = false,
|
||||
.max_tx_ring = DP_TCL_NUM_RING_MAX,
|
||||
|
@ -149,6 +159,8 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.supports_dynamic_smps_6ghz = false,
|
||||
.alloc_cacheable_memory = true,
|
||||
.wakeup_mhi = false,
|
||||
.supports_rssi_stats = false,
|
||||
.fw_wmi_diag_event = false,
|
||||
},
|
||||
{
|
||||
.name = "qca6390 hw2.0",
|
||||
|
@ -171,6 +183,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.target_ce_count = 9,
|
||||
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qca6390,
|
||||
.svc_to_ce_map_len = 14,
|
||||
.rfkill_pin = 48,
|
||||
.rfkill_cfg = 0,
|
||||
.rfkill_on_level = 1,
|
||||
.single_pdev_only = true,
|
||||
.rxdma1_enable = false,
|
||||
.num_rxmda_per_pdev = 2,
|
||||
|
@ -199,6 +214,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.num_peers = 512,
|
||||
.supports_suspend = true,
|
||||
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
|
||||
.supports_regdb = true,
|
||||
.fix_l1ss = true,
|
||||
.credit_flow = true,
|
||||
.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
|
||||
|
@ -206,6 +222,8 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.supports_dynamic_smps_6ghz = false,
|
||||
.alloc_cacheable_memory = false,
|
||||
.wakeup_mhi = true,
|
||||
.supports_rssi_stats = true,
|
||||
.fw_wmi_diag_event = true,
|
||||
},
|
||||
{
|
||||
.name = "qcn9074 hw1.0",
|
||||
|
@ -228,6 +246,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.target_ce_count = 9,
|
||||
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qcn9074,
|
||||
.svc_to_ce_map_len = 18,
|
||||
.rfkill_pin = 0,
|
||||
.rfkill_cfg = 0,
|
||||
.rfkill_on_level = 0,
|
||||
.rxdma1_enable = true,
|
||||
.num_rxmda_per_pdev = 1,
|
||||
.rx_mac_buf_ring = false,
|
||||
|
@ -256,6 +277,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.num_peers = 128,
|
||||
.supports_suspend = false,
|
||||
.hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074),
|
||||
.supports_regdb = false,
|
||||
.fix_l1ss = true,
|
||||
.credit_flow = false,
|
||||
.max_tx_ring = DP_TCL_NUM_RING_MAX,
|
||||
|
@ -263,6 +285,8 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.supports_dynamic_smps_6ghz = true,
|
||||
.alloc_cacheable_memory = true,
|
||||
.wakeup_mhi = false,
|
||||
.supports_rssi_stats = false,
|
||||
.fw_wmi_diag_event = false,
|
||||
},
|
||||
{
|
||||
.name = "wcn6855 hw2.0",
|
||||
|
@ -285,6 +309,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.target_ce_count = 9,
|
||||
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qca6390,
|
||||
.svc_to_ce_map_len = 14,
|
||||
.rfkill_pin = 0,
|
||||
.rfkill_cfg = 0,
|
||||
.rfkill_on_level = 0,
|
||||
.single_pdev_only = true,
|
||||
.rxdma1_enable = false,
|
||||
.num_rxmda_per_pdev = 2,
|
||||
|
@ -313,6 +340,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.num_peers = 512,
|
||||
.supports_suspend = true,
|
||||
.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
|
||||
.supports_regdb = true,
|
||||
.fix_l1ss = false,
|
||||
.credit_flow = true,
|
||||
.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
|
||||
|
@ -320,6 +348,8 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.supports_dynamic_smps_6ghz = false,
|
||||
.alloc_cacheable_memory = false,
|
||||
.wakeup_mhi = true,
|
||||
.supports_rssi_stats = true,
|
||||
.fw_wmi_diag_event = true,
|
||||
},
|
||||
{
|
||||
.name = "wcn6855 hw2.1",
|
||||
|
@ -342,6 +372,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.target_ce_count = 9,
|
||||
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qca6390,
|
||||
.svc_to_ce_map_len = 14,
|
||||
.rfkill_pin = 0,
|
||||
.rfkill_cfg = 0,
|
||||
.rfkill_on_level = 0,
|
||||
.single_pdev_only = true,
|
||||
.rxdma1_enable = false,
|
||||
.num_rxmda_per_pdev = 2,
|
||||
|
@ -369,6 +402,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.num_peers = 512,
|
||||
.supports_suspend = true,
|
||||
.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
|
||||
.supports_regdb = true,
|
||||
.fix_l1ss = false,
|
||||
.credit_flow = true,
|
||||
.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
|
||||
|
@ -376,6 +410,8 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|||
.supports_dynamic_smps_6ghz = false,
|
||||
.alloc_cacheable_memory = false,
|
||||
.wakeup_mhi = true,
|
||||
.supports_rssi_stats = true,
|
||||
.fw_wmi_diag_event = true,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -736,10 +772,12 @@ err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int ath11k_core_fetch_board_data_api_1(struct ath11k_base *ab,
|
||||
struct ath11k_board_data *bd)
|
||||
int ath11k_core_fetch_board_data_api_1(struct ath11k_base *ab,
|
||||
struct ath11k_board_data *bd,
|
||||
const char *name)
|
||||
{
|
||||
bd->fw = ath11k_core_firmware_request(ab, ATH11K_DEFAULT_BOARD_FILE);
|
||||
bd->fw = ath11k_core_firmware_request(ab, name);
|
||||
|
||||
if (IS_ERR(bd->fw))
|
||||
return PTR_ERR(bd->fw);
|
||||
|
||||
|
@ -767,7 +805,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
|
|||
goto success;
|
||||
|
||||
ab->bd_api = 1;
|
||||
ret = ath11k_core_fetch_board_data_api_1(ab, bd);
|
||||
ret = ath11k_core_fetch_board_data_api_1(ab, bd, ATH11K_DEFAULT_BOARD_FILE);
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed to fetch board-2.bin or board.bin from %s\n",
|
||||
ab->hw_params.fw.dir);
|
||||
|
@ -779,6 +817,18 @@ success:
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ath11k_core_fetch_regdb(struct ath11k_base *ab, struct ath11k_board_data *bd)
|
||||
{
|
||||
int ret;
|
||||
|
||||
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",
|
||||
ATH11K_REGDB_FILE_NAME, ab->hw_params.fw.dir);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void ath11k_core_stop(struct ath11k_base *ab)
|
||||
{
|
||||
if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags))
|
||||
|
@ -1009,6 +1059,27 @@ err_firmware_stop:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int ath11k_core_rfkill_config(struct ath11k_base *ab)
|
||||
{
|
||||
struct ath11k *ar;
|
||||
int ret = 0, i;
|
||||
|
||||
if (!(ab->target_caps.sys_cap_info & WMI_SYS_CAP_INFO_RFKILL))
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < ab->num_radios; i++) {
|
||||
ar = ab->pdevs[i].ar;
|
||||
|
||||
ret = ath11k_mac_rfkill_config(ar);
|
||||
if (ret && ret != -EOPNOTSUPP) {
|
||||
ath11k_warn(ab, "failed to configure rfkill: %d", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ath11k_core_qmi_firmware_ready(struct ath11k_base *ab)
|
||||
{
|
||||
int ret;
|
||||
|
@ -1055,6 +1126,13 @@ int ath11k_core_qmi_firmware_ready(struct ath11k_base *ab)
|
|||
goto err_core_stop;
|
||||
}
|
||||
ath11k_hif_irq_enable(ab);
|
||||
|
||||
ret = ath11k_core_rfkill_config(ab);
|
||||
if (ret && ret != -EOPNOTSUPP) {
|
||||
ath11k_err(ab, "failed to config rfkill: %d\n", ret);
|
||||
goto err_core_stop;
|
||||
}
|
||||
|
||||
mutex_unlock(&ab->core_lock);
|
||||
|
||||
return 0;
|
||||
|
@ -1120,6 +1198,7 @@ void ath11k_core_halt(struct ath11k *ar)
|
|||
cancel_delayed_work_sync(&ar->scan.timeout);
|
||||
cancel_work_sync(&ar->regd_update_work);
|
||||
cancel_work_sync(&ab->update_11d_work);
|
||||
cancel_work_sync(&ab->rfkill_work);
|
||||
|
||||
rcu_assign_pointer(ab->pdevs_active[ar->pdev_idx], NULL);
|
||||
synchronize_rcu();
|
||||
|
@ -1127,6 +1206,28 @@ void ath11k_core_halt(struct ath11k *ar)
|
|||
idr_init(&ar->txmgmt_idr);
|
||||
}
|
||||
|
||||
static void ath11k_rfkill_work(struct work_struct *work)
|
||||
{
|
||||
struct ath11k_base *ab = container_of(work, struct ath11k_base, rfkill_work);
|
||||
struct ath11k *ar;
|
||||
bool rfkill_radio_on;
|
||||
int i;
|
||||
|
||||
spin_lock_bh(&ab->base_lock);
|
||||
rfkill_radio_on = ab->rfkill_radio_on;
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
|
||||
for (i = 0; i < ab->num_radios; i++) {
|
||||
ar = ab->pdevs[i].ar;
|
||||
if (!ar)
|
||||
continue;
|
||||
|
||||
/* notify cfg80211 radio state change */
|
||||
ath11k_mac_rfkill_enable_radio(ar, rfkill_radio_on);
|
||||
wiphy_rfkill_set_hw_state(ar->hw->wiphy, !rfkill_radio_on);
|
||||
}
|
||||
}
|
||||
|
||||
static void ath11k_update_11d(struct work_struct *work)
|
||||
{
|
||||
struct ath11k_base *ab = container_of(work, struct ath11k_base, update_11d_work);
|
||||
|
@ -1333,6 +1434,7 @@ struct ath11k_base *ath11k_core_alloc(struct device *dev, size_t priv_size,
|
|||
init_waitqueue_head(&ab->qmi.cold_boot_waitq);
|
||||
INIT_WORK(&ab->restart_work, ath11k_core_restart);
|
||||
INIT_WORK(&ab->update_11d_work, ath11k_update_11d);
|
||||
INIT_WORK(&ab->rfkill_work, ath11k_rfkill_work);
|
||||
timer_setup(&ab->rx_replenish_retry, ath11k_ce_rx_replenish_retry, 0);
|
||||
init_completion(&ab->htc_suspend);
|
||||
init_completion(&ab->wow.wakeup_completed);
|
||||
|
|
|
@ -142,6 +142,7 @@ struct ath11k_ext_irq_grp {
|
|||
u32 num_irq;
|
||||
u32 grp_id;
|
||||
u64 timestamp;
|
||||
bool napi_enabled;
|
||||
struct napi_struct napi;
|
||||
struct net_device napi_ndev;
|
||||
};
|
||||
|
@ -382,10 +383,13 @@ struct ath11k_sta {
|
|||
struct work_struct update_wk;
|
||||
struct work_struct set_4addr_wk;
|
||||
struct rate_info txrate;
|
||||
u32 peer_nss;
|
||||
struct rate_info last_txrate;
|
||||
u64 rx_duration;
|
||||
u64 tx_duration;
|
||||
u8 rssi_comb;
|
||||
s8 rssi_beacon;
|
||||
s8 chain_signal[IEEE80211_MAX_CHAINS];
|
||||
struct ath11k_htt_tx_stats *tx_stats;
|
||||
struct ath11k_rx_peer_stats *rx_stats;
|
||||
|
||||
|
@ -416,6 +420,10 @@ enum ath11k_state {
|
|||
/* Antenna noise floor */
|
||||
#define ATH11K_DEFAULT_NOISE_FLOOR -95
|
||||
|
||||
#define ATH11K_INVALID_RSSI_FULL -1
|
||||
|
||||
#define ATH11K_INVALID_RSSI_EMPTY -128
|
||||
|
||||
struct ath11k_fw_stats {
|
||||
struct dentry *debugfs_fwstats;
|
||||
u32 pdev_id;
|
||||
|
@ -736,7 +744,6 @@ struct ath11k_base {
|
|||
u32 wlan_init_status;
|
||||
int irq_num[ATH11K_IRQ_NUM_MAX];
|
||||
struct ath11k_ext_irq_grp ext_irq_grp[ATH11K_EXT_IRQ_GRP_NUM_MAX];
|
||||
struct napi_struct *napi;
|
||||
struct ath11k_targ_cap target_caps;
|
||||
u32 ext_service_bitmap[WMI_SERVICE_EXT_BM_SIZE];
|
||||
bool pdevs_macaddr_valid;
|
||||
|
@ -779,6 +786,10 @@ struct ath11k_base {
|
|||
|
||||
struct ath11k_dbring_cap *db_caps;
|
||||
u32 num_db_cap;
|
||||
struct work_struct rfkill_work;
|
||||
|
||||
/* true means radio is on */
|
||||
bool rfkill_radio_on;
|
||||
|
||||
/* To synchronize 11d scan vdev id */
|
||||
struct mutex vdev_id_11d_lock;
|
||||
|
@ -969,6 +980,10 @@ struct ath11k_base *ath11k_core_alloc(struct device *dev, size_t priv_size,
|
|||
void ath11k_core_free(struct ath11k_base *ath11k);
|
||||
int ath11k_core_fetch_bdf(struct ath11k_base *ath11k,
|
||||
struct ath11k_board_data *bd);
|
||||
int ath11k_core_fetch_regdb(struct ath11k_base *ab, struct ath11k_board_data *bd);
|
||||
int ath11k_core_fetch_board_data_api_1(struct ath11k_base *ab,
|
||||
struct ath11k_board_data *bd,
|
||||
const char *name);
|
||||
void ath11k_core_free_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd);
|
||||
int ath11k_core_check_dt(struct ath11k_base *ath11k);
|
||||
|
||||
|
|
|
@ -128,6 +128,11 @@ void ath11k_debugfs_fw_stats_process(struct ath11k_base *ab, struct sk_buff *skb
|
|||
goto complete;
|
||||
}
|
||||
|
||||
if (stats.stats_id == WMI_REQUEST_RSSI_PER_CHAIN_STAT) {
|
||||
ar->debug.fw_stats_done = true;
|
||||
goto complete;
|
||||
}
|
||||
|
||||
if (stats.stats_id == WMI_REQUEST_VDEV_STAT) {
|
||||
if (list_empty(&stats.vdevs)) {
|
||||
ath11k_warn(ab, "empty vdev stats");
|
||||
|
@ -231,6 +236,38 @@ static int ath11k_debugfs_fw_stats_request(struct ath11k *ar,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ath11k_debugfs_get_fw_stats(struct ath11k *ar, u32 pdev_id,
|
||||
u32 vdev_id, u32 stats_id)
|
||||
{
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
struct stats_request_params req_param;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
if (ar->state != ATH11K_STATE_ON) {
|
||||
ret = -ENETDOWN;
|
||||
goto err_unlock;
|
||||
}
|
||||
|
||||
req_param.pdev_id = pdev_id;
|
||||
req_param.vdev_id = vdev_id;
|
||||
req_param.stats_id = stats_id;
|
||||
|
||||
ret = ath11k_debugfs_fw_stats_request(ar, &req_param);
|
||||
if (ret)
|
||||
ath11k_warn(ab, "failed to request fw stats: %d\n", ret);
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_WMI,
|
||||
"debug get fw stat pdev id %d vdev id %d stats id 0x%x\n",
|
||||
pdev_id, vdev_id, stats_id);
|
||||
|
||||
err_unlock:
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ath11k_open_pdev_stats(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct ath11k *ar = inode->i_private;
|
||||
|
|
|
@ -117,6 +117,8 @@ void ath11k_debugfs_unregister(struct ath11k *ar);
|
|||
void ath11k_debugfs_fw_stats_process(struct ath11k_base *ab, struct sk_buff *skb);
|
||||
|
||||
void ath11k_debugfs_fw_stats_init(struct ath11k *ar);
|
||||
int ath11k_debugfs_get_fw_stats(struct ath11k *ar, u32 pdev_id,
|
||||
u32 vdev_id, u32 stats_id);
|
||||
|
||||
static inline bool ath11k_debugfs_is_pktlog_lite_mode_enabled(struct ath11k *ar)
|
||||
{
|
||||
|
@ -216,6 +218,12 @@ static inline int ath11k_debugfs_rx_filter(struct ath11k *ar)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int ath11k_debugfs_get_fw_stats(struct ath11k *ar,
|
||||
u32 pdev_id, u32 vdev_id, u32 stats_id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_MAC80211_DEBUGFS*/
|
||||
|
||||
#endif /* _ATH11K_DEBUGFS_H_ */
|
||||
|
|
|
@ -126,85 +126,9 @@ void ath11k_debugfs_sta_add_tx_stats(struct ath11k_sta *arsta,
|
|||
}
|
||||
|
||||
void ath11k_debugfs_sta_update_txcompl(struct ath11k *ar,
|
||||
struct sk_buff *msdu,
|
||||
struct hal_tx_status *ts)
|
||||
{
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
struct ath11k_per_peer_tx_stats *peer_stats = &ar->cached_stats;
|
||||
enum hal_tx_rate_stats_pkt_type pkt_type;
|
||||
enum hal_tx_rate_stats_sgi sgi;
|
||||
enum hal_tx_rate_stats_bw bw;
|
||||
struct ath11k_peer *peer;
|
||||
struct ath11k_sta *arsta;
|
||||
struct ieee80211_sta *sta;
|
||||
u16 rate;
|
||||
u8 rate_idx = 0;
|
||||
int ret;
|
||||
u8 mcs;
|
||||
|
||||
rcu_read_lock();
|
||||
spin_lock_bh(&ab->base_lock);
|
||||
peer = ath11k_peer_find_by_id(ab, ts->peer_id);
|
||||
if (!peer || !peer->sta) {
|
||||
ath11k_warn(ab, "failed to find the peer\n");
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
rcu_read_unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
sta = peer->sta;
|
||||
arsta = (struct ath11k_sta *)sta->drv_priv;
|
||||
|
||||
memset(&arsta->txrate, 0, sizeof(arsta->txrate));
|
||||
pkt_type = FIELD_GET(HAL_TX_RATE_STATS_INFO0_PKT_TYPE,
|
||||
ts->rate_stats);
|
||||
mcs = FIELD_GET(HAL_TX_RATE_STATS_INFO0_MCS,
|
||||
ts->rate_stats);
|
||||
sgi = FIELD_GET(HAL_TX_RATE_STATS_INFO0_SGI,
|
||||
ts->rate_stats);
|
||||
bw = FIELD_GET(HAL_TX_RATE_STATS_INFO0_BW, ts->rate_stats);
|
||||
|
||||
if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11A ||
|
||||
pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11B) {
|
||||
ret = ath11k_mac_hw_ratecode_to_legacy_rate(mcs,
|
||||
pkt_type,
|
||||
&rate_idx,
|
||||
&rate);
|
||||
if (ret < 0)
|
||||
goto err_out;
|
||||
arsta->txrate.legacy = rate;
|
||||
} else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11N) {
|
||||
if (mcs > 7) {
|
||||
ath11k_warn(ab, "Invalid HT mcs index %d\n", mcs);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
arsta->txrate.mcs = mcs + 8 * (arsta->last_txrate.nss - 1);
|
||||
arsta->txrate.flags = RATE_INFO_FLAGS_MCS;
|
||||
if (sgi)
|
||||
arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
|
||||
} else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AC) {
|
||||
if (mcs > 9) {
|
||||
ath11k_warn(ab, "Invalid VHT mcs index %d\n", mcs);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
arsta->txrate.mcs = mcs;
|
||||
arsta->txrate.flags = RATE_INFO_FLAGS_VHT_MCS;
|
||||
if (sgi)
|
||||
arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
|
||||
} else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AX) {
|
||||
/* TODO */
|
||||
}
|
||||
|
||||
arsta->txrate.nss = arsta->last_txrate.nss;
|
||||
arsta->txrate.bw = ath11k_mac_bw_to_mac80211_bw(bw);
|
||||
|
||||
ath11k_debugfs_sta_add_tx_stats(arsta, peer_stats, rate_idx);
|
||||
|
||||
err_out:
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
rcu_read_unlock();
|
||||
ath11k_dp_tx_update_txcompl(ar, ts);
|
||||
}
|
||||
|
||||
static ssize_t ath11k_dbg_sta_dump_tx_stats(struct file *file,
|
||||
|
|
|
@ -19,7 +19,6 @@ void ath11k_debugfs_sta_add_tx_stats(struct ath11k_sta *arsta,
|
|||
struct ath11k_per_peer_tx_stats *peer_stats,
|
||||
u8 legacy_rate_idx);
|
||||
void ath11k_debugfs_sta_update_txcompl(struct ath11k *ar,
|
||||
struct sk_buff *msdu,
|
||||
struct hal_tx_status *ts);
|
||||
|
||||
#else /* CONFIG_ATH11K_DEBUGFS */
|
||||
|
@ -34,7 +33,6 @@ ath11k_debugfs_sta_add_tx_stats(struct ath11k_sta *arsta,
|
|||
}
|
||||
|
||||
static inline void ath11k_debugfs_sta_update_txcompl(struct ath11k *ar,
|
||||
struct sk_buff *msdu,
|
||||
struct hal_tx_status *ts)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1360,25 +1360,6 @@ int ath11k_dp_htt_tlv_iter(struct ath11k_base *ab, const void *ptr, size_t len,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline u32 ath11k_he_gi_to_nl80211_he_gi(u8 sgi)
|
||||
{
|
||||
u32 ret = 0;
|
||||
|
||||
switch (sgi) {
|
||||
case RX_MSDU_START_SGI_0_8_US:
|
||||
ret = NL80211_RATE_INFO_HE_GI_0_8;
|
||||
break;
|
||||
case RX_MSDU_START_SGI_1_6_US:
|
||||
ret = NL80211_RATE_INFO_HE_GI_1_6;
|
||||
break;
|
||||
case RX_MSDU_START_SGI_3_2_US:
|
||||
ret = NL80211_RATE_INFO_HE_GI_3_2;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
ath11k_update_per_peer_tx_stats(struct ath11k *ar,
|
||||
struct htt_ppdu_stats *ppdu_stats, u8 user)
|
||||
|
@ -1497,14 +1478,15 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar,
|
|||
arsta->txrate.mcs = mcs;
|
||||
arsta->txrate.flags = RATE_INFO_FLAGS_HE_MCS;
|
||||
arsta->txrate.he_dcm = dcm;
|
||||
arsta->txrate.he_gi = ath11k_he_gi_to_nl80211_he_gi(sgi);
|
||||
arsta->txrate.he_ru_alloc = ath11k_he_ru_tones_to_nl80211_he_ru_alloc(
|
||||
(user_rate->ru_end -
|
||||
arsta->txrate.he_gi = ath11k_mac_he_gi_to_nl80211_he_gi(sgi);
|
||||
arsta->txrate.he_ru_alloc = ath11k_mac_phy_he_ru_to_nl80211_he_ru_alloc
|
||||
((user_rate->ru_end -
|
||||
user_rate->ru_start) + 1);
|
||||
break;
|
||||
}
|
||||
|
||||
arsta->txrate.nss = nss;
|
||||
|
||||
arsta->txrate.bw = ath11k_mac_bw_to_mac80211_bw(bw);
|
||||
arsta->tx_duration += tx_duration;
|
||||
memcpy(&arsta->last_txrate, &arsta->txrate, sizeof(struct rate_info));
|
||||
|
@ -2384,7 +2366,7 @@ static void ath11k_dp_rx_h_rate(struct ath11k *ar, struct hal_rx_desc *rx_desc,
|
|||
}
|
||||
rx_status->encoding = RX_ENC_HE;
|
||||
rx_status->nss = nss;
|
||||
rx_status->he_gi = ath11k_he_gi_to_nl80211_he_gi(sgi);
|
||||
rx_status->he_gi = ath11k_mac_he_gi_to_nl80211_he_gi(sgi);
|
||||
rx_status->bw = ath11k_mac_bw_to_mac80211_bw(bw);
|
||||
break;
|
||||
}
|
||||
|
@ -2768,6 +2750,7 @@ static void ath11k_dp_rx_update_peer_stats(struct ath11k_sta *arsta,
|
|||
{
|
||||
struct ath11k_rx_peer_stats *rx_stats = arsta->rx_stats;
|
||||
u32 num_msdu;
|
||||
int i;
|
||||
|
||||
if (!rx_stats)
|
||||
return;
|
||||
|
@ -2829,6 +2812,13 @@ static void ath11k_dp_rx_update_peer_stats(struct ath11k_sta *arsta,
|
|||
rx_stats->ru_alloc_cnt[ppdu_info->ru_alloc] += num_msdu;
|
||||
|
||||
arsta->rssi_comb = ppdu_info->rssi_comb;
|
||||
|
||||
BUILD_BUG_ON(ARRAY_SIZE(arsta->chain_signal) >
|
||||
ARRAY_SIZE(ppdu_info->rssi_chain_pri20));
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(arsta->chain_signal); i++)
|
||||
arsta->chain_signal[i] = ppdu_info->rssi_chain_pri20[i];
|
||||
|
||||
rx_stats->rx_duration += ppdu_info->rx_duration;
|
||||
arsta->rx_duration = rx_stats->rx_duration;
|
||||
}
|
||||
|
@ -3847,7 +3837,7 @@ int ath11k_dp_process_rx_err(struct ath11k_base *ab, struct napi_struct *napi,
|
|||
ath11k_hal_rx_msdu_link_info_get(link_desc_va, &num_msdus, msdu_cookies,
|
||||
&rbm);
|
||||
if (rbm != HAL_RX_BUF_RBM_WBM_IDLE_DESC_LIST &&
|
||||
rbm != ab->hw_params.hal_params->rx_buf_rbm) {
|
||||
rbm != HAL_RX_BUF_RBM_SW3_BM) {
|
||||
ab->soc_stats.invalid_rbm++;
|
||||
ath11k_warn(ab, "invalid return buffer manager %d\n", rbm);
|
||||
ath11k_dp_rx_link_desc_return(ab, desc,
|
||||
|
|
|
@ -415,6 +415,105 @@ static void ath11k_dp_tx_cache_peer_stats(struct ath11k *ar,
|
|||
}
|
||||
}
|
||||
|
||||
void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts)
|
||||
{
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
struct ath11k_per_peer_tx_stats *peer_stats = &ar->cached_stats;
|
||||
enum hal_tx_rate_stats_pkt_type pkt_type;
|
||||
enum hal_tx_rate_stats_sgi sgi;
|
||||
enum hal_tx_rate_stats_bw bw;
|
||||
struct ath11k_peer *peer;
|
||||
struct ath11k_sta *arsta;
|
||||
struct ieee80211_sta *sta;
|
||||
u16 rate, ru_tones;
|
||||
u8 mcs, rate_idx, ofdma;
|
||||
int ret;
|
||||
|
||||
spin_lock_bh(&ab->base_lock);
|
||||
peer = ath11k_peer_find_by_id(ab, ts->peer_id);
|
||||
if (!peer || !peer->sta) {
|
||||
ath11k_dbg(ab, ATH11K_DBG_DP_TX,
|
||||
"failed to find the peer by id %u\n", ts->peer_id);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
sta = peer->sta;
|
||||
arsta = (struct ath11k_sta *)sta->drv_priv;
|
||||
|
||||
memset(&arsta->txrate, 0, sizeof(arsta->txrate));
|
||||
pkt_type = FIELD_GET(HAL_TX_RATE_STATS_INFO0_PKT_TYPE,
|
||||
ts->rate_stats);
|
||||
mcs = FIELD_GET(HAL_TX_RATE_STATS_INFO0_MCS,
|
||||
ts->rate_stats);
|
||||
sgi = FIELD_GET(HAL_TX_RATE_STATS_INFO0_SGI,
|
||||
ts->rate_stats);
|
||||
bw = FIELD_GET(HAL_TX_RATE_STATS_INFO0_BW, ts->rate_stats);
|
||||
ru_tones = FIELD_GET(HAL_TX_RATE_STATS_INFO0_TONES_IN_RU, ts->rate_stats);
|
||||
ofdma = FIELD_GET(HAL_TX_RATE_STATS_INFO0_OFDMA_TX, ts->rate_stats);
|
||||
|
||||
/* This is to prefer choose the real NSS value arsta->last_txrate.nss,
|
||||
* if it is invalid, then choose the NSS value while assoc.
|
||||
*/
|
||||
if (arsta->last_txrate.nss)
|
||||
arsta->txrate.nss = arsta->last_txrate.nss;
|
||||
else
|
||||
arsta->txrate.nss = arsta->peer_nss;
|
||||
|
||||
if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11A ||
|
||||
pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11B) {
|
||||
ret = ath11k_mac_hw_ratecode_to_legacy_rate(mcs,
|
||||
pkt_type,
|
||||
&rate_idx,
|
||||
&rate);
|
||||
if (ret < 0)
|
||||
goto err_out;
|
||||
arsta->txrate.legacy = rate;
|
||||
} else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11N) {
|
||||
if (mcs > 7) {
|
||||
ath11k_warn(ab, "Invalid HT mcs index %d\n", mcs);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
if (arsta->txrate.nss != 0)
|
||||
arsta->txrate.mcs = mcs + 8 * (arsta->txrate.nss - 1);
|
||||
arsta->txrate.flags = RATE_INFO_FLAGS_MCS;
|
||||
if (sgi)
|
||||
arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
|
||||
} else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AC) {
|
||||
if (mcs > 9) {
|
||||
ath11k_warn(ab, "Invalid VHT mcs index %d\n", mcs);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
arsta->txrate.mcs = mcs;
|
||||
arsta->txrate.flags = RATE_INFO_FLAGS_VHT_MCS;
|
||||
if (sgi)
|
||||
arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
|
||||
} else if (pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AX) {
|
||||
if (mcs > 11) {
|
||||
ath11k_warn(ab, "Invalid HE mcs index %d\n", mcs);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
arsta->txrate.mcs = mcs;
|
||||
arsta->txrate.flags = RATE_INFO_FLAGS_HE_MCS;
|
||||
arsta->txrate.he_gi = ath11k_mac_he_gi_to_nl80211_he_gi(sgi);
|
||||
}
|
||||
|
||||
arsta->txrate.bw = ath11k_mac_bw_to_mac80211_bw(bw);
|
||||
if (ofdma && pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AX) {
|
||||
arsta->txrate.bw = RATE_INFO_BW_HE_RU;
|
||||
arsta->txrate.he_ru_alloc =
|
||||
ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(ru_tones);
|
||||
}
|
||||
|
||||
if (ath11k_debugfs_is_extd_tx_stats_enabled(ar))
|
||||
ath11k_debugfs_sta_add_tx_stats(arsta, peer_stats, rate_idx);
|
||||
|
||||
err_out:
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
}
|
||||
|
||||
static void ath11k_dp_tx_complete_msdu(struct ath11k *ar,
|
||||
struct sk_buff *msdu,
|
||||
struct hal_tx_status *ts)
|
||||
|
@ -460,7 +559,8 @@ static void ath11k_dp_tx_complete_msdu(struct ath11k *ar,
|
|||
(info->flags & IEEE80211_TX_CTL_NO_ACK))
|
||||
info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;
|
||||
|
||||
if (unlikely(ath11k_debugfs_is_extd_tx_stats_enabled(ar))) {
|
||||
if (unlikely(ath11k_debugfs_is_extd_tx_stats_enabled(ar)) ||
|
||||
ab->hw_params.single_pdev_only) {
|
||||
if (ts->flags & HAL_TX_STATUS_FLAGS_FIRST_MSDU) {
|
||||
if (ar->last_ppdu_id == 0) {
|
||||
ar->last_ppdu_id = ts->ppdu_id;
|
||||
|
@ -468,12 +568,12 @@ static void ath11k_dp_tx_complete_msdu(struct ath11k *ar,
|
|||
ar->cached_ppdu_id == ar->last_ppdu_id) {
|
||||
ar->cached_ppdu_id = ar->last_ppdu_id;
|
||||
ar->cached_stats.is_ampdu = true;
|
||||
ath11k_debugfs_sta_update_txcompl(ar, msdu, ts);
|
||||
ath11k_dp_tx_update_txcompl(ar, ts);
|
||||
memset(&ar->cached_stats, 0,
|
||||
sizeof(struct ath11k_per_peer_tx_stats));
|
||||
} else {
|
||||
ar->cached_stats.is_ampdu = false;
|
||||
ath11k_debugfs_sta_update_txcompl(ar, msdu, ts);
|
||||
ath11k_dp_tx_update_txcompl(ar, ts);
|
||||
memset(&ar->cached_stats, 0,
|
||||
sizeof(struct ath11k_per_peer_tx_stats));
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ struct ath11k_dp_htt_wbm_tx_status {
|
|||
int ack_rssi;
|
||||
};
|
||||
|
||||
void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts);
|
||||
int ath11k_dp_tx_htt_h2t_ver_req_msg(struct ath11k_base *ab);
|
||||
int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
|
||||
struct ath11k_sta *arsta, struct sk_buff *skb);
|
||||
|
|
|
@ -371,7 +371,7 @@ int ath11k_hal_wbm_desc_parse_err(struct ath11k_base *ab, void *desc,
|
|||
|
||||
ret_buf_mgr = FIELD_GET(BUFFER_ADDR_INFO1_RET_BUF_MGR,
|
||||
wbm_desc->buf_addr_info.info1);
|
||||
if (ret_buf_mgr != ab->hw_params.hal_params->rx_buf_rbm) {
|
||||
if (ret_buf_mgr != HAL_RX_BUF_RBM_SW3_BM) {
|
||||
ab->soc_stats.invalid_rbm++;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -1038,7 +1038,9 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,
|
|||
|
||||
ru_tones = FIELD_GET(HAL_RX_HE_SIG_B1_MU_INFO_INFO0_RU_ALLOCATION,
|
||||
info0);
|
||||
ppdu_info->ru_alloc = ath11k_he_ru_tones_to_nl80211_he_ru_alloc(ru_tones);
|
||||
ppdu_info->ru_alloc =
|
||||
ath11k_mac_phy_he_ru_to_nl80211_he_ru_alloc(ru_tones);
|
||||
|
||||
ppdu_info->reception_type = HAL_RX_RECEPTION_TYPE_MU_MIMO;
|
||||
break;
|
||||
}
|
||||
|
@ -1079,6 +1081,9 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,
|
|||
break;
|
||||
}
|
||||
case HAL_PHYRX_RSSI_LEGACY: {
|
||||
int i;
|
||||
bool db2dbm = test_bit(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT,
|
||||
ab->wmi_ab.svc_map);
|
||||
struct hal_rx_phyrx_rssi_legacy_info *rssi =
|
||||
(struct hal_rx_phyrx_rssi_legacy_info *)tlv_data;
|
||||
|
||||
|
@ -1089,6 +1094,14 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,
|
|||
ppdu_info->rssi_comb =
|
||||
FIELD_GET(HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO1_RSSI_COMB,
|
||||
__le32_to_cpu(rssi->info0));
|
||||
|
||||
if (db2dbm) {
|
||||
for (i = 0; i < ARRAY_SIZE(rssi->preamble); i++) {
|
||||
ppdu_info->rssi_chain_pri20[i] =
|
||||
le32_get_bits(rssi->preamble[i].rssi_2040,
|
||||
HAL_RX_PHYRX_RSSI_PREAMBLE_PRI20);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case HAL_RX_MPDU_START: {
|
||||
|
|
|
@ -112,6 +112,7 @@ struct hal_rx_mon_ppdu_info {
|
|||
u8 ldpc;
|
||||
u8 beamformed;
|
||||
u8 rssi_comb;
|
||||
u8 rssi_chain_pri20[HAL_RX_MAX_NSS];
|
||||
u8 tid;
|
||||
u8 dcm;
|
||||
u8 ru_alloc;
|
||||
|
@ -262,8 +263,17 @@ struct hal_rx_he_sig_b2_ofdma_info {
|
|||
|
||||
#define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO1_RSSI_COMB GENMASK(15, 8)
|
||||
|
||||
#define HAL_RX_PHYRX_RSSI_PREAMBLE_PRI20 GENMASK(7, 0)
|
||||
|
||||
struct hal_rx_phyrx_chain_rssi {
|
||||
__le32 rssi_2040;
|
||||
__le32 rssi_80;
|
||||
} __packed;
|
||||
|
||||
struct hal_rx_phyrx_rssi_legacy_info {
|
||||
__le32 rsvd[35];
|
||||
__le32 rsvd[3];
|
||||
struct hal_rx_phyrx_chain_rssi pre_rssi[HAL_RX_MAX_NSS];
|
||||
struct hal_rx_phyrx_chain_rssi preamble[HAL_RX_MAX_NSS];
|
||||
__le32 info0;
|
||||
} __packed;
|
||||
|
||||
|
@ -353,33 +363,6 @@ ath11k_hal_rx_parse_mon_status(struct ath11k_base *ab,
|
|||
struct hal_rx_mon_ppdu_info *ppdu_info,
|
||||
struct sk_buff *skb);
|
||||
|
||||
static inline u32 ath11k_he_ru_tones_to_nl80211_he_ru_alloc(u16 ru_tones)
|
||||
{
|
||||
u32 ret = 0;
|
||||
|
||||
switch (ru_tones) {
|
||||
case RU_26:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_26;
|
||||
break;
|
||||
case RU_52:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_52;
|
||||
break;
|
||||
case RU_106:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_106;
|
||||
break;
|
||||
case RU_242:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_242;
|
||||
break;
|
||||
case RU_484:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_484;
|
||||
break;
|
||||
case RU_996:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_996;
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_0 0xDDBEEF
|
||||
#define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_1 0xADBEEF
|
||||
#define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_2 0xBDBEEF
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define ATH11K_DEFAULT_CAL_FILE "caldata.bin"
|
||||
#define ATH11K_AMSS_FILE "amss.bin"
|
||||
#define ATH11K_M3_FILE "m3.bin"
|
||||
#define ATH11K_REGDB_FILE_NAME "regdb.bin"
|
||||
|
||||
enum ath11k_hw_rate_cck {
|
||||
ATH11K_HW_RATE_CCK_LP_11M = 0,
|
||||
|
@ -151,6 +152,9 @@ struct ath11k_hw_params {
|
|||
u32 svc_to_ce_map_len;
|
||||
|
||||
bool single_pdev_only;
|
||||
u32 rfkill_pin;
|
||||
u32 rfkill_cfg;
|
||||
u32 rfkill_on_level;
|
||||
|
||||
bool rxdma1_enable;
|
||||
int num_rxmda_per_pdev;
|
||||
|
@ -178,6 +182,7 @@ struct ath11k_hw_params {
|
|||
u32 num_peers;
|
||||
bool supports_suspend;
|
||||
u32 hal_desc_sz;
|
||||
bool supports_regdb;
|
||||
bool fix_l1ss;
|
||||
bool credit_flow;
|
||||
u8 max_tx_ring;
|
||||
|
@ -185,6 +190,8 @@ struct ath11k_hw_params {
|
|||
bool supports_dynamic_smps_6ghz;
|
||||
bool alloc_cacheable_memory;
|
||||
bool wakeup_mhi;
|
||||
bool supports_rssi_stats;
|
||||
bool fw_wmi_diag_event;
|
||||
};
|
||||
|
||||
struct ath11k_hw_ops {
|
||||
|
|
|
@ -246,6 +246,93 @@ static const u32 ath11k_smps_map[] = {
|
|||
static int ath11k_start_vdev_delay(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif);
|
||||
|
||||
enum nl80211_he_ru_alloc ath11k_mac_phy_he_ru_to_nl80211_he_ru_alloc(u16 ru_phy)
|
||||
{
|
||||
enum nl80211_he_ru_alloc ret;
|
||||
|
||||
switch (ru_phy) {
|
||||
case RU_26:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_26;
|
||||
break;
|
||||
case RU_52:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_52;
|
||||
break;
|
||||
case RU_106:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_106;
|
||||
break;
|
||||
case RU_242:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_242;
|
||||
break;
|
||||
case RU_484:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_484;
|
||||
break;
|
||||
case RU_996:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_996;
|
||||
break;
|
||||
default:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_26;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
enum nl80211_he_ru_alloc ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(u16 ru_tones)
|
||||
{
|
||||
enum nl80211_he_ru_alloc ret;
|
||||
|
||||
switch (ru_tones) {
|
||||
case 26:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_26;
|
||||
break;
|
||||
case 52:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_52;
|
||||
break;
|
||||
case 106:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_106;
|
||||
break;
|
||||
case 242:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_242;
|
||||
break;
|
||||
case 484:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_484;
|
||||
break;
|
||||
case 996:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_996;
|
||||
break;
|
||||
case (996 * 2):
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_2x996;
|
||||
break;
|
||||
default:
|
||||
ret = NL80211_RATE_INFO_HE_RU_ALLOC_26;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
enum nl80211_he_gi ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi)
|
||||
{
|
||||
enum nl80211_he_gi ret;
|
||||
|
||||
switch (sgi) {
|
||||
case RX_MSDU_START_SGI_0_8_US:
|
||||
ret = NL80211_RATE_INFO_HE_GI_0_8;
|
||||
break;
|
||||
case RX_MSDU_START_SGI_1_6_US:
|
||||
ret = NL80211_RATE_INFO_HE_GI_1_6;
|
||||
break;
|
||||
case RX_MSDU_START_SGI_3_2_US:
|
||||
ret = NL80211_RATE_INFO_HE_GI_3_2;
|
||||
break;
|
||||
default:
|
||||
ret = NL80211_RATE_INFO_HE_GI_0_8;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
u8 ath11k_mac_bw_to_mac80211_bw(u8 bw)
|
||||
{
|
||||
u8 ret = 0;
|
||||
|
@ -2541,8 +2628,12 @@ static void ath11k_peer_assoc_prepare(struct ath11k *ar,
|
|||
struct peer_assoc_params *arg,
|
||||
bool reassoc)
|
||||
{
|
||||
struct ath11k_sta *arsta;
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
arsta = (struct ath11k_sta *)sta->drv_priv;
|
||||
|
||||
memset(arg, 0, sizeof(*arg));
|
||||
|
||||
reinit_completion(&ar->peer_assoc_done);
|
||||
|
@ -2559,6 +2650,8 @@ static void ath11k_peer_assoc_prepare(struct ath11k *ar,
|
|||
ath11k_peer_assoc_h_qos(ar, vif, sta, arg);
|
||||
ath11k_peer_assoc_h_smps(sta, arg);
|
||||
|
||||
arsta->peer_nss = arg->peer_nss;
|
||||
|
||||
/* TODO: amsdu_disable req? */
|
||||
}
|
||||
|
||||
|
@ -5478,6 +5571,63 @@ static int ath11k_mac_mgmt_tx(struct ath11k *ar, struct sk_buff *skb,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ath11k_mac_rfkill_config(struct ath11k *ar)
|
||||
{
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
u32 param;
|
||||
int ret;
|
||||
|
||||
if (ab->hw_params.rfkill_pin == 0)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC,
|
||||
"mac rfkill_pin %d rfkill_cfg %d rfkill_on_level %d",
|
||||
ab->hw_params.rfkill_pin, ab->hw_params.rfkill_cfg,
|
||||
ab->hw_params.rfkill_on_level);
|
||||
|
||||
param = FIELD_PREP(WMI_RFKILL_CFG_RADIO_LEVEL,
|
||||
ab->hw_params.rfkill_on_level) |
|
||||
FIELD_PREP(WMI_RFKILL_CFG_GPIO_PIN_NUM,
|
||||
ab->hw_params.rfkill_pin) |
|
||||
FIELD_PREP(WMI_RFKILL_CFG_PIN_AS_GPIO,
|
||||
ab->hw_params.rfkill_cfg);
|
||||
|
||||
ret = ath11k_wmi_pdev_set_param(ar, WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
|
||||
param, ar->pdev->pdev_id);
|
||||
if (ret) {
|
||||
ath11k_warn(ab,
|
||||
"failed to set rfkill config 0x%x: %d\n",
|
||||
param, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ath11k_mac_rfkill_enable_radio(struct ath11k *ar, bool enable)
|
||||
{
|
||||
enum wmi_rfkill_enable_radio param;
|
||||
int ret;
|
||||
|
||||
if (enable)
|
||||
param = WMI_RFKILL_ENABLE_RADIO_ON;
|
||||
else
|
||||
param = WMI_RFKILL_ENABLE_RADIO_OFF;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac %d rfkill enable %d",
|
||||
ar->pdev_idx, param);
|
||||
|
||||
ret = ath11k_wmi_pdev_set_param(ar, WMI_PDEV_PARAM_RFKILL_ENABLE,
|
||||
param, ar->pdev->pdev_id);
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to set rfkill enable param %d: %d\n",
|
||||
param, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ath11k_mac_op_tx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_tx_control *control,
|
||||
struct sk_buff *skb)
|
||||
|
@ -5710,6 +5860,7 @@ static void ath11k_mac_op_stop(struct ieee80211_hw *hw)
|
|||
cancel_delayed_work_sync(&ar->scan.timeout);
|
||||
cancel_work_sync(&ar->regd_update_work);
|
||||
cancel_work_sync(&ar->ab->update_11d_work);
|
||||
cancel_work_sync(&ar->ab->rfkill_work);
|
||||
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
list_for_each_entry_safe(ppdu_stats, tmp, &ar->ppdu_stats_info, list) {
|
||||
|
@ -7775,12 +7926,45 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void ath11k_mac_put_chain_rssi(struct station_info *sinfo,
|
||||
struct ath11k_sta *arsta,
|
||||
char *pre,
|
||||
bool clear)
|
||||
{
|
||||
struct ath11k *ar = arsta->arvif->ar;
|
||||
int i;
|
||||
s8 rssi;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(sinfo->chain_signal); i++) {
|
||||
sinfo->chains &= ~BIT(i);
|
||||
rssi = arsta->chain_signal[i];
|
||||
if (clear)
|
||||
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);
|
||||
|
||||
if (rssi != ATH11K_DEFAULT_NOISE_FLOOR &&
|
||||
rssi != ATH11K_INVALID_RSSI_FULL &&
|
||||
rssi != ATH11K_INVALID_RSSI_EMPTY &&
|
||||
rssi != 0) {
|
||||
sinfo->chain_signal[i] = rssi;
|
||||
sinfo->chains |= BIT(i);
|
||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
struct station_info *sinfo)
|
||||
{
|
||||
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
|
||||
struct ath11k *ar = arsta->arvif->ar;
|
||||
s8 signal;
|
||||
bool db2dbm = test_bit(WMI_TLV_SERVICE_HW_DB2DBM_CONVERSION_SUPPORT,
|
||||
ar->ab->wmi_ab.svc_map);
|
||||
|
||||
sinfo->rx_duration = arsta->rx_duration;
|
||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_DURATION);
|
||||
|
@ -7803,9 +7987,32 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw,
|
|||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
|
||||
}
|
||||
|
||||
/* TODO: Use real NF instead of default one. */
|
||||
sinfo->signal = arsta->rssi_comb + ATH11K_DEFAULT_NOISE_FLOOR;
|
||||
ath11k_mac_put_chain_rssi(sinfo, arsta, "ppdu", false);
|
||||
|
||||
if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL)) &&
|
||||
arsta->arvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
ar->ab->hw_params.supports_rssi_stats &&
|
||||
!ath11k_debugfs_get_fw_stats(ar, ar->pdev->pdev_id, 0,
|
||||
WMI_REQUEST_RSSI_PER_CHAIN_STAT)) {
|
||||
ath11k_mac_put_chain_rssi(sinfo, arsta, "fw stats", true);
|
||||
}
|
||||
|
||||
signal = arsta->rssi_comb;
|
||||
if (!signal &&
|
||||
arsta->arvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
ar->ab->hw_params.supports_rssi_stats &&
|
||||
!(ath11k_debugfs_get_fw_stats(ar, ar->pdev->pdev_id, 0,
|
||||
WMI_REQUEST_VDEV_STAT)))
|
||||
signal = arsta->rssi_beacon;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac sta statistics db2dbm %u rssi comb %d rssi beacon %d\n",
|
||||
db2dbm, arsta->rssi_comb, arsta->rssi_beacon);
|
||||
|
||||
if (signal) {
|
||||
sinfo->signal = db2dbm ? signal : signal + ATH11K_DEFAULT_NOISE_FLOOR;
|
||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops ath11k_ops = {
|
||||
|
|
|
@ -147,6 +147,8 @@ u8 ath11k_mac_hw_rate_to_idx(const struct ieee80211_supported_band *sband,
|
|||
|
||||
void __ath11k_mac_scan_finish(struct ath11k *ar);
|
||||
void ath11k_mac_scan_finish(struct ath11k *ar);
|
||||
int ath11k_mac_rfkill_enable_radio(struct ath11k *ar, bool enable);
|
||||
int ath11k_mac_rfkill_config(struct ath11k *ar);
|
||||
|
||||
struct ath11k_vif *ath11k_mac_get_arvif(struct ath11k *ar, u32 vdev_id);
|
||||
struct ath11k_vif *ath11k_mac_get_arvif_by_vdev_id(struct ath11k_base *ab,
|
||||
|
@ -162,6 +164,9 @@ void ath11k_mac_drain_tx(struct ath11k *ar);
|
|||
void ath11k_mac_peer_cleanup_all(struct ath11k *ar);
|
||||
int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx);
|
||||
u8 ath11k_mac_bw_to_mac80211_bw(u8 bw);
|
||||
u32 ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi);
|
||||
enum nl80211_he_ru_alloc ath11k_mac_phy_he_ru_to_nl80211_he_ru_alloc(u16 ru_phy);
|
||||
enum nl80211_he_ru_alloc ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(u16 ru_tones);
|
||||
enum ath11k_supported_bw ath11k_mac_mac80211_bw_to_ath11k_bw(enum rate_info_bw bw);
|
||||
enum hal_encrypt_type ath11k_dp_tx_get_encrypt_type(u32 cipher);
|
||||
void ath11k_mac_handle_beacon(struct ath11k *ar, struct sk_buff *skb);
|
||||
|
|
|
@ -683,8 +683,11 @@ static void __ath11k_pci_ext_irq_disable(struct ath11k_base *sc)
|
|||
|
||||
ath11k_pci_ext_grp_disable(irq_grp);
|
||||
|
||||
if (irq_grp->napi_enabled) {
|
||||
napi_synchronize(&irq_grp->napi);
|
||||
napi_disable(&irq_grp->napi);
|
||||
irq_grp->napi_enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -712,7 +715,10 @@ static void ath11k_pci_ext_irq_enable(struct ath11k_base *ab)
|
|||
for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) {
|
||||
struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
|
||||
|
||||
if (!irq_grp->napi_enabled) {
|
||||
napi_enable(&irq_grp->napi);
|
||||
irq_grp->napi_enabled = true;
|
||||
}
|
||||
ath11k_pci_ext_grp_enable(irq_grp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1584,6 +1584,50 @@ static struct qmi_elem_info qmi_wlanfw_cold_boot_cal_done_ind_msg_v01_ei[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct qmi_elem_info qmi_wlanfw_wlan_ini_req_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_OPT_FLAG,
|
||||
.elem_len = 1,
|
||||
.elem_size = sizeof(u8),
|
||||
.array_type = NO_ARRAY,
|
||||
.tlv_type = 0x10,
|
||||
.offset = offsetof(struct qmi_wlanfw_wlan_ini_req_msg_v01,
|
||||
enablefwlog_valid),
|
||||
},
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_1_BYTE,
|
||||
.elem_len = 1,
|
||||
.elem_size = sizeof(u8),
|
||||
.array_type = NO_ARRAY,
|
||||
.tlv_type = 0x10,
|
||||
.offset = offsetof(struct qmi_wlanfw_wlan_ini_req_msg_v01,
|
||||
enablefwlog),
|
||||
},
|
||||
{
|
||||
.data_type = QMI_EOTI,
|
||||
.array_type = NO_ARRAY,
|
||||
.tlv_type = QMI_COMMON_TLV_TYPE,
|
||||
},
|
||||
};
|
||||
|
||||
static struct qmi_elem_info qmi_wlanfw_wlan_ini_resp_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_STRUCT,
|
||||
.elem_len = 1,
|
||||
.elem_size = sizeof(struct qmi_response_type_v01),
|
||||
.array_type = NO_ARRAY,
|
||||
.tlv_type = 0x02,
|
||||
.offset = offsetof(struct qmi_wlanfw_wlan_ini_resp_msg_v01,
|
||||
resp),
|
||||
.ei_array = qmi_response_type_v01_ei,
|
||||
},
|
||||
{
|
||||
.data_type = QMI_EOTI,
|
||||
.array_type = NO_ARRAY,
|
||||
.tlv_type = QMI_COMMON_TLV_TYPE,
|
||||
},
|
||||
};
|
||||
|
||||
static int ath11k_qmi_host_cap_send(struct ath11k_base *ab)
|
||||
{
|
||||
struct qmi_wlanfw_host_cap_req_msg_v01 req;
|
||||
|
@ -2161,7 +2205,8 @@ err_free_req:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int ath11k_qmi_load_bdf_qmi(struct ath11k_base *ab)
|
||||
static int ath11k_qmi_load_bdf_qmi(struct ath11k_base *ab,
|
||||
bool regdb)
|
||||
{
|
||||
struct device *dev = ab->dev;
|
||||
char filename[ATH11K_QMI_MAX_BDF_FILE_NAME_SIZE];
|
||||
|
@ -2172,13 +2217,21 @@ static int ath11k_qmi_load_bdf_qmi(struct ath11k_base *ab)
|
|||
const u8 *tmp;
|
||||
|
||||
memset(&bd, 0, sizeof(bd));
|
||||
|
||||
if (regdb) {
|
||||
ret = ath11k_core_fetch_regdb(ab, &bd);
|
||||
} else {
|
||||
ret = ath11k_core_fetch_bdf(ab, &bd);
|
||||
if (ret) {
|
||||
if (ret)
|
||||
ath11k_warn(ab, "qmi failed to fetch board file: %d\n", ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (bd.len >= SELFMAG && memcmp(bd.data, ELFMAG, SELFMAG) == 0)
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
if (regdb)
|
||||
bdf_type = ATH11K_QMI_BDF_TYPE_REGDB;
|
||||
else if (bd.len >= SELFMAG && memcmp(bd.data, ELFMAG, SELFMAG) == 0)
|
||||
bdf_type = ATH11K_QMI_BDF_TYPE_ELF;
|
||||
else
|
||||
bdf_type = ATH11K_QMI_BDF_TYPE_BIN;
|
||||
|
@ -2193,8 +2246,8 @@ static int ath11k_qmi_load_bdf_qmi(struct ath11k_base *ab)
|
|||
goto out;
|
||||
}
|
||||
|
||||
/* QCA6390 does not support cal data, skip it */
|
||||
if (bdf_type == ATH11K_QMI_BDF_TYPE_ELF)
|
||||
/* QCA6390/WCN6855 does not support cal data, skip it */
|
||||
if (bdf_type == ATH11K_QMI_BDF_TYPE_ELF || bdf_type == ATH11K_QMI_BDF_TYPE_REGDB)
|
||||
goto out;
|
||||
|
||||
if (ab->qmi.target.eeprom_caldata) {
|
||||
|
@ -2495,6 +2548,48 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int ath11k_qmi_wlanfw_wlan_ini_send(struct ath11k_base *ab, bool enable)
|
||||
{
|
||||
int ret;
|
||||
struct qmi_txn txn;
|
||||
struct qmi_wlanfw_wlan_ini_req_msg_v01 req = {};
|
||||
struct qmi_wlanfw_wlan_ini_resp_msg_v01 resp = {};
|
||||
|
||||
req.enablefwlog_valid = true;
|
||||
req.enablefwlog = enable ? 1 : 0;
|
||||
|
||||
ret = qmi_txn_init(&ab->qmi.handle, &txn,
|
||||
qmi_wlanfw_wlan_ini_resp_msg_v01_ei, &resp);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
ret = qmi_send_request(&ab->qmi.handle, NULL, &txn,
|
||||
QMI_WLANFW_WLAN_INI_REQ_V01,
|
||||
QMI_WLANFW_WLAN_INI_REQ_MSG_V01_MAX_LEN,
|
||||
qmi_wlanfw_wlan_ini_req_msg_v01_ei, &req);
|
||||
if (ret < 0) {
|
||||
ath11k_warn(ab, "qmi failed to send wlan ini request, err = %d\n",
|
||||
ret);
|
||||
qmi_txn_cancel(&txn);
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = qmi_txn_wait(&txn, msecs_to_jiffies(ATH11K_QMI_WLANFW_TIMEOUT_MS));
|
||||
if (ret < 0) {
|
||||
ath11k_warn(ab, "qmi failed wlan ini request, err = %d\n", ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (resp.resp.result != QMI_RESULT_SUCCESS_V01) {
|
||||
ath11k_warn(ab, "qmi wlan ini request failed, result: %d, err: %d\n",
|
||||
resp.resp.result, resp.resp.error);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ath11k_qmi_firmware_stop(struct ath11k_base *ab)
|
||||
{
|
||||
int ret;
|
||||
|
@ -2515,6 +2610,14 @@ int ath11k_qmi_firmware_start(struct ath11k_base *ab,
|
|||
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi firmware start\n");
|
||||
|
||||
if (ab->hw_params.fw_wmi_diag_event) {
|
||||
ret = ath11k_qmi_wlanfw_wlan_ini_send(ab, true);
|
||||
if (ret < 0) {
|
||||
ath11k_warn(ab, "qmi failed to send wlan fw ini:%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = ath11k_qmi_wlanfw_wlan_cfg_send(ab);
|
||||
if (ret < 0) {
|
||||
ath11k_warn(ab, "qmi failed to send wlan cfg: %d\n", ret);
|
||||
|
@ -2626,7 +2729,10 @@ static int ath11k_qmi_event_load_bdf(struct ath11k_qmi *qmi)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = ath11k_qmi_load_bdf_qmi(ab);
|
||||
if (ab->hw_params.supports_regdb)
|
||||
ath11k_qmi_load_bdf_qmi(ab, true);
|
||||
|
||||
ret = ath11k_qmi_load_bdf_qmi(ab, false);
|
||||
if (ret < 0) {
|
||||
ath11k_warn(ab, "failed to load board data file: %d\n", ret);
|
||||
return ret;
|
||||
|
|
|
@ -48,6 +48,7 @@ enum ath11k_qmi_file_type {
|
|||
enum ath11k_qmi_bdf_type {
|
||||
ATH11K_QMI_BDF_TYPE_BIN = 0,
|
||||
ATH11K_QMI_BDF_TYPE_ELF = 1,
|
||||
ATH11K_QMI_BDF_TYPE_REGDB = 4,
|
||||
};
|
||||
|
||||
enum ath11k_qmi_event_type {
|
||||
|
@ -427,10 +428,12 @@ struct qmi_wlanfw_m3_info_resp_msg_v01 {
|
|||
#define QMI_WLANFW_WLAN_MODE_RESP_MSG_V01_MAX_LEN 7
|
||||
#define QMI_WLANFW_WLAN_CFG_REQ_MSG_V01_MAX_LEN 803
|
||||
#define QMI_WLANFW_WLAN_CFG_RESP_MSG_V01_MAX_LEN 7
|
||||
#define QMI_WLANFW_WLAN_INI_REQ_MSG_V01_MAX_LEN 4
|
||||
#define QMI_WLANFW_WLAN_MODE_REQ_V01 0x0022
|
||||
#define QMI_WLANFW_WLAN_MODE_RESP_V01 0x0022
|
||||
#define QMI_WLANFW_WLAN_CFG_REQ_V01 0x0023
|
||||
#define QMI_WLANFW_WLAN_CFG_RESP_V01 0x0023
|
||||
#define QMI_WLANFW_WLAN_INI_REQ_V01 0x002F
|
||||
#define QMI_WLANFW_MAX_STR_LEN_V01 16
|
||||
#define QMI_WLANFW_MAX_NUM_CE_V01 12
|
||||
#define QMI_WLANFW_MAX_NUM_SVC_V01 24
|
||||
|
@ -472,6 +475,16 @@ struct qmi_wlanfw_wlan_cfg_resp_msg_v01 {
|
|||
struct qmi_response_type_v01 resp;
|
||||
};
|
||||
|
||||
struct qmi_wlanfw_wlan_ini_req_msg_v01 {
|
||||
/* Must be set to true if enablefwlog is being passed */
|
||||
u8 enablefwlog_valid;
|
||||
u8 enablefwlog;
|
||||
};
|
||||
|
||||
struct qmi_wlanfw_wlan_ini_resp_msg_v01 {
|
||||
struct qmi_response_type_v01 resp;
|
||||
};
|
||||
|
||||
int ath11k_qmi_firmware_start(struct ath11k_base *ab,
|
||||
u32 mode);
|
||||
void ath11k_qmi_firmware_stop(struct ath11k_base *ab);
|
||||
|
|
|
@ -280,6 +280,34 @@ TRACE_EVENT(ath11k_log_dbg_dump,
|
|||
__get_str(msg)
|
||||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(ath11k_wmi_diag,
|
||||
TP_PROTO(struct ath11k_base *ab, const void *data, size_t len),
|
||||
|
||||
TP_ARGS(ab, data, len),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string(device, dev_name(ab->dev))
|
||||
__string(driver, dev_driver_string(ab->dev))
|
||||
__field(u16, len)
|
||||
__dynamic_array(u8, data, len)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(device, dev_name(ab->dev));
|
||||
__assign_str(driver, dev_driver_string(ab->dev));
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(data), data, len);
|
||||
),
|
||||
|
||||
TP_printk(
|
||||
"%s %s tlv diag len %d",
|
||||
__get_str(driver),
|
||||
__get_str(device),
|
||||
__entry->len
|
||||
)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_H_ || TRACE_HEADER_MULTI_READ*/
|
||||
|
||||
/* we don't want to use include/trace/events */
|
||||
|
|
|
@ -73,6 +73,14 @@ struct wmi_tlv_dma_buf_release_parse {
|
|||
bool meta_data_done;
|
||||
};
|
||||
|
||||
struct wmi_tlv_fw_stats_parse {
|
||||
const struct wmi_stats_event *ev;
|
||||
const struct wmi_per_chain_rssi_stats *rssi;
|
||||
struct ath11k_fw_stats *stats;
|
||||
int rssi_num;
|
||||
bool chain_rssi_done;
|
||||
};
|
||||
|
||||
static const struct wmi_tlv_policy wmi_tlv_policies[] = {
|
||||
[WMI_TAG_ARRAY_BYTE]
|
||||
= { .min_len = 0 },
|
||||
|
@ -120,6 +128,8 @@ static const struct wmi_tlv_policy wmi_tlv_policies[] = {
|
|||
= { .min_len = sizeof(struct wmi_peer_assoc_conf_event) },
|
||||
[WMI_TAG_STATS_EVENT]
|
||||
= { .min_len = sizeof(struct wmi_stats_event) },
|
||||
[WMI_TAG_RFKILL_EVENT] = {
|
||||
.min_len = sizeof(struct wmi_rfkill_state_change_ev) },
|
||||
[WMI_TAG_PDEV_CTL_FAILSAFE_CHECK_EVENT]
|
||||
= { .min_len = sizeof(struct wmi_pdev_ctl_failsafe_chk_event) },
|
||||
[WMI_TAG_HOST_SWFDA_EVENT] = {
|
||||
|
@ -132,6 +142,8 @@ static const struct wmi_tlv_policy wmi_tlv_policies[] = {
|
|||
.min_len = sizeof(struct wmi_obss_color_collision_event) },
|
||||
[WMI_TAG_11D_NEW_COUNTRY_EVENT] = {
|
||||
.min_len = sizeof(struct wmi_11d_new_cc_ev) },
|
||||
[WMI_TAG_PER_CHAIN_RSSI_STATS] = {
|
||||
.min_len = sizeof(struct wmi_per_chain_rssi_stats) },
|
||||
};
|
||||
|
||||
#define PRIMAP(_hw_mode_) \
|
||||
|
@ -514,6 +526,8 @@ static int ath11k_pull_service_ready_tlv(struct ath11k_base *ab,
|
|||
cap->default_dbs_hw_mode_index = ev->default_dbs_hw_mode_index;
|
||||
cap->num_msdu_desc = ev->num_msdu_desc;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_WMI, "wmi sys cap info 0x%x\n", cap->sys_cap_info);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3595,6 +3609,8 @@ ath11k_wmi_obss_color_collision_event(struct ath11k_base *ab, struct sk_buff *sk
|
|||
return;
|
||||
}
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
ev = tb[WMI_TAG_OBSS_COLOR_COLLISION_EVT];
|
||||
if (!ev) {
|
||||
ath11k_warn(ab, "failed to fetch obss color collision ev");
|
||||
|
@ -3625,6 +3641,7 @@ ath11k_wmi_obss_color_collision_event(struct ath11k_base *ab, struct sk_buff *sk
|
|||
|
||||
exit:
|
||||
kfree(tb);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5554,47 +5571,107 @@ ath11k_wmi_pull_bcn_stats(const struct wmi_bcn_stats *src,
|
|||
dst->tx_bcn_outage_cnt = src->tx_bcn_outage_cnt;
|
||||
}
|
||||
|
||||
int ath11k_wmi_pull_fw_stats(struct ath11k_base *ab, struct sk_buff *skb,
|
||||
struct ath11k_fw_stats *stats)
|
||||
static int ath11k_wmi_tlv_rssi_chain_parse(struct ath11k_base *ab,
|
||||
u16 tag, u16 len,
|
||||
const void *ptr, void *data)
|
||||
{
|
||||
const void **tb;
|
||||
const struct wmi_stats_event *ev;
|
||||
const void *data;
|
||||
int i, ret;
|
||||
u32 len = skb->len;
|
||||
struct wmi_tlv_fw_stats_parse *parse = data;
|
||||
const struct wmi_stats_event *ev = parse->ev;
|
||||
struct ath11k_fw_stats *stats = parse->stats;
|
||||
struct ath11k *ar;
|
||||
struct ath11k_vif *arvif;
|
||||
struct ieee80211_sta *sta;
|
||||
struct ath11k_sta *arsta;
|
||||
const struct wmi_rssi_stats *stats_rssi = (const struct wmi_rssi_stats *)ptr;
|
||||
int j, ret = 0;
|
||||
|
||||
tb = ath11k_wmi_tlv_parse_alloc(ab, skb->data, len, GFP_ATOMIC);
|
||||
if (IS_ERR(tb)) {
|
||||
ret = PTR_ERR(tb);
|
||||
ath11k_warn(ab, "failed to parse tlv: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ev = tb[WMI_TAG_STATS_EVENT];
|
||||
data = tb[WMI_TAG_ARRAY_BYTE];
|
||||
if (!ev || !data) {
|
||||
ath11k_warn(ab, "failed to fetch update stats ev");
|
||||
kfree(tb);
|
||||
if (tag != WMI_TAG_RSSI_STATS)
|
||||
return -EPROTO;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
ar = ath11k_mac_get_ar_by_pdev_id(ab, ev->pdev_id);
|
||||
stats->stats_id = WMI_REQUEST_RSSI_PER_CHAIN_STAT;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_WMI,
|
||||
"wmi stats vdev id %d mac %pM\n",
|
||||
stats_rssi->vdev_id, stats_rssi->peer_macaddr.addr);
|
||||
|
||||
arvif = ath11k_mac_get_arvif(ar, stats_rssi->vdev_id);
|
||||
if (!arvif) {
|
||||
ath11k_warn(ab, "not found vif for vdev id %d\n",
|
||||
stats_rssi->vdev_id);
|
||||
ret = -EPROTO;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_WMI,
|
||||
"wmi stats update ev pdev_id %d pdev %i vdev %i bcn %i\n",
|
||||
ev->pdev_id,
|
||||
ev->num_pdev_stats, ev->num_vdev_stats,
|
||||
ev->num_bcn_stats);
|
||||
"wmi stats bssid %pM vif %pK\n",
|
||||
arvif->bssid, arvif->vif);
|
||||
|
||||
sta = ieee80211_find_sta_by_ifaddr(ar->hw,
|
||||
arvif->bssid,
|
||||
NULL);
|
||||
if (!sta) {
|
||||
ath11k_warn(ab, "not found station for bssid %pM\n",
|
||||
arvif->bssid);
|
||||
ret = -EPROTO;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
arsta = (struct ath11k_sta *)sta->drv_priv;
|
||||
|
||||
BUILD_BUG_ON(ARRAY_SIZE(arsta->chain_signal) >
|
||||
ARRAY_SIZE(stats_rssi->rssi_avg_beacon));
|
||||
|
||||
for (j = 0; j < ARRAY_SIZE(arsta->chain_signal); j++) {
|
||||
arsta->chain_signal[j] = stats_rssi->rssi_avg_beacon[j];
|
||||
ath11k_dbg(ab, ATH11K_DBG_WMI,
|
||||
"wmi stats beacon rssi[%d] %d data rssi[%d] %d\n",
|
||||
j,
|
||||
stats_rssi->rssi_avg_beacon[j],
|
||||
j,
|
||||
stats_rssi->rssi_avg_data[j]);
|
||||
}
|
||||
|
||||
exit:
|
||||
rcu_read_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ath11k_wmi_tlv_fw_stats_data_parse(struct ath11k_base *ab,
|
||||
struct wmi_tlv_fw_stats_parse *parse,
|
||||
const void *ptr,
|
||||
u16 len)
|
||||
{
|
||||
struct ath11k_fw_stats *stats = parse->stats;
|
||||
const struct wmi_stats_event *ev = parse->ev;
|
||||
struct ath11k *ar;
|
||||
struct ath11k_vif *arvif;
|
||||
struct ieee80211_sta *sta;
|
||||
struct ath11k_sta *arsta;
|
||||
int i, ret = 0;
|
||||
const void *data = ptr;
|
||||
|
||||
if (!ev) {
|
||||
ath11k_warn(ab, "failed to fetch update stats ev");
|
||||
return -EPROTO;
|
||||
}
|
||||
|
||||
stats->pdev_id = ev->pdev_id;
|
||||
stats->stats_id = 0;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
ar = ath11k_mac_get_ar_by_pdev_id(ab, ev->pdev_id);
|
||||
|
||||
for (i = 0; i < ev->num_pdev_stats; i++) {
|
||||
const struct wmi_pdev_stats *src;
|
||||
struct ath11k_fw_stats_pdev *dst;
|
||||
|
||||
src = data;
|
||||
if (len < sizeof(*src)) {
|
||||
kfree(tb);
|
||||
return -EPROTO;
|
||||
ret = -EPROTO;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
stats->stats_id = WMI_REQUEST_PDEV_STAT;
|
||||
|
@ -5618,12 +5695,29 @@ int ath11k_wmi_pull_fw_stats(struct ath11k_base *ab, struct sk_buff *skb,
|
|||
|
||||
src = data;
|
||||
if (len < sizeof(*src)) {
|
||||
kfree(tb);
|
||||
return -EPROTO;
|
||||
ret = -EPROTO;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
stats->stats_id = WMI_REQUEST_VDEV_STAT;
|
||||
|
||||
arvif = ath11k_mac_get_arvif(ar, src->vdev_id);
|
||||
if (arvif) {
|
||||
sta = ieee80211_find_sta_by_ifaddr(ar->hw,
|
||||
arvif->bssid,
|
||||
NULL);
|
||||
if (sta) {
|
||||
arsta = (struct ath11k_sta *)sta->drv_priv;
|
||||
arsta->rssi_beacon = src->beacon_snr;
|
||||
ath11k_dbg(ab, ATH11K_DBG_WMI,
|
||||
"wmi stats vdev id %d snr %d\n",
|
||||
src->vdev_id, src->beacon_snr);
|
||||
} else {
|
||||
ath11k_warn(ab, "not found station for bssid %pM\n",
|
||||
arvif->bssid);
|
||||
}
|
||||
}
|
||||
|
||||
data += sizeof(*src);
|
||||
len -= sizeof(*src);
|
||||
|
||||
|
@ -5641,8 +5735,8 @@ int ath11k_wmi_pull_fw_stats(struct ath11k_base *ab, struct sk_buff *skb,
|
|||
|
||||
src = data;
|
||||
if (len < sizeof(*src)) {
|
||||
kfree(tb);
|
||||
return -EPROTO;
|
||||
ret = -EPROTO;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
stats->stats_id = WMI_REQUEST_BCN_STAT;
|
||||
|
@ -5658,8 +5752,67 @@ int ath11k_wmi_pull_fw_stats(struct ath11k_base *ab, struct sk_buff *skb,
|
|||
list_add_tail(&dst->list, &stats->bcn);
|
||||
}
|
||||
|
||||
kfree(tb);
|
||||
return 0;
|
||||
exit:
|
||||
rcu_read_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ath11k_wmi_tlv_fw_stats_parse(struct ath11k_base *ab,
|
||||
u16 tag, u16 len,
|
||||
const void *ptr, void *data)
|
||||
{
|
||||
struct wmi_tlv_fw_stats_parse *parse = data;
|
||||
int ret = 0;
|
||||
|
||||
switch (tag) {
|
||||
case WMI_TAG_STATS_EVENT:
|
||||
parse->ev = (struct wmi_stats_event *)ptr;
|
||||
parse->stats->pdev_id = parse->ev->pdev_id;
|
||||
break;
|
||||
case WMI_TAG_ARRAY_BYTE:
|
||||
ret = ath11k_wmi_tlv_fw_stats_data_parse(ab, parse, ptr, len);
|
||||
break;
|
||||
case WMI_TAG_PER_CHAIN_RSSI_STATS:
|
||||
parse->rssi = (struct wmi_per_chain_rssi_stats *)ptr;
|
||||
|
||||
if (parse->ev->stats_id & WMI_REQUEST_RSSI_PER_CHAIN_STAT)
|
||||
parse->rssi_num = parse->rssi->num_per_chain_rssi_stats;
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_WMI,
|
||||
"wmi stats id 0x%x num chain %d\n",
|
||||
parse->ev->stats_id,
|
||||
parse->rssi_num);
|
||||
break;
|
||||
case WMI_TAG_ARRAY_STRUCT:
|
||||
if (parse->rssi_num && !parse->chain_rssi_done) {
|
||||
ret = ath11k_wmi_tlv_iter(ab, ptr, len,
|
||||
ath11k_wmi_tlv_rssi_chain_parse,
|
||||
parse);
|
||||
if (ret) {
|
||||
ath11k_warn(ab, "failed to parse rssi chain %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
parse->chain_rssi_done = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ath11k_wmi_pull_fw_stats(struct ath11k_base *ab, struct sk_buff *skb,
|
||||
struct ath11k_fw_stats *stats)
|
||||
{
|
||||
struct wmi_tlv_fw_stats_parse parse = { };
|
||||
|
||||
stats->stats_id = 0;
|
||||
parse.stats = stats;
|
||||
|
||||
return ath11k_wmi_tlv_iter(ab, skb->data, skb->len,
|
||||
ath11k_wmi_tlv_fw_stats_parse,
|
||||
&parse);
|
||||
}
|
||||
|
||||
size_t ath11k_wmi_fw_stats_num_vdevs(struct list_head *head)
|
||||
|
@ -6395,13 +6548,16 @@ static void ath11k_bcn_tx_status_event(struct ath11k_base *ab, struct sk_buff *s
|
|||
return;
|
||||
}
|
||||
|
||||
rcu_read_lock();
|
||||
arvif = ath11k_mac_get_arvif_by_vdev_id(ab, vdev_id);
|
||||
if (!arvif) {
|
||||
ath11k_warn(ab, "invalid vdev id %d in bcn_tx_status",
|
||||
vdev_id);
|
||||
rcu_read_unlock();
|
||||
return;
|
||||
}
|
||||
ath11k_mac_bcn_tx_event(arvif);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
static void ath11k_vdev_stopped_event(struct ath11k_base *ab, struct sk_buff *skb)
|
||||
|
@ -7182,6 +7338,40 @@ exit:
|
|||
kfree(tb);
|
||||
}
|
||||
|
||||
static void ath11k_rfkill_state_change_event(struct ath11k_base *ab,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
const struct wmi_rfkill_state_change_ev *ev;
|
||||
const void **tb;
|
||||
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 tlv: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
ev = tb[WMI_TAG_RFKILL_EVENT];
|
||||
if (!ev) {
|
||||
kfree(tb);
|
||||
return;
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC,
|
||||
"wmi tlv rfkill state change gpio %d type %d radio_state %d\n",
|
||||
ev->gpio_pin_num,
|
||||
ev->int_type,
|
||||
ev->radio_state);
|
||||
|
||||
spin_lock_bh(&ab->base_lock);
|
||||
ab->rfkill_radio_on = (ev->radio_state == WMI_RFKILL_RADIO_STATE_ON);
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
|
||||
queue_work(ab->workqueue, &ab->rfkill_work);
|
||||
kfree(tb);
|
||||
}
|
||||
|
||||
static void
|
||||
ath11k_wmi_pdev_temperature_event(struct ath11k_base *ab,
|
||||
struct sk_buff *skb)
|
||||
|
@ -7335,6 +7525,13 @@ static void ath11k_wmi_event_wow_wakeup_host(struct ath11k_base *ab, struct sk_b
|
|||
complete(&ab->wow.wakeup_completed);
|
||||
}
|
||||
|
||||
static void
|
||||
ath11k_wmi_diag_event(struct ath11k_base *ab,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
trace_ath11k_wmi_diag(ab, skb->data, skb->len);
|
||||
}
|
||||
|
||||
static void ath11k_wmi_tlv_op_rx(struct ath11k_base *ab, struct sk_buff *skb)
|
||||
{
|
||||
struct wmi_cmd_hdr *cmd_hdr;
|
||||
|
@ -7454,6 +7651,12 @@ static void ath11k_wmi_tlv_op_rx(struct ath11k_base *ab, struct sk_buff *skb)
|
|||
case WMI_11D_NEW_COUNTRY_EVENTID:
|
||||
ath11k_reg_11d_new_cc_event(ab, skb);
|
||||
break;
|
||||
case WMI_RFKILL_STATE_CHANGE_EVENTID:
|
||||
ath11k_rfkill_state_change_event(ab, skb);
|
||||
break;
|
||||
case WMI_DIAG_EVENTID:
|
||||
ath11k_wmi_diag_event(ab, skb);
|
||||
break;
|
||||
/* TODO: Add remaining events */
|
||||
default:
|
||||
ath11k_dbg(ab, ATH11K_DBG_WMI, "Unknown eventid: 0x%x\n", id);
|
||||
|
|
|
@ -4439,6 +4439,17 @@ struct wmi_stats_event {
|
|||
u32 num_peer_extd2_stats;
|
||||
} __packed;
|
||||
|
||||
struct wmi_rssi_stats {
|
||||
u32 vdev_id;
|
||||
u32 rssi_avg_beacon[WMI_MAX_CHAINS];
|
||||
u32 rssi_avg_data[WMI_MAX_CHAINS];
|
||||
struct wmi_mac_addr peer_macaddr;
|
||||
} __packed;
|
||||
|
||||
struct wmi_per_chain_rssi_stats {
|
||||
u32 num_per_chain_rssi_stats;
|
||||
} __packed;
|
||||
|
||||
struct wmi_pdev_ctl_failsafe_chk_event {
|
||||
u32 pdev_id;
|
||||
u32 ctl_failsafe_status;
|
||||
|
@ -5204,6 +5215,31 @@ struct target_resource_config {
|
|||
u32 twt_ap_sta_count;
|
||||
};
|
||||
|
||||
enum wmi_sys_cap_info_flags {
|
||||
WMI_SYS_CAP_INFO_RXTX_LED = BIT(0),
|
||||
WMI_SYS_CAP_INFO_RFKILL = BIT(1),
|
||||
};
|
||||
|
||||
#define WMI_RFKILL_CFG_GPIO_PIN_NUM GENMASK(5, 0)
|
||||
#define WMI_RFKILL_CFG_RADIO_LEVEL BIT(6)
|
||||
#define WMI_RFKILL_CFG_PIN_AS_GPIO GENMASK(10, 7)
|
||||
|
||||
enum wmi_rfkill_enable_radio {
|
||||
WMI_RFKILL_ENABLE_RADIO_ON = 0,
|
||||
WMI_RFKILL_ENABLE_RADIO_OFF = 1,
|
||||
};
|
||||
|
||||
enum wmi_rfkill_radio_state {
|
||||
WMI_RFKILL_RADIO_STATE_OFF = 1,
|
||||
WMI_RFKILL_RADIO_STATE_ON = 2,
|
||||
};
|
||||
|
||||
struct wmi_rfkill_state_change_ev {
|
||||
u32 gpio_pin_num;
|
||||
u32 int_type;
|
||||
u32 radio_state;
|
||||
} __packed;
|
||||
|
||||
#define WMI_MAX_MEM_REQS 32
|
||||
|
||||
#define MAX_RADIOS 3
|
||||
|
|
|
@ -727,6 +727,43 @@ ath5k_get_rate_hw_value(const struct ieee80211_hw *hw,
|
|||
return hw_rate;
|
||||
}
|
||||
|
||||
static bool ath5k_merge_ratetbl(struct ieee80211_sta *sta,
|
||||
struct ath5k_buf *bf,
|
||||
struct ieee80211_tx_info *tx_info)
|
||||
{
|
||||
struct ieee80211_sta_rates *ratetbl;
|
||||
u8 i;
|
||||
|
||||
if (!sta)
|
||||
return false;
|
||||
|
||||
ratetbl = rcu_dereference(sta->rates);
|
||||
if (!ratetbl)
|
||||
return false;
|
||||
|
||||
if (tx_info->control.rates[0].idx < 0 ||
|
||||
tx_info->control.rates[0].count == 0)
|
||||
{
|
||||
i = 0;
|
||||
} else {
|
||||
bf->rates[0] = tx_info->control.rates[0];
|
||||
i = 1;
|
||||
}
|
||||
|
||||
for ( ; i < IEEE80211_TX_MAX_RATES; i++) {
|
||||
bf->rates[i].idx = ratetbl->rate[i].idx;
|
||||
bf->rates[i].flags = ratetbl->rate[i].flags;
|
||||
if (tx_info->control.use_rts)
|
||||
bf->rates[i].count = ratetbl->rate[i].count_rts;
|
||||
else if (tx_info->control.use_cts_prot)
|
||||
bf->rates[i].count = ratetbl->rate[i].count_cts;
|
||||
else
|
||||
bf->rates[i].count = ratetbl->rate[i].count;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static int
|
||||
ath5k_txbuf_setup(struct ath5k_hw *ah, struct ath5k_buf *bf,
|
||||
struct ath5k_txq *txq, int padsize,
|
||||
|
@ -737,6 +774,7 @@ ath5k_txbuf_setup(struct ath5k_hw *ah, struct ath5k_buf *bf,
|
|||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
unsigned int pktlen, flags, keyidx = AR5K_TXKEYIX_INVALID;
|
||||
struct ieee80211_rate *rate;
|
||||
struct ieee80211_sta *sta;
|
||||
unsigned int mrr_rate[3], mrr_tries[3];
|
||||
int i, ret;
|
||||
u16 hw_rate;
|
||||
|
@ -753,8 +791,16 @@ ath5k_txbuf_setup(struct ath5k_hw *ah, struct ath5k_buf *bf,
|
|||
if (dma_mapping_error(ah->dev, bf->skbaddr))
|
||||
return -ENOSPC;
|
||||
|
||||
ieee80211_get_tx_rates(info->control.vif, (control) ? control->sta : NULL, skb, bf->rates,
|
||||
if (control)
|
||||
sta = control->sta;
|
||||
else
|
||||
sta = NULL;
|
||||
|
||||
if (!ath5k_merge_ratetbl(sta, bf, info)) {
|
||||
ieee80211_get_tx_rates(info->control.vif,
|
||||
sta, skb, bf->rates,
|
||||
ARRAY_SIZE(bf->rates));
|
||||
}
|
||||
|
||||
rate = ath5k_get_rate(ah->hw, info, bf, 0);
|
||||
|
||||
|
|
|
@ -590,6 +590,13 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev,
|
|||
return;
|
||||
}
|
||||
|
||||
if (pkt_len > 2 * MAX_RX_BUF_SIZE) {
|
||||
dev_err(&hif_dev->udev->dev,
|
||||
"ath9k_htc: invalid pkt_len (%x)\n", pkt_len);
|
||||
RX_STAT_INC(skb_dropped);
|
||||
return;
|
||||
}
|
||||
|
||||
pad_len = 4 - (pkt_len & 0x3);
|
||||
if (pad_len == 4)
|
||||
pad_len = 0;
|
||||
|
|
|
@ -281,6 +281,7 @@ struct ath9k_htc_rxbuf {
|
|||
struct ath9k_htc_rx {
|
||||
struct list_head rxbuf;
|
||||
spinlock_t rxbuflock;
|
||||
bool initialized;
|
||||
};
|
||||
|
||||
#define ATH9K_HTC_TX_CLEANUP_INTERVAL 50 /* ms */
|
||||
|
@ -305,6 +306,7 @@ struct ath9k_htc_tx {
|
|||
DECLARE_BITMAP(tx_slot, MAX_TX_BUF_NUM);
|
||||
struct timer_list cleanup_timer;
|
||||
spinlock_t tx_lock;
|
||||
bool initialized;
|
||||
};
|
||||
|
||||
struct ath9k_htc_tx_ctl {
|
||||
|
|
|
@ -813,6 +813,11 @@ int ath9k_tx_init(struct ath9k_htc_priv *priv)
|
|||
skb_queue_head_init(&priv->tx.data_vi_queue);
|
||||
skb_queue_head_init(&priv->tx.data_vo_queue);
|
||||
skb_queue_head_init(&priv->tx.tx_failed);
|
||||
|
||||
/* Allow ath9k_wmi_event_tasklet(WMI_TXSTATUS_EVENTID) to operate. */
|
||||
smp_wmb();
|
||||
priv->tx.initialized = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1130,6 +1135,10 @@ void ath9k_htc_rxep(void *drv_priv, struct sk_buff *skb,
|
|||
struct ath9k_htc_rxbuf *rxbuf = NULL, *tmp_buf = NULL;
|
||||
unsigned long flags;
|
||||
|
||||
/* Check if ath9k_rx_init() completed. */
|
||||
if (!data_race(priv->rx.initialized))
|
||||
goto err;
|
||||
|
||||
spin_lock_irqsave(&priv->rx.rxbuflock, flags);
|
||||
list_for_each_entry(tmp_buf, &priv->rx.rxbuf, list) {
|
||||
if (!tmp_buf->in_process) {
|
||||
|
@ -1185,6 +1194,10 @@ int ath9k_rx_init(struct ath9k_htc_priv *priv)
|
|||
list_add_tail(&rxbuf->list, &priv->rx.rxbuf);
|
||||
}
|
||||
|
||||
/* Allow ath9k_htc_rxep() to operate. */
|
||||
smp_wmb();
|
||||
priv->rx.initialized = true;
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
|
|
|
@ -169,6 +169,10 @@ void ath9k_wmi_event_tasklet(struct tasklet_struct *t)
|
|||
&wmi->drv_priv->fatal_work);
|
||||
break;
|
||||
case WMI_TXSTATUS_EVENTID:
|
||||
/* Check if ath9k_tx_init() completed. */
|
||||
if (!data_race(priv->tx.initialized))
|
||||
break;
|
||||
|
||||
spin_lock_bh(&priv->tx.tx_lock);
|
||||
if (priv->tx.flags & ATH9K_HTC_OP_TX_DRAIN) {
|
||||
spin_unlock_bh(&priv->tx.tx_lock);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "iwl-prph.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL_22000_UCODE_API_MAX 68
|
||||
#define IWL_22000_UCODE_API_MAX 69
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_22000_UCODE_API_MIN 39
|
||||
|
@ -56,6 +56,11 @@
|
|||
#define IWL_BZ_A_FM_A_FW_PRE "iwlwifi-bz-a0-fm-a0-"
|
||||
#define IWL_GL_A_FM_A_FW_PRE "iwlwifi-gl-a0-fm-a0-"
|
||||
#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_A_GF_A_FW_PRE "iwlwifi-BzBnj-a0-gf-a0-"
|
||||
#define IWL_BNJ_A_GF4_A_FW_PRE "iwlwifi-BzBnj-a0-gf4-a0-"
|
||||
#define IWL_BNJ_A_HR_B_FW_PRE "iwlwifi-BzBnj-a0-hr-b0-"
|
||||
|
||||
|
||||
#define IWL_QU_B_HR_B_MODULE_FIRMWARE(api) \
|
||||
|
@ -116,6 +121,16 @@
|
|||
IWL_GL_A_FM_A_FW_PRE __stringify(api) ".ucode"
|
||||
#define IWL_BZ_Z_GF_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_Z_GF_A_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_A_GF_A_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_A_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_A_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BNJ_A_HR_B_FW_PRE __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl_22000_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
|
@ -237,7 +252,7 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
|
|||
.dccm2_len = IWL_22000_DCCM2_LEN, \
|
||||
.smem_offset = IWL_22000_SMEM_OFFSET, \
|
||||
.smem_len = IWL_22000_SMEM_LEN, \
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM, \
|
||||
.apmg_not_supported = true, \
|
||||
.trans.mq_rx_supported = true, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
|
@ -882,6 +897,40 @@ const struct iwl_cfg iwl_cfg_bz_z0_gf_a0 = {
|
|||
.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,
|
||||
.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,
|
||||
.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,
|
||||
.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,
|
||||
.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,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
MODULE_FIRMWARE(IWL_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QNJ_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
|
@ -910,3 +959,8 @@ 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_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_A_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_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
|
|
|
@ -242,17 +242,16 @@ found:
|
|||
IWL_EXPORT_SYMBOL(iwl_acpi_get_wifi_pkg_range);
|
||||
|
||||
int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt,
|
||||
__le32 *block_list_array,
|
||||
int *block_list_size)
|
||||
struct iwl_tas_config_cmd_v3 *cmd)
|
||||
{
|
||||
union acpi_object *wifi_pkg, *data;
|
||||
int ret, tbl_rev, i;
|
||||
bool enabled;
|
||||
int ret, tbl_rev, i, block_list_size, enabled;
|
||||
|
||||
data = iwl_acpi_get_object(fwrt->dev, ACPI_WTAS_METHOD);
|
||||
if (IS_ERR(data))
|
||||
return PTR_ERR(data);
|
||||
|
||||
/* try to read wtas table revision 1 or revision 0*/
|
||||
wifi_pkg = iwl_acpi_get_wifi_pkg(fwrt->dev, data,
|
||||
ACPI_WTAS_WIFI_DATA_SIZE,
|
||||
&tbl_rev);
|
||||
|
@ -261,40 +260,54 @@ int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt,
|
|||
goto out_free;
|
||||
}
|
||||
|
||||
if (wifi_pkg->package.elements[0].type != ACPI_TYPE_INTEGER ||
|
||||
tbl_rev != 0) {
|
||||
if (tbl_rev == 1 && wifi_pkg->package.elements[1].type ==
|
||||
ACPI_TYPE_INTEGER) {
|
||||
u32 tas_selection =
|
||||
(u32)wifi_pkg->package.elements[1].integer.value;
|
||||
u16 override_iec =
|
||||
(tas_selection & ACPI_WTAS_OVERRIDE_IEC_MSK) >> ACPI_WTAS_OVERRIDE_IEC_POS;
|
||||
u16 enabled_iec = (tas_selection & ACPI_WTAS_ENABLE_IEC_MSK) >>
|
||||
ACPI_WTAS_ENABLE_IEC_POS;
|
||||
|
||||
enabled = tas_selection & ACPI_WTAS_ENABLED_MSK;
|
||||
cmd->override_tas_iec = cpu_to_le16(override_iec);
|
||||
cmd->enable_tas_iec = cpu_to_le16(enabled_iec);
|
||||
|
||||
} else if (tbl_rev == 0 &&
|
||||
wifi_pkg->package.elements[1].type == ACPI_TYPE_INTEGER) {
|
||||
enabled = !!wifi_pkg->package.elements[1].integer.value;
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
enabled = !!wifi_pkg->package.elements[1].integer.value;
|
||||
|
||||
if (!enabled) {
|
||||
*block_list_size = -1;
|
||||
IWL_DEBUG_RADIO(fwrt, "TAS not enabled\n");
|
||||
ret = 0;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
IWL_DEBUG_RADIO(fwrt, "Reading TAS table revision %d\n", tbl_rev);
|
||||
if (wifi_pkg->package.elements[2].type != ACPI_TYPE_INTEGER ||
|
||||
wifi_pkg->package.elements[2].integer.value >
|
||||
APCI_WTAS_BLACK_LIST_MAX) {
|
||||
IWL_DEBUG_RADIO(fwrt, "TAS invalid array size %llu\n",
|
||||
wifi_pkg->package.elements[1].integer.value);
|
||||
wifi_pkg->package.elements[2].integer.value);
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
*block_list_size = wifi_pkg->package.elements[2].integer.value;
|
||||
block_list_size = wifi_pkg->package.elements[2].integer.value;
|
||||
cmd->block_list_size = cpu_to_le32(block_list_size);
|
||||
|
||||
IWL_DEBUG_RADIO(fwrt, "TAS array size %d\n", *block_list_size);
|
||||
if (*block_list_size > APCI_WTAS_BLACK_LIST_MAX) {
|
||||
IWL_DEBUG_RADIO(fwrt, "TAS array size %u\n", block_list_size);
|
||||
if (block_list_size > APCI_WTAS_BLACK_LIST_MAX) {
|
||||
IWL_DEBUG_RADIO(fwrt, "TAS invalid array size value %u\n",
|
||||
*block_list_size);
|
||||
block_list_size);
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
for (i = 0; i < *block_list_size; i++) {
|
||||
for (i = 0; i < block_list_size; i++) {
|
||||
u32 country;
|
||||
|
||||
if (wifi_pkg->package.elements[3 + i].type !=
|
||||
|
@ -306,11 +319,11 @@ int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt,
|
|||
}
|
||||
|
||||
country = wifi_pkg->package.elements[3 + i].integer.value;
|
||||
block_list_array[i] = cpu_to_le32(country);
|
||||
cmd->block_list_array[i] = cpu_to_le32(country);
|
||||
IWL_DEBUG_RADIO(fwrt, "TAS block list country %d\n", country);
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
ret = 1;
|
||||
out_free:
|
||||
kfree(data);
|
||||
return ret;
|
||||
|
|
|
@ -65,10 +65,19 @@
|
|||
#define ACPI_ECKV_WIFI_DATA_SIZE 2
|
||||
|
||||
/*
|
||||
* 1 type, 1 enabled, 1 block list size, 16 block list array
|
||||
* TAS size: 1 elelment for type,
|
||||
* 1 element for enabled field,
|
||||
* 1 element for block list size,
|
||||
* 16 elements for block list array
|
||||
*/
|
||||
#define APCI_WTAS_BLACK_LIST_MAX 16
|
||||
#define ACPI_WTAS_WIFI_DATA_SIZE (3 + APCI_WTAS_BLACK_LIST_MAX)
|
||||
#define ACPI_WTAS_ENABLED_MSK 0x1
|
||||
#define ACPI_WTAS_OVERRIDE_IEC_MSK 0x2
|
||||
#define ACPI_WTAS_ENABLE_IEC_MSK 0x4
|
||||
#define ACPI_WTAS_OVERRIDE_IEC_POS 0x1
|
||||
#define ACPI_WTAS_ENABLE_IEC_POS 0x2
|
||||
|
||||
|
||||
#define ACPI_PPAG_WIFI_DATA_SIZE_V1 ((IWL_NUM_CHAIN_LIMITS * \
|
||||
IWL_NUM_SUB_BANDS_V1) + 2)
|
||||
|
@ -105,6 +114,11 @@ struct iwl_geo_profile {
|
|||
struct iwl_geo_profile_band bands[ACPI_GEO_NUM_BANDS_REV2];
|
||||
};
|
||||
|
||||
/* Same thing as with SAR, all revisions fit in revision 2 */
|
||||
struct iwl_ppag_chain {
|
||||
s8 subbands[ACPI_SAR_NUM_SUB_BANDS_REV2];
|
||||
};
|
||||
|
||||
enum iwl_dsm_funcs_rev_0 {
|
||||
DSM_FUNC_QUERY = 0,
|
||||
DSM_FUNC_DISABLE_SRD = 1,
|
||||
|
@ -198,8 +212,8 @@ int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
|
|||
struct iwl_per_chain_offset *table,
|
||||
u32 n_bands, u32 n_profiles);
|
||||
|
||||
int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt, __le32 *block_list_array,
|
||||
int *block_list_size);
|
||||
int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_tas_config_cmd_v3 *cmd);
|
||||
|
||||
__le32 iwl_acpi_get_lari_config_bitmap(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
|
@ -280,8 +294,7 @@ static inline bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt)
|
|||
}
|
||||
|
||||
static inline int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt,
|
||||
__le32 *block_list_array,
|
||||
int *block_list_size)
|
||||
struct iwl_tas_config_cmd_v3 *cmd)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
|
|
@ -157,15 +157,6 @@ enum iwl_card_state_flags {
|
|||
CARD_IS_RX_ON = 0x10,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_radio_version_notif - information on the card state
|
||||
* ( CARD_STATE_NOTIFICATION = 0xa1 )
|
||||
* @flags: &enum iwl_card_state_flags
|
||||
*/
|
||||
struct iwl_card_state_notif {
|
||||
__le32 flags;
|
||||
} __packed; /* CARD_STATE_NTFY_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
* enum iwl_error_recovery_flags - flags for error recovery cmd
|
||||
* @ERROR_RECOVERY_UPDATE_DB: update db from blob sent
|
||||
|
|
|
@ -91,7 +91,8 @@ enum iwl_legacy_cmds {
|
|||
|
||||
/**
|
||||
* @SCAN_CFG_CMD:
|
||||
* uses &struct iwl_scan_config_v1 or &struct iwl_scan_config
|
||||
* uses &struct iwl_scan_config_v1, &struct iwl_scan_config_v2
|
||||
* or &struct iwl_scan_config
|
||||
*/
|
||||
SCAN_CFG_CMD = 0xc,
|
||||
|
||||
|
@ -384,13 +385,6 @@ enum iwl_legacy_cmds {
|
|||
*/
|
||||
REDUCE_TX_POWER_CMD = 0x9f,
|
||||
|
||||
/**
|
||||
* @CARD_STATE_NOTIFICATION:
|
||||
* Card state (RF/CT kill) notification,
|
||||
* uses &struct iwl_card_state_notif
|
||||
*/
|
||||
CARD_STATE_NOTIFICATION = 0xa1,
|
||||
|
||||
/**
|
||||
* @MISSED_BEACONS_NOTIFICATION: &struct iwl_missed_beacons_notif
|
||||
*/
|
||||
|
|
|
@ -124,7 +124,7 @@ struct iwl_fw_ini_region_internal_buffer {
|
|||
* @id: region id. Max id is &IWL_FW_INI_MAX_REGION_ID
|
||||
* @type: region type. One of &enum iwl_fw_ini_region_type
|
||||
* @sub_type: region sub type
|
||||
* @sub_type_ver: region sub type
|
||||
* @sub_type_ver: region sub type version
|
||||
* @reserved: not in use
|
||||
* @name: region name
|
||||
* @dev_addr: device address configuration. Used by
|
||||
|
@ -386,7 +386,16 @@ enum iwl_fw_ini_region_type {
|
|||
IWL_FW_INI_REGION_NUM
|
||||
}; /* FW_TLV_DEBUG_REGION_TYPE_API_E */
|
||||
|
||||
#define IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_HW_SMEM 1
|
||||
enum iwl_fw_ini_region_device_memory_subtype {
|
||||
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_HW_SMEM = 1,
|
||||
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_UMAC_ERROR_TABLE = 5,
|
||||
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_1_ERROR_TABLE = 7,
|
||||
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_2_ERROR_TABLE = 10,
|
||||
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_1_ERROR_TABLE = 14,
|
||||
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_2_ERROR_TABLE = 16,
|
||||
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_1_ERROR_TABLE = 18,
|
||||
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_2_ERROR_TABLE = 20,
|
||||
}; /* FW_TLV_DEBUG_REGION_DEVICE_MEMORY_SUBTYPE_API_E */
|
||||
|
||||
/**
|
||||
* enum iwl_fw_ini_time_point
|
||||
|
@ -474,4 +483,17 @@ enum iwl_fw_ini_trigger_apply_policy {
|
|||
IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG = BIT(9),
|
||||
IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA = BIT(10),
|
||||
};
|
||||
|
||||
/**
|
||||
* enum iwl_fw_ini_trigger_reset_fw_policy - Determines how to handle reset
|
||||
*
|
||||
* @IWL_FW_INI_RESET_FW_MODE_NOTHING: do not stop FW and reload (default)
|
||||
* @IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY: stop FW without reload FW
|
||||
* @IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW: stop FW with reload FW
|
||||
*/
|
||||
enum iwl_fw_ini_trigger_reset_fw_policy {
|
||||
IWL_FW_INI_RESET_FW_MODE_NOTHING = 0,
|
||||
IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY,
|
||||
IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -393,17 +393,32 @@ enum iwl_mcc_source {
|
|||
MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11,
|
||||
};
|
||||
|
||||
#define IWL_TAS_BLACK_LIST_MAX 16
|
||||
#define IWL_TAS_BLOCK_LIST_MAX 16
|
||||
/**
|
||||
* struct iwl_tas_config_cmd - configures the TAS
|
||||
* struct iwl_tas_config_cmd_v2 - configures the TAS
|
||||
* @block_list_size: size of relevant field in block_list_array
|
||||
* @block_list_array: block list countries (without TAS)
|
||||
* @block_list_array: list of countries where TAS must be disabled
|
||||
*/
|
||||
struct iwl_tas_config_cmd {
|
||||
struct iwl_tas_config_cmd_v2 {
|
||||
__le32 block_list_size;
|
||||
__le32 block_list_array[IWL_TAS_BLACK_LIST_MAX];
|
||||
__le32 block_list_array[IWL_TAS_BLOCK_LIST_MAX];
|
||||
} __packed; /* TAS_CONFIG_CMD_API_S_VER_2 */
|
||||
|
||||
/**
|
||||
* struct iwl_tas_config_cmd_v3 - configures the TAS
|
||||
* @block_list_size: size of relevant field in block_list_array
|
||||
* @block_list_array: list of countries where TAS must be disabled
|
||||
* @override_tas_iec: indicates whether to override default value of IEC regulatory
|
||||
* @enable_tas_iec: in case override_tas_iec is set -
|
||||
* indicates whether IEC regulatory is enabled or disabled
|
||||
*/
|
||||
struct iwl_tas_config_cmd_v3 {
|
||||
__le32 block_list_size;
|
||||
__le32 block_list_array[IWL_TAS_BLOCK_LIST_MAX];
|
||||
__le16 override_tas_iec;
|
||||
__le16 enable_tas_iec;
|
||||
} __packed; /* TAS_CONFIG_CMD_API_S_VER_3 */
|
||||
|
||||
/**
|
||||
* enum iwl_lari_configs - bit masks for the various LARI config operations
|
||||
* @LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK: disable 11ac in ukraine
|
||||
|
|
|
@ -419,7 +419,7 @@ struct iwl_geo_tx_power_profiles_cmd_v1 {
|
|||
* struct iwl_geo_tx_power_profile_cmd_v2 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd.
|
||||
* @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
|
||||
* @table: offset profile per band.
|
||||
* @table_revision: BIOS table revision.
|
||||
* @table_revision: 0 for not-South Korea, 1 for South Korea (the name is misleading)
|
||||
*/
|
||||
struct iwl_geo_tx_power_profiles_cmd_v2 {
|
||||
__le32 ops;
|
||||
|
@ -431,7 +431,7 @@ struct iwl_geo_tx_power_profiles_cmd_v2 {
|
|||
* struct iwl_geo_tx_power_profile_cmd_v3 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd.
|
||||
* @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
|
||||
* @table: offset profile per band.
|
||||
* @table_revision: BIOS table revision.
|
||||
* @table_revision: 0 for not-South Korea, 1 for South Korea (the name is misleading)
|
||||
*/
|
||||
struct iwl_geo_tx_power_profiles_cmd_v3 {
|
||||
__le32 ops;
|
||||
|
@ -443,7 +443,7 @@ struct iwl_geo_tx_power_profiles_cmd_v3 {
|
|||
* struct iwl_geo_tx_power_profile_cmd_v4 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd.
|
||||
* @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
|
||||
* @table: offset profile per band.
|
||||
* @table_revision: BIOS table revision.
|
||||
* @table_revision: 0 for not-South Korea, 1 for South Korea (the name is misleading)
|
||||
*/
|
||||
struct iwl_geo_tx_power_profiles_cmd_v4 {
|
||||
__le32 ops;
|
||||
|
@ -455,7 +455,7 @@ struct iwl_geo_tx_power_profiles_cmd_v4 {
|
|||
* struct iwl_geo_tx_power_profile_cmd_v5 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd.
|
||||
* @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
|
||||
* @table: offset profile per band.
|
||||
* @table_revision: BIOS table revision.
|
||||
* @table_revision: 0 for not-South Korea, 1 for South Korea (the name is misleading)
|
||||
*/
|
||||
struct iwl_geo_tx_power_profiles_cmd_v5 {
|
||||
__le32 ops;
|
||||
|
|
|
@ -116,9 +116,20 @@ enum IWL_TLC_MNG_NSS {
|
|||
IWL_TLC_NSS_MAX
|
||||
};
|
||||
|
||||
enum IWL_TLC_HT_BW_RATES {
|
||||
IWL_TLC_HT_BW_NONE_160,
|
||||
IWL_TLC_HT_BW_160,
|
||||
/**
|
||||
* enum IWL_TLC_MCS_PER_BW - mcs index per BW
|
||||
* @IWL_TLC_MCS_PER_BW_80: mcs for bw - 20Hhz, 40Hhz, 80Hhz
|
||||
* @IWL_TLC_MCS_PER_BW_160: mcs for bw - 160Mhz
|
||||
* @IWL_TLC_MCS_PER_BW_320: mcs for bw - 320Mhz
|
||||
* @IWL_TLC_MCS_PER_BW_NUM_V3: number of entries up to version 3
|
||||
* @IWL_TLC_MCS_PER_BW_NUM_V4: number of entries from version 4
|
||||
*/
|
||||
enum IWL_TLC_MCS_PER_BW {
|
||||
IWL_TLC_MCS_PER_BW_80,
|
||||
IWL_TLC_MCS_PER_BW_160,
|
||||
IWL_TLC_MCS_PER_BW_320,
|
||||
IWL_TLC_MCS_PER_BW_NUM_V3 = IWL_TLC_MCS_PER_BW_160 + 1,
|
||||
IWL_TLC_MCS_PER_BW_NUM_V4 = IWL_TLC_MCS_PER_BW_320 + 1,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -131,8 +142,8 @@ enum IWL_TLC_HT_BW_RATES {
|
|||
* @amsdu: TX amsdu is supported
|
||||
* @flags: bitmask of &enum iwl_tlc_mng_cfg_flags
|
||||
* @non_ht_rates: bitmap of supported legacy rates
|
||||
* @ht_rates: bitmap of &enum iwl_tlc_mng_ht_rates, per <nss, channel-width>
|
||||
* pair (0 - 80mhz width and below, 1 - 160mhz).
|
||||
* @ht_rates: bitmap of &enum iwl_tlc_mng_ht_rates, per &enum IWL_TLC_MCS_PER_BW
|
||||
* <nss, channel-width> pair (0 - 80mhz width and below, 1 - 160mhz).
|
||||
* @max_mpdu_len: max MPDU length, in bytes
|
||||
* @sgi_ch_width_supp: bitmap of SGI support per channel width
|
||||
* use BIT(@enum iwl_tlc_mng_cfg_cw)
|
||||
|
@ -140,7 +151,7 @@ enum IWL_TLC_HT_BW_RATES {
|
|||
* @max_tx_op: max TXOP in uSecs for all AC (BK, BE, VO, VI),
|
||||
* set zero for no limit.
|
||||
*/
|
||||
struct iwl_tlc_config_cmd {
|
||||
struct iwl_tlc_config_cmd_v3 {
|
||||
u8 sta_id;
|
||||
u8 reserved1[3];
|
||||
u8 max_ch_width;
|
||||
|
@ -149,13 +160,44 @@ struct iwl_tlc_config_cmd {
|
|||
u8 amsdu;
|
||||
__le16 flags;
|
||||
__le16 non_ht_rates;
|
||||
__le16 ht_rates[IWL_TLC_NSS_MAX][2];
|
||||
__le16 ht_rates[IWL_TLC_NSS_MAX][IWL_TLC_MCS_PER_BW_NUM_V3];
|
||||
__le16 max_mpdu_len;
|
||||
u8 sgi_ch_width_supp;
|
||||
u8 reserved2;
|
||||
__le32 max_tx_op;
|
||||
} __packed; /* TLC_MNG_CONFIG_CMD_API_S_VER_3 */
|
||||
|
||||
/**
|
||||
* struct tlc_config_cmd - TLC configuration
|
||||
* @sta_id: station id
|
||||
* @reserved1: reserved
|
||||
* @max_ch_width: max supported channel width from &enum iwl_tlc_mng_cfg_cw
|
||||
* @mode: &enum iwl_tlc_mng_cfg_mode
|
||||
* @chains: bitmask of &enum iwl_tlc_mng_cfg_chains
|
||||
* @sgi_ch_width_supp: bitmap of SGI support per channel width
|
||||
* use BIT(&enum iwl_tlc_mng_cfg_cw)
|
||||
* @flags: bitmask of &enum iwl_tlc_mng_cfg_flags
|
||||
* @non_ht_rates: bitmap of supported legacy rates
|
||||
* @ht_rates: bitmap of &enum iwl_tlc_mng_ht_rates, per <nss, channel-width>
|
||||
* pair (0 - 80mhz width and below, 1 - 160mhz, 2 - 320mhz).
|
||||
* @max_mpdu_len: max MPDU length, in bytes
|
||||
* @max_tx_op: max TXOP in uSecs for all AC (BK, BE, VO, VI),
|
||||
* set zero for no limit.
|
||||
*/
|
||||
struct iwl_tlc_config_cmd_v4 {
|
||||
u8 sta_id;
|
||||
u8 reserved1[3];
|
||||
u8 max_ch_width;
|
||||
u8 mode;
|
||||
u8 chains;
|
||||
u8 sgi_ch_width_supp;
|
||||
__le16 flags;
|
||||
__le16 non_ht_rates;
|
||||
__le16 ht_rates[IWL_TLC_NSS_MAX][IWL_TLC_MCS_PER_BW_NUM_V4];
|
||||
__le16 max_mpdu_len;
|
||||
__le16 max_tx_op;
|
||||
} __packed; /* TLC_MNG_CONFIG_CMD_API_S_VER_4 */
|
||||
|
||||
/**
|
||||
* enum iwl_tlc_update_flags - updated fields
|
||||
* @IWL_TLC_NOTIF_FLAG_RATE: last initial rate update
|
||||
|
|
|
@ -82,6 +82,16 @@ enum iwl_scan_offload_band_selection {
|
|||
IWL_SCAN_OFFLOAD_SELECT_ANY = 0xc,
|
||||
};
|
||||
|
||||
enum iwl_scan_offload_auth_alg {
|
||||
IWL_AUTH_ALGO_UNSUPPORTED = 0x00,
|
||||
IWL_AUTH_ALGO_NONE = 0x01,
|
||||
IWL_AUTH_ALGO_PSK = 0x02,
|
||||
IWL_AUTH_ALGO_8021X = 0x04,
|
||||
IWL_AUTH_ALGO_SAE = 0x08,
|
||||
IWL_AUTH_ALGO_8021X_SHA384 = 0x10,
|
||||
IWL_AUTH_ALGO_OWE = 0x20,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_scan_offload_profile - SCAN_OFFLOAD_PROFILE_S
|
||||
* @ssid_index: index to ssid list in fixed part
|
||||
|
@ -201,7 +211,7 @@ struct iwl_scan_channel_cfg_lmac {
|
|||
__le32 iter_interval;
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
/**
|
||||
* struct iwl_scan_probe_segment - PROBE_SEGMENT_API_S_VER_1
|
||||
* @offset: offset in the data block
|
||||
* @len: length of the segment
|
||||
|
@ -211,7 +221,8 @@ struct iwl_scan_probe_segment {
|
|||
__le16 len;
|
||||
} __packed;
|
||||
|
||||
/* iwl_scan_probe_req - PROBE_REQUEST_FRAME_API_S_VER_2
|
||||
/**
|
||||
* struct iwl_scan_probe_req_v1 - PROBE_REQUEST_FRAME_API_S_VER_2
|
||||
* @mac_header: first (and common) part of the probe
|
||||
* @band_data: band specific data
|
||||
* @common_data: last (and common) part of the probe
|
||||
|
@ -224,7 +235,8 @@ struct iwl_scan_probe_req_v1 {
|
|||
u8 buf[SCAN_OFFLOAD_PROBE_REQ_SIZE];
|
||||
} __packed;
|
||||
|
||||
/* iwl_scan_probe_req - PROBE_REQUEST_FRAME_API_S_VER_v2
|
||||
/**
|
||||
* struct iwl_scan_probe_req - PROBE_REQUEST_FRAME_API_S_VER_v2
|
||||
* @mac_header: first (and common) part of the probe
|
||||
* @band_data: band specific data
|
||||
* @common_data: last (and common) part of the probe
|
||||
|
@ -247,7 +259,8 @@ enum iwl_scan_channel_flags {
|
|||
IWL_SCAN_CHANNEL_FLAG_6G_PSC_NO_FILTER = BIT(6),
|
||||
};
|
||||
|
||||
/* struct iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
|
||||
/**
|
||||
* struct iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
|
||||
* @flags: enum iwl_scan_channel_flags
|
||||
* @non_ebs_ratio: defines the ratio of number of scan iterations where EBS is
|
||||
* involved.
|
||||
|
@ -492,7 +505,7 @@ struct iwl_scan_dwell {
|
|||
} __packed;
|
||||
|
||||
/**
|
||||
* struct iwl_scan_config_v1
|
||||
* struct iwl_scan_config_v1 - scan configuration command
|
||||
* @flags: enum scan_config_flags
|
||||
* @tx_chains: valid_tx antenna - ANT_* definitions
|
||||
* @rx_chains: valid_rx antenna - ANT_* definitions
|
||||
|
@ -524,6 +537,21 @@ struct iwl_scan_config_v1 {
|
|||
#define SCAN_LB_LMAC_IDX 0
|
||||
#define SCAN_HB_LMAC_IDX 1
|
||||
|
||||
/**
|
||||
* struct iwl_scan_config_v2 - scan configuration command
|
||||
* @flags: enum scan_config_flags
|
||||
* @tx_chains: valid_tx antenna - ANT_* definitions
|
||||
* @rx_chains: valid_rx antenna - ANT_* definitions
|
||||
* @legacy_rates: default legacy rates - enum scan_config_rates
|
||||
* @out_of_channel_time: default max out of serving channel time
|
||||
* @suspend_time: default max suspend time
|
||||
* @dwell: dwells for the scan
|
||||
* @mac_addr: default mac address to be used in probes
|
||||
* @bcast_sta_id: the index of the station in the fw
|
||||
* @channel_flags: default channel flags - enum iwl_channel_flags
|
||||
* scan_config_channel_flag
|
||||
* @channel_array: default supported channels
|
||||
*/
|
||||
struct iwl_scan_config_v2 {
|
||||
__le32 flags;
|
||||
__le32 tx_chains;
|
||||
|
@ -539,7 +567,7 @@ struct iwl_scan_config_v2 {
|
|||
} __packed; /* SCAN_CONFIG_DB_CMD_API_S_2 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_config
|
||||
* struct iwl_scan_config - scan configuration command
|
||||
* @enable_cam_mode: whether to enable CAM mode.
|
||||
* @enable_promiscouos_mode: whether to enable promiscouos mode
|
||||
* @bcast_sta_id: the index of the station in the fw. Deprecated starting with
|
||||
|
@ -640,6 +668,10 @@ enum iwl_umac_scan_general_flags2 {
|
|||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_6GHZ_PASSIVE_SCAN_FILTER_IN: in case
|
||||
* &IWL_UMAC_SCAN_GEN_FLAGS_V2_6GHZ_PASSIVE_SCAN is enabled and scan is
|
||||
* activated over 6GHz PSC channels, filter in beacons and probe responses.
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_OCE: if set, send probe requests in a minimum
|
||||
* rate of 5.5Mpbs, filter in broadcast probe responses and set the max
|
||||
* channel time indication field in the FILS request parameters element
|
||||
* (if included by the driver in the probe request IEs).
|
||||
*/
|
||||
enum iwl_umac_scan_general_flags_v2 {
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_PERIODIC = BIT(0),
|
||||
|
@ -657,6 +689,7 @@ enum iwl_umac_scan_general_flags_v2 {
|
|||
IWL_UMAC_SCAN_GEN_FLAGS_V2_TRIGGER_UHB_SCAN = BIT(12),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_6GHZ_PASSIVE_SCAN = BIT(13),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_6GHZ_PASSIVE_SCAN_FILTER_IN = BIT(14),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_OCE = BIT(15),
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -177,6 +177,17 @@ 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
|
||||
|
|
|
@ -1564,7 +1564,7 @@ iwl_dump_ini_dbgi_sram_iter(struct iwl_fw_runtime *fwrt,
|
|||
iwl_write_prph_no_grab(fwrt->trans, DBGI_SRAM_TARGET_ACCESS_CFG,
|
||||
DBGI_SRAM_TARGET_ACCESS_CFG_RESET_ADDRESS_MSK);
|
||||
for (i = 0; i < (le32_to_cpu(reg->dev_addr.size) / 4); i++) {
|
||||
prph_data = iwl_read_prph(fwrt->trans, (i % 2) ?
|
||||
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 == 0x5a5a5a5a) {
|
||||
|
@ -2110,7 +2110,7 @@ static u32 iwl_dump_ini_info(struct iwl_fw_runtime *fwrt,
|
|||
*/
|
||||
hw_type = CSR_HW_REV_TYPE(fwrt->trans->hw_rev);
|
||||
if (hw_type == IWL_AX210_HW_TYPE) {
|
||||
u32 prph_val = iwl_read_prph(fwrt->trans, WFPM_OTP_CFG1_ADDR_GEN2);
|
||||
u32 prph_val = iwl_read_umac_prph(fwrt->trans, WFPM_OTP_CFG1_ADDR);
|
||||
u32 is_jacket = !!(prph_val & WFPM_OTP_CFG1_IS_JACKET_BIT);
|
||||
u32 is_cdb = !!(prph_val & WFPM_OTP_CFG1_IS_CDB_BIT);
|
||||
u32 masked_bits = is_jacket | (is_cdb << 1);
|
||||
|
@ -2719,6 +2719,9 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
|
|||
|
||||
iwl_fw_dbg_stop_restart_recording(fwrt, ¶ms, false);
|
||||
|
||||
if (fwrt->trans->dbg.last_tp_resetfw == IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY)
|
||||
iwl_force_nmi(fwrt->trans);
|
||||
|
||||
out:
|
||||
if (iwl_trans_dbg_ini_valid(fwrt->trans)) {
|
||||
iwl_fw_error_dump_data_free(dump_data);
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "iwl-io.h"
|
||||
#include "iwl-prph.h"
|
||||
#include "iwl-csr.h"
|
||||
#include "pnvm.h"
|
||||
|
||||
/*
|
||||
* Note: This structure is read from the device with IO accesses,
|
||||
|
@ -19,53 +20,6 @@
|
|||
* read with u32-sized accesses, any members with a different size
|
||||
* need to be ordered correctly though!
|
||||
*/
|
||||
struct iwl_error_event_table_v1 {
|
||||
u32 valid; /* (nonzero) valid, (0) log is empty */
|
||||
u32 error_id; /* type of error */
|
||||
u32 pc; /* program counter */
|
||||
u32 blink1; /* branch link */
|
||||
u32 blink2; /* branch link */
|
||||
u32 ilink1; /* interrupt link */
|
||||
u32 ilink2; /* interrupt link */
|
||||
u32 data1; /* error-specific data */
|
||||
u32 data2; /* error-specific data */
|
||||
u32 data3; /* error-specific data */
|
||||
u32 bcon_time; /* beacon timer */
|
||||
u32 tsf_low; /* network timestamp function timer */
|
||||
u32 tsf_hi; /* network timestamp function timer */
|
||||
u32 gp1; /* GP1 timer register */
|
||||
u32 gp2; /* GP2 timer register */
|
||||
u32 gp3; /* GP3 timer register */
|
||||
u32 ucode_ver; /* uCode version */
|
||||
u32 hw_ver; /* HW Silicon version */
|
||||
u32 brd_ver; /* HW board version */
|
||||
u32 log_pc; /* log program counter */
|
||||
u32 frame_ptr; /* frame pointer */
|
||||
u32 stack_ptr; /* stack pointer */
|
||||
u32 hcmd; /* last host command header */
|
||||
u32 isr0; /* isr status register LMPM_NIC_ISR0:
|
||||
* rxtx_flag */
|
||||
u32 isr1; /* isr status register LMPM_NIC_ISR1:
|
||||
* host_flag */
|
||||
u32 isr2; /* isr status register LMPM_NIC_ISR2:
|
||||
* enc_flag */
|
||||
u32 isr3; /* isr status register LMPM_NIC_ISR3:
|
||||
* time_flag */
|
||||
u32 isr4; /* isr status register LMPM_NIC_ISR4:
|
||||
* wico interrupt */
|
||||
u32 isr_pref; /* isr status register LMPM_NIC_PREF_STAT */
|
||||
u32 wait_event; /* wait event() caller address */
|
||||
u32 l2p_control; /* L2pControlField */
|
||||
u32 l2p_duration; /* L2pDurationField */
|
||||
u32 l2p_mhvalid; /* L2pMhValidBits */
|
||||
u32 l2p_addr_match; /* L2pAddrMatchStat */
|
||||
u32 lmpm_pmg_sel; /* indicate which clocks are turned on
|
||||
* (LMPM_PMG_SEL) */
|
||||
u32 u_timestamp; /* indicate when the date and time of the
|
||||
* compilation */
|
||||
u32 flow_handler; /* FH read/write pointers, RX credit */
|
||||
} __packed /* LOG_ERROR_TABLE_API_S_VER_1 */;
|
||||
|
||||
struct iwl_error_event_table {
|
||||
u32 valid; /* (nonzero) valid, (0) log is empty */
|
||||
u32 error_id; /* type of error */
|
||||
|
@ -147,6 +101,7 @@ static void iwl_fwrt_dump_umac_error_log(struct iwl_fw_runtime *fwrt)
|
|||
struct iwl_trans *trans = fwrt->trans;
|
||||
struct iwl_umac_error_event_table table = {};
|
||||
u32 base = fwrt->trans->dbg.umac_error_event_table;
|
||||
char pnvm_name[MAX_PNVM_NAME];
|
||||
|
||||
if (!base &&
|
||||
!(fwrt->trans->dbg.error_event_table_tlv_status &
|
||||
|
@ -164,6 +119,13 @@ static void iwl_fwrt_dump_umac_error_log(struct iwl_fw_runtime *fwrt)
|
|||
fwrt->trans->status, table.valid);
|
||||
}
|
||||
|
||||
if ((table.error_id & ~FW_SYSASSERT_CPU_MASK) ==
|
||||
FW_SYSASSERT_PNVM_MISSING) {
|
||||
iwl_pnvm_get_fs_name(trans, pnvm_name, sizeof(pnvm_name));
|
||||
IWL_ERR(fwrt, "PNVM data is missing, please install %s\n",
|
||||
pnvm_name);
|
||||
}
|
||||
|
||||
IWL_ERR(fwrt, "0x%08X | %s\n", table.error_id,
|
||||
iwl_fw_lookup_assert_desc(table.error_id));
|
||||
IWL_ERR(fwrt, "0x%08X | umac branchlink1\n", table.blink1);
|
||||
|
@ -297,21 +259,21 @@ struct iwl_tcm_error_event_table {
|
|||
u32 reserved[4];
|
||||
} __packed; /* TCM_LOG_ERROR_TABLE_API_S_VER_1 */
|
||||
|
||||
static void iwl_fwrt_dump_tcm_error_log(struct iwl_fw_runtime *fwrt)
|
||||
static void iwl_fwrt_dump_tcm_error_log(struct iwl_fw_runtime *fwrt, int idx)
|
||||
{
|
||||
struct iwl_trans *trans = fwrt->trans;
|
||||
struct iwl_tcm_error_event_table table = {};
|
||||
u32 base = fwrt->trans->dbg.tcm_error_event_table;
|
||||
u32 base = fwrt->trans->dbg.tcm_error_event_table[idx];
|
||||
int i;
|
||||
u32 flag = idx ? IWL_ERROR_EVENT_TABLE_TCM2 :
|
||||
IWL_ERROR_EVENT_TABLE_TCM1;
|
||||
|
||||
if (!base ||
|
||||
!(fwrt->trans->dbg.error_event_table_tlv_status &
|
||||
IWL_ERROR_EVENT_TABLE_TCM))
|
||||
if (!base || !(fwrt->trans->dbg.error_event_table_tlv_status & flag))
|
||||
return;
|
||||
|
||||
iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table));
|
||||
|
||||
IWL_ERR(fwrt, "TCM status:\n");
|
||||
IWL_ERR(fwrt, "TCM%d status:\n", idx + 1);
|
||||
IWL_ERR(fwrt, "0x%08X | error ID\n", table.error_id);
|
||||
IWL_ERR(fwrt, "0x%08X | tcm branchlink2\n", table.blink2);
|
||||
IWL_ERR(fwrt, "0x%08X | tcm interruptlink1\n", table.ilink1);
|
||||
|
@ -330,13 +292,72 @@ static void iwl_fwrt_dump_tcm_error_log(struct iwl_fw_runtime *fwrt)
|
|||
for (i = 0; i < ARRAY_SIZE(table.sw_status); i++)
|
||||
IWL_ERR(fwrt, "0x%08X | tcm SW status[%d]\n",
|
||||
table.sw_status[i], i);
|
||||
}
|
||||
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ) {
|
||||
u32 scratch = iwl_read32(trans, CSR_FUNC_SCRATCH);
|
||||
/*
|
||||
* RCM error struct.
|
||||
* Note: This structure is read from the device with IO accesses,
|
||||
* and the reading already does the endian conversion. As it is
|
||||
* read with u32-sized accesses, any members with a different size
|
||||
* need to be ordered correctly though!
|
||||
*/
|
||||
struct iwl_rcm_error_event_table {
|
||||
u32 valid;
|
||||
u32 error_id;
|
||||
u32 blink2;
|
||||
u32 ilink1;
|
||||
u32 ilink2;
|
||||
u32 data1, data2, data3;
|
||||
u32 logpc;
|
||||
u32 frame_pointer;
|
||||
u32 stack_pointer;
|
||||
u32 msgid;
|
||||
u32 isr;
|
||||
u32 frame_hw_status;
|
||||
u32 mbx_lmac_to_rcm_req;
|
||||
u32 mbx_rcm_to_lmac_req;
|
||||
u32 mh_ctl;
|
||||
u32 mh_addr1_lo;
|
||||
u32 mh_info;
|
||||
u32 mh_err;
|
||||
u32 reserved[3];
|
||||
} __packed; /* RCM_LOG_ERROR_TABLE_API_S_VER_1 */
|
||||
|
||||
IWL_ERR(fwrt, "Function Scratch status:\n");
|
||||
IWL_ERR(fwrt, "0x%08X | Func Scratch\n", scratch);
|
||||
}
|
||||
static void iwl_fwrt_dump_rcm_error_log(struct iwl_fw_runtime *fwrt, int idx)
|
||||
{
|
||||
struct iwl_trans *trans = fwrt->trans;
|
||||
struct iwl_rcm_error_event_table table = {};
|
||||
u32 base = fwrt->trans->dbg.rcm_error_event_table[idx];
|
||||
u32 flag = idx ? IWL_ERROR_EVENT_TABLE_RCM2 :
|
||||
IWL_ERROR_EVENT_TABLE_RCM1;
|
||||
|
||||
if (!base || !(fwrt->trans->dbg.error_event_table_tlv_status & flag))
|
||||
return;
|
||||
|
||||
iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table));
|
||||
|
||||
IWL_ERR(fwrt, "RCM%d status:\n", idx + 1);
|
||||
IWL_ERR(fwrt, "0x%08X | error ID\n", table.error_id);
|
||||
IWL_ERR(fwrt, "0x%08X | rcm branchlink2\n", table.blink2);
|
||||
IWL_ERR(fwrt, "0x%08X | rcm interruptlink1\n", table.ilink1);
|
||||
IWL_ERR(fwrt, "0x%08X | rcm interruptlink2\n", table.ilink2);
|
||||
IWL_ERR(fwrt, "0x%08X | rcm data1\n", table.data1);
|
||||
IWL_ERR(fwrt, "0x%08X | rcm data2\n", table.data2);
|
||||
IWL_ERR(fwrt, "0x%08X | rcm data3\n", table.data3);
|
||||
IWL_ERR(fwrt, "0x%08X | rcm log PC\n", table.logpc);
|
||||
IWL_ERR(fwrt, "0x%08X | rcm frame pointer\n", table.frame_pointer);
|
||||
IWL_ERR(fwrt, "0x%08X | rcm stack pointer\n", table.stack_pointer);
|
||||
IWL_ERR(fwrt, "0x%08X | rcm msg ID\n", table.msgid);
|
||||
IWL_ERR(fwrt, "0x%08X | rcm ISR status\n", table.isr);
|
||||
IWL_ERR(fwrt, "0x%08X | frame HW status\n", table.frame_hw_status);
|
||||
IWL_ERR(fwrt, "0x%08X | LMAC-to-RCM request mbox\n",
|
||||
table.mbx_lmac_to_rcm_req);
|
||||
IWL_ERR(fwrt, "0x%08X | RCM-to-LMAC request mbox\n",
|
||||
table.mbx_rcm_to_lmac_req);
|
||||
IWL_ERR(fwrt, "0x%08X | MAC header control\n", table.mh_ctl);
|
||||
IWL_ERR(fwrt, "0x%08X | MAC header addr1 low\n", table.mh_addr1_lo);
|
||||
IWL_ERR(fwrt, "0x%08X | MAC header info\n", table.mh_info);
|
||||
IWL_ERR(fwrt, "0x%08X | MAC header error\n", table.mh_err);
|
||||
}
|
||||
|
||||
static void iwl_fwrt_dump_iml_error_log(struct iwl_fw_runtime *fwrt)
|
||||
|
@ -420,8 +441,18 @@ void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt)
|
|||
if (fwrt->trans->dbg.lmac_error_event_table[1])
|
||||
iwl_fwrt_dump_lmac_error_log(fwrt, 1);
|
||||
iwl_fwrt_dump_umac_error_log(fwrt);
|
||||
iwl_fwrt_dump_tcm_error_log(fwrt);
|
||||
iwl_fwrt_dump_tcm_error_log(fwrt, 0);
|
||||
iwl_fwrt_dump_rcm_error_log(fwrt, 0);
|
||||
iwl_fwrt_dump_tcm_error_log(fwrt, 1);
|
||||
iwl_fwrt_dump_rcm_error_log(fwrt, 1);
|
||||
iwl_fwrt_dump_iml_error_log(fwrt);
|
||||
iwl_fwrt_dump_fseq_regs(fwrt);
|
||||
|
||||
if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ) {
|
||||
u32 scratch = iwl_read32(fwrt->trans, CSR_FUNC_SCRATCH);
|
||||
|
||||
IWL_ERR(fwrt, "Function Scratch status:\n");
|
||||
IWL_ERR(fwrt, "0x%08X | Func Scratch\n", scratch);
|
||||
}
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_fwrt_dump_error_logs);
|
||||
|
|
|
@ -98,7 +98,6 @@ enum iwl_ucode_tlv_type {
|
|||
|
||||
IWL_UCODE_TLV_PNVM_VERSION = 62,
|
||||
IWL_UCODE_TLV_PNVM_SKU = 64,
|
||||
IWL_UCODE_TLV_TCM_DEBUG_ADDRS = 65,
|
||||
|
||||
IWL_UCODE_TLV_SEC_TABLE_ADDR = 66,
|
||||
IWL_UCODE_TLV_D3_KEK_KCK_ADDR = 67,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright(c) 2019 - 2020 Intel Corporation
|
||||
* Copyright(c) 2019 - 2021 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "img.h"
|
||||
|
@ -49,10 +49,9 @@ u8 iwl_fw_lookup_notif_ver(const struct iwl_fw *fw, u8 grp, u8 cmd, u8 def)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(iwl_fw_lookup_notif_ver);
|
||||
|
||||
#define FW_SYSASSERT_CPU_MASK 0xf0000000
|
||||
static const struct {
|
||||
const char *name;
|
||||
u8 num;
|
||||
u32 num;
|
||||
} advanced_lookup[] = {
|
||||
{ "NMI_INTERRUPT_WDG", 0x34 },
|
||||
{ "SYSASSERT", 0x35 },
|
||||
|
@ -73,6 +72,7 @@ static const struct {
|
|||
{ "NMI_INTERRUPT_ACTION_PT", 0x7C },
|
||||
{ "NMI_INTERRUPT_UNKNOWN", 0x84 },
|
||||
{ "NMI_INTERRUPT_INST_ACTION_PT", 0x86 },
|
||||
{ "PNVM_MISSING", FW_SYSASSERT_PNVM_MISSING },
|
||||
{ "ADVANCED_SYSASSERT", 0 },
|
||||
};
|
||||
|
||||
|
|
|
@ -279,4 +279,8 @@ u8 iwl_fw_lookup_cmd_ver(const struct iwl_fw *fw, u8 grp, u8 cmd, u8 def);
|
|||
|
||||
u8 iwl_fw_lookup_notif_ver(const struct iwl_fw *fw, u8 grp, u8 cmd, u8 def);
|
||||
const char *iwl_fw_lookup_assert_desc(u32 num);
|
||||
|
||||
#define FW_SYSASSERT_CPU_MASK 0xf0000000
|
||||
#define FW_SYSASSERT_PNVM_MISSING 0x0010070d
|
||||
|
||||
#endif /* __iwl_fw_img_h__ */
|
||||
|
|
|
@ -158,7 +158,8 @@ struct iwl_fw_runtime {
|
|||
u32 geo_rev;
|
||||
u32 geo_num_profiles;
|
||||
bool geo_enabled;
|
||||
union iwl_ppag_table_cmd ppag_table;
|
||||
struct iwl_ppag_chain ppag_chains[IWL_NUM_CHAIN_LIMITS];
|
||||
u32 ppag_flags;
|
||||
u32 ppag_ver;
|
||||
struct iwl_sar_offset_mapping_cmd sgom_table;
|
||||
bool sgom_enabled;
|
||||
|
|
|
@ -84,6 +84,10 @@ enum iwl_nvm_type {
|
|||
#define IWL_DEFAULT_MAX_TX_POWER 22
|
||||
#define IWL_TX_CSUM_NETIF_FLAGS (NETIF_F_IPV6_CSUM | NETIF_F_IP_CSUM |\
|
||||
NETIF_F_TSO | NETIF_F_TSO6)
|
||||
#define IWL_TX_CSUM_NETIF_FLAGS_BZ (NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6)
|
||||
#define IWL_CSUM_NETIF_FLAGS_MASK (IWL_TX_CSUM_NETIF_FLAGS | \
|
||||
IWL_TX_CSUM_NETIF_FLAGS_BZ | \
|
||||
NETIF_F_RXCSUM)
|
||||
|
||||
/* Antenna presence definitions */
|
||||
#define ANT_NONE 0x0
|
||||
|
@ -448,6 +452,9 @@ struct iwl_cfg {
|
|||
#define IWL_CFG_NO_CDB 0x0
|
||||
#define IWL_CFG_CDB 0x1
|
||||
|
||||
#define IWL_CFG_NO_JACKET 0x0
|
||||
#define IWL_CFG_IS_JACKET 0x1
|
||||
|
||||
#define IWL_SUBDEVICE_RF_ID(subdevice) ((u16)((subdevice) & 0x00F0) >> 4)
|
||||
#define IWL_SUBDEVICE_NO_160(subdevice) ((u16)((subdevice) & 0x0200) >> 9)
|
||||
#define IWL_SUBDEVICE_CORES(subdevice) ((u16)((subdevice) & 0x1C00) >> 10)
|
||||
|
@ -462,6 +469,7 @@ struct iwl_dev_info {
|
|||
u8 no_160;
|
||||
u8 cores;
|
||||
u8 cdb;
|
||||
u8 jacket;
|
||||
const struct iwl_cfg *cfg;
|
||||
const char *name;
|
||||
};
|
||||
|
@ -634,6 +642,11 @@ 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_gl_a0_fm_a0;
|
||||
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_a0_gf4_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_bnj_a0_hr_b0;
|
||||
#endif /* CONFIG_IWLMVM */
|
||||
|
||||
#endif /* __IWL_CONFIG_H__ */
|
||||
|
|
|
@ -109,9 +109,10 @@
|
|||
#define CSR_IPC_SLEEP_CONTROL_SUSPEND 0x3
|
||||
#define CSR_IPC_SLEEP_CONTROL_RESUME 0
|
||||
|
||||
/* Doorbell NMI (since Bz) */
|
||||
/* Doorbell - since Bz
|
||||
* connected to UREG_DOORBELL_TO_ISR6 (lower 16 bits only)
|
||||
*/
|
||||
#define CSR_DOORBELL_VECTOR (CSR_BASE + 0x130)
|
||||
#define CSR_DOORBELL_VECTOR_NMI BIT(1)
|
||||
|
||||
/* host chicken bits */
|
||||
#define CSR_HOST_CHICKEN (CSR_BASE + 0x204)
|
||||
|
|
|
@ -233,6 +233,7 @@ static int iwl_dbg_tlv_alloc_trigger(struct iwl_trans *trans,
|
|||
const struct iwl_fw_ini_trigger_tlv *trig = (const void *)tlv->data;
|
||||
struct iwl_fw_ini_trigger_tlv *dup_trig;
|
||||
u32 tp = le32_to_cpu(trig->time_point);
|
||||
u32 rf = le32_to_cpu(trig->reset_fw);
|
||||
struct iwl_ucode_tlv *dup = NULL;
|
||||
int ret;
|
||||
|
||||
|
@ -247,6 +248,10 @@ static int iwl_dbg_tlv_alloc_trigger(struct iwl_trans *trans,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
IWL_DEBUG_FW(trans,
|
||||
"WRT: time point %u for trigger TLV with reset_fw %u\n",
|
||||
tp, rf);
|
||||
trans->dbg.last_tp_resetfw = 0xFF;
|
||||
if (!le32_to_cpu(trig->occurrences)) {
|
||||
dup = kmemdup(tlv, sizeof(*tlv) + le32_to_cpu(tlv->length),
|
||||
GFP_KERNEL);
|
||||
|
@ -300,14 +305,21 @@ static int (*dbg_tlv_alloc[])(struct iwl_trans *trans,
|
|||
void iwl_dbg_tlv_alloc(struct iwl_trans *trans, const struct iwl_ucode_tlv *tlv,
|
||||
bool ext)
|
||||
{
|
||||
const struct iwl_fw_ini_header *hdr = (const void *)&tlv->data[0];
|
||||
u32 type = le32_to_cpu(tlv->type);
|
||||
u32 tlv_idx = type - IWL_UCODE_TLV_DEBUG_BASE;
|
||||
u32 domain = le32_to_cpu(hdr->domain);
|
||||
enum iwl_ini_cfg_state *cfg_state = ext ?
|
||||
&trans->dbg.external_ini_cfg : &trans->dbg.internal_ini_cfg;
|
||||
const struct iwl_fw_ini_header *hdr = (const void *)&tlv->data[0];
|
||||
u32 type;
|
||||
u32 tlv_idx;
|
||||
u32 domain;
|
||||
int ret;
|
||||
|
||||
if (le32_to_cpu(tlv->length) < sizeof(*hdr))
|
||||
return;
|
||||
|
||||
type = le32_to_cpu(tlv->type);
|
||||
tlv_idx = type - IWL_UCODE_TLV_DEBUG_BASE;
|
||||
domain = le32_to_cpu(hdr->domain);
|
||||
|
||||
if (domain != IWL_FW_INI_DOMAIN_ALWAYS_ON &&
|
||||
!(domain & trans->dbg.domains_bitmap)) {
|
||||
IWL_DEBUG_FW(trans,
|
||||
|
@ -1159,6 +1171,8 @@ iwl_dbg_tlv_tp_trigger(struct iwl_fw_runtime *fwrt, bool sync,
|
|||
u32 num_data = iwl_tlv_array_len(&node->tlv, dump_data.trig,
|
||||
data);
|
||||
int ret, i;
|
||||
u32 tp = le32_to_cpu(dump_data.trig->time_point);
|
||||
|
||||
|
||||
if (!num_data) {
|
||||
ret = iwl_fw_dbg_ini_collect(fwrt, &dump_data, sync);
|
||||
|
@ -1177,8 +1191,42 @@ iwl_dbg_tlv_tp_trigger(struct iwl_fw_runtime *fwrt, bool sync,
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fwrt->trans->dbg.restart_required = FALSE;
|
||||
IWL_DEBUG_INFO(fwrt, "WRT: tp %d, reset_fw %d\n",
|
||||
tp, dump_data.trig->reset_fw);
|
||||
IWL_DEBUG_INFO(fwrt, "WRT: restart_required %d, last_tp_resetfw %d\n",
|
||||
fwrt->trans->dbg.restart_required,
|
||||
fwrt->trans->dbg.last_tp_resetfw);
|
||||
|
||||
if (fwrt->trans->trans_cfg->device_family ==
|
||||
IWL_DEVICE_FAMILY_9000) {
|
||||
fwrt->trans->dbg.restart_required = TRUE;
|
||||
} else if (tp == IWL_FW_INI_TIME_POINT_FW_ASSERT &&
|
||||
fwrt->trans->dbg.last_tp_resetfw ==
|
||||
IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY) {
|
||||
fwrt->trans->dbg.restart_required = FALSE;
|
||||
fwrt->trans->dbg.last_tp_resetfw = 0xFF;
|
||||
IWL_DEBUG_FW(fwrt, "WRT: FW_ASSERT due to reset_fw_mode-no restart\n");
|
||||
} else if (le32_to_cpu(dump_data.trig->reset_fw) ==
|
||||
IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW) {
|
||||
IWL_DEBUG_INFO(fwrt, "WRT: stop and reload firmware\n");
|
||||
fwrt->trans->dbg.restart_required = TRUE;
|
||||
} else if (le32_to_cpu(dump_data.trig->reset_fw) ==
|
||||
IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY) {
|
||||
IWL_DEBUG_INFO(fwrt, "WRT: stop only and no reload firmware\n");
|
||||
fwrt->trans->dbg.restart_required = FALSE;
|
||||
fwrt->trans->dbg.last_tp_resetfw =
|
||||
le32_to_cpu(dump_data.trig->reset_fw);
|
||||
} else if (le32_to_cpu(dump_data.trig->reset_fw) ==
|
||||
IWL_FW_INI_RESET_FW_MODE_NOTHING) {
|
||||
IWL_DEBUG_INFO(fwrt,
|
||||
"WRT: nothing need to be done after debug collection\n");
|
||||
} else {
|
||||
IWL_ERR(fwrt, "WRT: wrong resetfw %d\n",
|
||||
le32_to_cpu(dump_data.trig->reset_fw));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -130,6 +130,9 @@ static void iwl_dealloc_ucode(struct iwl_drv *drv)
|
|||
|
||||
for (i = 0; i < IWL_UCODE_TYPE_MAX; i++)
|
||||
iwl_free_fw_img(drv, drv->fw.img + i);
|
||||
|
||||
/* clear the data for the aborted load case */
|
||||
memset(&drv->fw, 0, sizeof(drv->fw));
|
||||
}
|
||||
|
||||
static int iwl_alloc_fw_desc(struct iwl_drv *drv, struct fw_desc *desc,
|
||||
|
@ -586,6 +589,66 @@ static void iwl_drv_set_dump_exclude(struct iwl_drv *drv,
|
|||
excl->size = le32_to_cpu(fw->size);
|
||||
}
|
||||
|
||||
static void iwl_parse_dbg_tlv_assert_tables(struct iwl_drv *drv,
|
||||
const struct iwl_ucode_tlv *tlv)
|
||||
{
|
||||
const struct iwl_fw_ini_region_tlv *region;
|
||||
u32 length = le32_to_cpu(tlv->length);
|
||||
u32 addr;
|
||||
|
||||
if (length < offsetof(typeof(*region), special_mem) +
|
||||
sizeof(region->special_mem))
|
||||
return;
|
||||
|
||||
region = (void *)tlv->data;
|
||||
addr = le32_to_cpu(region->special_mem.base_addr);
|
||||
addr += le32_to_cpu(region->special_mem.offset);
|
||||
addr &= ~FW_ADDR_CACHE_CONTROL;
|
||||
|
||||
if (region->type != IWL_FW_INI_REGION_SPECIAL_DEVICE_MEMORY)
|
||||
return;
|
||||
|
||||
switch (region->sub_type) {
|
||||
case IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_UMAC_ERROR_TABLE:
|
||||
drv->trans->dbg.umac_error_event_table = addr;
|
||||
drv->trans->dbg.error_event_table_tlv_status |=
|
||||
IWL_ERROR_EVENT_TABLE_UMAC;
|
||||
break;
|
||||
case IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_1_ERROR_TABLE:
|
||||
drv->trans->dbg.lmac_error_event_table[0] = addr;
|
||||
drv->trans->dbg.error_event_table_tlv_status |=
|
||||
IWL_ERROR_EVENT_TABLE_LMAC1;
|
||||
break;
|
||||
case IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_2_ERROR_TABLE:
|
||||
drv->trans->dbg.lmac_error_event_table[1] = addr;
|
||||
drv->trans->dbg.error_event_table_tlv_status |=
|
||||
IWL_ERROR_EVENT_TABLE_LMAC2;
|
||||
break;
|
||||
case IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_1_ERROR_TABLE:
|
||||
drv->trans->dbg.tcm_error_event_table[0] = addr;
|
||||
drv->trans->dbg.error_event_table_tlv_status |=
|
||||
IWL_ERROR_EVENT_TABLE_TCM1;
|
||||
break;
|
||||
case IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_2_ERROR_TABLE:
|
||||
drv->trans->dbg.tcm_error_event_table[1] = addr;
|
||||
drv->trans->dbg.error_event_table_tlv_status |=
|
||||
IWL_ERROR_EVENT_TABLE_TCM2;
|
||||
break;
|
||||
case IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_1_ERROR_TABLE:
|
||||
drv->trans->dbg.rcm_error_event_table[0] = addr;
|
||||
drv->trans->dbg.error_event_table_tlv_status |=
|
||||
IWL_ERROR_EVENT_TABLE_RCM1;
|
||||
break;
|
||||
case IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_2_ERROR_TABLE:
|
||||
drv->trans->dbg.rcm_error_event_table[1] = addr;
|
||||
drv->trans->dbg.error_event_table_tlv_status |=
|
||||
IWL_ERROR_EVENT_TABLE_RCM2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
|
||||
const struct firmware *ucode_raw,
|
||||
struct iwl_firmware_pieces *pieces,
|
||||
|
@ -1153,21 +1216,12 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
|
|||
IWL_ERROR_EVENT_TABLE_LMAC1;
|
||||
break;
|
||||
}
|
||||
case IWL_UCODE_TLV_TCM_DEBUG_ADDRS: {
|
||||
struct iwl_fw_tcm_error_addr *ptr = (void *)tlv_data;
|
||||
|
||||
if (tlv_len != sizeof(*ptr))
|
||||
goto invalid_tlv_len;
|
||||
drv->trans->dbg.tcm_error_event_table =
|
||||
le32_to_cpu(ptr->addr) & ~FW_ADDR_CACHE_CONTROL;
|
||||
drv->trans->dbg.error_event_table_tlv_status |=
|
||||
IWL_ERROR_EVENT_TABLE_TCM;
|
||||
break;
|
||||
}
|
||||
case IWL_UCODE_TLV_TYPE_REGIONS:
|
||||
iwl_parse_dbg_tlv_assert_tables(drv, tlv);
|
||||
fallthrough;
|
||||
case IWL_UCODE_TLV_TYPE_DEBUG_INFO:
|
||||
case IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION:
|
||||
case IWL_UCODE_TLV_TYPE_HCMD:
|
||||
case IWL_UCODE_TLV_TYPE_REGIONS:
|
||||
case IWL_UCODE_TLV_TYPE_TRIGGERS:
|
||||
case IWL_UCODE_TLV_TYPE_CONF_SET:
|
||||
if (iwlwifi_mod_params.enable_ini)
|
||||
|
@ -1375,6 +1429,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
|
|||
int i;
|
||||
bool load_module = false;
|
||||
bool usniffer_images = false;
|
||||
bool failure = true;
|
||||
|
||||
fw->ucode_capa.max_probe_length = IWL_DEFAULT_MAX_PROBE_LENGTH;
|
||||
fw->ucode_capa.standard_phy_calibration_size =
|
||||
|
@ -1635,15 +1690,9 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
|
|||
* else from proceeding if the module fails to load
|
||||
* or hangs loading.
|
||||
*/
|
||||
if (load_module) {
|
||||
if (load_module)
|
||||
request_module("%s", op->name);
|
||||
#ifdef CONFIG_IWLWIFI_OPMODE_MODULAR
|
||||
if (err)
|
||||
IWL_ERR(drv,
|
||||
"failed to load module %s (error %d), is dynamic loading enabled?\n",
|
||||
op->name, err);
|
||||
#endif
|
||||
}
|
||||
failure = false;
|
||||
goto free;
|
||||
|
||||
try_again:
|
||||
|
@ -1659,6 +1708,9 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
|
|||
complete(&drv->request_firmware_complete);
|
||||
device_release_driver(drv->trans->dev);
|
||||
free:
|
||||
if (failure)
|
||||
iwl_dealloc_ucode(drv);
|
||||
|
||||
if (pieces) {
|
||||
for (i = 0; i < ARRAY_SIZE(pieces->img); i++)
|
||||
kfree(pieces->img[i].sec);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "iwl-modparams.h"
|
||||
#include "iwl-eeprom-parse.h"
|
||||
|
||||
#if IS_ENABLED(CONFIG_IWLDVM)
|
||||
/* EEPROM offset definitions */
|
||||
|
||||
/* indirect access definitions */
|
||||
|
@ -647,6 +648,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
|
|||
|
||||
return n_channels;
|
||||
}
|
||||
#endif
|
||||
|
||||
int iwl_init_sband_channels(struct iwl_nvm_data *data,
|
||||
struct ieee80211_supported_band *sband,
|
||||
|
@ -750,6 +752,7 @@ void iwl_init_ht_hw_capab(struct iwl_trans *trans,
|
|||
}
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IWLDVM)
|
||||
static void iwl_init_sbands(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
struct iwl_nvm_data *data,
|
||||
const u8 *eeprom, size_t eeprom_size)
|
||||
|
@ -873,3 +876,4 @@ iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
|||
return NULL;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_parse_eeprom_data);
|
||||
#endif
|
||||
|
|
|
@ -580,7 +580,7 @@ struct iwl_rb_status {
|
|||
__le16 closed_fr_num;
|
||||
__le16 finished_rb_num;
|
||||
__le16 finished_fr_nam;
|
||||
__le32 __unused;
|
||||
__le32 __spare;
|
||||
} __packed;
|
||||
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ void iwl_force_nmi(struct iwl_trans *trans)
|
|||
UREG_DOORBELL_TO_ISR6_NMI_BIT);
|
||||
else
|
||||
iwl_write32(trans, CSR_DOORBELL_VECTOR,
|
||||
CSR_DOORBELL_VECTOR_NMI);
|
||||
UREG_DOORBELL_TO_ISR6_NMI_BIT);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_force_nmi);
|
||||
|
||||
|
|
|
@ -347,9 +347,7 @@
|
|||
#define RADIO_REG_SYS_MANUAL_DFT_0 0xAD4078
|
||||
#define RFIC_REG_RD 0xAD0470
|
||||
#define WFPM_CTRL_REG 0xA03030
|
||||
#define WFPM_CTRL_REG_GEN2 0xd03030
|
||||
#define WFPM_OTP_CFG1_ADDR 0x00a03098
|
||||
#define WFPM_OTP_CFG1_ADDR_GEN2 0x00d03098
|
||||
#define WFPM_OTP_CFG1_IS_JACKET_BIT BIT(4)
|
||||
#define WFPM_OTP_CFG1_IS_CDB_BIT BIT(5)
|
||||
|
||||
|
|
|
@ -193,7 +193,10 @@ enum iwl_error_event_table_status {
|
|||
IWL_ERROR_EVENT_TABLE_LMAC1 = BIT(0),
|
||||
IWL_ERROR_EVENT_TABLE_LMAC2 = BIT(1),
|
||||
IWL_ERROR_EVENT_TABLE_UMAC = BIT(2),
|
||||
IWL_ERROR_EVENT_TABLE_TCM = BIT(3),
|
||||
IWL_ERROR_EVENT_TABLE_TCM1 = BIT(3),
|
||||
IWL_ERROR_EVENT_TABLE_TCM2 = BIT(4),
|
||||
IWL_ERROR_EVENT_TABLE_RCM1 = BIT(5),
|
||||
IWL_ERROR_EVENT_TABLE_RCM2 = BIT(6),
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -728,7 +731,8 @@ struct iwl_self_init_dram {
|
|||
* @trigger_tlv: array of pointers to triggers TLVs for debug
|
||||
* @lmac_error_event_table: addrs of lmacs error tables
|
||||
* @umac_error_event_table: addr of umac error table
|
||||
* @tcm_error_event_table: address of TCM error table
|
||||
* @tcm_error_event_table: address(es) of TCM error table(s)
|
||||
* @rcm_error_event_table: address(es) of RCM error table(s)
|
||||
* @error_event_table_tlv_status: bitmap that indicates what error table
|
||||
* pointers was recevied via TLV. uses enum &iwl_error_event_table_status
|
||||
* @internal_ini_cfg: internal debug cfg state. Uses &enum iwl_ini_cfg_state
|
||||
|
@ -755,7 +759,8 @@ struct iwl_trans_debug {
|
|||
|
||||
u32 lmac_error_event_table[2];
|
||||
u32 umac_error_event_table;
|
||||
u32 tcm_error_event_table;
|
||||
u32 tcm_error_event_table[2];
|
||||
u32 rcm_error_event_table[2];
|
||||
unsigned int error_event_table_tlv_status;
|
||||
|
||||
enum iwl_ini_cfg_state internal_ini_cfg;
|
||||
|
@ -778,6 +783,8 @@ struct iwl_trans_debug {
|
|||
|
||||
u32 domains_bitmap;
|
||||
u32 ucode_preset;
|
||||
bool restart_required;
|
||||
u32 last_tp_resetfw;
|
||||
};
|
||||
|
||||
struct iwl_dma_ptr {
|
||||
|
|
|
@ -175,7 +175,7 @@ struct iwl_mei {
|
|||
};
|
||||
|
||||
/**
|
||||
* iwl_mei_cache - cache for the parameters from iwlwifi
|
||||
* struct iwl_mei_cache - cache for the parameters from iwlwifi
|
||||
* @ops: Callbacks to iwlwifi.
|
||||
* @netdev: The netdev that will be used to transmit / receive packets.
|
||||
* @conn_info: The connection info message triggered by iwlwifi's association.
|
||||
|
@ -191,7 +191,7 @@ struct iwl_mei {
|
|||
* is cached here so that we can buffer the configuration even if we don't have
|
||||
* a bind from the mei bus and hence, on iwl_mei structure.
|
||||
*/
|
||||
static struct {
|
||||
struct iwl_mei_cache {
|
||||
const struct iwl_mei_ops *ops;
|
||||
struct net_device __rcu *netdev;
|
||||
const struct iwl_sap_notif_connection_info *conn_info;
|
||||
|
@ -201,7 +201,9 @@ static struct {
|
|||
u8 mac_address[6];
|
||||
u8 nvm_address[6];
|
||||
void *priv;
|
||||
} iwl_mei_cache = {
|
||||
};
|
||||
|
||||
static struct iwl_mei_cache iwl_mei_cache = {
|
||||
.rf_kill = SAP_HW_RFKILL_DEASSERTED | SAP_SW_RFKILL_DEASSERTED
|
||||
};
|
||||
|
||||
|
@ -1703,6 +1705,7 @@ void iwl_mei_unregister_complete(void)
|
|||
mei_cldev_get_drvdata(iwl_mei_global_cldev);
|
||||
|
||||
iwl_mei_send_sap_msg(mei->cldev, SAP_MSG_NOTIF_WIFIDR_DOWN);
|
||||
mei->got_ownership = false;
|
||||
}
|
||||
|
||||
mutex_unlock(&iwl_mei_mutex);
|
||||
|
@ -1781,7 +1784,7 @@ static void iwl_mei_dbgfs_unregister(struct iwl_mei *mei) {}
|
|||
|
||||
#endif /* CONFIG_DEBUG_FS */
|
||||
|
||||
/**
|
||||
/*
|
||||
* iwl_mei_probe - the probe function called by the mei bus enumeration
|
||||
*
|
||||
* This allocates the data needed by iwlmei and sets a pointer to this data
|
||||
|
@ -1809,6 +1812,12 @@ static int iwl_mei_probe(struct mei_cl_device *cldev,
|
|||
mei_cldev_set_drvdata(cldev, mei);
|
||||
mei->cldev = cldev;
|
||||
|
||||
/*
|
||||
* The CSME firmware needs to boot the internal WLAN client. Wait here
|
||||
* so that the DMA map request will succeed.
|
||||
*/
|
||||
msleep(20);
|
||||
|
||||
ret = iwl_mei_alloc_shared_mem(cldev);
|
||||
if (ret)
|
||||
goto free;
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
#define IWL_MVM_FTM_NON_TB_MAX_TIME_BETWEEN_MSR 1000
|
||||
#define IWL_MVM_D3_DEBUG false
|
||||
#define IWL_MVM_USE_TWT true
|
||||
#define IWL_MVM_AMPDU_CONSEC_DROPS_DELBA 10
|
||||
#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
|
||||
|
|
|
@ -2072,6 +2072,7 @@ void iwl_mvm_dbgfs_register(struct iwl_mvm *mvm)
|
|||
MVM_DEBUGFS_ADD_FILE(prph_reg, mvm->debugfs_dir, 0600);
|
||||
MVM_DEBUGFS_ADD_FILE(fw_dbg_conf, mvm->debugfs_dir, 0600);
|
||||
MVM_DEBUGFS_ADD_FILE(fw_dbg_collect, mvm->debugfs_dir, 0200);
|
||||
MVM_DEBUGFS_ADD_FILE(dbg_time_point, mvm->debugfs_dir, 0200);
|
||||
MVM_DEBUGFS_ADD_FILE(send_echo_cmd, mvm->debugfs_dir, 0200);
|
||||
MVM_DEBUGFS_ADD_FILE(indirection_tbl, mvm->debugfs_dir, 0200);
|
||||
MVM_DEBUGFS_ADD_FILE(inject_packet, mvm->debugfs_dir, 0200);
|
||||
|
|
|
@ -511,7 +511,7 @@ iwl_mvm_ftm_put_target(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
|||
rcu_read_lock();
|
||||
|
||||
sta = rcu_dereference(mvm->fw_id_to_mac_id[mvmvif->ap_sta_id]);
|
||||
if (sta->mfp)
|
||||
if (sta->mfp && (peer->ftm.trigger_based || peer->ftm.non_trigger_based))
|
||||
FTM_PUT_FLAG(PMF);
|
||||
|
||||
rcu_read_unlock();
|
||||
|
@ -1066,7 +1066,8 @@ static void iwl_mvm_ftm_rtt_smoothing(struct iwl_mvm *mvm,
|
|||
overshoot = IWL_MVM_FTM_INITIATOR_SMOOTH_OVERSHOOT;
|
||||
alpha = IWL_MVM_FTM_INITIATOR_SMOOTH_ALPHA;
|
||||
|
||||
rtt_avg = (alpha * rtt + (100 - alpha) * resp->rtt_avg) / 100;
|
||||
rtt_avg = alpha * rtt + (100 - alpha) * resp->rtt_avg;
|
||||
do_div(rtt_avg, 100);
|
||||
|
||||
IWL_DEBUG_INFO(mvm,
|
||||
"%pM: prev rtt_avg=%lld, new rtt_avg=%lld, rtt=%lld\n",
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
#include "iwl-op-mode.h"
|
||||
#include "fw/img.h"
|
||||
#include "iwl-debug.h"
|
||||
#include "iwl-csr.h" /* for iwl_mvm_rx_card_state_notif */
|
||||
#include "iwl-io.h" /* for iwl_mvm_rx_card_state_notif */
|
||||
#include "iwl-prph.h"
|
||||
#include "fw/acpi.h"
|
||||
#include "fw/pnvm.h"
|
||||
|
@ -32,6 +30,9 @@
|
|||
#define IWL_PPAG_MASK 3
|
||||
#define IWL_PPAG_ETSI_MASK BIT(0)
|
||||
|
||||
#define IWL_TAS_US_MCC 0x5553
|
||||
#define IWL_TAS_CANADA_MCC 0x4341
|
||||
|
||||
struct iwl_mvm_alive_data {
|
||||
bool valid;
|
||||
u32 scd_base_addr;
|
||||
|
@ -866,6 +867,7 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
|
|||
u16 len;
|
||||
u32 n_bands;
|
||||
u32 n_profiles;
|
||||
u32 sk = 0;
|
||||
int ret;
|
||||
u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, PHY_OPS_GROUP,
|
||||
PER_CHAIN_LIMIT_OFFSET_CMD,
|
||||
|
@ -925,19 +927,26 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
|
|||
if (ret)
|
||||
return 0;
|
||||
|
||||
/* Only set to South Korea if the table revision is 1 */
|
||||
if (mvm->fwrt.geo_rev == 1)
|
||||
sk = 1;
|
||||
|
||||
/*
|
||||
* Set the revision on versions that contain it.
|
||||
* Set the table_revision to South Korea (1) or not (0). The
|
||||
* element name is misleading, as it doesn't contain the table
|
||||
* revision number, but whether the South Korea variation
|
||||
* should be used.
|
||||
* This must be done after calling iwl_sar_geo_init().
|
||||
*/
|
||||
if (cmd_ver == 5)
|
||||
cmd.v5.table_revision = cpu_to_le32(mvm->fwrt.geo_rev);
|
||||
cmd.v5.table_revision = cpu_to_le32(sk);
|
||||
else if (cmd_ver == 4)
|
||||
cmd.v4.table_revision = cpu_to_le32(mvm->fwrt.geo_rev);
|
||||
cmd.v4.table_revision = cpu_to_le32(sk);
|
||||
else if (cmd_ver == 3)
|
||||
cmd.v3.table_revision = cpu_to_le32(mvm->fwrt.geo_rev);
|
||||
cmd.v3.table_revision = cpu_to_le32(sk);
|
||||
else if (fw_has_api(&mvm->fwrt.fw->ucode_capa,
|
||||
IWL_UCODE_TLV_API_SAR_TABLE_VER))
|
||||
cmd.v2.table_revision = cpu_to_le32(mvm->fwrt.geo_rev);
|
||||
cmd.v2.table_revision = cpu_to_le32(sk);
|
||||
|
||||
return iwl_mvm_send_cmd_pdu(mvm,
|
||||
WIDE_ID(PHY_OPS_GROUP,
|
||||
|
@ -950,13 +959,8 @@ static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
|
|||
union acpi_object *wifi_pkg, *data, *flags;
|
||||
int i, j, ret, tbl_rev, num_sub_bands;
|
||||
int idx = 2;
|
||||
s8 *gain;
|
||||
|
||||
/*
|
||||
* The 'flags' field is the same in v1 and in v2 so we can just
|
||||
* use v1 to access it.
|
||||
*/
|
||||
mvm->fwrt.ppag_table.v1.flags = cpu_to_le32(0);
|
||||
mvm->fwrt.ppag_flags = 0;
|
||||
|
||||
data = iwl_acpi_get_object(mvm->dev, ACPI_PPAG_METHOD);
|
||||
if (IS_ERR(data))
|
||||
|
@ -968,8 +972,6 @@ static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
|
|||
if (!IS_ERR(wifi_pkg)) {
|
||||
if (tbl_rev == 1 || tbl_rev == 2) {
|
||||
num_sub_bands = IWL_NUM_SUB_BANDS_V2;
|
||||
gain = mvm->fwrt.ppag_table.v2.gain[0];
|
||||
mvm->fwrt.ppag_ver = tbl_rev;
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"Reading PPAG table v2 (tbl_rev=%d)\n",
|
||||
tbl_rev);
|
||||
|
@ -989,8 +991,6 @@ static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
|
|||
goto out_free;
|
||||
}
|
||||
num_sub_bands = IWL_NUM_SUB_BANDS_V1;
|
||||
gain = mvm->fwrt.ppag_table.v1.gain[0];
|
||||
mvm->fwrt.ppag_ver = 0;
|
||||
IWL_DEBUG_RADIO(mvm, "Reading PPAG table v1 (tbl_rev=0)\n");
|
||||
goto read_table;
|
||||
}
|
||||
|
@ -998,6 +998,7 @@ static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
|
|||
goto out_free;
|
||||
|
||||
read_table:
|
||||
mvm->fwrt.ppag_ver = tbl_rev;
|
||||
flags = &wifi_pkg->package.elements[1];
|
||||
|
||||
if (flags->type != ACPI_TYPE_INTEGER) {
|
||||
|
@ -1005,10 +1006,9 @@ read_table:
|
|||
goto out_free;
|
||||
}
|
||||
|
||||
mvm->fwrt.ppag_table.v1.flags = cpu_to_le32(flags->integer.value &
|
||||
IWL_PPAG_MASK);
|
||||
mvm->fwrt.ppag_flags = flags->integer.value & IWL_PPAG_MASK;
|
||||
|
||||
if (!mvm->fwrt.ppag_table.v1.flags) {
|
||||
if (!mvm->fwrt.ppag_flags) {
|
||||
ret = 0;
|
||||
goto out_free;
|
||||
}
|
||||
|
@ -1028,15 +1028,15 @@ read_table:
|
|||
goto out_free;
|
||||
}
|
||||
|
||||
gain[i * num_sub_bands + j] = ent->integer.value;
|
||||
mvm->fwrt.ppag_chains[i].subbands[j] = ent->integer.value;
|
||||
|
||||
if ((j == 0 &&
|
||||
(gain[i * num_sub_bands + j] > ACPI_PPAG_MAX_LB ||
|
||||
gain[i * num_sub_bands + j] < ACPI_PPAG_MIN_LB)) ||
|
||||
(mvm->fwrt.ppag_chains[i].subbands[j] > ACPI_PPAG_MAX_LB ||
|
||||
mvm->fwrt.ppag_chains[i].subbands[j] < ACPI_PPAG_MIN_LB)) ||
|
||||
(j != 0 &&
|
||||
(gain[i * num_sub_bands + j] > ACPI_PPAG_MAX_HB ||
|
||||
gain[i * num_sub_bands + j] < ACPI_PPAG_MIN_HB))) {
|
||||
mvm->fwrt.ppag_table.v1.flags = cpu_to_le32(0);
|
||||
(mvm->fwrt.ppag_chains[i].subbands[j] > ACPI_PPAG_MAX_HB ||
|
||||
mvm->fwrt.ppag_chains[i].subbands[j] < ACPI_PPAG_MIN_HB))) {
|
||||
mvm->fwrt.ppag_flags = 0;
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
@ -1051,6 +1051,7 @@ out_free:
|
|||
|
||||
int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
|
||||
{
|
||||
union iwl_ppag_table_cmd cmd;
|
||||
u8 cmd_ver;
|
||||
int i, j, ret, num_sub_bands, cmd_size;
|
||||
s8 *gain;
|
||||
|
@ -1060,37 +1061,39 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
|
|||
"PPAG capability not supported by FW, command not sent.\n");
|
||||
return 0;
|
||||
}
|
||||
if (!mvm->fwrt.ppag_table.v1.flags) {
|
||||
if (!mvm->fwrt.ppag_flags) {
|
||||
IWL_DEBUG_RADIO(mvm, "PPAG not enabled, command not sent.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* The 'flags' field is the same in v1 and in v2 so we can just
|
||||
* use v1 to access it.
|
||||
*/
|
||||
cmd.v1.flags = cpu_to_le32(mvm->fwrt.ppag_flags);
|
||||
cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, PHY_OPS_GROUP,
|
||||
PER_PLATFORM_ANT_GAIN_CMD,
|
||||
IWL_FW_CMD_VER_UNKNOWN);
|
||||
if (cmd_ver == 1) {
|
||||
num_sub_bands = IWL_NUM_SUB_BANDS_V1;
|
||||
gain = mvm->fwrt.ppag_table.v1.gain[0];
|
||||
cmd_size = sizeof(mvm->fwrt.ppag_table.v1);
|
||||
gain = cmd.v1.gain[0];
|
||||
cmd_size = sizeof(cmd.v1);
|
||||
if (mvm->fwrt.ppag_ver == 1 || mvm->fwrt.ppag_ver == 2) {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"PPAG table rev is %d but FW supports v1, sending truncated table\n",
|
||||
mvm->fwrt.ppag_ver);
|
||||
mvm->fwrt.ppag_table.v1.flags &=
|
||||
cpu_to_le32(IWL_PPAG_ETSI_MASK);
|
||||
cmd.v1.flags &= cpu_to_le32(IWL_PPAG_ETSI_MASK);
|
||||
}
|
||||
} else if (cmd_ver == 2 || cmd_ver == 3) {
|
||||
num_sub_bands = IWL_NUM_SUB_BANDS_V2;
|
||||
gain = mvm->fwrt.ppag_table.v2.gain[0];
|
||||
cmd_size = sizeof(mvm->fwrt.ppag_table.v2);
|
||||
gain = cmd.v2.gain[0];
|
||||
cmd_size = sizeof(cmd.v2);
|
||||
if (mvm->fwrt.ppag_ver == 0) {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"PPAG table is v1 but FW supports v2, sending padded table\n");
|
||||
} else if (cmd_ver == 2 && mvm->fwrt.ppag_ver == 2) {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"PPAG table is v3 but FW supports v2, sending partial bitmap.\n");
|
||||
mvm->fwrt.ppag_table.v1.flags &=
|
||||
cpu_to_le32(IWL_PPAG_ETSI_MASK);
|
||||
cmd.v1.flags &= cpu_to_le32(IWL_PPAG_ETSI_MASK);
|
||||
}
|
||||
} else {
|
||||
IWL_DEBUG_RADIO(mvm, "Unsupported PPAG command version\n");
|
||||
|
@ -1099,6 +1102,8 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
|
|||
|
||||
for (i = 0; i < IWL_NUM_CHAIN_LIMITS; i++) {
|
||||
for (j = 0; j < num_sub_bands; j++) {
|
||||
gain[i * num_sub_bands + j] =
|
||||
mvm->fwrt.ppag_chains[i].subbands[j];
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"PPAG table: chain[%d] band[%d]: gain = %d\n",
|
||||
i, j, gain[i * num_sub_bands + j]);
|
||||
|
@ -1107,7 +1112,7 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
|
|||
IWL_DEBUG_RADIO(mvm, "Sending PER_PLATFORM_ANT_GAIN_CMD\n");
|
||||
ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(PHY_OPS_GROUP,
|
||||
PER_PLATFORM_ANT_GAIN_CMD),
|
||||
0, cmd_size, &mvm->fwrt.ppag_table);
|
||||
0, cmd_size, &cmd);
|
||||
if (ret < 0)
|
||||
IWL_ERR(mvm, "failed to send PER_PLATFORM_ANT_GAIN_CMD (%d)\n",
|
||||
ret);
|
||||
|
@ -1146,18 +1151,63 @@ static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
|
|||
IWL_DEBUG_RADIO(mvm,
|
||||
"System vendor '%s' is not in the approved list, disabling PPAG.\n",
|
||||
dmi_get_system_info(DMI_SYS_VENDOR));
|
||||
mvm->fwrt.ppag_table.v1.flags = cpu_to_le32(0);
|
||||
mvm->fwrt.ppag_flags = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return iwl_mvm_ppag_send_cmd(mvm);
|
||||
}
|
||||
|
||||
static const struct dmi_system_id dmi_tas_approved_list[] = {
|
||||
{ .ident = "HP",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
},
|
||||
},
|
||||
{ .ident = "SAMSUNG",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD"),
|
||||
},
|
||||
},
|
||||
{ .ident = "LENOVO",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Lenovo"),
|
||||
},
|
||||
},
|
||||
{ .ident = "DELL",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
},
|
||||
},
|
||||
|
||||
/* keep last */
|
||||
{}
|
||||
};
|
||||
|
||||
static bool iwl_mvm_add_to_tas_block_list(__le32 *list, __le32 *le_size, unsigned int mcc)
|
||||
{
|
||||
int i;
|
||||
u32 size = le32_to_cpu(*le_size);
|
||||
|
||||
/* Verify that there is room for another country */
|
||||
if (size >= IWL_TAS_BLOCK_LIST_MAX)
|
||||
return false;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
if (list[i] == cpu_to_le32(mcc))
|
||||
return true;
|
||||
}
|
||||
|
||||
list[size++] = cpu_to_le32(mcc);
|
||||
*le_size = cpu_to_le32(size);
|
||||
return true;
|
||||
}
|
||||
|
||||
static void iwl_mvm_tas_init(struct iwl_mvm *mvm)
|
||||
{
|
||||
int ret;
|
||||
struct iwl_tas_config_cmd cmd = {};
|
||||
int list_size;
|
||||
struct iwl_tas_config_cmd_v3 cmd = {};
|
||||
int cmd_size;
|
||||
|
||||
BUILD_BUG_ON(ARRAY_SIZE(cmd.block_list_array) <
|
||||
APCI_WTAS_BLACK_LIST_MAX);
|
||||
|
@ -1167,7 +1217,7 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm)
|
|||
return;
|
||||
}
|
||||
|
||||
ret = iwl_acpi_get_tas(&mvm->fwrt, cmd.block_list_array, &list_size);
|
||||
ret = iwl_acpi_get_tas(&mvm->fwrt, &cmd);
|
||||
if (ret < 0) {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"TAS table invalid or unavailable. (%d)\n",
|
||||
|
@ -1175,15 +1225,32 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm)
|
|||
return;
|
||||
}
|
||||
|
||||
if (list_size < 0)
|
||||
if (ret == 0)
|
||||
return;
|
||||
|
||||
/* list size if TAS enabled can only be non-negative */
|
||||
cmd.block_list_size = cpu_to_le32((u32)list_size);
|
||||
if (!dmi_check_system(dmi_tas_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));
|
||||
if ((!iwl_mvm_add_to_tas_block_list(cmd.block_list_array,
|
||||
&cmd.block_list_size, IWL_TAS_US_MCC)) ||
|
||||
(!iwl_mvm_add_to_tas_block_list(cmd.block_list_array,
|
||||
&cmd.block_list_size, IWL_TAS_CANADA_MCC))) {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"Unable to add US/Canada to TAS block list, disabling TAS\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
cmd_size = iwl_fw_lookup_cmd_ver(mvm->fw, REGULATORY_AND_NVM_GROUP,
|
||||
TAS_CONFIG,
|
||||
IWL_FW_CMD_VER_UNKNOWN) < 3 ?
|
||||
sizeof(struct iwl_tas_config_cmd_v2) :
|
||||
sizeof(struct iwl_tas_config_cmd_v3);
|
||||
|
||||
ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(REGULATORY_AND_NVM_GROUP,
|
||||
TAS_CONFIG),
|
||||
0, sizeof(cmd), &cmd);
|
||||
0, cmd_size, &cmd);
|
||||
if (ret < 0)
|
||||
IWL_DEBUG_RADIO(mvm, "failed to send TAS_CONFIG (%d)\n", ret);
|
||||
}
|
||||
|
@ -1755,20 +1822,6 @@ int iwl_mvm_load_d3_fw(struct iwl_mvm *mvm)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void iwl_mvm_rx_card_state_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb)
|
||||
{
|
||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||
struct iwl_card_state_notif *card_state_notif = (void *)pkt->data;
|
||||
u32 flags = le32_to_cpu(card_state_notif->flags);
|
||||
|
||||
IWL_DEBUG_RF_KILL(mvm, "Card state received: HW:%s SW:%s CT:%s\n",
|
||||
(flags & HW_CARD_DISABLED) ? "Kill" : "On",
|
||||
(flags & SW_CARD_DISABLED) ? "Kill" : "On",
|
||||
(flags & CT_KILL_CARD_DISABLED) ?
|
||||
"Reached" : "Not reached");
|
||||
}
|
||||
|
||||
void iwl_mvm_rx_mfuart_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb)
|
||||
{
|
||||
|
|
|
@ -641,14 +641,21 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
|
|||
}
|
||||
|
||||
if (iwl_mvm_is_oce_supported(mvm)) {
|
||||
u8 scan_ver = iwl_fw_lookup_cmd_ver(mvm->fw,
|
||||
IWL_ALWAYS_LONG_GROUP,
|
||||
SCAN_REQ_UMAC, 0);
|
||||
|
||||
wiphy_ext_feature_set(hw->wiphy,
|
||||
NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP);
|
||||
wiphy_ext_feature_set(hw->wiphy,
|
||||
NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME);
|
||||
wiphy_ext_feature_set(hw->wiphy,
|
||||
NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION);
|
||||
wiphy_ext_feature_set(hw->wiphy,
|
||||
NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE);
|
||||
|
||||
/* Old firmware also supports probe deferral and suppression */
|
||||
if (scan_ver < 15)
|
||||
wiphy_ext_feature_set(hw->wiphy,
|
||||
NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION);
|
||||
}
|
||||
|
||||
if (mvm->nvm_data->sku_cap_11ax_enable &&
|
||||
|
@ -710,8 +717,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
|
|||
|
||||
hw->netdev_features |= mvm->cfg->features;
|
||||
if (!iwl_mvm_is_csum_supported(mvm))
|
||||
hw->netdev_features &= ~(IWL_TX_CSUM_NETIF_FLAGS |
|
||||
NETIF_F_RXCSUM);
|
||||
hw->netdev_features &= ~IWL_CSUM_NETIF_FLAGS_MASK;
|
||||
|
||||
if (mvm->cfg->vht_mu_mimo_supported)
|
||||
wiphy_ext_feature_set(hw->wiphy,
|
||||
|
@ -5517,6 +5523,10 @@ static bool iwl_mvm_mac_can_aggregate(struct ieee80211_hw *hw,
|
|||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
|
||||
if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ)
|
||||
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;
|
||||
|
|
|
@ -1518,6 +1518,7 @@ void iwl_mvm_mac_itxq_xmit(struct ieee80211_hw *hw, struct ieee80211_txq *txq);
|
|||
unsigned int iwl_mvm_max_amsdu_size(struct iwl_mvm *mvm,
|
||||
struct ieee80211_sta *sta,
|
||||
unsigned int tid);
|
||||
u32 iwl_mvm_tx_csum_bz(struct iwl_mvm *mvm, struct sk_buff *skb, bool amsdu);
|
||||
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
const char *iwl_mvm_get_tx_fail_reason(u32 status);
|
||||
|
@ -1623,8 +1624,6 @@ void iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb);
|
|||
void iwl_mvm_rx_ant_coupling_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb);
|
||||
void iwl_mvm_rx_fw_error(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb);
|
||||
void iwl_mvm_rx_card_state_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb);
|
||||
void iwl_mvm_rx_mfuart_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb);
|
||||
void iwl_mvm_rx_shared_mem_cfg_notif(struct iwl_mvm *mvm,
|
||||
|
|
|
@ -258,6 +258,7 @@ enum iwl_rx_handler_context {
|
|||
/**
|
||||
* struct iwl_rx_handlers handler for FW notification
|
||||
* @cmd_id: command id
|
||||
* @min_size: minimum size to expect for the notification
|
||||
* @context: see &iwl_rx_handler_context
|
||||
* @fn: the function is called when notification is received
|
||||
*/
|
||||
|
@ -332,9 +333,6 @@ static const struct iwl_rx_handlers iwl_mvm_rx_handlers[] = {
|
|||
iwl_mvm_rx_umac_scan_iter_complete_notif, RX_HANDLER_SYNC,
|
||||
struct iwl_umac_scan_iter_complete_notif),
|
||||
|
||||
RX_HANDLER(CARD_STATE_NOTIFICATION, iwl_mvm_rx_card_state_notif,
|
||||
RX_HANDLER_SYNC, struct iwl_card_state_notif),
|
||||
|
||||
RX_HANDLER(MISSED_BEACONS_NOTIFICATION, iwl_mvm_rx_missed_beacons_notif,
|
||||
RX_HANDLER_SYNC, struct iwl_missed_beacons_notif),
|
||||
|
||||
|
@ -455,7 +453,6 @@ static const struct iwl_hcmd_names iwl_mvm_legacy_names[] = {
|
|||
HCMD_NAME(STATISTICS_NOTIFICATION),
|
||||
HCMD_NAME(EOSP_NOTIFICATION),
|
||||
HCMD_NAME(REDUCE_TX_POWER_CMD),
|
||||
HCMD_NAME(CARD_STATE_NOTIFICATION),
|
||||
HCMD_NAME(MISSED_BEACONS_NOTIFICATION),
|
||||
HCMD_NAME(TDLS_CONFIG_CMD),
|
||||
HCMD_NAME(MAC_PM_POWER_TABLE),
|
||||
|
@ -718,6 +715,8 @@ get_nvm_from_fw:
|
|||
ret = iwl_trans_start_hw(mvm->trans);
|
||||
if (ret) {
|
||||
mutex_unlock(&mvm->mutex);
|
||||
wiphy_unlock(mvm->hw->wiphy);
|
||||
rtnl_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1304,13 +1303,19 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
|||
|
||||
mvm->mei_registered = !iwl_mei_register(mvm, &mei_ops);
|
||||
|
||||
if (iwl_mvm_start_get_nvm(mvm)) {
|
||||
/*
|
||||
* Get NVM failed, but we are registered to MEI, we'll get
|
||||
* the NVM later when it'll be possible to get it from CSME.
|
||||
* Getting NVM failed while CSME is the owner, but we are
|
||||
* registered to MEI, we'll get the NVM later when it'll be
|
||||
* possible to get it from CSME.
|
||||
*/
|
||||
if (iwl_mvm_start_get_nvm(mvm) && mvm->mei_registered)
|
||||
if (trans->csme_own && mvm->mei_registered)
|
||||
return op_mode;
|
||||
|
||||
goto out_thermal_exit;
|
||||
}
|
||||
|
||||
|
||||
if (iwl_mvm_start_post_nvm(mvm))
|
||||
goto out_thermal_exit;
|
||||
|
||||
|
@ -1837,9 +1842,16 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
|
|||
|
||||
iwl_fw_error_collect(&mvm->fwrt, false);
|
||||
|
||||
if (fw_error && mvm->fw_restart > 0)
|
||||
if (fw_error && mvm->fw_restart > 0) {
|
||||
mvm->fw_restart--;
|
||||
ieee80211_restart_hw(mvm->hw);
|
||||
} else if (mvm->fwrt.trans->dbg.restart_required) {
|
||||
IWL_DEBUG_INFO(mvm, "FW restart requested after debug collection\n");
|
||||
mvm->fwrt.trans->dbg.restart_required = FALSE;
|
||||
ieee80211_restart_hw(mvm->hw);
|
||||
} else if (mvm->trans->trans_cfg->device_family <= IWL_DEVICE_FAMILY_8000) {
|
||||
ieee80211_restart_hw(mvm->hw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1870,7 +1882,7 @@ static void iwl_mvm_nic_error(struct iwl_op_mode *op_mode, bool sync)
|
|||
if (!test_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status))
|
||||
return;
|
||||
|
||||
iwl_mvm_nic_restart(mvm, true);
|
||||
iwl_mvm_nic_restart(mvm, false);
|
||||
}
|
||||
|
||||
static void iwl_mvm_cmd_queue_full(struct iwl_op_mode *op_mode)
|
||||
|
@ -1919,6 +1931,9 @@ static void iwl_mvm_rx_mq_rss(struct iwl_op_mode *op_mode,
|
|||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||
u16 cmd = WIDE_ID(pkt->hdr.group_id, pkt->hdr.cmd);
|
||||
|
||||
if (unlikely(queue >= mvm->trans->num_rx_queues))
|
||||
return;
|
||||
|
||||
if (unlikely(cmd == WIDE_ID(LEGACY_GROUP, FRAME_RELEASE)))
|
||||
iwl_mvm_rx_frame_release(mvm, napi, rxb, queue);
|
||||
else if (unlikely(cmd == WIDE_ID(DATA_PATH_GROUP,
|
||||
|
|
|
@ -12,34 +12,52 @@
|
|||
* frequency values in the adjusted format.
|
||||
*/
|
||||
static const struct iwl_rfi_lut_entry iwl_rfi_table[IWL_RFI_LUT_SIZE] = {
|
||||
/* LPDDR4 */
|
||||
/* frequency 2667MHz */
|
||||
{cpu_to_le16(160), {50, 58, 60, 62, 64, 52, 54, 56},
|
||||
{PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,
|
||||
PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,}},
|
||||
|
||||
/* frequency 2933MHz */
|
||||
{cpu_to_le16(176), {149, 151, 153, 157, 159, 161, 165, 163, 167, 169,
|
||||
171, 173, 175},
|
||||
{PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,
|
||||
PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,
|
||||
PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,}},
|
||||
|
||||
/* frequency 3200MHz */
|
||||
{cpu_to_le16(192), {79, 81, 83, 85, 87, 89, 91, 93},
|
||||
{PHY_BAND_6, PHY_BAND_6, PHY_BAND_6, PHY_BAND_6, PHY_BAND_6,
|
||||
PHY_BAND_6, PHY_BAND_6, PHY_BAND_6,}},
|
||||
|
||||
/* frequency 3733MHz */
|
||||
{cpu_to_le16(223), {114, 116, 118, 120, 122,},
|
||||
{PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,}},
|
||||
{cpu_to_le16(223), {114, 116, 118, 120, 122, 106, 110, 124, 126},
|
||||
{PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,
|
||||
PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,}},
|
||||
|
||||
/* frequency 4000MHz */
|
||||
{cpu_to_le16(240), {114, 151, 155, 157, 159, 161, 165},
|
||||
{PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,
|
||||
PHY_BAND_5, PHY_BAND_5,}},
|
||||
|
||||
/* frequency 4267MHz */
|
||||
{cpu_to_le16(256), {79, 83, 85, 87, 89, 91, 93,},
|
||||
{PHY_BAND_6, PHY_BAND_6, PHY_BAND_6, PHY_BAND_6, PHY_BAND_6,
|
||||
PHY_BAND_6, PHY_BAND_6,}},
|
||||
|
||||
/* DDR5ePOR */
|
||||
|
||||
/* frequency 4000MHz */
|
||||
{cpu_to_le16(240), {3, 5, 7, 9, 11, 13, 15,},
|
||||
{PHY_BAND_6, PHY_BAND_6, PHY_BAND_6, PHY_BAND_6, PHY_BAND_6,
|
||||
PHY_BAND_6, PHY_BAND_6,}},
|
||||
|
||||
/* frequency 4400MHz */
|
||||
{cpu_to_le16(264), {111, 119, 123, 125, 129, 131, 133, 135, 143,},
|
||||
{PHY_BAND_6, PHY_BAND_6, PHY_BAND_6, PHY_BAND_6, PHY_BAND_6,
|
||||
PHY_BAND_6, PHY_BAND_6, PHY_BAND_6, PHY_BAND_6,}},
|
||||
|
||||
/* LPDDR5iPOR */
|
||||
|
||||
/* frequency 5200MHz */
|
||||
{cpu_to_le16(312), {36, 38, 40, 42, 50,},
|
||||
{PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,}},
|
||||
{cpu_to_le16(312), {36, 38, 40, 42, 44, 46, 50,},
|
||||
{PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,
|
||||
PHY_BAND_5, PHY_BAND_5,}},
|
||||
|
||||
/* frequency 5600MHz */
|
||||
{cpu_to_le16(336), {106, 110, 112, 114, 116, 118, 120, 122},
|
||||
{PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,
|
||||
PHY_BAND_5, PHY_BAND_5, PHY_BAND_5,}},
|
||||
|
||||
/* frequency 6000MHz */
|
||||
{cpu_to_le16(360), {3, 5, 7, 9, 11, 13, 15,},
|
||||
|
|
|
@ -129,7 +129,7 @@ int rs_fw_vht_highest_rx_mcs_index(const struct ieee80211_sta_vht_cap *vht_cap,
|
|||
static void
|
||||
rs_fw_vht_set_enabled_rates(const struct ieee80211_sta *sta,
|
||||
const struct ieee80211_sta_vht_cap *vht_cap,
|
||||
struct iwl_tlc_config_cmd *cmd)
|
||||
struct iwl_tlc_config_cmd_v4 *cmd)
|
||||
{
|
||||
u16 supp;
|
||||
int i, highest_mcs;
|
||||
|
@ -154,7 +154,7 @@ rs_fw_vht_set_enabled_rates(const struct ieee80211_sta *sta,
|
|||
if (sta->bandwidth == IEEE80211_STA_RX_BW_20)
|
||||
supp &= ~BIT(IWL_TLC_MNG_HT_RATE_MCS9);
|
||||
|
||||
cmd->ht_rates[i][IWL_TLC_HT_BW_NONE_160] = cpu_to_le16(supp);
|
||||
cmd->ht_rates[i][IWL_TLC_MCS_PER_BW_80] = cpu_to_le16(supp);
|
||||
/*
|
||||
* Check if VHT extended NSS indicates that the bandwidth/NSS
|
||||
* configuration is supported - only for MCS 0 since we already
|
||||
|
@ -164,8 +164,8 @@ rs_fw_vht_set_enabled_rates(const struct ieee80211_sta *sta,
|
|||
ieee80211_get_vht_max_nss(&ieee_vht_cap,
|
||||
IEEE80211_VHT_CHANWIDTH_160MHZ,
|
||||
0, true, nss) >= nss)
|
||||
cmd->ht_rates[i][IWL_TLC_HT_BW_160] =
|
||||
cmd->ht_rates[i][IWL_TLC_HT_BW_NONE_160];
|
||||
cmd->ht_rates[i][IWL_TLC_MCS_PER_BW_160] =
|
||||
cmd->ht_rates[i][IWL_TLC_MCS_PER_BW_80];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ static u16 rs_fw_he_ieee80211_mcs_to_rs_mcs(u16 mcs)
|
|||
static void
|
||||
rs_fw_he_set_enabled_rates(const struct ieee80211_sta *sta,
|
||||
struct ieee80211_supported_band *sband,
|
||||
struct iwl_tlc_config_cmd *cmd)
|
||||
struct iwl_tlc_config_cmd_v4 *cmd)
|
||||
{
|
||||
const struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
|
||||
u16 mcs_160 = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
|
||||
|
@ -219,7 +219,7 @@ rs_fw_he_set_enabled_rates(const struct ieee80211_sta *sta,
|
|||
}
|
||||
if (_mcs_80 > _tx_mcs_80)
|
||||
_mcs_80 = _tx_mcs_80;
|
||||
cmd->ht_rates[i][IWL_TLC_HT_BW_NONE_160] =
|
||||
cmd->ht_rates[i][IWL_TLC_MCS_PER_BW_80] =
|
||||
cpu_to_le16(rs_fw_he_ieee80211_mcs_to_rs_mcs(_mcs_80));
|
||||
|
||||
/* If one side doesn't support - mark both as not supporting */
|
||||
|
@ -230,14 +230,14 @@ rs_fw_he_set_enabled_rates(const struct ieee80211_sta *sta,
|
|||
}
|
||||
if (_mcs_160 > _tx_mcs_160)
|
||||
_mcs_160 = _tx_mcs_160;
|
||||
cmd->ht_rates[i][IWL_TLC_HT_BW_160] =
|
||||
cmd->ht_rates[i][IWL_TLC_MCS_PER_BW_160] =
|
||||
cpu_to_le16(rs_fw_he_ieee80211_mcs_to_rs_mcs(_mcs_160));
|
||||
}
|
||||
}
|
||||
|
||||
static void rs_fw_set_supp_rates(struct ieee80211_sta *sta,
|
||||
struct ieee80211_supported_band *sband,
|
||||
struct iwl_tlc_config_cmd *cmd)
|
||||
struct iwl_tlc_config_cmd_v4 *cmd)
|
||||
{
|
||||
int i;
|
||||
u16 supp = 0;
|
||||
|
@ -263,15 +263,15 @@ static void rs_fw_set_supp_rates(struct ieee80211_sta *sta,
|
|||
rs_fw_vht_set_enabled_rates(sta, vht_cap, cmd);
|
||||
} else if (ht_cap->ht_supported) {
|
||||
cmd->mode = IWL_TLC_MNG_MODE_HT;
|
||||
cmd->ht_rates[IWL_TLC_NSS_1][IWL_TLC_HT_BW_NONE_160] =
|
||||
cmd->ht_rates[IWL_TLC_NSS_1][IWL_TLC_MCS_PER_BW_80] =
|
||||
cpu_to_le16(ht_cap->mcs.rx_mask[0]);
|
||||
|
||||
/* the station support only a single receive chain */
|
||||
if (sta->smps_mode == IEEE80211_SMPS_STATIC)
|
||||
cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] =
|
||||
cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_MCS_PER_BW_80] =
|
||||
0;
|
||||
else
|
||||
cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] =
|
||||
cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_MCS_PER_BW_80] =
|
||||
cpu_to_le16(ht_cap->mcs.rx_mask[1]);
|
||||
}
|
||||
}
|
||||
|
@ -317,7 +317,8 @@ void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm,
|
|||
|
||||
if (iwl_fw_lookup_notif_ver(mvm->fw, DATA_PATH_GROUP,
|
||||
TLC_MNG_UPDATE_NOTIF, 0) < 3) {
|
||||
rs_pretty_print_rate_v1(pretty_rate, sizeof(pretty_rate),
|
||||
rs_pretty_print_rate_v1(pretty_rate,
|
||||
sizeof(pretty_rate),
|
||||
le32_to_cpu(notif->rate));
|
||||
IWL_DEBUG_RATE(mvm,
|
||||
"Got rate in old format. Rate: %s. Converting.\n",
|
||||
|
@ -422,23 +423,18 @@ void rs_fw_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|||
u32 cmd_id = iwl_cmd_id(TLC_MNG_CONFIG_CMD, DATA_PATH_GROUP, 0);
|
||||
struct ieee80211_supported_band *sband = hw->wiphy->bands[band];
|
||||
u16 max_amsdu_len = rs_fw_get_max_amsdu_len(sta);
|
||||
struct iwl_tlc_config_cmd cfg_cmd = {
|
||||
struct iwl_tlc_config_cmd_v4 cfg_cmd = {
|
||||
.sta_id = mvmsta->sta_id,
|
||||
.max_ch_width = update ?
|
||||
rs_fw_bw_from_sta_bw(sta) : RATE_MCS_CHAN_WIDTH_20,
|
||||
.flags = cpu_to_le16(rs_fw_get_config_flags(mvm, sta, sband)),
|
||||
.chains = rs_fw_set_active_chains(iwl_mvm_get_valid_tx_ant(mvm)),
|
||||
.sgi_ch_width_supp = rs_fw_sgi_cw_support(sta),
|
||||
.max_mpdu_len = cpu_to_le16(max_amsdu_len),
|
||||
.amsdu = iwl_mvm_is_csum_supported(mvm),
|
||||
.max_mpdu_len = iwl_mvm_is_csum_supported(mvm) ?
|
||||
cpu_to_le16(max_amsdu_len) : 0,
|
||||
};
|
||||
int ret;
|
||||
u16 cmd_size = sizeof(cfg_cmd);
|
||||
|
||||
/* In old versions of the API the struct is 4 bytes smaller */
|
||||
if (iwl_fw_lookup_cmd_ver(mvm->fw, DATA_PATH_GROUP,
|
||||
TLC_MNG_CONFIG_CMD, 0) < 3)
|
||||
cmd_size -= 4;
|
||||
int cmd_ver;
|
||||
|
||||
memset(lq_sta, 0, offsetof(typeof(*lq_sta), pers));
|
||||
|
||||
|
@ -453,8 +449,41 @@ void rs_fw_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|||
*/
|
||||
sta->max_amsdu_len = max_amsdu_len;
|
||||
|
||||
cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, DATA_PATH_GROUP,
|
||||
TLC_MNG_CONFIG_CMD, 0);
|
||||
if (cmd_ver == 4) {
|
||||
ret = iwl_mvm_send_cmd_pdu(mvm, cmd_id, CMD_ASYNC,
|
||||
sizeof(cfg_cmd), &cfg_cmd);
|
||||
} else if (cmd_ver < 4) {
|
||||
struct iwl_tlc_config_cmd_v3 cfg_cmd_v3 = {
|
||||
.sta_id = cfg_cmd.sta_id,
|
||||
.max_ch_width = cfg_cmd.max_ch_width,
|
||||
.mode = cfg_cmd.mode,
|
||||
.chains = cfg_cmd.chains,
|
||||
.amsdu = !!cfg_cmd.max_mpdu_len,
|
||||
.flags = cfg_cmd.flags,
|
||||
.non_ht_rates = cfg_cmd.non_ht_rates,
|
||||
.ht_rates[0][0] = cfg_cmd.ht_rates[0][0],
|
||||
.ht_rates[0][1] = cfg_cmd.ht_rates[0][1],
|
||||
.ht_rates[1][0] = cfg_cmd.ht_rates[1][0],
|
||||
.ht_rates[1][1] = cfg_cmd.ht_rates[1][1],
|
||||
.sgi_ch_width_supp = cfg_cmd.sgi_ch_width_supp,
|
||||
.max_mpdu_len = cfg_cmd.max_mpdu_len,
|
||||
};
|
||||
|
||||
u16 cmd_size = sizeof(cfg_cmd_v3);
|
||||
|
||||
/* In old versions of the API the struct is 4 bytes smaller */
|
||||
if (iwl_fw_lookup_cmd_ver(mvm->fw, DATA_PATH_GROUP,
|
||||
TLC_MNG_CONFIG_CMD, 0) < 3)
|
||||
cmd_size -= 4;
|
||||
|
||||
ret = iwl_mvm_send_cmd_pdu(mvm, cmd_id, CMD_ASYNC, cmd_size,
|
||||
&cfg_cmd);
|
||||
&cfg_cmd_v3);
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
if (ret)
|
||||
IWL_ERR(mvm, "Failed to send rate scale config (%d)\n", ret);
|
||||
}
|
||||
|
|
|
@ -121,12 +121,39 @@ static int iwl_mvm_create_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
struct iwl_rx_mpdu_desc *desc = (void *)pkt->data;
|
||||
unsigned int headlen, fraglen, pad_len = 0;
|
||||
unsigned int hdrlen = ieee80211_hdrlen(hdr->frame_control);
|
||||
u8 mic_crc_len = u8_get_bits(desc->mac_flags1,
|
||||
IWL_RX_MPDU_MFLG1_MIC_CRC_LEN_MASK) << 1;
|
||||
|
||||
if (desc->mac_flags2 & IWL_RX_MPDU_MFLG2_PAD) {
|
||||
len -= 2;
|
||||
pad_len = 2;
|
||||
}
|
||||
|
||||
/*
|
||||
* For non monitor interface strip the bytes the RADA might not have
|
||||
* removed. As monitor interface cannot exist with other interfaces
|
||||
* this removal is safe.
|
||||
*/
|
||||
if (mic_crc_len && !ieee80211_hw_check(mvm->hw, RX_INCLUDES_FCS)) {
|
||||
u32 pkt_flags = le32_to_cpu(pkt->len_n_flags);
|
||||
|
||||
/*
|
||||
* If RADA was not enabled then decryption was not performed so
|
||||
* the MIC cannot be removed.
|
||||
*/
|
||||
if (!(pkt_flags & FH_RSCSR_RADA_EN)) {
|
||||
if (WARN_ON(crypt_len > mic_crc_len))
|
||||
return -EINVAL;
|
||||
|
||||
mic_crc_len -= crypt_len;
|
||||
}
|
||||
|
||||
if (WARN_ON(mic_crc_len > len))
|
||||
return -EINVAL;
|
||||
|
||||
len -= mic_crc_len;
|
||||
}
|
||||
|
||||
/* If frame is small enough to fit in skb->head, pull it completely.
|
||||
* If not, only pull ieee80211_hdr (including crypto if present, and
|
||||
* an additional 8 bytes for SNAP/ethertype, see below) so that
|
||||
|
@ -149,18 +176,8 @@ static int iwl_mvm_create_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
*/
|
||||
hdrlen += crypt_len;
|
||||
|
||||
if (WARN_ONCE(headlen < hdrlen,
|
||||
"invalid packet lengths (hdrlen=%d, len=%d, crypt_len=%d)\n",
|
||||
hdrlen, len, crypt_len)) {
|
||||
/*
|
||||
* We warn and trace because we want to be able to see
|
||||
* it in trace-cmd as well.
|
||||
*/
|
||||
IWL_DEBUG_RX(mvm,
|
||||
"invalid packet lengths (hdrlen=%d, len=%d, crypt_len=%d)\n",
|
||||
hdrlen, len, crypt_len);
|
||||
if (unlikely(headlen < hdrlen))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
skb_put_data(skb, hdr, hdrlen);
|
||||
skb_put_data(skb, (u8 *)hdr + hdrlen + pad_len, headlen - hdrlen);
|
||||
|
@ -172,8 +189,12 @@ static int iwl_mvm_create_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
* in the cases the hardware didn't handle, since it's rare to see
|
||||
* such packets, even though the hardware did calculate the checksum
|
||||
* in this case, just starting after the MAC header instead.
|
||||
*
|
||||
* Starting from Bz hardware, it calculates starting directly after
|
||||
* the MAC header, so that matches mac80211's expectation.
|
||||
*/
|
||||
if (skb->ip_summed == CHECKSUM_COMPLETE) {
|
||||
if (skb->ip_summed == CHECKSUM_COMPLETE &&
|
||||
mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_BZ) {
|
||||
struct {
|
||||
u8 hdr[6];
|
||||
__be16 type;
|
||||
|
@ -1964,8 +1985,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
|
|||
} else if (format == RATE_MCS_VHT_MSK) {
|
||||
u8 stbc = (rate_n_flags & RATE_MCS_STBC_MSK) >>
|
||||
RATE_MCS_STBC_POS;
|
||||
rx_status->nss =
|
||||
((rate_n_flags & RATE_MCS_NSS_MSK) >>
|
||||
rx_status->nss = ((rate_n_flags & RATE_MCS_NSS_MSK) >>
|
||||
RATE_MCS_NSS_POS) + 1;
|
||||
rx_status->rate_idx = rate_n_flags & RATE_MCS_CODE_MSK;
|
||||
rx_status->encoding = RX_ENC_VHT;
|
||||
|
|
|
@ -579,7 +579,9 @@ iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm,
|
|||
profile->ssid_index = i;
|
||||
/* Support any cipher and auth algorithm */
|
||||
profile->unicast_cipher = 0xff;
|
||||
profile->auth_alg = 0xff;
|
||||
profile->auth_alg = IWL_AUTH_ALGO_UNSUPPORTED |
|
||||
IWL_AUTH_ALGO_NONE | IWL_AUTH_ALGO_PSK | IWL_AUTH_ALGO_8021X |
|
||||
IWL_AUTH_ALGO_SAE | IWL_AUTH_ALGO_8021X_SHA384 | IWL_AUTH_ALGO_OWE;
|
||||
profile->network_type = IWL_NETWORK_TYPE_ANY;
|
||||
profile->band_selection = IWL_SCAN_OFFLOAD_SELECT_ANY;
|
||||
profile->client_bitmap = SCAN_CLIENT_SCHED_SCAN;
|
||||
|
@ -1826,8 +1828,6 @@ iwl_mvm_umac_scan_cfg_channels_v6_6g(struct iwl_mvm_scan_params *params,
|
|||
}
|
||||
}
|
||||
|
||||
flags = bssid_bitmap | (s_ssid_bitmap << 16);
|
||||
|
||||
if (cfg80211_channel_is_psc(params->channels[i]) &&
|
||||
psc_no_listen)
|
||||
flags |= IWL_UHB_CHAN_CFG_FLAG_PSC_CHAN_NO_LISTEN;
|
||||
|
@ -1869,8 +1869,11 @@ iwl_mvm_umac_scan_cfg_channels_v6_6g(struct iwl_mvm_scan_params *params,
|
|||
(s_max > 1 || b_max > 3));
|
||||
}
|
||||
if ((allow_passive && force_passive) ||
|
||||
(!flags && !cfg80211_channel_is_psc(params->channels[i])))
|
||||
(!(bssid_bitmap | s_ssid_bitmap) &&
|
||||
!cfg80211_channel_is_psc(params->channels[i])))
|
||||
flags |= IWL_UHB_CHAN_CFG_FLAG_FORCE_PASSIVE;
|
||||
else
|
||||
flags |= bssid_bitmap | (s_ssid_bitmap << 16);
|
||||
|
||||
channel_cfg[i].flags |= cpu_to_le32(flags);
|
||||
}
|
||||
|
@ -1924,22 +1927,19 @@ static void iwl_mvm_scan_6ghz_passive_scan(struct iwl_mvm *mvm,
|
|||
}
|
||||
|
||||
/*
|
||||
* 6GHz passive scan is allowed while associated in a defined time
|
||||
* interval following HW reset or resume flow
|
||||
* 6GHz passive scan is allowed in a defined time interval following HW
|
||||
* reset or resume flow, or while not associated and a large interval
|
||||
* has passed since the last 6GHz passive scan.
|
||||
*/
|
||||
if (vif->bss_conf.assoc &&
|
||||
if ((vif->bss_conf.assoc ||
|
||||
time_after(mvm->last_6ghz_passive_scan_jiffies +
|
||||
(IWL_MVM_6GHZ_PASSIVE_SCAN_TIMEOUT * HZ), jiffies)) &&
|
||||
(time_before(mvm->last_reset_or_resume_time_jiffies +
|
||||
(IWL_MVM_6GHZ_PASSIVE_SCAN_ASSOC_TIMEOUT * HZ),
|
||||
jiffies))) {
|
||||
IWL_DEBUG_SCAN(mvm, "6GHz passive scan: associated\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* No need for 6GHz passive scan if not enough time elapsed */
|
||||
if (time_after(mvm->last_6ghz_passive_scan_jiffies +
|
||||
(IWL_MVM_6GHZ_PASSIVE_SCAN_TIMEOUT * HZ), jiffies)) {
|
||||
IWL_DEBUG_SCAN(mvm,
|
||||
"6GHz passive scan: timeout did not expire\n");
|
||||
IWL_DEBUG_SCAN(mvm, "6GHz passive scan: %s\n",
|
||||
vif->bss_conf.assoc ? "associated" :
|
||||
"timeout did not expire");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2037,6 +2037,12 @@ static u16 iwl_mvm_scan_umac_flags_v2(struct iwl_mvm *mvm,
|
|||
if (params->enable_6ghz_passive)
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_6GHZ_PASSIVE_SCAN;
|
||||
|
||||
if (iwl_mvm_is_oce_supported(mvm) &&
|
||||
(params->flags & (NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP |
|
||||
NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE |
|
||||
NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME)))
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_OCE;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
@ -2513,7 +2519,7 @@ static int iwl_mvm_check_running_scans(struct iwl_mvm *mvm, int type)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
#define SCAN_TIMEOUT 20000
|
||||
#define SCAN_TIMEOUT 30000
|
||||
|
||||
void iwl_mvm_scan_timeout_wk(struct work_struct *work)
|
||||
{
|
||||
|
|
|
@ -49,14 +49,13 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk)
|
|||
struct iwl_mvm *mvm = container_of(wk, struct iwl_mvm, roc_done_wk);
|
||||
|
||||
/*
|
||||
* Clear the ROC_RUNNING /ROC_AUX_RUNNING status bit.
|
||||
* Clear the ROC_RUNNING status bit.
|
||||
* This will cause the TX path to drop offchannel transmissions.
|
||||
* That would also be done by mac80211, but it is racy, in particular
|
||||
* in the case that the time event actually completed in the firmware
|
||||
* (which is handled in iwl_mvm_te_handle_notif).
|
||||
*/
|
||||
clear_bit(IWL_MVM_STATUS_ROC_RUNNING, &mvm->status);
|
||||
clear_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status);
|
||||
|
||||
synchronize_net();
|
||||
|
||||
|
@ -82,9 +81,19 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk)
|
|||
mvmvif = iwl_mvm_vif_from_mac80211(mvm->p2p_device_vif);
|
||||
iwl_mvm_flush_sta(mvm, &mvmvif->bcast_sta, true);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear the ROC_AUX_RUNNING status bit.
|
||||
* This will cause the TX path to drop offchannel transmissions.
|
||||
* That would also be done by mac80211, but it is racy, in particular
|
||||
* in the case that the time event actually completed in the firmware
|
||||
* (which is handled in iwl_mvm_te_handle_notif).
|
||||
*/
|
||||
if (test_and_clear_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status)) {
|
||||
/* do the same in case of hot spot 2.0 */
|
||||
iwl_mvm_flush_sta(mvm, &mvm->aux_sta, true);
|
||||
|
||||
/* In newer version of this command an aux station is added only
|
||||
* in cases of dedicated tx queue and need to be removed in end
|
||||
* of use */
|
||||
|
@ -687,11 +696,14 @@ static bool __iwl_mvm_remove_time_event(struct iwl_mvm *mvm,
|
|||
iwl_mvm_te_clear_data(mvm, te_data);
|
||||
spin_unlock_bh(&mvm->time_event_lock);
|
||||
|
||||
/* When session protection is supported, the te_data->id field
|
||||
/* When session protection is used, the te_data->id field
|
||||
* is reused to save session protection's configuration.
|
||||
* For AUX ROC, HOT_SPOT_CMD is used and the te_data->id field is set
|
||||
* to HOT_SPOT_CMD.
|
||||
*/
|
||||
if (fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_SESSION_PROT_CMD)) {
|
||||
IWL_UCODE_TLV_CAPA_SESSION_PROT_CMD) &&
|
||||
id != HOT_SPOT_CMD) {
|
||||
if (mvmvif && id < SESSION_PROTECT_CONF_MAX_ID) {
|
||||
/* Session protection is still ongoing. Cancel it */
|
||||
iwl_mvm_cancel_session_protection(mvm, mvmvif, id);
|
||||
|
@ -1027,7 +1039,7 @@ void iwl_mvm_stop_roc(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
|||
iwl_mvm_p2p_roc_finished(mvm);
|
||||
} else {
|
||||
iwl_mvm_remove_aux_roc_te(mvm, mvmvif,
|
||||
&mvmvif->time_event_data);
|
||||
&mvmvif->hs_time_event_data);
|
||||
iwl_mvm_roc_finished(mvm);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,11 +39,11 @@ iwl_mvm_bar_check_trigger(struct iwl_mvm *mvm, const u8 *addr,
|
|||
#define OPT_HDR(type, skb, off) \
|
||||
(type *)(skb_network_header(skb) + (off))
|
||||
|
||||
static u16 iwl_mvm_tx_csum(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
struct ieee80211_hdr *hdr,
|
||||
struct ieee80211_tx_info *info,
|
||||
u16 offload_assist)
|
||||
static u16 iwl_mvm_tx_csum_pre_bz(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
struct ieee80211_tx_info *info, bool amsdu)
|
||||
{
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
u16 offload_assist = 0;
|
||||
#if IS_ENABLED(CONFIG_INET)
|
||||
u16 mh_len = ieee80211_hdrlen(hdr->frame_control);
|
||||
u8 protocol = 0;
|
||||
|
@ -106,8 +106,7 @@ static u16 iwl_mvm_tx_csum(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
offload_assist |= (4 << TX_CMD_OFFLD_IP_HDR);
|
||||
|
||||
/* Do IPv4 csum for AMSDU only (no IP csum for Ipv6) */
|
||||
if (skb->protocol == htons(ETH_P_IP) &&
|
||||
(offload_assist & BIT(TX_CMD_OFFLD_AMSDU))) {
|
||||
if (skb->protocol == htons(ETH_P_IP) && amsdu) {
|
||||
ip_hdr(skb)->check = 0;
|
||||
offload_assist |= BIT(TX_CMD_OFFLD_L3_EN);
|
||||
}
|
||||
|
@ -132,9 +131,63 @@ static u16 iwl_mvm_tx_csum(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
|
||||
out:
|
||||
#endif
|
||||
if (amsdu)
|
||||
offload_assist |= BIT(TX_CMD_OFFLD_AMSDU);
|
||||
else if (ieee80211_hdrlen(hdr->frame_control) % 4)
|
||||
/* padding is inserted later in transport */
|
||||
offload_assist |= BIT(TX_CMD_OFFLD_PAD);
|
||||
|
||||
return offload_assist;
|
||||
}
|
||||
|
||||
u32 iwl_mvm_tx_csum_bz(struct iwl_mvm *mvm, struct sk_buff *skb, bool amsdu)
|
||||
{
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
u32 offload_assist = IWL_TX_CMD_OFFLD_BZ_PARTIAL_CSUM;
|
||||
unsigned int hdrlen = ieee80211_hdrlen(hdr->frame_control);
|
||||
unsigned int csum_start = skb_checksum_start_offset(skb);
|
||||
|
||||
offload_assist |= u32_encode_bits(hdrlen / 2,
|
||||
IWL_TX_CMD_OFFLD_BZ_MH_LEN);
|
||||
if (amsdu)
|
||||
offload_assist |= IWL_TX_CMD_OFFLD_BZ_AMSDU;
|
||||
else if (hdrlen % 4)
|
||||
/* padding is inserted later in transport */
|
||||
offload_assist |= IWL_TX_CMD_OFFLD_BZ_MH_PAD;
|
||||
|
||||
if (skb->ip_summed != CHECKSUM_PARTIAL)
|
||||
return offload_assist;
|
||||
|
||||
offload_assist |= IWL_TX_CMD_OFFLD_BZ_ENABLE_CSUM |
|
||||
IWL_TX_CMD_OFFLD_BZ_ZERO2ONES;
|
||||
|
||||
/*
|
||||
* mac80211 will always calculate checksum in software for
|
||||
* non-fast-xmit, and so we can only do offloaded checksum
|
||||
* for fast-xmit frames. In this case, we always have the
|
||||
* RFC 1042 header present. skb_checksum_start_offset()
|
||||
* returns the offset from the beginning, but the hardware
|
||||
* needs it from after the header & SNAP header.
|
||||
*/
|
||||
csum_start -= hdrlen + 8;
|
||||
|
||||
offload_assist |= u32_encode_bits(csum_start,
|
||||
IWL_TX_CMD_OFFLD_BZ_START_OFFS);
|
||||
offload_assist |= u32_encode_bits(csum_start + skb->csum_offset,
|
||||
IWL_TX_CMD_OFFLD_BZ_RESULT_OFFS);
|
||||
|
||||
return offload_assist;
|
||||
}
|
||||
|
||||
static u32 iwl_mvm_tx_csum(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
struct ieee80211_tx_info *info,
|
||||
bool amsdu)
|
||||
{
|
||||
if (mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_BZ)
|
||||
return iwl_mvm_tx_csum_pre_bz(mvm, skb, info, amsdu);
|
||||
return iwl_mvm_tx_csum_bz(mvm, skb, amsdu);
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets most of the Tx cmd's fields
|
||||
*/
|
||||
|
@ -146,7 +199,7 @@ void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
__le16 fc = hdr->frame_control;
|
||||
u32 tx_flags = le32_to_cpu(tx_cmd->tx_flags);
|
||||
u32 len = skb->len + FCS_LEN;
|
||||
u16 offload_assist = 0;
|
||||
bool amsdu = false;
|
||||
u8 ac;
|
||||
|
||||
if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) ||
|
||||
|
@ -166,8 +219,7 @@ void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
u8 *qc = ieee80211_get_qos_ctl(hdr);
|
||||
tx_cmd->tid_tspec = qc[0] & 0xf;
|
||||
tx_flags &= ~TX_CMD_FLG_SEQ_CTL;
|
||||
if (*qc & IEEE80211_QOS_CTL_A_MSDU_PRESENT)
|
||||
offload_assist |= BIT(TX_CMD_OFFLD_AMSDU);
|
||||
amsdu = *qc & IEEE80211_QOS_CTL_A_MSDU_PRESENT;
|
||||
} else if (ieee80211_is_back_req(fc)) {
|
||||
struct ieee80211_bar *bar = (void *)skb->data;
|
||||
u16 control = le16_to_cpu(bar->control);
|
||||
|
@ -234,14 +286,8 @@ void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
tx_cmd->life_time = cpu_to_le32(TX_CMD_LIFE_TIME_INFINITE);
|
||||
tx_cmd->sta_id = sta_id;
|
||||
|
||||
/* padding is inserted later in transport */
|
||||
if (ieee80211_hdrlen(fc) % 4 &&
|
||||
!(offload_assist & BIT(TX_CMD_OFFLD_AMSDU)))
|
||||
offload_assist |= BIT(TX_CMD_OFFLD_PAD);
|
||||
|
||||
tx_cmd->offload_assist |=
|
||||
cpu_to_le16(iwl_mvm_tx_csum(mvm, skb, hdr, info,
|
||||
offload_assist));
|
||||
tx_cmd->offload_assist =
|
||||
cpu_to_le16(iwl_mvm_tx_csum_pre_bz(mvm, skb, info, amsdu));
|
||||
}
|
||||
|
||||
static u32 iwl_mvm_get_tx_ant(struct iwl_mvm *mvm,
|
||||
|
@ -463,27 +509,18 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
dev_cmd->hdr.cmd = TX_CMD;
|
||||
|
||||
if (iwl_mvm_has_new_tx_api(mvm)) {
|
||||
u16 offload_assist = 0;
|
||||
u32 rate_n_flags = 0;
|
||||
u16 flags = 0;
|
||||
struct iwl_mvm_sta *mvmsta = sta ?
|
||||
iwl_mvm_sta_from_mac80211(sta) : NULL;
|
||||
bool amsdu = false;
|
||||
|
||||
if (ieee80211_is_data_qos(hdr->frame_control)) {
|
||||
u8 *qc = ieee80211_get_qos_ctl(hdr);
|
||||
|
||||
if (*qc & IEEE80211_QOS_CTL_A_MSDU_PRESENT)
|
||||
offload_assist |= BIT(TX_CMD_OFFLD_AMSDU);
|
||||
amsdu = *qc & IEEE80211_QOS_CTL_A_MSDU_PRESENT;
|
||||
}
|
||||
|
||||
offload_assist = iwl_mvm_tx_csum(mvm, skb, hdr, info,
|
||||
offload_assist);
|
||||
|
||||
/* padding is inserted later in transport */
|
||||
if (ieee80211_hdrlen(hdr->frame_control) % 4 &&
|
||||
!(offload_assist & BIT(TX_CMD_OFFLD_AMSDU)))
|
||||
offload_assist |= BIT(TX_CMD_OFFLD_PAD);
|
||||
|
||||
if (!info->control.hw_key)
|
||||
flags |= IWL_TX_FLAGS_ENCRYPT_DIS;
|
||||
|
||||
|
@ -503,8 +540,10 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
if (mvm->trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_AX210) {
|
||||
struct iwl_tx_cmd_gen3 *cmd = (void *)dev_cmd->payload;
|
||||
u32 offload_assist = iwl_mvm_tx_csum(mvm, skb,
|
||||
info, amsdu);
|
||||
|
||||
cmd->offload_assist |= cpu_to_le32(offload_assist);
|
||||
cmd->offload_assist = cpu_to_le32(offload_assist);
|
||||
|
||||
/* Total # bytes to be transmitted */
|
||||
cmd->len = cpu_to_le16((u16)skb->len);
|
||||
|
@ -516,8 +555,11 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
cmd->rate_n_flags = cpu_to_le32(rate_n_flags);
|
||||
} else {
|
||||
struct iwl_tx_cmd_gen2 *cmd = (void *)dev_cmd->payload;
|
||||
u16 offload_assist = iwl_mvm_tx_csum_pre_bz(mvm, skb,
|
||||
info,
|
||||
amsdu);
|
||||
|
||||
cmd->offload_assist |= cpu_to_le16(offload_assist);
|
||||
cmd->offload_assist = cpu_to_le16(offload_assist);
|
||||
|
||||
/* Total # bytes to be transmitted */
|
||||
cmd->len = cpu_to_le16((u16)skb->len);
|
||||
|
|
|
@ -510,16 +510,16 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
|
|||
MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids);
|
||||
|
||||
#define _IWL_DEV_INFO(_device, _subdevice, _mac_type, _mac_step, _rf_type, \
|
||||
_rf_id, _no_160, _cores, _cdb, _cfg, _name) \
|
||||
_rf_id, _no_160, _cores, _cdb, _jacket, _cfg, _name) \
|
||||
{ .device = (_device), .subdevice = (_subdevice), .cfg = &(_cfg), \
|
||||
.name = _name, .mac_type = _mac_type, .rf_type = _rf_type, \
|
||||
.no_160 = _no_160, .cores = _cores, .rf_id = _rf_id, \
|
||||
.mac_step = _mac_step, .cdb = _cdb }
|
||||
.mac_step = _mac_step, .cdb = _cdb, .jacket = _jacket }
|
||||
|
||||
#define IWL_DEV_INFO(_device, _subdevice, _cfg, _name) \
|
||||
_IWL_DEV_INFO(_device, _subdevice, IWL_CFG_ANY, IWL_CFG_ANY, \
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, \
|
||||
IWL_CFG_ANY, _cfg, _name)
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, _cfg, _name)
|
||||
|
||||
static const struct iwl_dev_info iwl_dev_info_table[] = {
|
||||
#if IS_ENABLED(CONFIG_IWLMVM)
|
||||
|
@ -666,97 +666,111 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
|
|||
IWL_DEV_INFO(0x2726, 0x0510, iwlax211_cfg_snj_gf_a0, NULL),
|
||||
IWL_DEV_INFO(0x2726, 0x1651, iwl_cfg_snj_hr_b0, iwl_ax201_killer_1650s_name),
|
||||
IWL_DEV_INFO(0x2726, 0x1652, iwl_cfg_snj_hr_b0, iwl_ax201_killer_1650i_name),
|
||||
IWL_DEV_INFO(0x2726, 0x1671, iwlax211_cfg_snj_gf_a0, iwl_ax211_killer_1675s_name),
|
||||
IWL_DEV_INFO(0x2726, 0x1672, iwlax211_cfg_snj_gf_a0, iwl_ax211_killer_1675i_name),
|
||||
IWL_DEV_INFO(0x2726, 0x1691, iwlax411_2ax_cfg_sosnj_gf4_a0, iwl_ax411_killer_1690s_name),
|
||||
IWL_DEV_INFO(0x2726, 0x1692, iwlax411_2ax_cfg_sosnj_gf4_a0, iwl_ax411_killer_1690i_name),
|
||||
IWL_DEV_INFO(0x7F70, 0x1691, iwlax411_2ax_cfg_sosnj_gf4_a0, iwl_ax411_killer_1690s_name),
|
||||
IWL_DEV_INFO(0x7F70, 0x1692, iwlax411_2ax_cfg_sosnj_gf4_a0, iwl_ax411_killer_1690i_name),
|
||||
|
||||
/* SO with GF2 */
|
||||
IWL_DEV_INFO(0x2726, 0x1671, iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_killer_1675s_name),
|
||||
IWL_DEV_INFO(0x2726, 0x1672, iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_killer_1675i_name),
|
||||
IWL_DEV_INFO(0x51F0, 0x1671, iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_killer_1675s_name),
|
||||
IWL_DEV_INFO(0x51F0, 0x1672, iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_killer_1675i_name),
|
||||
IWL_DEV_INFO(0x54F0, 0x1671, iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_killer_1675s_name),
|
||||
IWL_DEV_INFO(0x54F0, 0x1672, iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_killer_1675i_name),
|
||||
IWL_DEV_INFO(0x7A70, 0x1671, iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_killer_1675s_name),
|
||||
IWL_DEV_INFO(0x7A70, 0x1672, iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_killer_1675i_name),
|
||||
IWL_DEV_INFO(0x7AF0, 0x1671, iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_killer_1675s_name),
|
||||
IWL_DEV_INFO(0x7AF0, 0x1672, iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_killer_1675i_name),
|
||||
|
||||
/* MA with GF2 */
|
||||
IWL_DEV_INFO(0x7E40, 0x1671, iwl_cfg_ma_a0_gf_a0, iwl_ax211_killer_1675s_name),
|
||||
IWL_DEV_INFO(0x7E40, 0x1672, iwl_cfg_ma_a0_gf_a0, iwl_ax211_killer_1675i_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_2ac_cfg_soc, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_2ac_cfg_soc, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_2ac_cfg_soc, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_2ac_cfg_soc, iwl9462_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_2ac_cfg_soc, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_2ac_cfg_soc, iwl9560_name),
|
||||
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9260_2ac_cfg, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9260_2ac_cfg, iwl9461_name),
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9260_2ac_cfg, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9260_2ac_cfg, iwl9462_name),
|
||||
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9260_2ac_cfg, iwl9270_160_name),
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT_GNSS, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9260_2ac_cfg, iwl9270_name),
|
||||
|
||||
_IWL_DEV_INFO(0x271B, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH1, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9260_2ac_cfg, iwl9162_160_name),
|
||||
_IWL_DEV_INFO(0x271B, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH1, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9260_2ac_cfg, iwl9162_name),
|
||||
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9260_2ac_cfg, iwl9260_160_name),
|
||||
_IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9260_2ac_cfg, iwl9260_name),
|
||||
|
||||
/* Qu with Jf */
|
||||
|
@ -764,176 +778,176 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
|
|||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9462_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9560_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1551,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9560_killer_1550s_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1552,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_b0_jf_b0_cfg, iwl9560_killer_1550i_name),
|
||||
|
||||
/* Qu C step */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9462_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9560_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1551,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9560_killer_1550s_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1552,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qu_c0_jf_b0_cfg, iwl9560_killer_1550i_name),
|
||||
|
||||
/* QuZ */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9462_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9560_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1551,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9560_killer_1550s_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1552,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_quz_a0_jf_b0_cfg, iwl9560_killer_1550i_name),
|
||||
|
||||
/* QnJ */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qnj_b0_jf_b0_cfg, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qnj_b0_jf_b0_cfg, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qnj_b0_jf_b0_cfg, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qnj_b0_jf_b0_cfg, iwl9462_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qnj_b0_jf_b0_cfg, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qnj_b0_jf_b0_cfg, iwl9560_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1551,
|
||||
IWL_CFG_MAC_TYPE_QNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qnj_b0_jf_b0_cfg, iwl9560_killer_1550s_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, 0x1552,
|
||||
IWL_CFG_MAC_TYPE_QNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl9560_qnj_b0_jf_b0_cfg, iwl9560_killer_1550i_name),
|
||||
|
||||
/* Qu with Hr */
|
||||
|
@ -941,325 +955,352 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
|
|||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_qu_b0_hr1_b0, iwl_ax101_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_qu_b0_hr_b0, iwl_ax203_name),
|
||||
|
||||
/* Qu C step */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_qu_c0_hr1_b0, iwl_ax101_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_qu_c0_hr_b0, iwl_ax203_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QU, SILICON_C_STEP,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_qu_c0_hr_b0, iwl_ax201_name),
|
||||
|
||||
/* QuZ */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_quz_a0_hr1_b0, iwl_ax101_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QUZ, SILICON_B_STEP,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_quz_a0_hr_b0, iwl_ax203_name),
|
||||
|
||||
/* QnJ with Hr */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_QNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_qnj_b0_hr_b0_cfg, iwl_ax201_name),
|
||||
|
||||
/* SnJ with Jf */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_snj_a0_jf_b0, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_snj_a0_jf_b0, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_snj_a0_jf_b0, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_snj_a0_jf_b0, iwl9462_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_snj_a0_jf_b0, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_snj_a0_jf_b0, iwl9560_name),
|
||||
|
||||
/* SnJ with Hr */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_snj_hr_b0, iwl_ax101_name),
|
||||
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_snj_hr_b0, iwl_ax201_name),
|
||||
|
||||
/* Ma */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_ma_a0_hr_b0, iwl_ax201_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_ma_a0_gf_a0, iwl_ax211_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_ma_a0_gf4_a0, iwl_ax211_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_MR, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_ma_a0_mr_a0, iwl_ax221_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_ma_a0_fm_a0, iwl_ax231_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SNJ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_MR, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_snj_a0_mr_a0, iwl_ax221_name),
|
||||
|
||||
/* So with Hr */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax203_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax101_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax201_name),
|
||||
|
||||
/* So-F with Hr */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax203_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax101_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_so_a0_hr_a0, iwl_ax201_name),
|
||||
|
||||
/* So-F with Gf */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_CDB,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_CDB, IWL_CFG_ANY,
|
||||
iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_name),
|
||||
|
||||
/* Bz */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_bz_a0_hr_b0, iwl_bz_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_bz_a0_gf_a0, iwl_bz_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_bz_a0_gf4_a0, iwl_bz_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_MR, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_bz_a0_mr_a0, iwl_bz_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_bz_a0_fm_a0, iwl_bz_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_NO_JACKET,
|
||||
iwl_cfg_gl_a0_fm_a0, iwl_bz_name),
|
||||
|
||||
/* BZ Z step */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_BZ, SILICON_Z_STEP,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwl_cfg_bz_z0_gf_a0, iwl_bz_name),
|
||||
|
||||
/* BNJ */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_IS_JACKET,
|
||||
iwl_cfg_bnj_a0_fm_a0, iwl_bz_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_CDB, IWL_CFG_IS_JACKET,
|
||||
iwl_cfg_bnj_a0_fm4_a0, iwl_bz_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_IS_JACKET,
|
||||
iwl_cfg_bnj_a0_gf_a0, iwl_bz_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_CDB, IWL_CFG_IS_JACKET,
|
||||
iwl_cfg_bnj_a0_gf4_a0, iwl_bz_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_IS_JACKET,
|
||||
iwl_cfg_bnj_a0_hr_b0, iwl_bz_name),
|
||||
|
||||
/* SoF with JF2 */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9560_name),
|
||||
|
||||
/* SoF with JF */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9462_name),
|
||||
|
||||
/* SoF with JF2 */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9560_name),
|
||||
|
||||
/* SoF with JF */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9462_name),
|
||||
|
||||
/* So with GF */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_CDB,
|
||||
IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_CDB, IWL_CFG_ANY,
|
||||
iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_name),
|
||||
|
||||
/* So with JF2 */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9560_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9560_name),
|
||||
|
||||
/* So with JF */
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9461_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9462_160_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9461_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY,
|
||||
IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB,
|
||||
IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, IWL_CFG_ANY,
|
||||
iwlax210_2ax_cfg_so_jf_b0, iwl9462_name)
|
||||
|
||||
#endif /* CONFIG_IWLMVM */
|
||||
|
@ -1272,22 +1313,14 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
|
|||
static int get_crf_id(struct iwl_trans *iwl_trans)
|
||||
{
|
||||
int ret = 0;
|
||||
u32 wfpm_ctrl_addr;
|
||||
u32 wfpm_otp_cfg_addr;
|
||||
u32 sd_reg_ver_addr;
|
||||
u32 cdb = 0;
|
||||
u32 val;
|
||||
|
||||
if (iwl_trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
wfpm_ctrl_addr = WFPM_CTRL_REG_GEN2;
|
||||
wfpm_otp_cfg_addr = WFPM_OTP_CFG1_ADDR_GEN2;
|
||||
if (iwl_trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
|
||||
sd_reg_ver_addr = SD_REG_VER_GEN2;
|
||||
/* Qu/Pu families have other addresses */
|
||||
} else {
|
||||
wfpm_ctrl_addr = WFPM_CTRL_REG;
|
||||
wfpm_otp_cfg_addr = WFPM_OTP_CFG1_ADDR;
|
||||
else
|
||||
sd_reg_ver_addr = SD_REG_VER;
|
||||
}
|
||||
|
||||
if (!iwl_trans_grab_nic_access(iwl_trans)) {
|
||||
IWL_ERR(iwl_trans, "Failed to grab nic access before reading crf id\n");
|
||||
|
@ -1296,15 +1329,15 @@ static int get_crf_id(struct iwl_trans *iwl_trans)
|
|||
}
|
||||
|
||||
/* Enable access to peripheral registers */
|
||||
val = iwl_read_umac_prph_no_grab(iwl_trans, wfpm_ctrl_addr);
|
||||
val = iwl_read_umac_prph_no_grab(iwl_trans, WFPM_CTRL_REG);
|
||||
val |= ENABLE_WFPM;
|
||||
iwl_write_umac_prph_no_grab(iwl_trans, wfpm_ctrl_addr, val);
|
||||
iwl_write_umac_prph_no_grab(iwl_trans, WFPM_CTRL_REG, val);
|
||||
|
||||
/* Read crf info */
|
||||
val = iwl_read_prph_no_grab(iwl_trans, sd_reg_ver_addr);
|
||||
|
||||
/* Read cdb info (also contains the jacket info if needed in the future */
|
||||
cdb = iwl_read_umac_prph_no_grab(iwl_trans, wfpm_otp_cfg_addr);
|
||||
cdb = iwl_read_umac_prph_no_grab(iwl_trans, WFPM_OTP_CFG1_ADDR);
|
||||
|
||||
/* Map between crf id to rf id */
|
||||
switch (REG_CRF_ID_TYPE(val)) {
|
||||
|
@ -1360,7 +1393,7 @@ out:
|
|||
static const struct iwl_dev_info *
|
||||
iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
|
||||
u16 mac_type, u8 mac_step,
|
||||
u16 rf_type, u8 cdb, u8 rf_id, u8 no_160, u8 cores)
|
||||
u16 rf_type, u8 cdb, u8 jacket, u8 rf_id, u8 no_160, u8 cores)
|
||||
{
|
||||
int num_devices = ARRAY_SIZE(iwl_dev_info_table);
|
||||
int i;
|
||||
|
@ -1395,6 +1428,10 @@ iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
|
|||
dev_info->cdb != cdb)
|
||||
continue;
|
||||
|
||||
if (dev_info->jacket != (u8)IWL_CFG_ANY &&
|
||||
dev_info->jacket != jacket)
|
||||
continue;
|
||||
|
||||
if (dev_info->rf_id != (u8)IWL_CFG_ANY &&
|
||||
dev_info->rf_id != rf_id)
|
||||
continue;
|
||||
|
@ -1482,6 +1519,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
iwl_trans->hw_rev_step,
|
||||
CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id),
|
||||
CSR_HW_RFID_IS_CDB(iwl_trans->hw_rf_id),
|
||||
CSR_HW_RFID_IS_JACKET(iwl_trans->hw_rf_id),
|
||||
IWL_SUBDEVICE_RF_ID(pdev->subsystem_device),
|
||||
IWL_SUBDEVICE_NO_160(pdev->subsystem_device),
|
||||
IWL_SUBDEVICE_CORES(pdev->subsystem_device));
|
||||
|
|
|
@ -2266,7 +2266,12 @@ irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id)
|
|||
}
|
||||
}
|
||||
|
||||
if (inta_hw & MSIX_HW_INT_CAUSES_REG_WAKEUP) {
|
||||
/*
|
||||
* In some rare cases when the HW is in a bad state, we may
|
||||
* get this interrupt too early, when prph_info is still NULL.
|
||||
* So make sure that it's not NULL to prevent crashing.
|
||||
*/
|
||||
if (inta_hw & MSIX_HW_INT_CAUSES_REG_WAKEUP && trans_pcie->prph_info) {
|
||||
u32 sleep_notif =
|
||||
le32_to_cpu(trans_pcie->prph_info->sleep_notif);
|
||||
if (sleep_notif == IWL_D3_SLEEP_STATUS_SUSPEND ||
|
||||
|
|
|
@ -74,14 +74,15 @@ EXPORT_SYMBOL_GPL(mt76_queues_read);
|
|||
static int mt76_rx_queues_read(struct seq_file *s, void *data)
|
||||
{
|
||||
struct mt76_dev *dev = dev_get_drvdata(s->private);
|
||||
int i;
|
||||
int i, queued;
|
||||
|
||||
seq_puts(s, " queue | hw-queued | head | tail |\n");
|
||||
mt76_for_each_q_rx(dev, i) {
|
||||
struct mt76_queue *q = &dev->q_rx[i];
|
||||
|
||||
queued = mt76_is_usb(dev) ? q->ndesc - q->queued : q->queued;
|
||||
seq_printf(s, " %9d | %9d | %9d | %9d |\n",
|
||||
i, q->queued, q->head, q->tail);
|
||||
i, queued, q->head, q->tail);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -572,9 +572,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
|
|||
if (data_len < len + q->buf_offset) {
|
||||
dev_kfree_skb(q->rx_head);
|
||||
q->rx_head = NULL;
|
||||
|
||||
skb_free_frag(data);
|
||||
continue;
|
||||
goto free_frag;
|
||||
}
|
||||
|
||||
if (q->rx_head) {
|
||||
|
@ -582,11 +580,14 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!more && dev->drv->rx_check &&
|
||||
!(dev->drv->rx_check(dev, data, len)))
|
||||
goto free_frag;
|
||||
|
||||
skb = build_skb(data, q->buf_size);
|
||||
if (!skb) {
|
||||
skb_free_frag(data);
|
||||
continue;
|
||||
}
|
||||
if (!skb)
|
||||
goto free_frag;
|
||||
|
||||
skb_reserve(skb, q->buf_offset);
|
||||
|
||||
if (q == &dev->q_rx[MT_RXQ_MCU]) {
|
||||
|
@ -603,6 +604,10 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
|
|||
}
|
||||
|
||||
dev->drv->rx_skb(dev, q - dev->q_rx, skb);
|
||||
continue;
|
||||
|
||||
free_frag:
|
||||
skb_free_frag(data);
|
||||
}
|
||||
|
||||
mt76_dma_rx_fill(dev, q);
|
||||
|
|
|
@ -65,6 +65,8 @@ int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int offset, int len)
|
|||
offset = be32_to_cpup(list);
|
||||
ret = mtd_read(mtd, offset, len, &retlen, eep);
|
||||
put_mtd_device(mtd);
|
||||
if (mtd_is_bitflip(ret))
|
||||
ret = 0;
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "reading EEPROM from mtd %s failed: %i\n",
|
||||
part, ret);
|
||||
|
|
|
@ -185,7 +185,6 @@ const struct cfg80211_sar_capa mt76_sar_capa = {
|
|||
.num_freq_ranges = ARRAY_SIZE(mt76_sar_freq_ranges),
|
||||
.freq_ranges = &mt76_sar_freq_ranges[0],
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(mt76_sar_capa);
|
||||
|
||||
static int mt76_led_init(struct mt76_dev *dev)
|
||||
{
|
||||
|
@ -393,7 +392,7 @@ mt76_check_sband(struct mt76_phy *phy, struct mt76_sband *msband,
|
|||
phy->hw->wiphy->bands[band] = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
static int
|
||||
mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
|
||||
{
|
||||
struct mt76_dev *dev = phy->dev;
|
||||
|
@ -411,8 +410,15 @@ mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
|
|||
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_AIRTIME_FAIRNESS);
|
||||
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_AQL);
|
||||
|
||||
wiphy->available_antennas_tx = dev->phy.antenna_mask;
|
||||
wiphy->available_antennas_rx = dev->phy.antenna_mask;
|
||||
wiphy->available_antennas_tx = phy->antenna_mask;
|
||||
wiphy->available_antennas_rx = phy->antenna_mask;
|
||||
|
||||
wiphy->sar_capa = &mt76_sar_capa;
|
||||
phy->frp = devm_kcalloc(dev->dev, wiphy->sar_capa->num_freq_ranges,
|
||||
sizeof(struct mt76_freq_range_power),
|
||||
GFP_KERNEL);
|
||||
if (!phy->frp)
|
||||
return -ENOMEM;
|
||||
|
||||
hw->txq_data_size = sizeof(struct mt76_txq);
|
||||
hw->uapsd_max_sp_len = IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL;
|
||||
|
@ -432,6 +438,8 @@ mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
|
|||
ieee80211_hw_set(hw, MFP_CAPABLE);
|
||||
ieee80211_hw_set(hw, AP_LINK_PS);
|
||||
ieee80211_hw_set(hw, REPORTS_TX_ACK_STATUS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct mt76_phy *
|
||||
|
@ -472,7 +480,9 @@ int mt76_register_phy(struct mt76_phy *phy, bool vht,
|
|||
{
|
||||
int ret;
|
||||
|
||||
mt76_phy_init(phy, phy->hw);
|
||||
ret = mt76_phy_init(phy, phy->hw);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (phy->cap.has_2ghz) {
|
||||
ret = mt76_init_sband_2g(phy, rates, n_rates);
|
||||
|
@ -591,7 +601,9 @@ int mt76_register_device(struct mt76_dev *dev, bool vht,
|
|||
int ret;
|
||||
|
||||
dev_set_drvdata(dev->dev, dev);
|
||||
mt76_phy_init(phy, hw);
|
||||
ret = mt76_phy_init(phy, hw);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (phy->cap.has_2ghz) {
|
||||
ret = mt76_init_sband_2g(phy, rates, n_rates);
|
||||
|
@ -1163,10 +1175,12 @@ mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
|
|||
|
||||
if (ps)
|
||||
set_bit(MT_WCID_FLAG_PS, &wcid->flags);
|
||||
else
|
||||
clear_bit(MT_WCID_FLAG_PS, &wcid->flags);
|
||||
|
||||
dev->drv->sta_ps(dev, sta, ps);
|
||||
|
||||
if (!ps)
|
||||
clear_bit(MT_WCID_FLAG_PS, &wcid->flags);
|
||||
|
||||
ieee80211_sta_ps_transition(sta, ps);
|
||||
}
|
||||
|
||||
|
@ -1348,6 +1362,59 @@ int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_get_txpower);
|
||||
|
||||
int mt76_init_sar_power(struct ieee80211_hw *hw,
|
||||
const struct cfg80211_sar_specs *sar)
|
||||
{
|
||||
struct mt76_phy *phy = hw->priv;
|
||||
const struct cfg80211_sar_capa *capa = hw->wiphy->sar_capa;
|
||||
int i;
|
||||
|
||||
if (sar->type != NL80211_SAR_TYPE_POWER || !sar->num_sub_specs)
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < sar->num_sub_specs; i++) {
|
||||
u32 index = sar->sub_specs[i].freq_range_index;
|
||||
/* SAR specifies power limitaton in 0.25dbm */
|
||||
s32 power = sar->sub_specs[i].power >> 1;
|
||||
|
||||
if (power > 127 || power < -127)
|
||||
power = 127;
|
||||
|
||||
phy->frp[index].range = &capa->freq_ranges[index];
|
||||
phy->frp[index].power = power;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_init_sar_power);
|
||||
|
||||
int mt76_get_sar_power(struct mt76_phy *phy,
|
||||
struct ieee80211_channel *chan,
|
||||
int power)
|
||||
{
|
||||
const struct cfg80211_sar_capa *capa = phy->hw->wiphy->sar_capa;
|
||||
int freq, i;
|
||||
|
||||
if (!capa || !phy->frp)
|
||||
return power;
|
||||
|
||||
if (power > 127 || power < -127)
|
||||
power = 127;
|
||||
|
||||
freq = ieee80211_channel_to_frequency(chan->hw_value, chan->band);
|
||||
for (i = 0 ; i < capa->num_freq_ranges; i++) {
|
||||
if (phy->frp[i].range &&
|
||||
freq >= phy->frp[i].range->start_freq &&
|
||||
freq < phy->frp[i].range->end_freq) {
|
||||
power = min_t(int, phy->frp[i].power, power);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return power;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_get_sar_power);
|
||||
|
||||
static void
|
||||
__mt76_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
|
||||
{
|
||||
|
@ -1494,7 +1561,6 @@ EXPORT_SYMBOL_GPL(mt76_init_queue);
|
|||
u16 mt76_calculate_default_rate(struct mt76_phy *phy, int rateidx)
|
||||
{
|
||||
int offset = 0;
|
||||
struct ieee80211_rate *rate;
|
||||
|
||||
if (phy->chandef.chan->band != NL80211_BAND_2GHZ)
|
||||
offset = 4;
|
||||
|
@ -1503,9 +1569,11 @@ u16 mt76_calculate_default_rate(struct mt76_phy *phy, int rateidx)
|
|||
if (rateidx < 0)
|
||||
rateidx = 0;
|
||||
|
||||
rate = &mt76_rates[offset + rateidx];
|
||||
rateidx += offset;
|
||||
if (rateidx >= ARRAY_SIZE(mt76_rates))
|
||||
rateidx = offset;
|
||||
|
||||
return rate->hw_value;
|
||||
return mt76_rates[rateidx].hw_value;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_calculate_default_rate);
|
||||
|
||||
|
|
|
@ -373,6 +373,8 @@ struct mt76_driver_ops {
|
|||
|
||||
bool (*tx_status_data)(struct mt76_dev *dev, u8 *update);
|
||||
|
||||
bool (*rx_check)(struct mt76_dev *dev, void *data, int len);
|
||||
|
||||
void (*rx_skb)(struct mt76_dev *dev, enum mt76_rxq_id q,
|
||||
struct sk_buff *skb);
|
||||
|
||||
|
@ -495,6 +497,8 @@ struct mt76_usb {
|
|||
};
|
||||
|
||||
#define MT76S_XMIT_BUF_SZ (16 * PAGE_SIZE)
|
||||
#define MT76S_NUM_TX_ENTRIES 256
|
||||
#define MT76S_NUM_RX_ENTRIES 512
|
||||
struct mt76_sdio {
|
||||
struct mt76_worker txrx_worker;
|
||||
struct mt76_worker status_worker;
|
||||
|
@ -599,6 +603,8 @@ struct mt76_testmode_data {
|
|||
u8 tx_power[4];
|
||||
u8 tx_power_control;
|
||||
|
||||
u8 addr[3][ETH_ALEN];
|
||||
|
||||
u32 tx_pending;
|
||||
u32 tx_queued;
|
||||
u16 tx_queued_limit;
|
||||
|
@ -808,7 +814,6 @@ struct mt76_ethtool_worker_info {
|
|||
}
|
||||
|
||||
extern struct ieee80211_rate mt76_rates[12];
|
||||
extern const struct cfg80211_sar_capa mt76_sar_capa;
|
||||
|
||||
#define __mt76_rr(dev, ...) (dev)->bus->rr((dev), __VA_ARGS__)
|
||||
#define __mt76_wr(dev, ...) (dev)->bus->wr((dev), __VA_ARGS__)
|
||||
|
@ -1157,6 +1162,11 @@ int mt76_get_min_avg_rssi(struct mt76_dev *dev, bool ext_phy);
|
|||
|
||||
int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
int *dbm);
|
||||
int mt76_init_sar_power(struct ieee80211_hw *hw,
|
||||
const struct cfg80211_sar_specs *sar);
|
||||
int mt76_get_sar_power(struct mt76_phy *phy,
|
||||
struct ieee80211_channel *chan,
|
||||
int power);
|
||||
|
||||
void mt76_csa_check(struct mt76_dev *dev);
|
||||
void mt76_csa_finish(struct mt76_dev *dev);
|
||||
|
|
|
@ -202,10 +202,11 @@ void mt7603_filter_tx(struct mt7603_dev *dev, int idx, bool abort)
|
|||
FIELD_PREP(MT_DMA_FQCR0_DEST_PORT_ID, port) |
|
||||
FIELD_PREP(MT_DMA_FQCR0_DEST_QUEUE_ID, queue));
|
||||
|
||||
WARN_ON_ONCE(!mt76_poll(dev, MT_DMA_FQCR0, MT_DMA_FQCR0_BUSY,
|
||||
0, 5000));
|
||||
mt76_poll(dev, MT_DMA_FQCR0, MT_DMA_FQCR0_BUSY, 0, 15000);
|
||||
}
|
||||
|
||||
WARN_ON_ONCE(mt76_rr(dev, MT_DMA_FQCR0) & MT_DMA_FQCR0_BUSY);
|
||||
|
||||
mt76_wr(dev, MT_TX_ABORT, 0);
|
||||
|
||||
mt7603_wtbl_set_skip_tx(dev, idx, false);
|
||||
|
@ -525,6 +526,10 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb)
|
|||
if (rxd2 & MT_RXD2_NORMAL_TKIP_MIC_ERR)
|
||||
status->flag |= RX_FLAG_MMIC_ERROR;
|
||||
|
||||
/* ICV error or CCMP/BIP/WPI MIC error */
|
||||
if (rxd2 & MT_RXD2_NORMAL_ICV_ERR)
|
||||
status->flag |= RX_FLAG_ONLY_MONITOR;
|
||||
|
||||
if (FIELD_GET(MT_RXD2_NORMAL_SEC_MODE, rxd2) != 0 &&
|
||||
!(rxd2 & (MT_RXD2_NORMAL_CLM | MT_RXD2_NORMAL_CM))) {
|
||||
status->flag |= RX_FLAG_DECRYPTED;
|
||||
|
|
|
@ -133,13 +133,15 @@ void mt7603_init_edcca(struct mt7603_dev *dev)
|
|||
}
|
||||
|
||||
static int
|
||||
mt7603_set_channel(struct mt7603_dev *dev, struct cfg80211_chan_def *def)
|
||||
mt7603_set_channel(struct ieee80211_hw *hw, struct cfg80211_chan_def *def)
|
||||
{
|
||||
struct mt7603_dev *dev = hw->priv;
|
||||
u8 *rssi_data = (u8 *)dev->mt76.eeprom.data;
|
||||
int idx, ret;
|
||||
u8 bw = MT_BW_20;
|
||||
bool failed = false;
|
||||
|
||||
ieee80211_stop_queues(hw);
|
||||
cancel_delayed_work_sync(&dev->mphy.mac_work);
|
||||
tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
|
||||
|
||||
|
@ -205,9 +207,28 @@ out:
|
|||
if (failed)
|
||||
mt7603_mac_work(&dev->mphy.mac_work.work);
|
||||
|
||||
ieee80211_wake_queues(hw);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mt7603_set_sar_specs(struct ieee80211_hw *hw,
|
||||
const struct cfg80211_sar_specs *sar)
|
||||
{
|
||||
struct mt7603_dev *dev = hw->priv;
|
||||
struct mt76_phy *mphy = &dev->mphy;
|
||||
int err;
|
||||
|
||||
if (!cfg80211_chandef_valid(&mphy->chandef))
|
||||
return -EINVAL;
|
||||
|
||||
err = mt76_init_sar_power(hw, sar);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return mt7603_set_channel(hw, &mphy->chandef);
|
||||
}
|
||||
|
||||
static int
|
||||
mt7603_config(struct ieee80211_hw *hw, u32 changed)
|
||||
{
|
||||
|
@ -215,11 +236,8 @@ mt7603_config(struct ieee80211_hw *hw, u32 changed)
|
|||
int ret = 0;
|
||||
|
||||
if (changed & (IEEE80211_CONF_CHANGE_CHANNEL |
|
||||
IEEE80211_CONF_CHANGE_POWER)) {
|
||||
ieee80211_stop_queues(hw);
|
||||
ret = mt7603_set_channel(dev, &hw->conf.chandef);
|
||||
ieee80211_wake_queues(hw);
|
||||
}
|
||||
IEEE80211_CONF_CHANGE_POWER))
|
||||
ret = mt7603_set_channel(hw, &hw->conf.chandef);
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
|
@ -700,6 +718,7 @@ const struct ieee80211_ops mt7603_ops = {
|
|||
.set_tim = mt76_set_tim,
|
||||
.get_survey = mt76_get_survey,
|
||||
.get_antenna = mt76_get_antenna,
|
||||
.set_sar_specs = mt7603_set_sar_specs,
|
||||
};
|
||||
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
|
|
|
@ -403,7 +403,7 @@ int mt7603_mcu_set_channel(struct mt7603_dev *dev)
|
|||
.tx_streams = n_chains,
|
||||
.rx_streams = n_chains,
|
||||
};
|
||||
s8 tx_power;
|
||||
s8 tx_power = hw->conf.power_level * 2;
|
||||
int i, ret;
|
||||
|
||||
if (dev->mphy.chandef.width == NL80211_CHAN_WIDTH_40) {
|
||||
|
@ -414,7 +414,7 @@ int mt7603_mcu_set_channel(struct mt7603_dev *dev)
|
|||
req.center_chan -= 2;
|
||||
}
|
||||
|
||||
tx_power = hw->conf.power_level * 2;
|
||||
tx_power = mt76_get_sar_power(&dev->mphy, chandef->chan, tx_power);
|
||||
if (dev->mphy.antenna_mask == 3)
|
||||
tx_power -= 6;
|
||||
tx_power = min(tx_power, dev->tx_power_limit);
|
||||
|
|
|
@ -359,6 +359,9 @@ mt7615_queues_acq(struct seq_file *s, void *data)
|
|||
int acs = i / MT7615_MAX_WMM_SETS;
|
||||
u32 ctrl, val, qlen = 0;
|
||||
|
||||
if (wmm_idx == 3 && is_mt7663(&dev->mt76))
|
||||
continue;
|
||||
|
||||
val = mt76_rr(dev, MT_PLE_AC_QEMPTY(acs, wmm_idx));
|
||||
ctrl = BIT(31) | BIT(15) | (acs << 8);
|
||||
|
||||
|
|
|
@ -194,6 +194,7 @@ mt7615_check_offload_capability(struct mt7615_dev *dev)
|
|||
ieee80211_hw_set(hw, SUPPORTS_PS);
|
||||
ieee80211_hw_set(hw, SUPPORTS_DYNAMIC_PS);
|
||||
|
||||
wiphy->flags &= ~WIPHY_FLAG_4ADDR_STATION;
|
||||
wiphy->max_remain_on_channel_duration = 5000;
|
||||
wiphy->features |= NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR |
|
||||
NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR |
|
||||
|
|
|
@ -249,6 +249,82 @@ static void mt7615_mac_fill_tm_rx(struct mt7615_phy *phy, __le32 *rxv)
|
|||
#endif
|
||||
}
|
||||
|
||||
/* The HW does not translate the mac header to 802.3 for mesh point */
|
||||
static int mt7615_reverse_frag0_hdr_trans(struct sk_buff *skb, u16 hdr_gap)
|
||||
{
|
||||
struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
|
||||
struct mt7615_sta *msta = (struct mt7615_sta *)status->wcid;
|
||||
struct ieee80211_sta *sta;
|
||||
struct ieee80211_vif *vif;
|
||||
struct ieee80211_hdr hdr;
|
||||
struct ethhdr eth_hdr;
|
||||
__le32 *rxd = (__le32 *)skb->data;
|
||||
__le32 qos_ctrl, ht_ctrl;
|
||||
|
||||
if (FIELD_GET(MT_RXD1_NORMAL_ADDR_TYPE, le32_to_cpu(rxd[1])) !=
|
||||
MT_RXD1_NORMAL_U2M)
|
||||
return -EINVAL;
|
||||
|
||||
if (!(le32_to_cpu(rxd[0]) & MT_RXD0_NORMAL_GROUP_4))
|
||||
return -EINVAL;
|
||||
|
||||
if (!msta || !msta->vif)
|
||||
return -EINVAL;
|
||||
|
||||
sta = container_of((void *)msta, struct ieee80211_sta, drv_priv);
|
||||
vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv);
|
||||
|
||||
/* store the info from RXD and ethhdr to avoid being overridden */
|
||||
memcpy(ð_hdr, skb->data + hdr_gap, sizeof(eth_hdr));
|
||||
hdr.frame_control = FIELD_GET(MT_RXD4_FRAME_CONTROL, rxd[4]);
|
||||
hdr.seq_ctrl = FIELD_GET(MT_RXD6_SEQ_CTRL, rxd[6]);
|
||||
qos_ctrl = FIELD_GET(MT_RXD6_QOS_CTL, rxd[6]);
|
||||
ht_ctrl = FIELD_GET(MT_RXD7_HT_CONTROL, rxd[7]);
|
||||
|
||||
hdr.duration_id = 0;
|
||||
ether_addr_copy(hdr.addr1, vif->addr);
|
||||
ether_addr_copy(hdr.addr2, sta->addr);
|
||||
switch (le16_to_cpu(hdr.frame_control) &
|
||||
(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) {
|
||||
case 0:
|
||||
ether_addr_copy(hdr.addr3, vif->bss_conf.bssid);
|
||||
break;
|
||||
case IEEE80211_FCTL_FROMDS:
|
||||
ether_addr_copy(hdr.addr3, eth_hdr.h_source);
|
||||
break;
|
||||
case IEEE80211_FCTL_TODS:
|
||||
ether_addr_copy(hdr.addr3, eth_hdr.h_dest);
|
||||
break;
|
||||
case IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS:
|
||||
ether_addr_copy(hdr.addr3, eth_hdr.h_dest);
|
||||
ether_addr_copy(hdr.addr4, eth_hdr.h_source);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
skb_pull(skb, hdr_gap + sizeof(struct ethhdr) - 2);
|
||||
if (eth_hdr.h_proto == htons(ETH_P_AARP) ||
|
||||
eth_hdr.h_proto == htons(ETH_P_IPX))
|
||||
ether_addr_copy(skb_push(skb, ETH_ALEN), bridge_tunnel_header);
|
||||
else if (eth_hdr.h_proto >= htons(ETH_P_802_3_MIN))
|
||||
ether_addr_copy(skb_push(skb, ETH_ALEN), rfc1042_header);
|
||||
else
|
||||
skb_pull(skb, 2);
|
||||
|
||||
if (ieee80211_has_order(hdr.frame_control))
|
||||
memcpy(skb_push(skb, 2), &ht_ctrl, 2);
|
||||
if (ieee80211_is_data_qos(hdr.frame_control))
|
||||
memcpy(skb_push(skb, 2), &qos_ctrl, 2);
|
||||
if (ieee80211_has_a4(hdr.frame_control))
|
||||
memcpy(skb_push(skb, sizeof(hdr)), &hdr, sizeof(hdr));
|
||||
else
|
||||
memcpy(skb_push(skb, sizeof(hdr) - 6), &hdr, sizeof(hdr) - 6);
|
||||
|
||||
status->flag &= ~(RX_FLAG_RADIOTAP_HE | RX_FLAG_RADIOTAP_HE_MU);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
|
||||
{
|
||||
struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
|
||||
|
@ -263,6 +339,7 @@ static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
|
|||
u32 rxd2 = le32_to_cpu(rxd[2]);
|
||||
u32 csum_mask = MT_RXD0_NORMAL_IP_SUM | MT_RXD0_NORMAL_UDP_TCP_SUM;
|
||||
bool unicast, hdr_trans, remove_pad, insert_ccmp_hdr = false;
|
||||
u16 hdr_gap;
|
||||
int phy_idx;
|
||||
int i, idx;
|
||||
u8 chfreq, amsdu_info, qos_ctl = 0;
|
||||
|
@ -286,9 +363,16 @@ static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
|
|||
if (rxd2 & MT_RXD2_NORMAL_AMSDU_ERR)
|
||||
return -EINVAL;
|
||||
|
||||
hdr_trans = rxd1 & MT_RXD1_NORMAL_HDR_TRANS;
|
||||
if (hdr_trans && (rxd2 & MT_RXD2_NORMAL_CM))
|
||||
return -EINVAL;
|
||||
|
||||
/* ICV error or CCMP/BIP/WPI MIC error */
|
||||
if (rxd2 & MT_RXD2_NORMAL_ICV_ERR)
|
||||
status->flag |= RX_FLAG_ONLY_MONITOR;
|
||||
|
||||
unicast = (rxd1 & MT_RXD1_NORMAL_ADDR_TYPE) == MT_RXD1_NORMAL_U2M;
|
||||
idx = FIELD_GET(MT_RXD2_NORMAL_WLAN_IDX, rxd2);
|
||||
hdr_trans = rxd1 & MT_RXD1_NORMAL_HDR_TRANS;
|
||||
status->wcid = mt7615_rx_get_wcid(dev, idx, unicast);
|
||||
|
||||
if (status->wcid) {
|
||||
|
@ -503,16 +587,42 @@ static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
skb_pull(skb, (u8 *)rxd - skb->data + 2 * remove_pad);
|
||||
|
||||
amsdu_info = FIELD_GET(MT_RXD1_NORMAL_PAYLOAD_FORMAT, rxd1);
|
||||
status->amsdu = !!amsdu_info;
|
||||
if (status->amsdu) {
|
||||
status->first_amsdu = amsdu_info == MT_RXD1_FIRST_AMSDU_FRAME;
|
||||
status->last_amsdu = amsdu_info == MT_RXD1_LAST_AMSDU_FRAME;
|
||||
if (!hdr_trans) {
|
||||
memmove(skb->data + 2, skb->data,
|
||||
ieee80211_get_hdrlen_from_skb(skb));
|
||||
}
|
||||
|
||||
hdr_gap = (u8 *)rxd - skb->data + 2 * remove_pad;
|
||||
if (hdr_trans && ieee80211_has_morefrags(fc)) {
|
||||
if (mt7615_reverse_frag0_hdr_trans(skb, hdr_gap))
|
||||
return -EINVAL;
|
||||
hdr_trans = false;
|
||||
} else {
|
||||
int pad_start = 0;
|
||||
|
||||
skb_pull(skb, hdr_gap);
|
||||
if (!hdr_trans && status->amsdu) {
|
||||
pad_start = ieee80211_get_hdrlen_from_skb(skb);
|
||||
} else if (hdr_trans && (rxd2 & MT_RXD2_NORMAL_HDR_TRANS_ERROR)) {
|
||||
/*
|
||||
* When header translation failure is indicated,
|
||||
* the hardware will insert an extra 2-byte field
|
||||
* containing the data length after the protocol
|
||||
* type field.
|
||||
*/
|
||||
pad_start = 12;
|
||||
if (get_unaligned_be16(skb->data + pad_start) == ETH_P_8021Q)
|
||||
pad_start += 4;
|
||||
|
||||
if (get_unaligned_be16(skb->data + pad_start) !=
|
||||
skb->len - pad_start - 2)
|
||||
pad_start = 0;
|
||||
}
|
||||
|
||||
if (pad_start) {
|
||||
memmove(skb->data + 2, skb->data, pad_start);
|
||||
skb_pull(skb, 2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,6 +86,8 @@ enum rx_pkt_type {
|
|||
#define MT_RXD6_SEQ_CTRL GENMASK(15, 0)
|
||||
#define MT_RXD6_QOS_CTL GENMASK(31, 16)
|
||||
|
||||
#define MT_RXD7_HT_CONTROL GENMASK(31, 0)
|
||||
|
||||
#define MT_RXV1_ACID_DET_H BIT(31)
|
||||
#define MT_RXV1_ACID_DET_L BIT(30)
|
||||
#define MT_RXV1_VHTA2_B8_B3 GENMASK(29, 24)
|
||||
|
|
|
@ -73,7 +73,7 @@ static int mt7615_start(struct ieee80211_hw *hw)
|
|||
goto out;
|
||||
}
|
||||
|
||||
ret = mt7615_mcu_set_chan_info(phy, MCU_EXT_CMD_SET_RX_PATH);
|
||||
ret = mt7615_mcu_set_chan_info(phy, MCU_EXT_CMD(SET_RX_PATH));
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
|
@ -141,9 +141,6 @@ static int get_omac_idx(enum nl80211_iftype type, u64 mask)
|
|||
if (i)
|
||||
return i - 1;
|
||||
|
||||
if (type != NL80211_IFTYPE_STATION)
|
||||
break;
|
||||
|
||||
/* next, try to find a free repeater entry for the sta */
|
||||
i = get_free_idx(mask >> REPEATER_BSSID_START, 0,
|
||||
REPEATER_BSSID_MAX - REPEATER_BSSID_START);
|
||||
|
@ -211,11 +208,9 @@ static int mt7615_add_interface(struct ieee80211_hw *hw,
|
|||
mvif->mt76.omac_idx = idx;
|
||||
|
||||
mvif->mt76.band_idx = ext_phy;
|
||||
if (mt7615_ext_phy(dev))
|
||||
mvif->mt76.wmm_idx = ext_phy * (MT7615_MAX_WMM_SETS / 2) +
|
||||
mvif->mt76.idx % (MT7615_MAX_WMM_SETS / 2);
|
||||
else
|
||||
mvif->mt76.wmm_idx = mvif->mt76.idx % MT7615_MAX_WMM_SETS;
|
||||
mvif->mt76.wmm_idx = vif->type != NL80211_IFTYPE_AP;
|
||||
if (ext_phy)
|
||||
mvif->mt76.wmm_idx += 2;
|
||||
|
||||
dev->mt76.vif_mask |= BIT(mvif->mt76.idx);
|
||||
dev->omac_mask |= BIT_ULL(mvif->mt76.omac_idx);
|
||||
|
@ -331,7 +326,7 @@ int mt7615_set_channel(struct mt7615_phy *phy)
|
|||
goto out;
|
||||
}
|
||||
|
||||
ret = mt7615_mcu_set_chan_info(phy, MCU_EXT_CMD_CHANNEL_SWITCH);
|
||||
ret = mt7615_mcu_set_chan_info(phy, MCU_EXT_CMD(CHANNEL_SWITCH));
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ struct mt7663_fw_buf {
|
|||
void mt7615_mcu_fill_msg(struct mt7615_dev *dev, struct sk_buff *skb,
|
||||
int cmd, int *wait_seq)
|
||||
{
|
||||
int txd_len, mcu_cmd = cmd & MCU_CMD_MASK;
|
||||
int txd_len, mcu_cmd = FIELD_GET(__MCU_CMD_FIELD_ID, cmd);
|
||||
struct mt7615_uni_txd *uni_txd;
|
||||
struct mt7615_mcu_txd *mcu_txd;
|
||||
u8 seq, q_idx, pkt_fmt;
|
||||
|
@ -103,10 +103,10 @@ void mt7615_mcu_fill_msg(struct mt7615_dev *dev, struct sk_buff *skb,
|
|||
if (wait_seq)
|
||||
*wait_seq = seq;
|
||||
|
||||
txd_len = cmd & MCU_UNI_PREFIX ? sizeof(*uni_txd) : sizeof(*mcu_txd);
|
||||
txd_len = cmd & __MCU_CMD_FIELD_UNI ? sizeof(*uni_txd) : sizeof(*mcu_txd);
|
||||
txd = (__le32 *)skb_push(skb, txd_len);
|
||||
|
||||
if (cmd != MCU_CMD_FW_SCATTER) {
|
||||
if (cmd != MCU_CMD(FW_SCATTER)) {
|
||||
q_idx = MT_TX_MCU_PORT_RX_Q0;
|
||||
pkt_fmt = MT_TX_TYPE_CMD;
|
||||
} else {
|
||||
|
@ -124,7 +124,7 @@ void mt7615_mcu_fill_msg(struct mt7615_dev *dev, struct sk_buff *skb,
|
|||
FIELD_PREP(MT_TXD1_PKT_FMT, pkt_fmt);
|
||||
txd[1] = cpu_to_le32(val);
|
||||
|
||||
if (cmd & MCU_UNI_PREFIX) {
|
||||
if (cmd & __MCU_CMD_FIELD_UNI) {
|
||||
uni_txd = (struct mt7615_uni_txd *)txd;
|
||||
uni_txd->len = cpu_to_le16(skb->len - sizeof(uni_txd->txd));
|
||||
uni_txd->option = MCU_CMD_UNI_EXT_ACK;
|
||||
|
@ -142,28 +142,17 @@ void mt7615_mcu_fill_msg(struct mt7615_dev *dev, struct sk_buff *skb,
|
|||
mcu_txd->s2d_index = MCU_S2D_H2N;
|
||||
mcu_txd->pkt_type = MCU_PKT_ID;
|
||||
mcu_txd->seq = seq;
|
||||
mcu_txd->cid = mcu_cmd;
|
||||
mcu_txd->ext_cid = FIELD_GET(__MCU_CMD_FIELD_EXT_ID, cmd);
|
||||
|
||||
switch (cmd & ~MCU_CMD_MASK) {
|
||||
case MCU_FW_PREFIX:
|
||||
if (mcu_txd->ext_cid || (cmd & __MCU_CMD_FIELD_CE)) {
|
||||
if (cmd & __MCU_CMD_FIELD_QUERY)
|
||||
mcu_txd->set_query = MCU_Q_QUERY;
|
||||
else
|
||||
mcu_txd->set_query = MCU_Q_SET;
|
||||
mcu_txd->ext_cid_ack = !!mcu_txd->ext_cid;
|
||||
} else {
|
||||
mcu_txd->set_query = MCU_Q_NA;
|
||||
mcu_txd->cid = mcu_cmd;
|
||||
break;
|
||||
case MCU_CE_PREFIX:
|
||||
if (cmd & MCU_QUERY_MASK)
|
||||
mcu_txd->set_query = MCU_Q_QUERY;
|
||||
else
|
||||
mcu_txd->set_query = MCU_Q_SET;
|
||||
mcu_txd->cid = mcu_cmd;
|
||||
break;
|
||||
default:
|
||||
mcu_txd->cid = MCU_CMD_EXT_CID;
|
||||
if (cmd & MCU_QUERY_PREFIX)
|
||||
mcu_txd->set_query = MCU_Q_QUERY;
|
||||
else
|
||||
mcu_txd->set_query = MCU_Q_SET;
|
||||
mcu_txd->ext_cid = mcu_cmd;
|
||||
mcu_txd->ext_cid_ack = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt7615_mcu_fill_msg);
|
||||
|
@ -184,42 +173,32 @@ int mt7615_mcu_parse_response(struct mt76_dev *mdev, int cmd,
|
|||
if (seq != rxd->seq)
|
||||
return -EAGAIN;
|
||||
|
||||
switch (cmd) {
|
||||
case MCU_CMD_PATCH_SEM_CONTROL:
|
||||
if (cmd == MCU_CMD(PATCH_SEM_CONTROL)) {
|
||||
skb_pull(skb, sizeof(*rxd) - 4);
|
||||
ret = *skb->data;
|
||||
break;
|
||||
case MCU_EXT_CMD_GET_TEMP:
|
||||
} else if (cmd == MCU_EXT_CMD(THERMAL_CTRL)) {
|
||||
skb_pull(skb, sizeof(*rxd));
|
||||
ret = le32_to_cpu(*(__le32 *)skb->data);
|
||||
break;
|
||||
case MCU_EXT_CMD_RF_REG_ACCESS | MCU_QUERY_PREFIX:
|
||||
} else if (cmd == MCU_EXT_QUERY(RF_REG_ACCESS)) {
|
||||
skb_pull(skb, sizeof(*rxd));
|
||||
ret = le32_to_cpu(*(__le32 *)&skb->data[8]);
|
||||
break;
|
||||
case MCU_UNI_CMD_DEV_INFO_UPDATE:
|
||||
case MCU_UNI_CMD_BSS_INFO_UPDATE:
|
||||
case MCU_UNI_CMD_STA_REC_UPDATE:
|
||||
case MCU_UNI_CMD_HIF_CTRL:
|
||||
case MCU_UNI_CMD_OFFLOAD:
|
||||
case MCU_UNI_CMD_SUSPEND: {
|
||||
} else if (cmd == MCU_UNI_CMD(DEV_INFO_UPDATE) ||
|
||||
cmd == MCU_UNI_CMD(BSS_INFO_UPDATE) ||
|
||||
cmd == MCU_UNI_CMD(STA_REC_UPDATE) ||
|
||||
cmd == MCU_UNI_CMD(HIF_CTRL) ||
|
||||
cmd == MCU_UNI_CMD(OFFLOAD) ||
|
||||
cmd == MCU_UNI_CMD(SUSPEND)) {
|
||||
struct mt7615_mcu_uni_event *event;
|
||||
|
||||
skb_pull(skb, sizeof(*rxd));
|
||||
event = (struct mt7615_mcu_uni_event *)skb->data;
|
||||
ret = le32_to_cpu(event->status);
|
||||
break;
|
||||
}
|
||||
case MCU_CMD_REG_READ: {
|
||||
} else if (cmd == MCU_CE_QUERY(REG_READ)) {
|
||||
struct mt7615_mcu_reg_event *event;
|
||||
|
||||
skb_pull(skb, sizeof(*rxd));
|
||||
event = (struct mt7615_mcu_reg_event *)skb->data;
|
||||
ret = (int)le32_to_cpu(event->val);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -253,8 +232,7 @@ u32 mt7615_rf_rr(struct mt7615_dev *dev, u32 wf, u32 reg)
|
|||
.address = cpu_to_le32(reg),
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76,
|
||||
MCU_EXT_CMD_RF_REG_ACCESS | MCU_QUERY_PREFIX,
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_QUERY(RF_REG_ACCESS),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
|
@ -270,8 +248,8 @@ int mt7615_rf_wr(struct mt7615_dev *dev, u32 wf, u32 reg, u32 val)
|
|||
.data = cpu_to_le32(val),
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_RF_REG_ACCESS, &req,
|
||||
sizeof(req), false);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(RF_REG_ACCESS),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
|
||||
void mt7622_trigger_hif_int(struct mt7615_dev *dev, bool en)
|
||||
|
@ -658,8 +636,8 @@ mt7615_mcu_muar_config(struct mt7615_dev *dev, struct ieee80211_vif *vif,
|
|||
if (enable)
|
||||
ether_addr_copy(req.addr, addr);
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_MUAR_UPDATE, &req,
|
||||
sizeof(req), true);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(MUAR_UPDATE),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -702,7 +680,7 @@ mt7615_mcu_add_dev(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
|||
return mt7615_mcu_muar_config(dev, vif, false, enable);
|
||||
|
||||
memcpy(data.tlv.omac_addr, vif->addr, ETH_ALEN);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_DEV_INFO_UPDATE,
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(DEV_INFO_UPDATE),
|
||||
&data, sizeof(data), true);
|
||||
}
|
||||
|
||||
|
@ -771,7 +749,7 @@ mt7615_mcu_add_beacon_offload(struct mt7615_dev *dev,
|
|||
dev_kfree_skb(skb);
|
||||
|
||||
out:
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_BCN_OFFLOAD, &req,
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(BCN_OFFLOAD), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
|
||||
|
@ -802,8 +780,8 @@ mt7615_mcu_ctrl_pm_state(struct mt7615_dev *dev, int band, int state)
|
|||
.band_idx = band,
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_PM_STATE_CTRL, &req,
|
||||
sizeof(req), true);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(PM_STATE_CTRL),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -843,7 +821,7 @@ mt7615_mcu_bss_basic_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
|
|||
|
||||
bss = (struct bss_info_basic *)tlv;
|
||||
bss->network_type = cpu_to_le32(type);
|
||||
bss->bmc_tx_wlan_idx = wlan_idx;
|
||||
bss->bmc_wcid_lo = wlan_idx;
|
||||
bss->wmm_idx = mvif->mt76.wmm_idx;
|
||||
bss->active = enable;
|
||||
|
||||
|
@ -944,7 +922,7 @@ mt7615_mcu_add_bss(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
|||
mt7615_mcu_bss_ext_tlv(skb, mvif);
|
||||
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_EXT_CMD_BSS_INFO_UPDATE, true);
|
||||
MCU_EXT_CMD(BSS_INFO_UPDATE), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -966,8 +944,8 @@ mt7615_mcu_wtbl_tx_ba(struct mt7615_dev *dev,
|
|||
mt76_connac_mcu_wtbl_ba_tlv(&dev->mt76, skb, params, enable, true,
|
||||
NULL, wtbl_hdr);
|
||||
|
||||
err = mt76_mcu_skb_send_msg(&dev->mt76, skb, MCU_EXT_CMD_WTBL_UPDATE,
|
||||
true);
|
||||
err = mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_EXT_CMD(WTBL_UPDATE), true);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
@ -979,7 +957,7 @@ mt7615_mcu_wtbl_tx_ba(struct mt7615_dev *dev,
|
|||
mt76_connac_mcu_sta_ba_tlv(skb, params, enable, true);
|
||||
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_EXT_CMD_STA_REC_UPDATE, true);
|
||||
MCU_EXT_CMD(STA_REC_UPDATE), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1001,7 +979,7 @@ mt7615_mcu_wtbl_rx_ba(struct mt7615_dev *dev,
|
|||
mt76_connac_mcu_sta_ba_tlv(skb, params, enable, false);
|
||||
|
||||
err = mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_EXT_CMD_STA_REC_UPDATE, true);
|
||||
MCU_EXT_CMD(STA_REC_UPDATE), true);
|
||||
if (err < 0 || !enable)
|
||||
return err;
|
||||
|
||||
|
@ -1014,8 +992,8 @@ mt7615_mcu_wtbl_rx_ba(struct mt7615_dev *dev,
|
|||
mt76_connac_mcu_wtbl_ba_tlv(&dev->mt76, skb, params, enable, false,
|
||||
NULL, wtbl_hdr);
|
||||
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb, MCU_EXT_CMD_WTBL_UPDATE,
|
||||
true);
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_EXT_CMD(WTBL_UPDATE), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1057,7 +1035,7 @@ mt7615_mcu_wtbl_sta_add(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
|||
NULL, wtbl_hdr);
|
||||
}
|
||||
|
||||
cmd = enable ? MCU_EXT_CMD_WTBL_UPDATE : MCU_EXT_CMD_STA_REC_UPDATE;
|
||||
cmd = enable ? MCU_EXT_CMD(WTBL_UPDATE) : MCU_EXT_CMD(STA_REC_UPDATE);
|
||||
skb = enable ? wskb : sskb;
|
||||
|
||||
err = mt76_mcu_skb_send_msg(&dev->mt76, skb, cmd, true);
|
||||
|
@ -1068,7 +1046,7 @@ mt7615_mcu_wtbl_sta_add(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
|||
return err;
|
||||
}
|
||||
|
||||
cmd = enable ? MCU_EXT_CMD_STA_REC_UPDATE : MCU_EXT_CMD_WTBL_UPDATE;
|
||||
cmd = enable ? MCU_EXT_CMD(STA_REC_UPDATE) : MCU_EXT_CMD(WTBL_UPDATE);
|
||||
skb = enable ? sskb : wskb;
|
||||
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb, cmd, true);
|
||||
|
@ -1090,8 +1068,8 @@ mt7615_mcu_wtbl_update_hdr_trans(struct mt7615_dev *dev,
|
|||
|
||||
mt76_connac_mcu_wtbl_hdr_trans_tlv(skb, vif, &msta->wcid, NULL,
|
||||
wtbl_hdr);
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb, MCU_EXT_CMD_WTBL_UPDATE,
|
||||
true);
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_EXT_CMD(WTBL_UPDATE), true);
|
||||
}
|
||||
|
||||
static const struct mt7615_mcu_ops wtbl_update_ops = {
|
||||
|
@ -1136,7 +1114,7 @@ mt7615_mcu_sta_ba(struct mt7615_dev *dev,
|
|||
sta_wtbl, wtbl_hdr);
|
||||
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_EXT_CMD_STA_REC_UPDATE, true);
|
||||
MCU_EXT_CMD(STA_REC_UPDATE), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1179,7 +1157,7 @@ mt7615_mcu_add_sta(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
|||
struct ieee80211_sta *sta, bool enable)
|
||||
{
|
||||
return __mt7615_mcu_add_sta(phy->mt76, vif, sta, enable,
|
||||
MCU_EXT_CMD_STA_REC_UPDATE, false);
|
||||
MCU_EXT_CMD(STA_REC_UPDATE), false);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1191,7 +1169,7 @@ mt7615_mcu_sta_update_hdr_trans(struct mt7615_dev *dev,
|
|||
|
||||
return mt76_connac_mcu_sta_update_hdr_trans(&dev->mt76,
|
||||
vif, &msta->wcid,
|
||||
MCU_EXT_CMD_STA_REC_UPDATE);
|
||||
MCU_EXT_CMD(STA_REC_UPDATE));
|
||||
}
|
||||
|
||||
static const struct mt7615_mcu_ops sta_update_ops = {
|
||||
|
@ -1285,7 +1263,7 @@ mt7615_mcu_uni_add_beacon_offload(struct mt7615_dev *dev,
|
|||
dev_kfree_skb(skb);
|
||||
|
||||
out:
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_UNI_CMD_BSS_INFO_UPDATE,
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_UNI_CMD(BSS_INFO_UPDATE),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
|
@ -1314,7 +1292,7 @@ mt7615_mcu_uni_add_sta(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
|||
struct ieee80211_sta *sta, bool enable)
|
||||
{
|
||||
return __mt7615_mcu_add_sta(phy->mt76, vif, sta, enable,
|
||||
MCU_UNI_CMD_STA_REC_UPDATE, true);
|
||||
MCU_UNI_CMD(STA_REC_UPDATE), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1348,7 +1326,7 @@ mt7615_mcu_uni_rx_ba(struct mt7615_dev *dev,
|
|||
mt76_connac_mcu_sta_ba_tlv(skb, params, enable, false);
|
||||
|
||||
err = mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_UNI_CMD_STA_REC_UPDATE, true);
|
||||
MCU_UNI_CMD(STA_REC_UPDATE), true);
|
||||
if (err < 0 || !enable)
|
||||
return err;
|
||||
|
||||
|
@ -1369,7 +1347,7 @@ mt7615_mcu_uni_rx_ba(struct mt7615_dev *dev,
|
|||
sta_wtbl, wtbl_hdr);
|
||||
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_UNI_CMD_STA_REC_UPDATE, true);
|
||||
MCU_UNI_CMD(STA_REC_UPDATE), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1381,7 +1359,7 @@ mt7615_mcu_sta_uni_update_hdr_trans(struct mt7615_dev *dev,
|
|||
|
||||
return mt76_connac_mcu_sta_update_hdr_trans(&dev->mt76,
|
||||
vif, &msta->wcid,
|
||||
MCU_UNI_CMD_STA_REC_UPDATE);
|
||||
MCU_UNI_CMD(STA_REC_UPDATE));
|
||||
}
|
||||
|
||||
static const struct mt7615_mcu_ops uni_update_ops = {
|
||||
|
@ -1399,7 +1377,7 @@ static const struct mt7615_mcu_ops uni_update_ops = {
|
|||
|
||||
int mt7615_mcu_restart(struct mt76_dev *dev)
|
||||
{
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD_RESTART_DL_REQ, NULL, 0, true);
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD(RESTART_DL_REQ), NULL, 0, true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt7615_mcu_restart);
|
||||
|
||||
|
@ -1445,7 +1423,7 @@ static int mt7615_load_patch(struct mt7615_dev *dev, u32 addr, const char *name)
|
|||
goto out;
|
||||
}
|
||||
|
||||
ret = mt76_mcu_send_firmware(&dev->mt76, MCU_CMD_FW_SCATTER,
|
||||
ret = mt76_mcu_send_firmware(&dev->mt76, MCU_CMD(FW_SCATTER),
|
||||
fw->data + sizeof(*hdr), len);
|
||||
if (ret) {
|
||||
dev_err(dev->mt76.dev, "Failed to send firmware to device\n");
|
||||
|
@ -1508,7 +1486,7 @@ mt7615_mcu_send_ram_firmware(struct mt7615_dev *dev,
|
|||
return err;
|
||||
}
|
||||
|
||||
err = mt76_mcu_send_firmware(&dev->mt76, MCU_CMD_FW_SCATTER,
|
||||
err = mt76_mcu_send_firmware(&dev->mt76, MCU_CMD(FW_SCATTER),
|
||||
data + offset, len);
|
||||
if (err) {
|
||||
dev_err(dev->mt76.dev, "Failed to send firmware to device\n");
|
||||
|
@ -1644,7 +1622,7 @@ static int mt7615_load_firmware(struct mt7615_dev *dev)
|
|||
|
||||
if (!mt76_poll_msec(dev, MT_TOP_MISC2, MT_TOP_MISC2_FW_STATE,
|
||||
FIELD_PREP(MT_TOP_MISC2_FW_STATE,
|
||||
FW_STATE_CR4_RDY), 500)) {
|
||||
FW_STATE_RDY), 500)) {
|
||||
dev_err(dev->mt76.dev, "Timeout for initializing firmware\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -1694,8 +1672,8 @@ int mt7615_mcu_fw_log_2_host(struct mt7615_dev *dev, u8 ctrl)
|
|||
.ctrl_val = ctrl
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_FW_LOG_2_HOST, &data,
|
||||
sizeof(data), true);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(FW_LOG_2_HOST),
|
||||
&data, sizeof(data), true);
|
||||
}
|
||||
|
||||
static int mt7615_mcu_cal_cache_apply(struct mt7615_dev *dev)
|
||||
|
@ -1707,7 +1685,7 @@ static int mt7615_mcu_cal_cache_apply(struct mt7615_dev *dev)
|
|||
.cache_enable = true
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_CAL_CACHE, &data,
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(CAL_CACHE), &data,
|
||||
sizeof(data), false);
|
||||
}
|
||||
|
||||
|
@ -1756,7 +1734,7 @@ static int mt7663_load_n9(struct mt7615_dev *dev, const char *name)
|
|||
goto out;
|
||||
}
|
||||
|
||||
ret = mt76_mcu_send_firmware(&dev->mt76, MCU_CMD_FW_SCATTER,
|
||||
ret = mt76_mcu_send_firmware(&dev->mt76, MCU_CMD(FW_SCATTER),
|
||||
fw->data + offset, len);
|
||||
if (ret) {
|
||||
dev_err(dev->mt76.dev, "Failed to send firmware\n");
|
||||
|
@ -1977,7 +1955,7 @@ int mt7615_mcu_set_eeprom(struct mt7615_dev *dev)
|
|||
skb_put_data(skb, eep + offset, eep_len);
|
||||
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_EXT_CMD_EFUSE_BUFFER_MODE, true);
|
||||
MCU_EXT_CMD(EFUSE_BUFFER_MODE), true);
|
||||
}
|
||||
|
||||
int mt7615_mcu_set_wmm(struct mt7615_dev *dev, u8 queue,
|
||||
|
@ -2013,8 +1991,8 @@ int mt7615_mcu_set_wmm(struct mt7615_dev *dev, u8 queue,
|
|||
if (params->cw_max)
|
||||
req.cw_max = cpu_to_le16(fls(params->cw_max));
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_EDCA_UPDATE, &req,
|
||||
sizeof(req), true);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(EDCA_UPDATE),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
int mt7615_mcu_set_dbdc(struct mt7615_dev *dev)
|
||||
|
@ -2072,7 +2050,7 @@ int mt7615_mcu_set_dbdc(struct mt7615_dev *dev)
|
|||
ADD_DBDC_ENTRY(DBDC_TYPE_MGMT, 1, 1);
|
||||
|
||||
out:
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_DBDC_CTRL, &req,
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(DBDC_CTRL), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
|
||||
|
@ -2082,8 +2060,8 @@ int mt7615_mcu_del_wtbl_all(struct mt7615_dev *dev)
|
|||
.operation = WTBL_RESET_ALL,
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_WTBL_UPDATE, &req,
|
||||
sizeof(req), true);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(WTBL_UPDATE),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
int mt7615_mcu_rdd_cmd(struct mt7615_dev *dev,
|
||||
|
@ -2103,8 +2081,8 @@ int mt7615_mcu_rdd_cmd(struct mt7615_dev *dev,
|
|||
.val = val,
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_CTRL, &req,
|
||||
sizeof(req), true);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SET_RDD_CTRL),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
int mt7615_mcu_set_fcc5_lpn(struct mt7615_dev *dev, int val)
|
||||
|
@ -2117,8 +2095,8 @@ int mt7615_mcu_set_fcc5_lpn(struct mt7615_dev *dev, int val)
|
|||
.min_lpn = cpu_to_le16(val),
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_TH, &req,
|
||||
sizeof(req), true);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SET_RADAR_TH),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
int mt7615_mcu_set_pulse_th(struct mt7615_dev *dev,
|
||||
|
@ -2146,8 +2124,8 @@ int mt7615_mcu_set_pulse_th(struct mt7615_dev *dev,
|
|||
#undef __req_field
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_TH, &req,
|
||||
sizeof(req), true);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SET_RADAR_TH),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
int mt7615_mcu_set_radar_th(struct mt7615_dev *dev, int index,
|
||||
|
@ -2193,8 +2171,8 @@ int mt7615_mcu_set_radar_th(struct mt7615_dev *dev, int index,
|
|||
#undef __req_field_u32
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_TH, &req,
|
||||
sizeof(req), true);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SET_RADAR_TH),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
int mt7615_mcu_rdd_send_pattern(struct mt7615_dev *dev)
|
||||
|
@ -2225,7 +2203,7 @@ int mt7615_mcu_rdd_send_pattern(struct mt7615_dev *dev)
|
|||
req.pattern[i].start_time = cpu_to_le32(ts);
|
||||
}
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RDD_PATTERN,
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SET_RDD_PATTERN),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
|
||||
|
@ -2394,8 +2372,8 @@ int mt7615_mcu_get_temperature(struct mt7615_dev *dev)
|
|||
u8 rsv[3];
|
||||
} req = {};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_GET_TEMP, &req,
|
||||
sizeof(req), true);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(THERMAL_CTRL),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
int mt7615_mcu_set_test_param(struct mt7615_dev *dev, u8 param, bool test_mode,
|
||||
|
@ -2415,8 +2393,8 @@ int mt7615_mcu_set_test_param(struct mt7615_dev *dev, u8 param, bool test_mode,
|
|||
.value = cpu_to_le32(val),
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_ATE_CTRL, &req,
|
||||
sizeof(req), false);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(ATE_CTRL),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
|
||||
int mt7615_mcu_set_sku_en(struct mt7615_phy *phy, bool enable)
|
||||
|
@ -2434,8 +2412,8 @@ int mt7615_mcu_set_sku_en(struct mt7615_phy *phy, bool enable)
|
|||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76,
|
||||
MCU_EXT_CMD_TX_POWER_FEATURE_CTRL, &req,
|
||||
sizeof(req), true);
|
||||
MCU_EXT_CMD(TX_POWER_FEATURE_CTRL),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
static int mt7615_find_freq_idx(const u16 *freqs, int n_freqs, u16 cur)
|
||||
|
@ -2574,7 +2552,7 @@ again:
|
|||
|
||||
out:
|
||||
req.center_freq = cpu_to_le16(center_freq);
|
||||
ret = mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_RXDCOC_CAL, &req,
|
||||
ret = mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(RXDCOC_CAL), &req,
|
||||
sizeof(req), true);
|
||||
|
||||
if ((chandef->width == NL80211_CHAN_WIDTH_80P80 ||
|
||||
|
@ -2695,8 +2673,8 @@ again:
|
|||
|
||||
out:
|
||||
req.center_freq = cpu_to_le16(center_freq);
|
||||
ret = mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_TXDPD_CAL, &req,
|
||||
sizeof(req), true);
|
||||
ret = mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(TXDPD_CAL),
|
||||
&req, sizeof(req), true);
|
||||
|
||||
if ((chandef->width == NL80211_CHAN_WIDTH_80P80 ||
|
||||
chandef->width == NL80211_CHAN_WIDTH_160) && !req.is_freq2) {
|
||||
|
@ -2724,7 +2702,7 @@ int mt7615_mcu_set_rx_hdr_trans_blacklist(struct mt7615_dev *dev)
|
|||
.etype = cpu_to_le16(ETH_P_PAE),
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_RX_HDR_TRANS,
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(RX_HDR_TRANS),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
|
||||
|
@ -2759,13 +2737,13 @@ int mt7615_mcu_set_bss_pm(struct mt7615_dev *dev, struct ieee80211_vif *vif,
|
|||
if (vif->type != NL80211_IFTYPE_STATION)
|
||||
return 0;
|
||||
|
||||
err = mt76_mcu_send_msg(&dev->mt76, MCU_CMD_SET_BSS_ABORT, &req_hdr,
|
||||
sizeof(req_hdr), false);
|
||||
err = mt76_mcu_send_msg(&dev->mt76, MCU_CE_CMD(SET_BSS_ABORT),
|
||||
&req_hdr, sizeof(req_hdr), false);
|
||||
if (err < 0 || !enable)
|
||||
return err;
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_CMD_SET_BSS_CONNECTED, &req,
|
||||
sizeof(req), false);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_CE_CMD(SET_BSS_CONNECTED),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
|
||||
int mt7615_mcu_set_roc(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
||||
|
@ -2784,6 +2762,6 @@ int mt7615_mcu_set_roc(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
|||
|
||||
phy->roc_grant = false;
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_CMD_SET_ROC, &req,
|
||||
sizeof(req), false);
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_CE_CMD(SET_ROC),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
|
|
|
@ -76,35 +76,6 @@ struct mt7615_uni_txd {
|
|||
u8 reserved2[4];
|
||||
} __packed __aligned(4);
|
||||
|
||||
/* event table */
|
||||
enum {
|
||||
MCU_EVENT_TARGET_ADDRESS_LEN = 0x01,
|
||||
MCU_EVENT_FW_START = 0x01,
|
||||
MCU_EVENT_GENERIC = 0x01,
|
||||
MCU_EVENT_ACCESS_REG = 0x02,
|
||||
MCU_EVENT_MT_PATCH_SEM = 0x04,
|
||||
MCU_EVENT_REG_ACCESS = 0x05,
|
||||
MCU_EVENT_SCAN_DONE = 0x0d,
|
||||
MCU_EVENT_ROC = 0x10,
|
||||
MCU_EVENT_BSS_ABSENCE = 0x11,
|
||||
MCU_EVENT_BSS_BEACON_LOSS = 0x13,
|
||||
MCU_EVENT_CH_PRIVILEGE = 0x18,
|
||||
MCU_EVENT_SCHED_SCAN_DONE = 0x23,
|
||||
MCU_EVENT_EXT = 0xed,
|
||||
MCU_EVENT_RESTART_DL = 0xef,
|
||||
MCU_EVENT_COREDUMP = 0xf0,
|
||||
};
|
||||
|
||||
/* ext event table */
|
||||
enum {
|
||||
MCU_EXT_EVENT_PS_SYNC = 0x5,
|
||||
MCU_EXT_EVENT_FW_LOG_2_HOST = 0x13,
|
||||
MCU_EXT_EVENT_THERMAL_PROTECT = 0x22,
|
||||
MCU_EXT_EVENT_ASSERT_DUMP = 0x23,
|
||||
MCU_EXT_EVENT_RDD_REPORT = 0x3a,
|
||||
MCU_EXT_EVENT_CSA_NOTIFY = 0x4f,
|
||||
};
|
||||
|
||||
enum {
|
||||
MT_SKU_CCK_1_2 = 0,
|
||||
MT_SKU_CCK_55_11,
|
||||
|
@ -233,20 +204,6 @@ struct mt7615_mcu_rdd_report {
|
|||
#define MCU_PQ_ID(p, q) (((p) << 15) | ((q) << 10))
|
||||
#define MCU_PKT_ID 0xa0
|
||||
|
||||
enum {
|
||||
MCU_Q_QUERY,
|
||||
MCU_Q_SET,
|
||||
MCU_Q_RESERVED,
|
||||
MCU_Q_NA
|
||||
};
|
||||
|
||||
enum {
|
||||
MCU_S2D_H2N,
|
||||
MCU_S2D_C2N,
|
||||
MCU_S2D_H2C,
|
||||
MCU_S2D_H2CN
|
||||
};
|
||||
|
||||
enum {
|
||||
MCU_ATE_SET_FREQ_OFFSET = 0xa,
|
||||
MCU_ATE_SET_TX_POWER_CONTROL = 0x15,
|
||||
|
@ -280,21 +237,6 @@ struct mt7615_roc_tlv {
|
|||
u8 rsv1[8];
|
||||
} __packed;
|
||||
|
||||
enum {
|
||||
PATCH_NOT_DL_SEM_FAIL = 0x0,
|
||||
PATCH_IS_DL = 0x1,
|
||||
PATCH_NOT_DL_SEM_SUCCESS = 0x2,
|
||||
PATCH_REL_SEM_SUCCESS = 0x3
|
||||
};
|
||||
|
||||
enum {
|
||||
FW_STATE_INITIAL = 0,
|
||||
FW_STATE_FW_DOWNLOAD = 1,
|
||||
FW_STATE_NORMAL_OPERATION = 2,
|
||||
FW_STATE_NORMAL_TRX = 3,
|
||||
FW_STATE_CR4_RDY = 7
|
||||
};
|
||||
|
||||
enum {
|
||||
FW_STATE_PWR_ON = 1,
|
||||
FW_STATE_N9_RDY = 2,
|
||||
|
@ -312,73 +254,4 @@ enum {
|
|||
__DBDC_TYPE_MAX,
|
||||
};
|
||||
|
||||
struct bss_info_omac {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
u8 hw_bss_idx;
|
||||
u8 omac_idx;
|
||||
u8 band_idx;
|
||||
u8 rsv0;
|
||||
__le32 conn_type;
|
||||
u32 rsv1;
|
||||
} __packed;
|
||||
|
||||
struct bss_info_basic {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
__le32 network_type;
|
||||
u8 active;
|
||||
u8 rsv0;
|
||||
__le16 bcn_interval;
|
||||
u8 bssid[ETH_ALEN];
|
||||
u8 wmm_idx;
|
||||
u8 dtim_period;
|
||||
u8 bmc_tx_wlan_idx;
|
||||
u8 cipher; /* not used */
|
||||
u8 phymode; /* not used */
|
||||
u8 rsv1[5];
|
||||
} __packed;
|
||||
|
||||
struct bss_info_rf_ch {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
u8 pri_ch;
|
||||
u8 central_ch0;
|
||||
u8 central_ch1;
|
||||
u8 bw;
|
||||
} __packed;
|
||||
|
||||
struct bss_info_ext_bss {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
__le32 mbss_tsf_offset; /* in unit of us */
|
||||
u8 rsv[8];
|
||||
} __packed;
|
||||
|
||||
enum {
|
||||
BSS_INFO_OMAC,
|
||||
BSS_INFO_BASIC,
|
||||
BSS_INFO_RF_CH, /* optional, for BT/LTE coex */
|
||||
BSS_INFO_PM, /* sta only */
|
||||
BSS_INFO_UAPSD, /* sta only */
|
||||
BSS_INFO_ROAM_DETECTION, /* obsoleted */
|
||||
BSS_INFO_LQ_RM, /* obsoleted */
|
||||
BSS_INFO_EXT_BSS,
|
||||
BSS_INFO_BMC_INFO, /* for bmc rate control in CR4 */
|
||||
BSS_INFO_SYNC_MODE, /* obsoleted */
|
||||
BSS_INFO_RA,
|
||||
BSS_INFO_MAX_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
CH_SWITCH_NORMAL = 0,
|
||||
CH_SWITCH_SCAN = 3,
|
||||
CH_SWITCH_MCC = 4,
|
||||
CH_SWITCH_DFS = 5,
|
||||
CH_SWITCH_BACKGROUND_SCAN_START = 6,
|
||||
CH_SWITCH_BACKGROUND_SCAN_RUNNING = 7,
|
||||
CH_SWITCH_BACKGROUND_SCAN_STOP = 8,
|
||||
CH_SWITCH_SCAN_BYPASS_DPD = 9
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -135,6 +135,7 @@ static void mt7615_irq_tasklet(struct tasklet_struct *t)
|
|||
if (is_mt7663(&dev->mt76)) {
|
||||
mcu_int = mt76_rr(dev, MT_MCU2HOST_INT_STATUS);
|
||||
mcu_int &= MT7663_MCU_CMD_ERROR_MASK;
|
||||
mt76_wr(dev, MT_MCU2HOST_INT_STATUS, mcu_int);
|
||||
} else {
|
||||
mcu_int = mt76_rr(dev, MT_MCU_CMD);
|
||||
mcu_int &= MT_MCU_CMD_ERROR_MASK;
|
||||
|
|
|
@ -28,8 +28,6 @@ static void mt7615_pci_init_work(struct work_struct *work)
|
|||
return;
|
||||
|
||||
mt7615_init_work(dev);
|
||||
if (dev->dbdc_support)
|
||||
mt7615_register_ext_phy(dev);
|
||||
}
|
||||
|
||||
static int mt7615_init_hardware(struct mt7615_dev *dev)
|
||||
|
@ -160,6 +158,12 @@ int mt7615_register_device(struct mt7615_dev *dev)
|
|||
mt7615_init_txpower(dev, &dev->mphy.sband_2g.sband);
|
||||
mt7615_init_txpower(dev, &dev->mphy.sband_5g.sband);
|
||||
|
||||
if (dev->dbdc_support) {
|
||||
ret = mt7615_register_ext_phy(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return mt7615_init_debugfs(dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ mt7615_tm_set_tx_power(struct mt7615_phy *phy)
|
|||
}
|
||||
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_EXT_CMD_SET_TX_POWER_CTRL, false);
|
||||
MCU_EXT_CMD(SET_TX_POWER_CTRL), false);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -185,36 +185,35 @@ mt7615_tm_set_tx_antenna(struct mt7615_phy *phy, bool en)
|
|||
for (i = 0; i < 4; i++) {
|
||||
mt76_rmw_field(dev, MT_WF_PHY_RFINTF3_0(i),
|
||||
MT_WF_PHY_RFINTF3_0_ANT,
|
||||
(td->tx_antenna_mask & BIT(i)) ? 0 : 0xa);
|
||||
|
||||
(mask & BIT(i)) ? 0 : 0xa);
|
||||
}
|
||||
|
||||
/* 2.4 GHz band */
|
||||
mt76_rmw_field(dev, MT_ANT_SWITCH_CON(3), MT_ANT_SWITCH_CON_MODE(0),
|
||||
(td->tx_antenna_mask & BIT(0)) ? 0x8 : 0x1b);
|
||||
(mask & BIT(0)) ? 0x8 : 0x1b);
|
||||
mt76_rmw_field(dev, MT_ANT_SWITCH_CON(4), MT_ANT_SWITCH_CON_MODE(2),
|
||||
(td->tx_antenna_mask & BIT(1)) ? 0xe : 0x1b);
|
||||
(mask & BIT(1)) ? 0xe : 0x1b);
|
||||
mt76_rmw_field(dev, MT_ANT_SWITCH_CON(6), MT_ANT_SWITCH_CON_MODE1(0),
|
||||
(td->tx_antenna_mask & BIT(2)) ? 0x0 : 0xf);
|
||||
(mask & BIT(2)) ? 0x0 : 0xf);
|
||||
mt76_rmw_field(dev, MT_ANT_SWITCH_CON(7), MT_ANT_SWITCH_CON_MODE1(2),
|
||||
(td->tx_antenna_mask & BIT(3)) ? 0x6 : 0xf);
|
||||
(mask & BIT(3)) ? 0x6 : 0xf);
|
||||
|
||||
/* 5 GHz band */
|
||||
mt76_rmw_field(dev, MT_ANT_SWITCH_CON(4), MT_ANT_SWITCH_CON_MODE(1),
|
||||
(td->tx_antenna_mask & BIT(0)) ? 0xd : 0x1b);
|
||||
(mask & BIT(0)) ? 0xd : 0x1b);
|
||||
mt76_rmw_field(dev, MT_ANT_SWITCH_CON(2), MT_ANT_SWITCH_CON_MODE(3),
|
||||
(td->tx_antenna_mask & BIT(1)) ? 0x13 : 0x1b);
|
||||
(mask & BIT(1)) ? 0x13 : 0x1b);
|
||||
mt76_rmw_field(dev, MT_ANT_SWITCH_CON(7), MT_ANT_SWITCH_CON_MODE1(1),
|
||||
(td->tx_antenna_mask & BIT(2)) ? 0x5 : 0xf);
|
||||
(mask & BIT(2)) ? 0x5 : 0xf);
|
||||
mt76_rmw_field(dev, MT_ANT_SWITCH_CON(8), MT_ANT_SWITCH_CON_MODE1(3),
|
||||
(td->tx_antenna_mask & BIT(3)) ? 0xb : 0xf);
|
||||
(mask & BIT(3)) ? 0xb : 0xf);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
u32 val;
|
||||
|
||||
val = mt7615_rf_rr(dev, i, 0x48);
|
||||
val &= ~(0x3ff << 20);
|
||||
if (td->tx_antenna_mask & BIT(i))
|
||||
if (mask & BIT(i))
|
||||
val |= 3 << 20;
|
||||
else
|
||||
val |= (2 << 28) | (2 << 26) | (8 << 20);
|
||||
|
@ -229,7 +228,7 @@ mt7615_tm_set_tx_frames(struct mt7615_phy *phy, bool en)
|
|||
struct ieee80211_tx_info *info;
|
||||
struct sk_buff *skb = phy->mt76->test.tx_skb;
|
||||
|
||||
mt7615_mcu_set_chan_info(phy, MCU_EXT_CMD_SET_RX_PATH);
|
||||
mt7615_mcu_set_chan_info(phy, MCU_EXT_CMD(SET_RX_PATH));
|
||||
mt7615_tm_set_tx_antenna(phy, en);
|
||||
mt7615_tm_set_rx_enable(dev, !en);
|
||||
if (!en || !skb)
|
||||
|
|
|
@ -21,7 +21,7 @@ mt7663u_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
|
|||
int ret, ep, len, pad;
|
||||
|
||||
mt7615_mcu_fill_msg(dev, skb, cmd, seq);
|
||||
if (cmd != MCU_CMD_FW_SCATTER)
|
||||
if (cmd != MCU_CMD(FW_SCATTER))
|
||||
ep = MT_EP_OUT_INBAND_CMD;
|
||||
else
|
||||
ep = MT_EP_OUT_AC_BE;
|
||||
|
|
|
@ -7,9 +7,6 @@ int mt76_connac_pm_wake(struct mt76_phy *phy, struct mt76_connac_pm *pm)
|
|||
{
|
||||
struct mt76_dev *dev = phy->dev;
|
||||
|
||||
if (!pm->enable)
|
||||
return 0;
|
||||
|
||||
if (mt76_is_usb(dev))
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option)
|
|||
.addr = cpu_to_le32(addr),
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD_FW_START_REQ, &req, sizeof(req),
|
||||
true);
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD(FW_START_REQ), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_start_firmware);
|
||||
|
||||
|
@ -27,8 +27,8 @@ int mt76_connac_mcu_patch_sem_ctrl(struct mt76_dev *dev, bool get)
|
|||
.op = cpu_to_le32(op),
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD_PATCH_SEM_CONTROL, &req,
|
||||
sizeof(req), true);
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD(PATCH_SEM_CONTROL),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_patch_sem_ctrl);
|
||||
|
||||
|
@ -41,8 +41,8 @@ int mt76_connac_mcu_start_patch(struct mt76_dev *dev)
|
|||
.check_crc = 0,
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD_PATCH_FINISH_REQ, &req,
|
||||
sizeof(req), true);
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD(PATCH_FINISH_REQ),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_start_patch);
|
||||
|
||||
|
@ -64,9 +64,9 @@ int mt76_connac_mcu_init_download(struct mt76_dev *dev, u32 addr, u32 len,
|
|||
|
||||
if (is_mt7921(dev) &&
|
||||
(req.addr == cpu_to_le32(MCU_PATCH_ADDRESS) || addr == 0x900000))
|
||||
cmd = MCU_CMD_PATCH_START_REQ;
|
||||
cmd = MCU_CMD(PATCH_START_REQ);
|
||||
else
|
||||
cmd = MCU_CMD_TARGET_ADDRESS_LEN_REQ;
|
||||
cmd = MCU_CMD(TARGET_ADDRESS_LEN_REQ);
|
||||
|
||||
return mt76_mcu_send_msg(dev, cmd, &req, sizeof(req), true);
|
||||
}
|
||||
|
@ -160,7 +160,8 @@ int mt76_connac_mcu_set_channel_domain(struct mt76_phy *phy)
|
|||
|
||||
memcpy(__skb_push(skb, sizeof(hdr)), &hdr, sizeof(hdr));
|
||||
|
||||
return mt76_mcu_skb_send_msg(dev, skb, MCU_CMD_SET_CHAN_DOMAIN, false);
|
||||
return mt76_mcu_skb_send_msg(dev, skb, MCU_CE_CMD(SET_CHAN_DOMAIN),
|
||||
false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_channel_domain);
|
||||
|
||||
|
@ -176,7 +177,7 @@ int mt76_connac_mcu_set_mac_enable(struct mt76_dev *dev, int band, bool enable,
|
|||
.band = band,
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_EXT_CMD_MAC_INIT_CTRL, &req_mac,
|
||||
return mt76_mcu_send_msg(dev, MCU_EXT_CMD(MAC_INIT_CTRL), &req_mac,
|
||||
sizeof(req_mac), true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_mac_enable);
|
||||
|
@ -198,8 +199,8 @@ int mt76_connac_mcu_set_vif_ps(struct mt76_dev *dev, struct ieee80211_vif *vif)
|
|||
if (vif->type != NL80211_IFTYPE_STATION)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD_SET_PS_PROFILE, &req,
|
||||
sizeof(req), false);
|
||||
return mt76_mcu_send_msg(dev, MCU_CE_CMD(SET_PS_PROFILE),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_vif_ps);
|
||||
|
||||
|
@ -218,7 +219,7 @@ int mt76_connac_mcu_set_rts_thresh(struct mt76_dev *dev, u32 val, u8 band)
|
|||
.pkt_thresh = cpu_to_le32(0x2),
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_EXT_CMD_PROTECT_CTRL, &req,
|
||||
return mt76_mcu_send_msg(dev, MCU_EXT_CMD(PROTECT_CTRL), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_rts_thresh);
|
||||
|
@ -257,11 +258,8 @@ mt76_connac_mcu_add_nested_tlv(struct sk_buff *skb, int tag, int len,
|
|||
ntlv = le16_to_cpu(ntlv_hdr->tlv_num);
|
||||
ntlv_hdr->tlv_num = cpu_to_le16(ntlv + 1);
|
||||
|
||||
if (sta_hdr) {
|
||||
u16 size = le16_to_cpu(sta_hdr->len);
|
||||
|
||||
sta_hdr->len = cpu_to_le16(size + len);
|
||||
}
|
||||
if (sta_hdr)
|
||||
le16_add_cpu(&sta_hdr->len, len);
|
||||
|
||||
return ptlv;
|
||||
}
|
||||
|
@ -1071,7 +1069,7 @@ int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
|
|||
|
||||
memcpy(dev_req.tlv.omac_addr, vif->addr, ETH_ALEN);
|
||||
|
||||
cmd = enable ? MCU_UNI_CMD_DEV_INFO_UPDATE : MCU_UNI_CMD_BSS_INFO_UPDATE;
|
||||
cmd = enable ? MCU_UNI_CMD(DEV_INFO_UPDATE) : MCU_UNI_CMD(BSS_INFO_UPDATE);
|
||||
data = enable ? (void *)&dev_req : (void *)&basic_req;
|
||||
len = enable ? sizeof(dev_req) : sizeof(basic_req);
|
||||
|
||||
|
@ -1079,7 +1077,7 @@ int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
cmd = enable ? MCU_UNI_CMD_BSS_INFO_UPDATE : MCU_UNI_CMD_DEV_INFO_UPDATE;
|
||||
cmd = enable ? MCU_UNI_CMD(BSS_INFO_UPDATE) : MCU_UNI_CMD(DEV_INFO_UPDATE);
|
||||
data = enable ? (void *)&basic_req : (void *)&dev_req;
|
||||
len = enable ? sizeof(basic_req) : sizeof(dev_req);
|
||||
|
||||
|
@ -1131,7 +1129,8 @@ int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
|
|||
mt76_connac_mcu_wtbl_ba_tlv(dev, skb, params, enable, tx, sta_wtbl,
|
||||
wtbl_hdr);
|
||||
|
||||
ret = mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD_STA_REC_UPDATE, true);
|
||||
ret = mt76_mcu_skb_send_msg(dev, skb,
|
||||
MCU_UNI_CMD(STA_REC_UPDATE), true);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -1141,8 +1140,8 @@ int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
|
|||
|
||||
mt76_connac_mcu_sta_ba_tlv(skb, params, enable, tx);
|
||||
|
||||
return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD_STA_REC_UPDATE,
|
||||
true);
|
||||
return mt76_mcu_skb_send_msg(dev, skb,
|
||||
MCU_UNI_CMD(STA_REC_UPDATE), true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_sta_ba);
|
||||
|
||||
|
@ -1179,7 +1178,7 @@ mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
|||
if (ht_cap->ht_supported)
|
||||
mode |= PHY_MODE_GN;
|
||||
|
||||
if (he_cap->has_he)
|
||||
if (he_cap && he_cap->has_he)
|
||||
mode |= PHY_MODE_AX_24G;
|
||||
} else if (band == NL80211_BAND_5GHZ || band == NL80211_BAND_6GHZ) {
|
||||
mode |= PHY_MODE_A;
|
||||
|
@ -1190,13 +1189,9 @@ mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
|||
if (vht_cap->vht_supported)
|
||||
mode |= PHY_MODE_AC;
|
||||
|
||||
if (he_cap->has_he) {
|
||||
if (band == NL80211_BAND_6GHZ)
|
||||
mode |= PHY_MODE_AX_6G;
|
||||
else
|
||||
if (he_cap && he_cap->has_he && band == NL80211_BAND_5GHZ)
|
||||
mode |= PHY_MODE_AX_5G;
|
||||
}
|
||||
}
|
||||
|
||||
return mode;
|
||||
}
|
||||
|
@ -1318,7 +1313,7 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
|
|||
idx = mvif->omac_idx > EXT_BSSID_START ? HW_BSSID_0 : mvif->omac_idx;
|
||||
basic_req.basic.hw_bss_idx = idx;
|
||||
if (band == NL80211_BAND_6GHZ)
|
||||
basic_req.basic.phymode_ext = BIT(0);
|
||||
basic_req.basic.phymode_ext = PHY_MODE_AX_6G;
|
||||
|
||||
basic_phy = mt76_connac_get_phy_mode_v2(phy, vif, band, NULL);
|
||||
basic_req.basic.nonht_basic_phy = cpu_to_le16(basic_phy);
|
||||
|
@ -1352,7 +1347,7 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
|
|||
basic_req.basic.sta_idx = cpu_to_le16(wcid->idx);
|
||||
basic_req.basic.conn_state = !enable;
|
||||
|
||||
err = mt76_mcu_send_msg(mdev, MCU_UNI_CMD_BSS_INFO_UPDATE, &basic_req,
|
||||
err = mt76_mcu_send_msg(mdev, MCU_UNI_CMD(BSS_INFO_UPDATE), &basic_req,
|
||||
sizeof(basic_req), true);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
@ -1390,7 +1385,7 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
|
|||
|
||||
mt76_connac_mcu_uni_bss_he_tlv(phy, vif,
|
||||
(struct tlv *)&he_req.he);
|
||||
err = mt76_mcu_send_msg(mdev, MCU_UNI_CMD_BSS_INFO_UPDATE,
|
||||
err = mt76_mcu_send_msg(mdev, MCU_UNI_CMD(BSS_INFO_UPDATE),
|
||||
&he_req, sizeof(he_req), true);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
@ -1428,7 +1423,7 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
|
|||
else if (rlm_req.rlm.control_channel > rlm_req.rlm.center_chan)
|
||||
rlm_req.rlm.sco = 3; /* SCB */
|
||||
|
||||
return mt76_mcu_send_msg(mdev, MCU_UNI_CMD_BSS_INFO_UPDATE, &rlm_req,
|
||||
return mt76_mcu_send_msg(mdev, MCU_UNI_CMD(BSS_INFO_UPDATE), &rlm_req,
|
||||
sizeof(rlm_req), true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_uni_add_bss);
|
||||
|
@ -1522,7 +1517,8 @@ int mt76_connac_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
|||
req->scan_func |= SCAN_FUNC_RANDOM_MAC;
|
||||
}
|
||||
|
||||
err = mt76_mcu_skb_send_msg(mdev, skb, MCU_CMD_START_HW_SCAN, false);
|
||||
err = mt76_mcu_skb_send_msg(mdev, skb, MCU_CE_CMD(START_HW_SCAN),
|
||||
false);
|
||||
if (err < 0)
|
||||
clear_bit(MT76_HW_SCANNING, &phy->state);
|
||||
|
||||
|
@ -1550,8 +1546,8 @@ int mt76_connac_mcu_cancel_hw_scan(struct mt76_phy *phy,
|
|||
ieee80211_scan_completed(phy->hw, &info);
|
||||
}
|
||||
|
||||
return mt76_mcu_send_msg(phy->dev, MCU_CMD_CANCEL_HW_SCAN, &req,
|
||||
sizeof(req), false);
|
||||
return mt76_mcu_send_msg(phy->dev, MCU_CE_CMD(CANCEL_HW_SCAN),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_cancel_hw_scan);
|
||||
|
||||
|
@ -1637,7 +1633,8 @@ int mt76_connac_mcu_sched_scan_req(struct mt76_phy *phy,
|
|||
memcpy(skb_put(skb, sreq->ie_len), sreq->ie, sreq->ie_len);
|
||||
}
|
||||
|
||||
return mt76_mcu_skb_send_msg(mdev, skb, MCU_CMD_SCHED_SCAN_REQ, false);
|
||||
return mt76_mcu_skb_send_msg(mdev, skb, MCU_CE_CMD(SCHED_SCAN_REQ),
|
||||
false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_sched_scan_req);
|
||||
|
||||
|
@ -1657,8 +1654,8 @@ int mt76_connac_mcu_sched_scan_enable(struct mt76_phy *phy,
|
|||
else
|
||||
clear_bit(MT76_HW_SCHED_SCANNING, &phy->state);
|
||||
|
||||
return mt76_mcu_send_msg(phy->dev, MCU_CMD_SCHED_SCAN_ENABLE, &req,
|
||||
sizeof(req), false);
|
||||
return mt76_mcu_send_msg(phy->dev, MCU_CE_CMD(SCHED_SCAN_ENABLE),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_sched_scan_enable);
|
||||
|
||||
|
@ -1670,8 +1667,8 @@ int mt76_connac_mcu_chip_config(struct mt76_dev *dev)
|
|||
|
||||
memcpy(req.data, "assert", 7);
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD_CHIP_CONFIG, &req, sizeof(req),
|
||||
false);
|
||||
return mt76_mcu_send_msg(dev, MCU_CE_CMD(CHIP_CONFIG),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_chip_config);
|
||||
|
||||
|
@ -1683,8 +1680,8 @@ int mt76_connac_mcu_set_deep_sleep(struct mt76_dev *dev, bool enable)
|
|||
|
||||
snprintf(req.data, sizeof(req.data), "KeepFullPwr %d", !enable);
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD_CHIP_CONFIG, &req, sizeof(req),
|
||||
false);
|
||||
return mt76_mcu_send_msg(dev, MCU_CE_CMD(CHIP_CONFIG),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_deep_sleep);
|
||||
|
||||
|
@ -1786,8 +1783,8 @@ int mt76_connac_mcu_get_nic_capability(struct mt76_phy *phy)
|
|||
struct sk_buff *skb;
|
||||
int ret, i;
|
||||
|
||||
ret = mt76_mcu_send_and_get_msg(phy->dev, MCU_CMD_GET_NIC_CAPAB, NULL,
|
||||
0, true, &skb);
|
||||
ret = mt76_mcu_send_and_get_msg(phy->dev, MCU_CE_CMD(GET_NIC_CAPAB),
|
||||
NULL, 0, true, &skb);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -1885,30 +1882,6 @@ mt76_connac_mcu_build_sku(struct mt76_dev *dev, s8 *sku,
|
|||
}
|
||||
}
|
||||
|
||||
static s8 mt76_connac_get_sar_power(struct mt76_phy *phy,
|
||||
struct ieee80211_channel *chan,
|
||||
s8 target_power)
|
||||
{
|
||||
const struct cfg80211_sar_capa *capa = phy->hw->wiphy->sar_capa;
|
||||
struct mt76_freq_range_power *frp = phy->frp;
|
||||
int freq, i;
|
||||
|
||||
if (!capa || !frp)
|
||||
return target_power;
|
||||
|
||||
freq = ieee80211_channel_to_frequency(chan->hw_value, chan->band);
|
||||
for (i = 0 ; i < capa->num_freq_ranges; i++) {
|
||||
if (frp[i].range &&
|
||||
freq >= frp[i].range->start_freq &&
|
||||
freq < frp[i].range->end_freq) {
|
||||
target_power = min_t(s8, frp[i].power, target_power);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return target_power;
|
||||
}
|
||||
|
||||
static s8 mt76_connac_get_ch_power(struct mt76_phy *phy,
|
||||
struct ieee80211_channel *chan,
|
||||
s8 target_power)
|
||||
|
@ -2008,12 +1981,12 @@ mt76_connac_mcu_rate_txpower_band(struct mt76_phy *phy,
|
|||
}
|
||||
batch_size = DIV_ROUND_UP(n_chan, batch_len);
|
||||
|
||||
if (!phy->cap.has_5ghz)
|
||||
last_ch = chan_list_2ghz[n_chan - 1];
|
||||
else if (phy->cap.has_6ghz)
|
||||
last_ch = chan_list_6ghz[n_chan - 1];
|
||||
if (phy->cap.has_6ghz)
|
||||
last_ch = chan_list_6ghz[ARRAY_SIZE(chan_list_6ghz) - 1];
|
||||
else if (phy->cap.has_5ghz)
|
||||
last_ch = chan_list_5ghz[ARRAY_SIZE(chan_list_5ghz) - 1];
|
||||
else
|
||||
last_ch = chan_list_5ghz[n_chan - 1];
|
||||
last_ch = chan_list_2ghz[ARRAY_SIZE(chan_list_2ghz) - 1];
|
||||
|
||||
for (i = 0; i < batch_size; i++) {
|
||||
struct mt76_connac_tx_power_limit_tlv tx_power_tlv = {};
|
||||
|
@ -2053,8 +2026,7 @@ mt76_connac_mcu_rate_txpower_band(struct mt76_phy *phy,
|
|||
|
||||
reg_power = mt76_connac_get_ch_power(phy, &chan,
|
||||
tx_power);
|
||||
sar_power = mt76_connac_get_sar_power(phy, &chan,
|
||||
reg_power);
|
||||
sar_power = mt76_get_sar_power(phy, &chan, reg_power);
|
||||
|
||||
mt76_get_rate_power_limits(phy, &chan, &limits,
|
||||
sar_power);
|
||||
|
@ -2070,7 +2042,8 @@ mt76_connac_mcu_rate_txpower_band(struct mt76_phy *phy,
|
|||
memcpy(skb->data, &tx_power_tlv, sizeof(tx_power_tlv));
|
||||
|
||||
err = mt76_mcu_skb_send_msg(dev, skb,
|
||||
MCU_CMD_SET_RATE_TX_POWER, false);
|
||||
MCU_CE_CMD(SET_RATE_TX_POWER),
|
||||
false);
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
|
@ -2143,7 +2116,7 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
|
|||
memcpy(addr, &info->arp_addr_list[i], sizeof(__be32));
|
||||
}
|
||||
|
||||
return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD_OFFLOAD, true);
|
||||
return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD(OFFLOAD), true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_update_arp_filter);
|
||||
|
||||
|
@ -2162,8 +2135,8 @@ int mt76_connac_mcu_set_p2p_oppps(struct ieee80211_hw *hw,
|
|||
.bss_idx = mvif->idx,
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(phy->dev, MCU_CMD_SET_P2P_OPPPS, &req,
|
||||
sizeof(req), false);
|
||||
return mt76_mcu_send_msg(phy->dev, MCU_CE_CMD(SET_P2P_OPPPS),
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_p2p_oppps);
|
||||
|
||||
|
@ -2249,7 +2222,8 @@ int mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,
|
|||
memcpy(gtk_tlv->kck, key->kck, NL80211_KCK_LEN);
|
||||
memcpy(gtk_tlv->replay_ctr, key->replay_ctr, NL80211_REPLAY_CTR_LEN);
|
||||
|
||||
return mt76_mcu_skb_send_msg(phy->dev, skb, MCU_UNI_CMD_OFFLOAD, true);
|
||||
return mt76_mcu_skb_send_msg(phy->dev, skb,
|
||||
MCU_UNI_CMD(OFFLOAD), true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_update_gtk_rekey);
|
||||
|
||||
|
@ -2275,8 +2249,8 @@ mt76_connac_mcu_set_arp_filter(struct mt76_dev *dev, struct ieee80211_vif *vif,
|
|||
},
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_UNI_CMD_OFFLOAD, &req, sizeof(req),
|
||||
true);
|
||||
return mt76_mcu_send_msg(dev, MCU_UNI_CMD(OFFLOAD), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2301,8 +2275,8 @@ mt76_connac_mcu_set_gtk_rekey(struct mt76_dev *dev, struct ieee80211_vif *vif,
|
|||
},
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_UNI_CMD_OFFLOAD, &req, sizeof(req),
|
||||
true);
|
||||
return mt76_mcu_send_msg(dev, MCU_UNI_CMD(OFFLOAD), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2331,8 +2305,8 @@ mt76_connac_mcu_set_suspend_mode(struct mt76_dev *dev,
|
|||
},
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_UNI_CMD_SUSPEND, &req, sizeof(req),
|
||||
true);
|
||||
return mt76_mcu_send_msg(dev, MCU_UNI_CMD(SUSPEND), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2366,7 +2340,7 @@ mt76_connac_mcu_set_wow_pattern(struct mt76_dev *dev,
|
|||
memcpy(ptlv->pattern, pattern->pattern, pattern->pattern_len);
|
||||
memcpy(ptlv->mask, pattern->mask, DIV_ROUND_UP(pattern->pattern_len, 8));
|
||||
|
||||
return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD_SUSPEND, true);
|
||||
return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD(SUSPEND), true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2418,8 +2392,8 @@ mt76_connac_mcu_set_wow_ctrl(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
|||
else if (mt76_is_sdio(dev))
|
||||
req.wow_ctrl_tlv.wakeup_hif = WOW_GPIO;
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_UNI_CMD_SUSPEND, &req, sizeof(req),
|
||||
true);
|
||||
return mt76_mcu_send_msg(dev, MCU_UNI_CMD(SUSPEND), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
|
||||
int mt76_connac_mcu_set_hif_suspend(struct mt76_dev *dev, bool suspend)
|
||||
|
@ -2452,8 +2426,8 @@ int mt76_connac_mcu_set_hif_suspend(struct mt76_dev *dev, bool suspend)
|
|||
else if (mt76_is_sdio(dev))
|
||||
req.hdr.hif_type = 0;
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_UNI_CMD_HIF_CTRL, &req, sizeof(req),
|
||||
true);
|
||||
return mt76_mcu_send_msg(dev, MCU_UNI_CMD(HIF_CTRL), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_hif_suspend);
|
||||
|
||||
|
@ -2461,7 +2435,7 @@ void mt76_connac_mcu_set_suspend_iter(void *priv, u8 *mac,
|
|||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct mt76_phy *phy = priv;
|
||||
bool suspend = test_bit(MT76_STATE_SUSPEND, &phy->state);
|
||||
bool suspend = !test_bit(MT76_STATE_RUNNING, &phy->state);
|
||||
struct ieee80211_hw *hw = phy->hw;
|
||||
struct cfg80211_wowlan *wowlan = hw->wiphy->wowlan_config;
|
||||
int i;
|
||||
|
@ -2488,8 +2462,8 @@ u32 mt76_connac_mcu_reg_rr(struct mt76_dev *dev, u32 offset)
|
|||
.addr = cpu_to_le32(offset),
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_CMD_REG_READ, &req, sizeof(req),
|
||||
true);
|
||||
return mt76_mcu_send_msg(dev, MCU_CE_QUERY(REG_READ), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_reg_rr);
|
||||
|
||||
|
@ -2503,7 +2477,8 @@ void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val)
|
|||
.val = cpu_to_le32(val),
|
||||
};
|
||||
|
||||
mt76_mcu_send_msg(dev, MCU_CMD_REG_WRITE, &req, sizeof(req), false);
|
||||
mt76_mcu_send_msg(dev, MCU_CE_CMD(REG_WRITE), &req,
|
||||
sizeof(req), false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_reg_wr);
|
||||
|
||||
|
|
|
@ -11,6 +11,76 @@ struct tlv {
|
|||
__le16 len;
|
||||
} __packed;
|
||||
|
||||
struct bss_info_omac {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
u8 hw_bss_idx;
|
||||
u8 omac_idx;
|
||||
u8 band_idx;
|
||||
u8 rsv0;
|
||||
__le32 conn_type;
|
||||
u32 rsv1;
|
||||
} __packed;
|
||||
|
||||
struct bss_info_basic {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
__le32 network_type;
|
||||
u8 active;
|
||||
u8 rsv0;
|
||||
__le16 bcn_interval;
|
||||
u8 bssid[ETH_ALEN];
|
||||
u8 wmm_idx;
|
||||
u8 dtim_period;
|
||||
u8 bmc_wcid_lo;
|
||||
u8 cipher;
|
||||
u8 phy_mode;
|
||||
u8 max_bssid; /* max BSSID. range: 1 ~ 8, 0: MBSSID disabled */
|
||||
u8 non_tx_bssid;/* non-transmitted BSSID, 0: transmitted BSSID */
|
||||
u8 bmc_wcid_hi; /* high Byte and version */
|
||||
u8 rsv[2];
|
||||
} __packed;
|
||||
|
||||
struct bss_info_rf_ch {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
u8 pri_ch;
|
||||
u8 center_ch0;
|
||||
u8 center_ch1;
|
||||
u8 bw;
|
||||
u8 he_ru26_block; /* 1: don't send HETB in RU26, 0: allow */
|
||||
u8 he_all_disable; /* 1: disallow all HETB, 0: allow */
|
||||
u8 rsv[2];
|
||||
} __packed;
|
||||
|
||||
struct bss_info_ext_bss {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
__le32 mbss_tsf_offset; /* in unit of us */
|
||||
u8 rsv[8];
|
||||
} __packed;
|
||||
|
||||
enum {
|
||||
BSS_INFO_OMAC,
|
||||
BSS_INFO_BASIC,
|
||||
BSS_INFO_RF_CH, /* optional, for BT/LTE coex */
|
||||
BSS_INFO_PM, /* sta only */
|
||||
BSS_INFO_UAPSD, /* sta only */
|
||||
BSS_INFO_ROAM_DETECT, /* obsoleted */
|
||||
BSS_INFO_LQ_RM, /* obsoleted */
|
||||
BSS_INFO_EXT_BSS,
|
||||
BSS_INFO_BMC_RATE, /* for bmc rate control in CR4 */
|
||||
BSS_INFO_SYNC_MODE, /* obsoleted */
|
||||
BSS_INFO_RA,
|
||||
BSS_INFO_HW_AMSDU,
|
||||
BSS_INFO_BSS_COLOR,
|
||||
BSS_INFO_HE_BASIC,
|
||||
BSS_INFO_PROTECT_INFO,
|
||||
BSS_INFO_OFFLOAD,
|
||||
BSS_INFO_11V_MBSSID,
|
||||
BSS_INFO_MAX_NUM
|
||||
};
|
||||
|
||||
/* sta_rec */
|
||||
|
||||
struct sta_ntlv_hdr {
|
||||
|
@ -54,7 +124,7 @@ struct sta_rec_vht {
|
|||
__le32 vht_cap;
|
||||
__le16 vht_rx_mcs_map;
|
||||
__le16 vht_tx_mcs_map;
|
||||
/* mt7921 */
|
||||
/* mt7915 - mt7921 */
|
||||
u8 rts_bw_sig;
|
||||
u8 rsv[3];
|
||||
} __packed;
|
||||
|
@ -152,6 +222,191 @@ struct sta_rec_he_6g_capa {
|
|||
u8 rsv[2];
|
||||
} __packed;
|
||||
|
||||
struct sec_key {
|
||||
u8 cipher_id;
|
||||
u8 cipher_len;
|
||||
u8 key_id;
|
||||
u8 key_len;
|
||||
u8 key[32];
|
||||
} __packed;
|
||||
|
||||
struct sta_rec_sec {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
u8 add;
|
||||
u8 n_cipher;
|
||||
u8 rsv[2];
|
||||
|
||||
struct sec_key key[2];
|
||||
} __packed;
|
||||
|
||||
struct sta_rec_bf {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
|
||||
__le16 pfmu; /* 0xffff: no access right for PFMU */
|
||||
bool su_mu; /* 0: SU, 1: MU */
|
||||
u8 bf_cap; /* 0: iBF, 1: eBF */
|
||||
u8 sounding_phy; /* 0: legacy, 1: OFDM, 2: HT, 4: VHT */
|
||||
u8 ndpa_rate;
|
||||
u8 ndp_rate;
|
||||
u8 rept_poll_rate;
|
||||
u8 tx_mode; /* 0: legacy, 1: OFDM, 2: HT, 4: VHT ... */
|
||||
u8 ncol;
|
||||
u8 nrow;
|
||||
u8 bw; /* 0: 20M, 1: 40M, 2: 80M, 3: 160M */
|
||||
|
||||
u8 mem_total;
|
||||
u8 mem_20m;
|
||||
struct {
|
||||
u8 row;
|
||||
u8 col: 6, row_msb: 2;
|
||||
} mem[4];
|
||||
|
||||
__le16 smart_ant;
|
||||
u8 se_idx;
|
||||
u8 auto_sounding; /* b7: low traffic indicator
|
||||
* b6: Stop sounding for this entry
|
||||
* b5 ~ b0: postpone sounding
|
||||
*/
|
||||
u8 ibf_timeout;
|
||||
u8 ibf_dbw;
|
||||
u8 ibf_ncol;
|
||||
u8 ibf_nrow;
|
||||
u8 nrow_bw160;
|
||||
u8 ncol_bw160;
|
||||
u8 ru_start_idx;
|
||||
u8 ru_end_idx;
|
||||
|
||||
bool trigger_su;
|
||||
bool trigger_mu;
|
||||
bool ng16_su;
|
||||
bool ng16_mu;
|
||||
bool codebook42_su;
|
||||
bool codebook75_mu;
|
||||
|
||||
u8 he_ltf;
|
||||
u8 rsv[3];
|
||||
} __packed;
|
||||
|
||||
struct sta_rec_bfee {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
bool fb_identity_matrix; /* 1: feedback identity matrix */
|
||||
bool ignore_feedback; /* 1: ignore */
|
||||
u8 rsv[2];
|
||||
} __packed;
|
||||
|
||||
struct sta_rec_muru {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
|
||||
struct {
|
||||
bool ofdma_dl_en;
|
||||
bool ofdma_ul_en;
|
||||
bool mimo_dl_en;
|
||||
bool mimo_ul_en;
|
||||
u8 rsv[4];
|
||||
} cfg;
|
||||
|
||||
struct {
|
||||
u8 punc_pream_rx;
|
||||
bool he_20m_in_40m_2g;
|
||||
bool he_20m_in_160m;
|
||||
bool he_80m_in_160m;
|
||||
bool lt16_sigb;
|
||||
bool rx_su_comp_sigb;
|
||||
bool rx_su_non_comp_sigb;
|
||||
u8 rsv;
|
||||
} ofdma_dl;
|
||||
|
||||
struct {
|
||||
u8 t_frame_dur;
|
||||
u8 mu_cascading;
|
||||
u8 uo_ra;
|
||||
u8 he_2x996_tone;
|
||||
u8 rx_t_frame_11ac;
|
||||
u8 rsv[3];
|
||||
} ofdma_ul;
|
||||
|
||||
struct {
|
||||
bool vht_mu_bfee;
|
||||
bool partial_bw_dl_mimo;
|
||||
u8 rsv[2];
|
||||
} mimo_dl;
|
||||
|
||||
struct {
|
||||
bool full_ul_mimo;
|
||||
bool partial_ul_mimo;
|
||||
u8 rsv[2];
|
||||
} mimo_ul;
|
||||
} __packed;
|
||||
|
||||
struct sta_phy {
|
||||
u8 type;
|
||||
u8 flag;
|
||||
u8 stbc;
|
||||
u8 sgi;
|
||||
u8 bw;
|
||||
u8 ldpc;
|
||||
u8 mcs;
|
||||
u8 nss;
|
||||
u8 he_ltf;
|
||||
};
|
||||
|
||||
struct sta_rec_ra {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
|
||||
u8 valid;
|
||||
u8 auto_rate;
|
||||
u8 phy_mode;
|
||||
u8 channel;
|
||||
u8 bw;
|
||||
u8 disable_cck;
|
||||
u8 ht_mcs32;
|
||||
u8 ht_gf;
|
||||
u8 ht_mcs[4];
|
||||
u8 mmps_mode;
|
||||
u8 gband_256;
|
||||
u8 af;
|
||||
u8 auth_wapi_mode;
|
||||
u8 rate_len;
|
||||
|
||||
u8 supp_mode;
|
||||
u8 supp_cck_rate;
|
||||
u8 supp_ofdm_rate;
|
||||
__le32 supp_ht_mcs;
|
||||
__le16 supp_vht_mcs[4];
|
||||
|
||||
u8 op_mode;
|
||||
u8 op_vht_chan_width;
|
||||
u8 op_vht_rx_nss;
|
||||
u8 op_vht_rx_nss_type;
|
||||
|
||||
__le32 sta_cap;
|
||||
|
||||
struct sta_phy phy;
|
||||
} __packed;
|
||||
|
||||
struct sta_rec_ra_fixed {
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
|
||||
__le32 field;
|
||||
u8 op_mode;
|
||||
u8 op_vht_chan_width;
|
||||
u8 op_vht_rx_nss;
|
||||
u8 op_vht_rx_nss_type;
|
||||
|
||||
struct sta_phy phy;
|
||||
|
||||
u8 spe_en;
|
||||
u8 short_preamble;
|
||||
u8 is_5g;
|
||||
u8 mmps_mode;
|
||||
} __packed;
|
||||
|
||||
/* wtbl_rec */
|
||||
|
||||
struct wtbl_req_hdr {
|
||||
|
@ -234,6 +489,7 @@ struct wtbl_ba {
|
|||
__le16 sn;
|
||||
u8 ba_en;
|
||||
u8 ba_winsize_idx;
|
||||
/* originator & recipient */
|
||||
__le16 ba_winsize;
|
||||
/* recipient only */
|
||||
u8 peer_addr[ETH_ALEN];
|
||||
|
@ -304,12 +560,17 @@ struct wtbl_raw {
|
|||
|
||||
#define MT76_CONNAC_STA_UPDATE_MAX_SIZE (sizeof(struct sta_req_hdr) + \
|
||||
sizeof(struct sta_rec_basic) + \
|
||||
sizeof(struct sta_rec_bf) + \
|
||||
sizeof(struct sta_rec_ht) + \
|
||||
sizeof(struct sta_rec_he) + \
|
||||
sizeof(struct sta_rec_ba) + \
|
||||
sizeof(struct sta_rec_vht) + \
|
||||
sizeof(struct sta_rec_uapsd) + \
|
||||
sizeof(struct sta_rec_amsdu) + \
|
||||
sizeof(struct sta_rec_muru) + \
|
||||
sizeof(struct sta_rec_bfee) + \
|
||||
sizeof(struct sta_rec_ra) + \
|
||||
sizeof(struct sta_rec_ra_fixed) + \
|
||||
sizeof(struct sta_rec_he_6g_capa) + \
|
||||
sizeof(struct tlv) + \
|
||||
MT76_CONNAC_WTBL_UPDATE_MAX_SIZE)
|
||||
|
@ -423,7 +684,8 @@ enum {
|
|||
#define PHY_MODE_AC BIT(5)
|
||||
#define PHY_MODE_AX_24G BIT(6)
|
||||
#define PHY_MODE_AX_5G BIT(7)
|
||||
#define PHY_MODE_AX_6G BIT(8)
|
||||
|
||||
#define PHY_MODE_AX_6G BIT(0) /* phymode_ext */
|
||||
|
||||
#define MODE_CCK BIT(0)
|
||||
#define MODE_OFDM BIT(1)
|
||||
|
@ -431,6 +693,21 @@ enum {
|
|||
#define MODE_VHT BIT(3)
|
||||
#define MODE_HE BIT(4)
|
||||
|
||||
#define STA_CAP_WMM BIT(0)
|
||||
#define STA_CAP_SGI_20 BIT(4)
|
||||
#define STA_CAP_SGI_40 BIT(5)
|
||||
#define STA_CAP_TX_STBC BIT(6)
|
||||
#define STA_CAP_RX_STBC BIT(7)
|
||||
#define STA_CAP_VHT_SGI_80 BIT(16)
|
||||
#define STA_CAP_VHT_SGI_160 BIT(17)
|
||||
#define STA_CAP_VHT_TX_STBC BIT(18)
|
||||
#define STA_CAP_VHT_RX_STBC BIT(19)
|
||||
#define STA_CAP_VHT_LDPC BIT(23)
|
||||
#define STA_CAP_LDPC BIT(24)
|
||||
#define STA_CAP_HT BIT(26)
|
||||
#define STA_CAP_VHT BIT(27)
|
||||
#define STA_CAP_HE BIT(28)
|
||||
|
||||
enum {
|
||||
PHY_TYPE_HR_DSSS_INDEX = 0,
|
||||
PHY_TYPE_ERP_INDEX,
|
||||
|
@ -489,6 +766,121 @@ enum {
|
|||
DEV_INFO_MAX_NUM
|
||||
};
|
||||
|
||||
/* event table */
|
||||
enum {
|
||||
MCU_EVENT_TARGET_ADDRESS_LEN = 0x01,
|
||||
MCU_EVENT_FW_START = 0x01,
|
||||
MCU_EVENT_GENERIC = 0x01,
|
||||
MCU_EVENT_ACCESS_REG = 0x02,
|
||||
MCU_EVENT_MT_PATCH_SEM = 0x04,
|
||||
MCU_EVENT_REG_ACCESS = 0x05,
|
||||
MCU_EVENT_LP_INFO = 0x07,
|
||||
MCU_EVENT_SCAN_DONE = 0x0d,
|
||||
MCU_EVENT_TX_DONE = 0x0f,
|
||||
MCU_EVENT_ROC = 0x10,
|
||||
MCU_EVENT_BSS_ABSENCE = 0x11,
|
||||
MCU_EVENT_BSS_BEACON_LOSS = 0x13,
|
||||
MCU_EVENT_CH_PRIVILEGE = 0x18,
|
||||
MCU_EVENT_SCHED_SCAN_DONE = 0x23,
|
||||
MCU_EVENT_DBG_MSG = 0x27,
|
||||
MCU_EVENT_TXPWR = 0xd0,
|
||||
MCU_EVENT_EXT = 0xed,
|
||||
MCU_EVENT_RESTART_DL = 0xef,
|
||||
MCU_EVENT_COREDUMP = 0xf0,
|
||||
};
|
||||
|
||||
/* ext event table */
|
||||
enum {
|
||||
MCU_EXT_EVENT_PS_SYNC = 0x5,
|
||||
MCU_EXT_EVENT_FW_LOG_2_HOST = 0x13,
|
||||
MCU_EXT_EVENT_THERMAL_PROTECT = 0x22,
|
||||
MCU_EXT_EVENT_ASSERT_DUMP = 0x23,
|
||||
MCU_EXT_EVENT_RDD_REPORT = 0x3a,
|
||||
MCU_EXT_EVENT_CSA_NOTIFY = 0x4f,
|
||||
MCU_EXT_EVENT_BCC_NOTIFY = 0x75,
|
||||
MCU_EXT_EVENT_MURU_CTRL = 0x9f,
|
||||
};
|
||||
|
||||
enum {
|
||||
MCU_Q_QUERY,
|
||||
MCU_Q_SET,
|
||||
MCU_Q_RESERVED,
|
||||
MCU_Q_NA
|
||||
};
|
||||
|
||||
enum {
|
||||
MCU_S2D_H2N,
|
||||
MCU_S2D_C2N,
|
||||
MCU_S2D_H2C,
|
||||
MCU_S2D_H2CN
|
||||
};
|
||||
|
||||
enum {
|
||||
PATCH_NOT_DL_SEM_FAIL,
|
||||
PATCH_IS_DL,
|
||||
PATCH_NOT_DL_SEM_SUCCESS,
|
||||
PATCH_REL_SEM_SUCCESS
|
||||
};
|
||||
|
||||
enum {
|
||||
FW_STATE_INITIAL,
|
||||
FW_STATE_FW_DOWNLOAD,
|
||||
FW_STATE_NORMAL_OPERATION,
|
||||
FW_STATE_NORMAL_TRX,
|
||||
FW_STATE_RDY = 7
|
||||
};
|
||||
|
||||
enum {
|
||||
CH_SWITCH_NORMAL = 0,
|
||||
CH_SWITCH_SCAN = 3,
|
||||
CH_SWITCH_MCC = 4,
|
||||
CH_SWITCH_DFS = 5,
|
||||
CH_SWITCH_BACKGROUND_SCAN_START = 6,
|
||||
CH_SWITCH_BACKGROUND_SCAN_RUNNING = 7,
|
||||
CH_SWITCH_BACKGROUND_SCAN_STOP = 8,
|
||||
CH_SWITCH_SCAN_BYPASS_DPD = 9
|
||||
};
|
||||
|
||||
enum {
|
||||
THERMAL_SENSOR_TEMP_QUERY,
|
||||
THERMAL_SENSOR_MANUAL_CTRL,
|
||||
THERMAL_SENSOR_INFO_QUERY,
|
||||
THERMAL_SENSOR_TASK_CTRL,
|
||||
};
|
||||
|
||||
enum mcu_cipher_type {
|
||||
MCU_CIPHER_NONE = 0,
|
||||
MCU_CIPHER_WEP40,
|
||||
MCU_CIPHER_WEP104,
|
||||
MCU_CIPHER_WEP128,
|
||||
MCU_CIPHER_TKIP,
|
||||
MCU_CIPHER_AES_CCMP,
|
||||
MCU_CIPHER_CCMP_256,
|
||||
MCU_CIPHER_GCMP,
|
||||
MCU_CIPHER_GCMP_256,
|
||||
MCU_CIPHER_WAPI,
|
||||
MCU_CIPHER_BIP_CMAC_128,
|
||||
};
|
||||
|
||||
enum {
|
||||
EE_MODE_EFUSE,
|
||||
EE_MODE_BUFFER,
|
||||
};
|
||||
|
||||
enum {
|
||||
EE_FORMAT_BIN,
|
||||
EE_FORMAT_WHOLE,
|
||||
EE_FORMAT_MULTIPLE,
|
||||
};
|
||||
|
||||
enum {
|
||||
MCU_PHY_STATE_TX_RATE,
|
||||
MCU_PHY_STATE_RX_RATE,
|
||||
MCU_PHY_STATE_RSSI,
|
||||
MCU_PHY_STATE_CONTENTION_RX_RATE,
|
||||
MCU_PHY_STATE_OFDMLQ_CNINFO,
|
||||
};
|
||||
|
||||
#define MCU_CMD_ACK BIT(0)
|
||||
#define MCU_CMD_UNI BIT(1)
|
||||
#define MCU_CMD_QUERY BIT(2)
|
||||
|
@ -496,29 +888,51 @@ enum {
|
|||
#define MCU_CMD_UNI_EXT_ACK (MCU_CMD_ACK | MCU_CMD_UNI | \
|
||||
MCU_CMD_QUERY)
|
||||
|
||||
#define MCU_FW_PREFIX BIT(31)
|
||||
#define MCU_UNI_PREFIX BIT(30)
|
||||
#define MCU_CE_PREFIX BIT(29)
|
||||
#define MCU_QUERY_PREFIX BIT(28)
|
||||
#define MCU_CMD_MASK ~(MCU_FW_PREFIX | MCU_UNI_PREFIX | \
|
||||
MCU_CE_PREFIX | MCU_QUERY_PREFIX)
|
||||
#define __MCU_CMD_FIELD_ID GENMASK(7, 0)
|
||||
#define __MCU_CMD_FIELD_EXT_ID GENMASK(15, 8)
|
||||
#define __MCU_CMD_FIELD_QUERY BIT(16)
|
||||
#define __MCU_CMD_FIELD_UNI BIT(17)
|
||||
#define __MCU_CMD_FIELD_CE BIT(18)
|
||||
#define __MCU_CMD_FIELD_WA BIT(19)
|
||||
|
||||
#define MCU_QUERY_MASK BIT(16)
|
||||
#define MCU_CMD(_t) FIELD_PREP(__MCU_CMD_FIELD_ID, \
|
||||
MCU_CMD_##_t)
|
||||
#define MCU_EXT_CMD(_t) (MCU_CMD(EXT_CID) | \
|
||||
FIELD_PREP(__MCU_CMD_FIELD_EXT_ID, \
|
||||
MCU_EXT_CMD_##_t))
|
||||
#define MCU_EXT_QUERY(_t) (MCU_EXT_CMD(_t) | __MCU_CMD_FIELD_QUERY)
|
||||
#define MCU_UNI_CMD(_t) (__MCU_CMD_FIELD_UNI | \
|
||||
FIELD_PREP(__MCU_CMD_FIELD_ID, \
|
||||
MCU_UNI_CMD_##_t))
|
||||
#define MCU_CE_CMD(_t) (__MCU_CMD_FIELD_CE | \
|
||||
FIELD_PREP(__MCU_CMD_FIELD_ID, \
|
||||
MCU_CE_CMD_##_t))
|
||||
#define MCU_CE_QUERY(_t) (MCU_CE_CMD(_t) | __MCU_CMD_FIELD_QUERY)
|
||||
|
||||
#define MCU_WA_CMD(_t) (MCU_CMD(_t) | __MCU_CMD_FIELD_WA)
|
||||
#define MCU_WA_EXT_CMD(_t) (MCU_EXT_CMD(_t) | __MCU_CMD_FIELD_WA)
|
||||
#define MCU_WA_PARAM_CMD(_t) (MCU_WA_CMD(WA_PARAM) | \
|
||||
FIELD_PREP(__MCU_CMD_FIELD_EXT_ID, \
|
||||
MCU_WA_PARAM_CMD_##_t))
|
||||
|
||||
enum {
|
||||
MCU_EXT_CMD_EFUSE_ACCESS = 0x01,
|
||||
MCU_EXT_CMD_RF_REG_ACCESS = 0x02,
|
||||
MCU_EXT_CMD_RF_TEST = 0x04,
|
||||
MCU_EXT_CMD_PM_STATE_CTRL = 0x07,
|
||||
MCU_EXT_CMD_CHANNEL_SWITCH = 0x08,
|
||||
MCU_EXT_CMD_SET_TX_POWER_CTRL = 0x11,
|
||||
MCU_EXT_CMD_FW_LOG_2_HOST = 0x13,
|
||||
MCU_EXT_CMD_TXBF_ACTION = 0x1e,
|
||||
MCU_EXT_CMD_EFUSE_BUFFER_MODE = 0x21,
|
||||
MCU_EXT_CMD_THERMAL_PROT = 0x23,
|
||||
MCU_EXT_CMD_STA_REC_UPDATE = 0x25,
|
||||
MCU_EXT_CMD_BSS_INFO_UPDATE = 0x26,
|
||||
MCU_EXT_CMD_EDCA_UPDATE = 0x27,
|
||||
MCU_EXT_CMD_DEV_INFO_UPDATE = 0x2A,
|
||||
MCU_EXT_CMD_GET_TEMP = 0x2c,
|
||||
MCU_EXT_CMD_THERMAL_CTRL = 0x2c,
|
||||
MCU_EXT_CMD_WTBL_UPDATE = 0x32,
|
||||
MCU_EXT_CMD_SET_DRR_CTRL = 0x36,
|
||||
MCU_EXT_CMD_SET_RDD_CTRL = 0x3a,
|
||||
MCU_EXT_CMD_ATE_CTRL = 0x3d,
|
||||
MCU_EXT_CMD_PROTECT_CTRL = 0x3e,
|
||||
|
@ -527,59 +941,74 @@ enum {
|
|||
MCU_EXT_CMD_RX_HDR_TRANS = 0x47,
|
||||
MCU_EXT_CMD_MUAR_UPDATE = 0x48,
|
||||
MCU_EXT_CMD_BCN_OFFLOAD = 0x49,
|
||||
MCU_EXT_CMD_RX_AIRTIME_CTRL = 0x4a,
|
||||
MCU_EXT_CMD_SET_RX_PATH = 0x4e,
|
||||
MCU_EXT_CMD_EFUSE_FREE_BLOCK = 0x4f,
|
||||
MCU_EXT_CMD_TX_POWER_FEATURE_CTRL = 0x58,
|
||||
MCU_EXT_CMD_RXDCOC_CAL = 0x59,
|
||||
MCU_EXT_CMD_GET_MIB_INFO = 0x5a,
|
||||
MCU_EXT_CMD_TXDPD_CAL = 0x60,
|
||||
MCU_EXT_CMD_CAL_CACHE = 0x67,
|
||||
MCU_EXT_CMD_SET_RDD_TH = 0x7c,
|
||||
MCU_EXT_CMD_SET_RADAR_TH = 0x7c,
|
||||
MCU_EXT_CMD_SET_RDD_PATTERN = 0x7d,
|
||||
MCU_EXT_CMD_MWDS_SUPPORT = 0x80,
|
||||
MCU_EXT_CMD_SET_SER_TRIGGER = 0x81,
|
||||
MCU_EXT_CMD_SCS_CTRL = 0x82,
|
||||
MCU_EXT_CMD_TWT_AGRT_UPDATE = 0x94,
|
||||
MCU_EXT_CMD_FW_DBG_CTRL = 0x95,
|
||||
MCU_EXT_CMD_SET_RDD_TH = 0x9d,
|
||||
MCU_EXT_CMD_MURU_CTRL = 0x9f,
|
||||
MCU_EXT_CMD_SET_SPR = 0xa8,
|
||||
MCU_EXT_CMD_GROUP_PRE_CAL_INFO = 0xab,
|
||||
MCU_EXT_CMD_DPD_PRE_CAL_INFO = 0xac,
|
||||
MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
|
||||
};
|
||||
|
||||
enum {
|
||||
MCU_UNI_CMD_DEV_INFO_UPDATE = MCU_UNI_PREFIX | 0x01,
|
||||
MCU_UNI_CMD_BSS_INFO_UPDATE = MCU_UNI_PREFIX | 0x02,
|
||||
MCU_UNI_CMD_STA_REC_UPDATE = MCU_UNI_PREFIX | 0x03,
|
||||
MCU_UNI_CMD_SUSPEND = MCU_UNI_PREFIX | 0x05,
|
||||
MCU_UNI_CMD_OFFLOAD = MCU_UNI_PREFIX | 0x06,
|
||||
MCU_UNI_CMD_HIF_CTRL = MCU_UNI_PREFIX | 0x07,
|
||||
MCU_UNI_CMD_DEV_INFO_UPDATE = 0x01,
|
||||
MCU_UNI_CMD_BSS_INFO_UPDATE = 0x02,
|
||||
MCU_UNI_CMD_STA_REC_UPDATE = 0x03,
|
||||
MCU_UNI_CMD_SUSPEND = 0x05,
|
||||
MCU_UNI_CMD_OFFLOAD = 0x06,
|
||||
MCU_UNI_CMD_HIF_CTRL = 0x07,
|
||||
};
|
||||
|
||||
enum {
|
||||
MCU_CMD_TARGET_ADDRESS_LEN_REQ = MCU_FW_PREFIX | 0x01,
|
||||
MCU_CMD_FW_START_REQ = MCU_FW_PREFIX | 0x02,
|
||||
MCU_CMD_TARGET_ADDRESS_LEN_REQ = 0x01,
|
||||
MCU_CMD_FW_START_REQ = 0x02,
|
||||
MCU_CMD_INIT_ACCESS_REG = 0x3,
|
||||
MCU_CMD_NIC_POWER_CTRL = MCU_FW_PREFIX | 0x4,
|
||||
MCU_CMD_PATCH_START_REQ = MCU_FW_PREFIX | 0x05,
|
||||
MCU_CMD_PATCH_FINISH_REQ = MCU_FW_PREFIX | 0x07,
|
||||
MCU_CMD_PATCH_SEM_CONTROL = MCU_FW_PREFIX | 0x10,
|
||||
MCU_CMD_NIC_POWER_CTRL = 0x4,
|
||||
MCU_CMD_PATCH_START_REQ = 0x05,
|
||||
MCU_CMD_PATCH_FINISH_REQ = 0x07,
|
||||
MCU_CMD_PATCH_SEM_CONTROL = 0x10,
|
||||
MCU_CMD_WA_PARAM = 0xc4,
|
||||
MCU_CMD_EXT_CID = 0xed,
|
||||
MCU_CMD_FW_SCATTER = MCU_FW_PREFIX | 0xee,
|
||||
MCU_CMD_RESTART_DL_REQ = MCU_FW_PREFIX | 0xef,
|
||||
MCU_CMD_FW_SCATTER = 0xee,
|
||||
MCU_CMD_RESTART_DL_REQ = 0xef,
|
||||
};
|
||||
|
||||
/* offload mcu commands */
|
||||
enum {
|
||||
MCU_CMD_TEST_CTRL = MCU_CE_PREFIX | 0x01,
|
||||
MCU_CMD_START_HW_SCAN = MCU_CE_PREFIX | 0x03,
|
||||
MCU_CMD_SET_PS_PROFILE = MCU_CE_PREFIX | 0x05,
|
||||
MCU_CMD_SET_CHAN_DOMAIN = MCU_CE_PREFIX | 0x0f,
|
||||
MCU_CMD_SET_BSS_CONNECTED = MCU_CE_PREFIX | 0x16,
|
||||
MCU_CMD_SET_BSS_ABORT = MCU_CE_PREFIX | 0x17,
|
||||
MCU_CMD_CANCEL_HW_SCAN = MCU_CE_PREFIX | 0x1b,
|
||||
MCU_CMD_SET_ROC = MCU_CE_PREFIX | 0x1d,
|
||||
MCU_CMD_SET_P2P_OPPPS = MCU_CE_PREFIX | 0x33,
|
||||
MCU_CMD_SET_RATE_TX_POWER = MCU_CE_PREFIX | 0x5d,
|
||||
MCU_CMD_SCHED_SCAN_ENABLE = MCU_CE_PREFIX | 0x61,
|
||||
MCU_CMD_SCHED_SCAN_REQ = MCU_CE_PREFIX | 0x62,
|
||||
MCU_CMD_GET_NIC_CAPAB = MCU_CE_PREFIX | 0x8a,
|
||||
MCU_CMD_SET_MU_EDCA_PARMS = MCU_CE_PREFIX | 0xb0,
|
||||
MCU_CMD_REG_WRITE = MCU_CE_PREFIX | 0xc0,
|
||||
MCU_CMD_REG_READ = MCU_CE_PREFIX | MCU_QUERY_MASK | 0xc0,
|
||||
MCU_CMD_CHIP_CONFIG = MCU_CE_PREFIX | 0xca,
|
||||
MCU_CMD_FWLOG_2_HOST = MCU_CE_PREFIX | 0xc5,
|
||||
MCU_CMD_GET_WTBL = MCU_CE_PREFIX | 0xcd,
|
||||
MCU_CMD_GET_TXPWR = MCU_CE_PREFIX | 0xd0,
|
||||
MCU_CE_CMD_TEST_CTRL = 0x01,
|
||||
MCU_CE_CMD_START_HW_SCAN = 0x03,
|
||||
MCU_CE_CMD_SET_PS_PROFILE = 0x05,
|
||||
MCU_CE_CMD_SET_CHAN_DOMAIN = 0x0f,
|
||||
MCU_CE_CMD_SET_BSS_CONNECTED = 0x16,
|
||||
MCU_CE_CMD_SET_BSS_ABORT = 0x17,
|
||||
MCU_CE_CMD_CANCEL_HW_SCAN = 0x1b,
|
||||
MCU_CE_CMD_SET_ROC = 0x1d,
|
||||
MCU_CE_CMD_SET_P2P_OPPPS = 0x33,
|
||||
MCU_CE_CMD_SET_RATE_TX_POWER = 0x5d,
|
||||
MCU_CE_CMD_SCHED_SCAN_ENABLE = 0x61,
|
||||
MCU_CE_CMD_SCHED_SCAN_REQ = 0x62,
|
||||
MCU_CE_CMD_GET_NIC_CAPAB = 0x8a,
|
||||
MCU_CE_CMD_SET_MU_EDCA_PARMS = 0xb0,
|
||||
MCU_CE_CMD_REG_WRITE = 0xc0,
|
||||
MCU_CE_CMD_REG_READ = 0xc0,
|
||||
MCU_CE_CMD_CHIP_CONFIG = 0xca,
|
||||
MCU_CE_CMD_FWLOG_2_HOST = 0xc5,
|
||||
MCU_CE_CMD_GET_WTBL = 0xcd,
|
||||
MCU_CE_CMD_GET_TXPWR = 0xd0,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
|
@ -237,7 +237,10 @@ int mt76x0_register_device(struct mt76x02_dev *dev)
|
|||
{
|
||||
int ret;
|
||||
|
||||
mt76x02_init_device(dev);
|
||||
ret = mt76x02_init_device(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
mt76x02_config_mac_addr_list(dev);
|
||||
|
||||
ret = mt76_register_device(&dev->mt76, true, mt76x02_rates,
|
||||
|
|
|
@ -31,6 +31,32 @@ mt76x0_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef)
|
|||
mt76_txq_schedule_all(&dev->mphy);
|
||||
}
|
||||
|
||||
int mt76x0_set_sar_specs(struct ieee80211_hw *hw,
|
||||
const struct cfg80211_sar_specs *sar)
|
||||
{
|
||||
int err = -EINVAL, power = hw->conf.power_level * 2;
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
struct mt76_phy *mphy = &dev->mphy;
|
||||
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
if (!cfg80211_chandef_valid(&mphy->chandef))
|
||||
goto out;
|
||||
|
||||
err = mt76_init_sar_power(hw, sar);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
dev->txpower_conf = mt76_get_sar_power(mphy, mphy->chandef.chan,
|
||||
power);
|
||||
if (test_bit(MT76_STATE_RUNNING, &mphy->state))
|
||||
mt76x0_phy_set_txpower(dev);
|
||||
out:
|
||||
mutex_unlock(&dev->mt76.mutex);
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x0_set_sar_specs);
|
||||
|
||||
int mt76x0_config(struct ieee80211_hw *hw, u32 changed)
|
||||
{
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
|
@ -44,9 +70,13 @@ int mt76x0_config(struct ieee80211_hw *hw, u32 changed)
|
|||
}
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_POWER) {
|
||||
dev->txpower_conf = hw->conf.power_level * 2;
|
||||
struct mt76_phy *mphy = &dev->mphy;
|
||||
|
||||
if (test_bit(MT76_STATE_RUNNING, &dev->mphy.state))
|
||||
dev->txpower_conf = hw->conf.power_level * 2;
|
||||
dev->txpower_conf = mt76_get_sar_power(mphy,
|
||||
mphy->chandef.chan,
|
||||
dev->txpower_conf);
|
||||
if (test_bit(MT76_STATE_RUNNING, &mphy->state))
|
||||
mt76x0_phy_set_txpower(dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@ void mt76x0_chip_onoff(struct mt76x02_dev *dev, bool enable, bool reset);
|
|||
void mt76x0_mac_stop(struct mt76x02_dev *dev);
|
||||
|
||||
int mt76x0_config(struct ieee80211_hw *hw, u32 changed);
|
||||
int mt76x0_set_sar_specs(struct ieee80211_hw *hw,
|
||||
const struct cfg80211_sar_specs *sar);
|
||||
|
||||
/* PHY */
|
||||
void mt76x0_phy_init(struct mt76x02_dev *dev);
|
||||
|
|
|
@ -85,6 +85,7 @@ static const struct ieee80211_ops mt76x0e_ops = {
|
|||
.set_rts_threshold = mt76x02_set_rts_threshold,
|
||||
.get_antenna = mt76_get_antenna,
|
||||
.reconfig_complete = mt76x02_reconfig_complete,
|
||||
.set_sar_specs = mt76x0_set_sar_specs,
|
||||
};
|
||||
|
||||
static int mt76x0e_init_hardware(struct mt76x02_dev *dev, bool resume)
|
||||
|
|
|
@ -141,6 +141,7 @@ static const struct ieee80211_ops mt76x0u_ops = {
|
|||
.set_tim = mt76_set_tim,
|
||||
.release_buffered_frames = mt76_release_buffered_frames,
|
||||
.get_antenna = mt76_get_antenna,
|
||||
.set_sar_specs = mt76x0_set_sar_specs,
|
||||
};
|
||||
|
||||
static int mt76x0u_init_hardware(struct mt76x02_dev *dev, bool reset)
|
||||
|
|
|
@ -133,7 +133,7 @@ struct mt76x02_dev {
|
|||
|
||||
extern struct ieee80211_rate mt76x02_rates[12];
|
||||
|
||||
void mt76x02_init_device(struct mt76x02_dev *dev);
|
||||
int mt76x02_init_device(struct mt76x02_dev *dev);
|
||||
void mt76x02_configure_filter(struct ieee80211_hw *hw,
|
||||
unsigned int changed_flags,
|
||||
unsigned int *total_flags, u64 multicast);
|
||||
|
|
|
@ -138,7 +138,7 @@ mt76x02_led_set_brightness(struct led_classdev *led_cdev,
|
|||
mt76x02_led_set_config(mdev, 0xff, 0);
|
||||
}
|
||||
|
||||
void mt76x02_init_device(struct mt76x02_dev *dev)
|
||||
int mt76x02_init_device(struct mt76x02_dev *dev)
|
||||
{
|
||||
struct ieee80211_hw *hw = mt76_hw(dev);
|
||||
struct wiphy *wiphy = hw->wiphy;
|
||||
|
@ -197,6 +197,8 @@ void mt76x02_init_device(struct mt76x02_dev *dev)
|
|||
dev->mphy.chainmask = 0x101;
|
||||
dev->mphy.antenna_mask = 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02_init_device);
|
||||
|
||||
|
|
|
@ -8,6 +8,35 @@
|
|||
#include "eeprom.h"
|
||||
#include "../mt76x02_phy.h"
|
||||
|
||||
int mt76x2_set_sar_specs(struct ieee80211_hw *hw,
|
||||
const struct cfg80211_sar_specs *sar)
|
||||
{
|
||||
int err = -EINVAL, power = hw->conf.power_level * 2;
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
struct mt76_phy *mphy = &dev->mphy;
|
||||
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
if (!cfg80211_chandef_valid(&mphy->chandef))
|
||||
goto out;
|
||||
|
||||
err = mt76_init_sar_power(hw, sar);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
dev->txpower_conf = mt76_get_sar_power(mphy, mphy->chandef.chan,
|
||||
power);
|
||||
/* convert to per-chain power for 2x2 devices */
|
||||
dev->txpower_conf -= 6;
|
||||
|
||||
if (test_bit(MT76_STATE_RUNNING, &mphy->state))
|
||||
mt76x2_phy_set_txpower(dev);
|
||||
out:
|
||||
mutex_unlock(&dev->mt76.mutex);
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x2_set_sar_specs);
|
||||
|
||||
static void
|
||||
mt76x2_set_wlan_state(struct mt76x02_dev *dev, bool enable)
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue