spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / include / net / phonet / pn_dev.h
blob8639de5750f640726011672851e1baf78f9bd3a3
1 /*
2 * File: pn_dev.h
4 * Phonet network device
6 * Copyright (C) 2008 Nokia Corporation.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
23 #ifndef PN_DEV_H
24 #define PN_DEV_H
26 struct phonet_device_list {
27 struct list_head list;
28 struct mutex lock;
31 struct phonet_device_list *phonet_device_list(struct net *net);
33 struct phonet_device {
34 struct list_head list;
35 struct net_device *netdev;
36 DECLARE_BITMAP(addrs, 64);
37 struct rcu_head rcu;
40 int phonet_device_init(void);
41 void phonet_device_exit(void);
42 int phonet_netlink_register(void);
43 struct net_device *phonet_device_get(struct net *net);
45 int phonet_address_add(struct net_device *dev, u8 addr);
46 int phonet_address_del(struct net_device *dev, u8 addr);
47 u8 phonet_address_get(struct net_device *dev, u8 addr);
48 int phonet_address_lookup(struct net *net, u8 addr);
49 void phonet_address_notify(int event, struct net_device *dev, u8 addr);
51 int phonet_route_add(struct net_device *dev, u8 daddr);
52 int phonet_route_del(struct net_device *dev, u8 daddr);
53 void rtm_phonet_notify(int event, struct net_device *dev, u8 dst);
54 struct net_device *phonet_route_get_rcu(struct net *net, u8 daddr);
55 struct net_device *phonet_route_output(struct net *net, u8 daddr);
57 #define PN_NO_ADDR 0xff
59 extern const struct file_operations pn_sock_seq_fops;
60 extern const struct file_operations pn_res_seq_fops;
62 #endif