bus.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Intel Wireless Multicomm 3200 WiFi driver
  3. *
  4. * Copyright (C) 2009 Intel Corporation <ilw@linux.intel.com>
  5. * Samuel Ortiz <samuel.ortiz@intel.com>
  6. * Zhu Yi <yi.zhu@intel.com>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License version
  10. * 2 as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  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 Street, Fifth Floor, Boston, MA
  20. * 02110-1301, USA.
  21. *
  22. */
  23. #ifndef __IWM_BUS_H__
  24. #define __IWM_BUS_H__
  25. #include "iwm.h"
  26. struct iwm_if_ops {
  27. int (*enable)(struct iwm_priv *iwm);
  28. int (*disable)(struct iwm_priv *iwm);
  29. int (*send_chunk)(struct iwm_priv *iwm, u8* buf, int count);
  30. void (*debugfs_init)(struct iwm_priv *iwm, struct dentry *parent_dir);
  31. void (*debugfs_exit)(struct iwm_priv *iwm);
  32. const char *umac_name;
  33. const char *calib_lmac_name;
  34. const char *lmac_name;
  35. };
  36. static inline int iwm_bus_send_chunk(struct iwm_priv *iwm, u8 *buf, int count)
  37. {
  38. return iwm->bus_ops->send_chunk(iwm, buf, count);
  39. }
  40. static inline int iwm_bus_enable(struct iwm_priv *iwm)
  41. {
  42. return iwm->bus_ops->enable(iwm);
  43. }
  44. static inline int iwm_bus_disable(struct iwm_priv *iwm)
  45. {
  46. return iwm->bus_ops->disable(iwm);
  47. }
  48. #endif