1. 07 Oct, 2009 38 commits
  2. 05 Oct, 2009 2 commits
    • Andy Gospodarek's avatar
      net: export device speed and duplex via sysfs · d519e17e
      Andy Gospodarek authored
      This patch exports the link-speed (in Mbps) and duplex of an interface
      via sysfs.  This eliminates the need to use ethtool just to check the
      link-speed.  Not requiring 'ethtool' and not relying on the SIOCETHTOOL
      ioctl should be helpful in an embedded environment where space is at a
      premium as well.
      NOTE: This patch also intentionally allows non-root users to check the link
      speed and duplex -- something not possible with ethtool.
      Here's some sample output:
      # cat /sys/class/net/eth0/speed
      # cat /sys/class/net/eth0/duplex
      # ethtool eth0
      Settings for eth0:
              Supported ports: [ TP ]
              Supported link modes:   10baseT/Half 10baseT/Full
                                      100baseT/Half 100baseT/Full
                                      1000baseT/Half 1000baseT/Full
              Supports auto-negotiation: Yes
              Advertised link modes:  Not reported
              Advertised auto-negotiation: No
              Speed: 100Mb/s
              Duplex: Half
              Port: Twisted Pair
              PHYAD: 1
              Transceiver: internal
              Auto-negotiation: off
              Supports Wake-on: g
              Wake-on: g
              Current message level: 0x000000ff (255)
              Link detected: yes
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Marcel Holtmann's avatar
      cfg80211: assign device type in netdev notifier callback · 053a93dd
      Marcel Holtmann authored
      Instead of having to modify every non-mac80211 for device type assignment,
      do this inside the netdev notifier callback of cfg80211. So all drivers
      that integrate with cfg80211 will export a proper device type.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>