Loading drivers/net/wireless/ath/wil6210/debugfs.c +68 −11 Original line number Diff line number Diff line Loading @@ -1219,7 +1219,7 @@ static int wil_status_msg_debugfs_show(struct seq_file *s, void *data) seq_printf(s, " 0x%08x 0x%08x 0x%08x 0x%08x\n", u[0], u[1], u[2], u[3]); if (!tx && !use_compressed_rx_status) if (!tx && !wil->use_compressed_rx_status) seq_printf(s, " 0x%08x 0x%08x 0x%08x 0x%08x\n", u[4], u[5], u[6], u[7]); Loading Loading @@ -1679,6 +1679,7 @@ static void wil_print_rxtid(struct seq_file *s, struct wil_tid_ampdu_rx *r) int i; u16 index = ((r->head_seq_num - r->ssn) & 0xfff) % r->buf_size; unsigned long long drop_dup = r->drop_dup, drop_old = r->drop_old; unsigned long long drop_dup_mcast = r->drop_dup_mcast; seq_printf(s, "([%2d]) 0x%03x [", r->buf_size, r->head_seq_num); for (i = 0; i < r->buf_size; i++) { Loading @@ -1688,9 +1689,9 @@ static void wil_print_rxtid(struct seq_file *s, struct wil_tid_ampdu_rx *r) seq_printf(s, "%c", r->reorder_buf[i] ? '*' : '_'); } seq_printf(s, "] total %llu drop %llu (dup %llu + old %llu) last 0x%03x\n", r->total, drop_dup + drop_old, drop_dup, drop_old, r->ssn_last_drop); "] total %llu drop %llu (dup %llu + old %llu + dup mcast %llu) last 0x%03x\n", r->total, drop_dup + drop_old + drop_dup_mcast, drop_dup, drop_old, drop_dup_mcast, r->ssn_last_drop); } static void wil_print_rxtid_crypto(struct seq_file *s, int tid, Loading Loading @@ -1772,8 +1773,6 @@ __acquires(&p->tid_rx_lock) __releases(&p->tid_rx_lock) p->stats.rx_short_frame, p->stats.rx_large_frame, p->stats.rx_replay); if (wil->use_enhanced_dma_hw) seq_printf(s, "mic error %lu, key error %lu, amsdu error %lu\n", p->stats.rx_mic_error, Loading Loading @@ -2062,6 +2061,60 @@ static const struct file_operations fops_suspend_stats = { .open = simple_open, }; /*---------compressed_rx_status---------*/ static ssize_t wil_compressed_rx_status_write(struct file *file, const char __user *buf, size_t len, loff_t *ppos) { struct seq_file *s = file->private_data; struct wil6210_priv *wil = s->private; int compressed_rx_status; int rc; rc = kstrtoint_from_user(buf, len, 0, &compressed_rx_status); if (rc) { wil_err(wil, "Invalid argument\n"); return rc; } if (wil_has_active_ifaces(wil, true, false)) { wil_err(wil, "cannot change edma config after iface is up\n"); return -EPERM; } wil_info(wil, "%sable compressed_rx_status\n", compressed_rx_status ? "En" : "Dis"); wil->use_compressed_rx_status = compressed_rx_status; return len; } static int wil_compressed_rx_status_show(struct seq_file *s, void *data) { struct wil6210_priv *wil = s->private; seq_printf(s, "%d\n", wil->use_compressed_rx_status); return 0; } static int wil_compressed_rx_status_seq_open(struct inode *inode, struct file *file) { return single_open(file, wil_compressed_rx_status_show, inode->i_private); } static const struct file_operations fops_compressed_rx_status = { .open = wil_compressed_rx_status_seq_open, .release = single_release, .read = seq_read, .write = wil_compressed_rx_status_write, .llseek = seq_lseek, }; /*----------------*/ static void wil6210_debugfs_init_blobs(struct wil6210_priv *wil, struct dentry *dbg) Loading Loading @@ -2116,6 +2169,7 @@ static const struct { {"fw_capabilities", 0444, &fops_fw_capabilities}, {"fw_version", 0444, &fops_fw_version}, {"suspend_stats", 0644, &fops_suspend_stats}, {"compressed_rx_status", 0644, &fops_compressed_rx_status}, {"srings", 0444, &fops_srings}, {"status_msg", 0444, &fops_status_msg}, {"rx_buff_mgmt", 0444, &fops_rx_buff_mgmt}, Loading Loading @@ -2166,6 +2220,9 @@ static const struct dbg_off dbg_wil_off[] = { WIL_FIELD(wakeup_trigger, 0644, doff_u8), WIL_FIELD(ring_idle_trsh, 0644, doff_u32), WIL_FIELD(num_rx_status_rings, 0644, doff_u8), WIL_FIELD(rx_status_ring_order, 0644, doff_u32), WIL_FIELD(tx_status_ring_order, 0644, doff_u32), WIL_FIELD(rx_buff_id_count, 0644, doff_u32), WIL_FIELD(amsdu_en, 0644, doff_u8), WIL_FIELD(force_edmg_channel, 0644, doff_u8), {}, Loading drivers/net/wireless/ath/wil6210/main.c +15 −1 Original line number Diff line number Diff line Loading @@ -652,8 +652,22 @@ int wil_priv_init(struct wil6210_priv *wil) wil->reply_mid = U8_MAX; wil->max_vifs = 1; /* num of rx srings can be updated via debugfs before allocation */ /* edma configuration can be updated via debugfs before allocation */ wil->num_rx_status_rings = WIL_DEFAULT_NUM_RX_STATUS_RINGS; wil->use_compressed_rx_status = true; wil->use_rx_hw_reordering = true; wil->tx_status_ring_order = WIL_TX_SRING_SIZE_ORDER_DEFAULT; /* Rx status ring size should be bigger than the number of RX buffers * in order to prevent backpressure on the status ring, which may * cause HW freeze. */ wil->rx_status_ring_order = WIL_RX_SRING_SIZE_ORDER_DEFAULT; /* Number of RX buffer IDs should be bigger than the RX descriptor * ring size as in HW reorder flow, the HW can consume additional * buffers before releasing the previous ones. */ wil->rx_buff_id_count = WIL_RX_BUFF_ARR_SIZE_DEFAULT; wil->amsdu_en = 1; Loading drivers/net/wireless/ath/wil6210/pcie_bus.c +2 −5 Original line number Diff line number Diff line Loading @@ -32,10 +32,6 @@ bool ftm_mode; module_param(ftm_mode, bool, 0444); MODULE_PARM_DESC(ftm_mode, " Set factory test mode, default - false"); static bool use_enhanced_dma_hw = true; module_param(use_enhanced_dma_hw, bool, 0444); MODULE_PARM_DESC(use_enhanced_dma_hw, " Use enhanced or legacy DMA HW. Default: true when available"); #ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP static int wil6210_pm_notify(struct notifier_block *notify_block, Loading Loading @@ -114,7 +110,8 @@ int wil_set_capabilities(struct wil6210_priv *wil) wil->rgf_fw_assert_code_addr = TALYN_RGF_FW_ASSERT_CODE; wil->rgf_ucode_assert_code_addr = TALYN_RGF_UCODE_ASSERT_CODE; set_bit(hw_capa_no_flash, wil->hw_capa); wil->use_enhanced_dma_hw = use_enhanced_dma_hw; wil->use_enhanced_dma_hw = true; wil->use_rx_hw_reordering = true; wil_fw_name = ftm_mode ? WIL_FW_NAME_FTM_TALYN : WIL_FW_NAME_TALYN; if (wil_fw_verify_file_exists(wil, wil_fw_name)) Loading drivers/net/wireless/ath/wil6210/rx_reorder.c +18 −8 Original line number Diff line number Diff line Loading @@ -95,14 +95,15 @@ __acquires(&sta->tid_rx_lock) __releases(&sta->tid_rx_lock) { struct wil6210_vif *vif; struct net_device *ndev; int tid, cid, mid, mcast; int tid, cid, mid, mcast, retry; u16 seq; struct wil_sta_info *sta; struct wil_tid_ampdu_rx *r; u16 hseq; int index; wil->txrx_ops.get_reorder_params(skb, &tid, &cid, &mid, &seq, &mcast); wil->txrx_ops.get_reorder_params(wil, skb, &tid, &cid, &mid, &seq, &mcast, &retry); sta = &wil->sta[cid]; wil_dbg_txrx(wil, "MID %d CID %d TID %d Seq 0x%03x mcast %01x\n", Loading @@ -116,11 +117,6 @@ __acquires(&sta->tid_rx_lock) __releases(&sta->tid_rx_lock) } ndev = vif_to_ndev(vif); if (unlikely(mcast)) { wil_netif_rx_any(skb, ndev); return; } spin_lock(&sta->tid_rx_lock); r = sta->tid_rx[tid]; Loading @@ -129,6 +125,19 @@ __acquires(&sta->tid_rx_lock) __releases(&sta->tid_rx_lock) goto out; } if (unlikely(mcast)) { if (retry && seq == r->mcast_last_seq) { r->drop_dup_mcast++; wil_dbg_txrx(wil, "Rx drop: dup mcast seq 0x%03x\n", seq); dev_kfree_skb(skb); goto out; } r->mcast_last_seq = seq; wil_netif_rx_any(skb, ndev); goto out; } r->total++; hseq = r->head_seq_num; Loading Loading @@ -261,6 +270,7 @@ struct wil_tid_ampdu_rx *wil_tid_ampdu_rx_alloc(struct wil6210_priv *wil, r->buf_size = size; r->stored_mpdu_num = 0; r->first_time = true; r->mcast_last_seq = U16_MAX; return r; } Loading Loading @@ -315,7 +325,7 @@ __acquires(&sta->tid_rx_lock) __releases(&sta->tid_rx_lock) */ u16 req_agg_wsize = WIL_GET_BITS(param_set, 6, 15); bool agg_amsdu = wil->use_enhanced_dma_hw && use_rx_hw_reordering && wil->use_rx_hw_reordering && test_bit(WMI_FW_CAPABILITY_AMSDU, wil->fw_capabilities) && wil->amsdu_en && (param_set & BIT(0)); int ba_policy = param_set & BIT(1); Loading drivers/net/wireless/ath/wil6210/trace.h +7 −5 Original line number Diff line number Diff line Loading @@ -188,8 +188,9 @@ TRACE_EVENT(wil6210_rx, ); TRACE_EVENT(wil6210_rx_status, TP_PROTO(u8 use_compressed, u16 buff_id, void *msg), TP_ARGS(use_compressed, buff_id, msg), TP_PROTO(struct wil6210_priv *wil, u8 use_compressed, u16 buff_id, void *msg), TP_ARGS(wil, use_compressed, buff_id, msg), TP_STRUCT__entry(__field(u8, use_compressed) __field(u16, buff_id) __field(unsigned int, len) Loading @@ -207,9 +208,10 @@ TRACE_EVENT(wil6210_rx_status, __entry->mid = wil_rx_status_get_mid(msg); __entry->cid = wil_rx_status_get_cid(msg); __entry->tid = wil_rx_status_get_tid(msg); __entry->type = wil_rx_status_get_frame_type(msg); __entry->subtype = wil_rx_status_get_fc1(msg); __entry->seq = wil_rx_status_get_seq(msg); __entry->type = wil_rx_status_get_frame_type(wil, msg); __entry->subtype = wil_rx_status_get_fc1(wil, msg); __entry->seq = wil_rx_status_get_seq(wil, msg); __entry->mcs = wil_rx_status_get_mcs(msg); ), TP_printk( Loading Loading
drivers/net/wireless/ath/wil6210/debugfs.c +68 −11 Original line number Diff line number Diff line Loading @@ -1219,7 +1219,7 @@ static int wil_status_msg_debugfs_show(struct seq_file *s, void *data) seq_printf(s, " 0x%08x 0x%08x 0x%08x 0x%08x\n", u[0], u[1], u[2], u[3]); if (!tx && !use_compressed_rx_status) if (!tx && !wil->use_compressed_rx_status) seq_printf(s, " 0x%08x 0x%08x 0x%08x 0x%08x\n", u[4], u[5], u[6], u[7]); Loading Loading @@ -1679,6 +1679,7 @@ static void wil_print_rxtid(struct seq_file *s, struct wil_tid_ampdu_rx *r) int i; u16 index = ((r->head_seq_num - r->ssn) & 0xfff) % r->buf_size; unsigned long long drop_dup = r->drop_dup, drop_old = r->drop_old; unsigned long long drop_dup_mcast = r->drop_dup_mcast; seq_printf(s, "([%2d]) 0x%03x [", r->buf_size, r->head_seq_num); for (i = 0; i < r->buf_size; i++) { Loading @@ -1688,9 +1689,9 @@ static void wil_print_rxtid(struct seq_file *s, struct wil_tid_ampdu_rx *r) seq_printf(s, "%c", r->reorder_buf[i] ? '*' : '_'); } seq_printf(s, "] total %llu drop %llu (dup %llu + old %llu) last 0x%03x\n", r->total, drop_dup + drop_old, drop_dup, drop_old, r->ssn_last_drop); "] total %llu drop %llu (dup %llu + old %llu + dup mcast %llu) last 0x%03x\n", r->total, drop_dup + drop_old + drop_dup_mcast, drop_dup, drop_old, drop_dup_mcast, r->ssn_last_drop); } static void wil_print_rxtid_crypto(struct seq_file *s, int tid, Loading Loading @@ -1772,8 +1773,6 @@ __acquires(&p->tid_rx_lock) __releases(&p->tid_rx_lock) p->stats.rx_short_frame, p->stats.rx_large_frame, p->stats.rx_replay); if (wil->use_enhanced_dma_hw) seq_printf(s, "mic error %lu, key error %lu, amsdu error %lu\n", p->stats.rx_mic_error, Loading Loading @@ -2062,6 +2061,60 @@ static const struct file_operations fops_suspend_stats = { .open = simple_open, }; /*---------compressed_rx_status---------*/ static ssize_t wil_compressed_rx_status_write(struct file *file, const char __user *buf, size_t len, loff_t *ppos) { struct seq_file *s = file->private_data; struct wil6210_priv *wil = s->private; int compressed_rx_status; int rc; rc = kstrtoint_from_user(buf, len, 0, &compressed_rx_status); if (rc) { wil_err(wil, "Invalid argument\n"); return rc; } if (wil_has_active_ifaces(wil, true, false)) { wil_err(wil, "cannot change edma config after iface is up\n"); return -EPERM; } wil_info(wil, "%sable compressed_rx_status\n", compressed_rx_status ? "En" : "Dis"); wil->use_compressed_rx_status = compressed_rx_status; return len; } static int wil_compressed_rx_status_show(struct seq_file *s, void *data) { struct wil6210_priv *wil = s->private; seq_printf(s, "%d\n", wil->use_compressed_rx_status); return 0; } static int wil_compressed_rx_status_seq_open(struct inode *inode, struct file *file) { return single_open(file, wil_compressed_rx_status_show, inode->i_private); } static const struct file_operations fops_compressed_rx_status = { .open = wil_compressed_rx_status_seq_open, .release = single_release, .read = seq_read, .write = wil_compressed_rx_status_write, .llseek = seq_lseek, }; /*----------------*/ static void wil6210_debugfs_init_blobs(struct wil6210_priv *wil, struct dentry *dbg) Loading Loading @@ -2116,6 +2169,7 @@ static const struct { {"fw_capabilities", 0444, &fops_fw_capabilities}, {"fw_version", 0444, &fops_fw_version}, {"suspend_stats", 0644, &fops_suspend_stats}, {"compressed_rx_status", 0644, &fops_compressed_rx_status}, {"srings", 0444, &fops_srings}, {"status_msg", 0444, &fops_status_msg}, {"rx_buff_mgmt", 0444, &fops_rx_buff_mgmt}, Loading Loading @@ -2166,6 +2220,9 @@ static const struct dbg_off dbg_wil_off[] = { WIL_FIELD(wakeup_trigger, 0644, doff_u8), WIL_FIELD(ring_idle_trsh, 0644, doff_u32), WIL_FIELD(num_rx_status_rings, 0644, doff_u8), WIL_FIELD(rx_status_ring_order, 0644, doff_u32), WIL_FIELD(tx_status_ring_order, 0644, doff_u32), WIL_FIELD(rx_buff_id_count, 0644, doff_u32), WIL_FIELD(amsdu_en, 0644, doff_u8), WIL_FIELD(force_edmg_channel, 0644, doff_u8), {}, Loading
drivers/net/wireless/ath/wil6210/main.c +15 −1 Original line number Diff line number Diff line Loading @@ -652,8 +652,22 @@ int wil_priv_init(struct wil6210_priv *wil) wil->reply_mid = U8_MAX; wil->max_vifs = 1; /* num of rx srings can be updated via debugfs before allocation */ /* edma configuration can be updated via debugfs before allocation */ wil->num_rx_status_rings = WIL_DEFAULT_NUM_RX_STATUS_RINGS; wil->use_compressed_rx_status = true; wil->use_rx_hw_reordering = true; wil->tx_status_ring_order = WIL_TX_SRING_SIZE_ORDER_DEFAULT; /* Rx status ring size should be bigger than the number of RX buffers * in order to prevent backpressure on the status ring, which may * cause HW freeze. */ wil->rx_status_ring_order = WIL_RX_SRING_SIZE_ORDER_DEFAULT; /* Number of RX buffer IDs should be bigger than the RX descriptor * ring size as in HW reorder flow, the HW can consume additional * buffers before releasing the previous ones. */ wil->rx_buff_id_count = WIL_RX_BUFF_ARR_SIZE_DEFAULT; wil->amsdu_en = 1; Loading
drivers/net/wireless/ath/wil6210/pcie_bus.c +2 −5 Original line number Diff line number Diff line Loading @@ -32,10 +32,6 @@ bool ftm_mode; module_param(ftm_mode, bool, 0444); MODULE_PARM_DESC(ftm_mode, " Set factory test mode, default - false"); static bool use_enhanced_dma_hw = true; module_param(use_enhanced_dma_hw, bool, 0444); MODULE_PARM_DESC(use_enhanced_dma_hw, " Use enhanced or legacy DMA HW. Default: true when available"); #ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP static int wil6210_pm_notify(struct notifier_block *notify_block, Loading Loading @@ -114,7 +110,8 @@ int wil_set_capabilities(struct wil6210_priv *wil) wil->rgf_fw_assert_code_addr = TALYN_RGF_FW_ASSERT_CODE; wil->rgf_ucode_assert_code_addr = TALYN_RGF_UCODE_ASSERT_CODE; set_bit(hw_capa_no_flash, wil->hw_capa); wil->use_enhanced_dma_hw = use_enhanced_dma_hw; wil->use_enhanced_dma_hw = true; wil->use_rx_hw_reordering = true; wil_fw_name = ftm_mode ? WIL_FW_NAME_FTM_TALYN : WIL_FW_NAME_TALYN; if (wil_fw_verify_file_exists(wil, wil_fw_name)) Loading
drivers/net/wireless/ath/wil6210/rx_reorder.c +18 −8 Original line number Diff line number Diff line Loading @@ -95,14 +95,15 @@ __acquires(&sta->tid_rx_lock) __releases(&sta->tid_rx_lock) { struct wil6210_vif *vif; struct net_device *ndev; int tid, cid, mid, mcast; int tid, cid, mid, mcast, retry; u16 seq; struct wil_sta_info *sta; struct wil_tid_ampdu_rx *r; u16 hseq; int index; wil->txrx_ops.get_reorder_params(skb, &tid, &cid, &mid, &seq, &mcast); wil->txrx_ops.get_reorder_params(wil, skb, &tid, &cid, &mid, &seq, &mcast, &retry); sta = &wil->sta[cid]; wil_dbg_txrx(wil, "MID %d CID %d TID %d Seq 0x%03x mcast %01x\n", Loading @@ -116,11 +117,6 @@ __acquires(&sta->tid_rx_lock) __releases(&sta->tid_rx_lock) } ndev = vif_to_ndev(vif); if (unlikely(mcast)) { wil_netif_rx_any(skb, ndev); return; } spin_lock(&sta->tid_rx_lock); r = sta->tid_rx[tid]; Loading @@ -129,6 +125,19 @@ __acquires(&sta->tid_rx_lock) __releases(&sta->tid_rx_lock) goto out; } if (unlikely(mcast)) { if (retry && seq == r->mcast_last_seq) { r->drop_dup_mcast++; wil_dbg_txrx(wil, "Rx drop: dup mcast seq 0x%03x\n", seq); dev_kfree_skb(skb); goto out; } r->mcast_last_seq = seq; wil_netif_rx_any(skb, ndev); goto out; } r->total++; hseq = r->head_seq_num; Loading Loading @@ -261,6 +270,7 @@ struct wil_tid_ampdu_rx *wil_tid_ampdu_rx_alloc(struct wil6210_priv *wil, r->buf_size = size; r->stored_mpdu_num = 0; r->first_time = true; r->mcast_last_seq = U16_MAX; return r; } Loading Loading @@ -315,7 +325,7 @@ __acquires(&sta->tid_rx_lock) __releases(&sta->tid_rx_lock) */ u16 req_agg_wsize = WIL_GET_BITS(param_set, 6, 15); bool agg_amsdu = wil->use_enhanced_dma_hw && use_rx_hw_reordering && wil->use_rx_hw_reordering && test_bit(WMI_FW_CAPABILITY_AMSDU, wil->fw_capabilities) && wil->amsdu_en && (param_set & BIT(0)); int ba_policy = param_set & BIT(1); Loading
drivers/net/wireless/ath/wil6210/trace.h +7 −5 Original line number Diff line number Diff line Loading @@ -188,8 +188,9 @@ TRACE_EVENT(wil6210_rx, ); TRACE_EVENT(wil6210_rx_status, TP_PROTO(u8 use_compressed, u16 buff_id, void *msg), TP_ARGS(use_compressed, buff_id, msg), TP_PROTO(struct wil6210_priv *wil, u8 use_compressed, u16 buff_id, void *msg), TP_ARGS(wil, use_compressed, buff_id, msg), TP_STRUCT__entry(__field(u8, use_compressed) __field(u16, buff_id) __field(unsigned int, len) Loading @@ -207,9 +208,10 @@ TRACE_EVENT(wil6210_rx_status, __entry->mid = wil_rx_status_get_mid(msg); __entry->cid = wil_rx_status_get_cid(msg); __entry->tid = wil_rx_status_get_tid(msg); __entry->type = wil_rx_status_get_frame_type(msg); __entry->subtype = wil_rx_status_get_fc1(msg); __entry->seq = wil_rx_status_get_seq(msg); __entry->type = wil_rx_status_get_frame_type(wil, msg); __entry->subtype = wil_rx_status_get_fc1(wil, msg); __entry->seq = wil_rx_status_get_seq(wil, msg); __entry->mcs = wil_rx_status_get_mcs(msg); ), TP_printk( Loading