ozmain.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* -----------------------------------------------------------------------------
  2. * Copyright (c) 2011 Ozmo Inc
  3. * Released under the GNU General Public License Version 2 (GPLv2).
  4. * -----------------------------------------------------------------------------
  5. */
  6. #include <linux/init.h>
  7. #include <linux/module.h>
  8. #include <linux/timer.h>
  9. #include <linux/sched.h>
  10. #include <linux/netdevice.h>
  11. #include <linux/errno.h>
  12. #include <linux/ieee80211.h>
  13. #include "ozdbg.h"
  14. #include "ozpd.h"
  15. #include "ozproto.h"
  16. #include "ozcdev.h"
  17. unsigned int oz_dbg_mask = OZ_DEFAULT_DBG_MASK;
  18. /*
  19. * The name of the 802.11 mac device. Empty string is the default value but a
  20. * value can be supplied as a parameter to the module. An empty string means
  21. * bind to nothing. '*' means bind to all netcards - this includes non-802.11
  22. * netcards. Bindings can be added later using an IOCTL.
  23. */
  24. static char *g_net_dev = "";
  25. module_param(g_net_dev, charp, S_IRUGO);
  26. MODULE_PARM_DESC(g_net_dev, "The device(s) to bind to; "
  27. "'*' means all, '' (empty string; default) means none.");
  28. /*
  29. * Context: process
  30. */
  31. static int __init ozwpan_init(void)
  32. {
  33. oz_cdev_register();
  34. oz_protocol_init(g_net_dev);
  35. oz_app_enable(OZ_APPID_USB, 1);
  36. oz_apps_init();
  37. return 0;
  38. }
  39. /*
  40. * Context: process
  41. */
  42. static void __exit ozwpan_exit(void)
  43. {
  44. oz_protocol_term();
  45. oz_apps_term();
  46. oz_cdev_deregister();
  47. }
  48. module_init(ozwpan_init);
  49. module_exit(ozwpan_exit);
  50. MODULE_AUTHOR("Chris Kelly");
  51. MODULE_DESCRIPTION("Ozmo Devices USB over WiFi hcd driver");
  52. MODULE_VERSION("1.0.13");
  53. MODULE_LICENSE("GPL");