1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /***********************************************************************
4 ***********************************************************************/
7 struct smsdvb_client_t;
9 typedef void (*sms_prt_dvb_stats_t)(struct smsdvb_debugfs *debug_data,
12 typedef void (*sms_prt_isdb_stats_t)(struct smsdvb_debugfs *debug_data,
13 struct sms_isdbt_stats *p);
15 typedef void (*sms_prt_isdb_stats_ex_t)
16 (struct smsdvb_debugfs *debug_data,
17 struct sms_isdbt_stats_ex *p);
20 struct smsdvb_client_t {
21 struct list_head entry;
23 struct smscore_device_t *coredev;
24 struct smscore_client_t *smsclient;
26 struct dvb_adapter adapter;
27 struct dvb_demux demux;
29 struct dvb_frontend frontend;
31 enum fe_status fe_status;
33 struct completion tune_done;
34 struct completion stats_done;
38 int legacy_ber, legacy_per;
43 unsigned long get_stats_jiffies;
48 /* stats debugfs data */
49 struct dentry *debugfs;
51 struct smsdvb_debugfs *debug_data;
53 sms_prt_dvb_stats_t prt_dvb_stats;
54 sms_prt_isdb_stats_t prt_isdb_stats;
55 sms_prt_isdb_stats_ex_t prt_isdb_stats_ex;
59 * This struct is a mix of struct sms_rx_stats_ex and
60 * struct sms_srvm_signal_status.
61 * It was obtained by comparing the way it was filled by the original code
63 struct RECEPTION_STATISTICS_PER_SLICES_S {
76 u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
78 u32 ber; /* Post Viterbi BER [1E-5] */
80 s32 carrier_offset; /* Carrier Offset in bin/1024 */
82 u32 is_rf_locked; /* 0 - not locked, 1 - locked */
83 u32 is_demod_locked; /* 0 - not locked, 1 - locked */
85 u32 ber_bit_count; /* Total number of SYNC bits. */
86 u32 ber_error_count; /* Number of erroneous SYNC bits. */
89 s32 mrc_in_band_pwr; /* In band power in dBM */
90 s32 MRC_RSSI; /* dBm */
93 /* From smsdvb-debugfs.c */
94 #ifdef CONFIG_SMS_SIANO_DEBUGFS
96 int smsdvb_debugfs_create(struct smsdvb_client_t *client);
97 void smsdvb_debugfs_release(struct smsdvb_client_t *client);
98 void smsdvb_debugfs_register(void);
99 void smsdvb_debugfs_unregister(void);
103 static inline int smsdvb_debugfs_create(struct smsdvb_client_t *client)
108 static inline void smsdvb_debugfs_release(struct smsdvb_client_t *client) {}
110 static inline void smsdvb_debugfs_register(void) {}
112 static inline void smsdvb_debugfs_unregister(void) {};