Home
last modified time | relevance | path

Searched refs:wil (Results 1 – 22 of 22) sorted by relevance

/drivers/net/wireless/ath/wil6210/
Dmain.c179 int wil_mem_access_lock(struct wil6210_priv *wil) in wil_mem_access_lock() argument
181 if (!down_read_trylock(&wil->mem_lock)) in wil_mem_access_lock()
184 if (test_bit(wil_status_suspending, wil->status) || in wil_mem_access_lock()
185 test_bit(wil_status_suspended, wil->status)) { in wil_mem_access_lock()
186 up_read(&wil->mem_lock); in wil_mem_access_lock()
193 void wil_mem_access_unlock(struct wil6210_priv *wil) in wil_mem_access_unlock() argument
195 up_read(&wil->mem_lock); in wil_mem_access_unlock()
198 static void wil_ring_fini_tx(struct wil6210_priv *wil, int id) in wil_ring_fini_tx() argument
200 struct wil_ring *ring = &wil->ring_tx[id]; in wil_ring_fini_tx()
201 struct wil_ring_tx_data *txdata = &wil->ring_tx_data[id]; in wil_ring_fini_tx()
[all …]
Dinterrupt.c75 static void wil6210_mask_irq_tx(struct wil6210_priv *wil) in wil6210_mask_irq_tx() argument
77 wil_w(wil, RGF_DMA_EP_TX_ICR + offsetof(struct RGF_ICR, IMS), in wil6210_mask_irq_tx()
81 static void wil6210_mask_irq_tx_edma(struct wil6210_priv *wil) in wil6210_mask_irq_tx_edma() argument
83 wil_w(wil, RGF_INT_GEN_TX_ICR + offsetof(struct RGF_ICR, IMS), in wil6210_mask_irq_tx_edma()
87 static void wil6210_mask_irq_rx(struct wil6210_priv *wil) in wil6210_mask_irq_rx() argument
89 wil_w(wil, RGF_DMA_EP_RX_ICR + offsetof(struct RGF_ICR, IMS), in wil6210_mask_irq_rx()
93 static void wil6210_mask_irq_rx_edma(struct wil6210_priv *wil) in wil6210_mask_irq_rx_edma() argument
95 wil_w(wil, RGF_INT_GEN_RX_ICR + offsetof(struct RGF_ICR, IMS), in wil6210_mask_irq_rx_edma()
99 static void wil6210_mask_irq_misc(struct wil6210_priv *wil, bool mask_halp) in wil6210_mask_irq_misc() argument
101 wil_dbg_irq(wil, "mask_irq_misc: mask_halp(%s)\n", in wil6210_mask_irq_misc()
[all …]
Dpm.c13 static void wil_pm_wake_connected_net_queues(struct wil6210_priv *wil) in wil_pm_wake_connected_net_queues() argument
17 mutex_lock(&wil->vif_mutex); in wil_pm_wake_connected_net_queues()
18 for (i = 0; i < GET_MAX_VIFS(wil); i++) { in wil_pm_wake_connected_net_queues()
19 struct wil6210_vif *vif = wil->vifs[i]; in wil_pm_wake_connected_net_queues()
22 wil_update_net_queues_bh(wil, vif, NULL, false); in wil_pm_wake_connected_net_queues()
24 mutex_unlock(&wil->vif_mutex); in wil_pm_wake_connected_net_queues()
27 static void wil_pm_stop_all_net_queues(struct wil6210_priv *wil) in wil_pm_stop_all_net_queues() argument
31 mutex_lock(&wil->vif_mutex); in wil_pm_stop_all_net_queues()
32 for (i = 0; i < GET_MAX_VIFS(wil); i++) { in wil_pm_stop_all_net_queues()
33 struct wil6210_vif *vif = wil->vifs[i]; in wil_pm_stop_all_net_queues()
[all …]
Dpcie_bus.c28 int wil_set_capabilities(struct wil6210_priv *wil) in wil_set_capabilities() argument
31 u32 jtag_id = wil_r(wil, RGF_USER_JTAG_DEV_ID); in wil_set_capabilities()
32 u8 chip_revision = (wil_r(wil, RGF_USER_REVISION_ID) & in wil_set_capabilities()
37 bitmap_zero(wil->hw_capa, hw_capa_last); in wil_set_capabilities()
38 bitmap_zero(wil->fw_capabilities, WMI_FW_CAPABILITY_MAX); in wil_set_capabilities()
39 bitmap_zero(wil->platform_capa, WIL_PLATFORM_CAPA_MAX); in wil_set_capabilities()
40 wil->wil_fw_name = ftm_mode ? WIL_FW_NAME_FTM_DEFAULT : in wil_set_capabilities()
42 wil->chip_revision = chip_revision; in wil_set_capabilities()
50 wil->hw_name = "Sparrow D0"; in wil_set_capabilities()
51 wil->hw_version = HW_VER_SPARROW_D0; in wil_set_capabilities()
[all …]
Dnetdev.c12 bool wil_has_other_active_ifaces(struct wil6210_priv *wil, in wil_has_other_active_ifaces() argument
19 for (i = 0; i < GET_MAX_VIFS(wil); i++) { in wil_has_other_active_ifaces()
20 vif = wil->vifs[i]; in wil_has_other_active_ifaces()
33 bool wil_has_active_ifaces(struct wil6210_priv *wil, bool up, bool ok) in wil_has_active_ifaces() argument
36 return wil_has_other_active_ifaces(wil, NULL, up, ok); in wil_has_active_ifaces()
41 struct wil6210_priv *wil = ndev_to_wil(ndev); in wil_open() local
44 wil_dbg_misc(wil, "open\n"); in wil_open()
47 test_bit(WMI_FW_CAPABILITY_WMI_ONLY, wil->fw_capabilities)) { in wil_open()
48 wil_err(wil, "while in debug_fw or wmi_only mode\n"); in wil_open()
52 if (!wil_has_other_active_ifaces(wil, ndev, true, false)) { in wil_open()
[all …]
Dtxrx_edma.c47 static int wil_find_free_sring(struct wil6210_priv *wil) in wil_find_free_sring() argument
52 if (!wil->srings[i].va) in wil_find_free_sring()
59 static void wil_sring_free(struct wil6210_priv *wil, in wil_sring_free() argument
62 struct device *dev = wil_to_dev(wil); in wil_sring_free()
70 wil_dbg_misc(wil, "status_ring_free, size(bytes)=%zu, 0x%p:%pad\n", in wil_sring_free()
78 static int wil_sring_alloc(struct wil6210_priv *wil, in wil_sring_alloc() argument
81 struct device *dev = wil_to_dev(wil); in wil_sring_alloc()
84 wil_dbg_misc(wil, "status_ring_alloc: size=%zu\n", sz); in wil_sring_alloc()
87 wil_err(wil, "Cannot allocate a zero size status ring\n"); in wil_sring_alloc()
100 wil_dbg_misc(wil, "status_ring[%d] 0x%p:%pad\n", sring->size, sring->va, in wil_sring_alloc()
[all …]
Dfw_inc.c11 #define wil_err_fw(wil, fmt, arg...) wil_err(wil, "ERR[ FW ]" fmt, ##arg) argument
12 #define wil_dbg_fw(wil, fmt, arg...) wil_dbg(wil, "DBG[ FW ]" fmt, ##arg) argument
19 static bool wil_fw_addr_check(struct wil6210_priv *wil, in wil_fw_addr_check() argument
23 *ioaddr = wmi_buffer_block(wil, val, size); in wil_fw_addr_check()
25 wil_err_fw(wil, "bad %s: 0x%08x\n", msg, le32_to_cpu(val)); in wil_fw_addr_check()
39 static int wil_fw_verify(struct wil6210_priv *wil, const u8 *data, size_t size) in wil_fw_verify() argument
48 wil_err_fw(wil, "image size not aligned: %zu\n", size); in wil_fw_verify()
53 wil_err_fw(wil, "file too short: %zu bytes\n", size); in wil_fw_verify()
59 wil_err_fw(wil, "no file header\n"); in wil_fw_verify()
67 wil_err_fw(wil, "data length not aligned: %lu\n", (ulong)dlen); in wil_fw_verify()
[all …]
Dp2p.c17 struct wil6210_priv *wil = vif_to_wil(vif); in wil_p2p_start_listen() local
22 lockdep_assert_held(&wil->mutex); in wil_p2p_start_listen()
26 wil_err(wil, "wmi_p2p_cfg failed\n"); in wil_p2p_start_listen()
32 wil_err(wil, "wmi_set_ssid failed\n"); in wil_p2p_start_listen()
38 wil_err(wil, "wmi_start_listen failed\n"); in wil_p2p_start_listen()
62 struct wil6210_priv *wil = vif_to_wil(vif); in wil_p2p_search() local
66 wil_dbg_misc(wil, "p2p_search: channel %d\n", P2P_DMG_SOCIAL_CHANNEL); in wil_p2p_search()
68 lockdep_assert_held(&wil->mutex); in wil_p2p_search()
71 wil_err(wil, "search failed. discovery already ongoing\n"); in wil_p2p_search()
78 wil_err(wil, "wmi_p2p_cfg failed\n"); in wil_p2p_search()
[all …]
Dwmi.c274 void __iomem *wmi_buffer_block(struct wil6210_priv *wil, __le32 ptr_, u32 size) in wmi_buffer_block() argument
287 if (off > wil->bar_size - 4) in wmi_buffer_block()
289 if (size && ((off + size > wil->bar_size) || (off + size < off))) in wmi_buffer_block()
292 return wil->csr + off; in wmi_buffer_block()
295 void __iomem *wmi_buffer(struct wil6210_priv *wil, __le32 ptr_) in wmi_buffer() argument
297 return wmi_buffer_block(wil, ptr_, 0); in wmi_buffer()
301 void __iomem *wmi_addr(struct wil6210_priv *wil, u32 ptr) in wmi_addr() argument
312 if (off > wil->bar_size - 4) in wmi_addr()
315 return wil->csr + off; in wmi_addr()
318 int wmi_read_hdr(struct wil6210_priv *wil, __le32 ptr, in wmi_read_hdr() argument
[all …]
Dtxrx.c64 bool wil_is_tx_idle(struct wil6210_priv *wil) in wil_is_tx_idle() argument
68 int min_ring_id = wil_get_min_tx_ring_id(wil); in wil_is_tx_idle()
71 struct wil_ring *vring = &wil->ring_tx[i]; in wil_is_tx_idle()
72 int vring_index = vring - wil->ring_tx; in wil_is_tx_idle()
74 &wil->ring_tx_data[vring_index]; in wil_is_tx_idle()
85 if (test_bit(wil_status_napi_en, wil->status)) { in wil_is_tx_idle()
88 wil_dbg_pm(wil, in wil_is_tx_idle()
93 wil_dbg_ratelimited(wil, in wil_is_tx_idle()
96 napi_synchronize(&wil->napi_tx); in wil_is_tx_idle()
110 static int wil_vring_alloc(struct wil6210_priv *wil, struct wil_ring *vring) in wil_vring_alloc() argument
[all …]
Dcfg80211.c105 static int wil_num_supported_channels(struct wil6210_priv *wil) in wil_num_supported_channels() argument
109 if (!test_bit(WMI_FW_CAPABILITY_CHANNEL_4, wil->fw_capabilities)) in wil_num_supported_channels()
115 void update_supported_bands(struct wil6210_priv *wil) in update_supported_bands() argument
117 struct wiphy *wiphy = wil_to_wiphy(wil); in update_supported_bands()
119 wil_dbg_misc(wil, "update supported bands"); in update_supported_bands()
122 wil_num_supported_channels(wil); in update_supported_bands()
124 if (test_bit(WMI_FW_CAPABILITY_CHANNEL_BONDING, wil->fw_capabilities)) { in update_supported_bands()
433 struct wil6210_priv *wil = vif_to_wil(vif); in wil_cid_fill_sinfo() local
442 struct wil_net_stats *stats = &wil->sta[cid].stats; in wil_cid_fill_sinfo()
450 rc = wmi_call(wil, WMI_NOTIFY_REQ_CMDID, vif->mid, &cmd, sizeof(cmd), in wil_cid_fill_sinfo()
[all …]
Dwil6210.h595 void (*configure_interrupt_moderation)(struct wil6210_priv *wil);
599 void (*ring_fini_tx)(struct wil6210_priv *wil, struct wil_ring *ring);
601 int (*tx_init)(struct wil6210_priv *wil);
602 void (*tx_fini)(struct wil6210_priv *wil);
608 int (*tx_ring_tso)(struct wil6210_priv *wil, struct wil6210_vif *vif,
614 int (*rx_init)(struct wil6210_priv *wil, uint ring_order);
615 void (*rx_fini)(struct wil6210_priv *wil);
616 int (*wmi_addba_rx_resp)(struct wil6210_priv *wil, u8 mid, u8 cid,
619 void (*get_reorder_params)(struct wil6210_priv *wil,
624 int (*rx_crypto_check)(struct wil6210_priv *wil, struct sk_buff *skb);
[all …]
Ddebugfs.c42 static void wil_print_desc_edma(struct seq_file *s, struct wil6210_priv *wil, in wil_print_desc_edma() argument
55 if (wil->rx_buff_mgmt.buff_arr && in wil_print_desc_edma()
56 wil_val_in_range(buff_id, 0, wil->rx_buff_mgmt.size)) in wil_print_desc_edma()
57 has_skb = wil->rx_buff_mgmt.buff_arr[buff_id].skb; in wil_print_desc_edma()
74 static void wil_print_ring(struct seq_file *s, struct wil6210_priv *wil, in wil_print_ring() argument
85 if (wil->use_enhanced_dma_hw && ring->is_rx) in wil_print_ring()
90 if (wil->use_enhanced_dma_hw) { in wil_print_ring()
92 WIL_RX_DESC_RING_ID : ring - wil->ring_tx; in wil_print_ring()
97 x = wmi_addr(wil, RGF_DMA_SCM_SUBQ_CONS + 4 * (ring_id / 2)); in wil_print_ring()
104 x = wmi_addr(wil, ring->hwtail); in wil_print_ring()
[all …]
Dpmc.c26 void wil_pmc_init(struct wil6210_priv *wil) in wil_pmc_init() argument
28 memset(&wil->pmc, 0, sizeof(struct pmc_ctx)); in wil_pmc_init()
29 mutex_init(&wil->pmc.lock); in wil_pmc_init()
39 void wil_pmc_alloc(struct wil6210_priv *wil, in wil_pmc_alloc() argument
44 struct pmc_ctx *pmc = &wil->pmc; in wil_pmc_alloc()
45 struct device *dev = wil_to_dev(wil); in wil_pmc_alloc()
46 struct wil6210_vif *vif = ndev_to_vif(wil->main_ndev); in wil_pmc_alloc()
54 wil_err(wil, "ERROR pmc is already allocated\n"); in wil_pmc_alloc()
58 wil_err(wil, in wil_pmc_alloc()
66 wil_err(wil, in wil_pmc_alloc()
[all …]
Dethtool.c20 struct wil6210_priv *wil = ndev_to_wil(ndev); in wil_ethtoolops_get_coalesce() local
25 mutex_lock(&wil->mutex); in wil_ethtoolops_get_coalesce()
26 wil_dbg_misc(wil, "ethtoolops_get_coalesce\n"); in wil_ethtoolops_get_coalesce()
28 ret = wil_pm_runtime_get(wil); in wil_ethtoolops_get_coalesce()
32 tx_itr_en = wil_r(wil, RGF_DMA_ITR_TX_CNT_CTL); in wil_ethtoolops_get_coalesce()
34 tx_itr_val = wil_r(wil, RGF_DMA_ITR_TX_CNT_TRSH); in wil_ethtoolops_get_coalesce()
36 rx_itr_en = wil_r(wil, RGF_DMA_ITR_RX_CNT_CTL); in wil_ethtoolops_get_coalesce()
38 rx_itr_val = wil_r(wil, RGF_DMA_ITR_RX_CNT_TRSH); in wil_ethtoolops_get_coalesce()
40 wil_pm_runtime_put(wil); in wil_ethtoolops_get_coalesce()
47 mutex_unlock(&wil->mutex); in wil_ethtoolops_get_coalesce()
[all …]
Drx_reorder.c82 void wil_rx_reorder(struct wil6210_priv *wil, struct sk_buff *skb) in wil_rx_reorder() argument
94 wil->txrx_ops.get_reorder_params(wil, skb, &tid, &cid, &mid, &seq, in wil_rx_reorder()
96 sta = &wil->sta[cid]; in wil_rx_reorder()
98 wil_dbg_txrx(wil, "MID %d CID %d TID %d Seq 0x%03x mcast %01x\n", in wil_rx_reorder()
101 vif = wil->vifs[mid]; in wil_rx_reorder()
103 wil_dbg_txrx(wil, "invalid VIF, mid %d\n", mid); in wil_rx_reorder()
120 wil_dbg_txrx(wil, "Rx drop: dup mcast seq 0x%03x\n", in wil_rx_reorder()
145 wil_err(wil, in wil_rx_reorder()
152 wil_err(wil, in wil_rx_reorder()
164 wil_dbg_txrx(wil, "Rx drop: old seq 0x%03x head 0x%03x\n", in wil_rx_reorder()
[all …]
Dwil_crash_dump.c10 static int wil_fw_get_crash_dump_bounds(struct wil6210_priv *wil, in wil_fw_get_crash_dump_bounds() argument
47 int wil_fw_copy_crash_dump(struct wil6210_priv *wil, void *dest, u32 size) in wil_fw_copy_crash_dump() argument
54 if (wil_fw_get_crash_dump_bounds(wil, &dump_size, &host_min)) { in wil_fw_copy_crash_dump()
55 wil_err(wil, "fail to obtain crash dump size\n"); in wil_fw_copy_crash_dump()
60 wil_err(wil, "not enough space for dump. Need %d have %d\n", in wil_fw_copy_crash_dump()
65 down_write(&wil->mem_lock); in wil_fw_copy_crash_dump()
67 if (test_bit(wil_status_suspending, wil->status) || in wil_fw_copy_crash_dump()
68 test_bit(wil_status_suspended, wil->status)) { in wil_fw_copy_crash_dump()
69 wil_err(wil, in wil_fw_copy_crash_dump()
71 up_write(&wil->mem_lock); in wil_fw_copy_crash_dump()
[all …]
Ddebug.c10 void __wil_err(struct wil6210_priv *wil, const char *fmt, ...) in __wil_err() argument
18 netdev_err(wil->main_ndev, "%pV", &vaf); in __wil_err()
23 void __wil_err_ratelimited(struct wil6210_priv *wil, const char *fmt, ...) in __wil_err_ratelimited() argument
34 netdev_err(wil->main_ndev, "%pV", &vaf); in __wil_err_ratelimited()
39 void wil_dbg_ratelimited(const struct wil6210_priv *wil, const char *fmt, ...) in wil_dbg_ratelimited() argument
50 netdev_dbg(wil->main_ndev, "%pV", &vaf); in wil_dbg_ratelimited()
55 void __wil_info(struct wil6210_priv *wil, const char *fmt, ...) in __wil_info() argument
63 netdev_info(wil->main_ndev, "%pV", &vaf); in __wil_info()
68 void wil_dbg_trace(struct wil6210_priv *wil, const char *fmt, ...) in wil_dbg_trace() argument
Dtxrx_edma.h444 static inline int wil_rx_status_get_frame_type(struct wil6210_priv *wil, in wil_rx_status_get_frame_type() argument
447 if (wil->use_compressed_rx_status) in wil_rx_status_get_frame_type()
454 static inline int wil_rx_status_get_fc1(struct wil6210_priv *wil, void *msg) in wil_rx_status_get_fc1() argument
456 if (wil->use_compressed_rx_status) in wil_rx_status_get_fc1()
463 static inline __le16 wil_rx_status_get_seq(struct wil6210_priv *wil, void *msg) in wil_rx_status_get_seq() argument
465 if (wil->use_compressed_rx_status) in wil_rx_status_get_seq()
597 void wil_configure_interrupt_moderation_edma(struct wil6210_priv *wil);
598 int wil_tx_sring_handler(struct wil6210_priv *wil,
600 void wil_rx_handle_edma(struct wil6210_priv *wil, int *quota);
601 void wil_init_txrx_ops_edma(struct wil6210_priv *wil);
Dpmc.h8 void wil_pmc_init(struct wil6210_priv *wil);
9 void wil_pmc_alloc(struct wil6210_priv *wil,
11 void wil_pmc_free(struct wil6210_priv *wil, int send_pmc_cmd);
12 int wil_pmc_last_cmd_status(struct wil6210_priv *wil);
Dtxrx.h646 static inline int wil_get_min_tx_ring_id(struct wil6210_priv *wil) in wil_get_min_tx_ring_id() argument
649 return wil->use_enhanced_dma_hw ? 1 : 0; in wil_get_min_tx_ring_id()
682 void wil_rx_reorder(struct wil6210_priv *wil, struct sk_buff *skb);
683 void wil_rx_bar(struct wil6210_priv *wil, struct wil6210_vif *vif,
685 struct wil_tid_ampdu_rx *wil_tid_ampdu_rx_alloc(struct wil6210_priv *wil,
687 void wil_tid_ampdu_rx_free(struct wil6210_priv *wil,
690 void wil_init_txrx_ops_legacy_dma(struct wil6210_priv *wil);
691 void wil_tx_latency_calc(struct wil6210_priv *wil, struct sk_buff *skb,
Dtrace.h181 TP_PROTO(struct wil6210_priv *wil, u8 use_compressed, u16 buff_id,
183 TP_ARGS(wil, use_compressed, buff_id, msg),
201 __entry->type = wil_rx_status_get_frame_type(wil,
203 __entry->subtype = wil_rx_status_get_fc1(wil, msg);
204 __entry->seq = wil_rx_status_get_seq(wil, msg);