This source file includes following definitions.
- wimax_dev_is_ready
- __wimax_state_set
- wimax_debugfs_add
- wimax_debugfs_rm
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef __WIMAX_INTERNAL_H__
15 #define __WIMAX_INTERNAL_H__
16 #ifdef __KERNEL__
17
18 #ifdef pr_fmt
19 #undef pr_fmt
20 #endif
21
22 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
23
24 #include <linux/device.h>
25 #include <net/wimax.h>
26
27
28
29
30
31
32
33
34
35
36
37
38
39 static inline __must_check
40 int wimax_dev_is_ready(struct wimax_dev *wimax_dev)
41 {
42 if (wimax_dev->state == __WIMAX_ST_NULL)
43 return -EINVAL;
44 if (wimax_dev->state == WIMAX_ST_DOWN)
45 return -ENOMEDIUM;
46 if (wimax_dev->state == __WIMAX_ST_QUIESCING)
47 return -ESHUTDOWN;
48 return 0;
49 }
50
51
52 static inline
53 void __wimax_state_set(struct wimax_dev *wimax_dev, enum wimax_st state)
54 {
55 wimax_dev->state = state;
56 }
57 void __wimax_state_change(struct wimax_dev *, enum wimax_st);
58
59 #ifdef CONFIG_DEBUG_FS
60 void wimax_debugfs_add(struct wimax_dev *);
61 void wimax_debugfs_rm(struct wimax_dev *);
62 #else
63 static inline void wimax_debugfs_add(struct wimax_dev *wimax_dev) {}
64 static inline void wimax_debugfs_rm(struct wimax_dev *wimax_dev) {}
65 #endif
66
67 void wimax_id_table_add(struct wimax_dev *);
68 struct wimax_dev *wimax_dev_get_by_genl_info(struct genl_info *, int);
69 void wimax_id_table_rm(struct wimax_dev *);
70 void wimax_id_table_release(void);
71
72 int wimax_rfkill_add(struct wimax_dev *);
73 void wimax_rfkill_rm(struct wimax_dev *);
74
75
76 extern struct genl_family wimax_gnl_family;
77
78
79 int wimax_gnl_doit_msg_from_user(struct sk_buff *skb, struct genl_info *info);
80 int wimax_gnl_doit_reset(struct sk_buff *skb, struct genl_info *info);
81 int wimax_gnl_doit_rfkill(struct sk_buff *skb, struct genl_info *info);
82 int wimax_gnl_doit_state_get(struct sk_buff *skb, struct genl_info *info);
83
84 #endif
85 #endif