1. 27 Jun, 2022 1 commit
  2. 23 Jun, 2022 1 commit
    • Martin Matějek's avatar
      mox: Adjust detection of which eth port belongs to which module · 4b88fa33
      Martin Matějek authored
      Detection of mox switch module number fails to tell modules apart,
      because `phys_switch_id` always has value 00000000 for all switch ports.
      
      On TOS 5.3.x different switch ports returned different `phys_switch_id`
      based on the physical Mox module, e.g.:
      
      * 00000000 -> switch 0
      * 01000000 -> switch 1
      * 02000000 -> switch 2
      
      Determine the Mox module number by looking into
      `/sys/class/net/<iface>/device/of_node` real path.
      
      For example single topaz module:
      
      /sys/class/net/lan4/device/of_node ->
      [..]/firmware/devicetree/base/soc/internal-regs@d0000000/mdio@32004/switch0@2
      
      Will identify switch as `switch0@2` -> `switch 0`.
      
      These `switchX@Y` identifiers should be stable, because they are defined
      in kernel DTS.
      
      Closes: #16
      4b88fa33
  3. 16 Jun, 2022 3 commits
  4. 13 Jun, 2022 2 commits
    • Martin Matějek's avatar
      version 0.7.0 · d26001cd
      Martin Matějek authored
      d26001cd
    • Martin Matějek's avatar
      Return interfaces sorted based on interface name · a7a9d4a9
      Martin Matějek authored
      Sort interfaces by natural sort order before returning result dictionary
      from `ifaces_array2dict()`.
      
      Reading interfaces from /sys might return them in different order based on used tool.
      See difference between order of items for `os.listdir()` vs `ls` in shell.
      
      It will be more useful for consumer of turrishw to get interfaces sorted
      in resulting dictionary to avoid dealing with the possibly random order of interfaces.
      a7a9d4a9
  5. 19 May, 2022 2 commits
  6. 28 Apr, 2022 2 commits
  7. 26 Apr, 2022 1 commit
    • Martin Matějek's avatar
      turris: get eth interface name from label instead of port id · 9fd3543b
      Martin Matějek authored
      Read `of_node/label` instead of `phys_switch_id` and don't try to concat
      port label by lan + port_id.
      
      Besides that, it will fix discrepancies between `phys_switch_id` and
      port label on Turris 1.x, in which case they are opposite of each other,
      for instance:
      
      LAN1 <-> port 4 <-> lan5
      [...]
      LAN5 <-> port 0 <-> lan1
      9fd3543b
  8. 03 Feb, 2022 2 commits
  9. 06 Aug, 2021 3 commits
  10. 02 Aug, 2021 1 commit
  11. 31 May, 2021 1 commit
  12. 18 May, 2021 5 commits
  13. 16 May, 2021 1 commit
  14. 11 Dec, 2019 1 commit
  15. 10 Jul, 2019 1 commit
  16. 26 Feb, 2019 1 commit
  17. 27 Nov, 2018 1 commit
  18. 15 Nov, 2018 1 commit
  19. 12 Nov, 2018 5 commits
  20. 08 Nov, 2018 1 commit
  21. 07 Nov, 2018 2 commits
  22. 06 Nov, 2018 2 commits