Lines Matching +full:per +full:- +full:context
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
6 * Copyright (c) 2010, ST-Ericsson
38 for (i = 0; symbol_array[i].mask != -1; i++) { in get_symbol()
64 struct wfx_dev *wdev = seq->private; in wfx_counters_show()
72 return -EIO; in wfx_counters_show()
75 seq_printf(seq, "%-24s %12s %12s %12s\n", "", "global", "iface 0", "iface 1"); in wfx_counters_show()
78 seq_printf(seq, "%-24s %12d %12d %12d\n", #name, \ in wfx_counters_show()
153 struct wfx_dev *wdev = seq->private; in wfx_rx_stats_show()
154 struct wfx_hif_rx_stats *st = &wdev->rx_stats; in wfx_rx_stats_show()
157 mutex_lock(&wdev->rx_stats_lock); in wfx_rx_stats_show()
158 seq_printf(seq, "Timestamp: %dus\n", st->date); in wfx_rx_stats_show()
160 le32_to_cpu(st->pwr_clk_freq), st->is_ext_pwr_clk ? "yes" : "no"); in wfx_rx_stats_show()
161 seq_printf(seq, "Num. of frames: %d, PER (x10e4): %d, Throughput: %dKbps/s\n", in wfx_rx_stats_show()
162 st->nb_rx_frame, st->per_total, st->throughput); in wfx_rx_stats_show()
163 seq_puts(seq, " Num. of PER RSSI SNR CFO\n"); in wfx_rx_stats_show()
169 le32_to_cpu(st->nb_rx_by_rate[i]), in wfx_rx_stats_show()
170 le16_to_cpu(st->per[i]), in wfx_rx_stats_show()
171 (s16)le16_to_cpu(st->rssi[i]) / 100, in wfx_rx_stats_show()
172 (s16)le16_to_cpu(st->snr[i]) / 100, in wfx_rx_stats_show()
173 (s16)le16_to_cpu(st->cfo[i])); in wfx_rx_stats_show()
175 mutex_unlock(&wdev->rx_stats_lock); in wfx_rx_stats_show()
183 struct wfx_dev *wdev = seq->private; in wfx_tx_power_loop_show()
184 struct wfx_hif_tx_power_loop_info *st = &wdev->tx_power_loop_info; in wfx_tx_power_loop_show()
187 mutex_lock(&wdev->tx_power_loop_info_lock); in wfx_tx_power_loop_show()
188 tmp = le16_to_cpu(st->tx_gain_dig); in wfx_tx_power_loop_show()
190 tmp = le16_to_cpu(st->tx_gain_pa); in wfx_tx_power_loop_show()
192 tmp = (s16)le16_to_cpu(st->target_pout); in wfx_tx_power_loop_show()
194 tmp = (s16)le16_to_cpu(st->p_estimation); in wfx_tx_power_loop_show()
196 tmp = le16_to_cpu(st->vpdet); in wfx_tx_power_loop_show()
198 seq_printf(seq, "Measure index: %d\n", st->measurement_index); in wfx_tx_power_loop_show()
199 mutex_unlock(&wdev->tx_power_loop_info_lock); in wfx_tx_power_loop_show()
208 struct wfx_dev *wdev = file->private_data; in wfx_send_pds_write()
213 dev_dbg(wdev->dev, "PDS data must be written in one transaction"); in wfx_send_pds_write()
214 return -EBUSY; in wfx_send_pds_write()
242 struct dbgfs_hif_msg *context = file->private_data; in wfx_send_hif_msg_write() local
243 struct wfx_dev *wdev = context->wdev; in wfx_send_hif_msg_write()
246 if (completion_done(&context->complete)) { in wfx_send_hif_msg_write()
247 dev_dbg(wdev->dev, "read previous result before start a new one\n"); in wfx_send_hif_msg_write()
248 return -EBUSY; in wfx_send_hif_msg_write()
251 return -EINVAL; in wfx_send_hif_msg_write()
257 memset(context->reply, 0xFF, sizeof(context->reply)); in wfx_send_hif_msg_write()
261 if (le16_to_cpu(request->len) != count) { in wfx_send_hif_msg_write()
263 return -EINVAL; in wfx_send_hif_msg_write()
265 context->ret = wfx_cmd_send(wdev, request, context->reply, sizeof(context->reply), false); in wfx_send_hif_msg_write()
268 complete(&context->complete); in wfx_send_hif_msg_write()
275 struct dbgfs_hif_msg *context = file->private_data; in wfx_send_hif_msg_read() local
278 if (count > sizeof(context->reply)) in wfx_send_hif_msg_read()
279 return -EINVAL; in wfx_send_hif_msg_read()
280 ret = wait_for_completion_interruptible(&context->complete); in wfx_send_hif_msg_read()
283 if (context->ret < 0) in wfx_send_hif_msg_read()
284 return context->ret; in wfx_send_hif_msg_read()
286 if (copy_to_user(user_buf, context->reply, count)) in wfx_send_hif_msg_read()
287 return -EFAULT; in wfx_send_hif_msg_read()
294 struct dbgfs_hif_msg *context = kzalloc(sizeof(*context), GFP_KERNEL); in wfx_send_hif_msg_open() local
296 if (!context) in wfx_send_hif_msg_open()
297 return -ENOMEM; in wfx_send_hif_msg_open()
298 context->wdev = inode->i_private; in wfx_send_hif_msg_open()
299 init_completion(&context->complete); in wfx_send_hif_msg_open()
300 file->private_data = context; in wfx_send_hif_msg_open()
306 struct dbgfs_hif_msg *context = file->private_data; in wfx_send_hif_msg_release() local
308 kfree(context); in wfx_send_hif_msg_release()
323 d = debugfs_create_dir("wfx", wdev->hw->wiphy->debugfsdir); in wfx_debug_init()