1. 08 10月, 2009 37 次提交
  2. 05 10月, 2009 3 次提交
    • A
      net: export device speed and duplex via sysfs · d519e17e
      Andy Gospodarek 提交于
      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
      100
      # cat /sys/class/net/eth0/duplex
      half
      # 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: NDavid S. Miller <davem@davemloft.net>
      d519e17e
    • M
      cfg80211: assign device type in netdev notifier callback · 053a93dd
      Marcel Holtmann 提交于
      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: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      053a93dd
    • J
      net: introduce NETDEV_POST_INIT notifier · 7ffbe3fd
      Johannes Berg 提交于
      For various purposes including a wireless extensions
      bugfix, we need to hook into the netdev creation before
      before netdev_register_kobject(). This will also ease
      doing the dev type assignment that Marcel was working
      on for cfg80211 drivers w/o touching them all.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ffbe3fd