diff options
author | Samuel Ortiz <samuel@sortiz.org> | 2007-07-03 01:54:18 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-11 01:16:43 -0400 |
commit | 89da1ecf5483e6aa29b456a15ad6d05a6797c5a5 (patch) | |
tree | f9c6305e9c230f90e9cc2f862527eb8943a9e89c /include | |
parent | 8c644623fe7e41f59fe97cdf666cba3cb7ced7d8 (diff) |
[IrDA]: Netlink layer.
First IrDA configuration netlink layer implementation.
Currently, we only support the set/get mode commands.
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/irda.h | 27 | ||||
-rw-r--r-- | include/net/irda/irda.h | 3 | ||||
-rw-r--r-- | include/net/irda/irlap.h | 2 |
3 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/irda.h b/include/linux/irda.h index 945ba3110874..35911bd4dbe8 100644 --- a/include/linux/irda.h +++ b/include/linux/irda.h | |||
@@ -216,6 +216,33 @@ struct if_irda_req { | |||
216 | #define ifr_dtr ifr_ifru.ifru_line.dtr | 216 | #define ifr_dtr ifr_ifru.ifru_line.dtr |
217 | #define ifr_rts ifr_ifru.ifru_line.rts | 217 | #define ifr_rts ifr_ifru.ifru_line.rts |
218 | 218 | ||
219 | |||
220 | /* IrDA netlink definitions */ | ||
221 | #define IRDA_NL_NAME "irda" | ||
222 | #define IRDA_NL_VERSION 1 | ||
223 | |||
224 | enum irda_nl_commands { | ||
225 | IRDA_NL_CMD_UNSPEC, | ||
226 | IRDA_NL_CMD_SET_MODE, | ||
227 | IRDA_NL_CMD_GET_MODE, | ||
228 | |||
229 | __IRDA_NL_CMD_AFTER_LAST | ||
230 | }; | ||
231 | #define IRDA_NL_CMD_MAX (__IRDA_NL_CMD_AFTER_LAST - 1) | ||
232 | |||
233 | enum nl80211_attrs { | ||
234 | IRDA_NL_ATTR_UNSPEC, | ||
235 | IRDA_NL_ATTR_IFNAME, | ||
236 | IRDA_NL_ATTR_MODE, | ||
237 | |||
238 | __IRDA_NL_ATTR_AFTER_LAST | ||
239 | }; | ||
240 | #define IRDA_NL_ATTR_MAX (__IRDA_NL_ATTR_AFTER_LAST - 1) | ||
241 | |||
242 | /* IrDA modes */ | ||
243 | #define IRDA_MODE_PRIMARY 0x1 | ||
244 | #define IRDA_MODE_SECONDARY 0x2 | ||
245 | |||
219 | #endif /* KERNEL_IRDA_H */ | 246 | #endif /* KERNEL_IRDA_H */ |
220 | 247 | ||
221 | 248 | ||
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index 36bee441aa56..08387553b57e 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h | |||
@@ -125,6 +125,9 @@ extern void irda_sysctl_unregister(void); | |||
125 | extern int irsock_init(void); | 125 | extern int irsock_init(void); |
126 | extern void irsock_cleanup(void); | 126 | extern void irsock_cleanup(void); |
127 | 127 | ||
128 | extern int irda_nl_register(void); | ||
129 | extern void irda_nl_unregister(void); | ||
130 | |||
128 | extern int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev, | 131 | extern int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev, |
129 | struct packet_type *ptype, | 132 | struct packet_type *ptype, |
130 | struct net_device *orig_dev); | 133 | struct net_device *orig_dev); |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index a3d370efb903..9d0c78ea92f5 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
@@ -208,6 +208,8 @@ struct irlap_cb { | |||
208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ | 208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ |
209 | int bofs_count; /* Negotiated extra BOFs */ | 209 | int bofs_count; /* Negotiated extra BOFs */ |
210 | int next_bofs; /* Negotiated extra BOFs after next frame */ | 210 | int next_bofs; /* Negotiated extra BOFs after next frame */ |
211 | |||
212 | int mode; /* IrLAP mode (primary, secondary or monitor) */ | ||
211 | }; | 213 | }; |
212 | 214 | ||
213 | /* | 215 | /* |