6lowpan.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. Copyright (c) 2013 Intel Corp.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License version 2 and
  5. only version 2 as published by the Free Software Foundation.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. */
  11. #ifndef __6LOWPAN_H
  12. #define __6LOWPAN_H
  13. #include <linux/errno.h>
  14. #include <linux/skbuff.h>
  15. #include <net/bluetooth/l2cap.h>
  16. #if IS_ENABLED(CONFIG_BT_6LOWPAN)
  17. int bt_6lowpan_recv(struct l2cap_conn *conn, struct sk_buff *skb);
  18. int bt_6lowpan_add_conn(struct l2cap_conn *conn);
  19. int bt_6lowpan_del_conn(struct l2cap_conn *conn);
  20. int bt_6lowpan_init(void);
  21. void bt_6lowpan_cleanup(void);
  22. #else
  23. static int bt_6lowpan_recv(struct l2cap_conn *conn, struct sk_buff *skb)
  24. {
  25. return -EOPNOTSUPP;
  26. }
  27. static int bt_6lowpan_add_conn(struct l2cap_conn *conn)
  28. {
  29. return -EOPNOTSUPP;
  30. }
  31. int bt_6lowpan_del_conn(struct l2cap_conn *conn)
  32. {
  33. return -EOPNOTSUPP;
  34. }
  35. static int bt_6lowpan_init(void)
  36. {
  37. return -EOPNOTSUPP;
  38. }
  39. static void bt_6lowpan_cleanup(void) { }
  40. #endif
  41. #endif /* __6LOWPAN_H */