mac80211: update to version 6.14.11
Update to version 6.14.11 Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
2ac791e87d
commit
88f4c32060
173 changed files with 2065 additions and 19038 deletions
|
@ -10,13 +10,13 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=6.12.6
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=6.14.11
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
||||
PKG_HASH:=28ec39425a1b3270e1422d92a8131a6a3d8919cc13e8ee250c315e55d922ba68
|
||||
PKG_HASH:=1f6620485f0b33046e87aa2c6ac04ae529e9b5e83e318652d89939b192c6e348
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)backports-$(PKG_VERSION)
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
help
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -96,6 +96,7 @@ ADM8211=
|
||||
@@ -90,6 +90,7 @@ ADM8211=
|
||||
ATH_COMMON=
|
||||
WLAN_VENDOR_ATH=
|
||||
ATH_DEBUG=
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -3364,6 +3364,8 @@ void regulatory_hint_country_ie(struct w
|
||||
@@ -3365,6 +3365,8 @@ void regulatory_hint_country_ie(struct w
|
||||
enum environment_cap env = ENVIRON_ANY;
|
||||
struct regulatory_request *request = NULL, *lr;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
/* IE len must be evenly divisible by 2 */
|
||||
if (country_ie_len & 0x01)
|
||||
return;
|
||||
@@ -3615,6 +3617,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
@@ -3614,6 +3616,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
|
||||
void regulatory_hint_disconnect(void)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -156,6 +156,7 @@ ATH10K_DEBUG=
|
||||
@@ -150,6 +150,7 @@ ATH10K_DEBUG=
|
||||
ATH10K_DEBUGFS=
|
||||
ATH10K_LEDS=
|
||||
ATH10K_SPECTRAL=
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -9920,6 +9920,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
@@ -9934,6 +9934,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
int ath10k_mac_register(struct ath10k *ar)
|
||||
{
|
||||
static const u32 cipher_suites[] = {
|
||||
@@ -10282,6 +10297,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10296,6 +10311,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|||
if (ret)
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -10298,7 +10298,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10312,7 +10312,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
|
|
@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -10090,7 +10090,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10104,7 +10104,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
|
||||
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
||||
|
|
|
@ -1,91 +0,0 @@
|
|||
wifi: ath11k: Fix DMA buffer allocation to resolve SWIOTLB issues
|
||||
Currently, the driver allocates cacheable DMA buffers for rings like
|
||||
HAL_REO_DST and HAL_WBM2SW_RELEASE. The buffers for HAL_WBM2SW_RELEASE
|
||||
are large (1024 KiB), exceeding the SWIOTLB slot size of 256 KiB. This
|
||||
leads to "swiotlb buffer is full" error messages on systems without an
|
||||
IOMMU that use SWIOTLB, causing driver initialization failures. The driver
|
||||
calls dma_map_single() with these large buffers obtained from kzalloc(),
|
||||
resulting in ring initialization errors on systems without an IOMMU that
|
||||
use SWIOTLB.
|
||||
|
||||
To address these issues, replace the flawed buffer allocation mechanism
|
||||
with the appropriate DMA API. Specifically, use dma_alloc_noncoherent()
|
||||
for cacheable DMA buffers, ensuring proper freeing of buffers with
|
||||
dma_free_noncoherent().
|
||||
|
||||
Error log:
|
||||
[ 10.194343] ath11k_pci 0000:04:00.0: swiotlb buffer is full (sz:1048583 bytes), total 32768 (slots), used 2529 (slots)
|
||||
[ 10.194406] ath11k_pci 0000:04:00.0: failed to set up tcl_comp ring (0) :-12
|
||||
[ 10.194781] ath11k_pci 0000:04:00.0: failed to init DP: -12
|
||||
|
||||
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
||||
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
|
||||
|
||||
Reported-by: Tim Harvey <tharvey@gateworks.com>
|
||||
Closes: https://lore.kernel.org/all/20241210041133.GA17116@lst.de/
|
||||
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
|
||||
Tested-by: Tim Harvey <tharvey@gateworks.com>
|
||||
Link: https://patch.msgid.link/20250119164219.647059-2-quic_ppranees@quicinc.com
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp.c
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <crypto/hash.h>
|
||||
@@ -104,14 +104,12 @@ void ath11k_dp_srng_cleanup(struct ath11
|
||||
if (!ring->vaddr_unaligned)
|
||||
return;
|
||||
|
||||
- if (ring->cached) {
|
||||
- dma_unmap_single(ab->dev, ring->paddr_unaligned, ring->size,
|
||||
- DMA_FROM_DEVICE);
|
||||
- kfree(ring->vaddr_unaligned);
|
||||
- } else {
|
||||
+ if (ring->cached)
|
||||
+ dma_free_noncoherent(ab->dev, ring->size, ring->vaddr_unaligned,
|
||||
+ ring->paddr_unaligned, DMA_FROM_DEVICE);
|
||||
+ else
|
||||
dma_free_coherent(ab->dev, ring->size, ring->vaddr_unaligned,
|
||||
ring->paddr_unaligned);
|
||||
- }
|
||||
|
||||
ring->vaddr_unaligned = NULL;
|
||||
}
|
||||
@@ -249,25 +247,14 @@ int ath11k_dp_srng_setup(struct ath11k_b
|
||||
default:
|
||||
cached = false;
|
||||
}
|
||||
-
|
||||
- if (cached) {
|
||||
- ring->vaddr_unaligned = kzalloc(ring->size, GFP_KERNEL);
|
||||
- if (!ring->vaddr_unaligned)
|
||||
- return -ENOMEM;
|
||||
-
|
||||
- ring->paddr_unaligned = dma_map_single(ab->dev,
|
||||
- ring->vaddr_unaligned,
|
||||
- ring->size,
|
||||
- DMA_FROM_DEVICE);
|
||||
- if (dma_mapping_error(ab->dev, ring->paddr_unaligned)) {
|
||||
- kfree(ring->vaddr_unaligned);
|
||||
- ring->vaddr_unaligned = NULL;
|
||||
- return -ENOMEM;
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
- if (!cached)
|
||||
+ if (cached)
|
||||
+ ring->vaddr_unaligned = dma_alloc_noncoherent(ab->dev, ring->size,
|
||||
+ &ring->paddr_unaligned,
|
||||
+ DMA_FROM_DEVICE,
|
||||
+ GFP_KERNEL);
|
||||
+ else
|
||||
ring->vaddr_unaligned = dma_alloc_coherent(ab->dev, ring->size,
|
||||
&ring->paddr_unaligned,
|
||||
GFP_KERNEL);
|
|
@ -1,255 +0,0 @@
|
|||
wifi: ath11k: Use dma_alloc_noncoherent for rx_tid buffer allocation
|
||||
|
||||
Currently, the driver allocates cacheable DMA buffers for the rx_tid
|
||||
structure using kzalloc() and dma_map_single(). These buffers are
|
||||
long-lived and can persist for the lifetime of the peer, which is not
|
||||
advisable. Instead of using kzalloc() and dma_map_single() for allocating
|
||||
cacheable DMA buffers, utilize the dma_alloc_noncoherent() helper for the
|
||||
allocation of long-lived cacheable DMA buffers, such as the peer's rx_tid.
|
||||
Since dma_alloc_noncoherent() returns unaligned physical and virtual
|
||||
addresses, align them internally before use within the driver. This
|
||||
ensures proper allocation of non-coherent memory through the kernel
|
||||
helper.
|
||||
|
||||
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
||||
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
|
||||
|
||||
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp.h
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
+ * Copyright (c) 2021-2023, 2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef ATH11K_DP_H
|
||||
@@ -20,7 +20,6 @@ struct ath11k_ext_irq_grp;
|
||||
|
||||
struct dp_rx_tid {
|
||||
u8 tid;
|
||||
- u32 *vaddr;
|
||||
dma_addr_t paddr;
|
||||
u32 size;
|
||||
u32 ba_win_sz;
|
||||
@@ -37,6 +36,9 @@ struct dp_rx_tid {
|
||||
/* Timer info related to fragments */
|
||||
struct timer_list frag_timer;
|
||||
struct ath11k_base *ab;
|
||||
+ u32 *vaddr_unaligned;
|
||||
+ dma_addr_t paddr_unaligned;
|
||||
+ u32 unaligned_size;
|
||||
};
|
||||
|
||||
#define DP_REO_DESC_FREE_THRESHOLD 64
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/ieee80211.h>
|
||||
@@ -675,11 +675,11 @@ void ath11k_dp_reo_cmd_list_cleanup(stru
|
||||
list_for_each_entry_safe(cmd, tmp, &dp->reo_cmd_list, list) {
|
||||
list_del(&cmd->list);
|
||||
rx_tid = &cmd->data;
|
||||
- if (rx_tid->vaddr) {
|
||||
- dma_unmap_single(ab->dev, rx_tid->paddr,
|
||||
- rx_tid->size, DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ if (rx_tid->vaddr_unaligned) {
|
||||
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
kfree(cmd);
|
||||
}
|
||||
@@ -689,11 +689,11 @@ void ath11k_dp_reo_cmd_list_cleanup(stru
|
||||
list_del(&cmd_cache->list);
|
||||
dp->reo_cmd_cache_flush_count--;
|
||||
rx_tid = &cmd_cache->data;
|
||||
- if (rx_tid->vaddr) {
|
||||
- dma_unmap_single(ab->dev, rx_tid->paddr,
|
||||
- rx_tid->size, DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ if (rx_tid->vaddr_unaligned) {
|
||||
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
kfree(cmd_cache);
|
||||
}
|
||||
@@ -708,11 +708,11 @@ static void ath11k_dp_reo_cmd_free(struc
|
||||
if (status != HAL_REO_CMD_SUCCESS)
|
||||
ath11k_warn(dp->ab, "failed to flush rx tid hw desc, tid %d status %d\n",
|
||||
rx_tid->tid, status);
|
||||
- if (rx_tid->vaddr) {
|
||||
- dma_unmap_single(dp->ab->dev, rx_tid->paddr, rx_tid->size,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ if (rx_tid->vaddr_unaligned) {
|
||||
+ dma_free_noncoherent(dp->ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -749,10 +749,10 @@ static void ath11k_dp_reo_cache_flush(st
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed to send HAL_REO_CMD_FLUSH_CACHE cmd, tid %d (%d)\n",
|
||||
rx_tid->tid, ret);
|
||||
- dma_unmap_single(ab->dev, rx_tid->paddr, rx_tid->size,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -802,10 +802,10 @@ static void ath11k_dp_rx_tid_del_func(st
|
||||
|
||||
return;
|
||||
free_desc:
|
||||
- dma_unmap_single(ab->dev, rx_tid->paddr, rx_tid->size,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
|
||||
void ath11k_peer_rx_tid_delete(struct ath11k *ar,
|
||||
@@ -831,14 +831,16 @@ void ath11k_peer_rx_tid_delete(struct at
|
||||
if (ret != -ESHUTDOWN)
|
||||
ath11k_err(ar->ab, "failed to send HAL_REO_CMD_UPDATE_RX_QUEUE cmd, tid %d (%d)\n",
|
||||
tid, ret);
|
||||
- dma_unmap_single(ar->ab->dev, rx_tid->paddr, rx_tid->size,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ dma_free_noncoherent(ar->ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
|
||||
rx_tid->paddr = 0;
|
||||
+ rx_tid->paddr_unaligned = 0;
|
||||
rx_tid->size = 0;
|
||||
+ rx_tid->unaligned_size = 0;
|
||||
}
|
||||
|
||||
static int ath11k_dp_rx_link_desc_return(struct ath11k_base *ab,
|
||||
@@ -982,10 +984,9 @@ static void ath11k_dp_rx_tid_mem_free(st
|
||||
if (!rx_tid->active)
|
||||
goto unlock_exit;
|
||||
|
||||
- dma_unmap_single(ab->dev, rx_tid->paddr, rx_tid->size,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size, rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
|
||||
rx_tid->active = false;
|
||||
|
||||
@@ -1000,9 +1001,8 @@ int ath11k_peer_rx_tid_setup(struct ath1
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
struct ath11k_peer *peer;
|
||||
struct dp_rx_tid *rx_tid;
|
||||
- u32 hw_desc_sz;
|
||||
- u32 *addr_aligned;
|
||||
- void *vaddr;
|
||||
+ u32 hw_desc_sz, *vaddr;
|
||||
+ void *vaddr_unaligned;
|
||||
dma_addr_t paddr;
|
||||
int ret;
|
||||
|
||||
@@ -1050,37 +1050,34 @@ int ath11k_peer_rx_tid_setup(struct ath1
|
||||
else
|
||||
hw_desc_sz = ath11k_hal_reo_qdesc_size(DP_BA_WIN_SZ_MAX, tid);
|
||||
|
||||
- vaddr = kzalloc(hw_desc_sz + HAL_LINK_DESC_ALIGN - 1, GFP_ATOMIC);
|
||||
- if (!vaddr) {
|
||||
+ rx_tid->unaligned_size = hw_desc_sz + HAL_LINK_DESC_ALIGN - 1;
|
||||
+ vaddr_unaligned = dma_alloc_noncoherent(ab->dev, rx_tid->unaligned_size, &paddr,
|
||||
+ DMA_BIDIRECTIONAL, GFP_ATOMIC);
|
||||
+ if (!vaddr_unaligned) {
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
- addr_aligned = PTR_ALIGN(vaddr, HAL_LINK_DESC_ALIGN);
|
||||
-
|
||||
- ath11k_hal_reo_qdesc_setup(addr_aligned, tid, ba_win_sz,
|
||||
- ssn, pn_type);
|
||||
-
|
||||
- paddr = dma_map_single(ab->dev, addr_aligned, hw_desc_sz,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
-
|
||||
- ret = dma_mapping_error(ab->dev, paddr);
|
||||
- if (ret) {
|
||||
- spin_unlock_bh(&ab->base_lock);
|
||||
- ath11k_warn(ab, "failed to setup dma map for peer %pM rx tid %d: %d\n",
|
||||
- peer_mac, tid, ret);
|
||||
- goto err_mem_free;
|
||||
- }
|
||||
-
|
||||
- rx_tid->vaddr = vaddr;
|
||||
- rx_tid->paddr = paddr;
|
||||
+ rx_tid->vaddr_unaligned = vaddr_unaligned;
|
||||
+ vaddr = PTR_ALIGN(vaddr_unaligned, HAL_LINK_DESC_ALIGN);
|
||||
+ rx_tid->paddr_unaligned = paddr;
|
||||
+ rx_tid->paddr = rx_tid->paddr_unaligned + ((unsigned long)vaddr -
|
||||
+ (unsigned long)rx_tid->vaddr_unaligned);
|
||||
+ ath11k_hal_reo_qdesc_setup(vaddr, tid, ba_win_sz, ssn, pn_type);
|
||||
rx_tid->size = hw_desc_sz;
|
||||
rx_tid->active = true;
|
||||
|
||||
+ /* After dma_alloc_noncoherent, vaddr is being modified for reo qdesc setup.
|
||||
+ * Since these changes are not reflected in the device, driver now needs to
|
||||
+ * explicitly call dma_sync_single_for_device.
|
||||
+ */
|
||||
+ dma_sync_single_for_device(ab->dev, rx_tid->paddr,
|
||||
+ rx_tid->size,
|
||||
+ DMA_TO_DEVICE);
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
|
||||
- ret = ath11k_wmi_peer_rx_reorder_queue_setup(ar, vdev_id, peer_mac,
|
||||
- paddr, tid, 1, ba_win_sz);
|
||||
+ ret = ath11k_wmi_peer_rx_reorder_queue_setup(ar, vdev_id, peer_mac, rx_tid->paddr,
|
||||
+ tid, 1, ba_win_sz);
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to setup rx reorder queue for peer %pM tid %d: %d\n",
|
||||
peer_mac, tid, ret);
|
||||
@@ -1088,12 +1085,6 @@ int ath11k_peer_rx_tid_setup(struct ath1
|
||||
}
|
||||
|
||||
return ret;
|
||||
-
|
||||
-err_mem_free:
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
-
|
||||
- return ret;
|
||||
}
|
||||
|
||||
int ath11k_dp_rx_ampdu_start(struct ath11k *ar,
|
|
@ -13,7 +13,7 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -170,8 +170,8 @@ static const struct ath11k_hw_params ath
|
||||
@@ -171,8 +171,8 @@ static const struct ath11k_hw_params ath
|
||||
.supports_shadow_regs = false,
|
||||
.idle_ps = false,
|
||||
.supports_sta_ps = false,
|
||||
|
|
|
@ -14,7 +14,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -691,8 +691,8 @@ static const struct ath11k_hw_params ath
|
||||
@@ -698,8 +698,8 @@ static const struct ath11k_hw_params ath
|
||||
.supports_suspend = false,
|
||||
.hal_params = &ath11k_hw_hal_params_ipq8074,
|
||||
.single_pdev_only = false,
|
||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -2028,6 +2028,7 @@ static int ath11k_qmi_assign_target_mem_
|
||||
@@ -2030,6 +2030,7 @@ static int ath11k_qmi_assign_target_mem_
|
||||
struct device_node *hremote_node = NULL;
|
||||
struct resource res;
|
||||
u32 host_ddr_sz;
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|||
int i, idx, ret;
|
||||
|
||||
for (i = 0, idx = 0; i < ab->qmi.mem_seg_count; i++) {
|
||||
@@ -2067,7 +2068,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
@@ -2069,7 +2070,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
idx++;
|
||||
break;
|
||||
case BDF_MEM_REGION_TYPE:
|
||||
|
@ -29,7 +29,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|||
ab->qmi.target_mem[idx].vaddr = NULL;
|
||||
ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size;
|
||||
ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type;
|
||||
@@ -2089,8 +2092,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
@@ -2091,8 +2094,9 @@ static int ath11k_qmi_assign_target_mem_
|
||||
if (!ab->qmi.target_mem[idx].iaddr)
|
||||
return -EIO;
|
||||
} else {
|
||||
|
@ -41,7 +41,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|||
}
|
||||
} else {
|
||||
ab->qmi.target_mem[idx].paddr = 0;
|
||||
@@ -2295,6 +2299,7 @@ static int ath11k_qmi_load_file_target_m
|
||||
@@ -2297,6 +2301,7 @@ static int ath11k_qmi_load_file_target_m
|
||||
struct qmi_wlanfw_bdf_download_resp_msg_v01 resp;
|
||||
struct qmi_txn txn;
|
||||
const u8 *temp = data;
|
||||
|
@ -49,7 +49,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|||
void __iomem *bdf_addr = NULL;
|
||||
int ret = 0;
|
||||
u32 remaining = len;
|
||||
@@ -2306,7 +2311,9 @@ static int ath11k_qmi_load_file_target_m
|
||||
@@ -2308,7 +2313,9 @@ static int ath11k_qmi_load_file_target_m
|
||||
memset(&resp, 0, sizeof(resp));
|
||||
|
||||
if (ab->hw_params.fixed_bdf_addr) {
|
||||
|
|
|
@ -56,7 +56,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|||
int ath11k_thermal_set_throttling(struct ath11k *ar, u32 throttle_state);
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -168,6 +168,7 @@ ATH11K_DEBUG=
|
||||
@@ -162,6 +162,7 @@ ATH11K_DEBUG=
|
||||
ATH11K_DEBUGFS=
|
||||
ATH11K_TRACING=
|
||||
ATH11K_SPECTRAL=
|
||||
|
|
|
@ -31,7 +31,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|||
{
|
||||
.hw_rev = ATH11K_HW_IPQ8074,
|
||||
.name = "ipq8074 hw2.0",
|
||||
@@ -2147,7 +2147,8 @@ static void ath11k_core_reset(struct wor
|
||||
@@ -2280,7 +2280,8 @@ static void ath11k_core_reset(struct wor
|
||||
static int ath11k_init_hw_params(struct ath11k_base *ab)
|
||||
{
|
||||
const struct ath11k_hw_params *hw_params = NULL;
|
||||
|
@ -41,7 +41,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|||
|
||||
for (i = 0; i < ARRAY_SIZE(ath11k_hw_params); i++) {
|
||||
hw_params = &ath11k_hw_params[i];
|
||||
@@ -2163,7 +2164,31 @@ static int ath11k_init_hw_params(struct
|
||||
@@ -2296,7 +2297,31 @@ static int ath11k_init_hw_params(struct
|
||||
|
||||
ab->hw_params = *hw_params;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/reg.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/reg.c
|
||||
@@ -361,134 +361,6 @@ static u32 ath11k_map_fw_phy_flags(u32 p
|
||||
@@ -353,134 +353,6 @@ static u32 ath11k_map_fw_phy_flags(u32 p
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|||
static const char *
|
||||
ath11k_reg_get_regdom_str(enum nl80211_dfs_regions dfs_region)
|
||||
{
|
||||
@@ -639,11 +511,11 @@ ath11k_reg_ap_pwr_convert(enum ieee80211
|
||||
@@ -631,11 +503,11 @@ ath11k_reg_ap_pwr_convert(enum ieee80211
|
||||
|
||||
struct ieee80211_regdomain *
|
||||
ath11k_reg_build_regd(struct ath11k_base *ab,
|
||||
|
@ -172,7 +172,7 @@ Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|||
struct cur_reg_rule *reg_rule, *reg_rule_6ghz;
|
||||
u8 i = 0, j = 0, k = 0;
|
||||
u8 num_rules;
|
||||
@@ -686,26 +558,26 @@ ath11k_reg_build_regd(struct ath11k_base
|
||||
@@ -678,26 +550,26 @@ ath11k_reg_build_regd(struct ath11k_base
|
||||
}
|
||||
|
||||
if (!num_rules)
|
||||
|
@ -206,7 +206,7 @@ Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|||
reg_info->dfs_region, num_rules);
|
||||
/* Update reg_rules[] below. Firmware is expected to
|
||||
* send these rules in order(2 GHz rules first and then 5 GHz)
|
||||
@@ -744,7 +616,7 @@ ath11k_reg_build_regd(struct ath11k_base
|
||||
@@ -736,7 +608,7 @@ ath11k_reg_build_regd(struct ath11k_base
|
||||
flags |= ath11k_map_fw_reg_flags(reg_rule->flags);
|
||||
flags |= ath11k_map_fw_phy_flags(reg_info->phybitmap);
|
||||
|
||||
|
@ -215,7 +215,7 @@ Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|||
reg_rule->start_freq,
|
||||
reg_rule->end_freq, max_bw,
|
||||
reg_rule->ant_gain, reg_rule->reg_power,
|
||||
@@ -759,7 +631,7 @@ ath11k_reg_build_regd(struct ath11k_base
|
||||
@@ -751,7 +623,7 @@ ath11k_reg_build_regd(struct ath11k_base
|
||||
reg_info->dfs_region == ATH11K_DFS_REG_ETSI &&
|
||||
(reg_rule->end_freq > ETSI_WEATHER_RADAR_BAND_LOW &&
|
||||
reg_rule->start_freq < ETSI_WEATHER_RADAR_BAND_HIGH)){
|
||||
|
@ -224,7 +224,7 @@ Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|||
reg_rule, &i,
|
||||
flags, max_bw);
|
||||
continue;
|
||||
@@ -770,51 +642,23 @@ ath11k_reg_build_regd(struct ath11k_base
|
||||
@@ -762,37 +634,20 @@ ath11k_reg_build_regd(struct ath11k_base
|
||||
"\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d) (%d, %d)\n",
|
||||
i + 1, reg_rule->start_freq, reg_rule->end_freq,
|
||||
max_bw, reg_rule->ant_gain, reg_rule->reg_power,
|
||||
|
@ -265,6 +265,10 @@ Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|||
return new_regd;
|
||||
}
|
||||
|
||||
@@ -844,17 +699,6 @@ void ath11k_regd_update_chan_list_work(s
|
||||
}
|
||||
}
|
||||
|
||||
-static bool ath11k_reg_is_world_alpha(char *alpha)
|
||||
-{
|
||||
- if (alpha[0] == '0' && alpha[1] == '0')
|
||||
|
@ -279,7 +283,7 @@ Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|||
static enum wmi_vdev_type ath11k_reg_get_ar_vdev_type(struct ath11k *ar)
|
||||
{
|
||||
struct ath11k_vif *arvif;
|
||||
@@ -837,7 +681,6 @@ int ath11k_reg_handle_chan_list(struct a
|
||||
@@ -877,7 +721,6 @@ int ath11k_reg_handle_chan_list(struct a
|
||||
enum ieee80211_ap_reg_power power_type)
|
||||
{
|
||||
struct ieee80211_regdomain *regd;
|
||||
|
@ -287,7 +291,7 @@ Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|||
int pdev_idx;
|
||||
struct ath11k *ar;
|
||||
enum wmi_vdev_type vdev_type;
|
||||
@@ -889,24 +732,14 @@ int ath11k_reg_handle_chan_list(struct a
|
||||
@@ -929,24 +772,14 @@ int ath11k_reg_handle_chan_list(struct a
|
||||
(char *)reg_info->alpha2, 2))
|
||||
goto retfail;
|
||||
|
||||
|
@ -317,8 +321,8 @@ Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|||
goto fallback;
|
||||
--- a/drivers/net/wireless/ath/ath11k/reg.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/reg.h
|
||||
@@ -35,7 +35,7 @@ void ath11k_reg_free(struct ath11k_base
|
||||
void ath11k_regd_update_work(struct work_struct *work);
|
||||
@@ -36,7 +36,7 @@ void ath11k_regd_update_work(struct work
|
||||
void ath11k_regd_update_chan_list_work(struct work_struct *work);
|
||||
struct ieee80211_regdomain *
|
||||
ath11k_reg_build_regd(struct ath11k_base *ab,
|
||||
- struct cur_regulatory_info *reg_info, bool intersect,
|
||||
|
|
|
@ -25,9 +25,9 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -809,6 +809,67 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.support_fw_mac_sequence = true,
|
||||
@@ -905,6 +905,67 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.support_dual_stations = true,
|
||||
.pdev_suspend = false,
|
||||
},
|
||||
+ {
|
||||
+ .hw_rev = ATH11K_HW_QCN6122_HW10,
|
||||
|
@ -95,10 +95,10 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
static inline struct ath11k_pdev *ath11k_core_get_single_pdev(struct ath11k_base *ab)
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
||||
@@ -148,6 +148,7 @@ enum ath11k_hw_rev {
|
||||
ATH11K_HW_WCN6750_HW10,
|
||||
@@ -149,6 +149,7 @@ enum ath11k_hw_rev {
|
||||
ATH11K_HW_IPQ5018_HW10,
|
||||
ATH11K_HW_QCA2066_HW21,
|
||||
ATH11K_HW_QCA6698AQ_HW21,
|
||||
+ ATH11K_HW_QCN6122_HW10,
|
||||
};
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
---
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -822,6 +822,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
@@ -918,6 +918,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.bdf_addr = 0x4D200000,
|
||||
.hw_ops = &ipq5018_ops,
|
||||
.hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074),
|
||||
|
@ -104,7 +104,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
.tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_ipq8074,
|
||||
--- a/drivers/net/wireless/ath/ath11k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hw.h
|
||||
@@ -425,6 +425,7 @@ extern const struct ath11k_hw_regs qcn90
|
||||
@@ -426,6 +426,7 @@ extern const struct ath11k_hw_regs qcn90
|
||||
extern const struct ath11k_hw_regs wcn6855_regs;
|
||||
extern const struct ath11k_hw_regs wcn6750_regs;
|
||||
extern const struct ath11k_hw_regs ipq5018_regs;
|
||||
|
|
|
@ -8,7 +8,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
---
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -821,6 +821,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
@@ -917,6 +917,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.max_radios = MAX_RADIOS_5018,
|
||||
.bdf_addr = 0x4D200000,
|
||||
.hw_ops = &ipq5018_ops,
|
||||
|
@ -64,7 +64,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
/* CE0: host->target HTC control and raw streams */
|
||||
--- a/drivers/net/wireless/ath/ath11k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hw.h
|
||||
@@ -289,6 +289,7 @@ extern const struct ath11k_hw_ring_mask
|
||||
@@ -290,6 +290,7 @@ extern const struct ath11k_hw_ring_mask
|
||||
extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qca6390;
|
||||
extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn9074;
|
||||
extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_wcn6750;
|
||||
|
|
|
@ -91,7 +91,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
#endif /* _HIF_H_ */
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -2187,6 +2187,8 @@ static int ath11k_qmi_request_device_inf
|
||||
@@ -2189,6 +2189,8 @@ static int ath11k_qmi_request_device_inf
|
||||
if (!ab->hw_params.ce_remap)
|
||||
ab->mem_ce = ab->mem;
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
/* SMBIOS type containing Board Data File Name Extension */
|
||||
#define ATH11K_SMBIOS_BDF_EXT_TYPE 0xF8
|
||||
|
||||
@@ -951,6 +954,7 @@ struct ath11k_base {
|
||||
@@ -952,6 +955,7 @@ struct ath11k_base {
|
||||
struct list_head peers;
|
||||
wait_queue_head_t peer_mapping_wq;
|
||||
u8 mac_addr[ETH_ALEN];
|
||||
|
|
|
@ -37,9 +37,9 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
@@ -126,6 +126,15 @@ static const struct ath11k_msi_config at
|
||||
@@ -137,6 +137,15 @@ static const struct ath11k_msi_config at
|
||||
},
|
||||
.hw_rev = ATH11K_HW_QCA2066_HW21,
|
||||
.hw_rev = ATH11K_HW_QCA6698AQ_HW21,
|
||||
},
|
||||
+ {
|
||||
+ .total_vectors = 13,
|
||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -2104,6 +2104,18 @@ static int ath11k_qmi_assign_target_mem_
|
||||
@@ -2106,6 +2106,18 @@ static int ath11k_qmi_assign_target_mem_
|
||||
ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type;
|
||||
idx++;
|
||||
break;
|
||||
|
|
|
@ -24,10 +24,10 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
|||
---
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -719,6 +719,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.smp2p_wow_exit = false,
|
||||
@@ -727,6 +727,7 @@ static struct ath11k_hw_params ath11k_hw
|
||||
.support_fw_mac_sequence = false,
|
||||
.support_dual_stations = false,
|
||||
.pdev_suspend = false,
|
||||
+ .reo_status_poll = true,
|
||||
},
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
|||
struct dp_reo_cache_flush_elem {
|
||||
struct list_head list;
|
||||
struct dp_rx_tid data;
|
||||
@@ -288,6 +290,10 @@ struct ath11k_dp {
|
||||
@@ -287,6 +289,10 @@ struct ath11k_dp {
|
||||
spinlock_t reo_cmd_lock;
|
||||
struct ath11k_hp_update_timer reo_cmd_timer;
|
||||
struct ath11k_hp_update_timer tx_ring_timer[DP_TCL_NUM_RING_MAX];
|
||||
|
@ -132,7 +132,7 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
|||
};
|
||||
|
||||
/* HTT definitions */
|
||||
@@ -1691,5 +1697,6 @@ void ath11k_dp_shadow_init_timer(struct
|
||||
@@ -1690,5 +1696,6 @@ void ath11k_dp_shadow_init_timer(struct
|
||||
struct ath11k_hp_update_timer *update_timer,
|
||||
u32 interval, u32 ring_id);
|
||||
void ath11k_dp_stop_shadow_timers(struct ath11k_base *ab);
|
||||
|
@ -154,10 +154,10 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hw.h
|
||||
@@ -232,6 +232,7 @@ struct ath11k_hw_params {
|
||||
bool smp2p_wow_exit;
|
||||
@@ -233,6 +233,7 @@ struct ath11k_hw_params {
|
||||
bool support_fw_mac_sequence;
|
||||
bool support_dual_stations;
|
||||
bool pdev_suspend;
|
||||
+ bool reo_status_poll;
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -4222,7 +4222,9 @@ static int ath11k_install_key(struct ath
|
||||
@@ -4220,7 +4220,9 @@ static int ath11k_install_key(struct ath
|
||||
return 0;
|
||||
|
||||
if (cmd == DISABLE_KEY) {
|
||||
|
|
|
@ -121,7 +121,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
};
|
||||
|
||||
static __le32 ath12k_wmi_tlv_hdr(u32 cmd, u32 len)
|
||||
@@ -2364,7 +2366,10 @@ int ath12k_wmi_send_scan_start_cmd(struc
|
||||
@@ -2531,7 +2533,10 @@ int ath12k_wmi_send_scan_start_cmd(struc
|
||||
cmd->scan_id = cpu_to_le32(arg->scan_id);
|
||||
cmd->scan_req_id = cpu_to_le32(arg->scan_req_id);
|
||||
cmd->vdev_id = cpu_to_le32(arg->vdev_id);
|
||||
|
@ -133,7 +133,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
cmd->notify_scan_events = cpu_to_le32(arg->notify_scan_events);
|
||||
|
||||
ath12k_wmi_copy_scan_event_cntrl_flags(cmd, arg);
|
||||
@@ -3084,6 +3089,110 @@ out:
|
||||
@@ -3253,6 +3258,110 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
int
|
||||
ath12k_wmi_send_twt_enable_cmd(struct ath12k *ar, u32 pdev_id)
|
||||
{
|
||||
@@ -5669,6 +5778,50 @@ static void ath12k_wmi_op_ep_tx_credits(
|
||||
@@ -5873,6 +5982,50 @@ static void ath12k_wmi_op_ep_tx_credits(
|
||||
wake_up(&ab->wmi_ab.tx_credits_wq);
|
||||
}
|
||||
|
||||
|
@ -295,9 +295,9 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
static void ath12k_wmi_htc_tx_complete(struct ath12k_base *ab,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
@@ -7270,6 +7423,9 @@ static void ath12k_wmi_op_rx(struct ath1
|
||||
case WMI_GTK_OFFLOAD_STATUS_EVENTID:
|
||||
ath12k_wmi_gtk_offload_status_event(ab, skb);
|
||||
@@ -7586,6 +7739,9 @@ static void ath12k_wmi_op_rx(struct ath1
|
||||
case WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID:
|
||||
/* debug might flood hence silently ignore (no-op) */
|
||||
break;
|
||||
+ case WMI_11D_NEW_COUNTRY_EVENTID:
|
||||
+ ath12k_reg_11d_new_cc_event(ab, skb);
|
||||
|
@ -307,7 +307,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
ath12k_dbg(ab, ATH12K_DBG_WMI, "Unknown eventid: 0x%x\n", id);
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -3860,6 +3860,28 @@ struct wmi_init_country_cmd {
|
||||
@@ -3990,6 +3990,28 @@ struct wmi_init_country_cmd {
|
||||
} cc_info;
|
||||
} __packed;
|
||||
|
||||
|
@ -336,9 +336,9 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
struct wmi_delba_send_cmd {
|
||||
__le32 tlv_header;
|
||||
__le32 vdev_id;
|
||||
@@ -3945,6 +3967,16 @@ struct ath12k_wmi_eht_rate_set_params {
|
||||
@@ -4074,6 +4096,16 @@ struct ath12k_wmi_eht_rate_set_params {
|
||||
#define REG_ALPHA2_LEN 2
|
||||
#define MAX_6G_REG_RULES 5
|
||||
#define REG_US_5G_NUM_REG_RULES 4
|
||||
|
||||
+struct wmi_set_current_country_arg {
|
||||
+ u8 alpha2[REG_ALPHA2_LEN];
|
||||
|
@ -353,7 +353,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
enum wmi_start_event_param {
|
||||
WMI_VDEV_START_RESP_EVENT = 0,
|
||||
WMI_VDEV_RESTART_RESP_EVENT,
|
||||
@@ -5547,11 +5579,17 @@ int ath12k_wmi_send_bcn_offload_control_
|
||||
@@ -5714,11 +5746,17 @@ int ath12k_wmi_send_bcn_offload_control_
|
||||
u32 vdev_id, u32 bcn_ctrl_op);
|
||||
int ath12k_wmi_send_init_country_cmd(struct ath12k *ar,
|
||||
struct ath12k_wmi_init_country_arg *arg);
|
||||
|
@ -373,7 +373,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
struct ath12k_wmi_rx_reorder_queue_remove_arg *arg);
|
||||
--- a/drivers/net/wireless/ath/ath12k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/core.c
|
||||
@@ -1014,6 +1014,7 @@ void ath12k_core_halt(struct ath12k *ar)
|
||||
@@ -1251,6 +1251,7 @@ void ath12k_core_halt(struct ath12k *ar)
|
||||
cancel_delayed_work_sync(&ar->scan.timeout);
|
||||
cancel_work_sync(&ar->regd_update_work);
|
||||
cancel_work_sync(&ab->rfkill_work);
|
||||
|
@ -381,7 +381,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
rcu_assign_pointer(ab->pdevs_active[ar->pdev_idx], NULL);
|
||||
synchronize_rcu();
|
||||
@@ -1021,6 +1022,34 @@ void ath12k_core_halt(struct ath12k *ar)
|
||||
@@ -1258,6 +1259,34 @@ void ath12k_core_halt(struct ath12k *ar)
|
||||
idr_init(&ar->txmgmt_idr);
|
||||
}
|
||||
|
||||
|
@ -415,8 +415,8 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+
|
||||
static void ath12k_core_pre_reconfigure_recovery(struct ath12k_base *ab)
|
||||
{
|
||||
struct ath12k *ar;
|
||||
@@ -1045,8 +1074,10 @@ static void ath12k_core_pre_reconfigure_
|
||||
struct ath12k_hw_group *ag = ab->ag;
|
||||
@@ -1283,8 +1312,10 @@ static void ath12k_core_pre_reconfigure_
|
||||
ar = &ah->radio[j];
|
||||
|
||||
ath12k_mac_drain_tx(ar);
|
||||
|
@ -428,18 +428,18 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
complete(&ar->scan.on_channel);
|
||||
complete(&ar->peer_assoc_done);
|
||||
complete(&ar->peer_delete_done);
|
||||
@@ -1312,6 +1343,7 @@ struct ath12k_base *ath12k_core_alloc(st
|
||||
INIT_WORK(&ab->restart_work, ath12k_core_restart);
|
||||
@@ -1953,6 +1984,7 @@ struct ath12k_base *ath12k_core_alloc(st
|
||||
INIT_WORK(&ab->reset_work, ath12k_core_reset);
|
||||
INIT_WORK(&ab->rfkill_work, ath12k_rfkill_work);
|
||||
INIT_WORK(&ab->dump_work, ath12k_coredump_upload);
|
||||
+ INIT_WORK(&ab->update_11d_work, ath12k_update_11d);
|
||||
|
||||
timer_setup(&ab->rx_replenish_retry, ath12k_ce_rx_replenish_retry, 0);
|
||||
init_completion(&ab->htc_suspend);
|
||||
--- a/drivers/net/wireless/ath/ath12k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/core.h
|
||||
@@ -199,6 +199,12 @@ enum ath12k_scan_state {
|
||||
ATH12K_SCAN_ABORTING,
|
||||
@@ -224,6 +224,12 @@ enum ath12k_hw_group_flags {
|
||||
ATH12K_GROUP_FLAG_UNREGISTER,
|
||||
};
|
||||
|
||||
+enum ath12k_11d_state {
|
||||
|
@ -449,9 +449,9 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+};
|
||||
+
|
||||
enum ath12k_dev_flags {
|
||||
ATH12K_CAC_RUNNING,
|
||||
ATH12K_FLAG_CAC_RUNNING,
|
||||
ATH12K_FLAG_CRASH_FLUSH,
|
||||
@@ -319,6 +325,8 @@ struct ath12k_vif_iter {
|
||||
@@ -361,6 +367,8 @@ struct ath12k_vif_iter {
|
||||
#define ATH12K_RX_RATE_TABLE_11AX_NUM 576
|
||||
#define ATH12K_RX_RATE_TABLE_NUM 320
|
||||
|
||||
|
@ -460,9 +460,9 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
struct ath12k_rx_peer_rate_stats {
|
||||
u64 ht_mcs_count[HAL_RX_MAX_MCS_HT + 1];
|
||||
u64 vht_mcs_count[HAL_RX_MAX_MCS_VHT + 1];
|
||||
@@ -654,6 +662,13 @@ struct ath12k {
|
||||
u32 freq_low;
|
||||
u32 freq_high;
|
||||
@@ -713,6 +721,13 @@ struct ath12k {
|
||||
|
||||
struct wiphy_radio_freq_range freq_range;
|
||||
|
||||
+ /* Protected by wiphy::mtx lock. */
|
||||
+ u32 vdev_id_11d_scan;
|
||||
|
@ -472,9 +472,9 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+ bool regdom_set_by_user;
|
||||
+
|
||||
bool nlo_enabled;
|
||||
};
|
||||
|
||||
@@ -886,6 +901,8 @@ struct ath12k_base {
|
||||
struct completion mlo_setup_done;
|
||||
@@ -985,6 +1000,8 @@ struct ath12k_base {
|
||||
/* continuous recovery fail count */
|
||||
atomic_t fail_cont_count;
|
||||
unsigned long reset_fail_timeout;
|
||||
|
@ -485,28 +485,28 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
u32 fw_crash_counter;
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -2949,6 +2949,11 @@ static void ath12k_bss_assoc(struct ath1
|
||||
@@ -3340,6 +3340,11 @@ static void ath12k_bss_assoc(struct ath1
|
||||
if (ret)
|
||||
ath12k_warn(ar->ab, "failed to set vdev %i OBSS PD parameters: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
+
|
||||
+ if (test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ar->ab->wmi_ab.svc_map) &&
|
||||
+ arvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE)
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ ahvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE)
|
||||
+ ath12k_mac_11d_scan_stop_all(ar->ab);
|
||||
}
|
||||
|
||||
static void ath12k_bss_disassoc(struct ath12k *ar,
|
||||
@@ -3524,7 +3529,7 @@ void __ath12k_mac_scan_finish(struct ath
|
||||
ar->scan_channel = NULL;
|
||||
ar->scan.roc_freq = 0;
|
||||
@@ -4094,7 +4099,7 @@ void __ath12k_mac_scan_finish(struct ath
|
||||
fallthrough;
|
||||
case ATH12K_SCAN_STARTING:
|
||||
cancel_delayed_work(&ar->scan.timeout);
|
||||
- complete(&ar->scan.completed);
|
||||
+ complete_all(&ar->scan.completed);
|
||||
wiphy_work_queue(ar->ah->hw->wiphy, &ar->scan.vdev_clean_wk);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3790,7 +3795,12 @@ scan:
|
||||
@@ -4438,7 +4443,12 @@ static int ath12k_mac_op_hw_scan(struct
|
||||
|
||||
ret = ath12k_start_scan(ar, arg);
|
||||
if (ret) {
|
||||
|
@ -520,19 +520,19 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
spin_lock_bh(&ar->data_lock);
|
||||
ar->scan.state = ATH12K_SCAN_IDLE;
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
@@ -3810,6 +3820,11 @@ exit:
|
||||
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
@@ -4465,6 +4475,11 @@ exit:
|
||||
kfree(arg);
|
||||
}
|
||||
|
||||
+ if (ar->state_11d == ATH12K_11D_PREPARING &&
|
||||
+ arvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE)
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ ahvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE)
|
||||
+ ath12k_mac_11d_scan_start(ar, arvif->vdev_id);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -5995,7 +6010,7 @@ static int ath12k_mac_start(struct ath12
|
||||
@@ -7383,7 +7398,7 @@ static int ath12k_mac_start(struct ath12
|
||||
|
||||
/* TODO: Do we need to enable ANI? */
|
||||
|
||||
|
@ -541,8 +541,8 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
ar->num_started_vdevs = 0;
|
||||
ar->num_created_vdevs = 0;
|
||||
@@ -6175,6 +6190,9 @@ static void ath12k_mac_stop(struct ath12
|
||||
cancel_delayed_work_sync(&ar->scan.timeout);
|
||||
@@ -7564,6 +7579,9 @@ static void ath12k_mac_stop(struct ath12
|
||||
wiphy_work_cancel(ath12k_ar_to_hw(ar)->wiphy, &ar->scan.vdev_clean_wk);
|
||||
cancel_work_sync(&ar->regd_update_work);
|
||||
cancel_work_sync(&ar->ab->rfkill_work);
|
||||
+ cancel_work_sync(&ar->ab->update_11d_work);
|
||||
|
@ -551,22 +551,22 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
list_for_each_entry_safe(ppdu_stats, tmp, &ar->ppdu_stats_info, list) {
|
||||
@@ -6421,6 +6439,117 @@ static void ath12k_mac_op_update_vif_off
|
||||
ath12k_mac_update_vif_offload(arvif);
|
||||
@@ -7857,6 +7875,117 @@ static void ath12k_mac_op_update_vif_off
|
||||
ath12k_mac_update_vif_offload(&ahvif->deflink);
|
||||
}
|
||||
|
||||
+static bool ath12k_mac_vif_ap_active_any(struct ath12k_base *ab)
|
||||
+{
|
||||
+ struct ath12k *ar;
|
||||
+ struct ath12k_pdev *pdev;
|
||||
+ struct ath12k_vif *arvif;
|
||||
+ struct ath12k_link_vif *arvif;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < ab->num_radios; i++) {
|
||||
+ pdev = &ab->pdevs[i];
|
||||
+ ar = pdev->ar;
|
||||
+ list_for_each_entry(arvif, &ar->arvifs, list) {
|
||||
+ if (arvif->is_up && arvif->vdev_type == WMI_VDEV_TYPE_AP)
|
||||
+ if (arvif->is_up && arvif->ahvif->vdev_type == WMI_VDEV_TYPE_AP)
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
|
@ -666,10 +666,10 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+ }
|
||||
+}
|
||||
+
|
||||
static int ath12k_mac_vdev_create(struct ath12k *ar, struct ieee80211_vif *vif)
|
||||
int ath12k_mac_vdev_create(struct ath12k *ar, struct ath12k_link_vif *arvif)
|
||||
{
|
||||
struct ath12k_hw *ah = ar->ah;
|
||||
@@ -6535,6 +6664,7 @@ static int ath12k_mac_vdev_create(struct
|
||||
@@ -7991,6 +8120,7 @@ int ath12k_mac_vdev_create(struct ath12k
|
||||
arvif->vdev_id, ret);
|
||||
goto err_peer_del;
|
||||
}
|
||||
|
@ -677,48 +677,48 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
break;
|
||||
case WMI_VDEV_TYPE_STA:
|
||||
param_id = WMI_STA_PS_PARAM_RX_WAKE_POLICY;
|
||||
@@ -6573,6 +6703,13 @@ static int ath12k_mac_vdev_create(struct
|
||||
@@ -8029,6 +8159,13 @@ int ath12k_mac_vdev_create(struct ath12k
|
||||
arvif->vdev_id, ret);
|
||||
goto err_peer_del;
|
||||
}
|
||||
+
|
||||
+ if (test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ab->wmi_ab.svc_map) &&
|
||||
+ arvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE) {
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ ahvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE) {
|
||||
+ reinit_completion(&ar->completed_11d_scan);
|
||||
+ ar->state_11d = ATH12K_11D_PREPARING;
|
||||
+ }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -6913,6 +7050,11 @@ static void ath12k_mac_op_remove_interfa
|
||||
ath12k_dbg(ab, ATH12K_DBG_MAC, "mac remove interface (vdev %d)\n",
|
||||
arvif->vdev_id);
|
||||
@@ -8821,6 +8958,11 @@ ath12k_mac_vdev_start_restart(struct ath
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ if (test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ab->wmi_ab.svc_map) &&
|
||||
+ arvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE)
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ ahvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE)
|
||||
+ ath12k_mac_11d_scan_stop(ar);
|
||||
+
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
ret = ath12k_peer_delete(ar, arvif->vdev_id, vif->addr);
|
||||
if (ret)
|
||||
@@ -7753,6 +7895,14 @@ ath12k_mac_op_unassign_vif_chanctx(struc
|
||||
if (ahvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
arg.ssid = ahvif->u.ap.ssid;
|
||||
arg.ssid_len = ahvif->u.ap.ssid_len;
|
||||
@@ -9395,6 +9537,14 @@ ath12k_mac_op_unassign_vif_chanctx(struc
|
||||
ar->num_started_vdevs == 1 && ar->monitor_vdev_created)
|
||||
ath12k_mac_monitor_stop(ar);
|
||||
|
||||
+ if (test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ab->wmi_ab.svc_map) &&
|
||||
+ arvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE &&
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ ahvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE &&
|
||||
+ ar->state_11d != ATH12K_11D_PREPARING) {
|
||||
+ reinit_completion(&ar->completed_11d_scan);
|
||||
+ ar->state_11d = ATH12K_11D_PREPARING;
|
||||
+ }
|
||||
+
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
ath12k_mac_remove_link_interface(hw, arvif);
|
||||
ath12k_mac_unassign_link_vif(arvif);
|
||||
}
|
||||
|
||||
@@ -8291,6 +8441,14 @@ ath12k_mac_op_reconfig_complete(struct i
|
||||
@@ -9958,6 +10108,14 @@ ath12k_mac_op_reconfig_complete(struct i
|
||||
ath12k_warn(ar->ab, "pdev %d successfully recovered\n",
|
||||
ar->pdev->pdev_id);
|
||||
|
||||
|
@ -733,19 +733,19 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
if (ab->is_reset) {
|
||||
recovery_count = atomic_inc_return(&ab->recovery_count);
|
||||
|
||||
@@ -9340,6 +9498,9 @@ static void ath12k_mac_setup(struct ath1
|
||||
@@ -11173,6 +11331,9 @@ static void ath12k_mac_setup(struct ath1
|
||||
|
||||
INIT_WORK(&ar->wmi_mgmt_tx_work, ath12k_mgmt_over_wmi_tx_work);
|
||||
wiphy_work_init(&ar->wmi_mgmt_tx_work, ath12k_mgmt_over_wmi_tx_work);
|
||||
skb_queue_head_init(&ar->wmi_mgmt_tx_queue);
|
||||
+
|
||||
+ ar->vdev_id_11d_scan = ATH12K_11D_INVALID_VDEV_ID;
|
||||
+ init_completion(&ar->completed_11d_scan);
|
||||
}
|
||||
|
||||
int ath12k_mac_register(struct ath12k_base *ab)
|
||||
static int __ath12k_mac_mlo_setup(struct ath12k *ar)
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.h
|
||||
@@ -51,6 +51,13 @@ enum ath12k_supported_bw {
|
||||
@@ -66,6 +66,13 @@ struct ath12k_mac_get_any_chanctx_conf_a
|
||||
|
||||
extern const struct htt_rx_ring_tlv_filter ath12k_mac_mon_status_filter_default;
|
||||
|
||||
|
@ -756,9 +756,9 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+void ath12k_mac_11d_scan_stop(struct ath12k *ar);
|
||||
+void ath12k_mac_11d_scan_stop_all(struct ath12k_base *ab);
|
||||
+
|
||||
void ath12k_mac_destroy(struct ath12k_base *ab);
|
||||
void ath12k_mac_unregister(struct ath12k_base *ab);
|
||||
int ath12k_mac_register(struct ath12k_base *ab);
|
||||
void ath12k_mac_destroy(struct ath12k_hw_group *ag);
|
||||
void ath12k_mac_unregister(struct ath12k_hw_group *ag);
|
||||
int ath12k_mac_register(struct ath12k_hw_group *ag);
|
||||
--- a/drivers/net/wireless/ath/ath12k/reg.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/reg.c
|
||||
@@ -48,6 +48,7 @@ ath12k_reg_notifier(struct wiphy *wiphy,
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
From 24f587572acf7509127dbdfcbf1b681ef84eeba0 Mon Sep 17 00:00:00 2001
|
||||
From: Aaradhana Sahu <quic_aarasahu@quicinc.com>
|
||||
Date: Thu, 16 Jan 2025 08:58:35 +0530
|
||||
Subject: [PATCH] wifi: ath12k: Fetch regdb.bin file from board-2.bin
|
||||
|
||||
Currently, ath12k_core_fetch_regdb() finds regdb.bin file through
|
||||
board id's but in board-2.bin file regdb.bin file is present with
|
||||
default board id because of which regdb.bin is not fetched.
|
||||
|
||||
Add support to fetch regdb.bin file from board-2.bin through
|
||||
default board id.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
|
||||
Reviewed-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
||||
Link: https://patch.msgid.link/20250116032835.118397-1-quic_aarasahu@quicinc.com
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/core.c | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/core.c
|
||||
@@ -161,7 +161,7 @@ EXPORT_SYMBOL(ath12k_core_resume);
|
||||
|
||||
static int __ath12k_core_create_board_name(struct ath12k_base *ab, char *name,
|
||||
size_t name_len, bool with_variant,
|
||||
- bool bus_type_mode)
|
||||
+ bool bus_type_mode, bool with_default)
|
||||
{
|
||||
/* strlen(',variant=') + strlen(ab->qmi.target.bdf_ext) */
|
||||
char variant[9 + ATH12K_QMI_BDF_EXT_STR_LENGTH] = { 0 };
|
||||
@@ -192,7 +192,9 @@ static int __ath12k_core_create_board_na
|
||||
"bus=%s,qmi-chip-id=%d,qmi-board-id=%d%s",
|
||||
ath12k_bus_str(ab->hif.bus),
|
||||
ab->qmi.target.chip_id,
|
||||
- ab->qmi.target.board_id, variant);
|
||||
+ with_default ?
|
||||
+ ATH12K_BOARD_ID_DEFAULT : ab->qmi.target.board_id,
|
||||
+ variant);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -204,19 +206,19 @@ static int __ath12k_core_create_board_na
|
||||
static int ath12k_core_create_board_name(struct ath12k_base *ab, char *name,
|
||||
size_t name_len)
|
||||
{
|
||||
- return __ath12k_core_create_board_name(ab, name, name_len, true, false);
|
||||
+ return __ath12k_core_create_board_name(ab, name, name_len, true, false, false);
|
||||
}
|
||||
|
||||
static int ath12k_core_create_fallback_board_name(struct ath12k_base *ab, char *name,
|
||||
size_t name_len)
|
||||
{
|
||||
- return __ath12k_core_create_board_name(ab, name, name_len, false, false);
|
||||
+ return __ath12k_core_create_board_name(ab, name, name_len, false, false, true);
|
||||
}
|
||||
|
||||
static int ath12k_core_create_bus_type_board_name(struct ath12k_base *ab, char *name,
|
||||
size_t name_len)
|
||||
{
|
||||
- return __ath12k_core_create_board_name(ab, name, name_len, false, true);
|
||||
+ return __ath12k_core_create_board_name(ab, name, name_len, false, true, true);
|
||||
}
|
||||
|
||||
const struct firmware *ath12k_core_firmware_request(struct ath12k_base *ab,
|
|
@ -0,0 +1,53 @@
|
|||
From b1b01e46a3db5ad44d1e4691ba37c1e0832cd5cf Mon Sep 17 00:00:00 2001
|
||||
From: Suraj P Kizhakkethil <quic_surapk@quicinc.com>
|
||||
Date: Tue, 4 Mar 2025 15:23:14 +0530
|
||||
Subject: [PATCH 1/2] wifi: ath12k: Pass correct values of center freq1 and
|
||||
center freq2 for 160 MHz
|
||||
|
||||
Currently, for 160 MHz bandwidth, center frequency1 and
|
||||
center frequency2 are not passed correctly to the firmware.
|
||||
Set center frequency1 as the center frequency
|
||||
of the primary 80 MHz channel segment and center frequency2 as
|
||||
the center frequency of the 160 MHz channel and pass the values
|
||||
to the firmware.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Suraj P Kizhakkethil <quic_surapk@quicinc.com>
|
||||
Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
|
||||
Link: https://patch.msgid.link/20250304095315.3050325-2-quic_surapk@quicinc.com
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 16 +++++++++++++---
|
||||
1 file changed, 13 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -1000,14 +1000,24 @@ int ath12k_wmi_vdev_down(struct ath12k *
|
||||
static void ath12k_wmi_put_wmi_channel(struct ath12k_wmi_channel_params *chan,
|
||||
struct wmi_vdev_start_req_arg *arg)
|
||||
{
|
||||
+ u32 center_freq1 = arg->band_center_freq1;
|
||||
+
|
||||
memset(chan, 0, sizeof(*chan));
|
||||
|
||||
chan->mhz = cpu_to_le32(arg->freq);
|
||||
- chan->band_center_freq1 = cpu_to_le32(arg->band_center_freq1);
|
||||
- if (arg->mode == MODE_11AC_VHT80_80)
|
||||
+ chan->band_center_freq1 = cpu_to_le32(center_freq1);
|
||||
+ if (arg->mode == MODE_11BE_EHT160) {
|
||||
+ if (arg->freq > center_freq1)
|
||||
+ chan->band_center_freq1 = cpu_to_le32(center_freq1 + 40);
|
||||
+ else
|
||||
+ chan->band_center_freq1 = cpu_to_le32(center_freq1 - 40);
|
||||
+
|
||||
+ chan->band_center_freq2 = cpu_to_le32(center_freq1);
|
||||
+ } else if (arg->mode == MODE_11BE_EHT80_80) {
|
||||
chan->band_center_freq2 = cpu_to_le32(arg->band_center_freq2);
|
||||
- else
|
||||
+ } else {
|
||||
chan->band_center_freq2 = 0;
|
||||
+ }
|
||||
|
||||
chan->info |= le32_encode_bits(arg->mode, WMI_CHAN_INFO_MODE);
|
||||
if (arg->passive)
|
|
@ -0,0 +1,43 @@
|
|||
From 5e44b181bec8e2fe3826033360fc1a42bb432191 Mon Sep 17 00:00:00 2001
|
||||
From: Sriram R <quic_srirrama@quicinc.com>
|
||||
Date: Tue, 4 Mar 2025 15:23:15 +0530
|
||||
Subject: [PATCH 2/2] wifi: ath12k: Pass correct values of center freq1 and
|
||||
center freq2 for 320 MHz
|
||||
|
||||
Currently, for 320 MHz bandwidth, center frequency1 and
|
||||
center frequency2 are not passed correctly to the firmware.
|
||||
Set center frequency1 as the center frequency of the
|
||||
primary 160 MHz channel segment and center frequency2 as the center
|
||||
frequency of the 320 MHz channel and pass the values
|
||||
to the firmware.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
|
||||
Signed-off-by: Suraj P Kizhakkethil <quic_surapk@quicinc.com>
|
||||
Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
|
||||
Link: https://patch.msgid.link/20250304095315.3050325-3-quic_surapk@quicinc.com
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -1006,7 +1006,15 @@ static void ath12k_wmi_put_wmi_channel(s
|
||||
|
||||
chan->mhz = cpu_to_le32(arg->freq);
|
||||
chan->band_center_freq1 = cpu_to_le32(center_freq1);
|
||||
- if (arg->mode == MODE_11BE_EHT160) {
|
||||
+ if (arg->mode == MODE_11BE_EHT320) {
|
||||
+ if (arg->freq > center_freq1)
|
||||
+ chan->band_center_freq1 = cpu_to_le32(center_freq1 + 80);
|
||||
+ else
|
||||
+ chan->band_center_freq1 = cpu_to_le32(center_freq1 - 80);
|
||||
+
|
||||
+ chan->band_center_freq2 = cpu_to_le32(center_freq1);
|
||||
+
|
||||
+ } else if (arg->mode == MODE_11BE_EHT160) {
|
||||
if (arg->freq > center_freq1)
|
||||
chan->band_center_freq1 = cpu_to_le32(center_freq1 + 40);
|
||||
else
|
|
@ -1,140 +0,0 @@
|
|||
From 64a1ba4072b34af1b76bf15fca5c2075b8cc4d64 Mon Sep 17 00:00:00 2001
|
||||
From: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
|
||||
Date: Thu, 23 Jan 2025 21:51:38 +0530
|
||||
Subject: [PATCH] wifi: ath12k: fix handling of 6 GHz rules
|
||||
|
||||
In the US country code, to avoid including 6 GHz rules in the 5 GHz rules
|
||||
list, the number of 5 GHz rules is set to a default constant value of 4
|
||||
(REG_US_5G_NUM_REG_RULES). However, if there are more than 4 valid 5 GHz
|
||||
rules, the current logic will bypass the legitimate 6 GHz rules.
|
||||
|
||||
For example, if there are 5 valid 5 GHz rules and 1 valid 6 GHz rule, the
|
||||
current logic will only consider 4 of the 5 GHz rules, treating the last
|
||||
valid rule as a 6 GHz rule. Consequently, the actual 6 GHz rule is never
|
||||
processed, leading to the eventual disabling of 6 GHz channels.
|
||||
|
||||
To fix this issue, instead of hardcoding the value to 4, use a helper
|
||||
function to determine the number of 6 GHz rules present in the 5 GHz rules
|
||||
list and ignore only those rules.
|
||||
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
|
||||
Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
|
||||
Link: https://patch.msgid.link/20250123-fix_6ghz_rules_handling-v1-1-d734bfa58ff4@oss.qualcomm.com
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 61 ++++++++++++++++++++++++++---------
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 1 -
|
||||
2 files changed, 45 insertions(+), 17 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -4790,6 +4790,22 @@ static struct ath12k_reg_rule
|
||||
return reg_rule_ptr;
|
||||
}
|
||||
|
||||
+static u8 ath12k_wmi_ignore_num_extra_rules(struct ath12k_wmi_reg_rule_ext_params *rule,
|
||||
+ u32 num_reg_rules)
|
||||
+{
|
||||
+ u8 num_invalid_5ghz_rules = 0;
|
||||
+ u32 count, start_freq;
|
||||
+
|
||||
+ for (count = 0; count < num_reg_rules; count++) {
|
||||
+ start_freq = le32_get_bits(rule[count].freq_info, REG_RULE_START_FREQ);
|
||||
+
|
||||
+ if (start_freq >= ATH12K_MIN_6G_FREQ)
|
||||
+ num_invalid_5ghz_rules++;
|
||||
+ }
|
||||
+
|
||||
+ return num_invalid_5ghz_rules;
|
||||
+}
|
||||
+
|
||||
static int ath12k_pull_reg_chan_list_ext_update_ev(struct ath12k_base *ab,
|
||||
struct sk_buff *skb,
|
||||
struct ath12k_reg_info *reg_info)
|
||||
@@ -4800,6 +4816,7 @@ static int ath12k_pull_reg_chan_list_ext
|
||||
u32 num_2g_reg_rules, num_5g_reg_rules;
|
||||
u32 num_6g_reg_rules_ap[WMI_REG_CURRENT_MAX_AP_TYPE];
|
||||
u32 num_6g_reg_rules_cl[WMI_REG_CURRENT_MAX_AP_TYPE][WMI_REG_MAX_CLIENT_TYPE];
|
||||
+ u8 num_invalid_5ghz_ext_rules;
|
||||
u32 total_reg_rules = 0;
|
||||
int ret, i, j;
|
||||
|
||||
@@ -4893,20 +4910,6 @@ static int ath12k_pull_reg_chan_list_ext
|
||||
|
||||
memcpy(reg_info->alpha2, &ev->alpha2, REG_ALPHA2_LEN);
|
||||
|
||||
- /* FIXME: Currently FW includes 6G reg rule also in 5G rule
|
||||
- * list for country US.
|
||||
- * Having same 6G reg rule in 5G and 6G rules list causes
|
||||
- * intersect check to be true, and same rules will be shown
|
||||
- * multiple times in iw cmd. So added hack below to avoid
|
||||
- * parsing 6G rule from 5G reg rule list, and this can be
|
||||
- * removed later, after FW updates to remove 6G reg rule
|
||||
- * from 5G rules list.
|
||||
- */
|
||||
- if (memcmp(reg_info->alpha2, "US", 2) == 0) {
|
||||
- reg_info->num_5g_reg_rules = REG_US_5G_NUM_REG_RULES;
|
||||
- num_5g_reg_rules = reg_info->num_5g_reg_rules;
|
||||
- }
|
||||
-
|
||||
reg_info->dfs_region = le32_to_cpu(ev->dfs_region);
|
||||
reg_info->phybitmap = le32_to_cpu(ev->phybitmap);
|
||||
reg_info->num_phy = le32_to_cpu(ev->num_phy);
|
||||
@@ -5009,8 +5012,29 @@ static int ath12k_pull_reg_chan_list_ext
|
||||
}
|
||||
}
|
||||
|
||||
+ ext_wmi_reg_rule += num_2g_reg_rules;
|
||||
+
|
||||
+ /* Firmware might include 6 GHz reg rule in 5 GHz rule list
|
||||
+ * for few countries along with separate 6 GHz rule.
|
||||
+ * Having same 6 GHz reg rule in 5 GHz and 6 GHz rules list
|
||||
+ * causes intersect check to be true, and same rules will be
|
||||
+ * shown multiple times in iw cmd.
|
||||
+ * Hence, avoid parsing 6 GHz rule from 5 GHz reg rule list
|
||||
+ */
|
||||
+ num_invalid_5ghz_ext_rules = ath12k_wmi_ignore_num_extra_rules(ext_wmi_reg_rule,
|
||||
+ num_5g_reg_rules);
|
||||
+
|
||||
+ if (num_invalid_5ghz_ext_rules) {
|
||||
+ ath12k_dbg(ab, ATH12K_DBG_WMI,
|
||||
+ "CC: %s 5 GHz reg rules number %d from fw, %d number of invalid 5 GHz rules",
|
||||
+ reg_info->alpha2, reg_info->num_5g_reg_rules,
|
||||
+ num_invalid_5ghz_ext_rules);
|
||||
+
|
||||
+ num_5g_reg_rules = num_5g_reg_rules - num_invalid_5ghz_ext_rules;
|
||||
+ reg_info->num_5g_reg_rules = num_5g_reg_rules;
|
||||
+ }
|
||||
+
|
||||
if (num_5g_reg_rules) {
|
||||
- ext_wmi_reg_rule += num_2g_reg_rules;
|
||||
reg_info->reg_rules_5g_ptr =
|
||||
create_ext_reg_rules_from_wmi(num_5g_reg_rules,
|
||||
ext_wmi_reg_rule);
|
||||
@@ -5022,7 +5046,12 @@ static int ath12k_pull_reg_chan_list_ext
|
||||
}
|
||||
}
|
||||
|
||||
- ext_wmi_reg_rule += num_5g_reg_rules;
|
||||
+ /* We have adjusted the number of 5 GHz reg rules above. But still those
|
||||
+ * many rules needs to be adjusted in ext_wmi_reg_rule.
|
||||
+ *
|
||||
+ * NOTE: num_invalid_5ghz_ext_rules will be 0 for rest other cases.
|
||||
+ */
|
||||
+ ext_wmi_reg_rule += (num_5g_reg_rules + num_invalid_5ghz_ext_rules);
|
||||
|
||||
for (i = 0; i < WMI_REG_CURRENT_MAX_AP_TYPE; i++) {
|
||||
reg_info->reg_rules_6g_ap_ptr[i] =
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -3965,7 +3965,6 @@ struct ath12k_wmi_eht_rate_set_params {
|
||||
#define MAX_REG_RULES 10
|
||||
#define REG_ALPHA2_LEN 2
|
||||
#define MAX_6G_REG_RULES 5
|
||||
-#define REG_US_5G_NUM_REG_RULES 4
|
||||
|
||||
struct wmi_set_current_country_arg {
|
||||
u8 alpha2[REG_ALPHA2_LEN];
|
|
@ -5,7 +5,7 @@ But have issues on BPI-Rx boards.
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/pci.c
|
||||
@@ -277,6 +277,9 @@ static void ath12k_pci_enable_ltssm(stru
|
||||
@@ -279,6 +279,9 @@ static void ath12k_pci_enable_ltssm(stru
|
||||
u32 val;
|
||||
int i;
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ Best regards,
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -2558,6 +2558,9 @@ int ath12k_wmi_send_scan_chan_list_cmd(s
|
||||
@@ -2743,6 +2743,9 @@ int ath12k_wmi_send_scan_chan_list_cmd(s
|
||||
max_chan_limit = (wmi->wmi_ab->max_msg_len[ar->pdev_idx] - len) /
|
||||
sizeof(*chan_info);
|
||||
|
||||
|
@ -142,7 +142,7 @@ Best regards,
|
|||
arg->nallchans -= num_send_chans;
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -3743,6 +3743,8 @@ struct wmi_stop_scan_cmd {
|
||||
@@ -3873,6 +3873,8 @@ struct wmi_stop_scan_cmd {
|
||||
__le32 pdev_id;
|
||||
} __packed;
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ Best regards,
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -5186,9 +5186,7 @@ static void ath12k_mac_setup_ht_vht_cap(
|
||||
@@ -6432,9 +6432,7 @@ static void ath12k_mac_setup_ht_vht_cap(
|
||||
rate_cap_rx_chainmask);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,68 +1,68 @@
|
|||
From patchwork Wed Sep 18 21:20:48 2024
|
||||
From patchwork Wed May 21 22:45:31 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 13807212
|
||||
X-Patchwork-Id: 14096118
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.com
|
||||
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com
|
||||
[205.220.168.131])
|
||||
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com
|
||||
[205.220.180.131])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A06681CA6B9
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 18 Sep 2024 21:21:13 +0000 (UTC)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D9B523506D
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:57 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=205.220.168.131
|
||||
arc=none smtp.client-ip=205.220.180.131
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1726694475; cv=none;
|
||||
b=HjUnHV2ZbMRZne/OD71kC1p0zBs+1+LVanM+3YbUfCnjvvtSry2r0Dj0HBjHnId1ltZw0ebTJaEZDcXBybkc2yiiGRlcH5s4feXisp9WApElGptz2Qn1SEtO3VDLKyE5m56eJftK/dpin6HPZGOk3hMBHkxoo966Jp4vlC9e2rY=
|
||||
t=1747867559; cv=none;
|
||||
b=QXLrpE5trQYq3qZVPuAYdZ8IfmZi7XatjLyxn+9IZXmAWvPsCpT2EOrmLKoTKXH1gxwInwHzxiiwzDveDdYBFh2FGnxhAgdJlTBf1yChfW7+YndhKTtca3rP8z+Zt8QK48/n7gpmFEWkKGmxkG1DKIkCHgAZjD///ttubaAe2gc=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1726694475; c=relaxed/simple;
|
||||
bh=lJX5iM2Ahf/ROaeR2Kk4suhcbwA47aOSPqyQsesg4A0=;
|
||||
s=arc-20240116; t=1747867559; c=relaxed/simple;
|
||||
bh=wlnSlGktw4cBYqpNPJwSPfG4fkld5ABcJ0NmmjY/jLg=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=RYEWdi9+UZKYtzHKfAF5xdIOkpdgQjBK8hE1SX/f0rJDxozjZe1jDY28C+kzN4uhSwcBSwr7pZjMLL8LELNITE6fIk/zDY5UAO/jdeUPBnTrmrckzZOwaCFIQ1nt6ssDZDfpJADBjCIuMXB7HNChH3qSMlmYTV9QTDxpBK0fQxM=
|
||||
b=A4dIxT87Fh9Y97+jvDIVTPlA5cnixK5ZcCAl5lklS0dCWBpo0QkFFiYyRUSKso7kYaT6KFazofkMt8A2z/fDgN8gVZgqEkaXDFSRjqNWCtoplSK7qYryl88snzbQvzD52CbWKkX8yu2Qmd98HFrl2kg69o1e4wzXVcNc+fehea8=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com;
|
||||
spf=pass smtp.mailfrom=quicinc.com;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b=EtpV59A6; arc=none smtp.client-ip=205.220.168.131
|
||||
header.b=gwsO0461; arc=none smtp.client-ip=205.220.180.131
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
spf=pass smtp.mailfrom=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b="EtpV59A6"
|
||||
Received: from pps.filterd (m0279862.ppops.net [127.0.0.1])
|
||||
header.b="gwsO0461"
|
||||
Received: from pps.filterd (m0279871.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
48IL3WbX003099;
|
||||
Wed, 18 Sep 2024 21:21:07 GMT
|
||||
54LIZCMW000836;
|
||||
Wed, 21 May 2025 22:45:53 GMT
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
|
||||
cc:content-transfer-encoding:content-type:date:from:in-reply-to
|
||||
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
|
||||
3ukRiLVgAcc9GoJxAaFrgsHYImZ/9ZPgSlMf75Ew/1Y=; b=EtpV59A6K8yD5o5B
|
||||
8JSYPL7TI2tnIQciUmyLNJig3DWGn3AZbFqPjgTYUgoQLHjsNWd+WRAKx13tQhSW
|
||||
peq0OW9986uI1TFVpaw0pwVXoBiStEI5MH/7ThiA5nIAI4hYBI6+iiwL7qWpboSL
|
||||
UrG9sWI35wsgcjedTtrzR2QfpeTAvlnReoac/49o5GAysu1oGDN79VAAP7tDZbO2
|
||||
trx/XdQmW/8iqtRR3Idhjcod6B6ovXKkmAZUHzhp4zRupTUsKOU84X3aTYZQLN/B
|
||||
46HuFZSlOJEB/63Co7I2K8YfQT3FikP2mkrIsDwH78Y2OekhXJWFe7dU4SsX6nh6
|
||||
sIXVxA==
|
||||
Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
jJ/9931jjDg+8neUbH09oigyzQwINmgJKgsYw6rWwPU=; b=gwsO0461NDm4hzMy
|
||||
/aP5LNjbfqB08SmlMEzcZ/MRNS7Ffjdvz9gsUyJR4DOilx71C5MvB0ZBvxEJF6pg
|
||||
qcU4QPZtOzyixWx+3vL6eh4Sdt/RN5AD/6U6TJEZCPwdJNLMD5uB2OQjP87NG9Wj
|
||||
2aEs+kb//lRXz6Gy5d7CCDW3+1KSDzgIg/cYJecPjWsMKbyCxTeFTIkkdonetQyz
|
||||
PSzkIDi3IBnca94koYTQyFTVvpUVHpC3QAq+jM9+xQJOItRbDHZjdPjLG6q1ML4W
|
||||
zYHODhd8LupxL323rnWJQxtYu5Ver7g2LgPW3npNz/JEdF2Hq9b8G0w5U8qVJVHr
|
||||
2nNuUA==
|
||||
Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41n4gd387e-1
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf6vbsd-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:07 +0000 (GMT)
|
||||
Wed, 21 May 2025 22:45:53 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
48ILL6rr020545
|
||||
by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjqLl023280
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:06 GMT
|
||||
Received: from ath12k-linux1.qualcomm.com (10.80.80.8) by
|
||||
Wed, 21 May 2025 22:45:52 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 18 Sep 2024 14:21:06 -0700
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:51 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
|
@ -71,12 +71,13 @@ CC: <linux-wireless@vger.kernel.org>,
|
|||
Muna Sinada <quic_msinada@quicinc.com>,
|
||||
"Jeff
|
||||
Johnson" <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH V8 1/9] wifi: ath12k: push HE MU-MIMO params to hardware
|
||||
Date: Wed, 18 Sep 2024 14:20:48 -0700
|
||||
Message-ID: <20240918212056.4137076-2-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.34.1
|
||||
In-Reply-To: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
References: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 1/9] wifi: ath12k: push HE MU-MIMO params to
|
||||
hardware
|
||||
Date: Wed, 21 May 2025 15:45:31 -0700
|
||||
Message-ID: <20250521224539.355985-2-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
Precedence: bulk
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
List-Id: <linux-wireless.vger.kernel.org>
|
||||
|
@ -88,17 +89,28 @@ X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
|||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-ORIG-GUID: QTgqLsl2p5OGLwWEQsGrsmA8q68U11H8
|
||||
X-Proofpoint-GUID: QTgqLsl2p5OGLwWEQsGrsmA8q68U11H8
|
||||
X-Proofpoint-GUID: Zzf2Q5y4JzSN5f1E_vlCnvLRODG4zasa
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfXyLZVeJQcQf0U
|
||||
B/O6/0+L+1nXg6SAFSC1bdc8B/eF8RxRnvbbX+YkF3RG14/UHGCF654g8ZXTq8oTCDzm3x5wmAk
|
||||
i8wAlv0otog8iYaicRd5q/x9Vynwlo0e67/iHhH1K0rxsp5yagZ6L3XLS82iLDPuXzHP7ylgo+I
|
||||
D0c1CMcLo4bGNe421uQk2jqRij3j1iAoI0gGSwcQqHRucJQSYetF+SSp/oDox9Dn2TqOagngt4V
|
||||
UxzAxO13SoH2X7RyWe5NxhfbEjOUmHjfodyJhBfIYh4s5SCx8IDUn6jSorAnl5mh1ZmAfISyZCC
|
||||
UqoQ2LDdmGl1HT3d4xvb7/ah09ru4wukKEcvP+HDrow6Xn/WsfgmRy6xdRv5vdNODiEv64XOGHa
|
||||
TxrJA2l36xRwX82xvkyUzyQ1sIeXwbvD0Wn//AQSmFVE0uMJHnCwRE1OYRGf9Dd2p/mfZfFh
|
||||
X-Authority-Analysis: v=2.4 cv=fZOty1QF c=1 sm=1 tr=0 ts=682e57a1 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=-_O-Wy8N5QNPZvNXkjkA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-ORIG-GUID: Zzf2Q5y4JzSN5f1E_vlCnvLRODG4zasa
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29
|
||||
definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
malwarescore=0 suspectscore=0
|
||||
bulkscore=0 clxscore=1015 spamscore=0 adultscore=0 lowpriorityscore=0
|
||||
mlxlogscore=999 impostorscore=0 mlxscore=0 priorityscore=1501 phishscore=0
|
||||
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000
|
||||
definitions=main-2409180140
|
||||
clxscore=1015 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 suspectscore=0
|
||||
malwarescore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999
|
||||
lowpriorityscore=0 phishscore=0 classifier=spam authscore=0 authtc=n/a
|
||||
authcc= route=outbound adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2505160000 definitions=main-2505210226
|
||||
|
||||
Currently, only the HE IE in management frames is updated with
|
||||
respect to MU-MIMO configurations, but this change is not
|
||||
|
@ -112,42 +124,50 @@ Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
|
|||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 215 +++++++++++++++++---------
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 228 +++++++++++++++++---------
|
||||
drivers/net/wireless/ath/ath12k/mac.h | 15 ++
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 28 +---
|
||||
3 files changed, 156 insertions(+), 102 deletions(-)
|
||||
3 files changed, 169 insertions(+), 102 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -2851,6 +2851,108 @@ static int ath12k_setup_peer_smps(struct
|
||||
@@ -3215,6 +3215,125 @@ static int ath12k_setup_peer_smps(struct
|
||||
ath12k_smps_map[smps]);
|
||||
}
|
||||
|
||||
+static int ath12k_mac_set_he_txbf_conf(struct ath12k_vif *arvif)
|
||||
+static int ath12k_mac_set_he_txbf_conf(struct ath12k_link_vif *arvif)
|
||||
+{
|
||||
+ struct ath12k_vif *ahvif = arvif->ahvif;
|
||||
+ struct ath12k *ar = arvif->ar;
|
||||
+ u32 param = WMI_VDEV_PARAM_SET_HEMU_MODE;
|
||||
+ u32 value = 0;
|
||||
+ int ret;
|
||||
+ struct ieee80211_bss_conf *link_conf;
|
||||
+
|
||||
+ if (!arvif->vif->bss_conf.he_support)
|
||||
+ link_conf = ath12k_mac_get_link_bss_conf(arvif);
|
||||
+ if (!link_conf) {
|
||||
+ ath12k_warn(ar->ab, "unable to access bss link conf in txbf conf\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ if (!link_conf->he_support)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (arvif->vif->bss_conf.he_su_beamformer) {
|
||||
+ if (link_conf->he_su_beamformer) {
|
||||
+ value |= u32_encode_bits(HE_SU_BFER_ENABLE, HE_MODE_SU_TX_BFER);
|
||||
+ if (arvif->vif->bss_conf.he_mu_beamformer &&
|
||||
+ arvif->vdev_type == WMI_VDEV_TYPE_AP)
|
||||
+ if (link_conf->he_mu_beamformer &&
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_AP)
|
||||
+ value |= u32_encode_bits(HE_MU_BFER_ENABLE, HE_MODE_MU_TX_BFER);
|
||||
+ }
|
||||
+
|
||||
+ if (arvif->vif->type != NL80211_IFTYPE_MESH_POINT) {
|
||||
+ if (ahvif->vif->type != NL80211_IFTYPE_MESH_POINT) {
|
||||
+ value |= u32_encode_bits(HE_DL_MUOFDMA_ENABLE, HE_MODE_DL_OFDMA) |
|
||||
+ u32_encode_bits(HE_UL_MUOFDMA_ENABLE, HE_MODE_UL_OFDMA);
|
||||
+
|
||||
+ if (arvif->vif->bss_conf.he_full_ul_mumimo)
|
||||
+ if (link_conf->he_full_ul_mumimo)
|
||||
+ value |= u32_encode_bits(HE_UL_MUMIMO_ENABLE, HE_MODE_UL_MUMIMO);
|
||||
+
|
||||
+ if (arvif->vif->bss_conf.he_su_beamformee)
|
||||
+ if (link_conf->he_su_beamformee)
|
||||
+ value |= u32_encode_bits(HE_SU_BFEE_ENABLE, HE_MODE_SU_TX_BFEE);
|
||||
+ }
|
||||
+
|
||||
|
@ -174,21 +194,30 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+}
|
||||
+
|
||||
+static int ath12k_mac_vif_recalc_sta_he_txbf(struct ath12k *ar,
|
||||
+ struct ieee80211_vif *vif,
|
||||
+ struct ath12k_link_vif *arvif,
|
||||
+ struct ieee80211_sta_he_cap *he_cap,
|
||||
+ int *hemode)
|
||||
+{
|
||||
+ struct ieee80211_vif *vif = arvif->ahvif->vif;
|
||||
+ struct ieee80211_he_cap_elem he_cap_elem = {};
|
||||
+ struct ieee80211_sta_he_cap *cap_band;
|
||||
+ struct cfg80211_chan_def def;
|
||||
+ u8 link_id = arvif->link_id;
|
||||
+ struct ieee80211_bss_conf *link_conf;
|
||||
+
|
||||
+ if (!vif->bss_conf.he_support)
|
||||
+ link_conf = ath12k_mac_get_link_bss_conf(arvif);
|
||||
+ if (!link_conf) {
|
||||
+ ath12k_warn(ar->ab, "unable to access bss link conf in recalc txbf conf\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ if (!link_conf->he_support)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (vif->type != NL80211_IFTYPE_STATION)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (WARN_ON(ath12k_mac_vif_chan(vif, &def)))
|
||||
+ if (WARN_ON(ath12k_mac_vif_link_chan(vif, link_id, &def)))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (def.chan->band == NL80211_BAND_2GHZ)
|
||||
|
@ -226,29 +255,22 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+}
|
||||
+
|
||||
static void ath12k_bss_assoc(struct ath12k *ar,
|
||||
struct ath12k_vif *arvif,
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
@@ -2858,9 +2960,11 @@ static void ath12k_bss_assoc(struct ath1
|
||||
struct ieee80211_vif *vif = arvif->vif;
|
||||
struct ath12k_wmi_vdev_up_params params = {};
|
||||
struct ath12k_wmi_peer_assoc_arg peer_arg;
|
||||
+ struct ieee80211_sta_he_cap he_cap;
|
||||
struct ieee80211_sta *ap_sta;
|
||||
@@ -3229,6 +3348,7 @@ static void ath12k_bss_assoc(struct ath1
|
||||
struct ath12k_sta *ahsta;
|
||||
struct ath12k_peer *peer;
|
||||
bool is_auth = false;
|
||||
+ u32 hemode = 0;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
@@ -2880,8 +2984,29 @@ static void ath12k_bss_assoc(struct ath1
|
||||
lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
@@ -3272,8 +3392,26 @@ static void ath12k_bss_assoc(struct ath1
|
||||
|
||||
ath12k_peer_assoc_prepare(ar, vif, ap_sta, &peer_arg, false);
|
||||
ath12k_peer_assoc_prepare(ar, arvif, arsta, peer_arg, false);
|
||||
|
||||
+ /* he_cap here is updated at assoc success for sta mode only */
|
||||
+ he_cap = ap_sta->deflink.he_cap;
|
||||
+
|
||||
+ /* ap_sta->deflink.he_cap must be protected by rcu_read_lock */
|
||||
+ ret = ath12k_mac_vif_recalc_sta_he_txbf(ar, vif, &he_cap, &hemode);
|
||||
+ /* link_sta->he_cap must be protected by rcu_read_lock */
|
||||
+ ret = ath12k_mac_vif_recalc_sta_he_txbf(ar, arvif, &link_sta->he_cap, &hemode);
|
||||
+ if (ret) {
|
||||
+ ath12k_warn(ar->ab, "failed to recalc he txbf for vdev %i on bss %pM: %d\n",
|
||||
+ arvif->vdev_id, bss_conf->bssid, ret);
|
||||
|
@ -267,10 +289,10 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+ return;
|
||||
+ }
|
||||
+
|
||||
ret = ath12k_wmi_send_peer_assoc_cmd(ar, &peer_arg);
|
||||
ret = ath12k_wmi_send_peer_assoc_cmd(ar, peer_arg);
|
||||
if (ret) {
|
||||
ath12k_warn(ar->ab, "failed to run peer assoc for %pM vdev %i: %d\n",
|
||||
@@ -3220,6 +3345,13 @@ static void ath12k_mac_bss_info_changed(
|
||||
@@ -3677,6 +3815,13 @@ static void ath12k_mac_bss_info_changed(
|
||||
ether_addr_copy(arvif->bssid, info->bssid);
|
||||
|
||||
if (changed & BSS_CHANGED_BEACON_ENABLED) {
|
||||
|
@ -283,8 +305,8 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+ }
|
||||
ath12k_control_beaconing(arvif, info);
|
||||
|
||||
if (arvif->is_up && vif->bss_conf.he_support &&
|
||||
@@ -5352,11 +5484,14 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
if (arvif->is_up && info->he_support &&
|
||||
@@ -6598,11 +6743,14 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
|
||||
he_cap_elem->mac_cap_info[1] &=
|
||||
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK;
|
||||
|
@ -302,7 +324,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
he_cap_elem->phy_cap_info[5] |= num_tx_chains - 1;
|
||||
|
||||
switch (iftype) {
|
||||
@@ -6318,71 +6453,6 @@ static int ath12k_mac_setup_vdev_create_
|
||||
@@ -7734,72 +7882,6 @@ static int ath12k_mac_setup_vdev_create_
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -341,14 +363,15 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
-}
|
||||
-
|
||||
-static int ath12k_set_he_mu_sounding_mode(struct ath12k *ar,
|
||||
- struct ath12k_vif *arvif)
|
||||
- struct ath12k_link_vif *arvif)
|
||||
-{
|
||||
- u32 param_id, param_value;
|
||||
- struct ath12k_base *ab = ar->ab;
|
||||
- struct ath12k_vif *ahvif = arvif->ahvif;
|
||||
- int ret;
|
||||
-
|
||||
- param_id = WMI_VDEV_PARAM_SET_HEMU_MODE;
|
||||
- param_value = ath12k_mac_prepare_he_mode(ar->pdev, arvif->vif->type);
|
||||
- param_value = ath12k_mac_prepare_he_mode(ar->pdev, ahvif->vif->type);
|
||||
- ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
|
||||
- param_id, param_value);
|
||||
- if (ret) {
|
||||
|
@ -371,22 +394,14 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
- return ret;
|
||||
-}
|
||||
-
|
||||
static void ath12k_mac_update_vif_offload(struct ath12k_vif *arvif)
|
||||
static void ath12k_mac_update_vif_offload(struct ath12k_link_vif *arvif)
|
||||
{
|
||||
struct ieee80211_vif *vif = arvif->vif;
|
||||
@@ -7340,7 +7410,6 @@ ath12k_mac_vdev_start_restart(struct ath
|
||||
struct ath12k_base *ab = ar->ab;
|
||||
struct wmi_vdev_start_req_arg arg = {};
|
||||
const struct cfg80211_chan_def *chandef = &ctx->def;
|
||||
- int he_support = arvif->vif->bss_conf.he_support;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
@@ -7396,14 +7465,6 @@ ath12k_mac_vdev_start_restart(struct ath
|
||||
struct ath12k_vif *ahvif = arvif->ahvif;
|
||||
@@ -8978,14 +9060,6 @@ ath12k_mac_vdev_start_restart(struct ath
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
|
||||
/* TODO: Notify if secondary 80Mhz also needs radar detection */
|
||||
- if (he_support) {
|
||||
- if (link_conf->he_support) {
|
||||
- ret = ath12k_set_he_mu_sounding_mode(ar, arvif);
|
||||
- if (ret) {
|
||||
- ath12k_warn(ar->ab, "failed to set he mode vdev %i\n",
|
||||
|
@ -399,9 +414,9 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
arg.passive |= !!(chandef->chan->flags & IEEE80211_CHAN_NO_IR);
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.h
|
||||
@@ -41,6 +41,21 @@ struct ath12k_generic_iter {
|
||||
#define ATH12K_TX_POWER_MAX_VAL 70
|
||||
#define ATH12K_TX_POWER_MIN_VAL 0
|
||||
@@ -51,6 +51,21 @@ struct ath12k_generic_iter {
|
||||
#define ATH12K_DEFAULT_SCAN_LINK IEEE80211_MLD_MAX_NUM_LINKS
|
||||
#define ATH12K_NUM_MAX_LINKS (IEEE80211_MLD_MAX_NUM_LINKS + 1)
|
||||
|
||||
+#define HECAP_PHY_SUBFMR_GET(hecap_phy) \
|
||||
+ u8_get_bits(hecap_phy[3], IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER)
|
||||
|
@ -423,7 +438,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
ATH12K_BW_40 = 1,
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -2995,31 +2995,6 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
@@ -3079,31 +3079,6 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
#define WMI_VDEV_PARAM_TXBF_SU_TX_BFER BIT(2)
|
||||
#define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3)
|
||||
|
||||
|
@ -455,7 +470,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
#define HE_MODE_SU_TX_BFEE BIT(0)
|
||||
#define HE_MODE_SU_TX_BFER BIT(1)
|
||||
#define HE_MODE_MU_TX_BFEE BIT(2)
|
||||
@@ -3031,8 +3006,11 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
@@ -3115,8 +3090,11 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
#define HE_DL_MUOFDMA_ENABLE 1
|
||||
#define HE_UL_MUOFDMA_ENABLE 1
|
||||
#define HE_DL_MUMIMO_ENABLE 1
|
||||
|
|
|
@ -1,68 +1,68 @@
|
|||
From patchwork Wed Sep 18 21:20:49 2024
|
||||
From patchwork Wed May 21 22:45:32 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 13807210
|
||||
X-Patchwork-Id: 14096119
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.com
|
||||
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com
|
||||
[205.220.168.131])
|
||||
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com
|
||||
[205.220.180.131])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B81C317967F
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 18 Sep 2024 21:21:12 +0000 (UTC)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 697B71A23AA
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:58 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=205.220.168.131
|
||||
arc=none smtp.client-ip=205.220.180.131
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1726694474; cv=none;
|
||||
b=SYN3tI9xaTiXuxK7CUAD6gXBOqoyS1qZxAGNOXDt4yS1Q6oU0YiwQonIkVrnux7/DC3bCm2JScN5vIxVzkGOkFztaIHlZMM/TRsp6GzSIbZdasVpxySumoe965kRna+5fYAmf4i3wJupfj9p6509u7j6kXzz1ZxlSStR4wLObcE=
|
||||
t=1747867560; cv=none;
|
||||
b=XceXZ7CY2+FEzM9RuC10/cGW+vmyB2cX8QWJ3ckav7jiY5NYBQe1XW2asWcHaAEmOwdUh2iRT6imeiQLYue78g4UAcBErvihTGqlYL0m+10CQMNHmQZurUQkLPeFS0WAwlA+HBgcdp+Z71PhXs/ttQD6dF/8mlPaeGqxlTUoEcM=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1726694474; c=relaxed/simple;
|
||||
bh=yQPaApb7knqLxhkxSrizMfAanw18TDUbxBPbfnhzlV0=;
|
||||
s=arc-20240116; t=1747867560; c=relaxed/simple;
|
||||
bh=mXjCwVOeMuqCjiNDATjkwHPrwNjm6Uv3d5yO5+bqbfk=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=W+Rk8/tiKUvP6A8WYQFxi97//4Yj4m/rYPXAg0YP+6K+GXDcFK2VD+yEzmymA/fsenli+7ZEJ1zH6XgzLe4+1QFctCYGnq1LPoD01a4AIF8VqJGVdgs6e1ZwCKv8AOLkZUb09QkmM8Ur4R1xFhc4oVqhlvm3NMc24NERWmxzGjI=
|
||||
b=SeDDAI+0lqXCMqhleIhxgpdPq9QuWaPI9jj0JOqYiwOIVtAsNqQv7KQ+AMvXDQTsIe0LfA2l23stlXB7sLNpKHTM9JhPsLkafU7mvBaiwTxaJR5tEi4zGQZhsrKSn/awYszamnM81hQS3r9bBgS4oe8AeFV2/lDXYPXNHCGv0+w=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com;
|
||||
spf=pass smtp.mailfrom=quicinc.com;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b=XJxqlj7h; arc=none smtp.client-ip=205.220.168.131
|
||||
header.b=DwzHO5rL; arc=none smtp.client-ip=205.220.180.131
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
spf=pass smtp.mailfrom=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b="XJxqlj7h"
|
||||
Received: from pps.filterd (m0279867.ppops.net [127.0.0.1])
|
||||
header.b="DwzHO5rL"
|
||||
Received: from pps.filterd (m0279869.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
48IHKWuA006417;
|
||||
Wed, 18 Sep 2024 21:21:08 GMT
|
||||
54LJflLg012749;
|
||||
Wed, 21 May 2025 22:45:53 GMT
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
|
||||
cc:content-transfer-encoding:content-type:date:from:in-reply-to
|
||||
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
|
||||
hcoreX5pgczyblwh1gpL6Ax4OV0yrVpAaKX7psGXczI=; b=XJxqlj7hhoW4GYMB
|
||||
+B9r7ajbqV+ZxP+/1uDt5veOBY8aQgsorBoEbZFKm+ccV0u5SQJ/fFSomLg8QYpE
|
||||
iojXUyYsGJMsXSPW+OdC0DQ2JrhDEHWFQa/6c3C0sdBE5IGgTa8YiAmYAx/A1ti1
|
||||
ruMNSyT8H/xEKkR953axz1DOGJZfp9dCtOM5Xw6nrqpeUEYBShgvQ+1LLXqrH8U4
|
||||
qUlYW2vKFKJgZUe97nwRrwOiunhTD4M2ARe6xHqZ7bL+2bW27sRTSI69vGrcEdKM
|
||||
Ied7A8KmlUAN5BBsOj5MeKAaoy0+h4iY/9W3JgDfOu+LwjuAaKzgPNrttmPehdhJ
|
||||
Q8q0JQ==
|
||||
tiHJ0bp145D1K0TKBussv+a5p9S+5sP37NuNrmk03fg=; b=DwzHO5rLl1Vp87qm
|
||||
lpxifM2nR9pLT0mgMqz/HRb/yTHCnS9oGDXzc24mnve2I/O9X/YT8q8qN+wjBlLB
|
||||
4W7snIItVpffzrSmAJupTNtzj8qbmIYeti1zUlDdVoesUaICbdiDvSeCWPUtfeaz
|
||||
tNKDOmBUTvCb+1qxxciQZhuRobmmkuRgcg8VkgCFP+OyG5o1OrUESYu3QeZ62Hle
|
||||
ODt78jw+qe8cE9e2TxGEZhy++loik0tbF8D9P3cX5L+CdB+i4TyWnFxwvNgJciIx
|
||||
RptE1lyB75UdrnAqETq0km4svwyidUuum/x0hqd6TvlDod3b7FD4tjbE7EP5iQ5V
|
||||
Dw2tXA==
|
||||
Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41n4kjk65k-1
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf9carr-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:07 +0000 (GMT)
|
||||
Wed, 21 May 2025 22:45:53 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
48ILL7IZ032342
|
||||
54LMjqtS008810
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:07 GMT
|
||||
Received: from ath12k-linux1.qualcomm.com (10.80.80.8) by
|
||||
Wed, 21 May 2025 22:45:52 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 18 Sep 2024 14:21:06 -0700
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:52 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
|
@ -71,12 +71,13 @@ CC: <linux-wireless@vger.kernel.org>,
|
|||
Muna Sinada <quic_msinada@quicinc.com>,
|
||||
"Jeff
|
||||
Johnson" <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH V8 2/9] wifi: ath12k: push EHT MU-MIMO params to hardware
|
||||
Date: Wed, 18 Sep 2024 14:20:49 -0700
|
||||
Message-ID: <20240918212056.4137076-3-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.34.1
|
||||
In-Reply-To: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
References: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 2/9] wifi: ath12k: push EHT MU-MIMO params to
|
||||
hardware
|
||||
Date: Wed, 21 May 2025 15:45:32 -0700
|
||||
Message-ID: <20250521224539.355985-3-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
Precedence: bulk
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
List-Id: <linux-wireless.vger.kernel.org>
|
||||
|
@ -88,17 +89,28 @@ X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
|||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-GUID: DiIEaDHD4453WG2b31qitb3_i0JkAM4u
|
||||
X-Proofpoint-ORIG-GUID: DiIEaDHD4453WG2b31qitb3_i0JkAM4u
|
||||
X-Proofpoint-ORIG-GUID: _eaDrXLa14UhDtRJT-hk8Y6z1fwFI6QB
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNSBTYWx0ZWRfX7QgTyyXEHZM8
|
||||
OnUvphQD/4J77Z8iHm4hJQIe6duMI5HbpiWELH5aRxqU7pFuvCjmltcmWPjwls9DzTkJnDGHMjo
|
||||
FuBarQpMaZO8eQsx97aM8WpE0dpJHROE1ZRZ3SV8VEoTHHG712fvPw+oUWaZo6WccaEbxH9x9+W
|
||||
n76tkFOOopbjRgOBmCokHCrfZmCMKcT4FLUFoiIDn0Fv8b/WKaut3Z+1hrEwcOuXCJv4X1QIOcx
|
||||
6NCnxNr8y1O1cwqXg3pBhHB+BpcLiEat6TlD9bH/5oUZHFce4W1jkZYs2J5VJnzLDeQxq8xBhP0
|
||||
Qal3bpuUPyWAMKZKH/uAEXwEZ5ZMghUioGuc78EBMJhSXa2VsT3lhmJtc/CaHDqNKFrp01I/KAh
|
||||
7UcIN/PKb8qOKrHE8/8cpuHgoBgB24X84Qo5rORKfnW4s7FbS0xkcs2ZV2TI0AIGz4eEZAOY
|
||||
X-Authority-Analysis: v=2.4 cv=GawXnRXL c=1 sm=1 tr=0 ts=682e57a1 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=uoU_VXRAPQDrZd00miQA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-GUID: _eaDrXLa14UhDtRJT-hk8Y6z1fwFI6QB
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29
|
||||
definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
bulkscore=0 adultscore=0
|
||||
suspectscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0
|
||||
phishscore=0 impostorscore=0 mlxlogscore=999 priorityscore=1501
|
||||
spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2408220000 definitions=main-2409180140
|
||||
mlxscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0
|
||||
priorityscore=1501 clxscore=1015 malwarescore=0 phishscore=0 bulkscore=0
|
||||
spamscore=0 suspectscore=0 adultscore=0 classifier=spam authscore=0
|
||||
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2505160000 definitions=main-2505210225
|
||||
|
||||
Currently, only the EHT IE in management frames is updated with
|
||||
respect to MU-MIMO configurations, but this change is not
|
||||
|
@ -113,30 +125,38 @@ Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
|
|||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 50 +++++++++++++++++++++++++++
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 21 +++++++++++
|
||||
2 files changed, 71 insertions(+)
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 58 +++++++++++++++++++++++++++
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 21 ++++++++++
|
||||
2 files changed, 79 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -2953,6 +2953,50 @@ static int ath12k_mac_vif_recalc_sta_he_
|
||||
@@ -3334,6 +3334,58 @@ static int ath12k_mac_vif_recalc_sta_he_
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int ath12k_mac_set_eht_txbf_conf(struct ath12k_vif *arvif)
|
||||
+static int ath12k_mac_set_eht_txbf_conf(struct ath12k_link_vif *arvif)
|
||||
+{
|
||||
+ u32 param = WMI_VDEV_PARAM_SET_EHT_MU_MODE;
|
||||
+ struct ath12k_vif *ahvif = arvif->ahvif;
|
||||
+ struct ath12k *ar = arvif->ar;
|
||||
+ u32 param = WMI_VDEV_PARAM_SET_EHT_MU_MODE;
|
||||
+ u32 value = 0;
|
||||
+ int ret;
|
||||
+ struct ieee80211_bss_conf *link_conf;
|
||||
+
|
||||
+ if (!arvif->vif->bss_conf.eht_support)
|
||||
+ link_conf = ath12k_mac_get_link_bss_conf(arvif);
|
||||
+ if (!link_conf) {
|
||||
+ ath12k_warn(ar->ab, "unable to access bss link conf in eht txbf conf\n");
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
+
|
||||
+ if (!link_conf->eht_support)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (arvif->vif->bss_conf.eht_su_beamformer) {
|
||||
+ if (link_conf->eht_su_beamformer) {
|
||||
+ value |= u32_encode_bits(EHT_SU_BFER_ENABLE, EHT_MODE_SU_TX_BFER);
|
||||
+ if (arvif->vif->bss_conf.eht_mu_beamformer &&
|
||||
+ arvif->vdev_type == WMI_VDEV_TYPE_AP)
|
||||
+ if (link_conf->eht_mu_beamformer &&
|
||||
+ ahvif->vdev_type == WMI_VDEV_TYPE_AP)
|
||||
+ value |= u32_encode_bits(EHT_MU_BFER_ENABLE,
|
||||
+ EHT_MODE_MU_TX_BFER) |
|
||||
+ u32_encode_bits(EHT_DL_MUOFDMA_ENABLE,
|
||||
|
@ -145,14 +165,14 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+ EHT_MODE_UL_OFDMA_MUMIMO);
|
||||
+ }
|
||||
+
|
||||
+ if (arvif->vif->type != NL80211_IFTYPE_MESH_POINT) {
|
||||
+ if (ahvif->vif->type != NL80211_IFTYPE_MESH_POINT) {
|
||||
+ value |= u32_encode_bits(EHT_DL_MUOFDMA_ENABLE, EHT_MODE_DL_OFDMA) |
|
||||
+ u32_encode_bits(EHT_UL_MUOFDMA_ENABLE, EHT_MODE_UL_OFDMA);
|
||||
+
|
||||
+ if (arvif->vif->bss_conf.eht_80mhz_full_bw_ul_mumimo)
|
||||
+ if (link_conf->eht_80mhz_full_bw_ul_mumimo)
|
||||
+ value |= u32_encode_bits(EHT_UL_MUMIMO_ENABLE, EHT_MODE_MUMIMO);
|
||||
+
|
||||
+ if (arvif->vif->bss_conf.eht_su_beamformee)
|
||||
+ if (link_conf->eht_su_beamformee)
|
||||
+ value |= u32_encode_bits(EHT_SU_BFEE_ENABLE,
|
||||
+ EHT_MODE_SU_TX_BFEE);
|
||||
+ }
|
||||
|
@ -168,9 +188,9 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+}
|
||||
+
|
||||
static void ath12k_bss_assoc(struct ath12k *ar,
|
||||
struct ath12k_vif *arvif,
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
@@ -3351,6 +3395,12 @@ static void ath12k_mac_bss_info_changed(
|
||||
@@ -3821,6 +3873,12 @@ static void ath12k_mac_bss_info_changed(
|
||||
ath12k_warn(ar->ab,
|
||||
"failed to set HE TXBF config for vdev: %d\n",
|
||||
arvif->vdev_id);
|
||||
|
@ -185,7 +205,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -1139,6 +1139,7 @@ enum wmi_tlv_vdev_param {
|
||||
@@ -1152,6 +1152,7 @@ enum wmi_tlv_vdev_param {
|
||||
WMI_VDEV_PARAM_BSS_COLOR,
|
||||
WMI_VDEV_PARAM_SET_HEMU_MODE,
|
||||
WMI_VDEV_PARAM_HEOPS_0_31 = 0x8003,
|
||||
|
@ -193,7 +213,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
};
|
||||
|
||||
enum wmi_tlv_peer_flags {
|
||||
@@ -3012,6 +3013,26 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
@@ -3096,6 +3097,26 @@ struct ath12k_wmi_rx_reorder_queue_remov
|
||||
#define HE_MU_BFER_ENABLE 1
|
||||
#define HE_SU_BFER_ENABLE 1
|
||||
|
||||
|
|
|
@ -1,68 +1,68 @@
|
|||
From patchwork Wed Sep 18 21:20:50 2024
|
||||
From patchwork Wed May 21 22:45:33 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 13807213
|
||||
X-Patchwork-Id: 14096126
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.com
|
||||
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com
|
||||
[205.220.180.131])
|
||||
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com
|
||||
[205.220.168.131])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B2B11CB312
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 18 Sep 2024 21:21:14 +0000 (UTC)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4E00239570
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:46:01 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=205.220.180.131
|
||||
arc=none smtp.client-ip=205.220.168.131
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1726694475; cv=none;
|
||||
b=uo8JC/iAnxSCZyXzNFarViwWJNwY+JldG9aDgn6LOK7yCxMusODCN3rw4mSCs0sLxHrfxFouDKWpiKeM7hGb/fzQzU2eh6bHNvzhjOqaTjAsJo7sVGj4L2QK1UPb2ZxMke35L51ztNTVhAc7IS17sn6blDZnU+1+RGRKXskHc78=
|
||||
t=1747867563; cv=none;
|
||||
b=m0NU8tyG2d1pHiYNjTYhCTeGXC0pFtHNZTKxb+dc5AEzzUCa75lxPxtYFZApv1QHaLqo3lGkZ+ADhqhj/V82GA+bUeetm3hSsnyGgjbayU3IzqeO09+VPkt9sx9hdrTMlVGEI4c5881Zho41rlVW65O/SlmqRi4J/ajQzA4tiGQ=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1726694475; c=relaxed/simple;
|
||||
bh=nhEu2OadboIpWVwShgMmYabjiVuEo2mUKJhJlcUzvgI=;
|
||||
s=arc-20240116; t=1747867563; c=relaxed/simple;
|
||||
bh=0bTV82dMwisd7nmbtolnSKswG/aTjqN0YxpAx66Oqv8=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=iPc43CIgA4O9RfgxO3cfBBvDShW3nh4Q/MVoL1JTtx8u/9t1CeFY7KstjtKiPdJ6vxx0yhZwXcwCRFfbZdfRduyybDRKPmgqN/VogzkwizBSFWBL41H02pCvee2mV3poTyZz9CnCJ5L7An5k7ARI3Eo6EwsgaAYIncO/tU2Jsao=
|
||||
b=jOkezej/N9fmvOtPNCGPpnPNtoQ+pAG4k1zAiw3xnL1iikk7VcJlbXDCrGUithxMZE2513zz/fsfDjXx0AMi4YT1ISljvGCw9B0dGQ5ECiFfoGLc+12nnsvqjiXI5zla6C1iX7bgtJjv/OYWzoY0TR5jI28CZWC/Pa9fT/X0duw=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com;
|
||||
spf=pass smtp.mailfrom=quicinc.com;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b=iXyzdRBT; arc=none smtp.client-ip=205.220.180.131
|
||||
header.b=UqUMYAcW; arc=none smtp.client-ip=205.220.168.131
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
spf=pass smtp.mailfrom=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b="iXyzdRBT"
|
||||
Received: from pps.filterd (m0279869.ppops.net [127.0.0.1])
|
||||
header.b="UqUMYAcW"
|
||||
Received: from pps.filterd (m0279866.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
48I90GrT001584;
|
||||
Wed, 18 Sep 2024 21:21:09 GMT
|
||||
54LIDlKw013406;
|
||||
Wed, 21 May 2025 22:45:53 GMT
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
|
||||
cc:content-transfer-encoding:content-type:date:from:in-reply-to
|
||||
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
|
||||
aj0umwCwR0cGrc/Vc7qz7QRYcnU4amMo6KwLL9RZRaA=; b=iXyzdRBTMie5qv2n
|
||||
KocnG3cRtZjxDUMbNTj+in3o4zrIU5RFumLb3ZmgpbCZD9jcmxkc9fcTdtwxUz8e
|
||||
LTodO1mKSkqtOufy45keXIYYJN3lxfFsZtA5bcmG+QCJZJmPaTpMaf9L9Us9e+JZ
|
||||
Ngjh4JNR3UIXn5+UvNGrRNEWeAlCrwf9Z5bWl1mQmwmkVVuH3nMu1IyPidF3tzRk
|
||||
AdQTPkPtpnoGlYwEWL/noPAYTf4OuZrqPCAj31iBfZvq2RjAdWtPx/ayYEQsNKCu
|
||||
xoBLKjb8hppxfGqn06TpV73nTxvhEDwnwBTwfgrr+xVeKvwz6Mrh8aoYBdUeFUAh
|
||||
OiuxDA==
|
||||
Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
tYXOeicncMlFjsw5kmnB5kxC/Nrj/HibF1jgO4m8lhM=; b=UqUMYAcWWQ07Z79h
|
||||
GESSroshxr6zIUBw3jr/ESGDCO554RYWZZh9PXJxjTRM3ceCrNHNpCAT+mqXXiWy
|
||||
eb+l7G0W+s1l/MStBq7B43CSdKxljZtlkC/JsHk6DQjBacQzVB8qAiq3ShbR/vn7
|
||||
ud3kzjHtYsfLvIpi+8wLTkE1in8E/CUFZ4bea866xldnrcOVEa7EuxKwKXj3sLhE
|
||||
8n3IsPUIYGLKnEFkmWFZTXTqlEOV9lVYdTxeDAUBxII8PQIKu+dlB/UWffTFTSOd
|
||||
aQDPK5N6y8x29E2fugyy2XBSEFskz50Jb60+kJhHFGTgl5cQw+NfymuC9SQJBWaE
|
||||
HFZu+w==
|
||||
Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41n4hf38cn-1
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwh5cfg1-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:08 +0000 (GMT)
|
||||
Wed, 21 May 2025 22:45:53 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
48ILL7e8005093
|
||||
by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjqn9020293
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:07 GMT
|
||||
Received: from ath12k-linux1.qualcomm.com (10.80.80.8) by
|
||||
Wed, 21 May 2025 22:45:52 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 18 Sep 2024 14:21:07 -0700
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:52 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
|
@ -71,13 +71,13 @@ CC: <linux-wireless@vger.kernel.org>,
|
|||
Muna Sinada <quic_msinada@quicinc.com>,
|
||||
"Jeff
|
||||
Johnson" <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH V8 3/9] wifi: ath12k: move HE MCS mapper to a separate
|
||||
function
|
||||
Date: Wed, 18 Sep 2024 14:20:50 -0700
|
||||
Message-ID: <20240918212056.4137076-4-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.34.1
|
||||
In-Reply-To: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
References: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 3/9] wifi: ath12k: move HE MCS mapper to a
|
||||
separate function
|
||||
Date: Wed, 21 May 2025 15:45:33 -0700
|
||||
Message-ID: <20250521224539.355985-4-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
Precedence: bulk
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
List-Id: <linux-wireless.vger.kernel.org>
|
||||
|
@ -89,17 +89,28 @@ X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
|||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-ORIG-GUID: zHmCiFNBcWNOH7v_I9cuj0l6gmfKvBVa
|
||||
X-Proofpoint-GUID: zHmCiFNBcWNOH7v_I9cuj0l6gmfKvBVa
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfX0c42ymLt+PTP
|
||||
1OuRw1LMafhFmBy7Y+zhs50WttVxoryUfqamicOcfcFB1N0ReYFgzeQ7geC/w54E8E6mzQDYeie
|
||||
WWkPGvuIyvtCjzhBcBwz1A7W/LdsI7Od6+VlXyCuAp4pbCASB7kqVnI7Neak6mvdIQIW5khVLX7
|
||||
r/364Kop8/BPQzOVUZf5snfx4TBCgWauiHZQBTJupIn1Tf8+NctUXB8H3QNfu8zJTLVrBA3rtt1
|
||||
+yjeNOHom4U/t0u5Vzxu+8XctXsWHoYytfluXbsRo7WNut0MwPSY8GCm7RQ2wDQp0CzdactGb6t
|
||||
KCMvNcpkDRjEtOdkNtf2BeVHF1yJKxuibe6qssobLjTadJRkC33xnz5E+hzF6sEZlg7JWok01h4
|
||||
OxWFUldQYnF/eQjZYTQcgLyH91h9gWkvz0YJWKGCrg0PlxqeIFS/SQvVNs7qMnsX0qrXb7NV
|
||||
X-Authority-Analysis: v=2.4 cv=XeWJzJ55 c=1 sm=1 tr=0 ts=682e57a1 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=4Pgy4kl5F6fn7-PMLAkA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-GUID: CVZHk1FyIP3eCYHbVaXVp1fjSAGIjnVJ
|
||||
X-Proofpoint-ORIG-GUID: CVZHk1FyIP3eCYHbVaXVp1fjSAGIjnVJ
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29
|
||||
definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
priorityscore=1501 mlxscore=0
|
||||
suspectscore=0 bulkscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015
|
||||
mlxlogscore=999 adultscore=0 malwarescore=0 phishscore=0 impostorscore=0
|
||||
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000
|
||||
definitions=main-2409180140
|
||||
phishscore=0 clxscore=1015 mlxlogscore=999 mlxscore=0 bulkscore=0 spamscore=0
|
||||
suspectscore=0 impostorscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0
|
||||
priorityscore=1501 classifier=spam authscore=0 authtc=n/a authcc=
|
||||
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000
|
||||
definitions=main-2505210226
|
||||
|
||||
Refactor the HE MCS mapper functionality in
|
||||
ath12k_mac_copy_he_cap() into a new function.
|
||||
|
@ -119,7 +130,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -5519,12 +5519,24 @@ static __le16 ath12k_mac_setup_he_6ghz_c
|
||||
@@ -6786,12 +6786,24 @@ static __le16 ath12k_mac_setup_he_6ghz_c
|
||||
return cpu_to_le16(bcap->he_6ghz_capa);
|
||||
}
|
||||
|
||||
|
@ -145,7 +156,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
he_cap->has_he = true;
|
||||
memcpy(he_cap_elem->mac_cap_info, band_cap->he_cap_info,
|
||||
@@ -5562,13 +5574,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
@@ -6829,13 +6841,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,68 +1,68 @@
|
|||
From patchwork Wed Sep 18 21:20:51 2024
|
||||
From patchwork Wed May 21 22:45:34 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 13807215
|
||||
X-Patchwork-Id: 14096123
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.com
|
||||
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com
|
||||
[205.220.180.131])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A88651CB32C
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 18 Sep 2024 21:21:14 +0000 (UTC)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3C04239581
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:57 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=205.220.180.131
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1726694476; cv=none;
|
||||
b=Lkqx2oSLyeGRxKcm+N4Vmg+KOuwHpt6xhgWj9SpyWNXxxWkVExVyHvPrWaP/u4OXd0YjYBJC3Dg0NJYY9WJyL0A3RP8GK++s9CiRloNaEmEjI71S/f3+0HVXu5bCmi8cyiIMFzCpAcNuZ67J7r/WxvNRbeox3iZHmXK1WFUb4Hs=
|
||||
t=1747867561; cv=none;
|
||||
b=JUfYB6YNOea3E6luldlHf63eW7OUVXEtawJXGCeH7nt9iIJpG0ODfz3v+Zl+gtQtUZ1ELh/UAhCubbThHH30w661eEN5+cQarbiqdd1cN5dnkAsmZUNSD6l//QpurFV6Wsvv4Nr2fYgyuAVHf9JDoITZKNEbIki68J7WTV+fieU=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1726694476; c=relaxed/simple;
|
||||
bh=nv4kc89H7eGC0FLgCwC70zFDhNkClMNiRf5HjDZHHuQ=;
|
||||
s=arc-20240116; t=1747867561; c=relaxed/simple;
|
||||
bh=e6/wBkUC5dKwNLeEqNLmC/3pJt4EcGfxZRx+zntD5Ek=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=B1oJWv7vHZKRChjamOFJnRzQVtL7qBs7/Ho9GojLQtHyCKtrCEOJt/lWvhkqISf48/5MaQOCdkHhCrQT/eHP9hZ1wnCdeOKXh6Wmk/QYt9yEcc0X6HT5wUxgpaA3PooH/cMlJCX0c8hyhT7XBm6vWnPwQjt/FnLTubA3uj+X8oE=
|
||||
b=bg3Y4gdyPqhSKZtqqeN+SjMvTgg+BVUsyqAvkS3YPjV+C7dPwxcByNFjDRsuBqwHuSvgolo2ISExqyfJkgT6Flp4H+hriFJHcMdI0WmDf9NrBPI+E07JvNLDvP5X59C6pSrqpjXYngUV6AvPCJL7ynVBFF80h0neCm0IRu8Ur8w=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com;
|
||||
spf=pass smtp.mailfrom=quicinc.com;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b=WweZPnje; arc=none smtp.client-ip=205.220.180.131
|
||||
header.b=LbIprPEi; arc=none smtp.client-ip=205.220.180.131
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
spf=pass smtp.mailfrom=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b="WweZPnje"
|
||||
Received: from pps.filterd (m0279872.ppops.net [127.0.0.1])
|
||||
header.b="LbIprPEi"
|
||||
Received: from pps.filterd (m0279873.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
48IACJst031540;
|
||||
Wed, 18 Sep 2024 21:21:09 GMT
|
||||
54LIdAVE024983;
|
||||
Wed, 21 May 2025 22:45:54 GMT
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
|
||||
cc:content-transfer-encoding:content-type:date:from:in-reply-to
|
||||
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
|
||||
ARu9Fu0s66NeuLm2pdCBchANS+rlgd275Q/E4KE2T1o=; b=WweZPnjehL/ZQW57
|
||||
4JHJDsl8A5hyljMaJrVPdmZwNktTurJPMpD5z0akqx2dq3bfjzx2rx5NAtMb831x
|
||||
ieysvT1ApK5V32fmb9xzG7FMIU3DH4eqr/9ApZbHFVPTglHrVoVzHJLps3I+Ts5P
|
||||
gi1dsIAdwTai7hW1FchcW/pZ2kJMq6zN7oljoFs7pc1CvzHfIJowQM8gFfslkqlL
|
||||
lvm9A9knvnUlkrEvzgpoZfZxm/91t9bQzkQDTX91wRc0oGR/9liT+z4Sdum2rLwb
|
||||
fri8rhQIw8w1ExGM1nzChPaajmDIsE86ODjDL2xBbd/DcdsVvOYl8ewJ8AX45qNs
|
||||
+LpHtg==
|
||||
Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
oR9JZ4DE7PwiZ/DcP72BpK9yTZspsBeRbWSrP3w24nY=; b=LbIprPEif55TZs6Z
|
||||
ZsvTaIhFDxESbkxn/avX548dzh51JY3wFWHowpcPEnJJdIE1oNPWkxrPo0hHkyUb
|
||||
UICPtIHoZHdMwN/uHPyglzBnBLNP82LGLHZI5eHx6jVz4INyCFm1Gmof8YNLLIo/
|
||||
pTKj4Qx3OO0jH6zSnAoKIIg39v5TWetjVZbL2qbNR+GImD0RtoefBQxRgyJWn11r
|
||||
O3ycFAW9xlW8wYJql07vue+hM3MWNtk5EPqF70c7JrrmMAYvTyOFuP0Kaf11szIB
|
||||
mF4bMyb+bb1/QA6moW7LDIoDBWEjCLINcTdGUPTnwnfBWlxZJhZoMqzU9ZuZgvsR
|
||||
1UjthA==
|
||||
Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41n4j6uagq-1
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf4vc5x-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:09 +0000 (GMT)
|
||||
Wed, 21 May 2025 22:45:54 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
48ILL8gM005103
|
||||
by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjrWL023291
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:08 GMT
|
||||
Received: from ath12k-linux1.qualcomm.com (10.80.80.8) by
|
||||
Wed, 21 May 2025 22:45:53 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 18 Sep 2024 14:21:07 -0700
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:52 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
|
@ -71,13 +71,13 @@ CC: <linux-wireless@vger.kernel.org>,
|
|||
Muna Sinada <quic_msinada@quicinc.com>,
|
||||
"Jeff
|
||||
Johnson" <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH V8 4/9] wifi: ath12k: generate rx and tx mcs maps for
|
||||
supported HE mcs
|
||||
Date: Wed, 18 Sep 2024 14:20:51 -0700
|
||||
Message-ID: <20240918212056.4137076-5-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.34.1
|
||||
In-Reply-To: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
References: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 4/9] wifi: ath12k: generate rx and tx mcs maps
|
||||
for supported HE mcs
|
||||
Date: Wed, 21 May 2025 15:45:34 -0700
|
||||
Message-ID: <20250521224539.355985-5-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
Precedence: bulk
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
List-Id: <linux-wireless.vger.kernel.org>
|
||||
|
@ -89,17 +89,28 @@ X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
|||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-ORIG-GUID: wHJ63GZpWGKZ4XSyQZiVlsARNAgr5CQM
|
||||
X-Proofpoint-GUID: wHJ63GZpWGKZ4XSyQZiVlsARNAgr5CQM
|
||||
X-Proofpoint-GUID: mYgnUwiU6CWGXCKmK4mo491eQG1yf62Y
|
||||
X-Proofpoint-ORIG-GUID: mYgnUwiU6CWGXCKmK4mo491eQG1yf62Y
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfX1nkoUF8smaXX
|
||||
IWIOVUfe7hMPdAVBJy7J1imFvumQnVaEdoZ98Hgv5FTjeK2Ebgl2R2fohvg1z4LsyCLnU8qfg96
|
||||
1OdC0+PM8u7DhRIEnk7H2EZt0UJoJRxlc7daiIvimTjbBLu53yfgzses5Gth0zLCzoih5ffW/H5
|
||||
1h2tf1ZE4W6AmHjQJc+WE0P3RhBMdl286VT/kc0ko03He0+5/QdxsynqL2e4svB4f3035pzXOEK
|
||||
dUS4nBFSZJXuBkq0d//SizRJgH9egq51A/OVPm8om04qEcOK3x9OmrrborAen5I0iuLaqAMMBXa
|
||||
nlUKQ4fpPRovjAByevo6BIIwB698Nmo72bZcFiWOocONR92lAssB6pFXJnuwOC6VQ7MJE7DKc0x
|
||||
5UnlyGSMzMAM7cQXuGFk1AK16e6Tu/rC5YA6A4ogDKajrcBGepxGFKcZ+xK4+BwuwgI4Qysv
|
||||
X-Authority-Analysis: v=2.4 cv=R7UDGcRX c=1 sm=1 tr=0 ts=682e57a2 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=WmtfbAKxhnfIJFSrnnQA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29
|
||||
definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
phishscore=0 mlxlogscore=999
|
||||
mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 clxscore=1015
|
||||
adultscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0
|
||||
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000
|
||||
definitions=main-2409180140
|
||||
phishscore=0 clxscore=1015 mlxlogscore=999 priorityscore=1501 spamscore=0
|
||||
bulkscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 mlxscore=0
|
||||
impostorscore=0 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc=
|
||||
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000
|
||||
definitions=main-2505210226
|
||||
|
||||
Generate rx and tx mcs maps in ath12k_mac_set_hemcsmap() based
|
||||
on number of supported tx/rx chains and set them in supported
|
||||
|
@ -117,7 +128,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -5519,20 +5519,40 @@ static __le16 ath12k_mac_setup_he_6ghz_c
|
||||
@@ -6786,20 +6786,40 @@ static __le16 ath12k_mac_setup_he_6ghz_c
|
||||
return cpu_to_le16(bcap->he_6ghz_capa);
|
||||
}
|
||||
|
||||
|
@ -166,7 +177,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
int iftype, u8 num_tx_chains,
|
||||
struct ieee80211_sta_he_cap *he_cap)
|
||||
{
|
||||
@@ -5574,7 +5594,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
@@ -6841,7 +6861,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -175,7 +186,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
memset(he_cap->ppe_thres, 0, sizeof(he_cap->ppe_thres));
|
||||
if (he_cap_elem->phy_cap_info[6] &
|
||||
IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT)
|
||||
@@ -5763,7 +5783,7 @@ static int ath12k_mac_copy_sband_iftype_
|
||||
@@ -7030,7 +7050,7 @@ static int ath12k_mac_copy_sband_iftype_
|
||||
|
||||
data[idx].types_mask = BIT(i);
|
||||
|
||||
|
|
|
@ -1,81 +1,81 @@
|
|||
From patchwork Wed Sep 18 21:20:52 2024
|
||||
From patchwork Wed May 21 22:45:35 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 13807211
|
||||
X-Patchwork-Id: 14096120
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.com
|
||||
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com
|
||||
[205.220.168.131])
|
||||
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com
|
||||
[205.220.180.131])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77FB41CA6AC
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 18 Sep 2024 21:21:13 +0000 (UTC)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3B9F239570
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:57 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=205.220.168.131
|
||||
arc=none smtp.client-ip=205.220.180.131
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1726694475; cv=none;
|
||||
b=RN/ddoo5Vh8RVGeYZ8k8lXTOb7bzs7wSIAQGFjyvpfc9NICOpTDXpM3ai/D/fFtXLR8mFmYa4uIMFdrWML1x/UjZtd+jJnNyL/jo4/t5+ONN0nU4brd/dW7fv/biqLA6CkFbjnw01XnInXLzGT8IIm4NvxBkMy/RVj0tC33y7os=
|
||||
t=1747867560; cv=none;
|
||||
b=GmlOnDZdpnT/77kfeg7qPbZIn+pp+Rv41/WYnHylPZroDHwpWp5rzjObHMVoVIVB8f5dpHJSWNb5ucf0EdCqAqynnnDnAHne0d3j8kMBBH6ZVQr4AnIsYhkIrbmy6o7JffEBF094XVxGwQTjyWSEPi6VY94Md6L1NnuF0J5lJXw=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1726694475; c=relaxed/simple;
|
||||
bh=bsvgv033jSAPUVmS0VlMcScTn/1aM6tw3aACOOiqxvA=;
|
||||
s=arc-20240116; t=1747867560; c=relaxed/simple;
|
||||
bh=Xdsuttpv57eTzMnRm7g3A0+frkCx/SnGj1xOjVOXHng=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=rDT2TKhzEg9vR1RSVstUP/e9Z+sWhPbag7vxjm3nmkSJBFS5bR72jSO3YnpEGSQLOgd0c+ou8ce0GQOHHZBEpr8VlMP4o6SK8T3BVg4yPiHhqLzwadektVXzAofZ0K+caSvYUjsPvDd2wH1xDyUPHgvr/DjsPh8bhO1MP80pTYk=
|
||||
b=DCZ4pyonUsAaIuBQUBu/1NYBINM2V/yqfV+6ngHC6I8x7PP5e0WLPB1zEyJgRG752GtXxlhP3WdI6a+eW/8O0I64lNeSLtCeGZQ2ljn0mAfcuMtjB3rZq3UejFTR8v3I78Chfhv8/eSjfW7gSO+sswpSCXiFykPgseD3Hhz6W/4=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com;
|
||||
spf=pass smtp.mailfrom=quicinc.com;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b=DbZeRJ9u; arc=none smtp.client-ip=205.220.168.131
|
||||
header.b=n5c8p9dB; arc=none smtp.client-ip=205.220.180.131
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
spf=pass smtp.mailfrom=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b="DbZeRJ9u"
|
||||
Received: from pps.filterd (m0279867.ppops.net [127.0.0.1])
|
||||
header.b="n5c8p9dB"
|
||||
Received: from pps.filterd (m0279869.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
48I9TNqc020283;
|
||||
Wed, 18 Sep 2024 21:21:09 GMT
|
||||
54LIhKMc027654;
|
||||
Wed, 21 May 2025 22:45:54 GMT
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
|
||||
cc:content-transfer-encoding:content-type:date:from:in-reply-to
|
||||
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
|
||||
azR+5F3oXqRD0oIXJq+q0F3HbuiVUYwPuvX5vVskhnw=; b=DbZeRJ9uo40mL5rR
|
||||
p0cASEsdLU8yr/aYeIXTSWCHBf5P73m5S26EYVv6MqTdcnmRT7flYyQWzotNV+gg
|
||||
oHJpR7L5sN+omhK+7gDPRcm5j29/U9+7rMG7I0JwrfR6KbUUNJkrg+omW45ZdRPS
|
||||
/92XJynSBDgzEGETs0AjLe+PLPW4Ucnncc+YscEVm/dtR4f5vQBYwGdCwv4IuczO
|
||||
FJrEmDh3mj7m6JtNVV+A3LT5qS7PCAbiS7qhTAkDfhH9gDZJuUTO2b6ByyO4UkWp
|
||||
afB41wIc4KUDYsTHkThkApxxp0vHfJJLGCweUi+YKYaqvQETgLhHx/UkSRdoRBII
|
||||
N708pg==
|
||||
igBIHxXxEIGErFGPWQKC8rBeF0DUPvb+tsDy6dmbEUQ=; b=n5c8p9dBo/+917ae
|
||||
iUuuRoUPhgwmxRjEorR4N5thttRSLen0XwHulOSFzfVHZvX/ZX7Xb8qa67RpJUAw
|
||||
jx3TGu38TFybZ9zCbXxa3PoR7FqIyl7TyaU+RpGmjLnDTRjq5ODiDDkcGM8aLJ6C
|
||||
pgH1JDyjAtZODpP3W+kKpoMlU/N8QCB8wVOob4E3+nH0XDeYWh0cSY4dAnFcFYsC
|
||||
dgkUoVt65T3wJptGX80bBT1muPG/3O+IiWrYoP6NVayscmgOnCqKVpuSjYrEn/02
|
||||
HlxMp7yg/I4LhlQquL2SfmAXdKThQLrOF/XiFsCW2VZETvSbXsLI0NXYRbRFUxC4
|
||||
e9SLmw==
|
||||
Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41n4kjk65m-1
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf9cars-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:09 +0000 (GMT)
|
||||
Wed, 21 May 2025 22:45:54 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
48ILL8Gi009579
|
||||
54LMjrc1023294
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:08 GMT
|
||||
Received: from ath12k-linux1.qualcomm.com (10.80.80.8) by
|
||||
Wed, 21 May 2025 22:45:53 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 18 Sep 2024 14:21:08 -0700
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:53 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
Pradeep Kumar Chitrapu
|
||||
<quic_pradeepc@quicinc.com>,
|
||||
Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH V8 5/9] wifi: ath12k: fix TX and RX MCS rate configurations in
|
||||
HE mode
|
||||
Date: Wed, 18 Sep 2024 14:20:52 -0700
|
||||
Message-ID: <20240918212056.4137076-6-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.34.1
|
||||
In-Reply-To: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
References: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 5/9] wifi: ath12k: fix TX and RX MCS rate
|
||||
configurations in HE mode
|
||||
Date: Wed, 21 May 2025 15:45:35 -0700
|
||||
Message-ID: <20250521224539.355985-6-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
Precedence: bulk
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
List-Id: <linux-wireless.vger.kernel.org>
|
||||
|
@ -87,17 +87,28 @@ X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
|||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-GUID: JNJY4yItbZ8HP8WQjm82lNqNLkxUdf1v
|
||||
X-Proofpoint-ORIG-GUID: JNJY4yItbZ8HP8WQjm82lNqNLkxUdf1v
|
||||
X-Proofpoint-ORIG-GUID: lrtwH7rWiPRFD03fbbD0IavLBLpNgTW-
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNSBTYWx0ZWRfX0HS2wunF/V5Q
|
||||
jQqxwakF2Imrc/4a4WgPSFOFxUyO27D7Yw6gnIBRodgtwOFgflHDfeJMrELW79jrSDvXvRC0nnc
|
||||
lTonRisd7/CZWExy3sM2diYhHrZ5YT1dPhFtq33ItpY8BaOhwiLxc3wn0tlWRX8B/cd+xyEHTZY
|
||||
A4nCDSw77SEdaZfmqAB81LMzQWIuTucnxkms4pM1CIIYZrgAPcBk4XN8tWVQ6JQKCpMpelTF6Hj
|
||||
/XLCY2ByRqjtwd/zSjtcCfLOyKdT+uQtAJU1XZvedwqQW5MFk2GeD7O72PfhAP1V0YcbHdiTxde
|
||||
roRpAlQg48k0Ug5EMIUPb9TYEP15vwtPDTw03C3u7eOhs6znDqvMYNAtXwbxfGeHRwjsbMgpWLG
|
||||
+weN3zziLWlwb66N0xo5nfdJRHrOVDNcSx8/Z/xvCmHBTuVr44Q7It0iW+CGbHNqXrg4h4CH
|
||||
X-Authority-Analysis: v=2.4 cv=GawXnRXL c=1 sm=1 tr=0 ts=682e57a2 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=mu3tZSmwaZwQUXtd2tAA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-GUID: lrtwH7rWiPRFD03fbbD0IavLBLpNgTW-
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29
|
||||
definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
bulkscore=0 adultscore=0
|
||||
suspectscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0
|
||||
phishscore=0 impostorscore=0 mlxlogscore=999 priorityscore=1501
|
||||
spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2408220000 definitions=main-2409180140
|
||||
mlxscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0
|
||||
priorityscore=1501 clxscore=1015 malwarescore=0 phishscore=0 bulkscore=0
|
||||
spamscore=0 suspectscore=0 adultscore=0 classifier=spam authscore=0
|
||||
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2505160000 definitions=main-2505210225
|
||||
|
||||
Currently, the TX and RX MCS rate configurations per peer are
|
||||
reversed when sent to the firmware. As a result, RX MCS rates
|
||||
|
@ -116,7 +127,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -2140,8 +2140,8 @@ int ath12k_wmi_send_peer_assoc_cmd(struc
|
||||
@@ -2266,8 +2266,8 @@ int ath12k_wmi_send_peer_assoc_cmd(struc
|
||||
he_mcs->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_HE_RATE_SET,
|
||||
sizeof(*he_mcs));
|
||||
|
||||
|
@ -129,7 +140,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -3953,7 +3953,9 @@ struct ath12k_wmi_vht_rate_set_params {
|
||||
@@ -4083,7 +4083,9 @@ struct ath12k_wmi_vht_rate_set_params {
|
||||
|
||||
struct ath12k_wmi_he_rate_set_params {
|
||||
__le32 tlv_header;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,80 +1,80 @@
|
|||
From patchwork Wed Sep 18 21:20:54 2024
|
||||
From patchwork Wed May 21 22:45:37 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 13807218
|
||||
X-Patchwork-Id: 14096121
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.com
|
||||
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com
|
||||
[205.220.168.131])
|
||||
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com
|
||||
[205.220.180.131])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7A2C15853D
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 18 Sep 2024 21:21:29 +0000 (UTC)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED55023958A
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:58 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=205.220.168.131
|
||||
arc=none smtp.client-ip=205.220.180.131
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1726694491; cv=none;
|
||||
b=IDDUnQF/Tnpw/FvWitX7ofLgG/RwY2FyN79K1j9v3STIk2mbRSVtS7kUmHv83gWDgLeingrnJyz3kE7pWhAK5Zt+U/d3HoSbyXlaWdr1m98ZLPJnOIO51q8LBaUW4uPaZbMJiRGvTbhFw+0k6FNjQse034o2zQ5vHk1qETT9XsU=
|
||||
t=1747867560; cv=none;
|
||||
b=R6R1l/0hUMYWkLzVM4w8Z2s3aU01ujlrdBV4IEYLrqQ3CzuP8xd2fnZMcdbVAFvXd/hepJKOZrFod6RG43u2TuGCQ5wM3SKIqyk0c/MlskZk+jnUnvm9WtrezJS82phw1G2mJ8NiYsKzmcJGMQtaYfl3jWA4o+BGMGyOg0Keb/M=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1726694491; c=relaxed/simple;
|
||||
bh=4Sbgjg6TXf4A547Y46Qiyw4U55YEFrIGdUXLZjEx5C0=;
|
||||
s=arc-20240116; t=1747867560; c=relaxed/simple;
|
||||
bh=HUqzq2V1sSbcLZxqxveNb5xXvMg5sfyIhSzn4mKsdms=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=Y+NDqrjfpb1iFWpY9XYrVbCXhYRTFGsK7MN6jcsgZur7Ro+ZQsyZfhkFA+t+Bb52hk2p2N7v1TAdqLDK2CiFXaWPy/JfESHATwktCnNG+8/UL3n0VIjl+qxGTWt3pS/aWzI6yQjM2FB6tKc4kMnGX//RrgXhEIrh1M4ROs3IpJ0=
|
||||
b=G9poRT2jwhhAC0htiaG4SIE8b1DuTf63uDCDCGj5WoQ4B/v/NWtaqtzBWJF4c7UuQBso4JO4X9auJyfxJ4SxUBrULdlJq7mvAs7nxFOPEBDBltLKWCZznLwuuuo690MjvUQ5mfKt/Oy+uREyur4vXsQtfSBZc0DSZUlC5R+Z2Mc=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com;
|
||||
spf=pass smtp.mailfrom=quicinc.com;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b=Kt1nBSex; arc=none smtp.client-ip=205.220.168.131
|
||||
header.b=cu63IdMd; arc=none smtp.client-ip=205.220.180.131
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
spf=pass smtp.mailfrom=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b="Kt1nBSex"
|
||||
Received: from pps.filterd (m0279866.ppops.net [127.0.0.1])
|
||||
header.b="cu63IdMd"
|
||||
Received: from pps.filterd (m0279871.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
48IJrYUI005813;
|
||||
Wed, 18 Sep 2024 21:21:27 GMT
|
||||
54LJgw7Z025025;
|
||||
Wed, 21 May 2025 22:45:56 GMT
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
|
||||
cc:content-transfer-encoding:content-type:date:from:in-reply-to
|
||||
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
|
||||
7iZtYFy4NRmF2YHXqLd4zDMUbigsFxIkBQ6OeDD3zOs=; b=Kt1nBSex9R0mUQFv
|
||||
fimFwEUDD2mzhj9KyoJnJsvbpzJOV9sBCCp3nPyxHNB66qzQUi/U904HE+wQ26S+
|
||||
Dmo2aGOzcx4GHLU8agTSdb51h1ylcD1ulUXKpEqDIEkWv7leWNteXYTqoj2aUvXQ
|
||||
MH261Yr4HRs5iWT53+FXUrPvY1eipkyG20XH2RcNT7XMMIT29hm5DRVTwU0kzAVU
|
||||
/0hrrSBcgbTJP0KA5zSfO+bFE7fyWSxrjOzt7ugW9KdHlAj5iNAeePRUUlvqSGe7
|
||||
07QprF1ixgWWpsIbUnZdd9UZLPKot8h5Vous/24QLAznqmj/FgipHLT6+Dy61eVq
|
||||
L/T40w==
|
||||
90lF32RvbNU2yyxl2mGBEewKfDvRJ7MRRLe6DgCwXFs=; b=cu63IdMdS+nJIsqy
|
||||
ktY/ZQ/qTTWf2MpubSMC9UftiwnI9Xj6K8LFE0q+NvCN2EgZKzf+OzyW9wbbRepN
|
||||
Q3ZYBAR3lFyw40J6AZgpAuPiq7Y+eqt7l8jc+/2bb2+imOzvWHwFkXSvc8nijnHX
|
||||
ZLEU29M0xloyHeJ7xLbumzRdfcCJ6357/HKp9U3mLvEfpLY97t5/H3yEJWHQmnvE
|
||||
aHkFaLM6Ru2R2+nzPDylKcY+TZsqv306oEqydWI33ANyvfDkWJqbQjtQ+geTkJxC
|
||||
syi9ZifD5zPdOjb9YWNn0V8mWUBRx6hW8ZKU/L3gWGXjkvyRHneZ4AOz83Tp9Ym4
|
||||
L34jSQ==
|
||||
Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41n4jdu9q1-1
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf6vbsf-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:27 +0000 (GMT)
|
||||
Wed, 21 May 2025 22:45:55 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
48ILL9Ux020570
|
||||
54LMjsWN022226
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:09 GMT
|
||||
Received: from ath12k-linux1.qualcomm.com (10.80.80.8) by
|
||||
Wed, 21 May 2025 22:45:54 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 18 Sep 2024 14:21:08 -0700
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:54 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
Pradeep Kumar Chitrapu
|
||||
<quic_pradeepc@quicinc.com>,
|
||||
Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH V8 7/9] wifi: ath12k: clean up 80P80 support
|
||||
Date: Wed, 18 Sep 2024 14:20:54 -0700
|
||||
Message-ID: <20240918212056.4137076-8-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.34.1
|
||||
In-Reply-To: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
References: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 7/9] wifi: ath12k: clean up 80P80 support
|
||||
Date: Wed, 21 May 2025 15:45:37 -0700
|
||||
Message-ID: <20250521224539.355985-8-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
Precedence: bulk
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
List-Id: <linux-wireless.vger.kernel.org>
|
||||
|
@ -86,17 +86,28 @@ X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
|||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-ORIG-GUID: zOl2cVhwvoAFaH70WioUIdrk_oIr5c-T
|
||||
X-Proofpoint-GUID: zOl2cVhwvoAFaH70WioUIdrk_oIr5c-T
|
||||
X-Proofpoint-GUID: xDBdjIlSrmWJZkBfMwcImhxnyTIR4551
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfX75XKL//oF16a
|
||||
YMA/60ZSduIYMzTQ+PpEhRfS8BSEJ3JAYNLLDjp3b1hmrHJmdqMnxgbya6RQ+qeAISgkr8ZWIMx
|
||||
fGx/btrlFP2SbXd0JWwSMOApD3LJewBu/ZeBWBDEWbbO00LOGnR0aFqmCeym6YSeYyakVcNd8nQ
|
||||
0JnPxxBLeXeYPpIZTFMD6TpVFyfvtCG9jpMOI27FLBdHLednVW2yrOx5b62xwy181re5iN4XOki
|
||||
1M/HJRMACpfQJImHpO9X3rRh2j79oKIKVwa3UjV8A7vD3noV/pV0SOTZP0awMYQH/Pn91nji685
|
||||
auXzHG2pai3Byw89+jYZIG2xfiqBcBwIEARvw52XSv3glk0tSvLDxNo8nyFNPsZ63g70USl1IlC
|
||||
AKhW+QOw9/zkn3oCB+3fZZ/y+F4vlu4OzN4gETU+6p3798YiFGWMvocQnI/Ig7Unex9rmOP5
|
||||
X-Authority-Analysis: v=2.4 cv=fZOty1QF c=1 sm=1 tr=0 ts=682e57a3 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=QHHbJxpVzSBZVvfXPLwA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-ORIG-GUID: xDBdjIlSrmWJZkBfMwcImhxnyTIR4551
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29
|
||||
definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
phishscore=0 impostorscore=0
|
||||
clxscore=1015 adultscore=0 mlxscore=0 suspectscore=0 malwarescore=0
|
||||
priorityscore=1501 spamscore=0 bulkscore=0 lowpriorityscore=0
|
||||
mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2408220000 definitions=main-2409180141
|
||||
clxscore=1015 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 suspectscore=0
|
||||
malwarescore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999
|
||||
lowpriorityscore=0 phishscore=0 classifier=spam authscore=0 authtc=n/a
|
||||
authcc= route=outbound adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2505160000 definitions=main-2505210226
|
||||
|
||||
Clean up unused 80P80 references as hardware does not support
|
||||
it. This is applicable to both QCN9274 and WCN7850.
|
||||
|
@ -106,14 +117,14 @@ Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
|
|||
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 51 ++++++---------------------
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 5 +--
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 48 ++++++---------------------
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 2 --
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 1 -
|
||||
3 files changed, 11 insertions(+), 46 deletions(-)
|
||||
3 files changed, 10 insertions(+), 41 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -206,7 +206,7 @@ ath12k_phymodes[NUM_NL80211_BANDS][ATH12
|
||||
@@ -207,7 +207,7 @@ ath12k_phymodes[NUM_NL80211_BANDS][ATH12
|
||||
[NL80211_CHAN_WIDTH_40] = MODE_11BE_EHT40,
|
||||
[NL80211_CHAN_WIDTH_80] = MODE_11BE_EHT80,
|
||||
[NL80211_CHAN_WIDTH_160] = MODE_11BE_EHT160,
|
||||
|
@ -122,7 +133,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
[NL80211_CHAN_WIDTH_320] = MODE_11BE_EHT320,
|
||||
},
|
||||
[NL80211_BAND_6GHZ] = {
|
||||
@@ -217,7 +217,7 @@ ath12k_phymodes[NUM_NL80211_BANDS][ATH12
|
||||
@@ -218,7 +218,7 @@ ath12k_phymodes[NUM_NL80211_BANDS][ATH12
|
||||
[NL80211_CHAN_WIDTH_40] = MODE_11BE_EHT40,
|
||||
[NL80211_CHAN_WIDTH_80] = MODE_11BE_EHT80,
|
||||
[NL80211_CHAN_WIDTH_160] = MODE_11BE_EHT160,
|
||||
|
@ -131,9 +142,9 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
[NL80211_CHAN_WIDTH_320] = MODE_11BE_EHT320,
|
||||
},
|
||||
|
||||
@@ -2390,17 +2390,6 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
@@ -2638,17 +2638,6 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
|
||||
switch (sta->deflink.bandwidth) {
|
||||
switch (link_sta->bandwidth) {
|
||||
case IEEE80211_STA_RX_BW_160:
|
||||
- if (he_cap->he_cap_elem.phy_cap_info[0] &
|
||||
- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G) {
|
||||
|
@ -149,15 +160,14 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
|
||||
arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
|
||||
|
||||
@@ -2658,16 +2647,11 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
struct ieee80211_sta *sta)
|
||||
@@ -2935,16 +2924,11 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
struct ieee80211_link_sta *link_sta)
|
||||
{
|
||||
if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) {
|
||||
- switch (sta->deflink.vht_cap.cap &
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_160) {
|
||||
- switch (link_sta->vht_cap.cap &
|
||||
- IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) {
|
||||
- case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ:
|
||||
+ if (sta->deflink.vht_cap.cap &
|
||||
+ IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ)
|
||||
+ if (link_sta->vht_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ)
|
||||
return MODE_11AC_VHT160;
|
||||
- case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ:
|
||||
- return MODE_11AC_VHT80_80;
|
||||
|
@ -166,15 +176,16 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
- return MODE_11AC_VHT160;
|
||||
- }
|
||||
+
|
||||
+ return MODE_UNKNOWN;
|
||||
+ /* not sure if this is a valid case? */
|
||||
+ return MODE_11AC_VHT160;
|
||||
}
|
||||
|
||||
if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -2689,11 +2673,8 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
if (sta->deflink.he_cap.he_cap_elem.phy_cap_info[0] &
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -2966,11 +2950,8 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
if (link_sta->he_cap.he_cap_elem.phy_cap_info[0] &
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G)
|
||||
return MODE_11AX_HE160;
|
||||
- else if (sta->deflink.he_cap.he_cap_elem.phy_cap_info[0] &
|
||||
- else if (link_sta->he_cap.he_cap_elem.phy_cap_info[0] &
|
||||
- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
|
||||
- return MODE_11AX_HE80_80;
|
||||
- /* not sure if this is a valid case? */
|
||||
|
@ -183,24 +194,24 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+ return MODE_UNKNOWN;
|
||||
}
|
||||
|
||||
if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -2721,14 +2702,7 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -2998,14 +2979,10 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G)
|
||||
return MODE_11BE_EHT160;
|
||||
|
||||
- if (sta->deflink.he_cap.he_cap_elem.phy_cap_info[0] &
|
||||
- if (link_sta->he_cap.he_cap_elem.phy_cap_info[0] &
|
||||
- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
|
||||
- return MODE_11BE_EHT80_80;
|
||||
-
|
||||
- ath12k_warn(ar->ab, "invalid EHT PHY capability info for 160 Mhz: %d\n",
|
||||
- sta->deflink.he_cap.he_cap_elem.phy_cap_info[0]);
|
||||
-
|
||||
ath12k_warn(ar->ab, "invalid EHT PHY capability info for 160 Mhz: %d\n",
|
||||
link_sta->he_cap.he_cap_elem.phy_cap_info[0]);
|
||||
|
||||
- return MODE_11BE_EHT160;
|
||||
+ return MODE_UNKNOWN;
|
||||
}
|
||||
|
||||
if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -5806,8 +5780,6 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
||||
@@ -7077,8 +7054,6 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
mcs_nss->tx_mcs_80 = cpu_to_le16(txmcs_map & 0xffff);
|
||||
mcs_nss->rx_mcs_160 = cpu_to_le16(rxmcs_map & 0xffff);
|
||||
mcs_nss->tx_mcs_160 = cpu_to_le16(txmcs_map & 0xffff);
|
||||
|
@ -209,7 +220,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
}
|
||||
|
||||
static void ath12k_mac_copy_he_cap(struct ath12k *ar,
|
||||
@@ -5829,6 +5801,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
@@ -7100,6 +7075,7 @@ static void ath12k_mac_copy_he_cap(struc
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G |
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
|
||||
|
@ -217,7 +228,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
he_cap_elem->phy_cap_info[0] &=
|
||||
~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G;
|
||||
he_cap_elem->phy_cap_info[5] &=
|
||||
@@ -8495,10 +8468,6 @@ static __le16
|
||||
@@ -10176,10 +10152,6 @@ static __le16
|
||||
ath12k_mac_get_tx_mcs_map(const struct ieee80211_sta_he_cap *he_cap)
|
||||
{
|
||||
if (he_cap->he_cap_elem.phy_cap_info[0] &
|
||||
|
@ -230,25 +241,22 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
||||
@@ -986,10 +986,7 @@ static void ath12k_wmi_put_wmi_channel(s
|
||||
@@ -1021,8 +1021,6 @@ static void ath12k_wmi_put_wmi_channel(s
|
||||
chan->band_center_freq1 = cpu_to_le32(center_freq1 - 40);
|
||||
|
||||
chan->mhz = cpu_to_le32(arg->freq);
|
||||
chan->band_center_freq1 = cpu_to_le32(arg->band_center_freq1);
|
||||
- if (arg->mode == MODE_11AC_VHT80_80)
|
||||
chan->band_center_freq2 = cpu_to_le32(center_freq1);
|
||||
- } else if (arg->mode == MODE_11BE_EHT80_80) {
|
||||
- chan->band_center_freq2 = cpu_to_le32(arg->band_center_freq2);
|
||||
- else
|
||||
- chan->band_center_freq2 = 0;
|
||||
+ chan->band_center_freq2 = 0;
|
||||
|
||||
chan->info |= le32_encode_bits(arg->mode, WMI_CHAN_INFO_MODE);
|
||||
if (arg->passive)
|
||||
} else {
|
||||
chan->band_center_freq2 = 0;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -3633,7 +3633,6 @@ struct wmi_vdev_install_key_arg {
|
||||
@@ -3726,7 +3726,6 @@ struct wmi_vdev_install_key_arg {
|
||||
#define WMI_HOST_MAX_HE_RATE_SET 3
|
||||
#define WMI_HECAP_TXRX_MCS_NSS_IDX_80 0
|
||||
#define WMI_HECAP_TXRX_MCS_NSS_IDX_160 1
|
||||
-#define WMI_HECAP_TXRX_MCS_NSS_IDX_80_80 2
|
||||
|
||||
struct wmi_rate_set_arg {
|
||||
u32 num_rates;
|
||||
#define ATH12K_WMI_MLO_MAX_PARTNER_LINKS \
|
||||
(ATH12K_WMI_MLO_MAX_LINKS + ATH12K_MAX_NUM_BRIDGE_LINKS - 1)
|
||||
|
|
|
@ -1,68 +1,68 @@
|
|||
From patchwork Wed Sep 18 21:20:55 2024
|
||||
From patchwork Wed May 21 22:45:38 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 13807216
|
||||
X-Patchwork-Id: 14096124
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.com
|
||||
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com
|
||||
[205.220.180.131])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C64DB1CB518
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 18 Sep 2024 21:21:15 +0000 (UTC)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEE9223A9AA
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:59 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=205.220.180.131
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1726694477; cv=none;
|
||||
b=aWI5JISgL9c0iB/8EAXYKF/Lb2sJoeG+v5+Va4eb/voqwiSQ4FtwPkCC00b9attXvu4dD9wEHGKPW8Uh2kb1tSTl0uNHxijRmLYK2VUWkLHsZ3Pd6VvGoTpbtmOTgsGklZHZiFd+jyWgGkHB4ZBkHSkG9JH6VR44MSIgNj8g14A=
|
||||
t=1747867561; cv=none;
|
||||
b=qWgm5H8L0Zhrc5crkCw7SBoGEQ8yf+aC0TSWOzfiTwcAddeStpjorEa3XaBl0GOhHPRaECOhMSNqu88tQ5CzCGmumBQ3QLC6mod6Tb0Y0PdeUJm3YoGKcI+F0oE3g5kCHaU9LRKKnmMZQS72kE7dO+lEBfwMIuCX/VwV066B1p8=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1726694477; c=relaxed/simple;
|
||||
bh=AYJpDHbXZ0n0NNHQi7/aGcqo7YfyoYhv+FrXZ143wMA=;
|
||||
s=arc-20240116; t=1747867561; c=relaxed/simple;
|
||||
bh=61S52HJJJauXcXkg3NpFqkwtGSPNO+bmTpNYu1v9AKM=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=jD1C2mzFvENculg9HS0v02iWUDzrWXiuU5GXTyC/0BKAJirnQkOUdVm7u0AEPiMxfkktLT3QCJLuvnKu3ZqSXWNbc2zOdUHTyW12fKdDNHib1WYYySBnfqu4EmiJKGcTE57VFlVdbklngOCDTCqHvVgP7YitGg2fWLPqBP/4yhM=
|
||||
b=gi5WIxM8SYlljyfdAVTdIK6JQ5jJHPGGfdxPkwbtEaPElRA55vurxkaaJ0RktTtDYYJEn7KLZFieBHAv5/nEcrDjL4NGvgT3wiAoGcbsd+TIF6w5J2RSmAwhAP008N5swveLHDzJ0M9TrtQj2HHndc8JPD4oGWbcEqKQqHSq8ck=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com;
|
||||
spf=pass smtp.mailfrom=quicinc.com;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b=OMqc+btb; arc=none smtp.client-ip=205.220.180.131
|
||||
header.b=lMYw009C; arc=none smtp.client-ip=205.220.180.131
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
spf=pass smtp.mailfrom=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b="OMqc+btb"
|
||||
Received: from pps.filterd (m0279872.ppops.net [127.0.0.1])
|
||||
header.b="lMYw009C"
|
||||
Received: from pps.filterd (m0279868.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
48I8sxTR020476;
|
||||
Wed, 18 Sep 2024 21:21:11 GMT
|
||||
54LJgEPE029249;
|
||||
Wed, 21 May 2025 22:45:56 GMT
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
|
||||
cc:content-transfer-encoding:content-type:date:from:in-reply-to
|
||||
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
|
||||
dFohRj9vqwjJTRRYk31/1oJCFqLLKUuQ/verxCo/cGo=; b=OMqc+btbHl9cHSxO
|
||||
NauW5WX4C34QsGL/4d03QTtCDlctfB5PRmINiP2/jGcVZk3NZWS3d2f5zjPY7+hd
|
||||
uaUDslDMQwvAj1Jay/we1qNaFIPuzj4c9BbHqvvXa0WiCgQWpBC2h2jcFLXbeVHE
|
||||
5bqH+plXU5cz1d2YbsRpCXsdUWL/+S3u6A6/qxj6UraJ1s/rkE4ndQe/AQuf96Ja
|
||||
ylYiZPdtJJXzB6rPDN1bQsSET/PNXzIkrYTaDLF9A6688WU9izJdAjRcsu8oB8o1
|
||||
U+yftDfoegI7+ZyTZ4JUnQs7zJp171L/qsF0U9RONZCIbSLN9pkTo6xp6CrHGeLQ
|
||||
0tCmwQ==
|
||||
Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
ph+yJaIkwYsZzzEsymzTjupgmHjdwFMJhbEzuPrYvfY=; b=lMYw009CSvZqDxkz
|
||||
+HCEzcZhy6QO8G2ut93TJxHdCbVLlRaMNReXGlGqx2KRNracyLRkAQsC16i+QcpJ
|
||||
aHBvIE2c0/TEtBiyv3HzBf3/89R0POT080sz81P6go3m8w9bcIE+Q2DqjdhVNqu3
|
||||
AlV8qb6pj/QUVvDbJQxO1M9eCXSO6g2BBDjgRCktOu+x2TlxhdBZ/tJP+h0AUk+j
|
||||
YsH1LhcLOZYCFTJyB6IFmHWvtGk5Ef6i6D/tXyCL7nQiDP/R1v2PcdlLlI5e5/PO
|
||||
FhKB2+RCmSyJUtyaAHHi/mVen5yqFX2K3/vL3BtprRAJINhFxQrLs6xLIQabELzj
|
||||
KCstuQ==
|
||||
Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41n4j6uagr-1
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwfb4b3x-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:10 +0000 (GMT)
|
||||
Wed, 21 May 2025 22:45:55 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
48ILL9IB009589
|
||||
by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjtX2022238
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:09 GMT
|
||||
Received: from ath12k-linux1.qualcomm.com (10.80.80.8) by
|
||||
Wed, 21 May 2025 22:45:55 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 18 Sep 2024 14:21:09 -0700
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:54 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
|
@ -71,12 +71,13 @@ CC: <linux-wireless@vger.kernel.org>,
|
|||
P Praneesh <quic_ppranees@quicinc.com>,
|
||||
"Jeff
|
||||
Johnson" <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH V8 8/9] wifi: ath12k: add support for 160 MHz bandwidth
|
||||
Date: Wed, 18 Sep 2024 14:20:55 -0700
|
||||
Message-ID: <20240918212056.4137076-9-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.34.1
|
||||
In-Reply-To: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
References: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 8/9] wifi: ath12k: add support for 160 MHz
|
||||
bandwidth
|
||||
Date: Wed, 21 May 2025 15:45:38 -0700
|
||||
Message-ID: <20250521224539.355985-9-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
Precedence: bulk
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
List-Id: <linux-wireless.vger.kernel.org>
|
||||
|
@ -88,17 +89,28 @@ X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
|||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-ORIG-GUID: wO0mnzqAAbcWYLNaoEhU3YfsdCyDJ2hk
|
||||
X-Proofpoint-GUID: wO0mnzqAAbcWYLNaoEhU3YfsdCyDJ2hk
|
||||
X-Proofpoint-ORIG-GUID: T9MbsOp4F8M93FD6ZEyfm1BTh5tEiCIl
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfX0EeEFBAyVxZV
|
||||
WX6jh2dkCn4P+eViI8Gvz/6S+yZ+Avx9/8To2mbulh5j1kDm92bEDu7iQtI17ILPnOgbUXWAjjt
|
||||
Z2LvemtbMzJe0lY0EjJNWWunihdlsXPAdOnZFjV0rOtakq8Xx4y8K45/1cGY9dQOApxDFC9HiLZ
|
||||
+FK9apopZ2DyP6haLf5HQI+6DC3wwgbEQlE+89g69hXEM8UePlFlsf0fpfIVgiWG73gfzHkrRPM
|
||||
8ByVGmKpFSXIBmvY+EZZOPuPsQHt/91pIisXw5Joxdbl6Qf2anjuC0X4LPrTgTxgXWhljS4JdXo
|
||||
djhNt09IBnNuagxN9aMx/frUhqQPNL54kp/cXbpgcLQX0XQg8SOvwyxJs+CALQUyymluDLHyH9w
|
||||
UQUznCXFrps86AX/Fpnhrl9hqR5NO0/6oR340zsS7mvryRucOqzT7vc3WPMJEhW68VMCAl5Z
|
||||
X-Proofpoint-GUID: T9MbsOp4F8M93FD6ZEyfm1BTh5tEiCIl
|
||||
X-Authority-Analysis: v=2.4 cv=dLCmmPZb c=1 sm=1 tr=0 ts=682e57a4 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=dOJm2eNAaUnF9U8lSB4A:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29
|
||||
definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
phishscore=0 mlxlogscore=999
|
||||
mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 clxscore=1015
|
||||
adultscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0
|
||||
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000
|
||||
definitions=main-2409180140
|
||||
mlxscore=0 clxscore=1015 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0
|
||||
impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0
|
||||
priorityscore=1501 classifier=spam authscore=0 authtc=n/a authcc=
|
||||
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000
|
||||
definitions=main-2505210226
|
||||
|
||||
Add support to configure maximum NSS in 160 MHz bandwidth.
|
||||
Firmware advertises support for handling NSS ratio information
|
||||
|
@ -119,18 +131,18 @@ Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
|||
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/core.h | 2 +
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 85 ++++++++++++++++++++++----
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 89 ++++++++++++++++++++++----
|
||||
drivers/net/wireless/ath/ath12k/mac.h | 2 +
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 19 +++++-
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 28 +++++++++
|
||||
5 files changed, 124 insertions(+), 12 deletions(-)
|
||||
drivers/net/wireless/ath/ath12k/wmi.c | 7 +-
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 28 ++++++++
|
||||
5 files changed, 115 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/core.h
|
||||
@@ -717,6 +717,8 @@ struct ath12k_pdev_cap {
|
||||
u32 tx_chain_mask_shift;
|
||||
u32 rx_chain_mask_shift;
|
||||
@@ -789,6 +789,8 @@ struct ath12k_pdev_cap {
|
||||
struct ath12k_band_cap band[NUM_NL80211_BANDS];
|
||||
u32 eml_cap;
|
||||
u32 mld_cap;
|
||||
+ bool nss_ratio_enabled;
|
||||
+ u8 nss_ratio_info;
|
||||
};
|
||||
|
@ -138,7 +150,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
struct mlo_timestamp {
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -2050,6 +2050,34 @@ ath12k_peer_assoc_h_vht_limit(u16 tx_mcs
|
||||
@@ -2267,6 +2267,34 @@ ath12k_peer_assoc_h_vht_limit(u16 tx_mcs
|
||||
return tx_mcs_set;
|
||||
}
|
||||
|
||||
|
@ -171,28 +183,27 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+}
|
||||
+
|
||||
static void ath12k_peer_assoc_h_vht(struct ath12k *ar,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
@@ -2065,6 +2093,7 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
struct ath12k_link_vif *arvif,
|
||||
struct ath12k_link_sta *arsta,
|
||||
@@ -2284,6 +2312,7 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
u8 max_nss, vht_mcs;
|
||||
int i, vht_nss, nss_idx;
|
||||
bool user_rate_valid = true;
|
||||
+ u32 rx_nss, tx_nss, nss_160;
|
||||
|
||||
if (WARN_ON(ath12k_mac_vif_chan(vif, &def)))
|
||||
return;
|
||||
@@ -2159,10 +2188,24 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
|
||||
@@ -2388,10 +2417,24 @@ static void ath12k_peer_assoc_h_vht(stru
|
||||
/* TODO: Check */
|
||||
arg->tx_max_mcs_nss = 0xFF;
|
||||
|
||||
- ath12k_dbg(ar->ab, ATH12K_DBG_MAC, "mac vht peer %pM max_mpdu %d flags 0x%x\n",
|
||||
- sta->addr, arg->peer_max_mpdu, arg->peer_flags);
|
||||
- arsta->addr, arg->peer_max_mpdu, arg->peer_flags);
|
||||
+ if (arg->peer_phymode == MODE_11AC_VHT160) {
|
||||
+ tx_nss = ath12k_get_nss_160mhz(ar, max_nss);
|
||||
+ rx_nss = min(arg->peer_nss, tx_nss);
|
||||
+ arg->peer_bw_rxnss_override = ATH12K_BW_NSS_MAP_ENABLE;
|
||||
|
||||
- /* TODO: rxnss_override */
|
||||
+
|
||||
+ if (!rx_nss) {
|
||||
+ ath12k_warn(ar->ab, "invalid max_nss\n");
|
||||
+ return;
|
||||
|
@ -201,28 +212,26 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+ nss_160 = u32_encode_bits(rx_nss - 1, ATH12K_PEER_RX_NSS_160MHZ);
|
||||
+ arg->peer_bw_rxnss_override |= nss_160;
|
||||
+ }
|
||||
+
|
||||
|
||||
- /* TODO: rxnss_override */
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
|
||||
+ "mac vht peer %pM max_mpdu %d flags 0x%x nss_override 0x%x\n",
|
||||
+ sta->addr, arg->peer_max_mpdu, arg->peer_flags,
|
||||
+ arsta->addr, arg->peer_max_mpdu, arg->peer_flags,
|
||||
+ arg->peer_bw_rxnss_override);
|
||||
}
|
||||
|
||||
static int ath12k_mac_get_max_he_mcs_map(u16 mcs_map, int nss)
|
||||
@@ -2251,6 +2294,7 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
@@ -2484,6 +2527,7 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
u16 he_tx_mcs = 0, v = 0;
|
||||
int he_nss, nss_idx;
|
||||
bool user_rate_valid = true;
|
||||
+ u32 rx_nss, tx_nss, nss_160;
|
||||
|
||||
if (WARN_ON(ath12k_mac_vif_chan(vif, &def)))
|
||||
if (WARN_ON(ath12k_mac_vif_link_chan(vif, link_id, &def)))
|
||||
return;
|
||||
@@ -2429,11 +2473,28 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
he_mcs_mask[i])
|
||||
max_nss = i + 1;
|
||||
}
|
||||
+ max_nss = min(max_nss, ar->num_tx_chains);
|
||||
arg->peer_nss = min(sta->deflink.rx_nss, max_nss);
|
||||
@@ -2681,9 +2725,25 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
max_nss = min(max_nss, ar->num_tx_chains);
|
||||
arg->peer_nss = min(link_sta->rx_nss, max_nss);
|
||||
|
||||
+ if (arg->peer_phymode == MODE_11AX_HE160) {
|
||||
+ tx_nss = ath12k_get_nss_160mhz(ar, max_nss);
|
||||
|
@ -240,30 +249,31 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
+
|
||||
ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
|
||||
- "mac he peer %pM nss %d mcs cnt %d\n",
|
||||
- sta->deflink.addr, arg->peer_nss, arg->peer_he_mcs_count);
|
||||
- arsta->addr, arg->peer_nss, arg->peer_he_mcs_count);
|
||||
+ "mac he peer %pM nss %d mcs cnt %d nss_override 0x%x\n",
|
||||
+ sta->deflink.addr, arg->peer_nss,
|
||||
+ arsta->addr, arg->peer_nss,
|
||||
+ arg->peer_he_mcs_count,
|
||||
+ arg->peer_bw_rxnss_override);
|
||||
}
|
||||
|
||||
static void ath12k_peer_assoc_h_he_6ghz(struct ath12k *ar,
|
||||
@@ -2965,13 +3026,13 @@ static void ath12k_peer_assoc_prepare(st
|
||||
ath12k_peer_assoc_h_basic(ar, vif, sta, arg);
|
||||
ath12k_peer_assoc_h_crypto(ar, vif, sta, arg);
|
||||
ath12k_peer_assoc_h_rates(ar, vif, sta, arg);
|
||||
+ ath12k_peer_assoc_h_phymode(ar, vif, sta, arg);
|
||||
ath12k_peer_assoc_h_ht(ar, vif, sta, arg);
|
||||
ath12k_peer_assoc_h_vht(ar, vif, sta, arg);
|
||||
ath12k_peer_assoc_h_he(ar, vif, sta, arg);
|
||||
ath12k_peer_assoc_h_he_6ghz(ar, vif, sta, arg);
|
||||
ath12k_peer_assoc_h_eht(ar, vif, sta, arg);
|
||||
ath12k_peer_assoc_h_qos(ar, vif, sta, arg);
|
||||
- ath12k_peer_assoc_h_phymode(ar, vif, sta, arg);
|
||||
ath12k_peer_assoc_h_smps(sta, arg);
|
||||
@@ -2924,10 +2984,13 @@ static enum wmi_phy_mode ath12k_mac_get_
|
||||
struct ieee80211_link_sta *link_sta)
|
||||
{
|
||||
if (link_sta->bandwidth == IEEE80211_STA_RX_BW_160) {
|
||||
- if (link_sta->vht_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ)
|
||||
+ if (link_sta->vht_cap.cap & (IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
|
||||
+ IEEE80211_VHT_CAP_EXT_NSS_BW_MASK))
|
||||
return MODE_11AC_VHT160;
|
||||
|
||||
/* TODO: amsdu_disable req? */
|
||||
@@ -5552,10 +5613,8 @@ ath12k_create_vht_cap(struct ath12k *ar,
|
||||
- /* not sure if this is a valid case? */
|
||||
+ /* Allow STA to connect even if it does not explicitly advertise 160 MHz
|
||||
+ * support
|
||||
+ */
|
||||
return MODE_11AC_VHT160;
|
||||
}
|
||||
|
||||
@@ -6826,10 +6889,8 @@ ath12k_create_vht_cap(struct ath12k *ar,
|
||||
|
||||
ath12k_set_vht_txbf_cap(ar, &vht_cap.cap);
|
||||
|
||||
|
@ -276,29 +286,29 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
rxmcs_map = 0;
|
||||
txmcs_map = 0;
|
||||
@@ -9711,7 +9770,8 @@ static int ath12k_mac_setup_iface_combin
|
||||
combinations[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
|
||||
BIT(NL80211_CHAN_WIDTH_20) |
|
||||
BIT(NL80211_CHAN_WIDTH_40) |
|
||||
- BIT(NL80211_CHAN_WIDTH_80);
|
||||
+ BIT(NL80211_CHAN_WIDTH_80) |
|
||||
+ BIT(NL80211_CHAN_WIDTH_160);
|
||||
@@ -11437,7 +11498,8 @@ ath12k_mac_setup_radio_iface_comb(struct
|
||||
comb[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
|
||||
BIT(NL80211_CHAN_WIDTH_20) |
|
||||
BIT(NL80211_CHAN_WIDTH_40) |
|
||||
- BIT(NL80211_CHAN_WIDTH_80);
|
||||
+ BIT(NL80211_CHAN_WIDTH_80) |
|
||||
+ BIT(NL80211_CHAN_WIDTH_160);
|
||||
|
||||
wiphy->iface_combinations = combinations;
|
||||
wiphy->n_iface_combinations = 1;
|
||||
@@ -9927,6 +9987,9 @@ static int ath12k_mac_hw_register(struct
|
||||
return 0;
|
||||
}
|
||||
@@ -11811,6 +11873,9 @@ static int ath12k_mac_hw_register(struct
|
||||
ieee80211_hw_set(hw, SUPPORTS_TX_FRAG);
|
||||
ieee80211_hw_set(hw, REPORTS_LOW_ACK);
|
||||
|
||||
+ if (cap->nss_ratio_enabled)
|
||||
+ ieee80211_hw_set(hw, SUPPORTS_VHT_EXT_NSS_BW);
|
||||
+
|
||||
if ((ht_cap & WMI_HT_CAP_ENABLED) || ar->supports_6ghz) {
|
||||
if ((ht_cap & WMI_HT_CAP_ENABLED) || is_6ghz) {
|
||||
ieee80211_hw_set(hw, AMPDU_AGGREGATION);
|
||||
ieee80211_hw_set(hw, TX_AMPDU_SETUP_IN_HW);
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.h
|
||||
@@ -37,6 +37,8 @@ struct ath12k_generic_iter {
|
||||
@@ -38,6 +38,8 @@ struct ath12k_generic_iter {
|
||||
#define IEEE80211_DISABLE_VHT_MCS_SUPPORT_0_11 BIT(24)
|
||||
|
||||
#define ATH12K_CHAN_WIDTH_NUM 14
|
||||
|
@ -320,35 +330,19 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -982,11 +986,24 @@ int ath12k_wmi_vdev_down(struct ath12k *
|
||||
static void ath12k_wmi_put_wmi_channel(struct ath12k_wmi_channel_params *chan,
|
||||
struct wmi_vdev_start_req_arg *arg)
|
||||
{
|
||||
+ u32 center_freq1 = arg->band_center_freq1;
|
||||
+
|
||||
memset(chan, 0, sizeof(*chan));
|
||||
@@ -1014,7 +1018,8 @@ static void ath12k_wmi_put_wmi_channel(s
|
||||
|
||||
chan->mhz = cpu_to_le32(arg->freq);
|
||||
chan->band_center_freq1 = cpu_to_le32(arg->band_center_freq1);
|
||||
- chan->band_center_freq2 = 0;
|
||||
+ if (arg->mode == MODE_11AX_HE160) {
|
||||
+ if (arg->freq > center_freq1)
|
||||
+ chan->band_center_freq1 =
|
||||
+ cpu_to_le32(center_freq1 + 40);
|
||||
+ else
|
||||
+ chan->band_center_freq1 =
|
||||
+ cpu_to_le32(center_freq1 - 40);
|
||||
+
|
||||
+ chan->band_center_freq2 = cpu_to_le32(arg->band_center_freq1);
|
||||
+ } else {
|
||||
+ chan->band_center_freq2 = 0;
|
||||
+ }
|
||||
chan->band_center_freq2 = cpu_to_le32(center_freq1);
|
||||
|
||||
chan->info |= le32_encode_bits(arg->mode, WMI_CHAN_INFO_MODE);
|
||||
if (arg->passive)
|
||||
- } else if (arg->mode == MODE_11BE_EHT160) {
|
||||
+ } else if (arg->mode == MODE_11BE_EHT160 ||
|
||||
+ arg->mode == MODE_11AX_HE160) {
|
||||
if (arg->freq > center_freq1)
|
||||
chan->band_center_freq1 = cpu_to_le32(center_freq1 + 40);
|
||||
else
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -2264,6 +2264,21 @@ enum wmi_direct_buffer_module {
|
||||
@@ -2290,6 +2290,21 @@ enum wmi_direct_buffer_module {
|
||||
WMI_DIRECT_BUF_MAX
|
||||
};
|
||||
|
||||
|
@ -370,7 +364,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
struct ath12k_wmi_pdev_band_arg {
|
||||
u32 pdev_id;
|
||||
u32 start_freq;
|
||||
@@ -2580,6 +2595,12 @@ struct ath12k_wmi_hw_mode_cap_params {
|
||||
@@ -2606,6 +2621,12 @@ struct ath12k_wmi_hw_mode_cap_params {
|
||||
} __packed;
|
||||
|
||||
#define WMI_MAX_HECAP_PHY_SIZE (3)
|
||||
|
@ -383,7 +377,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
/* pdev_id is present in lower 16 bits of pdev_and_hw_link_ids in
|
||||
* ath12k_wmi_mac_phy_caps_params & ath12k_wmi_caps_ext_params.
|
||||
@@ -2621,6 +2642,13 @@ struct ath12k_wmi_mac_phy_caps_params {
|
||||
@@ -2647,6 +2668,13 @@ struct ath12k_wmi_mac_phy_caps_params {
|
||||
__le32 he_cap_info_2g_ext;
|
||||
__le32 he_cap_info_5g_ext;
|
||||
__le32 he_cap_info_internal;
|
||||
|
|
|
@ -1,81 +1,81 @@
|
|||
From patchwork Wed Sep 18 21:20:56 2024
|
||||
From patchwork Wed May 21 22:45:39 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
X-Patchwork-Id: 13807214
|
||||
X-Patchwork-Id: 14096122
|
||||
X-Patchwork-Delegate: quic_jjohnson@quicinc.com
|
||||
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com
|
||||
[205.220.168.131])
|
||||
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com
|
||||
[205.220.180.131])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A44471CB32B
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 18 Sep 2024 21:21:14 +0000 (UTC)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A1E9239E85
|
||||
for <linux-wireless@vger.kernel.org>; Wed, 21 May 2025 22:45:59 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=205.220.168.131
|
||||
arc=none smtp.client-ip=205.220.180.131
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1726694476; cv=none;
|
||||
b=YnQUUZ4IfmLtgtYCtYRGhH8uRGd6VL74IRylGv6Ihb2PMO/n5UdfZlDk/m9w0OH4/sSsqULSz2lupiSTwXCPxc+73uK+OUjIEmCfPlNdrtzK2naXyiXAASPqonpnRBnyoIFwaE8zj8AHUqk5TAajedqpK9EnOaboX2XGYVbe0yI=
|
||||
t=1747867561; cv=none;
|
||||
b=YNQGoLeTsEUX0an1dYT8uFrTBxczoxLPoB0nXP+MEP3YMcemaxVf4zoi5GMSuKPLe4yeLz/R7AB090SrXrBTbY6MmwXLrUJGFBQUGwr05KQ5BnedSLyVE+PtNo01ZVjrjprsc5LC4z0vYHmQdBsqIfqP+bb+ATVkdkkKWV4Kg3A=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1726694476; c=relaxed/simple;
|
||||
bh=TAPBD6g5pYNuC8Odk6t6JkL8GvKdG9H30IPHTEgA7C0=;
|
||||
s=arc-20240116; t=1747867561; c=relaxed/simple;
|
||||
bh=WkoD1wqfpiPds2ZNAwn7TY38LnC6cJOAuobqk3tWbSk=;
|
||||
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
|
||||
MIME-Version:Content-Type;
|
||||
b=djAINL+wQRgQaGOI4fotrExnm1Yz5quwEW2I7s85hWLI3gB+HsjwPKWJypllDKm8W0FDcrsoZWFmOrfx0wJ5LIe+OtXJ4ijSG7xcJeGtgDXZ3hAA5ZBk/B+CD+g+NZ3c0mwkSKpUm5dUBPKi1+kJsPuVEwKeCmdMVj8QHSYMXPw=
|
||||
b=aAO1mDb/PrwqKRHoeS0PAxgJAvDLPWPPBkzRX0hwJbFzcXtKdtWHDE83rjGbjR1bnM7lhkAU4SwoT87sOuciveNqdywUe6+9XTB2oWM/j0Tza/ZRKKRZFeByh7ib8Aibzc4y0ACg7Oaz/QhmWmPObPjc4oKuVzaH/P8Tub0rBcI=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com;
|
||||
spf=pass smtp.mailfrom=quicinc.com;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b=i4iTJD+Z; arc=none smtp.client-ip=205.220.168.131
|
||||
header.b=o3M+Sjyr; arc=none smtp.client-ip=205.220.180.131
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dmarc=pass (p=none dis=none) header.from=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
spf=pass smtp.mailfrom=quicinc.com
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com
|
||||
header.b="i4iTJD+Z"
|
||||
Received: from pps.filterd (m0279863.ppops.net [127.0.0.1])
|
||||
header.b="o3M+Sjyr"
|
||||
Received: from pps.filterd (m0279871.ppops.net [127.0.0.1])
|
||||
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
|
||||
48I9VJ15022098;
|
||||
Wed, 18 Sep 2024 21:21:11 GMT
|
||||
54LJHZNq001758;
|
||||
Wed, 21 May 2025 22:45:56 GMT
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
|
||||
cc:content-transfer-encoding:content-type:date:from:in-reply-to
|
||||
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
|
||||
2gwv4CbPGErAHv9NWtZrCSVk7NoZpHzKz9tuTs+8dV4=; b=i4iTJD+ZMXDp8Ul8
|
||||
HTo5IL/NLwS3mnlutEaaL+juUKm+wsFdl/BeMp9CC4H/sapolIhM4Zje9t3H9K0R
|
||||
+z1OxQDEekvWrrfUlikEaUHjOEwQ4YKSPJ+1uAIrbbA3REWeW5z39IITJ3dGU05N
|
||||
hnfPQEiFcPgDbFQv0Iaf434znv8rbOow6dc+M1E6EjpGd92Mq80BpsJqP8Ee0RUr
|
||||
WO3rsws1kXzFs6ELsg/FmC3l6eG9A4z9SUxcZ7QqTaz8aPOAZS/lclN0cOJT7VgK
|
||||
7UNPGoDoJhTmHEX17W/rQR8RiV8c0hMciOuB1sfI7H/1uGkEPMjmfIsEdBjQ/9oa
|
||||
DDiHrg==
|
||||
Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
wh8AVrVaz3Wne8xUCnRodQGPYbrNE8Rm9/NepU3KoQA=; b=o3M+SjyriKBrU+dH
|
||||
+Uwb/f5RzskxDlOAgOvwNH7O5p766ueJYE/nAazyAuVI1fbDT1gkgvOM4VOLQAPP
|
||||
zg9tDUD5Mz80GzBzSnheYbeedz7RgpaN14Qr6Gz/+1yrP4wWTh2quGduIAXBFDZR
|
||||
QpWsQh2DxVOvXqoLRm64iurJNhvpq+YIAwpAxEA9Fp46SrXsFefc82nza6qgdk5P
|
||||
pUjalFWnwLLxaSHJj2EoJhFDAf99q9N5KNKW/UCNY8A2CwQXqL9KmggTLRK1OC+S
|
||||
ueHigeV9ydoGGD1W6zmEdydGv5JSaQRhjAxtJokUtrlUwn8mbpJyokm+Ie4GZV5v
|
||||
tie1qQ==
|
||||
Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com
|
||||
[129.46.96.20])
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41n4hfk92c-1
|
||||
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf6vbsg-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:11 +0000 (GMT)
|
||||
Wed, 21 May 2025 22:45:56 +0000 (GMT)
|
||||
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com
|
||||
[10.47.209.196])
|
||||
by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
48ILLA0u011397
|
||||
by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id
|
||||
54LMjtcB022245
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
|
||||
Wed, 18 Sep 2024 21:21:10 GMT
|
||||
Received: from ath12k-linux1.qualcomm.com (10.80.80.8) by
|
||||
Wed, 21 May 2025 22:45:55 GMT
|
||||
Received: from ath12k-linux2.qualcomm.com (10.80.80.8) by
|
||||
nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server
|
||||
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
|
||||
15.2.1544.9; Wed, 18 Sep 2024 14:21:09 -0700
|
||||
15.2.1544.9; Wed, 21 May 2025 15:45:54 -0700
|
||||
From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
|
||||
To: <ath12k@lists.infradead.org>
|
||||
CC: <linux-wireless@vger.kernel.org>,
|
||||
Pradeep Kumar Chitrapu
|
||||
<quic_pradeepc@quicinc.com>,
|
||||
Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Subject: [PATCH V8 9/9] wifi: ath12k: add extended NSS bandwidth support for
|
||||
160 MHz
|
||||
Date: Wed, 18 Sep 2024 14:20:56 -0700
|
||||
Message-ID: <20240918212056.4137076-10-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.34.1
|
||||
In-Reply-To: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
References: <20240918212056.4137076-1-quic_pradeepc@quicinc.com>
|
||||
Subject: [PATCH ath-next V14 9/9] wifi: ath12k: add extended NSS bandwidth
|
||||
support for 160 MHz
|
||||
Date: Wed, 21 May 2025 15:45:39 -0700
|
||||
Message-ID: <20250521224539.355985-10-quic_pradeepc@quicinc.com>
|
||||
X-Mailer: git-send-email 2.43.0
|
||||
In-Reply-To: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
References: <20250521224539.355985-1-quic_pradeepc@quicinc.com>
|
||||
Precedence: bulk
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
List-Id: <linux-wireless.vger.kernel.org>
|
||||
|
@ -87,17 +87,28 @@ X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
|
|||
X-QCInternal: smtphost
|
||||
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800
|
||||
signatures=585085
|
||||
X-Proofpoint-GUID: Mta6b5FqdCLrvsiUf1WwMHFr8SiJUh5L
|
||||
X-Proofpoint-ORIG-GUID: Mta6b5FqdCLrvsiUf1WwMHFr8SiJUh5L
|
||||
X-Proofpoint-GUID: 3XlPaBNySyE2wx5TC6p1DVWVXzadsV9U
|
||||
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIxMDIyNiBTYWx0ZWRfX4g8vKznbpwuH
|
||||
ZKoHe/eZESaXJ/nU0MF27s2mZH9kbhxkG1nYDBAxgIAR6HSB4Ir8V8BP9wvETNPaaV4xpgjbT6m
|
||||
sDGIplm3HpwbpmQYiBtQIsOrs/s1B2t7uVdhqW02FHlFu/UIBLwZc7J8sLJcsYdxHYcx7MQ3nEe
|
||||
tDoPrPTEwHw7n1CnzcfVsEUAuxuJ5iFaxBATgZF+LuAhijNvhyaoEWRUO2KUcBJaFHq/QbCYfpY
|
||||
JBXWUNl+mlZxfQe4pogCpRmvEOONRvpKgZLFdEAxf2Fx0Z7OhaIV84gi99TYTjfe1aihjorJ/cp
|
||||
cv78Jzcd3Pe3GwTFD0ZOqI30oSiaUyJS3E9XIjfDGLAVMK6FeM+KOYgnqo95ImgBH8HRshrA4LJ
|
||||
qTKv2kKP1y4zPtpf7lmI2mcl7emiLGQx+t0d7Z8upCbYseoNAGHUkFJ45HF940Za9ZkEYTRq
|
||||
X-Authority-Analysis: v=2.4 cv=fZOty1QF c=1 sm=1 tr=0 ts=682e57a4 cx=c_pps
|
||||
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
|
||||
a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=COk6AnOGAAAA:8 a=Opr4SxZhII4Vei-TI5AA:9
|
||||
a=TjNXssC_j7lpFel5tvFf:22
|
||||
X-Proofpoint-ORIG-GUID: 3XlPaBNySyE2wx5TC6p1DVWVXzadsV9U
|
||||
X-Proofpoint-Virus-Version: vendor=baseguard
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29
|
||||
definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01
|
||||
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
|
||||
definitions=2025-05-21_07,2025-05-20_03,2025-03-28_01
|
||||
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
|
||||
priorityscore=1501
|
||||
clxscore=1015 phishscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0
|
||||
impostorscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0
|
||||
bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2408220000 definitions=main-2409180140
|
||||
clxscore=1015 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 suspectscore=0
|
||||
malwarescore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999
|
||||
lowpriorityscore=0 phishscore=0 classifier=spam authscore=0 authtc=n/a
|
||||
authcc= route=outbound adjust=0 reason=mlx scancount=1
|
||||
engine=8.19.0-2505160000 definitions=main-2505210226
|
||||
|
||||
Currently rx and tx MCS map for 160 MHz under HE capabilities
|
||||
are not updating properly, when 160 MHz is configured with NSS
|
||||
|
@ -121,19 +132,19 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -2477,8 +2477,10 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
arg->peer_nss = min(sta->deflink.rx_nss, max_nss);
|
||||
@@ -2726,8 +2726,10 @@ static void ath12k_peer_assoc_h_he(struc
|
||||
arg->peer_nss = min(link_sta->rx_nss, max_nss);
|
||||
|
||||
if (arg->peer_phymode == MODE_11AX_HE160) {
|
||||
- tx_nss = ath12k_get_nss_160mhz(ar, max_nss);
|
||||
+ tx_nss = ath12k_get_nss_160mhz(ar, ar->num_tx_chains);
|
||||
rx_nss = min(arg->peer_nss, tx_nss);
|
||||
+
|
||||
+ arg->peer_nss = min(sta->deflink.rx_nss, ar->num_rx_chains);
|
||||
+ arg->peer_nss = min(link_sta->rx_nss, ar->num_rx_chains);
|
||||
arg->peer_bw_rxnss_override = ATH12K_BW_NSS_MAP_ENABLE;
|
||||
|
||||
if (!rx_nss) {
|
||||
@@ -5636,6 +5638,12 @@ ath12k_create_vht_cap(struct ath12k *ar,
|
||||
@@ -6912,6 +6914,12 @@ ath12k_create_vht_cap(struct ath12k *ar,
|
||||
vht_cap.vht_mcs.rx_mcs_map = cpu_to_le16(rxmcs_map);
|
||||
vht_cap.vht_mcs.tx_mcs_map = cpu_to_le16(txmcs_map);
|
||||
|
||||
|
@ -146,7 +157,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
return vht_cap;
|
||||
}
|
||||
|
||||
@@ -5816,11 +5824,12 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
@@ -7092,11 +7100,12 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
struct ieee80211_sta_he_cap *he_cap)
|
||||
{
|
||||
struct ieee80211_he_mcs_nss_supp *mcs_nss = &he_cap->he_mcs_nss_supp;
|
||||
|
@ -162,7 +173,7 @@ Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
|||
for (i = 0; i < 8; i++) {
|
||||
if (i < ar->num_tx_chains &&
|
||||
(ar->cfg_tx_chainmask >> cap->tx_chain_mask_shift) & BIT(i))
|
||||
@@ -5833,12 +5842,24 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
@@ -7109,12 +7118,24 @@ static void ath12k_mac_set_hemcsmap(stru
|
||||
rxmcs_map |= IEEE80211_HE_MCS_SUPPORT_0_11 << (i * 2);
|
||||
else
|
||||
rxmcs_map |= IEEE80211_HE_MCS_NOT_SUPPORTED << (i * 2);
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
From cd911185014f773f0e227cabfb760b30968c3bca Mon Sep 17 00:00:00 2001
|
||||
From: Mantas Pucka <mantas@8devices.com>
|
||||
Date: Tue, 27 May 2025 14:13:27 +0300
|
||||
Subject: [PATCH] Revert "wifi: ath12k: convert tasklet to BH workqueue for CE
|
||||
interrupts"
|
||||
|
||||
This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27.
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/ce.h | 2 +-
|
||||
drivers/net/wireless/ath/ath12k/pci.c | 14 +++++++-------
|
||||
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath12k/ce.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/ce.h
|
||||
@@ -148,7 +148,7 @@ struct ath12k_ce_pipe {
|
||||
void (*send_cb)(struct ath12k_ce_pipe *pipe);
|
||||
void (*recv_cb)(struct ath12k_base *ab, struct sk_buff *skb);
|
||||
|
||||
- struct work_struct intr_wq;
|
||||
+ struct tasklet_struct intr_tq;
|
||||
struct ath12k_ce_ring *src_ring;
|
||||
struct ath12k_ce_ring *dest_ring;
|
||||
struct ath12k_ce_ring *status_ring;
|
||||
--- a/drivers/net/wireless/ath/ath12k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/pci.c
|
||||
@@ -430,9 +430,9 @@ static void ath12k_pci_sync_ce_irqs(stru
|
||||
}
|
||||
}
|
||||
|
||||
-static void ath12k_pci_ce_workqueue(struct work_struct *work)
|
||||
+static void ath12k_pci_ce_tasklet(struct tasklet_struct *t)
|
||||
{
|
||||
- struct ath12k_ce_pipe *ce_pipe = from_work(ce_pipe, work, intr_wq);
|
||||
+ struct ath12k_ce_pipe *ce_pipe = from_tasklet(ce_pipe, t, intr_tq);
|
||||
int irq_idx = ATH12K_PCI_IRQ_CE0_OFFSET + ce_pipe->pipe_num;
|
||||
|
||||
ath12k_ce_per_engine_service(ce_pipe->ab, ce_pipe->pipe_num);
|
||||
@@ -454,7 +454,7 @@ static irqreturn_t ath12k_pci_ce_interru
|
||||
|
||||
disable_irq_nosync(ab->irq_num[irq_idx]);
|
||||
|
||||
- queue_work(system_bh_wq, &ce_pipe->intr_wq);
|
||||
+ tasklet_schedule(&ce_pipe->intr_tq);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
@@ -683,7 +683,7 @@ static int ath12k_pci_config_irq(struct
|
||||
|
||||
irq_idx = ATH12K_PCI_IRQ_CE0_OFFSET + i;
|
||||
|
||||
- INIT_WORK(&ce_pipe->intr_wq, ath12k_pci_ce_workqueue);
|
||||
+ tasklet_setup(&ce_pipe->intr_tq, ath12k_pci_ce_tasklet);
|
||||
|
||||
ret = request_irq(irq, ath12k_pci_ce_interrupt_handler,
|
||||
ab_pci->irq_flags, irq_name[irq_idx],
|
||||
@@ -970,7 +970,7 @@ static void ath12k_pci_aspm_restore(stru
|
||||
PCI_EXP_LNKCTL_ASPMC);
|
||||
}
|
||||
|
||||
-static void ath12k_pci_cancel_workqueue(struct ath12k_base *ab)
|
||||
+static void ath12k_pci_kill_tasklets(struct ath12k_base *ab)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -980,7 +980,7 @@ static void ath12k_pci_cancel_workqueue(
|
||||
if (ath12k_ce_get_attr_flags(ab, i) & CE_ATTR_DIS_INTR)
|
||||
continue;
|
||||
|
||||
- cancel_work_sync(&ce_pipe->intr_wq);
|
||||
+ tasklet_kill(&ce_pipe->intr_tq);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -988,7 +988,7 @@ static void ath12k_pci_ce_irq_disable_sy
|
||||
{
|
||||
ath12k_pci_ce_irqs_disable(ab);
|
||||
ath12k_pci_sync_ce_irqs(ab);
|
||||
- ath12k_pci_cancel_workqueue(ab);
|
||||
+ ath12k_pci_kill_tasklets(ab);
|
||||
}
|
||||
|
||||
int ath12k_pci_map_service_to_pipe(struct ath12k_base *ab, u16 service_id,
|
|
@ -180,7 +180,7 @@ Best regards,
|
|||
#include <linux/unaligned.h>
|
||||
|
||||
#include "hw.h"
|
||||
@@ -2727,19 +2727,25 @@ static void ath9k_hw_gpio_cfg_output_mux
|
||||
@@ -2718,19 +2718,25 @@ static void ath9k_hw_gpio_cfg_output_mux
|
||||
static void ath9k_hw_gpio_cfg_soc(struct ath_hw *ah, u32 gpio, bool out,
|
||||
const char *label)
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ Best regards,
|
|||
}
|
||||
|
||||
static void ath9k_hw_gpio_cfg_wmac(struct ath_hw *ah, u32 gpio, bool out,
|
||||
@@ -2801,8 +2807,10 @@ void ath9k_hw_gpio_free(struct ath_hw *a
|
||||
@@ -2792,8 +2798,10 @@ void ath9k_hw_gpio_free(struct ath_hw *a
|
||||
|
||||
WARN_ON(gpio >= ah->caps.num_gpio_pins);
|
||||
|
||||
|
@ -223,7 +223,7 @@ Best regards,
|
|||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_gpio_free);
|
||||
|
||||
@@ -2830,8 +2838,8 @@ u32 ath9k_hw_gpio_get(struct ath_hw *ah,
|
||||
@@ -2821,8 +2829,8 @@ u32 ath9k_hw_gpio_get(struct ath_hw *ah,
|
||||
val = REG_READ(ah, AR_GPIO_IN(ah)) & BIT(gpio);
|
||||
else
|
||||
val = MS_REG_READ(AR, gpio);
|
||||
|
@ -234,7 +234,7 @@ Best regards,
|
|||
} else {
|
||||
WARN_ON(1);
|
||||
}
|
||||
@@ -2854,8 +2862,8 @@ void ath9k_hw_set_gpio(struct ath_hw *ah
|
||||
@@ -2845,8 +2853,8 @@ void ath9k_hw_set_gpio(struct ath_hw *ah
|
||||
AR7010_GPIO_OUT : AR_GPIO_IN_OUT(ah);
|
||||
|
||||
REG_RMW(ah, out_addr, val << gpio, BIT(gpio));
|
||||
|
|
|
@ -8,7 +8,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411.
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -2983,7 +2983,8 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2974,7 +2974,8 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
{
|
||||
struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
|
||||
struct ieee80211_channel *channel;
|
||||
|
@ -18,7 +18,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411.
|
|||
u16 ctl = NO_CTL;
|
||||
|
||||
if (!chan)
|
||||
@@ -2995,9 +2996,14 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2986,9 +2987,14 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
channel = chan->chan;
|
||||
chan_pwr = min_t(int, channel->max_power * 2, MAX_COMBINED_POWER);
|
||||
new_pwr = min_t(int, chan_pwr, reg->power_limit);
|
||||
|
|
|
@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -3002,6 +3002,10 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2993,6 +2993,10 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
if (ant_gain > max_gain)
|
||||
ant_reduction = ant_gain - max_gain;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -48,7 +48,7 @@ int ath9k_modparam_nohwcrypt;
|
||||
@@ -47,7 +47,7 @@ int ath9k_modparam_nohwcrypt;
|
||||
module_param_named(nohwcrypt, ath9k_modparam_nohwcrypt, int, 0444);
|
||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -882,6 +882,7 @@ static const struct ieee80211_iface_limi
|
||||
@@ -836,6 +836,7 @@ static const struct ieee80211_iface_limi
|
||||
BIT(NL80211_IFTYPE_AP) },
|
||||
{ .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
BIT(NL80211_IFTYPE_P2P_GO) },
|
||||
|
|
|
@ -14,7 +14,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -963,6 +963,7 @@ static void ath9k_set_hw_capab(struct at
|
||||
@@ -917,6 +917,7 @@ static void ath9k_set_hw_capab(struct at
|
||||
ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
|
||||
ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
|
||||
ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
|
||||
|
@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||
|
||||
if (ath9k_ps_enable)
|
||||
ieee80211_hw_set(hw, SUPPORTS_PS);
|
||||
@@ -975,9 +976,6 @@ static void ath9k_set_hw_capab(struct at
|
||||
@@ -929,9 +930,6 @@ static void ath9k_set_hw_capab(struct at
|
||||
IEEE80211_RADIOTAP_MCS_HAVE_STBC;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1429,6 +1429,7 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1430,6 +1430,7 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
|
||||
ath9k_cmn_debug_base_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
|
||||
ath9k_cmn_debug_modal_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -1178,25 +1178,25 @@ static int __init ath9k_init(void)
|
||||
@@ -1132,25 +1132,25 @@ static int __init ath9k_init(void)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1430,6 +1430,7 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1431,6 +1431,7 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
ath9k_cmn_debug_base_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
|
||||
ath9k_cmn_debug_modal_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
|
||||
ath9k_cmn_debug_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
|
||||
|
@ -181,7 +181,7 @@
|
|||
hw->max_listen_interval = 1;
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -733,6 +733,7 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -691,6 +691,7 @@ static int ath9k_init_softc(u16 devid, s
|
||||
if (!ath9k_is_chanctx_enabled())
|
||||
sc->cur_chan->hw_queue_base = 0;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
struct ath_softc {
|
||||
struct ieee80211_hw *hw;
|
||||
struct device *dev;
|
||||
@@ -1034,9 +1044,8 @@ struct ath_softc {
|
||||
@@ -1036,9 +1046,8 @@ struct ath_softc {
|
||||
spinlock_t chan_lock;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
@ -181,7 +181,7 @@
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -1089,7 +1089,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -1043,7 +1043,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
/* must be initialized before ieee80211_register_hw */
|
||||
|
@ -254,7 +254,7 @@
|
|||
|
||||
static ssize_t read_file_ani(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
@@ -1390,6 +1445,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1391,6 +1446,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
ath9k_tx99_init_debug(sc);
|
||||
ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1428,6 +1428,50 @@ void ath9k_deinit_debug(struct ath_softc
|
||||
@@ -1429,6 +1429,50 @@ void ath9k_deinit_debug(struct ath_softc
|
||||
ath9k_cmn_spectral_deinit_debug(&sc->spec_priv);
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
|||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1449,6 +1493,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1450,6 +1494,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
debugfs_create_file("gpio_led", S_IWUSR,
|
||||
sc->debug.debugfs_phy, sc, &fops_gpio_led);
|
||||
#endif
|
||||
|
@ -94,7 +94,7 @@
|
|||
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1881,6 +1881,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
|
||||
@@ -1872,6 +1872,20 @@ u32 ath9k_hw_get_tsf_offset(ktime_t last
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_get_tsf_offset);
|
||||
|
||||
|
@ -115,7 +115,7 @@
|
|||
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
struct ath9k_hw_cal_data *caldata, bool fastcc)
|
||||
{
|
||||
@@ -2089,6 +2103,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -2080,6 +2094,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
ar9003_hw_disable_phy_restart(ah);
|
||||
|
||||
ath9k_hw_apply_gpio_override(ah);
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -871,7 +871,8 @@ static void ath9k_init_txpower_limits(st
|
||||
@@ -825,7 +825,8 @@ static void ath9k_init_txpower_limits(st
|
||||
if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
|
||||
ath9k_init_band_txpower(sc, NL80211_BAND_5GHZ);
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
|||
}
|
||||
|
||||
static const struct ieee80211_iface_limit if_limits[] = {
|
||||
@@ -1049,6 +1050,18 @@ static void ath9k_set_hw_capab(struct at
|
||||
@@ -1003,6 +1004,18 @@ static void ath9k_set_hw_capab(struct at
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
|||
int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -1096,6 +1109,8 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -1050,6 +1063,8 @@ int ath9k_init_device(u16 devid, struct
|
||||
|
||||
wiphy_read_of_freq_limits(hw->wiphy);
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -2114,6 +2139,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -2105,6 +2130,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
ath9k_hw_set_radar_params(ah);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
#include "common.h"
|
||||
#include "debug.h"
|
||||
@@ -1046,6 +1048,10 @@ struct ath_softc {
|
||||
@@ -1048,6 +1050,10 @@ struct ath_softc {
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
const char *led_default_trigger;
|
||||
struct list_head leds;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -29,6 +29,11 @@
|
||||
@@ -28,6 +28,11 @@
|
||||
|
||||
#include "ath9k.h"
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
|||
struct ath9k_eeprom_ctx {
|
||||
struct completion complete;
|
||||
struct ath_hw *ah;
|
||||
@@ -243,6 +248,81 @@ static unsigned int ath9k_reg_rmw(void *
|
||||
@@ -242,6 +247,81 @@ static unsigned int ath9k_reg_rmw(void *
|
||||
return val;
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@
|
|||
/**************************/
|
||||
/* Initialization */
|
||||
/**************************/
|
||||
@@ -670,6 +750,7 @@ static int ath9k_of_init(struct ath_soft
|
||||
@@ -626,6 +706,7 @@ static int ath9k_of_init(struct ath_soft
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
enum ath_bus_type bus_type = common->bus_ops->ath_bus_type;
|
||||
char eeprom_name[100];
|
||||
|
@ -102,7 +102,7 @@
|
|||
int ret;
|
||||
|
||||
if (!of_device_is_available(np))
|
||||
@@ -677,6 +758,43 @@ static int ath9k_of_init(struct ath_soft
|
||||
@@ -633,6 +714,43 @@ static int ath9k_of_init(struct ath_soft
|
||||
|
||||
ath_dbg(common, CONFIG, "parsing configuration from OF node\n");
|
||||
|
||||
|
@ -146,9 +146,9 @@
|
|||
if (of_property_read_bool(np, "qca,no-eeprom")) {
|
||||
/* ath9k-eeprom-<bus>-<id>.bin */
|
||||
scnprintf(eeprom_name, sizeof(eeprom_name),
|
||||
@@ -693,6 +811,17 @@ static int ath9k_of_init(struct ath_soft
|
||||
|
||||
of_get_mac_address(np, common->macaddr);
|
||||
@@ -651,6 +769,17 @@ static int ath9k_of_init(struct ath_soft
|
||||
if (ret == -EPROBE_DEFER)
|
||||
return ret;
|
||||
|
||||
+ np = of_get_child_by_name(np, "led");
|
||||
+ if (np && of_device_is_available(np)) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
+#include "hsr.h"
|
||||
|
||||
/* Set/change channels. If the channel is really being changed, it's done
|
||||
* by reseting the chip. To accomplish this we must first cleanup any pending
|
||||
* by resetting the chip. To accomplish this we must first cleanup any pending
|
||||
@@ -22,6 +23,7 @@
|
||||
*/
|
||||
static int ath_set_channel(struct ath_softc *sc)
|
||||
|
@ -374,7 +374,7 @@
|
|||
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -123,6 +123,7 @@ ATH9K_WOW=
|
||||
@@ -117,6 +117,7 @@ ATH9K_WOW=
|
||||
ATH9K_RFKILL=
|
||||
ATH9K_CHANNEL_CONTEXT=
|
||||
ATH9K_PCOEM=
|
||||
|
|
|
@ -1,40 +1,67 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
@@ -20,6 +20,7 @@
|
||||
@@ -16,37 +16,21 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
+#include <linux/mod_devicetable.h>
|
||||
+#include <linux/module.h>
|
||||
#include <linux/nl80211.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
+#include <linux/of_device.h>
|
||||
-#include <linux/module.h>
|
||||
-#include <linux/mod_devicetable.h>
|
||||
+
|
||||
#include "ath9k.h"
|
||||
|
||||
static const struct platform_device_id ath9k_platform_id_table[] = {
|
||||
@@ -69,21 +70,28 @@ static const struct ath_bus_ops ath_ahb_
|
||||
.eeprom_read = ath_ahb_eeprom_read,
|
||||
-static const struct platform_device_id ath9k_platform_id_table[] = {
|
||||
- {
|
||||
- .name = "ath9k",
|
||||
- .driver_data = AR5416_AR9100_DEVID,
|
||||
- },
|
||||
- {
|
||||
- .name = "ar933x_wmac",
|
||||
- .driver_data = AR9300_DEVID_AR9330,
|
||||
- },
|
||||
- {
|
||||
- .name = "ar934x_wmac",
|
||||
- .driver_data = AR9300_DEVID_AR9340,
|
||||
- },
|
||||
- {
|
||||
- .name = "qca955x_wmac",
|
||||
- .driver_data = AR9300_DEVID_QCA955X,
|
||||
- },
|
||||
- {
|
||||
- .name = "qca953x_wmac",
|
||||
- .driver_data = AR9300_DEVID_AR953X,
|
||||
- },
|
||||
- {
|
||||
- .name = "qca956x_wmac",
|
||||
- .driver_data = AR9300_DEVID_QCA956X,
|
||||
- },
|
||||
+static const struct of_device_id ath9k_of_match_table[] = {
|
||||
+ { .compatible = "qca,ar9130-wifi", .data = (void *)AR5416_AR9100_DEVID },
|
||||
+ { .compatible = "qca,ar9330-wifi", .data = (void *)AR9300_DEVID_AR9330 },
|
||||
+ { .compatible = "qca,ar9340-wifi", .data = (void *)AR9300_DEVID_AR9340 },
|
||||
+ { .compatible = "qca,qca9530-wifi", .data = (void *)AR9300_DEVID_AR953X },
|
||||
+ { .compatible = "qca,qca9550-wifi", .data = (void *)AR9300_DEVID_QCA955X },
|
||||
+ { .compatible = "qca,qca9560-wifi", .data = (void *)AR9300_DEVID_QCA956X },
|
||||
{},
|
||||
};
|
||||
|
||||
+const struct of_device_id of_ath_ahb_match[] = {
|
||||
+ { .compatible = "qca,ar9130-wmac", .data = (void *)AR5416_AR9100_DEVID },
|
||||
+ { .compatible = "qca,ar9330-wmac", .data = (void *)AR9300_DEVID_AR9330 },
|
||||
+ { .compatible = "qca,ar9340-wmac", .data = (void *)AR9300_DEVID_AR9340 },
|
||||
+ { .compatible = "qca,qca9530-wmac", .data = (void *)AR9300_DEVID_AR953X },
|
||||
+ { .compatible = "qca,qca9550-wmac", .data = (void *)AR9300_DEVID_QCA955X },
|
||||
+ { .compatible = "qca,qca9560-wmac", .data = (void *)AR9300_DEVID_QCA956X },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, of_ath_ahb_match);
|
||||
+
|
||||
@@ -71,19 +55,14 @@ static const struct ath_bus_ops ath_ahb_
|
||||
|
||||
static int ath_ahb_probe(struct platform_device *pdev)
|
||||
{
|
||||
- void __iomem *mem;
|
||||
- struct ath_softc *sc;
|
||||
+ const struct of_device_id *match;
|
||||
struct ieee80211_hw *hw;
|
||||
- const struct platform_device_id *id = platform_get_device_id(pdev);
|
||||
- int irq;
|
||||
- int ret = 0;
|
||||
+ struct ath_softc *sc;
|
||||
+ void __iomem *mem;
|
||||
struct ath_hw *ah;
|
||||
+ void __iomem *mem;
|
||||
char hw_name[64];
|
||||
-
|
||||
- if (!dev_get_platdata(&pdev->dev)) {
|
||||
|
@ -47,22 +74,27 @@
|
|||
|
||||
mem = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(mem)) {
|
||||
@@ -117,7 +125,9 @@ static int ath_ahb_probe(struct platform
|
||||
@@ -117,7 +96,8 @@ static int ath_ahb_probe(struct platform
|
||||
goto err_free_hw;
|
||||
}
|
||||
|
||||
- ret = ath9k_init_device(id->driver_data, sc, &ath_ahb_bus_ops);
|
||||
+ match = of_match_device(of_ath_ahb_match, &pdev->dev);
|
||||
+ dev_id = (uintptr_t)match->data;
|
||||
+ dev_id = (u16)(kernel_ulong_t)of_device_get_match_data(&pdev->dev);
|
||||
+ ret = ath9k_init_device(dev_id, sc, &ath_ahb_bus_ops);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to initialize device\n");
|
||||
goto err_irq;
|
||||
@@ -155,6 +165,7 @@ static struct platform_driver ath_ahb_dr
|
||||
.remove_new = ath_ahb_remove,
|
||||
.driver = {
|
||||
.name = "ath9k",
|
||||
+ .of_match_table = of_ath_ahb_match,
|
||||
@@ -167,11 +147,11 @@ static struct platform_driver ath_ahb_dr
|
||||
|
||||
.driver = {
|
||||
.name = "ath9k",
|
||||
+ .of_match_table = ath9k_of_match_table,
|
||||
},
|
||||
.id_table = ath9k_platform_id_table,
|
||||
- .id_table = ath9k_platform_id_table,
|
||||
};
|
||||
|
||||
-MODULE_DEVICE_TABLE(platform, ath9k_platform_id_table);
|
||||
+MODULE_DEVICE_TABLE(of, ath9k_of_match_table);
|
||||
|
||||
int ath_ahb_init(void)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -980,8 +980,36 @@ static struct wireless_dev *brcmf_cfg802
|
||||
@@ -984,8 +984,36 @@ static struct wireless_dev *brcmf_cfg802
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
struct brcmf_pub *drvr = cfg->pub;
|
||||
struct wireless_dev *wdev;
|
||||
|
|
|
@ -12,7 +12,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
@@ -65,6 +65,36 @@ static int brcmf_of_get_country_codes(st
|
||||
@@ -66,6 +66,36 @@ static int brcmf_of_get_country_codes(st
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -46,15 +46,15 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|||
+ }
|
||||
+}
|
||||
+
|
||||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
int brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
@@ -113,6 +143,8 @@ void brcmf_of_probe(struct device *dev,
|
||||
}
|
||||
of_node_put(root);
|
||||
@@ -121,6 +151,8 @@ int brcmf_of_probe(struct device *dev, e
|
||||
|
||||
brcmf_dbg(INFO, "%s LPO clock\n", clk ? "enable" : "no");
|
||||
|
||||
+ brcmf_of_probe_cc(dev, settings);
|
||||
+
|
||||
if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
|
||||
return;
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|||
#include <net/cfg80211.h>
|
||||
#include <net/netlink.h>
|
||||
#include <uapi/linux/if_arp.h>
|
||||
@@ -8212,31 +8213,45 @@ static void brcmf_cfg80211_reg_notifier(
|
||||
@@ -8215,31 +8216,45 @@ static void brcmf_cfg80211_reg_notifier(
|
||||
struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0);
|
||||
struct brcmf_pub *drvr = cfg->pub;
|
||||
struct brcmf_fil_country_le ccreq;
|
||||
|
|
|
@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -3338,6 +3338,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
@@ -3342,6 +3342,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
bphy_err(drvr, "error (%d)\n", err);
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ JIRA: SWWLAN-136577
|
|||
BRCMF_DEFAULT_SCAN_CHANNEL_TIME);
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -1317,7 +1317,7 @@ int brcmf_alloc(struct device *dev, stru
|
||||
@@ -1322,7 +1322,7 @@ int brcmf_alloc(struct device *dev, stru
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ JIRA: SWWLAN-136577
|
|||
{
|
||||
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
|
||||
struct brcmf_pub *drvr = bus_if->drvr;
|
||||
@@ -1358,10 +1358,13 @@ int brcmf_attach(struct device *dev)
|
||||
@@ -1363,10 +1363,13 @@ int brcmf_attach(struct device *dev)
|
||||
brcmf_fweh_register(drvr, BRCMF_E_PSM_WATCHDOG,
|
||||
brcmf_psm_watchdog_notify);
|
||||
|
||||
|
@ -205,7 +205,7 @@ JIRA: SWWLAN-136577
|
|||
void *data);
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
@@ -2207,7 +2207,7 @@ static void brcmf_pcie_setup(struct devi
|
||||
@@ -2210,7 +2210,7 @@ static void brcmf_pcie_setup(struct devi
|
||||
|
||||
init_waitqueue_head(&devinfo->mbdata_resp_wait);
|
||||
|
||||
|
@ -482,7 +482,7 @@ JIRA: SWWLAN-136577
|
|||
bus->tx_hdrlen = SDPCM_HWHDR_LEN + SDPCM_SWHDR_LEN;
|
||||
if (sdiodev->sg_support) {
|
||||
bus->txglom = false;
|
||||
@@ -4215,7 +4413,7 @@ static void brcmf_sdio_firmware_callback
|
||||
@@ -4217,7 +4415,7 @@ static void brcmf_sdio_firmware_callback
|
||||
u8 saveclk, bpreq;
|
||||
u8 devctl;
|
||||
|
||||
|
@ -491,7 +491,7 @@ JIRA: SWWLAN-136577
|
|||
|
||||
if (err)
|
||||
goto fail;
|
||||
@@ -4392,12 +4590,25 @@ static void brcmf_sdio_firmware_callback
|
||||
@@ -4394,12 +4592,25 @@ static void brcmf_sdio_firmware_callback
|
||||
}
|
||||
|
||||
/* Attach to the common layer, reserve hdr space */
|
||||
|
@ -518,7 +518,7 @@ JIRA: SWWLAN-136577
|
|||
/* ready */
|
||||
return;
|
||||
|
||||
@@ -4640,3 +4851,40 @@ int brcmf_sdio_sleep(struct brcmf_sdio *
|
||||
@@ -4646,3 +4857,40 @@ int brcmf_sdio_sleep(struct brcmf_sdio *
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -692,7 +692,7 @@ JIRA: SWWLAN-136577
|
|||
#endif /* BRCMFMAC_SDIO_H */
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
@@ -1200,7 +1200,7 @@ static void brcmf_usb_probe_phase2(struc
|
||||
@@ -1202,7 +1202,7 @@ static void brcmf_usb_probe_phase2(struc
|
||||
goto error;
|
||||
|
||||
/* Attach to the common driver interface */
|
||||
|
@ -701,7 +701,7 @@ JIRA: SWWLAN-136577
|
|||
if (ret)
|
||||
goto error;
|
||||
|
||||
@@ -1277,7 +1277,7 @@ static int brcmf_usb_probe_cb(struct brc
|
||||
@@ -1282,7 +1282,7 @@ static int brcmf_usb_probe_cb(struct brc
|
||||
ret = brcmf_alloc(devinfo->dev, devinfo->settings);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
|
|
@ -25,7 +25,7 @@ Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
|
|||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -2491,43 +2491,50 @@ brcmf_cfg80211_connect(struct wiphy *wip
|
||||
@@ -2495,43 +2495,50 @@ brcmf_cfg80211_connect(struct wiphy *wip
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
|||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -7991,6 +7991,7 @@ static s32 brcmf_translate_country_code(
|
||||
@@ -7994,6 +7994,7 @@ static s32 brcmf_translate_country_code(
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
|||
static int
|
||||
brcmf_parse_dump_obss(char *buf, struct brcmf_dump_survey *survey)
|
||||
{
|
||||
@@ -8213,6 +8214,7 @@ exit:
|
||||
@@ -8216,6 +8217,7 @@ exit:
|
||||
brcmf_set_mpc(ifp, 1);
|
||||
return err;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
|||
|
||||
static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy,
|
||||
struct regulatory_request *req)
|
||||
@@ -8379,8 +8381,10 @@ struct brcmf_cfg80211_info *brcmf_cfg802
|
||||
@@ -8382,8 +8384,10 @@ struct brcmf_cfg80211_info *brcmf_cfg802
|
||||
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_GTK))
|
||||
ops->set_rekey_data = brcmf_cfg80211_set_rekey_data;
|
||||
#endif
|
||||
|
|
|
@ -59,7 +59,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|||
This module adds support for PCIE bus
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -59,14 +59,6 @@ MAC80211_MESH_PS_DEBUG=
|
||||
@@ -53,14 +53,6 @@ MAC80211_MESH_PS_DEBUG=
|
||||
MAC80211_TDLS_DEBUG=
|
||||
MAC80211_DEBUG_COUNTERS=
|
||||
MAC80211_STA_HASH_MAX_SIZE=
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Tue, 14 Jan 2025 11:42:25 +0100
|
||||
Subject: [PATCH] backport-include: fix linux/acpi_amd_wbrf.h inclusion
|
||||
|
||||
Fix building for kernel >= 6.8 by adjusting incorrect guard usage,
|
||||
otherwise an #include_next header is masked and compilation will fail
|
||||
for net/mac80211/wbrf.c in the mac80211 kernel module.
|
||||
|
||||
Fixes: 52cdcaab ("backport-include: backport linux/acpi_amd_wbrf.h")
|
||||
Reported-by: Tony Ambardar <itugrok@yahoo.com>
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/backport-include/linux/acpi_amd_wbrf.h
|
||||
+++ b/backport-include/linux/acpi_amd_wbrf.h
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2023 Advanced Micro Devices
|
||||
*/
|
||||
|
||||
-#ifndef _ACPI_AMD_WBRF_H
|
||||
-#define _ACPI_AMD_WBRF_H
|
||||
+#ifndef __BACKPORT_ACPI_AMD_WBRF_H
|
||||
+#define __BACKPORT_ACPI_AMD_WBRF_H
|
||||
|
||||
#if LINUX_VERSION_IS_GEQ(6,8,0)
|
||||
#include_next <linux/acpi_amd_wbrf.h>
|
||||
@@ -83,4 +83,4 @@ int amd_wbrf_unregister_notifier(struct
|
||||
}
|
||||
|
||||
#endif /* >=6,8,0 */
|
||||
-#endif /* _ACPI_AMD_WBRF_H */
|
||||
+#endif /* __BACKPORT_ACPI_AMD_WBRF_H */
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/wireless/core.c
|
||||
+++ b/net/wireless/core.c
|
||||
@@ -165,11 +165,15 @@ int cfg80211_switch_netns(struct cfg8021
|
||||
@@ -162,11 +162,15 @@ int cfg80211_switch_netns(struct cfg8021
|
||||
list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
|
||||
if (!wdev->netdev)
|
||||
continue;
|
||||
|
@ -16,7 +16,7 @@
|
|||
}
|
||||
|
||||
if (err) {
|
||||
@@ -181,11 +185,15 @@ int cfg80211_switch_netns(struct cfg8021
|
||||
@@ -178,11 +182,15 @@ int cfg80211_switch_netns(struct cfg8021
|
||||
list) {
|
||||
if (!wdev->netdev)
|
||||
continue;
|
||||
|
@ -32,7 +32,7 @@
|
|||
}
|
||||
|
||||
return err;
|
||||
@@ -1518,7 +1526,9 @@ static int cfg80211_netdev_notifier_call
|
||||
@@ -1520,7 +1528,9 @@ static int cfg80211_netdev_notifier_call
|
||||
SET_NETDEV_DEVTYPE(dev, &wiphy_type);
|
||||
wdev->netdev = dev;
|
||||
/* can only change netns with wiphy */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
|
||||
@@ -1574,7 +1574,11 @@ static int brcmf_usb_reset_device(struct
|
||||
@@ -1579,7 +1579,11 @@ static int brcmf_usb_reset_device(struct
|
||||
|
||||
void brcmf_usb_exit(void)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
|
||||
@@ -6629,6 +6629,7 @@ static void hwsim_virtio_rx_done(struct
|
||||
@@ -6670,6 +6670,7 @@ static void hwsim_virtio_rx_done(struct
|
||||
|
||||
static int init_vqs(struct virtio_device *vdev)
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
|||
struct virtqueue_info vqs_info[HWSIM_NUM_VQS] = {
|
||||
[HWSIM_VQ_TX] = { "tx", hwsim_virtio_tx_done },
|
||||
[HWSIM_VQ_RX] = { "rx", hwsim_virtio_rx_done },
|
||||
@@ -6636,6 +6637,19 @@ static int init_vqs(struct virtio_device
|
||||
@@ -6677,6 +6678,19 @@ static int init_vqs(struct virtio_device
|
||||
|
||||
return virtio_find_vqs(vdev, HWSIM_NUM_VQS,
|
||||
hwsim_vqs, vqs_info, NULL);
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
--- a/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
@@ -909,7 +909,11 @@ static int rtw_usb_init_rx(struct rtw_de
|
||||
struct sk_buff *rx_skb;
|
||||
int i;
|
||||
|
||||
+#if LINUX_VERSION_IS_GEQ(6,9,0)
|
||||
rtwusb->rxwq = alloc_workqueue("rtw88_usb: rx wq", WQ_BH, 0);
|
||||
+#else
|
||||
+ rtwusb->rxwq = create_singlethread_workqueue("rtw88_usb: rx wq");
|
||||
+#endif
|
||||
if (!rtwusb->rxwq) {
|
||||
rtw_err(rtwdev, "failed to create RX work queue\n");
|
||||
return -ENOMEM;
|
|
@ -0,0 +1,20 @@
|
|||
--- a/drivers/net/wireless/ti/wlcore/sysfs.c
|
||||
+++ b/drivers/net/wireless/ti/wlcore/sysfs.c
|
||||
@@ -88,7 +88,7 @@ static ssize_t hw_pg_ver_show(struct dev
|
||||
static DEVICE_ATTR_RO(hw_pg_ver);
|
||||
|
||||
static ssize_t wl1271_sysfs_read_fwlog(struct file *filp, struct kobject *kobj,
|
||||
- const struct bin_attribute *bin_attr,
|
||||
+ struct bin_attribute *bin_attr,
|
||||
char *buffer, loff_t pos, size_t count)
|
||||
{
|
||||
struct device *dev = kobj_to_dev(kobj);
|
||||
@@ -121,7 +121,7 @@ static ssize_t wl1271_sysfs_read_fwlog(s
|
||||
|
||||
static const struct bin_attribute fwlog_attr = {
|
||||
.attr = { .name = "fwlog", .mode = 0400 },
|
||||
- .read_new = wl1271_sysfs_read_fwlog,
|
||||
+ .read = wl1271_sysfs_read_fwlog,
|
||||
};
|
||||
|
||||
int wlcore_sysfs_init(struct wl1271 *wl)
|
|
@ -0,0 +1,252 @@
|
|||
--- a/drivers/net/wireless/ath/carl9170/debug.c
|
||||
+++ b/drivers/net/wireless/ath/carl9170/debug.c
|
||||
@@ -54,6 +54,7 @@ struct carl9170_debugfs_fops {
|
||||
char *(*read)(struct ar9170 *ar, char *buf, size_t bufsize,
|
||||
ssize_t *len);
|
||||
ssize_t (*write)(struct ar9170 *aru, const char *buf, size_t size);
|
||||
+ const struct file_operations fops;
|
||||
|
||||
enum carl9170_device_state req_dev_state;
|
||||
};
|
||||
@@ -61,7 +62,7 @@ struct carl9170_debugfs_fops {
|
||||
static ssize_t carl9170_debugfs_read(struct file *file, char __user *userbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
- const struct carl9170_debugfs_fops *dfops;
|
||||
+ struct carl9170_debugfs_fops *dfops;
|
||||
struct ar9170 *ar;
|
||||
char *buf = NULL, *res_buf = NULL;
|
||||
ssize_t ret = 0;
|
||||
@@ -74,7 +75,8 @@ static ssize_t carl9170_debugfs_read(str
|
||||
|
||||
if (!ar)
|
||||
return -ENODEV;
|
||||
- dfops = debugfs_get_aux(file);
|
||||
+ dfops = container_of(debugfs_real_fops(file),
|
||||
+ struct carl9170_debugfs_fops, fops);
|
||||
|
||||
if (!dfops->read)
|
||||
return -ENOSYS;
|
||||
@@ -111,7 +113,7 @@ out_free:
|
||||
static ssize_t carl9170_debugfs_write(struct file *file,
|
||||
const char __user *userbuf, size_t count, loff_t *ppos)
|
||||
{
|
||||
- const struct carl9170_debugfs_fops *dfops;
|
||||
+ struct carl9170_debugfs_fops *dfops;
|
||||
struct ar9170 *ar;
|
||||
char *buf = NULL;
|
||||
int err = 0;
|
||||
@@ -126,7 +128,8 @@ static ssize_t carl9170_debugfs_write(st
|
||||
|
||||
if (!ar)
|
||||
return -ENODEV;
|
||||
- dfops = debugfs_get_aux(file);
|
||||
+ dfops = container_of(debugfs_real_fops(file),
|
||||
+ struct carl9170_debugfs_fops, fops);
|
||||
|
||||
if (!dfops->write)
|
||||
return -ENOSYS;
|
||||
@@ -162,11 +165,6 @@ out_free:
|
||||
return err;
|
||||
}
|
||||
|
||||
-static struct debugfs_short_fops debugfs_fops = {
|
||||
- .read = carl9170_debugfs_read,
|
||||
- .write = carl9170_debugfs_write,
|
||||
-};
|
||||
-
|
||||
#define __DEBUGFS_DECLARE_FILE(name, _read, _write, _read_bufsize, \
|
||||
_attr, _dstate) \
|
||||
static const struct carl9170_debugfs_fops carl_debugfs_##name ##_ops = {\
|
||||
@@ -175,6 +173,12 @@ static const struct carl9170_debugfs_fop
|
||||
.write = _write, \
|
||||
.attr = _attr, \
|
||||
.req_dev_state = _dstate, \
|
||||
+ .fops = { \
|
||||
+ .open = simple_open, \
|
||||
+ .read = carl9170_debugfs_read, \
|
||||
+ .write = carl9170_debugfs_write, \
|
||||
+ .owner = THIS_MODULE \
|
||||
+ }, \
|
||||
}
|
||||
|
||||
#define DEBUGFS_DECLARE_FILE(name, _read, _write, _read_bufsize, _attr) \
|
||||
@@ -812,9 +816,9 @@ void carl9170_debugfs_register(struct ar
|
||||
ar->hw->wiphy->debugfsdir);
|
||||
|
||||
#define DEBUGFS_ADD(name) \
|
||||
- debugfs_create_file_aux(#name, carl_debugfs_##name ##_ops.attr, \
|
||||
- ar->debug_dir, ar, &carl_debugfs_##name ## _ops, \
|
||||
- &debugfs_fops)
|
||||
+ debugfs_create_file(#name, carl_debugfs_##name ##_ops.attr, \
|
||||
+ ar->debug_dir, ar, \
|
||||
+ &carl_debugfs_##name ## _ops.fops)
|
||||
|
||||
DEBUGFS_ADD(usb_tx_anch_urbs);
|
||||
DEBUGFS_ADD(usb_rx_pool_urbs);
|
||||
--- a/drivers/net/wireless/broadcom/b43/debugfs.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43/debugfs.c
|
||||
@@ -30,6 +30,7 @@ static struct dentry *rootdir;
|
||||
struct b43_debugfs_fops {
|
||||
ssize_t (*read)(struct b43_wldev *dev, char *buf, size_t bufsize);
|
||||
int (*write)(struct b43_wldev *dev, const char *buf, size_t count);
|
||||
+ struct file_operations fops;
|
||||
/* Offset of struct b43_dfs_file in struct b43_dfsentry */
|
||||
size_t file_struct_offset;
|
||||
};
|
||||
@@ -490,7 +491,7 @@ static ssize_t b43_debugfs_read(struct f
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct b43_wldev *dev;
|
||||
- const struct b43_debugfs_fops *dfops;
|
||||
+ struct b43_debugfs_fops *dfops;
|
||||
struct b43_dfs_file *dfile;
|
||||
ssize_t ret;
|
||||
char *buf;
|
||||
@@ -510,7 +511,8 @@ static ssize_t b43_debugfs_read(struct f
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
- dfops = debugfs_get_aux(file);
|
||||
+ dfops = container_of(debugfs_real_fops(file),
|
||||
+ struct b43_debugfs_fops, fops);
|
||||
if (!dfops->read) {
|
||||
err = -ENOSYS;
|
||||
goto out_unlock;
|
||||
@@ -553,7 +555,7 @@ static ssize_t b43_debugfs_write(struct
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct b43_wldev *dev;
|
||||
- const struct b43_debugfs_fops *dfops;
|
||||
+ struct b43_debugfs_fops *dfops;
|
||||
char *buf;
|
||||
int err = 0;
|
||||
|
||||
@@ -571,7 +573,8 @@ static ssize_t b43_debugfs_write(struct
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
- dfops = debugfs_get_aux(file);
|
||||
+ dfops = container_of(debugfs_real_fops(file),
|
||||
+ struct b43_debugfs_fops, fops);
|
||||
if (!dfops->write) {
|
||||
err = -ENOSYS;
|
||||
goto out_unlock;
|
||||
@@ -599,16 +602,16 @@ out_unlock:
|
||||
}
|
||||
|
||||
|
||||
-static struct debugfs_short_fops debugfs_ops = {
|
||||
- .read = b43_debugfs_read,
|
||||
- .write = b43_debugfs_write,
|
||||
- .llseek = generic_file_llseek,
|
||||
-};
|
||||
-
|
||||
#define B43_DEBUGFS_FOPS(name, _read, _write) \
|
||||
static struct b43_debugfs_fops fops_##name = { \
|
||||
.read = _read, \
|
||||
.write = _write, \
|
||||
+ .fops = { \
|
||||
+ .open = simple_open, \
|
||||
+ .read = b43_debugfs_read, \
|
||||
+ .write = b43_debugfs_write, \
|
||||
+ .llseek = generic_file_llseek, \
|
||||
+ }, \
|
||||
.file_struct_offset = offsetof(struct b43_dfsentry, \
|
||||
file_##name), \
|
||||
}
|
||||
@@ -700,9 +703,9 @@ void b43_debugfs_add_device(struct b43_w
|
||||
|
||||
#define ADD_FILE(name, mode) \
|
||||
do { \
|
||||
- debugfs_create_file_aux(__stringify(name), \
|
||||
+ debugfs_create_file(__stringify(name), \
|
||||
mode, e->subdir, dev, \
|
||||
- &fops_##name, &debugfs_ops); \
|
||||
+ &fops_##name.fops); \
|
||||
} while (0)
|
||||
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/b43legacy/debugfs.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
|
||||
@@ -31,6 +31,7 @@ static struct dentry *rootdir;
|
||||
struct b43legacy_debugfs_fops {
|
||||
ssize_t (*read)(struct b43legacy_wldev *dev, char *buf, size_t bufsize);
|
||||
int (*write)(struct b43legacy_wldev *dev, const char *buf, size_t count);
|
||||
+ struct file_operations fops;
|
||||
/* Offset of struct b43legacy_dfs_file in struct b43legacy_dfsentry */
|
||||
size_t file_struct_offset;
|
||||
/* Take wl->irq_lock before calling read/write? */
|
||||
@@ -187,7 +188,7 @@ static ssize_t b43legacy_debugfs_read(st
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct b43legacy_wldev *dev;
|
||||
- const struct b43legacy_debugfs_fops *dfops;
|
||||
+ struct b43legacy_debugfs_fops *dfops;
|
||||
struct b43legacy_dfs_file *dfile;
|
||||
ssize_t ret;
|
||||
char *buf;
|
||||
@@ -207,7 +208,8 @@ static ssize_t b43legacy_debugfs_read(st
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
- dfops = debugfs_get_aux(file);
|
||||
+ dfops = container_of(debugfs_real_fops(file),
|
||||
+ struct b43legacy_debugfs_fops, fops);
|
||||
if (!dfops->read) {
|
||||
err = -ENOSYS;
|
||||
goto out_unlock;
|
||||
@@ -255,7 +257,7 @@ static ssize_t b43legacy_debugfs_write(s
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct b43legacy_wldev *dev;
|
||||
- const struct b43legacy_debugfs_fops *dfops;
|
||||
+ struct b43legacy_debugfs_fops *dfops;
|
||||
char *buf;
|
||||
int err = 0;
|
||||
|
||||
@@ -273,7 +275,8 @@ static ssize_t b43legacy_debugfs_write(s
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
- dfops = debugfs_get_aux(file);
|
||||
+ dfops = container_of(debugfs_real_fops(file),
|
||||
+ struct b43legacy_debugfs_fops, fops);
|
||||
if (!dfops->write) {
|
||||
err = -ENOSYS;
|
||||
goto out_unlock;
|
||||
@@ -305,16 +308,17 @@ out_unlock:
|
||||
return err ? err : count;
|
||||
}
|
||||
|
||||
-static struct debugfs_short_fops debugfs_ops = {
|
||||
- .read = b43legacy_debugfs_read,
|
||||
- .write = b43legacy_debugfs_write,
|
||||
- .llseek = generic_file_llseek
|
||||
-};
|
||||
|
||||
#define B43legacy_DEBUGFS_FOPS(name, _read, _write, _take_irqlock) \
|
||||
static struct b43legacy_debugfs_fops fops_##name = { \
|
||||
.read = _read, \
|
||||
.write = _write, \
|
||||
+ .fops = { \
|
||||
+ .open = simple_open, \
|
||||
+ .read = b43legacy_debugfs_read, \
|
||||
+ .write = b43legacy_debugfs_write, \
|
||||
+ .llseek = generic_file_llseek, \
|
||||
+ }, \
|
||||
.file_struct_offset = offsetof(struct b43legacy_dfsentry, \
|
||||
file_##name), \
|
||||
.take_irqlock = _take_irqlock, \
|
||||
@@ -382,9 +386,9 @@ void b43legacy_debugfs_add_device(struct
|
||||
|
||||
#define ADD_FILE(name, mode) \
|
||||
do { \
|
||||
- debugfs_create_file_aux(__stringify(name), mode, \
|
||||
+ debugfs_create_file(__stringify(name), mode, \
|
||||
e->subdir, dev, \
|
||||
- &fops_##name, &debugfs_ops); \
|
||||
+ &fops_##name.fops); \
|
||||
} while (0)
|
||||
|
||||
|
|
@ -0,0 +1,210 @@
|
|||
--- a/net/mac80211/debugfs.c
|
||||
+++ b/net/mac80211/debugfs.c
|
||||
@@ -42,8 +42,9 @@ static ssize_t name## _read(struct file
|
||||
}
|
||||
|
||||
#define DEBUGFS_READONLY_FILE_OPS(name) \
|
||||
-static const struct debugfs_short_fops name## _ops = { \
|
||||
+static const struct file_operations name## _ops = { \
|
||||
.read = name## _read, \
|
||||
+ .open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
};
|
||||
|
||||
@@ -141,9 +142,10 @@ static ssize_t aqm_write(struct file *fi
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
-static const struct debugfs_short_fops aqm_ops = {
|
||||
+static const struct file_operations aqm_ops = {
|
||||
.write = aqm_write,
|
||||
.read = aqm_read,
|
||||
+ .open = simple_open,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -192,9 +194,10 @@ static ssize_t airtime_flags_write(struc
|
||||
return count;
|
||||
}
|
||||
|
||||
-static const struct debugfs_short_fops airtime_flags_ops = {
|
||||
+static const struct file_operations airtime_flags_ops = {
|
||||
.write = airtime_flags_write,
|
||||
.read = airtime_flags_read,
|
||||
+ .open = simple_open,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -222,8 +225,9 @@ static ssize_t aql_pending_read(struct f
|
||||
buf, len);
|
||||
}
|
||||
|
||||
-static const struct debugfs_short_fops aql_pending_ops = {
|
||||
+static const struct file_operations aql_pending_ops = {
|
||||
.read = aql_pending_read,
|
||||
+ .open = simple_open,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -301,9 +305,10 @@ static ssize_t aql_txq_limit_write(struc
|
||||
return count;
|
||||
}
|
||||
|
||||
-static const struct debugfs_short_fops aql_txq_limit_ops = {
|
||||
+static const struct file_operations aql_txq_limit_ops = {
|
||||
.write = aql_txq_limit_write,
|
||||
.read = aql_txq_limit_read,
|
||||
+ .open = simple_open,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -350,9 +355,10 @@ static ssize_t aql_enable_write(struct f
|
||||
return count;
|
||||
}
|
||||
|
||||
-static const struct debugfs_short_fops aql_enable_ops = {
|
||||
+static const struct file_operations aql_enable_ops = {
|
||||
.write = aql_enable_write,
|
||||
.read = aql_enable_read,
|
||||
+ .open = simple_open,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -400,9 +406,10 @@ static ssize_t force_tx_status_write(str
|
||||
return count;
|
||||
}
|
||||
|
||||
-static const struct debugfs_short_fops force_tx_status_ops = {
|
||||
+static const struct file_operations force_tx_status_ops = {
|
||||
.write = force_tx_status_write,
|
||||
.read = force_tx_status_read,
|
||||
+ .open = simple_open,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -427,8 +434,9 @@ static ssize_t reset_write(struct file *
|
||||
return count;
|
||||
}
|
||||
|
||||
-static const struct debugfs_short_fops reset_ops = {
|
||||
+static const struct file_operations reset_ops = {
|
||||
.write = reset_write,
|
||||
+ .open = simple_open,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
#endif
|
||||
@@ -656,8 +664,9 @@ static ssize_t stats_ ##name## _read(str
|
||||
print_devstats_##name); \
|
||||
} \
|
||||
\
|
||||
-static const struct debugfs_short_fops stats_ ##name## _ops = { \
|
||||
+static const struct file_operations stats_ ##name## _ops = { \
|
||||
.read = stats_ ##name## _read, \
|
||||
+ .open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
};
|
||||
|
||||
--- a/net/mac80211/debugfs_key.c
|
||||
+++ b/net/mac80211/debugfs_key.c
|
||||
@@ -26,15 +26,17 @@ static ssize_t key_##name##_read(struct
|
||||
#define KEY_READ_X(name) KEY_READ(name, name, "0x%x\n")
|
||||
|
||||
#define KEY_OPS(name) \
|
||||
-static const struct debugfs_short_fops key_ ##name## _ops = { \
|
||||
+static const struct file_operations key_ ##name## _ops = { \
|
||||
.read = key_##name##_read, \
|
||||
+ .open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
#define KEY_OPS_W(name) \
|
||||
-static const struct debugfs_short_fops key_ ##name## _ops = { \
|
||||
+static const struct file_operations key_ ##name## _ops = { \
|
||||
.read = key_##name##_read, \
|
||||
.write = key_##name##_write, \
|
||||
+ .open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
@@ -47,8 +49,9 @@ static const struct debugfs_short_fops k
|
||||
#define KEY_CONF_READ_D(name) KEY_CONF_READ(name, "%d\n")
|
||||
|
||||
#define KEY_CONF_OPS(name) \
|
||||
-static const struct debugfs_short_fops key_ ##name## _ops = { \
|
||||
+static const struct file_operations key_ ##name## _ops = { \
|
||||
.read = key_conf_##name##_read, \
|
||||
+ .open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
--- a/net/mac80211/debugfs_netdev.c
|
||||
+++ b/net/mac80211/debugfs_netdev.c
|
||||
@@ -221,9 +221,10 @@ static ssize_t ieee80211_if_fmt_##name(
|
||||
}
|
||||
|
||||
#define _IEEE80211_IF_FILE_OPS(name, _read, _write) \
|
||||
-static const struct debugfs_short_fops name##_ops = { \
|
||||
+static const struct file_operations name##_ops = { \
|
||||
.read = (_read), \
|
||||
.write = (_write), \
|
||||
+ .open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
--- a/net/mac80211/debugfs_sta.c
|
||||
+++ b/net/mac80211/debugfs_sta.c
|
||||
@@ -30,15 +30,17 @@ static ssize_t sta_ ##name## _read(struc
|
||||
#define STA_READ_D(name, field) STA_READ(name, field, "%d\n")
|
||||
|
||||
#define STA_OPS(name) \
|
||||
-static const struct debugfs_short_fops sta_ ##name## _ops = { \
|
||||
+static const struct file_operations sta_ ##name## _ops = { \
|
||||
.read = sta_##name##_read, \
|
||||
+ .open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
#define STA_OPS_RW(name) \
|
||||
-static const struct debugfs_short_fops sta_ ##name## _ops = { \
|
||||
+static const struct file_operations sta_ ##name## _ops = { \
|
||||
.read = sta_##name##_read, \
|
||||
.write = sta_##name##_write, \
|
||||
+ .open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
@@ -448,8 +450,9 @@ STA_OPS_RW(agg_status);
|
||||
|
||||
/* link sta attributes */
|
||||
#define LINK_STA_OPS(name) \
|
||||
-static const struct debugfs_short_fops link_sta_ ##name## _ops = { \
|
||||
+static const struct file_operations link_sta_ ##name## _ops = { \
|
||||
.read = link_sta_##name##_read, \
|
||||
+ .open = simple_open, \
|
||||
.llseek = generic_file_llseek, \
|
||||
}
|
||||
|
||||
--- a/net/mac80211/rate.c
|
||||
+++ b/net/mac80211/rate.c
|
||||
@@ -249,8 +249,9 @@ static ssize_t rcname_read(struct file *
|
||||
ref->ops->name, len);
|
||||
}
|
||||
|
||||
-const struct debugfs_short_fops rcname_ops = {
|
||||
+const struct file_operations rcname_ops = {
|
||||
.read = rcname_read,
|
||||
+ .open = simple_open,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
#endif
|
||||
--- a/net/mac80211/rate.h
|
||||
+++ b/net/mac80211/rate.h
|
||||
@@ -62,7 +62,7 @@ static inline void rate_control_add_sta_
|
||||
#endif
|
||||
}
|
||||
|
||||
-extern const struct debugfs_short_fops rcname_ops;
|
||||
+extern const struct file_operations rcname_ops;
|
||||
|
||||
static inline void rate_control_add_debugfs(struct ieee80211_local *local)
|
||||
{
|
|
@ -152,7 +152,7 @@ Signed-off-by: Pali Rohár <pali@kernel.org>
|
|||
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
@@ -1100,6 +1100,8 @@ void mwifiex_cancel_all_pending_cmd(stru
|
||||
@@ -1096,6 +1096,8 @@ void mwifiex_cancel_all_pending_cmd(stru
|
||||
void mwifiex_cancel_pending_scan_cmd(struct mwifiex_adapter *adapter);
|
||||
void mwifiex_cancel_scan(struct mwifiex_adapter *adapter);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|||
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -339,6 +339,7 @@ RT2X00_LIB_FIRMWARE=
|
||||
@@ -334,6 +334,7 @@ RT2X00_LIB_FIRMWARE=
|
||||
RT2X00_LIB_CRYPTO=
|
||||
RT2X00_LIB_LEDS=
|
||||
RT2X00_LIB_DEBUGFS=
|
||||
|
|
|
@ -13,10 +13,11 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
|
||||
@@ -230,10 +230,17 @@ static int rt2800soc_probe(struct platfo
|
||||
return rt2x00soc_probe(pdev, &rt2800soc_ops);
|
||||
@@ -237,10 +237,18 @@ static int bp_rt2x00soc_remove(struct pl
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
+
|
||||
+static const struct of_device_id rt2880_wmac_match[] = {
|
||||
+ { .compatible = "ralink,rt2880-wmac" },
|
||||
+ {},
|
||||
|
@ -30,4 +31,4 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||
+ .of_match_table = rt2880_wmac_match,
|
||||
},
|
||||
.probe = rt2800soc_probe,
|
||||
.remove = rt2x00soc_remove,
|
||||
#if LINUX_VERSION_IS_GEQ(6,11,0)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "rt2x00.h"
|
||||
#include "rt2800lib.h"
|
||||
@@ -11282,6 +11283,17 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -11276,6 +11277,17 @@ static int rt2800_init_eeprom(struct rt2
|
||||
rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
|
||||
rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
|||
queue = rt2x00queue_get_tx_queue(rt2x00dev, qid);
|
||||
|
||||
if (unlikely(rt2x00queue_empty(queue))) {
|
||||
@@ -12188,8 +12197,9 @@ int rt2800_conf_tx(struct ieee80211_hw *
|
||||
@@ -12182,8 +12191,9 @@ int rt2800_conf_tx(struct ieee80211_hw *
|
||||
queue = rt2x00queue_get_tx_queue(rt2x00dev, queue_idx);
|
||||
|
||||
/* Update WMM TXOP register */
|
||||
|
@ -126,7 +126,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
|||
field.bit_mask = 0xffff << field.bit_offset;
|
||||
|
||||
reg = rt2800_register_read(rt2x00dev, offset);
|
||||
@@ -12197,7 +12207,7 @@ int rt2800_conf_tx(struct ieee80211_hw *
|
||||
@@ -12191,7 +12201,7 @@ int rt2800_conf_tx(struct ieee80211_hw *
|
||||
rt2800_register_write(rt2x00dev, offset, reg);
|
||||
|
||||
/* Update WMM registers */
|
||||
|
@ -135,7 +135,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
|||
field.bit_mask = 0xf << field.bit_offset;
|
||||
|
||||
reg = rt2800_register_read(rt2x00dev, WMM_AIFSN_CFG);
|
||||
@@ -12213,7 +12223,7 @@ int rt2800_conf_tx(struct ieee80211_hw *
|
||||
@@ -12207,7 +12217,7 @@ int rt2800_conf_tx(struct ieee80211_hw *
|
||||
rt2800_register_write(rt2x00dev, WMM_CWMAX_CFG, reg);
|
||||
|
||||
/* Update EDCA registers */
|
||||
|
|
|
@ -42,7 +42,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
|||
}
|
||||
if (flags & IEEE80211_CONF_CHANGE_POWER)
|
||||
rt2800_config_txpower(rt2x00dev, libconf->conf->chandef.chan,
|
||||
@@ -10427,15 +10438,19 @@ static void rt2800_restore_rf_bbp_rt6352
|
||||
@@ -10421,15 +10432,19 @@ static void rt2800_restore_rf_bbp_rt6352
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
|||
rt2800_rf_self_txdc_cal(rt2x00dev);
|
||||
rt2800_rxdcoc_calibration(rt2x00dev);
|
||||
rt2800_bw_filter_calibration(rt2x00dev, true);
|
||||
@@ -10766,9 +10781,6 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -10760,9 +10775,6 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00);
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C);
|
||||
|
|
|
@ -24,37 +24,3 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
|||
rt2800_bbp_write(rt2x00dev, 4, bbpval);
|
||||
|
||||
bbpval = rt2800_bbp_read(rt2x00dev, 21);
|
||||
@@ -8928,13 +8928,13 @@ static void rt2800_rxiq_calibration(stru
|
||||
for (ch_idx = 0; ch_idx < 2; ch_idx = ch_idx + 1) {
|
||||
if (ch_idx == 0) {
|
||||
rfval = rfb0r1 & (~0x3);
|
||||
- rfval = rfb0r1 | 0x1;
|
||||
+ rfval = rfval | 0x1;
|
||||
rt2800_rfcsr_write_bank(rt2x00dev, 0, 1, rfval);
|
||||
rfval = rfb0r2 & (~0x33);
|
||||
- rfval = rfb0r2 | 0x11;
|
||||
+ rfval = rfval | 0x11;
|
||||
rt2800_rfcsr_write_bank(rt2x00dev, 0, 2, rfval);
|
||||
rfval = rfb0r42 & (~0x50);
|
||||
- rfval = rfb0r42 | 0x10;
|
||||
+ rfval = rfval | 0x10;
|
||||
rt2800_rfcsr_write_bank(rt2x00dev, 0, 42, rfval);
|
||||
|
||||
rt2800_register_write(rt2x00dev, RF_CONTROL0, 0x00001006);
|
||||
@@ -8947,13 +8947,13 @@ static void rt2800_rxiq_calibration(stru
|
||||
rt2800_bbp_dcoc_write(rt2x00dev, 1, 0x00);
|
||||
} else {
|
||||
rfval = rfb0r1 & (~0x3);
|
||||
- rfval = rfb0r1 | 0x2;
|
||||
+ rfval = rfval | 0x2;
|
||||
rt2800_rfcsr_write_bank(rt2x00dev, 0, 1, rfval);
|
||||
rfval = rfb0r2 & (~0x33);
|
||||
- rfval = rfb0r2 | 0x22;
|
||||
+ rfval = rfval | 0x22;
|
||||
rt2800_rfcsr_write_bank(rt2x00dev, 0, 2, rfval);
|
||||
rfval = rfb0r42 & (~0x50);
|
||||
- rfval = rfb0r42 | 0x40;
|
||||
+ rfval = rfval | 0x40;
|
||||
rt2800_rfcsr_write_bank(rt2x00dev, 0, 42, rfval);
|
||||
|
||||
rt2800_register_write(rt2x00dev, RF_CONTROL0, 0x00002006);
|
||||
|
|
|
@ -77,7 +77,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
|||
+ rt2800_rfcsr_write(rt2x00dev, 59, 0x7C);
|
||||
+
|
||||
if (rf->channel <= 50) {
|
||||
- rt2800_rfcsr_write(rt2x00dev, 55, 0x06),
|
||||
- rt2800_rfcsr_write(rt2x00dev, 55, 0x06);
|
||||
- rt2800_rfcsr_write(rt2x00dev, 56, 0xD3);
|
||||
+ rt2800_rfcsr_write(rt2x00dev, 44, 0X32);
|
||||
+ rt2800_rfcsr_write(rt2x00dev, 54, 0xF9);
|
||||
|
|
|
@ -52,7 +52,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
static const unsigned int rt2800_eeprom_map[EEPROM_WORD_COUNT] = {
|
||||
[EEPROM_CHIP_ID] = 0x0000,
|
||||
[EEPROM_VERSION] = 0x0001,
|
||||
@@ -10428,8 +10446,10 @@ static void rt2800_restore_rf_bbp_rt6352
|
||||
@@ -10422,8 +10440,10 @@ static void rt2800_restore_rf_bbp_rt6352
|
||||
static void rt2800_calibration_rt6352_stage1(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
if (rt2x00_has_cap_external_pa(rt2x00dev) ||
|
||||
|
@ -64,7 +64,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
|
||||
rt2800_r_calibration(rt2x00dev);
|
||||
}
|
||||
@@ -10453,6 +10473,8 @@ static void rt2800_calibration_rt6352_st
|
||||
@@ -10447,6 +10467,8 @@ static void rt2800_calibration_rt6352_st
|
||||
!rt2x00_has_cap_external_lna_bg(rt2x00dev))
|
||||
return;
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
|
||||
/* BBP for G band GLRT function (BBP_128 ~ BBP_221) */
|
||||
rt2800_bbp_glrt_write(rt2x00dev, 0, 0x00);
|
||||
@@ -10404,6 +10434,9 @@ static void rt2800_restore_rf_bbp_rt6352
|
||||
@@ -10398,6 +10428,9 @@ static void rt2800_restore_rf_bbp_rt6352
|
||||
rt2800_register_write(rt2x00dev, RF_BYPASS3, 0x0);
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@
|
|||
if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) {
|
||||
rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x16);
|
||||
rt2800_rfcsr_write_chanreg(rt2x00dev, 17, 0x23);
|
||||
@@ -10485,6 +10518,9 @@ static void rt2800_calibration_rt6352_st
|
||||
@@ -10479,6 +10512,9 @@ static void rt2800_calibration_rt6352_st
|
||||
rt2800_register_write(rt2x00dev, RF_BYPASS3, reg);
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@
|
|||
if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) {
|
||||
rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x66);
|
||||
rt2800_rfcsr_write_chanreg(rt2x00dev, 17, 0x20);
|
||||
@@ -10575,31 +10611,36 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -10569,31 +10605,36 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rfcsr_write(rt2x00dev, 42, 0x5B);
|
||||
rt2800_rfcsr_write(rt2x00dev, 43, 0x00);
|
||||
|
||||
|
@ -285,7 +285,7 @@
|
|||
|
||||
/* Initialize RF channel register to default value */
|
||||
rt2800_rfcsr_write_chanreg(rt2x00dev, 0, 0x03);
|
||||
@@ -10665,63 +10706,71 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -10659,63 +10700,71 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
|
||||
rt2800_rfcsr_write_bank(rt2x00dev, 6, 45, 0xC5);
|
||||
|
||||
|
@ -412,7 +412,7 @@
|
|||
|
||||
/* Initialize RF DC calibration register to default value */
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 0, 0x47);
|
||||
@@ -10784,12 +10833,17 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
@@ -10778,12 +10827,17 @@ static void rt2800_init_rfcsr_6352(struc
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 62, 0x00);
|
||||
rt2800_rfcsr_write_dccal(rt2x00dev, 63, 0x00);
|
||||
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
|
||||
@@ -273,7 +273,7 @@ static struct platform_driver rt2800soc_
|
||||
.of_match_table = rt2880_wmac_match,
|
||||
},
|
||||
.probe = rt2800soc_probe,
|
||||
- .remove = rt2x00soc_remove,
|
||||
+ .remove_new = rt2x00soc_remove,
|
||||
.suspend = rt2x00soc_suspend,
|
||||
.resume = rt2x00soc_resume,
|
||||
};
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
|
||||
@@ -124,7 +124,7 @@ exit_free_device:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00soc_probe);
|
||||
|
||||
-int rt2x00soc_remove(struct platform_device *pdev)
|
||||
+void rt2x00soc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ieee80211_hw *hw = platform_get_drvdata(pdev);
|
||||
struct rt2x00_dev *rt2x00dev = hw->priv;
|
||||
@@ -135,8 +135,6 @@ int rt2x00soc_remove(struct platform_dev
|
||||
rt2x00lib_remove_dev(rt2x00dev);
|
||||
rt2x00soc_free_reg(rt2x00dev);
|
||||
ieee80211_free_hw(hw);
|
||||
-
|
||||
- return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00soc_remove);
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.h
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.h
|
||||
@@ -17,7 +17,7 @@
|
||||
* SoC driver handlers.
|
||||
*/
|
||||
int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops);
|
||||
-int rt2x00soc_remove(struct platform_device *pdev);
|
||||
+void rt2x00soc_remove(struct platform_device *pdev);
|
||||
#ifdef CONFIG_PM
|
||||
int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state);
|
||||
int rt2x00soc_resume(struct platform_device *pdev);
|
|
@ -1,374 +0,0 @@
|
|||
From 140403599b74839b0a57c5397b7e8579e5332364 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 18 Sep 2024 01:53:55 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Constify some arrays and structs
|
||||
|
||||
These are never modified, so make them const:
|
||||
|
||||
card_enable_flow_8703b
|
||||
card_disable_flow_8703b
|
||||
rtw8703b_ops
|
||||
|
||||
rtw8723d_ops
|
||||
card_enable_flow_8723d
|
||||
card_disable_flow_8723d
|
||||
|
||||
trans_carddis_to_cardemu_8821c
|
||||
trans_cardemu_to_act_8821c
|
||||
trans_act_to_cardemu_8821c
|
||||
trans_cardemu_to_carddis_8821c
|
||||
card_enable_flow_8821c
|
||||
card_disable_flow_8821c
|
||||
rtw8821c_dig
|
||||
page_table_8821c
|
||||
rqpn_table_8821c
|
||||
prioq_addrs_8821c
|
||||
rtw8821c_ops
|
||||
|
||||
card_enable_flow_8822b
|
||||
card_disable_flow_8822b
|
||||
prioq_addrs_8822b
|
||||
rtw8822b_ops
|
||||
rtw8822b_edcca_th
|
||||
|
||||
card_enable_flow_8822c
|
||||
card_disable_flow_8822c
|
||||
prioq_addrs_8822c
|
||||
rtw8822c_ops
|
||||
rtw8822c_edcca_th
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/dae7994f-3491-40de-b537-ebf68df084bb@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/fw.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/mac.c | 4 ++--
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 8 +++----
|
||||
drivers/net/wireless/realtek/rtw88/phy.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 6 ++---
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 6 ++---
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 22 +++++++++----------
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 10 ++++-----
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 10 ++++-----
|
||||
9 files changed, 35 insertions(+), 35 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/fw.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/fw.c
|
||||
@@ -267,7 +267,7 @@ static void rtw_fw_scan_result(struct rt
|
||||
static void rtw_fw_adaptivity_result(struct rtw_dev *rtwdev, u8 *payload,
|
||||
u8 length)
|
||||
{
|
||||
- struct rtw_hw_reg_offset *edcca_th = rtwdev->chip->edcca_th;
|
||||
+ const struct rtw_hw_reg_offset *edcca_th = rtwdev->chip->edcca_th;
|
||||
struct rtw_c2h_adaptivity *result = (struct rtw_c2h_adaptivity *)payload;
|
||||
|
||||
rtw_dbg(rtwdev, RTW_DBG_ADAPTIVITY,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/mac.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/mac.c
|
||||
@@ -228,7 +228,7 @@ static int rtw_sub_pwr_seq_parser(struct
|
||||
}
|
||||
|
||||
static int rtw_pwr_seq_parser(struct rtw_dev *rtwdev,
|
||||
- const struct rtw_pwr_seq_cmd **cmd_seq)
|
||||
+ const struct rtw_pwr_seq_cmd * const *cmd_seq)
|
||||
{
|
||||
u8 cut_mask;
|
||||
u8 intf_mask;
|
||||
@@ -271,7 +271,7 @@ static int rtw_pwr_seq_parser(struct rtw
|
||||
static int rtw_mac_power_switch(struct rtw_dev *rtwdev, bool pwr_on)
|
||||
{
|
||||
const struct rtw_chip_info *chip = rtwdev->chip;
|
||||
- const struct rtw_pwr_seq_cmd **pwr_seq;
|
||||
+ const struct rtw_pwr_seq_cmd * const *pwr_seq;
|
||||
u32 imr = 0;
|
||||
u8 rpwm;
|
||||
bool cur_pwr;
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -1167,7 +1167,7 @@ enum rtw_fwcd_item {
|
||||
|
||||
/* hardware configuration for each IC */
|
||||
struct rtw_chip_info {
|
||||
- struct rtw_chip_ops *ops;
|
||||
+ const struct rtw_chip_ops *ops;
|
||||
u8 id;
|
||||
|
||||
const char *fw_name;
|
||||
@@ -1209,8 +1209,8 @@ struct rtw_chip_info {
|
||||
|
||||
/* init values */
|
||||
u8 sys_func_en;
|
||||
- const struct rtw_pwr_seq_cmd **pwr_on_seq;
|
||||
- const struct rtw_pwr_seq_cmd **pwr_off_seq;
|
||||
+ const struct rtw_pwr_seq_cmd * const *pwr_on_seq;
|
||||
+ const struct rtw_pwr_seq_cmd * const *pwr_off_seq;
|
||||
const struct rtw_rqpn *rqpn_table;
|
||||
const struct rtw_prioq_addrs *prioq_addrs;
|
||||
const struct rtw_page_table *page_table;
|
||||
@@ -1242,7 +1242,7 @@ struct rtw_chip_info {
|
||||
u8 bfer_su_max_num;
|
||||
u8 bfer_mu_max_num;
|
||||
|
||||
- struct rtw_hw_reg_offset *edcca_th;
|
||||
+ const struct rtw_hw_reg_offset *edcca_th;
|
||||
s8 l2h_th_ini_cs;
|
||||
s8 l2h_th_ini_ad;
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
@@ -123,7 +123,7 @@ static void rtw_phy_cck_pd_init(struct r
|
||||
|
||||
void rtw_phy_set_edcca_th(struct rtw_dev *rtwdev, u8 l2h, u8 h2l)
|
||||
{
|
||||
- struct rtw_hw_reg_offset *edcca_th = rtwdev->chip->edcca_th;
|
||||
+ const struct rtw_hw_reg_offset *edcca_th = rtwdev->chip->edcca_th;
|
||||
|
||||
rtw_write32_mask(rtwdev,
|
||||
edcca_th[EDCCA_TH_L2H_IDX].hw_reg.addr,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
@@ -481,14 +481,14 @@ static const struct rtw_pwr_seq_cmd tran
|
||||
{TRANS_SEQ_END},
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_seq_cmd *card_enable_flow_8703b[] = {
|
||||
+static const struct rtw_pwr_seq_cmd * const card_enable_flow_8703b[] = {
|
||||
trans_pre_enable_8703b,
|
||||
trans_carddis_to_cardemu_8703b,
|
||||
trans_cardemu_to_act_8703b,
|
||||
NULL
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_seq_cmd *card_disable_flow_8703b[] = {
|
||||
+static const struct rtw_pwr_seq_cmd * const card_disable_flow_8703b[] = {
|
||||
trans_act_to_lps_8703b,
|
||||
trans_act_to_reset_mcu_8703b,
|
||||
trans_act_to_cardemu_8703b,
|
||||
@@ -1941,7 +1941,7 @@ static const struct coex_tdma_para tdma_
|
||||
{ {0x61, 0x08, 0x03, 0x11, 0x11} },
|
||||
};
|
||||
|
||||
-static struct rtw_chip_ops rtw8703b_ops = {
|
||||
+static const struct rtw_chip_ops rtw8703b_ops = {
|
||||
.mac_init = rtw8723x_mac_init,
|
||||
.dump_fw_crash = NULL,
|
||||
.shutdown = NULL,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
@@ -1430,7 +1430,7 @@ static void rtw8723d_pwr_track(struct rt
|
||||
dm_info->pwr_trk_triggered = false;
|
||||
}
|
||||
|
||||
-static struct rtw_chip_ops rtw8723d_ops = {
|
||||
+static const struct rtw_chip_ops rtw8723d_ops = {
|
||||
.phy_set_param = rtw8723d_phy_set_param,
|
||||
.read_efuse = rtw8723x_read_efuse,
|
||||
.query_rx_desc = rtw8723d_query_rx_desc,
|
||||
@@ -1788,7 +1788,7 @@ static const struct rtw_pwr_seq_cmd tran
|
||||
RTW_PWR_CMD_END, 0, 0},
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_seq_cmd *card_enable_flow_8723d[] = {
|
||||
+static const struct rtw_pwr_seq_cmd * const card_enable_flow_8723d[] = {
|
||||
trans_carddis_to_cardemu_8723d,
|
||||
trans_cardemu_to_act_8723d,
|
||||
NULL
|
||||
@@ -2004,7 +2004,7 @@ static const struct rtw_pwr_seq_cmd tran
|
||||
RTW_PWR_CMD_END, 0, 0},
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_seq_cmd *card_disable_flow_8723d[] = {
|
||||
+static const struct rtw_pwr_seq_cmd * const card_disable_flow_8723d[] = {
|
||||
trans_act_to_lps_8723d,
|
||||
trans_act_to_pre_carddis_8723d,
|
||||
trans_act_to_cardemu_8723d,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -1254,7 +1254,7 @@ static void rtw8821c_fill_txdesc_checksu
|
||||
fill_txdesc_checksum_common(txdesc, 16);
|
||||
}
|
||||
|
||||
-static struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8821c[] = {
|
||||
+static const struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8821c[] = {
|
||||
{0x0086,
|
||||
RTW_PWR_CUT_ALL_MSK,
|
||||
RTW_PWR_INTF_SDIO_MSK,
|
||||
@@ -1292,7 +1292,7 @@ static struct rtw_pwr_seq_cmd trans_card
|
||||
RTW_PWR_CMD_END, 0, 0},
|
||||
};
|
||||
|
||||
-static struct rtw_pwr_seq_cmd trans_cardemu_to_act_8821c[] = {
|
||||
+static const struct rtw_pwr_seq_cmd trans_cardemu_to_act_8821c[] = {
|
||||
{0x0020,
|
||||
RTW_PWR_CUT_ALL_MSK,
|
||||
RTW_PWR_INTF_USB_MSK | RTW_PWR_INTF_SDIO_MSK,
|
||||
@@ -1396,7 +1396,7 @@ static struct rtw_pwr_seq_cmd trans_card
|
||||
RTW_PWR_CMD_END, 0, 0},
|
||||
};
|
||||
|
||||
-static struct rtw_pwr_seq_cmd trans_act_to_cardemu_8821c[] = {
|
||||
+static const struct rtw_pwr_seq_cmd trans_act_to_cardemu_8821c[] = {
|
||||
{0x0093,
|
||||
RTW_PWR_CUT_ALL_MSK,
|
||||
RTW_PWR_INTF_ALL_MSK,
|
||||
@@ -1454,7 +1454,7 @@ static struct rtw_pwr_seq_cmd trans_act_
|
||||
RTW_PWR_CMD_END, 0, 0},
|
||||
};
|
||||
|
||||
-static struct rtw_pwr_seq_cmd trans_cardemu_to_carddis_8821c[] = {
|
||||
+static const struct rtw_pwr_seq_cmd trans_cardemu_to_carddis_8821c[] = {
|
||||
{0x0007,
|
||||
RTW_PWR_CUT_ALL_MSK,
|
||||
RTW_PWR_INTF_USB_MSK | RTW_PWR_INTF_SDIO_MSK,
|
||||
@@ -1567,13 +1567,13 @@ static struct rtw_pwr_seq_cmd trans_card
|
||||
RTW_PWR_CMD_END, 0, 0},
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_seq_cmd *card_enable_flow_8821c[] = {
|
||||
+static const struct rtw_pwr_seq_cmd * const card_enable_flow_8821c[] = {
|
||||
trans_carddis_to_cardemu_8821c,
|
||||
trans_cardemu_to_act_8821c,
|
||||
NULL
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_seq_cmd *card_disable_flow_8821c[] = {
|
||||
+static const struct rtw_pwr_seq_cmd * const card_disable_flow_8821c[] = {
|
||||
trans_act_to_cardemu_8821c,
|
||||
trans_cardemu_to_carddis_8821c,
|
||||
NULL
|
||||
@@ -1629,7 +1629,7 @@ static const struct rtw_rfe_def rtw8821c
|
||||
[6] = RTW_DEF_RFE(8821c, 0, 0),
|
||||
};
|
||||
|
||||
-static struct rtw_hw_reg rtw8821c_dig[] = {
|
||||
+static const struct rtw_hw_reg rtw8821c_dig[] = {
|
||||
[0] = { .addr = 0xc50, .mask = 0x7f },
|
||||
};
|
||||
|
||||
@@ -1639,7 +1639,7 @@ static const struct rtw_ltecoex_addr rtw
|
||||
.rdata = LTECOEX_READ_DATA,
|
||||
};
|
||||
|
||||
-static struct rtw_page_table page_table_8821c[] = {
|
||||
+static const struct rtw_page_table page_table_8821c[] = {
|
||||
/* not sure what [0] stands for */
|
||||
{16, 16, 16, 14, 1},
|
||||
{16, 16, 16, 14, 1},
|
||||
@@ -1648,7 +1648,7 @@ static struct rtw_page_table page_table_
|
||||
{16, 16, 16, 14, 1},
|
||||
};
|
||||
|
||||
-static struct rtw_rqpn rqpn_table_8821c[] = {
|
||||
+static const struct rtw_rqpn rqpn_table_8821c[] = {
|
||||
/* not sure what [0] stands for */
|
||||
{RTW_DMA_MAPPING_NORMAL, RTW_DMA_MAPPING_NORMAL,
|
||||
RTW_DMA_MAPPING_LOW, RTW_DMA_MAPPING_LOW,
|
||||
@@ -1667,7 +1667,7 @@ static struct rtw_rqpn rqpn_table_8821c[
|
||||
RTW_DMA_MAPPING_EXTRA, RTW_DMA_MAPPING_HIGH},
|
||||
};
|
||||
|
||||
-static struct rtw_prioq_addrs prioq_addrs_8821c = {
|
||||
+static const struct rtw_prioq_addrs prioq_addrs_8821c = {
|
||||
.prio[RTW_DMA_MAPPING_EXTRA] = {
|
||||
.rsvd = REG_FIFOPAGE_INFO_4, .avail = REG_FIFOPAGE_INFO_4 + 2,
|
||||
},
|
||||
@@ -1683,7 +1683,7 @@ static struct rtw_prioq_addrs prioq_addr
|
||||
.wsize = true,
|
||||
};
|
||||
|
||||
-static struct rtw_chip_ops rtw8821c_ops = {
|
||||
+static const struct rtw_chip_ops rtw8821c_ops = {
|
||||
.phy_set_param = rtw8821c_phy_set_param,
|
||||
.read_efuse = rtw8821c_read_efuse,
|
||||
.query_rx_desc = rtw8821c_query_rx_desc,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
@@ -1978,13 +1978,13 @@ static const struct rtw_pwr_seq_cmd tran
|
||||
RTW_PWR_CMD_END, 0, 0},
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_seq_cmd *card_enable_flow_8822b[] = {
|
||||
+static const struct rtw_pwr_seq_cmd * const card_enable_flow_8822b[] = {
|
||||
trans_carddis_to_cardemu_8822b,
|
||||
trans_cardemu_to_act_8822b,
|
||||
NULL
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_seq_cmd *card_disable_flow_8822b[] = {
|
||||
+static const struct rtw_pwr_seq_cmd * const card_disable_flow_8822b[] = {
|
||||
trans_act_to_cardemu_8822b,
|
||||
trans_cardemu_to_carddis_8822b,
|
||||
NULL
|
||||
@@ -2156,7 +2156,7 @@ static const struct rtw_rqpn rqpn_table_
|
||||
RTW_DMA_MAPPING_EXTRA, RTW_DMA_MAPPING_HIGH},
|
||||
};
|
||||
|
||||
-static struct rtw_prioq_addrs prioq_addrs_8822b = {
|
||||
+static const struct rtw_prioq_addrs prioq_addrs_8822b = {
|
||||
.prio[RTW_DMA_MAPPING_EXTRA] = {
|
||||
.rsvd = REG_FIFOPAGE_INFO_4, .avail = REG_FIFOPAGE_INFO_4 + 2,
|
||||
},
|
||||
@@ -2172,7 +2172,7 @@ static struct rtw_prioq_addrs prioq_addr
|
||||
.wsize = true,
|
||||
};
|
||||
|
||||
-static struct rtw_chip_ops rtw8822b_ops = {
|
||||
+static const struct rtw_chip_ops rtw8822b_ops = {
|
||||
.phy_set_param = rtw8822b_phy_set_param,
|
||||
.read_efuse = rtw8822b_read_efuse,
|
||||
.query_rx_desc = rtw8822b_query_rx_desc,
|
||||
@@ -2521,7 +2521,7 @@ static const struct rtw_reg_domain coex_
|
||||
{0xc50, MASKBYTE0, RTW_REG_DOMAIN_MAC8},
|
||||
};
|
||||
|
||||
-static struct rtw_hw_reg_offset rtw8822b_edcca_th[] = {
|
||||
+static const struct rtw_hw_reg_offset rtw8822b_edcca_th[] = {
|
||||
[EDCCA_TH_L2H_IDX] = {{.addr = 0x8a4, .mask = MASKBYTE0}, .offset = 0},
|
||||
[EDCCA_TH_H2L_IDX] = {{.addr = 0x8a4, .mask = MASKBYTE1}, .offset = 0},
|
||||
};
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -4874,13 +4874,13 @@ static const struct rtw_pwr_seq_cmd tran
|
||||
RTW_PWR_CMD_END, 0, 0},
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_seq_cmd *card_enable_flow_8822c[] = {
|
||||
+static const struct rtw_pwr_seq_cmd * const card_enable_flow_8822c[] = {
|
||||
trans_carddis_to_cardemu_8822c,
|
||||
trans_cardemu_to_act_8822c,
|
||||
NULL
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_seq_cmd *card_disable_flow_8822c[] = {
|
||||
+static const struct rtw_pwr_seq_cmd * const card_disable_flow_8822c[] = {
|
||||
trans_act_to_cardemu_8822c,
|
||||
trans_cardemu_to_carddis_8822c,
|
||||
NULL
|
||||
@@ -4972,7 +4972,7 @@ static const struct rtw_rqpn rqpn_table_
|
||||
RTW_DMA_MAPPING_EXTRA, RTW_DMA_MAPPING_HIGH},
|
||||
};
|
||||
|
||||
-static struct rtw_prioq_addrs prioq_addrs_8822c = {
|
||||
+static const struct rtw_prioq_addrs prioq_addrs_8822c = {
|
||||
.prio[RTW_DMA_MAPPING_EXTRA] = {
|
||||
.rsvd = REG_FIFOPAGE_INFO_4, .avail = REG_FIFOPAGE_INFO_4 + 2,
|
||||
},
|
||||
@@ -4988,7 +4988,7 @@ static struct rtw_prioq_addrs prioq_addr
|
||||
.wsize = true,
|
||||
};
|
||||
|
||||
-static struct rtw_chip_ops rtw8822c_ops = {
|
||||
+static const struct rtw_chip_ops rtw8822c_ops = {
|
||||
.phy_set_param = rtw8822c_phy_set_param,
|
||||
.read_efuse = rtw8822c_read_efuse,
|
||||
.query_rx_desc = rtw8822c_query_rx_desc,
|
||||
@@ -5301,7 +5301,7 @@ static const struct rtw_pwr_track_tbl rt
|
||||
.pwrtrk_2g_ccka_p = rtw8822c_pwrtrk_2g_cck_a_p,
|
||||
};
|
||||
|
||||
-static struct rtw_hw_reg_offset rtw8822c_edcca_th[] = {
|
||||
+static const struct rtw_hw_reg_offset rtw8822c_edcca_th[] = {
|
||||
[EDCCA_TH_L2H_IDX] = {
|
||||
{.addr = 0x84c, .mask = MASKBYTE2}, .offset = 0x80
|
||||
},
|
|
@ -1,560 +0,0 @@
|
|||
From bbb6f9be7f99464d5ab7e2f321fa728d33eeec9a Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Fri, 20 Sep 2024 22:27:30 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Parse the RX descriptor with a single function
|
||||
|
||||
rtw8703b_query_rx_desc(), rtw8723d_query_rx_desc(),
|
||||
rtw8821c_query_rx_desc(), rtw8822b_query_rx_desc(), and
|
||||
rtw8822c_query_rx_desc() are almost identical, so replace them all with
|
||||
a single function, rtw_rx_query_rx_desc().
|
||||
|
||||
Also, access the RX descriptor using a struct with __le32 members and
|
||||
le32_get_bits().
|
||||
|
||||
Tested with RTL8811CU, RTL8811AU, and RTL8812AU.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Tested-by: Ping-Ke Shih <pkshih@realtek.com> # RTL8723DE and RTL8822CE
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/913f1747-38fc-4409-85a4-57bb9cee506b@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 5 +-
|
||||
drivers/net/wireless/realtek/rtw88/pci.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 56 +--------------
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 43 +-----------
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 43 +-----------
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 43 +-----------
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 44 +-----------
|
||||
drivers/net/wireless/realtek/rtw88/rx.c | 70 +++++++++++++++++--
|
||||
drivers/net/wireless/realtek/rtw88/rx.h | 64 ++++++++---------
|
||||
drivers/net/wireless/realtek/rtw88/sdio.c | 3 +-
|
||||
drivers/net/wireless/realtek/rtw88/usb.c | 4 +-
|
||||
11 files changed, 106 insertions(+), 271 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -848,9 +848,8 @@ struct rtw_chip_ops {
|
||||
void (*phy_set_param)(struct rtw_dev *rtwdev);
|
||||
void (*set_channel)(struct rtw_dev *rtwdev, u8 channel,
|
||||
u8 bandwidth, u8 primary_chan_idx);
|
||||
- void (*query_rx_desc)(struct rtw_dev *rtwdev, u8 *rx_desc,
|
||||
- struct rtw_rx_pkt_stat *pkt_stat,
|
||||
- struct ieee80211_rx_status *rx_status);
|
||||
+ void (*query_phy_status)(struct rtw_dev *rtwdev, u8 *phy_status,
|
||||
+ struct rtw_rx_pkt_stat *pkt_stat);
|
||||
u32 (*read_rf)(struct rtw_dev *rtwdev, enum rtw_rf_path rf_path,
|
||||
u32 addr, u32 mask);
|
||||
bool (*write_rf)(struct rtw_dev *rtwdev, enum rtw_rf_path rf_path,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/pci.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
|
||||
@@ -1065,7 +1065,7 @@ static u32 rtw_pci_rx_napi(struct rtw_de
|
||||
dma_sync_single_for_cpu(rtwdev->dev, dma, RTK_PCI_RX_BUF_SIZE,
|
||||
DMA_FROM_DEVICE);
|
||||
rx_desc = skb->data;
|
||||
- chip->ops->query_rx_desc(rtwdev, rx_desc, &pkt_stat, &rx_status);
|
||||
+ rtw_rx_query_rx_desc(rtwdev, rx_desc, &pkt_stat, &rx_status);
|
||||
|
||||
/* offset from rx_desc to payload */
|
||||
pkt_offset = pkt_desc_sz + pkt_stat.drv_info_sz +
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
@@ -29,9 +29,6 @@
|
||||
#define TBTT_PROHIBIT_HOLD_TIME 0x80
|
||||
#define TBTT_PROHIBIT_HOLD_TIME_STOP_BCN 0x64
|
||||
|
||||
-/* raw pkt_stat->drv_info_sz is in unit of 8-bytes */
|
||||
-#define RX_DRV_INFO_SZ_UNIT_8703B 8
|
||||
-
|
||||
#define TRANS_SEQ_END \
|
||||
0xFFFF, \
|
||||
RTW_PWR_CUT_ALL_MSK, \
|
||||
@@ -1032,57 +1029,6 @@ static void query_phy_status(struct rtw_
|
||||
query_phy_status_ofdm(rtwdev, phy_status, pkt_stat);
|
||||
}
|
||||
|
||||
-static void rtw8703b_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
|
||||
- struct rtw_rx_pkt_stat *pkt_stat,
|
||||
- struct ieee80211_rx_status *rx_status)
|
||||
-{
|
||||
- struct ieee80211_hdr *hdr;
|
||||
- u32 desc_sz = rtwdev->chip->rx_pkt_desc_sz;
|
||||
- u8 *phy_status = NULL;
|
||||
-
|
||||
- memset(pkt_stat, 0, sizeof(*pkt_stat));
|
||||
-
|
||||
- pkt_stat->phy_status = GET_RX_DESC_PHYST(rx_desc);
|
||||
- pkt_stat->icv_err = GET_RX_DESC_ICV_ERR(rx_desc);
|
||||
- pkt_stat->crc_err = GET_RX_DESC_CRC32(rx_desc);
|
||||
- pkt_stat->decrypted = !GET_RX_DESC_SWDEC(rx_desc) &&
|
||||
- GET_RX_DESC_ENC_TYPE(rx_desc) != RX_DESC_ENC_NONE;
|
||||
- pkt_stat->is_c2h = GET_RX_DESC_C2H(rx_desc);
|
||||
- pkt_stat->pkt_len = GET_RX_DESC_PKT_LEN(rx_desc);
|
||||
- pkt_stat->drv_info_sz = GET_RX_DESC_DRV_INFO_SIZE(rx_desc);
|
||||
- pkt_stat->shift = GET_RX_DESC_SHIFT(rx_desc);
|
||||
- pkt_stat->rate = GET_RX_DESC_RX_RATE(rx_desc);
|
||||
- pkt_stat->cam_id = GET_RX_DESC_MACID(rx_desc);
|
||||
- pkt_stat->ppdu_cnt = 0;
|
||||
- pkt_stat->tsf_low = GET_RX_DESC_TSFL(rx_desc);
|
||||
-
|
||||
- pkt_stat->drv_info_sz *= RX_DRV_INFO_SZ_UNIT_8703B;
|
||||
-
|
||||
- if (pkt_stat->is_c2h)
|
||||
- return;
|
||||
-
|
||||
- hdr = (struct ieee80211_hdr *)(rx_desc + desc_sz + pkt_stat->shift +
|
||||
- pkt_stat->drv_info_sz);
|
||||
-
|
||||
- pkt_stat->bw = GET_RX_DESC_BW(rx_desc);
|
||||
-
|
||||
- if (pkt_stat->phy_status) {
|
||||
- phy_status = rx_desc + desc_sz + pkt_stat->shift;
|
||||
- query_phy_status(rtwdev, phy_status, pkt_stat);
|
||||
- }
|
||||
-
|
||||
- rtw_rx_fill_rx_status(rtwdev, pkt_stat, hdr, rx_status, phy_status);
|
||||
-
|
||||
- /* Rtl8723cs driver checks for size < 14 or size > 8192 and
|
||||
- * simply drops the packet. Maybe this should go into
|
||||
- * rtw_rx_fill_rx_status()?
|
||||
- */
|
||||
- if (pkt_stat->pkt_len == 0) {
|
||||
- rx_status->flag |= RX_FLAG_NO_PSDU;
|
||||
- rtw_dbg(rtwdev, RTW_DBG_RX, "zero length packet");
|
||||
- }
|
||||
-}
|
||||
-
|
||||
#define ADDA_ON_VAL_8703B 0x03c00014
|
||||
|
||||
static
|
||||
@@ -1948,7 +1894,7 @@ static const struct rtw_chip_ops rtw8703
|
||||
.read_efuse = rtw8703b_read_efuse,
|
||||
.phy_set_param = rtw8703b_phy_set_param,
|
||||
.set_channel = rtw8703b_set_channel,
|
||||
- .query_rx_desc = rtw8703b_query_rx_desc,
|
||||
+ .query_phy_status = query_phy_status,
|
||||
.read_rf = rtw_phy_read_rf_sipi,
|
||||
.write_rf = rtw_phy_write_rf_reg_sipi,
|
||||
.set_tx_power_index = rtw8723x_set_tx_power_index,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
@@ -227,47 +227,6 @@ static void query_phy_status(struct rtw_
|
||||
}
|
||||
}
|
||||
|
||||
-static void rtw8723d_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
|
||||
- struct rtw_rx_pkt_stat *pkt_stat,
|
||||
- struct ieee80211_rx_status *rx_status)
|
||||
-{
|
||||
- struct ieee80211_hdr *hdr;
|
||||
- u32 desc_sz = rtwdev->chip->rx_pkt_desc_sz;
|
||||
- u8 *phy_status = NULL;
|
||||
-
|
||||
- memset(pkt_stat, 0, sizeof(*pkt_stat));
|
||||
-
|
||||
- pkt_stat->phy_status = GET_RX_DESC_PHYST(rx_desc);
|
||||
- pkt_stat->icv_err = GET_RX_DESC_ICV_ERR(rx_desc);
|
||||
- pkt_stat->crc_err = GET_RX_DESC_CRC32(rx_desc);
|
||||
- pkt_stat->decrypted = !GET_RX_DESC_SWDEC(rx_desc) &&
|
||||
- GET_RX_DESC_ENC_TYPE(rx_desc) != RX_DESC_ENC_NONE;
|
||||
- pkt_stat->is_c2h = GET_RX_DESC_C2H(rx_desc);
|
||||
- pkt_stat->pkt_len = GET_RX_DESC_PKT_LEN(rx_desc);
|
||||
- pkt_stat->drv_info_sz = GET_RX_DESC_DRV_INFO_SIZE(rx_desc);
|
||||
- pkt_stat->shift = GET_RX_DESC_SHIFT(rx_desc);
|
||||
- pkt_stat->rate = GET_RX_DESC_RX_RATE(rx_desc);
|
||||
- pkt_stat->cam_id = GET_RX_DESC_MACID(rx_desc);
|
||||
- pkt_stat->ppdu_cnt = 0;
|
||||
- pkt_stat->tsf_low = GET_RX_DESC_TSFL(rx_desc);
|
||||
-
|
||||
- /* drv_info_sz is in unit of 8-bytes */
|
||||
- pkt_stat->drv_info_sz *= 8;
|
||||
-
|
||||
- /* c2h cmd pkt's rx/phy status is not interested */
|
||||
- if (pkt_stat->is_c2h)
|
||||
- return;
|
||||
-
|
||||
- hdr = (struct ieee80211_hdr *)(rx_desc + desc_sz + pkt_stat->shift +
|
||||
- pkt_stat->drv_info_sz);
|
||||
- if (pkt_stat->phy_status) {
|
||||
- phy_status = rx_desc + desc_sz + pkt_stat->shift;
|
||||
- query_phy_status(rtwdev, phy_status, pkt_stat);
|
||||
- }
|
||||
-
|
||||
- rtw_rx_fill_rx_status(rtwdev, pkt_stat, hdr, rx_status, phy_status);
|
||||
-}
|
||||
-
|
||||
static bool rtw8723d_check_spur_ov_thres(struct rtw_dev *rtwdev,
|
||||
u8 channel, u32 thres)
|
||||
{
|
||||
@@ -1433,7 +1392,7 @@ static void rtw8723d_pwr_track(struct rt
|
||||
static const struct rtw_chip_ops rtw8723d_ops = {
|
||||
.phy_set_param = rtw8723d_phy_set_param,
|
||||
.read_efuse = rtw8723x_read_efuse,
|
||||
- .query_rx_desc = rtw8723d_query_rx_desc,
|
||||
+ .query_phy_status = query_phy_status,
|
||||
.set_channel = rtw8723d_set_channel,
|
||||
.mac_init = rtw8723x_mac_init,
|
||||
.shutdown = rtw8723d_shutdown,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -679,47 +679,6 @@ static void query_phy_status(struct rtw_
|
||||
}
|
||||
}
|
||||
|
||||
-static void rtw8821c_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
|
||||
- struct rtw_rx_pkt_stat *pkt_stat,
|
||||
- struct ieee80211_rx_status *rx_status)
|
||||
-{
|
||||
- struct ieee80211_hdr *hdr;
|
||||
- u32 desc_sz = rtwdev->chip->rx_pkt_desc_sz;
|
||||
- u8 *phy_status = NULL;
|
||||
-
|
||||
- memset(pkt_stat, 0, sizeof(*pkt_stat));
|
||||
-
|
||||
- pkt_stat->phy_status = GET_RX_DESC_PHYST(rx_desc);
|
||||
- pkt_stat->icv_err = GET_RX_DESC_ICV_ERR(rx_desc);
|
||||
- pkt_stat->crc_err = GET_RX_DESC_CRC32(rx_desc);
|
||||
- pkt_stat->decrypted = !GET_RX_DESC_SWDEC(rx_desc) &&
|
||||
- GET_RX_DESC_ENC_TYPE(rx_desc) != RX_DESC_ENC_NONE;
|
||||
- pkt_stat->is_c2h = GET_RX_DESC_C2H(rx_desc);
|
||||
- pkt_stat->pkt_len = GET_RX_DESC_PKT_LEN(rx_desc);
|
||||
- pkt_stat->drv_info_sz = GET_RX_DESC_DRV_INFO_SIZE(rx_desc);
|
||||
- pkt_stat->shift = GET_RX_DESC_SHIFT(rx_desc);
|
||||
- pkt_stat->rate = GET_RX_DESC_RX_RATE(rx_desc);
|
||||
- pkt_stat->cam_id = GET_RX_DESC_MACID(rx_desc);
|
||||
- pkt_stat->ppdu_cnt = GET_RX_DESC_PPDU_CNT(rx_desc);
|
||||
- pkt_stat->tsf_low = GET_RX_DESC_TSFL(rx_desc);
|
||||
-
|
||||
- /* drv_info_sz is in unit of 8-bytes */
|
||||
- pkt_stat->drv_info_sz *= 8;
|
||||
-
|
||||
- /* c2h cmd pkt's rx/phy status is not interested */
|
||||
- if (pkt_stat->is_c2h)
|
||||
- return;
|
||||
-
|
||||
- hdr = (struct ieee80211_hdr *)(rx_desc + desc_sz + pkt_stat->shift +
|
||||
- pkt_stat->drv_info_sz);
|
||||
- if (pkt_stat->phy_status) {
|
||||
- phy_status = rx_desc + desc_sz + pkt_stat->shift;
|
||||
- query_phy_status(rtwdev, phy_status, pkt_stat);
|
||||
- }
|
||||
-
|
||||
- rtw_rx_fill_rx_status(rtwdev, pkt_stat, hdr, rx_status, phy_status);
|
||||
-}
|
||||
-
|
||||
static void
|
||||
rtw8821c_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
|
||||
{
|
||||
@@ -1686,7 +1645,7 @@ static const struct rtw_prioq_addrs prio
|
||||
static const struct rtw_chip_ops rtw8821c_ops = {
|
||||
.phy_set_param = rtw8821c_phy_set_param,
|
||||
.read_efuse = rtw8821c_read_efuse,
|
||||
- .query_rx_desc = rtw8821c_query_rx_desc,
|
||||
+ .query_phy_status = query_phy_status,
|
||||
.set_channel = rtw8821c_set_channel,
|
||||
.mac_init = rtw8821c_mac_init,
|
||||
.read_rf = rtw_phy_read_rf,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
@@ -934,47 +934,6 @@ static void query_phy_status(struct rtw_
|
||||
}
|
||||
}
|
||||
|
||||
-static void rtw8822b_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
|
||||
- struct rtw_rx_pkt_stat *pkt_stat,
|
||||
- struct ieee80211_rx_status *rx_status)
|
||||
-{
|
||||
- struct ieee80211_hdr *hdr;
|
||||
- u32 desc_sz = rtwdev->chip->rx_pkt_desc_sz;
|
||||
- u8 *phy_status = NULL;
|
||||
-
|
||||
- memset(pkt_stat, 0, sizeof(*pkt_stat));
|
||||
-
|
||||
- pkt_stat->phy_status = GET_RX_DESC_PHYST(rx_desc);
|
||||
- pkt_stat->icv_err = GET_RX_DESC_ICV_ERR(rx_desc);
|
||||
- pkt_stat->crc_err = GET_RX_DESC_CRC32(rx_desc);
|
||||
- pkt_stat->decrypted = !GET_RX_DESC_SWDEC(rx_desc) &&
|
||||
- GET_RX_DESC_ENC_TYPE(rx_desc) != RX_DESC_ENC_NONE;
|
||||
- pkt_stat->is_c2h = GET_RX_DESC_C2H(rx_desc);
|
||||
- pkt_stat->pkt_len = GET_RX_DESC_PKT_LEN(rx_desc);
|
||||
- pkt_stat->drv_info_sz = GET_RX_DESC_DRV_INFO_SIZE(rx_desc);
|
||||
- pkt_stat->shift = GET_RX_DESC_SHIFT(rx_desc);
|
||||
- pkt_stat->rate = GET_RX_DESC_RX_RATE(rx_desc);
|
||||
- pkt_stat->cam_id = GET_RX_DESC_MACID(rx_desc);
|
||||
- pkt_stat->ppdu_cnt = GET_RX_DESC_PPDU_CNT(rx_desc);
|
||||
- pkt_stat->tsf_low = GET_RX_DESC_TSFL(rx_desc);
|
||||
-
|
||||
- /* drv_info_sz is in unit of 8-bytes */
|
||||
- pkt_stat->drv_info_sz *= 8;
|
||||
-
|
||||
- /* c2h cmd pkt's rx/phy status is not interested */
|
||||
- if (pkt_stat->is_c2h)
|
||||
- return;
|
||||
-
|
||||
- hdr = (struct ieee80211_hdr *)(rx_desc + desc_sz + pkt_stat->shift +
|
||||
- pkt_stat->drv_info_sz);
|
||||
- if (pkt_stat->phy_status) {
|
||||
- phy_status = rx_desc + desc_sz + pkt_stat->shift;
|
||||
- query_phy_status(rtwdev, phy_status, pkt_stat);
|
||||
- }
|
||||
-
|
||||
- rtw_rx_fill_rx_status(rtwdev, pkt_stat, hdr, rx_status, phy_status);
|
||||
-}
|
||||
-
|
||||
static void
|
||||
rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
|
||||
{
|
||||
@@ -2175,7 +2134,7 @@ static const struct rtw_prioq_addrs prio
|
||||
static const struct rtw_chip_ops rtw8822b_ops = {
|
||||
.phy_set_param = rtw8822b_phy_set_param,
|
||||
.read_efuse = rtw8822b_read_efuse,
|
||||
- .query_rx_desc = rtw8822b_query_rx_desc,
|
||||
+ .query_phy_status = query_phy_status,
|
||||
.set_channel = rtw8822b_set_channel,
|
||||
.mac_init = rtw8822b_mac_init,
|
||||
.read_rf = rtw_phy_read_rf,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -2690,48 +2690,6 @@ static void query_phy_status(struct rtw_
|
||||
}
|
||||
}
|
||||
|
||||
-static void rtw8822c_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
|
||||
- struct rtw_rx_pkt_stat *pkt_stat,
|
||||
- struct ieee80211_rx_status *rx_status)
|
||||
-{
|
||||
- struct ieee80211_hdr *hdr;
|
||||
- u32 desc_sz = rtwdev->chip->rx_pkt_desc_sz;
|
||||
- u8 *phy_status = NULL;
|
||||
-
|
||||
- memset(pkt_stat, 0, sizeof(*pkt_stat));
|
||||
-
|
||||
- pkt_stat->phy_status = GET_RX_DESC_PHYST(rx_desc);
|
||||
- pkt_stat->icv_err = GET_RX_DESC_ICV_ERR(rx_desc);
|
||||
- pkt_stat->crc_err = GET_RX_DESC_CRC32(rx_desc);
|
||||
- pkt_stat->decrypted = !GET_RX_DESC_SWDEC(rx_desc) &&
|
||||
- GET_RX_DESC_ENC_TYPE(rx_desc) != RX_DESC_ENC_NONE;
|
||||
- pkt_stat->is_c2h = GET_RX_DESC_C2H(rx_desc);
|
||||
- pkt_stat->pkt_len = GET_RX_DESC_PKT_LEN(rx_desc);
|
||||
- pkt_stat->drv_info_sz = GET_RX_DESC_DRV_INFO_SIZE(rx_desc);
|
||||
- pkt_stat->shift = GET_RX_DESC_SHIFT(rx_desc);
|
||||
- pkt_stat->rate = GET_RX_DESC_RX_RATE(rx_desc);
|
||||
- pkt_stat->cam_id = GET_RX_DESC_MACID(rx_desc);
|
||||
- pkt_stat->ppdu_cnt = GET_RX_DESC_PPDU_CNT(rx_desc);
|
||||
- pkt_stat->tsf_low = GET_RX_DESC_TSFL(rx_desc);
|
||||
-
|
||||
- /* drv_info_sz is in unit of 8-bytes */
|
||||
- pkt_stat->drv_info_sz *= 8;
|
||||
-
|
||||
- /* c2h cmd pkt's rx/phy status is not interested */
|
||||
- if (pkt_stat->is_c2h)
|
||||
- return;
|
||||
-
|
||||
- hdr = (struct ieee80211_hdr *)(rx_desc + desc_sz + pkt_stat->shift +
|
||||
- pkt_stat->drv_info_sz);
|
||||
- pkt_stat->hdr = hdr;
|
||||
- if (pkt_stat->phy_status) {
|
||||
- phy_status = rx_desc + desc_sz + pkt_stat->shift;
|
||||
- query_phy_status(rtwdev, phy_status, pkt_stat);
|
||||
- }
|
||||
-
|
||||
- rtw_rx_fill_rx_status(rtwdev, pkt_stat, hdr, rx_status, phy_status);
|
||||
-}
|
||||
-
|
||||
static void
|
||||
rtw8822c_set_write_tx_power_ref(struct rtw_dev *rtwdev, u8 *tx_pwr_ref_cck,
|
||||
u8 *tx_pwr_ref_ofdm)
|
||||
@@ -4991,7 +4949,7 @@ static const struct rtw_prioq_addrs prio
|
||||
static const struct rtw_chip_ops rtw8822c_ops = {
|
||||
.phy_set_param = rtw8822c_phy_set_param,
|
||||
.read_efuse = rtw8822c_read_efuse,
|
||||
- .query_rx_desc = rtw8822c_query_rx_desc,
|
||||
+ .query_phy_status = query_phy_status,
|
||||
.set_channel = rtw8822c_set_channel,
|
||||
.mac_init = rtw8822c_mac_init,
|
||||
.dump_fw_crash = rtw8822c_dump_fw_crash,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rx.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rx.c
|
||||
@@ -187,11 +187,10 @@ fill_rx_status:
|
||||
}
|
||||
EXPORT_SYMBOL(rtw_update_rx_freq_from_ie);
|
||||
|
||||
-void rtw_rx_fill_rx_status(struct rtw_dev *rtwdev,
|
||||
- struct rtw_rx_pkt_stat *pkt_stat,
|
||||
- struct ieee80211_hdr *hdr,
|
||||
- struct ieee80211_rx_status *rx_status,
|
||||
- u8 *phy_status)
|
||||
+static void rtw_rx_fill_rx_status(struct rtw_dev *rtwdev,
|
||||
+ struct rtw_rx_pkt_stat *pkt_stat,
|
||||
+ struct ieee80211_hdr *hdr,
|
||||
+ struct ieee80211_rx_status *rx_status)
|
||||
{
|
||||
struct ieee80211_hw *hw = rtwdev->hw;
|
||||
u8 path;
|
||||
@@ -242,5 +241,64 @@ void rtw_rx_fill_rx_status(struct rtw_de
|
||||
}
|
||||
|
||||
rtw_rx_addr_match(rtwdev, pkt_stat, hdr);
|
||||
+
|
||||
+ /* Rtl8723cs driver checks for size < 14 or size > 8192 and
|
||||
+ * simply drops the packet.
|
||||
+ */
|
||||
+ if (rtwdev->chip->id == RTW_CHIP_TYPE_8703B && pkt_stat->pkt_len == 0) {
|
||||
+ rx_status->flag |= RX_FLAG_NO_PSDU;
|
||||
+ rtw_dbg(rtwdev, RTW_DBG_RX, "zero length packet");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void rtw_rx_query_rx_desc(struct rtw_dev *rtwdev, void *rx_desc8,
|
||||
+ struct rtw_rx_pkt_stat *pkt_stat,
|
||||
+ struct ieee80211_rx_status *rx_status)
|
||||
+{
|
||||
+ u32 desc_sz = rtwdev->chip->rx_pkt_desc_sz;
|
||||
+ struct rtw_rx_desc *rx_desc = rx_desc8;
|
||||
+ struct ieee80211_hdr *hdr;
|
||||
+ u32 enc_type, swdec;
|
||||
+ void *phy_status;
|
||||
+
|
||||
+ memset(pkt_stat, 0, sizeof(*pkt_stat));
|
||||
+
|
||||
+ pkt_stat->pkt_len = le32_get_bits(rx_desc->w0, RTW_RX_DESC_W0_PKT_LEN);
|
||||
+ pkt_stat->crc_err = le32_get_bits(rx_desc->w0, RTW_RX_DESC_W0_CRC32);
|
||||
+ pkt_stat->icv_err = le32_get_bits(rx_desc->w0, RTW_RX_DESC_W0_ICV_ERR);
|
||||
+ pkt_stat->drv_info_sz = le32_get_bits(rx_desc->w0,
|
||||
+ RTW_RX_DESC_W0_DRV_INFO_SIZE);
|
||||
+ enc_type = le32_get_bits(rx_desc->w0, RTW_RX_DESC_W0_ENC_TYPE);
|
||||
+ pkt_stat->shift = le32_get_bits(rx_desc->w0, RTW_RX_DESC_W0_SHIFT);
|
||||
+ pkt_stat->phy_status = le32_get_bits(rx_desc->w0, RTW_RX_DESC_W0_PHYST);
|
||||
+ swdec = le32_get_bits(rx_desc->w0, RTW_RX_DESC_W0_SWDEC);
|
||||
+ pkt_stat->decrypted = !swdec && enc_type != RX_DESC_ENC_NONE;
|
||||
+
|
||||
+ pkt_stat->cam_id = le32_get_bits(rx_desc->w1, RTW_RX_DESC_W1_MACID);
|
||||
+
|
||||
+ pkt_stat->is_c2h = le32_get_bits(rx_desc->w2, RTW_RX_DESC_W2_C2H);
|
||||
+ pkt_stat->ppdu_cnt = le32_get_bits(rx_desc->w2, RTW_RX_DESC_W2_PPDU_CNT);
|
||||
+
|
||||
+ pkt_stat->rate = le32_get_bits(rx_desc->w3, RTW_RX_DESC_W3_RX_RATE);
|
||||
+
|
||||
+ pkt_stat->bw = le32_get_bits(rx_desc->w4, RTW_RX_DESC_W4_BW);
|
||||
+
|
||||
+ pkt_stat->tsf_low = le32_get_bits(rx_desc->w5, RTW_RX_DESC_W5_TSFL);
|
||||
+
|
||||
+ /* drv_info_sz is in unit of 8-bytes */
|
||||
+ pkt_stat->drv_info_sz *= 8;
|
||||
+
|
||||
+ /* c2h cmd pkt's rx/phy status is not interested */
|
||||
+ if (pkt_stat->is_c2h)
|
||||
+ return;
|
||||
+
|
||||
+ phy_status = rx_desc8 + desc_sz + pkt_stat->shift;
|
||||
+ hdr = phy_status + pkt_stat->drv_info_sz;
|
||||
+ pkt_stat->hdr = hdr;
|
||||
+
|
||||
+ if (pkt_stat->phy_status)
|
||||
+ rtwdev->chip->ops->query_phy_status(rtwdev, phy_status, pkt_stat);
|
||||
+
|
||||
+ rtw_rx_fill_rx_status(rtwdev, pkt_stat, hdr, rx_status);
|
||||
}
|
||||
-EXPORT_SYMBOL(rtw_rx_fill_rx_status);
|
||||
+EXPORT_SYMBOL(rtw_rx_query_rx_desc);
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rx.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rx.h
|
||||
@@ -14,42 +14,40 @@ enum rtw_rx_desc_enc {
|
||||
RX_DESC_ENC_WEP104 = 5,
|
||||
};
|
||||
|
||||
-#define GET_RX_DESC_PHYST(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(26))
|
||||
-#define GET_RX_DESC_ICV_ERR(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(15))
|
||||
-#define GET_RX_DESC_CRC32(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(14))
|
||||
-#define GET_RX_DESC_SWDEC(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(27))
|
||||
-#define GET_RX_DESC_C2H(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x02), BIT(28))
|
||||
-#define GET_RX_DESC_PKT_LEN(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x00), GENMASK(13, 0))
|
||||
-#define GET_RX_DESC_DRV_INFO_SIZE(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x00), GENMASK(19, 16))
|
||||
-#define GET_RX_DESC_SHIFT(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x00), GENMASK(25, 24))
|
||||
-#define GET_RX_DESC_ENC_TYPE(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x00), GENMASK(22, 20))
|
||||
-#define GET_RX_DESC_RX_RATE(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x03), GENMASK(6, 0))
|
||||
-#define GET_RX_DESC_MACID(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x01), GENMASK(6, 0))
|
||||
-#define GET_RX_DESC_PPDU_CNT(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x02), GENMASK(30, 29))
|
||||
-#define GET_RX_DESC_TSFL(rxdesc) \
|
||||
- le32_get_bits(*((__le32 *)(rxdesc) + 0x05), GENMASK(31, 0))
|
||||
-#define GET_RX_DESC_BW(rxdesc) \
|
||||
- (le32_get_bits(*((__le32 *)(rxdesc) + 0x04), GENMASK(5, 4)))
|
||||
+struct rtw_rx_desc {
|
||||
+ __le32 w0;
|
||||
+ __le32 w1;
|
||||
+ __le32 w2;
|
||||
+ __le32 w3;
|
||||
+ __le32 w4;
|
||||
+ __le32 w5;
|
||||
+} __packed;
|
||||
+
|
||||
+#define RTW_RX_DESC_W0_PKT_LEN GENMASK(13, 0)
|
||||
+#define RTW_RX_DESC_W0_CRC32 BIT(14)
|
||||
+#define RTW_RX_DESC_W0_ICV_ERR BIT(15)
|
||||
+#define RTW_RX_DESC_W0_DRV_INFO_SIZE GENMASK(19, 16)
|
||||
+#define RTW_RX_DESC_W0_ENC_TYPE GENMASK(22, 20)
|
||||
+#define RTW_RX_DESC_W0_SHIFT GENMASK(25, 24)
|
||||
+#define RTW_RX_DESC_W0_PHYST BIT(26)
|
||||
+#define RTW_RX_DESC_W0_SWDEC BIT(27)
|
||||
+
|
||||
+#define RTW_RX_DESC_W1_MACID GENMASK(6, 0)
|
||||
+
|
||||
+#define RTW_RX_DESC_W2_C2H BIT(28)
|
||||
+#define RTW_RX_DESC_W2_PPDU_CNT GENMASK(30, 29)
|
||||
+
|
||||
+#define RTW_RX_DESC_W3_RX_RATE GENMASK(6, 0)
|
||||
+
|
||||
+#define RTW_RX_DESC_W4_BW GENMASK(5, 4)
|
||||
+
|
||||
+#define RTW_RX_DESC_W5_TSFL GENMASK(31, 0)
|
||||
|
||||
void rtw_rx_stats(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
|
||||
struct sk_buff *skb);
|
||||
-void rtw_rx_fill_rx_status(struct rtw_dev *rtwdev,
|
||||
- struct rtw_rx_pkt_stat *pkt_stat,
|
||||
- struct ieee80211_hdr *hdr,
|
||||
- struct ieee80211_rx_status *rx_status,
|
||||
- u8 *phy_status);
|
||||
+void rtw_rx_query_rx_desc(struct rtw_dev *rtwdev, void *rx_desc8,
|
||||
+ struct rtw_rx_pkt_stat *pkt_stat,
|
||||
+ struct ieee80211_rx_status *rx_status);
|
||||
void rtw_update_rx_freq_from_ie(struct rtw_dev *rtwdev, struct sk_buff *skb,
|
||||
struct ieee80211_rx_status *rx_status,
|
||||
struct rtw_rx_pkt_stat *pkt_stat);
|
||||
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
@@ -981,8 +981,7 @@ static void rtw_sdio_rxfifo_recv(struct
|
||||
|
||||
while (true) {
|
||||
rx_desc = skb->data;
|
||||
- chip->ops->query_rx_desc(rtwdev, rx_desc, &pkt_stat,
|
||||
- &rx_status);
|
||||
+ rtw_rx_query_rx_desc(rtwdev, rx_desc, &pkt_stat, &rx_status);
|
||||
pkt_offset = pkt_desc_sz + pkt_stat.drv_info_sz +
|
||||
pkt_stat.shift;
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
@@ -571,8 +571,8 @@ static void rtw_usb_rx_handler(struct wo
|
||||
|
||||
do {
|
||||
rx_desc = skb->data;
|
||||
- chip->ops->query_rx_desc(rtwdev, rx_desc, &pkt_stat,
|
||||
- &rx_status);
|
||||
+ rtw_rx_query_rx_desc(rtwdev, rx_desc, &pkt_stat,
|
||||
+ &rx_status);
|
||||
pkt_offset = pkt_desc_sz + pkt_stat.drv_info_sz +
|
||||
pkt_stat.shift;
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
From 7846f0b63562f4db45f712cc7dab091985baf07b Mon Sep 17 00:00:00 2001
|
||||
From: Mohammed Anees <pvmohammedanees2003@gmail.com>
|
||||
Date: Thu, 17 Oct 2024 13:36:38 +0530
|
||||
Subject: [PATCH] wifi: rtw88: Refactor looping in
|
||||
rtw_phy_store_tx_power_by_rate
|
||||
|
||||
The previous implementation included an unnecessary else
|
||||
condition paired with a continue statement. Since a check
|
||||
is already performed to determine if the band is either
|
||||
2G or 5G, the else condition will never be triggered.
|
||||
We can remove this check.
|
||||
|
||||
Signed-off-by: Mohammed Anees <pvmohammedanees2003@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20241017080638.13074-1-pvmohammedanees2003@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/phy.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
@@ -1470,10 +1470,8 @@ static void rtw_phy_store_tx_power_by_ra
|
||||
rate = rates[i];
|
||||
if (band == PHY_BAND_2G)
|
||||
hal->tx_pwr_by_rate_offset_2g[rfpath][rate] = offset;
|
||||
- else if (band == PHY_BAND_5G)
|
||||
- hal->tx_pwr_by_rate_offset_5g[rfpath][rate] = offset;
|
||||
else
|
||||
- continue;
|
||||
+ hal->tx_pwr_by_rate_offset_5g[rfpath][rate] = offset;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
From 47f754b3f838205f3b25c4839f74801d180995bf Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Tue, 22 Oct 2024 20:20:26 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Report the signal strength only if it's known
|
||||
|
||||
RTL8811CU doesn't report the signal strength for many (any?) data
|
||||
frames. When the signal strength is not known, set
|
||||
RX_FLAG_NO_SIGNAL_VAL in order to avoid reporting a signal
|
||||
strength of 0.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/f7e1e448-2c9b-498f-b8b1-a14dd967d7d3@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/rx.c | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rx.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rx.c
|
||||
@@ -234,10 +234,14 @@ static void rtw_rx_fill_rx_status(struct
|
||||
else
|
||||
rx_status->bw = RATE_INFO_BW_20;
|
||||
|
||||
- rx_status->signal = pkt_stat->signal_power;
|
||||
- for (path = 0; path < rtwdev->hal.rf_path_num; path++) {
|
||||
- rx_status->chains |= BIT(path);
|
||||
- rx_status->chain_signal[path] = pkt_stat->rx_power[path];
|
||||
+ if (pkt_stat->phy_status) {
|
||||
+ rx_status->signal = pkt_stat->signal_power;
|
||||
+ for (path = 0; path < rtwdev->hal.rf_path_num; path++) {
|
||||
+ rx_status->chains |= BIT(path);
|
||||
+ rx_status->chain_signal[path] = pkt_stat->rx_power[path];
|
||||
+ }
|
||||
+ } else {
|
||||
+ rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
|
||||
}
|
||||
|
||||
rtw_rx_addr_match(rtwdev, pkt_stat, hdr);
|
|
@ -1,490 +0,0 @@
|
|||
From d12722830ea4f562e91586927ec21b64d0369544 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 17:00:59 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Add some definitions for RTL8821AU/RTL8812AU
|
||||
|
||||
Add 8821A and 8812A chip type enums.
|
||||
|
||||
Add cck_high_power member to struct rtw_hal. This will be used to
|
||||
calculate the RX signal strength of RTL8812AU.
|
||||
|
||||
Add various register definitions which will be used by the new drivers.
|
||||
|
||||
Move some existing register definitions from rtw8821c.h and rtw8822b.h.
|
||||
They were duplicated in those headers and will also be used by the new
|
||||
drivers.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/9279a9cd-6f86-4dc3-a095-7c36cb9b9d06@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 3 +
|
||||
drivers/net/wireless/realtek/rtw88/reg.h | 174 ++++++++++++++++++
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.h | 24 ---
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.h | 12 --
|
||||
4 files changed, 177 insertions(+), 36 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -189,6 +189,8 @@ enum rtw_chip_type {
|
||||
RTW_CHIP_TYPE_8723D,
|
||||
RTW_CHIP_TYPE_8821C,
|
||||
RTW_CHIP_TYPE_8703B,
|
||||
+ RTW_CHIP_TYPE_8821A,
|
||||
+ RTW_CHIP_TYPE_8812A,
|
||||
};
|
||||
|
||||
enum rtw_tx_queue_type {
|
||||
@@ -1934,6 +1936,7 @@ struct rtw_hal {
|
||||
u32 antenna_rx;
|
||||
u8 bfee_sts_cap;
|
||||
bool txrx_1ss;
|
||||
+ bool cck_high_power;
|
||||
|
||||
/* protect tx power section */
|
||||
struct mutex tx_power_mutex;
|
||||
--- a/drivers/net/wireless/realtek/rtw88/reg.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/reg.h
|
||||
@@ -9,6 +9,7 @@
|
||||
#define BIT_FEN_EN_25_1 BIT(13)
|
||||
#define BIT_FEN_ELDR BIT(12)
|
||||
#define BIT_FEN_CPUEN BIT(2)
|
||||
+#define BIT_FEN_USBA BIT(2)
|
||||
#define BIT_FEN_BB_GLB_RST BIT(1)
|
||||
#define BIT_FEN_BB_RSTB BIT(0)
|
||||
#define BIT_R_DIS_PRST BIT(6)
|
||||
@@ -16,6 +17,10 @@
|
||||
#define REG_SYS_PW_CTRL 0x0004
|
||||
#define BIT_PFM_WOWL BIT(3)
|
||||
#define BIT_APFM_OFFMAC BIT(9)
|
||||
+#define REG_APS_FSMCO 0x0004
|
||||
+#define APS_FSMCO_MAC_ENABLE BIT(8)
|
||||
+#define APS_FSMCO_MAC_OFF BIT(9)
|
||||
+#define APS_FSMCO_HW_POWERDOWN BIT(15)
|
||||
#define REG_SYS_CLK_CTRL 0x0008
|
||||
#define BIT_CPU_CLK_EN BIT(14)
|
||||
|
||||
@@ -58,6 +63,8 @@
|
||||
#define BIT_SHIFT_LDO25_VOLTAGE 4
|
||||
#define BIT_LDO25_EN BIT(7)
|
||||
|
||||
+#define REG_ACLK_MON 0x3e
|
||||
+
|
||||
#define REG_GPIO_MUXCFG 0x0040
|
||||
#define BIT_FSPI_EN BIT(19)
|
||||
#define BIT_EN_SIC BIT(12)
|
||||
@@ -90,6 +97,8 @@
|
||||
#define BIT_USB_SUS_DIS BIT(8)
|
||||
#define BIT_SDIO_PAD_E5 BIT(18)
|
||||
|
||||
+#define REG_RF_B_CTRL 0x76
|
||||
+
|
||||
#define REG_AFE_CTRL_4 0x0078
|
||||
#define BIT_CK320M_AFE_EN BIT(4)
|
||||
#define BIT_EN_SYN BIT(15)
|
||||
@@ -134,6 +143,11 @@
|
||||
#define REG_PMC_DBG_CTRL1 0xa8
|
||||
#define BITS_PMC_BT_IQK_STS GENMASK(22, 21)
|
||||
|
||||
+#define REG_HIMR0 0xb0
|
||||
+#define REG_HISR0 0xb4
|
||||
+#define REG_HIMR1 0xb8
|
||||
+#define REG_HISR1 0xbc
|
||||
+
|
||||
#define REG_PAD_CTRL2 0x00C4
|
||||
#define BIT_RSM_EN_V1 BIT(16)
|
||||
#define BIT_NO_PDN_CHIPOFF_V1 BIT(17)
|
||||
@@ -185,6 +199,15 @@
|
||||
#define MAC_TRX_ENABLE (BIT_HCI_TXDMA_EN | BIT_HCI_RXDMA_EN | BIT_TXDMA_EN | \
|
||||
BIT_RXDMA_EN | BIT_PROTOCOL_EN | BIT_SCHEDULE_EN | \
|
||||
BIT_MACTXEN | BIT_MACRXEN)
|
||||
+#define REG_PBP 0x104
|
||||
+#define PBP_RX_MASK 0x0f
|
||||
+#define PBP_TX_MASK 0xf0
|
||||
+#define PBP_64 0x0
|
||||
+#define PBP_128 0x1
|
||||
+#define PBP_256 0x2
|
||||
+#define PBP_512 0x3
|
||||
+#define PBP_1024 0x4
|
||||
+
|
||||
#define BIT_SHIFT_TXDMA_VOQ_MAP 4
|
||||
#define BIT_MASK_TXDMA_VOQ_MAP 0x3
|
||||
#define BIT_TXDMA_VOQ_MAP(x) \
|
||||
@@ -256,6 +279,8 @@
|
||||
#define REG_HMEBOX1 0x01D4
|
||||
#define REG_HMEBOX2 0x01D8
|
||||
#define REG_HMEBOX3 0x01DC
|
||||
+#define REG_LLT_INIT 0x01E0
|
||||
+#define BIT_LLT_WRITE_ACCESS BIT(30)
|
||||
#define REG_HMEBOX0_EX 0x01F0
|
||||
#define REG_HMEBOX1_EX 0x01F4
|
||||
#define REG_HMEBOX2_EX 0x01F8
|
||||
@@ -298,6 +323,7 @@
|
||||
|
||||
#define REG_AUTO_LLT 0x0224
|
||||
#define BIT_AUTO_INIT_LLT BIT(16)
|
||||
+#define REG_DWBCN1_CTRL 0x0228
|
||||
#define REG_RQPN_CTRL_1 0x0228
|
||||
#define REG_RQPN_CTRL_2 0x022C
|
||||
#define BIT_LD_RQPN BIT(31)
|
||||
@@ -329,6 +355,7 @@
|
||||
#define BIT_DMA_BURST_SIZE_1024 0
|
||||
|
||||
#define REG_RXPKTNUM 0x02B0
|
||||
+#define REG_EARLY_MODE_CONTROL 0x02BC
|
||||
|
||||
#define REG_INT_MIG 0x0304
|
||||
#define REG_HCI_MIX_CFG 0x03FC
|
||||
@@ -336,6 +363,7 @@
|
||||
|
||||
#define REG_BCNQ_INFO 0x0418
|
||||
#define BIT_MGQ_CPU_EMPTY BIT(24)
|
||||
+#define REG_TXPKT_EMPTY 0x041A
|
||||
#define REG_FWHW_TXQ_CTRL 0x0420
|
||||
#define BIT_EN_BCNQ_DL BIT(22)
|
||||
#define BIT_EN_WR_FREE_TAIL BIT(20)
|
||||
@@ -362,10 +390,12 @@
|
||||
#define REG_AMPDU_MAX_TIME_V1 0x0455
|
||||
#define REG_BCNQ1_BDNY_V1 0x0456
|
||||
#define REG_AMPDU_MAX_TIME 0x0456
|
||||
+#define REG_AMPDU_MAX_LENGTH 0x0458
|
||||
#define REG_WMAC_LBK_BF_HD 0x045D
|
||||
#define REG_TX_HANG_CTRL 0x045E
|
||||
#define BIT_EN_GNT_BT_AWAKE BIT(3)
|
||||
#define BIT_EN_EOF_V1 BIT(2)
|
||||
+#define REG_FAST_EDCA_CTRL 0x0460
|
||||
#define REG_DATA_SC 0x0483
|
||||
#define REG_ARFR2_V1 0x048C
|
||||
#define REG_ARFRH2_V1 0x0490
|
||||
@@ -390,6 +420,8 @@
|
||||
#define REG_PRECNT_CTRL 0x04E5
|
||||
#define BIT_BTCCA_CTRL (BIT(0) | BIT(1))
|
||||
#define BIT_EN_PRECNT BIT(11)
|
||||
+#define REG_TX_RPT_CTRL 0x04EC
|
||||
+#define REG_TX_RPT_TIME 0x04F0
|
||||
#define REG_DUMMY_PAGE4_V1 0x04FC
|
||||
|
||||
#define REG_EDCA_VO_PARAM 0x0500
|
||||
@@ -400,6 +432,7 @@
|
||||
#define BIT_MASK_CWMAX GENMASK(15, 12)
|
||||
#define BIT_MASK_CWMIN GENMASK(11, 8)
|
||||
#define BIT_MASK_AIFS GENMASK(7, 0)
|
||||
+#define REG_BCNTCFG 0x0510
|
||||
#define REG_PIFS 0x0512
|
||||
#define REG_SIFS 0x0514
|
||||
#define BIT_SHIFT_SIFS_OFDM_CTX 8
|
||||
@@ -526,6 +559,8 @@
|
||||
#define REG_BT_COEX_V2 0x0762
|
||||
#define BIT_GNT_BT_POLARITY BIT(12)
|
||||
#define BIT_LTE_COEX_EN BIT(7)
|
||||
+#define REG_GNT_BT 0x0765
|
||||
+#define BIT_PTA_SW_CTL GENMASK(4, 3)
|
||||
#define REG_BT_COEX_ENH_INTR_CTRL 0x76E
|
||||
#define BIT_R_GRANTALL_WLMASK BIT(3)
|
||||
#define BIT_STATIS_BT_EN BIT(2)
|
||||
@@ -543,14 +578,43 @@
|
||||
#define REG_FPGA0_RFMOD 0x0800
|
||||
#define BIT_CCKEN BIT(24)
|
||||
#define BIT_OFDMEN BIT(25)
|
||||
+#define REG_CCK_RPT_FORMAT 0x0804
|
||||
+#define BIT_CCK_RPT_FORMAT BIT(16)
|
||||
+#define REG_RXPSEL 0x0808
|
||||
+#define BIT_RX_PSEL_RST (BIT(28) | BIT(29))
|
||||
+#define REG_TXPSEL 0x080C
|
||||
#define REG_RX_GAIN_EN 0x081c
|
||||
+#define REG_CCASEL 0x082C
|
||||
+#define REG_PDMFTH 0x0830
|
||||
+#define REG_BWINDICATION 0x0834
|
||||
+#define REG_CCA2ND 0x0838
|
||||
+#define REG_L1PKTH 0x0848
|
||||
+#define REG_CLKTRK 0x0860
|
||||
+#define REG_ADCCLK 0x08AC
|
||||
+#define REG_HSSI_READ 0x08B0
|
||||
+#define REG_FPGA0_XCD_RF_PARA 0x08B4
|
||||
+#define REG_RX_MCS_LIMIT 0x08BC
|
||||
+#define REG_ADC160 0x08C4
|
||||
+#define REG_ANTSEL_SW 0x0900
|
||||
+#define REG_DAC_RSTB 0x090c
|
||||
+#define REG_SINGLE_TONE_CONT_TX 0x0914
|
||||
|
||||
#define REG_RFE_CTRL_E 0x0974
|
||||
#define REG_2ND_CCA_CTRL 0x0976
|
||||
+#define REG_IQK_COM00 0x0978
|
||||
+#define REG_IQK_COM32 0x097c
|
||||
+#define REG_IQK_COM64 0x0980
|
||||
+#define REG_IQK_COM96 0x0984
|
||||
+
|
||||
+#define REG_FAS 0x09a4
|
||||
+#define REG_RXSB 0x0a00
|
||||
+#define REG_CCK_RX 0x0a04
|
||||
+#define REG_CCK_PD_TH 0x0a0a
|
||||
|
||||
#define REG_CCK0_FAREPORT 0xa2c
|
||||
#define BIT_CCK0_2RX BIT(18)
|
||||
#define BIT_CCK0_MRC BIT(22)
|
||||
+#define REG_FA_CCK 0x0a5c
|
||||
|
||||
#define REG_DIS_DPD 0x0a70
|
||||
#define DIS_DPD_MASK GENMASK(9, 0)
|
||||
@@ -566,13 +630,109 @@
|
||||
#define DIS_DPD_RATEVHT2SS_MCS1 BIT(9)
|
||||
#define DIS_DPD_RATEALL GENMASK(9, 0)
|
||||
|
||||
+#define REG_CNTRST 0x0b58
|
||||
+
|
||||
+#define REG_3WIRE_SWA 0x0c00
|
||||
+#define REG_RX_IQC_AB_A 0x0c10
|
||||
+#define REG_TXSCALE_A 0x0c1c
|
||||
+#define BB_SWING_MASK GENMASK(31, 21)
|
||||
+#define REG_TX_AGC_A_CCK_11_CCK_1 0xc20
|
||||
+#define REG_TX_AGC_A_OFDM18_OFDM6 0xc24
|
||||
+#define REG_TX_AGC_A_OFDM54_OFDM24 0xc28
|
||||
+#define REG_TX_AGC_A_MCS3_MCS0 0xc2c
|
||||
+#define REG_TX_AGC_A_MCS7_MCS4 0xc30
|
||||
+#define REG_TX_AGC_A_MCS11_MCS8 0xc34
|
||||
+#define REG_TX_AGC_A_MCS15_MCS12 0xc38
|
||||
+#define REG_TX_AGC_A_NSS1_INDEX3_NSS1_INDEX0 0xc3c
|
||||
+#define REG_TX_AGC_A_NSS1_INDEX7_NSS1_INDEX4 0xc40
|
||||
+#define REG_TX_AGC_A_NSS2_INDEX1_NSS1_INDEX8 0xc44
|
||||
+#define REG_TX_AGC_A_NSS2_INDEX5_NSS2_INDEX2 0xc48
|
||||
+#define REG_TX_AGC_A_NSS2_INDEX9_NSS2_INDEX6 0xc4c
|
||||
+#define REG_RXIGI_A 0x0c50
|
||||
+#define REG_TX_PWR_TRAINING_A 0x0c54
|
||||
+#define REG_CK_MONHA 0x0c5c
|
||||
+#define REG_AFE_PWR1_A 0x0c60
|
||||
+#define REG_AFE_PWR2_A 0x0c64
|
||||
+#define REG_RX_WAIT_CCA_TX_CCK_RFON_A 0x0c68
|
||||
+#define REG_OFDM0_XA_TX_IQ_IMBALANCE 0x0c80
|
||||
+#define REG_OFDM0_A_TX_AFE 0x0c84
|
||||
+#define REG_OFDM0_XB_TX_IQ_IMBALANCE 0x0c88
|
||||
+#define REG_TSSI_TRK_SW 0x0c8c
|
||||
+#define REG_LSSI_WRITE_A 0x0c90
|
||||
+#define REG_PREDISTA 0x0c90
|
||||
+#define REG_TXAGCIDX 0x0c94
|
||||
+
|
||||
+#define REG_RFE_PINMUX_A 0x0cb0
|
||||
+#define REG_RFE_INV_A 0x0cb4
|
||||
#define REG_RFE_CTRL8 0x0cb4
|
||||
#define BIT_MASK_RFE_SEL89 GENMASK(7, 0)
|
||||
+#define PTA_CTRL_PIN 0x66
|
||||
+#define DPDT_CTRL_PIN 0x77
|
||||
+#define RFE_INV_MASK 0x3ff00000
|
||||
+#define REG_RFECTL_A 0x0cb8
|
||||
#define REG_RFE_INV8 0x0cbd
|
||||
#define BIT_MASK_RFE_INV89 GENMASK(1, 0)
|
||||
#define REG_RFE_INV16 0x0cbe
|
||||
#define BIT_RFE_BUF_EN BIT(3)
|
||||
|
||||
+#define REG_IQK_DPD_CFG 0x0cc4
|
||||
+#define REG_CFG_PMPD 0x0cc8
|
||||
+#define REG_IQC_Y 0x0ccc
|
||||
+#define REG_IQC_X 0x0cd4
|
||||
+#define REG_INTPO_SETA 0x0ce8
|
||||
+
|
||||
+#define REG_IQKA_END 0x0d00
|
||||
+#define REG_PI_READ_A 0x0d04
|
||||
+#define REG_SI_READ_A 0x0d08
|
||||
+#define REG_IQKB_END 0x0d40
|
||||
+#define REG_PI_READ_B 0x0d44
|
||||
+#define REG_SI_READ_B 0x0d48
|
||||
+
|
||||
+#define REG_3WIRE_SWB 0x0e00
|
||||
+#define REG_RX_IQC_AB_B 0x0e10
|
||||
+#define REG_TXSCALE_B 0x0e1c
|
||||
+#define REG_TX_AGC_B_CCK_11_CCK_1 0xe20
|
||||
+#define REG_TX_AGC_B_OFDM18_OFDM6 0xe24
|
||||
+#define REG_TX_AGC_B_OFDM54_OFDM24 0xe28
|
||||
+#define REG_TX_AGC_B_MCS3_MCS0 0xe2c
|
||||
+#define REG_TX_AGC_B_MCS7_MCS4 0xe30
|
||||
+#define REG_TX_AGC_B_MCS11_MCS8 0xe34
|
||||
+#define REG_TX_AGC_B_MCS15_MCS12 0xe38
|
||||
+#define REG_TX_AGC_B_NSS1_INDEX3_NSS1_INDEX0 0xe3c
|
||||
+#define REG_TX_AGC_B_NSS1_INDEX7_NSS1_INDEX4 0xe40
|
||||
+#define REG_TX_AGC_B_NSS2_INDEX1_NSS1_INDEX8 0xe44
|
||||
+#define REG_TX_AGC_B_NSS2_INDEX5_NSS2_INDEX2 0xe48
|
||||
+#define REG_TX_AGC_B_NSS2_INDEX9_NSS2_INDEX6 0xe4c
|
||||
+#define REG_RXIGI_B 0x0e50
|
||||
+#define REG_TX_PWR_TRAINING_B 0x0e54
|
||||
+#define REG_CK_MONHB 0x0e5c
|
||||
+#define REG_AFE_PWR1_B 0x0e60
|
||||
+#define REG_AFE_PWR2_B 0x0e64
|
||||
+#define REG_RX_WAIT_CCA_TX_CCK_RFON_B 0x0e68
|
||||
+#define REG_TXTONEB 0x0e80
|
||||
+#define REG_RXTONEB 0x0e84
|
||||
+#define REG_TXPITMB 0x0e88
|
||||
+#define REG_RXPITMB 0x0e8c
|
||||
+#define REG_LSSI_WRITE_B 0x0e90
|
||||
+#define REG_PREDISTB 0x0e90
|
||||
+#define REG_INIDLYB 0x0e94
|
||||
+#define REG_RFE_PINMUX_B 0x0eb0
|
||||
+#define REG_RFE_INV_B 0x0eb4
|
||||
+#define REG_RFECTL_B 0x0eb8
|
||||
+#define REG_BPBDB 0x0ec4
|
||||
+#define REG_PHYTXONB 0x0ec8
|
||||
+#define REG_IQKYB 0x0ecc
|
||||
+#define REG_IQKXB 0x0ed4
|
||||
+#define REG_INTPO_SETB 0x0ee8
|
||||
+
|
||||
+#define REG_CRC_CCK 0x0f04
|
||||
+#define REG_CCA_OFDM 0x0f08
|
||||
+#define REG_CRC_VHT 0x0f0c
|
||||
+#define REG_CRC_HT 0x0f10
|
||||
+#define REG_CRC_OFDM 0x0f14
|
||||
+#define REG_FA_OFDM 0x0f48
|
||||
+#define REG_CCA_CCK 0x0fcc
|
||||
+
|
||||
#define REG_ANAPARSW_MAC_0 0x1010
|
||||
#define BIT_CF_L_V2 GENMASK(29, 28)
|
||||
|
||||
@@ -709,6 +869,10 @@
|
||||
|
||||
#define REG_IGN_GNTBT4 0x4160
|
||||
|
||||
+#define REG_USB_MOD 0xf008
|
||||
+#define REG_USB3_RXITV 0xf050
|
||||
+#define REG_USB_HRPWM 0xfe58
|
||||
+
|
||||
#define RF_MODE 0x00
|
||||
#define RF_MODOPT 0x01
|
||||
#define RF_WLINT 0x01
|
||||
@@ -716,7 +880,13 @@
|
||||
#define RF_DTXLOK 0x08
|
||||
#define RF_CFGCH 0x18
|
||||
#define BIT_BAND GENMASK(18, 16)
|
||||
+#define RF18_BAND_MASK (BIT(16) | BIT(9) | BIT(8))
|
||||
+#define RF18_CHANNEL_MASK (MASKBYTE0)
|
||||
+#define RF18_RFSI_MASK (BIT(18) | BIT(17))
|
||||
#define RF_RCK 0x1d
|
||||
+#define RF_MODE_TABLE_ADDR 0x30
|
||||
+#define RF_MODE_TABLE_DATA0 0x31
|
||||
+#define RF_MODE_TABLE_DATA1 0x32
|
||||
#define RF_LUTWA 0x33
|
||||
#define RF_LUTWD1 0x3e
|
||||
#define RF_LUTWD0 0x3f
|
||||
@@ -725,10 +895,14 @@
|
||||
#define RF_T_METER 0x42
|
||||
#define RF_BSPAD 0x54
|
||||
#define RF_GAINTX 0x56
|
||||
+#define RF_TXMOD 0x58
|
||||
#define RF_TXATANK 0x64
|
||||
+#define RF_TXA_PREPAD 0x65
|
||||
#define RF_TRXIQ 0x66
|
||||
#define RF_RXIQGEN 0x8d
|
||||
+#define RF_RXBB2 0x8f
|
||||
#define RF_SYN_PFD 0xb0
|
||||
+#define RF_LCK 0xb4
|
||||
#define RF_XTALX2 0xb8
|
||||
#define RF_SYN_CTRL 0xbb
|
||||
#define RF_MALSEL 0xbe
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.h
|
||||
@@ -214,19 +214,10 @@ extern const struct rtw_chip_info rtw882
|
||||
#define BIT_FEN_EN BIT(26)
|
||||
#define REG_INIRTS_RATE_SEL 0x0480
|
||||
#define REG_HTSTFWT 0x800
|
||||
-#define REG_RXPSEL 0x808
|
||||
-#define BIT_RX_PSEL_RST (BIT(28) | BIT(29))
|
||||
-#define REG_TXPSEL 0x80c
|
||||
#define REG_RXCCAMSK 0x814
|
||||
-#define REG_CCASEL 0x82c
|
||||
-#define REG_PDMFTH 0x830
|
||||
-#define REG_CCA2ND 0x838
|
||||
#define REG_L1WT 0x83c
|
||||
#define REG_L1PKWT 0x840
|
||||
#define REG_MRC 0x850
|
||||
-#define REG_CLKTRK 0x860
|
||||
-#define REG_ADCCLK 0x8ac
|
||||
-#define REG_ADC160 0x8c4
|
||||
#define REG_ADC40 0x8c8
|
||||
#define REG_CHFIR 0x8f0
|
||||
#define REG_CDDTXP 0x93c
|
||||
@@ -234,14 +225,11 @@ extern const struct rtw_chip_info rtw882
|
||||
#define REG_ACBB0 0x948
|
||||
#define REG_ACBBRXFIR 0x94c
|
||||
#define REG_ACGG2TBL 0x958
|
||||
-#define REG_FAS 0x9a4
|
||||
-#define REG_RXSB 0xa00
|
||||
#define REG_ADCINI 0xa04
|
||||
#define REG_PWRTH 0xa08
|
||||
#define REG_CCA_FLTR 0xa20
|
||||
#define REG_TXSF2 0xa24
|
||||
#define REG_TXSF6 0xa28
|
||||
-#define REG_FA_CCK 0xa5c
|
||||
#define REG_RXDESC 0xa2c
|
||||
#define REG_ENTXCCK 0xa80
|
||||
#define BTG_LNA 0xfc84
|
||||
@@ -252,12 +240,8 @@ extern const struct rtw_chip_info rtw882
|
||||
#define REG_PWRTH2 0xaa8
|
||||
#define REG_CSRATIO 0xaaa
|
||||
#define REG_TXFILTER 0xaac
|
||||
-#define REG_CNTRST 0xb58
|
||||
#define REG_AGCTR_A 0xc08
|
||||
-#define REG_TXSCALE_A 0xc1c
|
||||
#define REG_TXDFIR 0xc20
|
||||
-#define REG_RXIGI_A 0xc50
|
||||
-#define REG_TXAGCIDX 0xc94
|
||||
#define REG_TRSW 0xca0
|
||||
#define REG_RFESEL0 0xcb0
|
||||
#define REG_RFESEL8 0xcb4
|
||||
@@ -269,14 +253,6 @@ extern const struct rtw_chip_info rtw882
|
||||
#define B_WLA_SWITCH BIT(23)
|
||||
#define REG_RFEINV 0xcbc
|
||||
#define REG_AGCTR_B 0xe08
|
||||
-#define REG_RXIGI_B 0xe50
|
||||
-#define REG_CRC_CCK 0xf04
|
||||
-#define REG_CRC_OFDM 0xf14
|
||||
-#define REG_CRC_HT 0xf10
|
||||
-#define REG_CRC_VHT 0xf0c
|
||||
-#define REG_CCA_OFDM 0xf08
|
||||
-#define REG_FA_OFDM 0xf48
|
||||
-#define REG_CCA_CCK 0xfcc
|
||||
#define REG_DMEM_CTRL 0x1080
|
||||
#define BIT_WL_RST BIT(16)
|
||||
#define REG_ANTWT 0x1904
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.h
|
||||
@@ -151,21 +151,12 @@ _rtw_write32s_mask(struct rtw_dev *rtwde
|
||||
#define RTW8822B_EDCCA_MAX 0x7f
|
||||
#define RTW8822B_EDCCA_SRC_DEF 1
|
||||
#define REG_HTSTFWT 0x800
|
||||
-#define REG_RXPSEL 0x808
|
||||
-#define BIT_RX_PSEL_RST (BIT(28) | BIT(29))
|
||||
-#define REG_TXPSEL 0x80c
|
||||
#define REG_RXCCAMSK 0x814
|
||||
-#define REG_CCASEL 0x82c
|
||||
-#define REG_PDMFTH 0x830
|
||||
-#define REG_CCA2ND 0x838
|
||||
#define REG_L1WT 0x83c
|
||||
#define REG_L1PKWT 0x840
|
||||
#define REG_MRC 0x850
|
||||
-#define REG_CLKTRK 0x860
|
||||
#define REG_EDCCA_POW_MA 0x8a0
|
||||
#define BIT_MA_LEVEL GENMASK(1, 0)
|
||||
-#define REG_ADCCLK 0x8ac
|
||||
-#define REG_ADC160 0x8c4
|
||||
#define REG_ADC40 0x8c8
|
||||
#define REG_EDCCA_DECISION 0x8dc
|
||||
#define BIT_EDCCA_OPTION BIT(5)
|
||||
@@ -176,7 +167,6 @@ _rtw_write32s_mask(struct rtw_dev *rtwde
|
||||
#define REG_ACBB0 0x948
|
||||
#define REG_ACBBRXFIR 0x94c
|
||||
#define REG_ACGG2TBL 0x958
|
||||
-#define REG_RXSB 0xa00
|
||||
#define REG_ADCINI 0xa04
|
||||
#define REG_TXSF2 0xa24
|
||||
#define REG_TXSF6 0xa28
|
||||
@@ -184,14 +174,12 @@ _rtw_write32s_mask(struct rtw_dev *rtwde
|
||||
#define REG_ENTXCCK 0xa80
|
||||
#define REG_AGCTR_A 0xc08
|
||||
#define REG_TXDFIR 0xc20
|
||||
-#define REG_RXIGI_A 0xc50
|
||||
#define REG_TRSW 0xca0
|
||||
#define REG_RFESEL0 0xcb0
|
||||
#define REG_RFESEL8 0xcb4
|
||||
#define REG_RFECTL 0xcb8
|
||||
#define REG_RFEINV 0xcbc
|
||||
#define REG_AGCTR_B 0xe08
|
||||
-#define REG_RXIGI_B 0xe50
|
||||
#define REG_ANTWT 0x1904
|
||||
#define REG_IQKFAILMSK 0x1bf0
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
From 87341ca1eac9a3bac23bd41f6e24f3c93b77452f Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 17:02:05 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Dump the HW features only for some chips
|
||||
|
||||
RTL8821AU and RTL8812AU don't support this. They hit the "failed to read
|
||||
hw feature report" error.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/8becd851-8760-4480-8e8c-c4869ce72507@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.c | 3 +++
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 1 +
|
||||
7 files changed, 9 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.c
|
||||
@@ -1917,6 +1917,9 @@ static int rtw_dump_hw_feature(struct rt
|
||||
u8 bw;
|
||||
int i;
|
||||
|
||||
+ if (!rtwdev->chip->hw_feature_report)
|
||||
+ return 0;
|
||||
+
|
||||
id = rtw_read8(rtwdev, REG_C2HEVT);
|
||||
if (id != C2H_HW_FEATURE_REPORT) {
|
||||
rtw_err(rtwdev, "failed to read hw feature report\n");
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -1200,6 +1200,7 @@ struct rtw_chip_info {
|
||||
const struct rtw_fwcd_segs *fwcd_segs;
|
||||
|
||||
u8 usb_tx_agg_desc_num;
|
||||
+ bool hw_feature_report;
|
||||
|
||||
u8 default_1ss_tx_path;
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
@@ -1960,6 +1960,7 @@ const struct rtw_chip_info rtw8703b_hw_s
|
||||
.max_power_index = 0x3f,
|
||||
.ampdu_density = IEEE80211_HT_MPDU_DENSITY_16,
|
||||
.usb_tx_agg_desc_num = 1, /* Not sure if this chip has USB interface */
|
||||
+ .hw_feature_report = true,
|
||||
|
||||
.path_div_supported = false,
|
||||
.ht_supported = true,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
@@ -2131,6 +2131,7 @@ const struct rtw_chip_info rtw8723d_hw_s
|
||||
.page_size = TX_PAGE_SIZE,
|
||||
.dig_min = 0x20,
|
||||
.usb_tx_agg_desc_num = 1,
|
||||
+ .hw_feature_report = true,
|
||||
.ht_supported = true,
|
||||
.vht_supported = false,
|
||||
.lps_deep_mode_supported = 0,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -1968,6 +1968,7 @@ const struct rtw_chip_info rtw8821c_hw_s
|
||||
.page_size = TX_PAGE_SIZE,
|
||||
.dig_min = 0x1c,
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
+ .hw_feature_report = true,
|
||||
.ht_supported = true,
|
||||
.vht_supported = true,
|
||||
.lps_deep_mode_supported = BIT(LPS_DEEP_MODE_LCLK),
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
@@ -2509,6 +2509,7 @@ const struct rtw_chip_info rtw8822b_hw_s
|
||||
.page_size = TX_PAGE_SIZE,
|
||||
.dig_min = 0x1c,
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
+ .hw_feature_report = true,
|
||||
.ht_supported = true,
|
||||
.vht_supported = true,
|
||||
.lps_deep_mode_supported = BIT(LPS_DEEP_MODE_LCLK),
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -5329,6 +5329,7 @@ const struct rtw_chip_info rtw8822c_hw_s
|
||||
.page_size = TX_PAGE_SIZE,
|
||||
.dig_min = 0x20,
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
+ .hw_feature_report = true,
|
||||
.default_1ss_tx_path = BB_PATH_A,
|
||||
.path_div_supported = true,
|
||||
.ht_supported = true,
|
|
@ -1,175 +0,0 @@
|
|||
From d9018f4373517d4560ce2ebf12684f77f5fbdad6 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 17:06:14 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Allow different C2H RA report sizes
|
||||
|
||||
The RTL8821AU and RTL8812AU have smaller RA report size, only 4 bytes.
|
||||
Avoid the "invalid ra report c2h length" error.
|
||||
|
||||
Also, use a struct and u8_get_bits() to access the RA report C2H.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/c3e73c3a-fb2f-4013-9f06-d5274211e282@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/fw.c | 21 +++++++++++++------
|
||||
drivers/net/wireless/realtek/rtw88/fw.h | 17 +++++++++++----
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 1 +
|
||||
8 files changed, 34 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/fw.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/fw.c
|
||||
@@ -139,25 +139,30 @@ static u16 get_max_amsdu_len(u32 bit_rat
|
||||
struct rtw_fw_iter_ra_data {
|
||||
struct rtw_dev *rtwdev;
|
||||
u8 *payload;
|
||||
+ u8 length;
|
||||
};
|
||||
|
||||
static void rtw_fw_ra_report_iter(void *data, struct ieee80211_sta *sta)
|
||||
{
|
||||
struct rtw_fw_iter_ra_data *ra_data = data;
|
||||
+ struct rtw_c2h_ra_rpt *ra_rpt = (struct rtw_c2h_ra_rpt *)ra_data->payload;
|
||||
struct rtw_sta_info *si = (struct rtw_sta_info *)sta->drv_priv;
|
||||
u8 mac_id, rate, sgi, bw;
|
||||
u8 mcs, nss;
|
||||
u32 bit_rate;
|
||||
|
||||
- mac_id = GET_RA_REPORT_MACID(ra_data->payload);
|
||||
+ mac_id = ra_rpt->mac_id;
|
||||
if (si->mac_id != mac_id)
|
||||
return;
|
||||
|
||||
si->ra_report.txrate.flags = 0;
|
||||
|
||||
- rate = GET_RA_REPORT_RATE(ra_data->payload);
|
||||
- sgi = GET_RA_REPORT_SGI(ra_data->payload);
|
||||
- bw = GET_RA_REPORT_BW(ra_data->payload);
|
||||
+ rate = u8_get_bits(ra_rpt->rate_sgi, RTW_C2H_RA_RPT_RATE);
|
||||
+ sgi = u8_get_bits(ra_rpt->rate_sgi, RTW_C2H_RA_RPT_SGI);
|
||||
+ if (ra_data->length >= offsetofend(typeof(*ra_rpt), bw))
|
||||
+ bw = ra_rpt->bw;
|
||||
+ else
|
||||
+ bw = si->bw_mode;
|
||||
|
||||
if (rate < DESC_RATEMCS0) {
|
||||
si->ra_report.txrate.legacy = rtw_desc_to_bitrate(rate);
|
||||
@@ -197,14 +202,18 @@ legacy:
|
||||
static void rtw_fw_ra_report_handle(struct rtw_dev *rtwdev, u8 *payload,
|
||||
u8 length)
|
||||
{
|
||||
+ struct rtw_c2h_ra_rpt *ra_rpt = (struct rtw_c2h_ra_rpt *)payload;
|
||||
struct rtw_fw_iter_ra_data ra_data;
|
||||
|
||||
- if (WARN(length < 7, "invalid ra report c2h length\n"))
|
||||
+ if (WARN(length < rtwdev->chip->c2h_ra_report_size,
|
||||
+ "invalid ra report c2h length %d\n", length))
|
||||
return;
|
||||
|
||||
- rtwdev->dm_info.tx_rate = GET_RA_REPORT_RATE(payload);
|
||||
+ rtwdev->dm_info.tx_rate = u8_get_bits(ra_rpt->rate_sgi,
|
||||
+ RTW_C2H_RA_RPT_RATE);
|
||||
ra_data.rtwdev = rtwdev;
|
||||
ra_data.payload = payload;
|
||||
+ ra_data.length = length;
|
||||
rtw_iterate_stas_atomic(rtwdev, rtw_fw_ra_report_iter, &ra_data);
|
||||
}
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/fw.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/fw.h
|
||||
@@ -85,6 +85,19 @@ struct rtw_c2h_adaptivity {
|
||||
u8 option;
|
||||
} __packed;
|
||||
|
||||
+struct rtw_c2h_ra_rpt {
|
||||
+ u8 rate_sgi;
|
||||
+ u8 mac_id;
|
||||
+ u8 byte2;
|
||||
+ u8 status;
|
||||
+ u8 byte4;
|
||||
+ u8 ra_ratio;
|
||||
+ u8 bw;
|
||||
+} __packed;
|
||||
+
|
||||
+#define RTW_C2H_RA_RPT_RATE GENMASK(6, 0)
|
||||
+#define RTW_C2H_RA_RPT_SGI BIT(7)
|
||||
+
|
||||
struct rtw_h2c_register {
|
||||
u32 w0;
|
||||
u32 w1;
|
||||
@@ -364,10 +377,6 @@ struct rtw_fw_hdr_legacy {
|
||||
#define GET_CHAN_SWITCH_CENTRAL_CH(c2h_payload) (c2h_payload[2])
|
||||
#define GET_CHAN_SWITCH_ID(c2h_payload) (c2h_payload[3])
|
||||
#define GET_CHAN_SWITCH_STATUS(c2h_payload) (c2h_payload[4])
|
||||
-#define GET_RA_REPORT_RATE(c2h_payload) (c2h_payload[0] & 0x7f)
|
||||
-#define GET_RA_REPORT_SGI(c2h_payload) ((c2h_payload[0] & 0x80) >> 7)
|
||||
-#define GET_RA_REPORT_BW(c2h_payload) (c2h_payload[6])
|
||||
-#define GET_RA_REPORT_MACID(c2h_payload) (c2h_payload[1])
|
||||
|
||||
#define GET_BCN_FILTER_NOTIFY_TYPE(c2h_payload) (c2h_payload[1] & 0xf)
|
||||
#define GET_BCN_FILTER_NOTIFY_EVENT(c2h_payload) (c2h_payload[1] & 0x10)
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -1201,6 +1201,7 @@ struct rtw_chip_info {
|
||||
|
||||
u8 usb_tx_agg_desc_num;
|
||||
bool hw_feature_report;
|
||||
+ u8 c2h_ra_report_size;
|
||||
|
||||
u8 default_1ss_tx_path;
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
@@ -1961,6 +1961,7 @@ const struct rtw_chip_info rtw8703b_hw_s
|
||||
.ampdu_density = IEEE80211_HT_MPDU_DENSITY_16,
|
||||
.usb_tx_agg_desc_num = 1, /* Not sure if this chip has USB interface */
|
||||
.hw_feature_report = true,
|
||||
+ .c2h_ra_report_size = 7,
|
||||
|
||||
.path_div_supported = false,
|
||||
.ht_supported = true,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
@@ -2132,6 +2132,7 @@ const struct rtw_chip_info rtw8723d_hw_s
|
||||
.dig_min = 0x20,
|
||||
.usb_tx_agg_desc_num = 1,
|
||||
.hw_feature_report = true,
|
||||
+ .c2h_ra_report_size = 7,
|
||||
.ht_supported = true,
|
||||
.vht_supported = false,
|
||||
.lps_deep_mode_supported = 0,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -1969,6 +1969,7 @@ const struct rtw_chip_info rtw8821c_hw_s
|
||||
.dig_min = 0x1c,
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
.hw_feature_report = true,
|
||||
+ .c2h_ra_report_size = 7,
|
||||
.ht_supported = true,
|
||||
.vht_supported = true,
|
||||
.lps_deep_mode_supported = BIT(LPS_DEEP_MODE_LCLK),
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
@@ -2510,6 +2510,7 @@ const struct rtw_chip_info rtw8822b_hw_s
|
||||
.dig_min = 0x1c,
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
.hw_feature_report = true,
|
||||
+ .c2h_ra_report_size = 7,
|
||||
.ht_supported = true,
|
||||
.vht_supported = true,
|
||||
.lps_deep_mode_supported = BIT(LPS_DEEP_MODE_LCLK),
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -5330,6 +5330,7 @@ const struct rtw_chip_info rtw8822c_hw_s
|
||||
.dig_min = 0x20,
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
.hw_feature_report = true,
|
||||
+ .c2h_ra_report_size = 7,
|
||||
.default_1ss_tx_path = BB_PATH_A,
|
||||
.path_div_supported = true,
|
||||
.ht_supported = true,
|
|
@ -1,165 +0,0 @@
|
|||
From 95a772e30b60e7954d03f3372268722475aa303f Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 17:08:24 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Extend the init table parsing for RTL8812AU
|
||||
|
||||
The chips supported so far only use the first condition, and so the
|
||||
parsing code ignores the second condition. RTL8812AU's init tables use
|
||||
the second condition also. Make the parsing code check it.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/1bee6b74-6eab-44a3-9f40-794ca006c72d@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 15 ++++++
|
||||
drivers/net/wireless/realtek/rtw88/phy.c | 62 ++++++++++++++++++++---
|
||||
2 files changed, 69 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -1835,6 +1835,20 @@ struct rtw_phy_cond {
|
||||
#define BRANCH_ENDIF 3
|
||||
};
|
||||
|
||||
+struct rtw_phy_cond2 {
|
||||
+#ifdef __LITTLE_ENDIAN
|
||||
+ u8 type_glna;
|
||||
+ u8 type_gpa;
|
||||
+ u8 type_alna;
|
||||
+ u8 type_apa;
|
||||
+#else
|
||||
+ u8 type_apa;
|
||||
+ u8 type_alna;
|
||||
+ u8 type_gpa;
|
||||
+ u8 type_glna;
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
struct rtw_fifo_conf {
|
||||
/* tx fifo information */
|
||||
u16 rsvd_boundary;
|
||||
@@ -1916,6 +1930,7 @@ struct rtw_hal {
|
||||
u8 oem_id;
|
||||
u8 pkg_type;
|
||||
struct rtw_phy_cond phy_cond;
|
||||
+ struct rtw_phy_cond2 phy_cond2;
|
||||
bool rfe_btg;
|
||||
|
||||
u8 ps_mode;
|
||||
--- a/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
@@ -18,7 +18,10 @@ struct phy_cfg_pair {
|
||||
};
|
||||
|
||||
union phy_table_tile {
|
||||
- struct rtw_phy_cond cond;
|
||||
+ struct {
|
||||
+ struct rtw_phy_cond cond;
|
||||
+ struct rtw_phy_cond2 cond2;
|
||||
+ } __packed;
|
||||
struct phy_cfg_pair cfg;
|
||||
};
|
||||
|
||||
@@ -1041,7 +1044,8 @@ void rtw_phy_setup_phy_cond(struct rtw_d
|
||||
{
|
||||
struct rtw_hal *hal = &rtwdev->hal;
|
||||
struct rtw_efuse *efuse = &rtwdev->efuse;
|
||||
- struct rtw_phy_cond cond = {0};
|
||||
+ struct rtw_phy_cond cond = {};
|
||||
+ struct rtw_phy_cond2 cond2 = {};
|
||||
|
||||
cond.cut = hal->cut_version ? hal->cut_version : 15;
|
||||
cond.pkg = pkg ? pkg : 15;
|
||||
@@ -1061,15 +1065,34 @@ void rtw_phy_setup_phy_cond(struct rtw_d
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (rtwdev->chip->id == RTW_CHIP_TYPE_8812A ||
|
||||
+ rtwdev->chip->id == RTW_CHIP_TYPE_8821A) {
|
||||
+ cond.rfe = 0;
|
||||
+ cond.rfe |= efuse->ext_lna_2g;
|
||||
+ cond.rfe |= efuse->ext_pa_2g << 1;
|
||||
+ cond.rfe |= efuse->ext_lna_5g << 2;
|
||||
+ cond.rfe |= efuse->ext_pa_5g << 3;
|
||||
+ cond.rfe |= efuse->btcoex << 4;
|
||||
+
|
||||
+ cond2.type_alna = efuse->alna_type;
|
||||
+ cond2.type_glna = efuse->glna_type;
|
||||
+ cond2.type_apa = efuse->apa_type;
|
||||
+ cond2.type_gpa = efuse->gpa_type;
|
||||
+ }
|
||||
+
|
||||
hal->phy_cond = cond;
|
||||
+ hal->phy_cond2 = cond2;
|
||||
|
||||
- rtw_dbg(rtwdev, RTW_DBG_PHY, "phy cond=0x%08x\n", *((u32 *)&hal->phy_cond));
|
||||
+ rtw_dbg(rtwdev, RTW_DBG_PHY, "phy cond=0x%08x cond2=0x%08x\n",
|
||||
+ *((u32 *)&hal->phy_cond), *((u32 *)&hal->phy_cond2));
|
||||
}
|
||||
|
||||
-static bool check_positive(struct rtw_dev *rtwdev, struct rtw_phy_cond cond)
|
||||
+static bool check_positive(struct rtw_dev *rtwdev, struct rtw_phy_cond cond,
|
||||
+ struct rtw_phy_cond2 cond2)
|
||||
{
|
||||
struct rtw_hal *hal = &rtwdev->hal;
|
||||
struct rtw_phy_cond drv_cond = hal->phy_cond;
|
||||
+ struct rtw_phy_cond2 drv_cond2 = hal->phy_cond2;
|
||||
|
||||
if (cond.cut && cond.cut != drv_cond.cut)
|
||||
return false;
|
||||
@@ -1080,8 +1103,29 @@ static bool check_positive(struct rtw_de
|
||||
if (cond.intf && cond.intf != drv_cond.intf)
|
||||
return false;
|
||||
|
||||
- if (cond.rfe != drv_cond.rfe)
|
||||
- return false;
|
||||
+ if (rtwdev->chip->id == RTW_CHIP_TYPE_8812A ||
|
||||
+ rtwdev->chip->id == RTW_CHIP_TYPE_8821A) {
|
||||
+ if (!(cond.rfe & 0x0f))
|
||||
+ return true;
|
||||
+
|
||||
+ if ((cond.rfe & drv_cond.rfe) != cond.rfe)
|
||||
+ return false;
|
||||
+
|
||||
+ if ((cond.rfe & BIT(0)) && cond2.type_glna != drv_cond2.type_glna)
|
||||
+ return false;
|
||||
+
|
||||
+ if ((cond.rfe & BIT(1)) && cond2.type_gpa != drv_cond2.type_gpa)
|
||||
+ return false;
|
||||
+
|
||||
+ if ((cond.rfe & BIT(2)) && cond2.type_alna != drv_cond2.type_alna)
|
||||
+ return false;
|
||||
+
|
||||
+ if ((cond.rfe & BIT(3)) && cond2.type_apa != drv_cond2.type_apa)
|
||||
+ return false;
|
||||
+ } else {
|
||||
+ if (cond.rfe != drv_cond.rfe)
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1090,7 +1134,8 @@ void rtw_parse_tbl_phy_cond(struct rtw_d
|
||||
{
|
||||
const union phy_table_tile *p = tbl->data;
|
||||
const union phy_table_tile *end = p + tbl->size / 2;
|
||||
- struct rtw_phy_cond pos_cond = {0};
|
||||
+ struct rtw_phy_cond pos_cond = {};
|
||||
+ struct rtw_phy_cond2 pos_cond2 = {};
|
||||
bool is_matched = true, is_skipped = false;
|
||||
|
||||
BUILD_BUG_ON(sizeof(union phy_table_tile) != sizeof(struct phy_cfg_pair));
|
||||
@@ -1109,11 +1154,12 @@ void rtw_parse_tbl_phy_cond(struct rtw_d
|
||||
case BRANCH_ELIF:
|
||||
default:
|
||||
pos_cond = p->cond;
|
||||
+ pos_cond2 = p->cond2;
|
||||
break;
|
||||
}
|
||||
} else if (p->cond.neg) {
|
||||
if (!is_skipped) {
|
||||
- if (check_positive(rtwdev, pos_cond)) {
|
||||
+ if (check_positive(rtwdev, pos_cond, pos_cond2)) {
|
||||
is_matched = true;
|
||||
is_skipped = true;
|
||||
} else {
|
|
@ -1,58 +0,0 @@
|
|||
From 7c5bbeba7c36575a3a57ef4be775b2f3fb68c3f9 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 17:09:04 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Allow rtw_chip_info.ltecoex_addr to be NULL
|
||||
|
||||
RTL8821A doesn't have this. Trying to use it results in error messages,
|
||||
so don't try if ltecoex_addr is NULL.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/d1004817-1760-41d1-9136-3d799757c444@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/coex.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/coex.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/coex.c
|
||||
@@ -950,12 +950,18 @@ static void rtw_coex_coex_ctrl_owner(str
|
||||
|
||||
static void rtw_coex_set_gnt_bt(struct rtw_dev *rtwdev, u8 state)
|
||||
{
|
||||
+ if (!rtwdev->chip->ltecoex_addr)
|
||||
+ return;
|
||||
+
|
||||
rtw_coex_write_indirect_reg(rtwdev, LTE_COEX_CTRL, 0xc000, state);
|
||||
rtw_coex_write_indirect_reg(rtwdev, LTE_COEX_CTRL, 0x0c00, state);
|
||||
}
|
||||
|
||||
static void rtw_coex_set_gnt_wl(struct rtw_dev *rtwdev, u8 state)
|
||||
{
|
||||
+ if (!rtwdev->chip->ltecoex_addr)
|
||||
+ return;
|
||||
+
|
||||
rtw_coex_write_indirect_reg(rtwdev, LTE_COEX_CTRL, 0x3000, state);
|
||||
rtw_coex_write_indirect_reg(rtwdev, LTE_COEX_CTRL, 0x0300, state);
|
||||
}
|
||||
@@ -3904,7 +3910,7 @@ void rtw_coex_display_coex_info(struct r
|
||||
u8 sys_lte;
|
||||
u16 score_board_WB, score_board_BW;
|
||||
u32 wl_reg_6c0, wl_reg_6c4, wl_reg_6c8, wl_reg_778, wl_reg_6cc;
|
||||
- u32 lte_coex, bt_coex;
|
||||
+ u32 lte_coex = 0, bt_coex = 0;
|
||||
int i;
|
||||
|
||||
score_board_BW = rtw_coex_read_scbd(rtwdev);
|
||||
@@ -3916,8 +3922,10 @@ void rtw_coex_display_coex_info(struct r
|
||||
wl_reg_778 = rtw_read8(rtwdev, REG_BT_STAT_CTRL);
|
||||
|
||||
sys_lte = rtw_read8(rtwdev, 0x73);
|
||||
- lte_coex = rtw_coex_read_indirect_reg(rtwdev, 0x38);
|
||||
- bt_coex = rtw_coex_read_indirect_reg(rtwdev, 0x54);
|
||||
+ if (rtwdev->chip->ltecoex_addr) {
|
||||
+ lte_coex = rtw_coex_read_indirect_reg(rtwdev, 0x38);
|
||||
+ bt_coex = rtw_coex_read_indirect_reg(rtwdev, 0x54);
|
||||
+ }
|
||||
|
||||
if (!coex_stat->wl_under_ips &&
|
||||
(!coex_stat->wl_under_lps || coex_stat->wl_force_lps_ctrl) &&
|
|
@ -1,272 +0,0 @@
|
|||
From fbb5e1b3637a720c83c91a7b1476ab0429bfc747 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 17:09:47 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Let each driver control the power on/off process
|
||||
|
||||
RTL8821AU and RTL8812AU have to do some things differently, so let
|
||||
them have full control.
|
||||
|
||||
The other chips use the same functions as before.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/98ab839f-9100-44ae-9551-9af743a4aa3a@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/coex.c | 3 +++
|
||||
drivers/net/wireless/realtek/rtw88/mac.c | 11 +++++++----
|
||||
drivers/net/wireless/realtek/rtw88/mac.h | 3 +++
|
||||
drivers/net/wireless/realtek/rtw88/main.c | 13 ++++++++-----
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 5 +++++
|
||||
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 2 ++
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 2 ++
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 2 ++
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 ++
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 2 ++
|
||||
10 files changed, 36 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/coex.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/coex.c
|
||||
@@ -2753,16 +2753,19 @@ void rtw_coex_power_on_setting(struct rt
|
||||
rtw_write8(rtwdev, 0xff1a, 0x0);
|
||||
rtw_coex_set_gnt_debug(rtwdev);
|
||||
}
|
||||
+EXPORT_SYMBOL(rtw_coex_power_on_setting);
|
||||
|
||||
void rtw_coex_power_off_setting(struct rtw_dev *rtwdev)
|
||||
{
|
||||
rtw_write16(rtwdev, REG_WIFI_BT_INFO, BIT_BT_INT_EN);
|
||||
}
|
||||
+EXPORT_SYMBOL(rtw_coex_power_off_setting);
|
||||
|
||||
void rtw_coex_init_hw_config(struct rtw_dev *rtwdev, bool wifi_only)
|
||||
{
|
||||
__rtw_coex_init_hw_config(rtwdev, wifi_only);
|
||||
}
|
||||
+EXPORT_SYMBOL(rtw_coex_init_hw_config);
|
||||
|
||||
void rtw_coex_ips_notify(struct rtw_dev *rtwdev, u8 type)
|
||||
{
|
||||
--- a/drivers/net/wireless/realtek/rtw88/mac.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/mac.c
|
||||
@@ -227,8 +227,8 @@ static int rtw_sub_pwr_seq_parser(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int rtw_pwr_seq_parser(struct rtw_dev *rtwdev,
|
||||
- const struct rtw_pwr_seq_cmd * const *cmd_seq)
|
||||
+int rtw_pwr_seq_parser(struct rtw_dev *rtwdev,
|
||||
+ const struct rtw_pwr_seq_cmd * const *cmd_seq)
|
||||
{
|
||||
u8 cut_mask;
|
||||
u8 intf_mask;
|
||||
@@ -267,6 +267,7 @@ static int rtw_pwr_seq_parser(struct rtw
|
||||
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL(rtw_pwr_seq_parser);
|
||||
|
||||
static int rtw_mac_power_switch(struct rtw_dev *rtwdev, bool pwr_on)
|
||||
{
|
||||
@@ -994,6 +995,7 @@ int rtw_download_firmware(struct rtw_dev
|
||||
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL(rtw_download_firmware);
|
||||
|
||||
static u32 get_priority_queues(struct rtw_dev *rtwdev, u32 queues)
|
||||
{
|
||||
@@ -1127,7 +1129,7 @@ static int txdma_queue_mapping(struct rt
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int set_trx_fifo_info(struct rtw_dev *rtwdev)
|
||||
+int rtw_set_trx_fifo_info(struct rtw_dev *rtwdev)
|
||||
{
|
||||
const struct rtw_chip_info *chip = rtwdev->chip;
|
||||
struct rtw_fifo_conf *fifo = &rtwdev->fifo;
|
||||
@@ -1179,6 +1181,7 @@ static int set_trx_fifo_info(struct rtw_
|
||||
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL(rtw_set_trx_fifo_info);
|
||||
|
||||
static int __priority_queue_cfg(struct rtw_dev *rtwdev,
|
||||
const struct rtw_page_table *pg_tbl,
|
||||
@@ -1256,7 +1259,7 @@ static int priority_queue_cfg(struct rtw
|
||||
u16 pubq_num;
|
||||
int ret;
|
||||
|
||||
- ret = set_trx_fifo_info(rtwdev);
|
||||
+ ret = rtw_set_trx_fifo_info(rtwdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/mac.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/mac.h
|
||||
@@ -30,11 +30,14 @@
|
||||
|
||||
void rtw_set_channel_mac(struct rtw_dev *rtwdev, u8 channel, u8 bw,
|
||||
u8 primary_ch_idx);
|
||||
+int rtw_pwr_seq_parser(struct rtw_dev *rtwdev,
|
||||
+ const struct rtw_pwr_seq_cmd * const *cmd_seq);
|
||||
int rtw_mac_power_on(struct rtw_dev *rtwdev);
|
||||
void rtw_mac_power_off(struct rtw_dev *rtwdev);
|
||||
int rtw_download_firmware(struct rtw_dev *rtwdev, struct rtw_fw_state *fw);
|
||||
int rtw_mac_init(struct rtw_dev *rtwdev);
|
||||
void rtw_mac_flush_queues(struct rtw_dev *rtwdev, u32 queues, bool drop);
|
||||
+int rtw_set_trx_fifo_info(struct rtw_dev *rtwdev);
|
||||
int rtw_ddma_to_fw_fifo(struct rtw_dev *rtwdev, u32 ocp_src, u32 size);
|
||||
|
||||
static inline void rtw_mac_flush_all_queues(struct rtw_dev *rtwdev, bool drop)
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.c
|
||||
@@ -1309,7 +1309,7 @@ void rtw_update_sta_info(struct rtw_dev
|
||||
rtw_fw_send_ra_info(rtwdev, si, reset_ra_mask);
|
||||
}
|
||||
|
||||
-static int rtw_wait_firmware_completion(struct rtw_dev *rtwdev)
|
||||
+int rtw_wait_firmware_completion(struct rtw_dev *rtwdev)
|
||||
{
|
||||
const struct rtw_chip_info *chip = rtwdev->chip;
|
||||
struct rtw_fw_state *fw;
|
||||
@@ -1329,6 +1329,7 @@ static int rtw_wait_firmware_completion(
|
||||
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL(rtw_wait_firmware_completion);
|
||||
|
||||
static enum rtw_lps_deep_mode rtw_update_lps_deep_mode(struct rtw_dev *rtwdev,
|
||||
struct rtw_fw_state *fw)
|
||||
@@ -1350,7 +1351,7 @@ static enum rtw_lps_deep_mode rtw_update
|
||||
return LPS_DEEP_MODE_NONE;
|
||||
}
|
||||
|
||||
-static int rtw_power_on(struct rtw_dev *rtwdev)
|
||||
+int rtw_power_on(struct rtw_dev *rtwdev)
|
||||
{
|
||||
const struct rtw_chip_info *chip = rtwdev->chip;
|
||||
struct rtw_fw_state *fw = &rtwdev->fw;
|
||||
@@ -1413,6 +1414,7 @@ err_off:
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL(rtw_power_on);
|
||||
|
||||
void rtw_core_fw_scan_notify(struct rtw_dev *rtwdev, bool start)
|
||||
{
|
||||
@@ -1485,7 +1487,7 @@ int rtw_core_start(struct rtw_dev *rtwde
|
||||
{
|
||||
int ret;
|
||||
|
||||
- ret = rtw_power_on(rtwdev);
|
||||
+ ret = rtwdev->chip->ops->power_on(rtwdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -1505,12 +1507,13 @@ int rtw_core_start(struct rtw_dev *rtwde
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void rtw_power_off(struct rtw_dev *rtwdev)
|
||||
+void rtw_power_off(struct rtw_dev *rtwdev)
|
||||
{
|
||||
rtw_hci_stop(rtwdev);
|
||||
rtw_coex_power_off_setting(rtwdev);
|
||||
rtw_mac_power_off(rtwdev);
|
||||
}
|
||||
+EXPORT_SYMBOL(rtw_power_off);
|
||||
|
||||
void rtw_core_stop(struct rtw_dev *rtwdev)
|
||||
{
|
||||
@@ -1535,7 +1538,7 @@ void rtw_core_stop(struct rtw_dev *rtwde
|
||||
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
|
||||
- rtw_power_off(rtwdev);
|
||||
+ rtwdev->chip->ops->power_off(rtwdev);
|
||||
}
|
||||
|
||||
static void rtw_init_ht_cap(struct rtw_dev *rtwdev,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -843,6 +843,8 @@ struct rtw_regd {
|
||||
};
|
||||
|
||||
struct rtw_chip_ops {
|
||||
+ int (*power_on)(struct rtw_dev *rtwdev);
|
||||
+ void (*power_off)(struct rtw_dev *rtwdev);
|
||||
int (*mac_init)(struct rtw_dev *rtwdev);
|
||||
int (*dump_fw_crash)(struct rtw_dev *rtwdev);
|
||||
void (*shutdown)(struct rtw_dev *rtwdev);
|
||||
@@ -2209,6 +2211,7 @@ void rtw_core_scan_start(struct rtw_dev
|
||||
void rtw_core_scan_complete(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
|
||||
bool hw_scan);
|
||||
int rtw_core_start(struct rtw_dev *rtwdev);
|
||||
+void rtw_power_off(struct rtw_dev *rtwdev);
|
||||
void rtw_core_stop(struct rtw_dev *rtwdev);
|
||||
int rtw_chip_info_setup(struct rtw_dev *rtwdev);
|
||||
int rtw_core_init(struct rtw_dev *rtwdev);
|
||||
@@ -2223,6 +2226,8 @@ int rtw_sta_add(struct rtw_dev *rtwdev,
|
||||
void rtw_sta_remove(struct rtw_dev *rtwdev, struct ieee80211_sta *sta,
|
||||
bool fw_exist);
|
||||
void rtw_fw_recovery(struct rtw_dev *rtwdev);
|
||||
+int rtw_wait_firmware_completion(struct rtw_dev *rtwdev);
|
||||
+int rtw_power_on(struct rtw_dev *rtwdev);
|
||||
void rtw_core_fw_scan_notify(struct rtw_dev *rtwdev, bool start);
|
||||
int rtw_dump_fw(struct rtw_dev *rtwdev, const u32 ocp_src, u32 size,
|
||||
u32 fwcd_item);
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
@@ -1888,6 +1888,8 @@ static const struct coex_tdma_para tdma_
|
||||
};
|
||||
|
||||
static const struct rtw_chip_ops rtw8703b_ops = {
|
||||
+ .power_on = rtw_power_on,
|
||||
+ .power_off = rtw_power_off,
|
||||
.mac_init = rtw8723x_mac_init,
|
||||
.dump_fw_crash = NULL,
|
||||
.shutdown = NULL,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
@@ -1390,6 +1390,8 @@ static void rtw8723d_pwr_track(struct rt
|
||||
}
|
||||
|
||||
static const struct rtw_chip_ops rtw8723d_ops = {
|
||||
+ .power_on = rtw_power_on,
|
||||
+ .power_off = rtw_power_off,
|
||||
.phy_set_param = rtw8723d_phy_set_param,
|
||||
.read_efuse = rtw8723x_read_efuse,
|
||||
.query_phy_status = query_phy_status,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -1643,6 +1643,8 @@ static const struct rtw_prioq_addrs prio
|
||||
};
|
||||
|
||||
static const struct rtw_chip_ops rtw8821c_ops = {
|
||||
+ .power_on = rtw_power_on,
|
||||
+ .power_off = rtw_power_off,
|
||||
.phy_set_param = rtw8821c_phy_set_param,
|
||||
.read_efuse = rtw8821c_read_efuse,
|
||||
.query_phy_status = query_phy_status,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
@@ -2132,6 +2132,8 @@ static const struct rtw_prioq_addrs prio
|
||||
};
|
||||
|
||||
static const struct rtw_chip_ops rtw8822b_ops = {
|
||||
+ .power_on = rtw_power_on,
|
||||
+ .power_off = rtw_power_off,
|
||||
.phy_set_param = rtw8822b_phy_set_param,
|
||||
.read_efuse = rtw8822b_read_efuse,
|
||||
.query_phy_status = query_phy_status,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -4947,6 +4947,8 @@ static const struct rtw_prioq_addrs prio
|
||||
};
|
||||
|
||||
static const struct rtw_chip_ops rtw8822c_ops = {
|
||||
+ .power_on = rtw_power_on,
|
||||
+ .power_off = rtw_power_off,
|
||||
.phy_set_param = rtw8822c_phy_set_param,
|
||||
.read_efuse = rtw8822c_read_efuse,
|
||||
.query_phy_status = query_phy_status,
|
|
@ -1,194 +0,0 @@
|
|||
From c7706b1173c77185a2ef40c7d1811021566563f3 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 17:10:32 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Enable data rate fallback for older chips
|
||||
|
||||
RTL8811AU fails to perform the 4-way handshake when the AP is too far
|
||||
because it transmits the EAPOL frames at MCS9 and when that doesn't
|
||||
work it retries 48 times with the same rate, to no avail.
|
||||
|
||||
Retrying 48 times with the same rate seems pointless. Set the
|
||||
appropriate field in the TX descriptor to allow it to use lower rates
|
||||
when retrying.
|
||||
|
||||
Set it for RTL8723D and RTL8703B because they interpret this field the
|
||||
same way as RTL8811A.
|
||||
|
||||
The newer RTL8822C, RTL8822B, RTL8821C seem to interpret this field in
|
||||
the TX descriptor differently, so leave it alone for those chips.
|
||||
|
||||
Tested with RTL8811AU and RTL8723DU.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/2b3e3e6f-541b-4a3b-8ca3-65b267e6a95a@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/fw.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/pci.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 1 +
|
||||
drivers/net/wireless/realtek/rtw88/sdio.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/tx.c | 6 +++++-
|
||||
drivers/net/wireless/realtek/rtw88/tx.h | 4 +++-
|
||||
drivers/net/wireless/realtek/rtw88/usb.c | 4 ++--
|
||||
12 files changed, 19 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/fw.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/fw.c
|
||||
@@ -1290,7 +1290,7 @@ static void rtw_fill_rsvd_page_desc(stru
|
||||
rtw_tx_rsvd_page_pkt_info_update(rtwdev, &pkt_info, skb, type);
|
||||
pkt_desc = skb_push(skb, chip->tx_pkt_desc_sz);
|
||||
memset(pkt_desc, 0, chip->tx_pkt_desc_sz);
|
||||
- rtw_tx_fill_tx_desc(&pkt_info, skb);
|
||||
+ rtw_tx_fill_tx_desc(rtwdev, &pkt_info, skb);
|
||||
}
|
||||
|
||||
static inline u8 rtw_len_to_page(unsigned int len, u8 page_size)
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -1204,6 +1204,7 @@ struct rtw_chip_info {
|
||||
u8 usb_tx_agg_desc_num;
|
||||
bool hw_feature_report;
|
||||
u8 c2h_ra_report_size;
|
||||
+ bool old_datarate_fb_limit;
|
||||
|
||||
u8 default_1ss_tx_path;
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/pci.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
|
||||
@@ -824,7 +824,7 @@ static int rtw_pci_tx_write_data(struct
|
||||
pkt_desc = skb_push(skb, chip->tx_pkt_desc_sz);
|
||||
memset(pkt_desc, 0, tx_pkt_desc_sz);
|
||||
pkt_info->qsel = rtw_pci_get_tx_qsel(skb, queue);
|
||||
- rtw_tx_fill_tx_desc(pkt_info, skb);
|
||||
+ rtw_tx_fill_tx_desc(rtwdev, pkt_info, skb);
|
||||
dma = dma_map_single(&rtwpci->pdev->dev, skb->data, skb->len,
|
||||
DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(&rtwpci->pdev->dev, dma))
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
@@ -1964,6 +1964,7 @@ const struct rtw_chip_info rtw8703b_hw_s
|
||||
.usb_tx_agg_desc_num = 1, /* Not sure if this chip has USB interface */
|
||||
.hw_feature_report = true,
|
||||
.c2h_ra_report_size = 7,
|
||||
+ .old_datarate_fb_limit = true,
|
||||
|
||||
.path_div_supported = false,
|
||||
.ht_supported = true,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
@@ -2135,6 +2135,7 @@ const struct rtw_chip_info rtw8723d_hw_s
|
||||
.usb_tx_agg_desc_num = 1,
|
||||
.hw_feature_report = true,
|
||||
.c2h_ra_report_size = 7,
|
||||
+ .old_datarate_fb_limit = true,
|
||||
.ht_supported = true,
|
||||
.vht_supported = false,
|
||||
.lps_deep_mode_supported = 0,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -1972,6 +1972,7 @@ const struct rtw_chip_info rtw8821c_hw_s
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
.hw_feature_report = true,
|
||||
.c2h_ra_report_size = 7,
|
||||
+ .old_datarate_fb_limit = false,
|
||||
.ht_supported = true,
|
||||
.vht_supported = true,
|
||||
.lps_deep_mode_supported = BIT(LPS_DEEP_MODE_LCLK),
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
@@ -2513,6 +2513,7 @@ const struct rtw_chip_info rtw8822b_hw_s
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
.hw_feature_report = true,
|
||||
.c2h_ra_report_size = 7,
|
||||
+ .old_datarate_fb_limit = false,
|
||||
.ht_supported = true,
|
||||
.vht_supported = true,
|
||||
.lps_deep_mode_supported = BIT(LPS_DEEP_MODE_LCLK),
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -5333,6 +5333,7 @@ const struct rtw_chip_info rtw8822c_hw_s
|
||||
.usb_tx_agg_desc_num = 3,
|
||||
.hw_feature_report = true,
|
||||
.c2h_ra_report_size = 7,
|
||||
+ .old_datarate_fb_limit = false,
|
||||
.default_1ss_tx_path = BB_PATH_A,
|
||||
.path_div_supported = true,
|
||||
.ht_supported = true,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
@@ -864,7 +864,7 @@ static void rtw_sdio_tx_skb_prepare(stru
|
||||
|
||||
pkt_info->qsel = rtw_sdio_get_tx_qsel(rtwdev, skb, queue);
|
||||
|
||||
- rtw_tx_fill_tx_desc(pkt_info, skb);
|
||||
+ rtw_tx_fill_tx_desc(rtwdev, pkt_info, skb);
|
||||
rtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, pkt_desc);
|
||||
}
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/tx.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/tx.c
|
||||
@@ -32,7 +32,8 @@ void rtw_tx_stats(struct rtw_dev *rtwdev
|
||||
}
|
||||
}
|
||||
|
||||
-void rtw_tx_fill_tx_desc(struct rtw_tx_pkt_info *pkt_info, struct sk_buff *skb)
|
||||
+void rtw_tx_fill_tx_desc(struct rtw_dev *rtwdev,
|
||||
+ struct rtw_tx_pkt_info *pkt_info, struct sk_buff *skb)
|
||||
{
|
||||
struct rtw_tx_desc *tx_desc = (struct rtw_tx_desc *)skb->data;
|
||||
bool more_data = false;
|
||||
@@ -67,6 +68,9 @@ void rtw_tx_fill_tx_desc(struct rtw_tx_p
|
||||
|
||||
tx_desc->w4 = le32_encode_bits(pkt_info->rate, RTW_TX_DESC_W4_DATARATE);
|
||||
|
||||
+ if (rtwdev->chip->old_datarate_fb_limit)
|
||||
+ tx_desc->w4 |= le32_encode_bits(0x1f, RTW_TX_DESC_W4_DATARATE_FB_LIMIT);
|
||||
+
|
||||
tx_desc->w5 = le32_encode_bits(pkt_info->short_gi, RTW_TX_DESC_W5_DATA_SHORT) |
|
||||
le32_encode_bits(pkt_info->bw, RTW_TX_DESC_W5_DATA_BW) |
|
||||
le32_encode_bits(pkt_info->ldpc, RTW_TX_DESC_W5_DATA_LDPC) |
|
||||
--- a/drivers/net/wireless/realtek/rtw88/tx.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/tx.h
|
||||
@@ -44,6 +44,7 @@ struct rtw_tx_desc {
|
||||
#define RTW_TX_DESC_W3_NAVUSEHDR BIT(15)
|
||||
#define RTW_TX_DESC_W3_MAX_AGG_NUM GENMASK(21, 17)
|
||||
#define RTW_TX_DESC_W4_DATARATE GENMASK(6, 0)
|
||||
+#define RTW_TX_DESC_W4_DATARATE_FB_LIMIT GENMASK(12, 8)
|
||||
#define RTW_TX_DESC_W4_RTSRATE GENMASK(28, 24)
|
||||
#define RTW_TX_DESC_W5_DATA_SHORT BIT(4)
|
||||
#define RTW_TX_DESC_W5_DATA_BW GENMASK(6, 5)
|
||||
@@ -94,7 +95,8 @@ void rtw_tx_pkt_info_update(struct rtw_d
|
||||
struct rtw_tx_pkt_info *pkt_info,
|
||||
struct ieee80211_sta *sta,
|
||||
struct sk_buff *skb);
|
||||
-void rtw_tx_fill_tx_desc(struct rtw_tx_pkt_info *pkt_info, struct sk_buff *skb);
|
||||
+void rtw_tx_fill_tx_desc(struct rtw_dev *rtwdev,
|
||||
+ struct rtw_tx_pkt_info *pkt_info, struct sk_buff *skb);
|
||||
void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn);
|
||||
void rtw_tx_report_handle(struct rtw_dev *rtwdev, struct sk_buff *skb, int src);
|
||||
void rtw_tx_rsvd_page_pkt_info_update(struct rtw_dev *rtwdev,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
|
||||
@@ -458,7 +458,7 @@ static int rtw_usb_write_data(struct rtw
|
||||
skb_put_data(skb, buf, size);
|
||||
skb_push(skb, chip->tx_pkt_desc_sz);
|
||||
memset(skb->data, 0, chip->tx_pkt_desc_sz);
|
||||
- rtw_tx_fill_tx_desc(pkt_info, skb);
|
||||
+ rtw_tx_fill_tx_desc(rtwdev, pkt_info, skb);
|
||||
rtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, skb->data);
|
||||
|
||||
ret = rtw_usb_write_port(rtwdev, qsel, skb,
|
||||
@@ -525,7 +525,7 @@ static int rtw_usb_tx_write(struct rtw_d
|
||||
pkt_desc = skb_push(skb, chip->tx_pkt_desc_sz);
|
||||
memset(pkt_desc, 0, chip->tx_pkt_desc_sz);
|
||||
ep = qsel_to_ep(rtwusb, pkt_info->qsel);
|
||||
- rtw_tx_fill_tx_desc(pkt_info, skb);
|
||||
+ rtw_tx_fill_tx_desc(rtwdev, pkt_info, skb);
|
||||
rtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, skb->data);
|
||||
tx_data = rtw_usb_get_tx_data(skb);
|
||||
tx_data->sn = pkt_info->sn;
|
|
@ -1,85 +0,0 @@
|
|||
From abb0f19492ba6289ffba6ec1057c0426240958af Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 17:10:54 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Make txagc_remnant_ofdm an array
|
||||
|
||||
txagc_remnant_ofdm member of struct rtw_dm_info should be different for
|
||||
each RF path, so make it an array of size RTW_RF_PATH_MAX (4).
|
||||
|
||||
Until now all the chips using this had only one RF path, but RTL8812AU
|
||||
has two, and RTL8814AU has four.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/68571ba9-e504-4b2d-bfa1-62f468753649@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/phy.c | 4 ++--
|
||||
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 4 ++--
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 4 ++--
|
||||
4 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -1715,7 +1715,7 @@ struct rtw_dm_info {
|
||||
bool pwr_trk_init_trigger;
|
||||
struct ewma_thermal avg_thermal[RTW_RF_PATH_MAX];
|
||||
s8 txagc_remnant_cck;
|
||||
- s8 txagc_remnant_ofdm;
|
||||
+ s8 txagc_remnant_ofdm[RTW_RF_PATH_MAX];
|
||||
u8 rx_cck_agc_report_type;
|
||||
|
||||
/* backup dack results for each path and I/Q */
|
||||
--- a/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
@@ -2169,8 +2169,8 @@ void rtw_get_tx_power_params(struct rtw_
|
||||
|
||||
*limit = rtw_phy_get_tx_power_limit(rtwdev, band, bw, path,
|
||||
rate, ch, regd);
|
||||
- *remnant = (rate <= DESC_RATE11M ? dm_info->txagc_remnant_cck :
|
||||
- dm_info->txagc_remnant_ofdm);
|
||||
+ *remnant = rate <= DESC_RATE11M ? dm_info->txagc_remnant_cck :
|
||||
+ dm_info->txagc_remnant_ofdm[path];
|
||||
*sar = rtw_phy_get_tx_power_sar(rtwdev, hal->sar_band, path, rate);
|
||||
}
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
@@ -637,7 +637,7 @@ static void rtw8703b_pwrtrack_init(struc
|
||||
dm_info->pwr_trk_init_trigger = true;
|
||||
dm_info->thermal_meter_k = rtwdev->efuse.thermal_meter_k;
|
||||
dm_info->txagc_remnant_cck = 0;
|
||||
- dm_info->txagc_remnant_ofdm = 0;
|
||||
+ dm_info->txagc_remnant_ofdm[RF_PATH_A] = 0;
|
||||
}
|
||||
|
||||
static void rtw8703b_phy_set_param(struct rtw_dev *rtwdev)
|
||||
@@ -1589,7 +1589,7 @@ static void rtw8703b_pwrtrack_set_ofdm_p
|
||||
{
|
||||
struct rtw_dm_info *dm_info = &rtwdev->dm_info;
|
||||
|
||||
- dm_info->txagc_remnant_ofdm = txagc_idx;
|
||||
+ dm_info->txagc_remnant_ofdm[RF_PATH_A] = txagc_idx;
|
||||
|
||||
/* Only path A is calibrated for rtl8703b */
|
||||
rtw8703b_set_iqk_matrix(rtwdev, swing_idx, RF_PATH_A);
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
@@ -79,7 +79,7 @@ static void rtw8723d_pwrtrack_init(struc
|
||||
dm_info->pwr_trk_init_trigger = true;
|
||||
dm_info->thermal_meter_k = rtwdev->efuse.thermal_meter_k;
|
||||
dm_info->txagc_remnant_cck = 0;
|
||||
- dm_info->txagc_remnant_ofdm = 0;
|
||||
+ dm_info->txagc_remnant_ofdm[RF_PATH_A] = 0;
|
||||
}
|
||||
|
||||
static void rtw8723d_phy_set_param(struct rtw_dev *rtwdev)
|
||||
@@ -1265,7 +1265,7 @@ static void rtw8723d_pwrtrack_set_ofdm_p
|
||||
{
|
||||
struct rtw_dm_info *dm_info = &rtwdev->dm_info;
|
||||
|
||||
- dm_info->txagc_remnant_ofdm = txagc_idx;
|
||||
+ dm_info->txagc_remnant_ofdm[RF_PATH_A] = txagc_idx;
|
||||
|
||||
rtw8723d_set_iqk_matrix(rtwdev, swing_idx, RF_PATH_A);
|
||||
rtw8723d_set_iqk_matrix(rtwdev, swing_idx, RF_PATH_B);
|
|
@ -1,115 +0,0 @@
|
|||
From 82a617413e8545775ec03a1970809ac5f549ef32 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 17:12:06 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Support TX page sizes bigger than 128
|
||||
|
||||
All the chips supported so far have a TX page size of 128 bytes.
|
||||
|
||||
Change the type of the page_size member of struct rtw_chip_info from u8
|
||||
to u16 in order to support RTL8821AU (page size of 256 bytes) and
|
||||
RTL8812AU (page size of 512 bytes). Also change the types of several
|
||||
related variables and function parameters from u8 to u16.
|
||||
|
||||
The TX page size is used, among other things, to construct the beacon,
|
||||
null data, QOS null data, and PS poll templates which are uploaded to
|
||||
the chip's reserved page. Each template needs to be aligned on a
|
||||
multiple of the TX page size. Power saving can't work if the TX page
|
||||
size is wrong.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/acdefbb1-3daf-4349-9e03-9472754d5f1e@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/debug.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/fw.c | 21 +++++++++++----------
|
||||
drivers/net/wireless/realtek/rtw88/mac.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 2 +-
|
||||
4 files changed, 14 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/debug.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/debug.c
|
||||
@@ -308,7 +308,7 @@ static int rtw_debugfs_get_rsvd_page(str
|
||||
{
|
||||
struct rtw_debugfs_priv *debugfs_priv = m->private;
|
||||
struct rtw_dev *rtwdev = debugfs_priv->rtwdev;
|
||||
- u8 page_size = rtwdev->chip->page_size;
|
||||
+ u16 page_size = rtwdev->chip->page_size;
|
||||
u32 buf_size = debugfs_priv->rsvd_page.page_num * page_size;
|
||||
u32 offset = debugfs_priv->rsvd_page.page_offset * page_size;
|
||||
u8 *buf;
|
||||
--- a/drivers/net/wireless/realtek/rtw88/fw.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/fw.c
|
||||
@@ -1293,13 +1293,13 @@ static void rtw_fill_rsvd_page_desc(stru
|
||||
rtw_tx_fill_tx_desc(rtwdev, &pkt_info, skb);
|
||||
}
|
||||
|
||||
-static inline u8 rtw_len_to_page(unsigned int len, u8 page_size)
|
||||
+static inline u8 rtw_len_to_page(unsigned int len, u16 page_size)
|
||||
{
|
||||
return DIV_ROUND_UP(len, page_size);
|
||||
}
|
||||
|
||||
-static void rtw_rsvd_page_list_to_buf(struct rtw_dev *rtwdev, u8 page_size,
|
||||
- u8 page_margin, u32 page, u8 *buf,
|
||||
+static void rtw_rsvd_page_list_to_buf(struct rtw_dev *rtwdev, u16 page_size,
|
||||
+ u16 page_margin, u32 page, u8 *buf,
|
||||
struct rtw_rsvd_page *rsvd_pkt)
|
||||
{
|
||||
struct sk_buff *skb = rsvd_pkt->skb;
|
||||
@@ -1601,13 +1601,13 @@ static int __rtw_build_rsvd_page_from_v
|
||||
|
||||
static u8 *rtw_build_rsvd_page(struct rtw_dev *rtwdev, u32 *size)
|
||||
{
|
||||
- struct ieee80211_hw *hw = rtwdev->hw;
|
||||
const struct rtw_chip_info *chip = rtwdev->chip;
|
||||
- struct sk_buff *iter;
|
||||
+ struct ieee80211_hw *hw = rtwdev->hw;
|
||||
struct rtw_rsvd_page *rsvd_pkt;
|
||||
- u32 page = 0;
|
||||
+ struct sk_buff *iter;
|
||||
+ u16 page_size, page_margin, tx_desc_sz;
|
||||
u8 total_page = 0;
|
||||
- u8 page_size, page_margin, tx_desc_sz;
|
||||
+ u32 page = 0;
|
||||
u8 *buf;
|
||||
int ret;
|
||||
|
||||
@@ -2013,12 +2013,13 @@ static int _rtw_hw_scan_update_probe_req
|
||||
{
|
||||
const struct rtw_chip_info *chip = rtwdev->chip;
|
||||
struct sk_buff *skb, *tmp;
|
||||
- u8 page_offset = 1, *buf, page_size = chip->page_size;
|
||||
u16 pg_addr = rtwdev->fifo.rsvd_h2c_info_addr, loc;
|
||||
- u16 buf_offset = page_size * page_offset;
|
||||
u8 tx_desc_sz = chip->tx_pkt_desc_sz;
|
||||
- u8 page_cnt, pages;
|
||||
+ u16 page_size = chip->page_size;
|
||||
+ u8 page_offset = 1, *buf;
|
||||
+ u16 buf_offset = page_size * page_offset;
|
||||
unsigned int pkt_len;
|
||||
+ u8 page_cnt, pages;
|
||||
int ret;
|
||||
|
||||
if (rtw_fw_feature_ext_check(&rtwdev->fw, FW_FEATURE_EXT_OLD_PAGE_NUM))
|
||||
--- a/drivers/net/wireless/realtek/rtw88/mac.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/mac.c
|
||||
@@ -1138,7 +1138,7 @@ int rtw_set_trx_fifo_info(struct rtw_dev
|
||||
|
||||
/* config rsvd page num */
|
||||
fifo->rsvd_drv_pg_num = chip->rsvd_drv_pg_num;
|
||||
- fifo->txff_pg_num = chip->txff_size >> 7;
|
||||
+ fifo->txff_pg_num = chip->txff_size / chip->page_size;
|
||||
if (rtw_chip_wcpu_11n(rtwdev))
|
||||
fifo->rsvd_pg_num = fifo->rsvd_drv_pg_num;
|
||||
else
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -1187,7 +1187,7 @@ struct rtw_chip_info {
|
||||
u32 fw_rxff_size;
|
||||
u16 rsvd_drv_pg_num;
|
||||
u8 band;
|
||||
- u8 page_size;
|
||||
+ u16 page_size;
|
||||
u8 csi_buf_pg_num;
|
||||
u8 dig_max;
|
||||
u8 dig_min;
|
|
@ -1,297 +0,0 @@
|
|||
From 67d915604e6993ff627ac001983a2de63ff71b13 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 17:12:39 +0300
|
||||
Subject: [PATCH] wifi: rtw88: Move pwr_track_tbl to struct rtw_rfe_def
|
||||
|
||||
RTL8812AU uses one set of TX power tracking tables for RFE 3, and
|
||||
another set for everything else.
|
||||
|
||||
Move pwr_track_tbl from struct rtw_chip_info to struct rtw_rfe_def in
|
||||
order to load the right set of tables for each RFE (RF front end) type.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/904d0ab1-c046-40cd-a3a3-d4fdcf663c9d@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 8 ++++---
|
||||
drivers/net/wireless/realtek/rtw88/phy.c | 3 ++-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 12 +++++-----
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 12 +++++-----
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723x.c | 3 ++-
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 17 +++++++-------
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 15 ++++++------
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 23 +++++++++----------
|
||||
8 files changed, 47 insertions(+), 46 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -1099,17 +1099,20 @@ enum rtw_rfe_fem {
|
||||
struct rtw_rfe_def {
|
||||
const struct rtw_table *phy_pg_tbl;
|
||||
const struct rtw_table *txpwr_lmt_tbl;
|
||||
+ const struct rtw_pwr_track_tbl *pwr_track_tbl;
|
||||
const struct rtw_table *agc_btg_tbl;
|
||||
};
|
||||
|
||||
-#define RTW_DEF_RFE(chip, bb_pg, pwrlmt) { \
|
||||
+#define RTW_DEF_RFE(chip, bb_pg, pwrlmt, track) { \
|
||||
.phy_pg_tbl = &rtw ## chip ## _bb_pg_type ## bb_pg ## _tbl, \
|
||||
.txpwr_lmt_tbl = &rtw ## chip ## _txpwr_lmt_type ## pwrlmt ## _tbl, \
|
||||
+ .pwr_track_tbl = &rtw ## chip ## _pwr_track_type ## track ## _tbl, \
|
||||
}
|
||||
|
||||
-#define RTW_DEF_RFE_EXT(chip, bb_pg, pwrlmt, btg) { \
|
||||
+#define RTW_DEF_RFE_EXT(chip, bb_pg, pwrlmt, track, btg) { \
|
||||
.phy_pg_tbl = &rtw ## chip ## _bb_pg_type ## bb_pg ## _tbl, \
|
||||
.txpwr_lmt_tbl = &rtw ## chip ## _txpwr_lmt_type ## pwrlmt ## _tbl, \
|
||||
+ .pwr_track_tbl = &rtw ## chip ## _pwr_track_type ## track ## _tbl, \
|
||||
.agc_btg_tbl = &rtw ## chip ## _agc_btg_type ## btg ## _tbl, \
|
||||
}
|
||||
|
||||
@@ -1243,7 +1246,6 @@ struct rtw_chip_info {
|
||||
u16 dpd_ratemask;
|
||||
u8 iqk_threshold;
|
||||
u8 lck_threshold;
|
||||
- const struct rtw_pwr_track_tbl *pwr_track_tbl;
|
||||
|
||||
u8 bfer_su_max_num;
|
||||
u8 bfer_mu_max_num;
|
||||
--- a/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
|
||||
@@ -2384,7 +2384,8 @@ void rtw_phy_init_tx_power(struct rtw_de
|
||||
void rtw_phy_config_swing_table(struct rtw_dev *rtwdev,
|
||||
struct rtw_swing_table *swing_table)
|
||||
{
|
||||
- const struct rtw_pwr_track_tbl *tbl = rtwdev->chip->pwr_track_tbl;
|
||||
+ const struct rtw_rfe_def *rfe_def = rtw_get_rfe_def(rtwdev);
|
||||
+ const struct rtw_pwr_track_tbl *tbl = rfe_def->pwr_track_tbl;
|
||||
u8 channel = rtwdev->hal.current_channel;
|
||||
|
||||
if (IS_CH_2G_BAND(channel)) {
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
@@ -493,11 +493,6 @@ static const struct rtw_pwr_seq_cmd * co
|
||||
NULL
|
||||
};
|
||||
|
||||
-static const struct rtw_rfe_def rtw8703b_rfe_defs[] = {
|
||||
- [0] = { .phy_pg_tbl = &rtw8703b_bb_pg_tbl,
|
||||
- .txpwr_lmt_tbl = &rtw8703b_txpwr_lmt_tbl,},
|
||||
-};
|
||||
-
|
||||
static const struct rtw_page_table page_table_8703b[] = {
|
||||
{12, 2, 2, 0, 1},
|
||||
{12, 2, 2, 0, 1},
|
||||
@@ -1818,6 +1813,12 @@ static const struct rtw_pwr_track_tbl rt
|
||||
.pwrtrk_xtal_p = rtw8703b_pwrtrk_xtal_p,
|
||||
};
|
||||
|
||||
+static const struct rtw_rfe_def rtw8703b_rfe_defs[] = {
|
||||
+ [0] = { .phy_pg_tbl = &rtw8703b_bb_pg_tbl,
|
||||
+ .txpwr_lmt_tbl = &rtw8703b_txpwr_lmt_tbl,
|
||||
+ .pwr_track_tbl = &rtw8703b_rtw_pwr_track_tbl, },
|
||||
+};
|
||||
+
|
||||
/* Shared-Antenna Coex Table */
|
||||
static const struct coex_table_para table_sant_8703b[] = {
|
||||
{0xffffffff, 0xffffffff}, /* case-0 */
|
||||
@@ -1997,7 +1998,6 @@ const struct rtw_chip_info rtw8703b_hw_s
|
||||
.rfe_defs_size = ARRAY_SIZE(rtw8703b_rfe_defs),
|
||||
|
||||
.iqk_threshold = 8,
|
||||
- .pwr_track_tbl = &rtw8703b_rtw_pwr_track_tbl,
|
||||
|
||||
/* WOWLAN firmware exists, but not implemented yet */
|
||||
.wow_fw_name = "rtw88/rtw8703b_wow_fw.bin",
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
||||
@@ -2020,11 +2020,6 @@ static const struct rtw_intf_phy_para_ta
|
||||
.n_gen1_para = ARRAY_SIZE(pcie_gen1_param_8723d),
|
||||
};
|
||||
|
||||
-static const struct rtw_rfe_def rtw8723d_rfe_defs[] = {
|
||||
- [0] = { .phy_pg_tbl = &rtw8723d_bb_pg_tbl,
|
||||
- .txpwr_lmt_tbl = &rtw8723d_txpwr_lmt_tbl,},
|
||||
-};
|
||||
-
|
||||
static const u8 rtw8723d_pwrtrk_2gb_n[] = {
|
||||
0, 0, 1, 1, 1, 2, 2, 3, 4, 4, 4, 4, 5, 5, 5,
|
||||
6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10
|
||||
@@ -2088,6 +2083,12 @@ static const struct rtw_pwr_track_tbl rt
|
||||
.pwrtrk_xtal_n = rtw8723d_pwrtrk_xtal_n,
|
||||
};
|
||||
|
||||
+static const struct rtw_rfe_def rtw8723d_rfe_defs[] = {
|
||||
+ [0] = { .phy_pg_tbl = &rtw8723d_bb_pg_tbl,
|
||||
+ .txpwr_lmt_tbl = &rtw8723d_txpwr_lmt_tbl,
|
||||
+ .pwr_track_tbl = &rtw8723d_rtw_pwr_track_tbl, },
|
||||
+};
|
||||
+
|
||||
static const struct rtw_reg_domain coex_info_hw_regs_8723d[] = {
|
||||
{0x948, MASKDWORD, RTW_REG_DOMAIN_MAC32},
|
||||
{0x67, BIT(7), RTW_REG_DOMAIN_MAC8},
|
||||
@@ -2159,7 +2160,6 @@ const struct rtw_chip_info rtw8723d_hw_s
|
||||
.rfe_defs = rtw8723d_rfe_defs,
|
||||
.rfe_defs_size = ARRAY_SIZE(rtw8723d_rfe_defs),
|
||||
.rx_ldpc = false,
|
||||
- .pwr_track_tbl = &rtw8723d_rtw_pwr_track_tbl,
|
||||
.iqk_threshold = 8,
|
||||
.ampdu_density = IEEE80211_HT_MPDU_DENSITY_16,
|
||||
.max_scan_ie_len = IEEE80211_MAX_DATA_LEN,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723x.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723x.c
|
||||
@@ -595,7 +595,8 @@ void __rtw8723x_pwrtrack_set_xtal(struct
|
||||
u8 delta)
|
||||
{
|
||||
struct rtw_dm_info *dm_info = &rtwdev->dm_info;
|
||||
- const struct rtw_pwr_track_tbl *tbl = rtwdev->chip->pwr_track_tbl;
|
||||
+ const struct rtw_rfe_def *rfe_def = rtw_get_rfe_def(rtwdev);
|
||||
+ const struct rtw_pwr_track_tbl *tbl = rfe_def->pwr_track_tbl;
|
||||
const s8 *pwrtrk_xtal;
|
||||
s8 xtal_cap;
|
||||
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -1581,13 +1581,6 @@ static const struct rtw_intf_phy_para_ta
|
||||
.n_gen2_para = ARRAY_SIZE(pcie_gen2_param_8821c),
|
||||
};
|
||||
|
||||
-static const struct rtw_rfe_def rtw8821c_rfe_defs[] = {
|
||||
- [0] = RTW_DEF_RFE(8821c, 0, 0),
|
||||
- [2] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2),
|
||||
- [4] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2),
|
||||
- [6] = RTW_DEF_RFE(8821c, 0, 0),
|
||||
-};
|
||||
-
|
||||
static const struct rtw_hw_reg rtw8821c_dig[] = {
|
||||
[0] = { .addr = 0xc50, .mask = 0x7f },
|
||||
};
|
||||
@@ -1899,7 +1892,7 @@ static const u8 rtw8821c_pwrtrk_2g_cck_a
|
||||
5, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_track_tbl rtw8821c_rtw_pwr_track_tbl = {
|
||||
+static const struct rtw_pwr_track_tbl rtw8821c_pwr_track_type0_tbl = {
|
||||
.pwrtrk_5gb_n[0] = rtw8821c_pwrtrk_5gb_n[0],
|
||||
.pwrtrk_5gb_n[1] = rtw8821c_pwrtrk_5gb_n[1],
|
||||
.pwrtrk_5gb_n[2] = rtw8821c_pwrtrk_5gb_n[2],
|
||||
@@ -1922,6 +1915,13 @@ static const struct rtw_pwr_track_tbl rt
|
||||
.pwrtrk_2g_ccka_p = rtw8821c_pwrtrk_2g_cck_a_p,
|
||||
};
|
||||
|
||||
+static const struct rtw_rfe_def rtw8821c_rfe_defs[] = {
|
||||
+ [0] = RTW_DEF_RFE(8821c, 0, 0, 0),
|
||||
+ [2] = RTW_DEF_RFE_EXT(8821c, 0, 0, 0, 2),
|
||||
+ [4] = RTW_DEF_RFE_EXT(8821c, 0, 0, 0, 2),
|
||||
+ [6] = RTW_DEF_RFE(8821c, 0, 0, 0),
|
||||
+};
|
||||
+
|
||||
static const struct rtw_reg_domain coex_info_hw_regs_8821c[] = {
|
||||
{0xCB0, MASKDWORD, RTW_REG_DOMAIN_MAC32},
|
||||
{0xCB4, MASKDWORD, RTW_REG_DOMAIN_MAC32},
|
||||
@@ -1994,7 +1994,6 @@ const struct rtw_chip_info rtw8821c_hw_s
|
||||
.rfe_defs = rtw8821c_rfe_defs,
|
||||
.rfe_defs_size = ARRAY_SIZE(rtw8821c_rfe_defs),
|
||||
.rx_ldpc = false,
|
||||
- .pwr_track_tbl = &rtw8821c_rtw_pwr_track_tbl,
|
||||
.iqk_threshold = 8,
|
||||
.bfer_su_max_num = 2,
|
||||
.bfer_mu_max_num = 1,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
|
||||
@@ -2072,12 +2072,6 @@ static const struct rtw_intf_phy_para_ta
|
||||
.n_gen2_para = ARRAY_SIZE(pcie_gen2_param_8822b),
|
||||
};
|
||||
|
||||
-static const struct rtw_rfe_def rtw8822b_rfe_defs[] = {
|
||||
- [2] = RTW_DEF_RFE(8822b, 2, 2),
|
||||
- [3] = RTW_DEF_RFE(8822b, 3, 0),
|
||||
- [5] = RTW_DEF_RFE(8822b, 5, 5),
|
||||
-};
|
||||
-
|
||||
static const struct rtw_hw_reg rtw8822b_dig[] = {
|
||||
[0] = { .addr = 0xc50, .mask = 0x7f },
|
||||
[1] = { .addr = 0xe50, .mask = 0x7f },
|
||||
@@ -2432,7 +2426,7 @@ static const u8 rtw8822b_pwrtrk_2g_cck_a
|
||||
10, 11, 11, 12, 12, 13, 13, 14, 14, 15
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_track_tbl rtw8822b_rtw_pwr_track_tbl = {
|
||||
+static const struct rtw_pwr_track_tbl rtw8822b_pwr_track_type0_tbl = {
|
||||
.pwrtrk_5gb_n[RTW_PWR_TRK_5G_1] = rtw8822b_pwrtrk_5gb_n[RTW_PWR_TRK_5G_1],
|
||||
.pwrtrk_5gb_n[RTW_PWR_TRK_5G_2] = rtw8822b_pwrtrk_5gb_n[RTW_PWR_TRK_5G_2],
|
||||
.pwrtrk_5gb_n[RTW_PWR_TRK_5G_3] = rtw8822b_pwrtrk_5gb_n[RTW_PWR_TRK_5G_3],
|
||||
@@ -2455,6 +2449,12 @@ static const struct rtw_pwr_track_tbl rt
|
||||
.pwrtrk_2g_ccka_p = rtw8822b_pwrtrk_2g_cck_a_p,
|
||||
};
|
||||
|
||||
+static const struct rtw_rfe_def rtw8822b_rfe_defs[] = {
|
||||
+ [2] = RTW_DEF_RFE(8822b, 2, 2, 0),
|
||||
+ [3] = RTW_DEF_RFE(8822b, 3, 0, 0),
|
||||
+ [5] = RTW_DEF_RFE(8822b, 5, 5, 0),
|
||||
+};
|
||||
+
|
||||
static const struct rtw_reg_domain coex_info_hw_regs_8822b[] = {
|
||||
{0xcb0, MASKDWORD, RTW_REG_DOMAIN_MAC32},
|
||||
{0xcb4, MASKDWORD, RTW_REG_DOMAIN_MAC32},
|
||||
@@ -2535,7 +2535,6 @@ const struct rtw_chip_info rtw8822b_hw_s
|
||||
.rf_tbl = {&rtw8822b_rf_a_tbl, &rtw8822b_rf_b_tbl},
|
||||
.rfe_defs = rtw8822b_rfe_defs,
|
||||
.rfe_defs_size = ARRAY_SIZE(rtw8822b_rfe_defs),
|
||||
- .pwr_track_tbl = &rtw8822b_rtw_pwr_track_tbl,
|
||||
.iqk_threshold = 8,
|
||||
.bfer_su_max_num = 2,
|
||||
.bfer_mu_max_num = 1,
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
|
||||
@@ -4883,16 +4883,6 @@ static const struct rtw_intf_phy_para_ta
|
||||
.n_gen2_para = ARRAY_SIZE(pcie_gen2_param_8822c),
|
||||
};
|
||||
|
||||
-static const struct rtw_rfe_def rtw8822c_rfe_defs[] = {
|
||||
- [0] = RTW_DEF_RFE(8822c, 0, 0),
|
||||
- [1] = RTW_DEF_RFE(8822c, 0, 0),
|
||||
- [2] = RTW_DEF_RFE(8822c, 0, 0),
|
||||
- [3] = RTW_DEF_RFE(8822c, 0, 0),
|
||||
- [4] = RTW_DEF_RFE(8822c, 0, 0),
|
||||
- [5] = RTW_DEF_RFE(8822c, 0, 5),
|
||||
- [6] = RTW_DEF_RFE(8822c, 0, 0),
|
||||
-};
|
||||
-
|
||||
static const struct rtw_hw_reg rtw8822c_dig[] = {
|
||||
[0] = { .addr = 0x1d70, .mask = 0x7f },
|
||||
[1] = { .addr = 0x1d70, .mask = 0x7f00 },
|
||||
@@ -5238,7 +5228,7 @@ static const u8 rtw8822c_pwrtrk_2g_cck_a
|
||||
18, 18, 19, 20, 21, 22, 23, 24, 24, 25
|
||||
};
|
||||
|
||||
-static const struct rtw_pwr_track_tbl rtw8822c_rtw_pwr_track_tbl = {
|
||||
+static const struct rtw_pwr_track_tbl rtw8822c_pwr_track_type0_tbl = {
|
||||
.pwrtrk_5gb_n[RTW_PWR_TRK_5G_1] = rtw8822c_pwrtrk_5gb_n[RTW_PWR_TRK_5G_1],
|
||||
.pwrtrk_5gb_n[RTW_PWR_TRK_5G_2] = rtw8822c_pwrtrk_5gb_n[RTW_PWR_TRK_5G_2],
|
||||
.pwrtrk_5gb_n[RTW_PWR_TRK_5G_3] = rtw8822c_pwrtrk_5gb_n[RTW_PWR_TRK_5G_3],
|
||||
@@ -5261,6 +5251,16 @@ static const struct rtw_pwr_track_tbl rt
|
||||
.pwrtrk_2g_ccka_p = rtw8822c_pwrtrk_2g_cck_a_p,
|
||||
};
|
||||
|
||||
+static const struct rtw_rfe_def rtw8822c_rfe_defs[] = {
|
||||
+ [0] = RTW_DEF_RFE(8822c, 0, 0, 0),
|
||||
+ [1] = RTW_DEF_RFE(8822c, 0, 0, 0),
|
||||
+ [2] = RTW_DEF_RFE(8822c, 0, 0, 0),
|
||||
+ [3] = RTW_DEF_RFE(8822c, 0, 0, 0),
|
||||
+ [4] = RTW_DEF_RFE(8822c, 0, 0, 0),
|
||||
+ [5] = RTW_DEF_RFE(8822c, 0, 5, 0),
|
||||
+ [6] = RTW_DEF_RFE(8822c, 0, 0, 0),
|
||||
+};
|
||||
+
|
||||
static const struct rtw_hw_reg_offset rtw8822c_edcca_th[] = {
|
||||
[EDCCA_TH_L2H_IDX] = {
|
||||
{.addr = 0x84c, .mask = MASKBYTE2}, .offset = 0x80
|
||||
@@ -5360,7 +5360,6 @@ const struct rtw_chip_info rtw8822c_hw_s
|
||||
.rfe_defs_size = ARRAY_SIZE(rtw8822c_rfe_defs),
|
||||
.en_dis_dpd = true,
|
||||
.dpd_ratemask = DIS_DPD_RATEALL,
|
||||
- .pwr_track_tbl = &rtw8822c_rtw_pwr_track_tbl,
|
||||
.iqk_threshold = 8,
|
||||
.lck_threshold = 8,
|
||||
.bfer_su_max_num = 2,
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue