pal.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Wireless USB Host Controller
  3. * UWB Protocol Adaptation Layer (PAL) glue.
  4. *
  5. * Copyright (C) 2008 Cambridge Silicon Radio Ltd.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License version
  9. * 2 as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #include "wusbhc.h"
  20. /**
  21. * wusbhc_pal_register - register the WUSB HC as a UWB PAL
  22. * @wusbhc: the WUSB HC
  23. */
  24. int wusbhc_pal_register(struct wusbhc *wusbhc)
  25. {
  26. uwb_pal_init(&wusbhc->pal);
  27. wusbhc->pal.name = "wusbhc";
  28. wusbhc->pal.device = wusbhc->usb_hcd.self.controller;
  29. return uwb_pal_register(wusbhc->uwb_rc, &wusbhc->pal);
  30. }
  31. /**
  32. * wusbhc_pal_register - unregister the WUSB HC as a UWB PAL
  33. * @wusbhc: the WUSB HC
  34. */
  35. void wusbhc_pal_unregister(struct wusbhc *wusbhc)
  36. {
  37. uwb_pal_unregister(wusbhc->uwb_rc, &wusbhc->pal);
  38. }