rt2x00debug.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. Copyright (C) 2004 - 2007 rt2x00 SourceForge Project
  3. <http://rt2x00.serialmonkey.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the
  14. Free Software Foundation, Inc.,
  15. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  16. */
  17. /*
  18. Module: rt2x00debug
  19. Abstract: Data structures for the rt2x00debug.
  20. */
  21. #ifndef RT2X00DEBUG_H
  22. #define RT2X00DEBUG_H
  23. struct rt2x00_dev;
  24. #define RT2X00DEBUGFS_REGISTER_ENTRY(__name, __type) \
  25. struct reg##__name { \
  26. void (*read)(const struct rt2x00_dev *rt2x00dev, \
  27. const unsigned int word, __type *data); \
  28. void (*write)(const struct rt2x00_dev *rt2x00dev, \
  29. const unsigned int word, __type data); \
  30. \
  31. unsigned int word_size; \
  32. unsigned int word_count; \
  33. } __name
  34. struct rt2x00debug {
  35. /*
  36. * Reference to the modules structure.
  37. */
  38. struct module *owner;
  39. /*
  40. * Register access entries.
  41. */
  42. RT2X00DEBUGFS_REGISTER_ENTRY(csr, u32);
  43. RT2X00DEBUGFS_REGISTER_ENTRY(eeprom, u16);
  44. RT2X00DEBUGFS_REGISTER_ENTRY(bbp, u8);
  45. RT2X00DEBUGFS_REGISTER_ENTRY(rf, u32);
  46. };
  47. #endif /* RT2X00DEBUG_H */