Skip to content

Commit

Permalink
Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kva…
Browse files Browse the repository at this point in the history
…lo/ath.git

ath.git patches for v5.18. Major changes:

ath11k

* debugfs interface to configure firmware debug log level

* debugfs interface to test Target Wake Time (TWT)

* provide 802.11ax High Efficiency (HE) data via radiotap

ath9k

* use hw_random API instead of directly dumping into random.c

wcn36xx

* fix wcn3660 to work on 5 GHz band
  • Loading branch information
Kalle Valo committed Feb 25, 2022
2 parents b865273 + 49ffac5 commit c772391
Show file tree
Hide file tree
Showing 37 changed files with 2,017 additions and 206 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath10k/htt_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt,
RX_MSDU_END_INFO0_LAST_MSDU;

/* FIXME: why are we skipping the first part of the rx_desc? */
trace_ath10k_htt_rx_desc(ar, rx_desc + sizeof(u32),
trace_ath10k_htt_rx_desc(ar, (void *)rx_desc + sizeof(u32),
hw->rx_desc_ops->rx_desc_size - sizeof(u32));

if (last_msdu)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath10k/swap.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct ath10k_fw_file;
struct ath10k_swap_code_seg_tlv {
__le32 address;
__le32 length;
u8 data[0];
u8 data[];
} __packed;

struct ath10k_swap_code_seg_tail {
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/ath/ath11k/ahb.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ static void ath11k_ahb_free_ext_irq(struct ath11k_base *ab)

for (j = 0; j < irq_grp->num_irq; j++)
free_irq(ab->irq_num[irq_grp->irqs[j]], irq_grp);

netif_napi_del(&irq_grp->napi);
}
}

Expand Down Expand Up @@ -466,7 +468,7 @@ static irqreturn_t ath11k_ahb_ext_interrupt_handler(int irq, void *arg)
return IRQ_HANDLED;
}

static int ath11k_ahb_ext_irq_config(struct ath11k_base *ab)
static int ath11k_ahb_config_ext_irq(struct ath11k_base *ab)
{
struct ath11k_hw_params *hw = &ab->hw_params;
int i, j;
Expand Down Expand Up @@ -574,7 +576,7 @@ static int ath11k_ahb_config_irq(struct ath11k_base *ab)
}

/* Configure external interrupts */
ret = ath11k_ahb_ext_irq_config(ab);
ret = ath11k_ahb_config_ext_irq(ab);

return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath11k/ce.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct ath11k_ce_ring {
u32 hal_ring_id;

/* keep last */
struct sk_buff *skb[0];
struct sk_buff *skb[];
};

struct ath11k_ce_pipe {
Expand Down
6 changes: 6 additions & 0 deletions drivers/net/wireless/ath/ath11k/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.supports_rssi_stats = false,
.fw_wmi_diag_event = false,
.current_cc_support = false,
.dbr_debug_support = true,
},
{
.hw_rev = ATH11K_HW_IPQ6018_HW10,
Expand Down Expand Up @@ -164,6 +165,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.supports_rssi_stats = false,
.fw_wmi_diag_event = false,
.current_cc_support = false,
.dbr_debug_support = true,
},
{
.name = "qca6390 hw2.0",
Expand Down Expand Up @@ -228,6 +230,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.supports_rssi_stats = true,
.fw_wmi_diag_event = true,
.current_cc_support = true,
.dbr_debug_support = false,
},
{
.name = "qcn9074 hw1.0",
Expand Down Expand Up @@ -292,6 +295,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.supports_rssi_stats = false,
.fw_wmi_diag_event = false,
.current_cc_support = false,
.dbr_debug_support = true,
},
{
.name = "wcn6855 hw2.0",
Expand Down Expand Up @@ -356,6 +360,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.supports_rssi_stats = true,
.fw_wmi_diag_event = true,
.current_cc_support = true,
.dbr_debug_support = false,
},
{
.name = "wcn6855 hw2.1",
Expand Down Expand Up @@ -419,6 +424,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.supports_rssi_stats = true,
.fw_wmi_diag_event = true,
.current_cc_support = true,
.dbr_debug_support = false,
},
};

Expand Down
11 changes: 10 additions & 1 deletion drivers/net/wireless/ath/ath11k/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ struct ath11k_vif {
bool bcca_zero_sent;
bool do_not_send_tmpl;
struct ieee80211_chanctx_conf chanctx;
#ifdef CONFIG_ATH11K_DEBUGFS
struct dentry *debugfs_twt;
#endif /* CONFIG_ATH11K_DEBUGFS */
};

