1. 24 Aug, 2012 6 commits
    • Wei Yongjun's avatar
      w5100: using eth_hw_addr_random() for random MAC and set device flag · d68bb7e1
      Wei Yongjun authored
      Using eth_hw_addr_random() to generate a random Ethernet address
      (MAC) to be used by a net device and set addr_assign_type.
      Not need to duplicating its implementation.
      
      spatch with a semantic match is used to found this problem.
      (http://coccinelle.lip6.fr/)
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d68bb7e1
    • Wei Yongjun's avatar
      wimax/i2400m: use is_zero_ether_addr() instead of memcmp() · 9213bb83
      Wei Yongjun authored
      Using is_zero_ether_addr() instead of directly use
      memcmp() to determine if the ethernet address is all
      zeros.
      
      spatch with a semantic match is used to found this problem.
      (http://coccinelle.lip6.fr/)
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9213bb83
    • Ben Hutchings's avatar
      net: Set device operstate at registration time · 8f4cccbb
      Ben Hutchings authored
      The operstate of a device is initially IF_OPER_UNKNOWN and is updated
      asynchronously by linkwatch after each change of carrier state
      reported by the driver.  The default carrier state of a net device is
      on, and this will never be changed on drivers that do not support
      carrier detection, thus the operstate remains IF_OPER_UNKNOWN.
      
      For devices that do support carrier detection, the driver must set the
      carrier state to off initially, then poll the hardware state when the
      device is opened.  However, we must not activate linkwatch for a
      unregistered device, and commit b4730016 ('net: Do not fire linkwatch
      events until the device is registered.') ensured that we don't.  But
      this means that the operstate for many devices that support carrier
      detection remains IF_OPER_UNKNOWN when it should be IF_OPER_DOWN.
      
      The same issue exists with the dormant state.
      
      The proper initialisation sequence, avoiding a race with opening of
      the device, is:
      
              rtnl_lock();
              rc = register_netdevice(dev);
              if (rc)
                      goto out_unlock;
              netif_carrier_off(dev); /* or netif_dormant_on(dev) */
              rtnl_unlock();
      
      but it seems silly that this should have to be repeated in so many
      drivers.  Further, the operstate seen immediately after opening the
      device may still be IF_OPER_UNKNOWN due to the asynchronous nature of
      linkwatch.
      
      Commit 22604c86 ('net: Fix for initial link state in 2.6.28') attempted
      to fix this by setting the operstate synchronously, but it was
      reverted as it could lead to deadlock.
      
      This initialises the operstate synchronously at registration time
      only.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f4cccbb
    • Timur Tabi's avatar
      net/fsl: introduce Freescale 10G MDIO driver · 9f35a734
      Timur Tabi authored
      Similar to fsl_pq_mdio.c, this driver is for the 10G MDIO controller on
      Freescale Frame Manager Ethernet controllers.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9f35a734
    • Neil Horman's avatar
      cls_cgroup: Allow classifier cgroups to have their classid reset to 0 · 3afa6d00
      Neil Horman authored
      The network classifier cgroup initalizes each cgroups instance classid value to
      0.  However, the sock_update_classid function only updates classid's in sockets
      if the tasks cgroup classid is not zero, and if it differs from the current
      classid.  The later check is to prevent cache line dirtying, but the former is
      detrimental, as it prevents resetting a classid for a cgroup to 0.  While this
      is not a common action, it has administrative usefulness (if the admin wants to
      disable classification of a certain group temporarily for instance).
      
      Easy fix, just remove the zero check.  Tested successfully by myself
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      CC: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3afa6d00
    • David S. Miller's avatar
      Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge · e6e94e39
      David S. Miller authored
      Antonio Quartulli says:
      
      ====================
      Included changes:
      - a set of codestyle rearrangements/fixes
      - new feature to early detect new joining (mesh-unaware) clients
      - a minor fix for the gw-feature
      - substitution of shift operations with the BIT() macro
      - reorganization of the main batman-adv structure (struct batadv_priv)
      - some more (very) minor cleanups and fixes
      ===================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6e94e39
  2. 23 Aug, 2012 29 commits
  3. 22 Aug, 2012 5 commits