dsa.h 967 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * include/net/dsa.h - Driver for Distributed Switch Architecture switch chips
  3. * Copyright (c) 2008 Marvell Semiconductor
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. */
  10. #ifndef __LINUX_NET_DSA_H
  11. #define __LINUX_NET_DSA_H
  12. #define DSA_MAX_PORTS 12
  13. struct dsa_platform_data {
  14. /*
  15. * Reference to a Linux network interface that connects
  16. * to the switch chip.
  17. */
  18. struct device *netdev;
  19. /*
  20. * How to access the switch configuration registers, and
  21. * the names of the switch ports (use "cpu" to designate
  22. * the switch port that the cpu is connected to).
  23. */
  24. struct device *mii_bus;
  25. int sw_addr;
  26. char *port_names[DSA_MAX_PORTS];
  27. };
  28. extern bool dsa_uses_dsa_tags(void *dsa_ptr);
  29. extern bool dsa_uses_trailer_tags(void *dsa_ptr);
  30. #endif