struct ath11k_vif_iter {
Expand Down Expand Up @@ -441,6 +444,8 @@ struct ath11k_dbg_htt_stats {
spinlock_t lock;
};

#define MAX_MODULE_ID_BITMAP_WORDS 16

struct ath11k_debug {
struct dentry *debugfs_pdev;
struct ath11k_dbg_htt_stats htt_stats;
Expand All @@ -454,6 +459,9 @@ struct ath11k_debug {
u32 pktlog_peer_valid;
u8 pktlog_peer_addr[ETH_ALEN];
u32 rx_filter;
u32 mem_offset;
u32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
struct ath11k_debug_dbr *dbr_debug[WMI_DIRECT_BUF_MAX];
};

struct ath11k_per_peer_tx_stats {
Expand Down Expand Up @@ -604,6 +612,7 @@ struct ath11k {
bool pending_11d;
bool regdom_set_by_user;
int hw_rate_code;
u8 twt_enabled;
};

struct ath11k_band_cap {
Expand Down Expand Up @@ -807,7 +816,7 @@ struct ath11k_base {
} id;

/* must be last */
u8 drv_priv[0] __aligned(sizeof(void *));
u8 drv_priv[] __aligned(sizeof(void *));
};

struct ath11k_fw_stats_pdev {
Expand Down
19 changes: 13 additions & 6 deletions drivers/net/wireless/ath/ath11k/dbring.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ static void ath11k_dbring_fill_magic_value(struct ath11k *ar,

static int ath11k_dbring_bufs_replenish(struct ath11k *ar,
struct ath11k_dbring *ring,
struct ath11k_dbring_element *buff)
struct ath11k_dbring_element *buff,
enum wmi_direct_buffer_module id)
{
struct ath11k_base *ab = ar->ab;
struct hal_srng *srng;
Expand Down Expand Up @@ -84,6 +85,7 @@ static int ath11k_dbring_bufs_replenish(struct ath11k *ar,

ath11k_hal_rx_buf_addr_info_set(desc, paddr, cookie, 0);

ath11k_debugfs_add_dbring_entry(ar, id, ATH11K_DBG_DBR_EVENT_REPLENISH, srng);
ath11k_hal_srng_access_end(ab, srng);

return 0;
Expand All @@ -101,7 +103,8 @@ static int ath11k_dbring_bufs_replenish(struct ath11k *ar,
}

static int ath11k_dbring_fill_bufs(struct ath11k *ar,
struct ath11k_dbring *ring)
struct ath11k_dbring *ring,
enum wmi_direct_buffer_module id)
{
struct ath11k_dbring_element *buff;
struct hal_srng *srng;
Expand Down Expand Up @@ -129,7 +132,7 @@ static int ath11k_dbring_fill_bufs(struct ath11k *ar,
kfree(buff);
break;
}
ret = ath11k_dbring_bufs_replenish(ar, ring, buff);
ret = ath11k_dbring_bufs_replenish(ar, ring, buff, id);
if (ret) {
ath11k_warn(ar->ab, "failed to replenish db ring num_remain %d req_ent %d\n",
num_remain, req_entries);
Expand Down Expand Up @@ -210,7 +213,7 @@ int ath11k_dbring_buf_setup(struct ath11k *ar,
ring->hp_addr = ath11k_hal_srng_get_hp_addr(ar->ab, srng);
ring->tp_addr = ath11k_hal_srng_get_tp_addr(ar->ab, srng);

ret = ath11k_dbring_fill_bufs(ar, ring);
ret = ath11k_dbring_fill_bufs(ar, ring, db_cap->id);

return ret;
}
Expand Down Expand Up @@ -270,14 +273,15 @@ int ath11k_dbring_buffer_release_event(struct ath11k_base *ab,
struct ath11k_buffer_addr desc;
u8 *vaddr_unalign;
u32 num_entry, num_buff_reaped;
u8 pdev_idx, rbm;
u8 pdev_idx, rbm, module_id;
u32 cookie;
int buf_id;
int size;
dma_addr_t paddr;
int ret = 0;

pdev_idx = ev->fixed.pdev_id;
module_id = ev->fixed.module_id;

if (pdev_idx >= ab->num_radios) {
ath11k_warn(ab, "Invalid pdev id %d\n", pdev_idx);
Expand Down Expand Up @@ -346,6 +350,9 @@ int ath11k_dbring_buffer_release_event(struct ath11k_base *ab,
dma_unmap_single(ab->dev, buff->paddr, ring->buf_sz,
DMA_FROM_DEVICE);

ath11k_debugfs_add_dbring_entry(ar, module_id,
ATH11K_DBG_DBR_EVENT_RX, srng);

if (ring->handler) {
vaddr_unalign = buff->payload;
handler_data.data = PTR_ALIGN(vaddr_unalign,
Expand All @@ -357,7 +364,7 @@ int ath11k_dbring_buffer_release_event(struct ath11k_base *ab,

buff->paddr = 0;
memset(buff->payload, 0, size);
ath11k_dbring_bufs_replenish(ar, ring, buff);
ath11k_dbring_bufs_replenish(ar, ring, buff, module_id);
}

spin_unlock_bh(&srng->lock);
Expand Down
Loading

0 comments on commit c772391

Please sign in to comment.