9 #include <linux/sched.h>
11 #include <linux/poll.h>
12 #include <linux/netdevice.h>
13 #include <linux/types.h>
15 #include <linux/slab.h>
16 #include <linux/export.h>
39 spin_unlock_irqrestore(&buf->
lock, status);
96 if (file_info ==
NULL)
104 spin_unlock_irqrestore(&events->
lock, status);
111 static int rate_control_pid_events_release(
struct inode *inode,
121 static unsigned int rate_control_pid_events_poll(
struct file *file,
126 poll_wait(file, &file_info->
events->waitqueue, wait);
131 #define RC_PID_PRINT_BUF_SIZE 64
133 static ssize_t rate_control_pid_events_read(
struct file *file,
char __user *
buf,
173 p +=
snprintf(pb + p, length - p,
"tx_status %u %u",
178 p +=
snprintf(pb + p, length - p,
"rate_change %d %d",
182 p +=
snprintf(pb + p, length - p,
"tx_rate %d %d",
187 "pf_sample %d %d %d %d",
192 p +=
snprintf(pb + p, length - p,
"\n");
194 spin_unlock_irqrestore(&events->
lock, status);
202 #undef RC_PID_PRINT_BUF_SIZE
206 .read = rate_control_pid_events_read,
207 .poll = rate_control_pid_events_poll,
208 .open = rate_control_pid_events_open,
209 .release = rate_control_pid_events_release,