1. 09 6月, 2009 4 次提交
  2. 08 6月, 2009 3 次提交
  3. 07 6月, 2009 1 次提交
  4. 04 6月, 2009 6 次提交
    • H
      gso: Stop fraglists from escaping · 278b2513
      Herbert Xu 提交于
      As it stands skb fraglists can get past the check in dev_queue_xmit
      if the skb is marked as GSO.  In particular, if the packet doesn't
      have the proper checksums for GSO, but can otherwise be handled by
      the underlying device, we will not perform the fraglist check on it
      at all.
      
      If the underlying device cannot handle fraglists, then this will
      break.
      
      The fix is as simple as moving the fraglist check from the device
      check into skb_gso_ok.
      
      This has caused crashes with Xen when used together with GRO which
      can generate GSO packets with fraglists.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      278b2513
    • J
      rfkill: add function to query state · 6081162e
      Johannes Berg 提交于
      Sometimes it is necessary to know how the state is,
      and it is easier to query rfkill than keep track of
      it somewhere else, so add a function for that. This
      could later be expanded to return hard/soft block,
      but so far that isn't necessary.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6081162e
    • J
      rfkill: create useful userspace interface · c64fb016
      Johannes Berg 提交于
      The new code added by this patch will make rfkill create
      a misc character device /dev/rfkill that userspace can use
      to control rfkill soft blocks and get status of devices as
      well as events when the status changes.
      
      Using it is very simple -- when you open it you can read
      a number of times to get the initial state, and every
      further read blocks (you can poll) on getting the next
      event from the kernel. The same structure you read is
      also used when writing to it to change the soft block of
      a given device, all devices of a given type, or all
      devices.
      
      This also makes CONFIG_RFKILL_INPUT selectable again in
      order to be able to test without it present since its
      functionality can now be replaced by userspace entirely
      and distros and users may not want the input part of
      rfkill interfering with their userspace code. We will
      also write a userspace daemon to handle all that and
      consequently add the input code to the feature removal
      schedule.
      
      In order to have rfkilld support both kernels with and
      without CONFIG_RFKILL_INPUT (or new kernels after its
      eventual removal) we also add an ioctl (that only exists
      if rfkill-input is present) to disable rfkill-input.
      It is not very efficient, but at least gives the correct
      behaviour in all cases.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c64fb016
    • J
      rfkill: rewrite · 19d337df
      Johannes Berg 提交于
      This patch completely rewrites the rfkill core to address
      the following deficiencies:
      
       * all rfkill drivers need to implement polling where necessary
         rather than having one central implementation
      
       * updating the rfkill state cannot be done from arbitrary
         contexts, forcing drivers to use schedule_work and requiring
         lots of code
      
       * rfkill drivers need to keep track of soft/hard blocked
         internally -- the core should do this
      
       * the rfkill API has many unexpected quirks, for example being
         asymmetric wrt. alloc/free and register/unregister
      
       * rfkill can call back into a driver from within a function the
         driver called -- this is prone to deadlocks and generally
         should be avoided
      
       * rfkill-input pointlessly is a separate module
      
       * drivers need to #ifdef rfkill functions (unless they want to
         depend on or select RFKILL) -- rfkill should provide inlines
         that do nothing if it isn't compiled in
      
       * the rfkill structure is not opaque -- drivers need to initialise
         it correctly (lots of sanity checking code required) -- instead
         force drivers to pass the right variables to rfkill_alloc()
      
       * the documentation is hard to read because it always assumes the
         reader is completely clueless and contains way TOO MANY CAPS
      
       * the rfkill code needlessly uses a lot of locks and atomic
         operations in locked sections
      
       * fix LED trigger to actually change the LED when the radio state
         changes -- this wasn't done before
      Tested-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad]
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      19d337df
    • J
      net: introduce pre-up netdev notifier · 3b8bcfd5
      Johannes Berg 提交于
      NETDEV_UP is called after the device is set UP, but sometimes
      it is useful to be able to veto the device UP. Introduce a
      new NETDEV_PRE_UP notifier that can be used for exactly this.
      The first use case will be cfg80211 denying interfaces to be
      set UP if the device is known to be rfkill'ed.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3b8bcfd5
    • J
      cfg80211: use key size constants · 8fc0fee0
      Johannes Berg 提交于
      Instead of hardcoding the key length for validation, use the
      constants Zhu Yi recently added and add one for AES_CMAC too.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8fc0fee0
  5. 03 6月, 2009 5 次提交
  6. 02 6月, 2009 1 次提交
    • N
      ipv4: New multicast-all socket option · f771bef9
      Nivedita Singhvi 提交于
      After some discussion offline with Christoph Lameter and David Stevens
      regarding multicast behaviour in Linux, I'm submitting a slightly
      modified patch from the one Christoph submitted earlier.
      
      This patch provides a new socket option IP_MULTICAST_ALL.
      
      In this case, default behaviour is _unchanged_ from the current
      Linux standard. The socket option is set by default to provide
      original behaviour. Sockets wishing to receive data only from
      multicast groups they join explicitly will need to clear this
      socket option.
      Signed-off-by: NNivedita Singhvi <niv@us.ibm.com>
      Signed-off-by: Christoph Lameter<cl@linux.com>
      Acked-by: NDavid Stevens <dlstevens@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f771bef9
  7. 01 6月, 2009 2 次提交
  8. 30 5月, 2009 1 次提交
    • J
      net: convert unicast addr list · ccffad25
      Jiri Pirko 提交于
      This patch converts unicast address list to standard list_head using
      previously introduced struct netdev_hw_addr. It also relaxes the
      locking. Original spinlock (still used for multicast addresses) is not
      needed and is no longer used for a protection of this list. All
      reading and writing takes place under rtnl (with no changes).
      
      I also removed a possibility to specify the length of the address
      while adding or deleting unicast address. It's always dev->addr_len.
      
      The convertion touched especially e1000 and ixgbe codes when the
      change is not so trivial.
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      
       drivers/net/bnx2.c               |   13 +--
       drivers/net/e1000/e1000_main.c   |   24 +++--
       drivers/net/ixgbe/ixgbe_common.c |   14 ++--
       drivers/net/ixgbe/ixgbe_common.h |    4 +-
       drivers/net/ixgbe/ixgbe_main.c   |    6 +-
       drivers/net/ixgbe/ixgbe_type.h   |    4 +-
       drivers/net/macvlan.c            |   11 +-
       drivers/net/mv643xx_eth.c        |   11 +-
       drivers/net/niu.c                |    7 +-
       drivers/net/virtio_net.c         |    7 +-
       drivers/s390/net/qeth_l2_main.c  |    6 +-
       drivers/scsi/fcoe/fcoe.c         |   16 ++--
       include/linux/netdevice.h        |   18 ++--
       net/8021q/vlan.c                 |    4 +-
       net/8021q/vlan_dev.c             |   10 +-
       net/core/dev.c                   |  195 +++++++++++++++++++++++++++-----------
       net/dsa/slave.c                  |   10 +-
       net/packet/af_packet.c           |    4 +-
       18 files changed, 227 insertions(+), 137 deletions(-)
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ccffad25
  9. 29 5月, 2009 3 次提交
    • J
      bonding: allow bond in mode balance-alb to work properly in bridge -try4.3 · 5d4e039b
      Jiri Pirko 提交于
      [PATCH net-next] bonding: allow bond in mode balance-alb to work properly in bridge -try4.3
      
      (updated)
      changes v4.2 -> v4.3
      - memcpy the address always, not just in case it differs from master->dev_addr
      - compare_ether_addr_64bits() is not used so there is no direct need to make new
        header file (I think it would be good to have bond stuff in separate file
        anyway).
      
      changes v4.1 -> v4.2
      - use skb->pkt_type == PACKET_HOST compare rather then comparing skb dest addr
        against skb->dev->dev_addr
      
      The problem is described in following bugzilla:
      https://bugzilla.redhat.com/show_bug.cgi?id=487763
      
      Basically here's what's going on. In every mode, bonding interface uses the same
      mac address for all enslaved devices (except fail_over_mac). Only balance-alb
      will simultaneously use multiple MAC addresses across different slaves. When you
      put this kind of bond device into a bridge it will only add one of mac adresses
      into a hash list of mac addresses, say X. This mac address is marked as local.
      But this bonding interface also has mac address Y. Now then packet arrives with
      destination address Y, this address is not marked as local and the packed looks
      like it needs to be forwarded. This packet is then lost which is wrong.
      
      Notice that interfaces can be added and removed from bond while it is in bridge.
      
      ***
      When the multiple addresses for bridge port approach failed to solve this issue
      due to STP I started to think other way to solve this. I returned to previous
      solution but tweaked one.
      
      This patch solves the situation in the bonding without touching bridge code.
      For every incoming frame to bonding the destination address is compared to
      current address of the slave device from which tha packet came. If these two
      match destination address is replaced by mac address of the master. This address
      is known by bridge so it is delivered properly. Note that the comparsion is not
      made directly, it's used skb->pkt_type == PACKET_HOST instead. This is "set"
      previously in eth_type_trans().
      
      I experimentally tried that this works as good as searching through the slave
      list (v4 of this patch).
      
      Jirka
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5d4e039b
    • I
      wimax: a new API call was added, increment minor protocol version number · 7481806d
      Inaky Perez-Gonzalez 提交于
      As the 'state_get' API call was added, we need to increase the minor
      protocol version number so applications that depend on the can check
      it's presence.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      7481806d
    • P
      wimax: Add netlink interface to get device state · 7f0333eb
      Paulius Zaleckas 提交于
      wimax connection manager / daemon has to know what is current
      state of the device. Previously it was only possible to get
      notification whet state has changed.
      
      Note:
      
       By mistake, the new generic netlink's number for
       WIMAX_GNL_OP_STATE_GET was declared inserting into the existing list
       of API calls, not appending; thus, it'd break existing API.
      
       Fixed by Inaky Perez-Gonzalez <inaky@linux.intel.com> by moving to
       the tail, where we add to the interface, not modify the interface.
      
       Thanks to Stephen Hemminger <shemminger@vyatta.com> for catching this.
      Signed-off-by: NPaulius Zaleckas <paulius.zaleckas@teltonika.lt>
      7f0333eb
  10. 28 5月, 2009 2 次提交
  11. 27 5月, 2009 5 次提交
  12. 26 5月, 2009 1 次提交
    • E
      net: txq_trans_update() helper · 08baf561
      Eric Dumazet 提交于
      We would like to get rid of netdev->trans_start = jiffies; that about all net
      drivers have to use in their start_xmit() function, and use txq->trans_start
      instead.
      
      This can be done generically in core network, as suggested by David.
      
      Some devices, (particularly loopback) dont need trans_start update, because
      they dont have transmit watchdog. We could add a new device flag, or rely
      on fact that txq->tran_start can be updated is txq->xmit_lock_owner is
      different than -1. Use a helper function to hide our choice.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      08baf561
  13. 25 5月, 2009 6 次提交