15 Sep, 2009

8 commits

  • This fixes a resume failure where a signal is pending on resume
    so the firmware upload fails.
    This removes the interruptible sleep, because we don't really need it.
    In the worst case (with broken firmware) the sleep loop will take 1 second.
    In the common case (working firmware), it will only take a few milliseconds.
    So we don't really need to be interruptible.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • Disable SDIO coreswitch debugging.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • When this was added no defaults were set and it seems
    this implies n. Default this to y.

    Reported-by: Jouni Malinen
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • Signed-off-by: Holger Schurig
    Signed-off-by: John W. Linville

    Holger Schurig
     
  • WEXT's "struct iw_freq" can also be used to handle a channel. This patch now
    uses cfg80211_wext_freq() instead of hand-converting the frequency. That
    allows user-space to specify channels as well, like with SIOCSIWFREQ.

    Signed-off-by: Holger Schurig
    Signed-off-by: John W. Linville

    Holger Schurig
     
  • When processing MIB interrupts, OFDM and CCK error
    handling routines for low RSSI values have to be invoked
    only when the channel mode is 11G/11B. Since HT channels
    will also fall under the bands 2Ghz/5Ghz, check appropriately.

    Signed-off-by: Sujith
    Signed-off-by: John W. Linville

    Sujith
     
  • Force wake the mac80211 queues on init.
    Under rare circumstances they may be stopped, if a DMA error or
    something else causes a device reset while a queue was stopped.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • As the hostap driver was converted to use net_device_ops, a mistake was
    made in hostap_main.c (commit 5ae4efbcd2611562a8b93596be034e63495706a5).
    Originally, the tx_queue_len was set to 0 for every other interface than
    HOSTAP_INTERFACE_MASTER, but the new fragment of code sets tx_queue_len to
    0 only for HOSTAP_INTERFACE_MASTER. The opposite of the previous
    behavior makes the driver to drop all packets in AP mode.

    Change the way 0 is assigned to tx_queue_len according to the original
    logic.

    Signed-off-by: Martin Decky
    Signed-off-by: John W. Linville

    Martin Decky
     

12 Sep, 2009

21 commits

  • o Add QLogic copyright, add linux-driver@qlogic.com to
    MAINTAINERS.
    o Delete old contact information.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Dhananjay Phadke
     
  • Redesign tx timeout handling in line with new firmware
    reset design that co-ordinates with other PCI function
    drivers.

    o For NX3031, first try to reset PCI function's own
    context before requesting firmware reset.

    o For NX2031, since firmware heartbit is not supported
    directly request firmware reset.

    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • Release file firmware when no firmware reset is required.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Dhananjay Phadke
     
  • o Access on card memory through memory controller (agent)
    rather than moving small pci window around. Clean up the
    code for moving windows around.

    o Restrict memory accesss to 64 bit, currently only firmware
    download uses this.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Dhananjay Phadke
     
  • Use 8 byte strides for firmware download into card
    memory since oncard memory controller needs 8 byte
    (64 bit) accesses. This avoids unnecessary rmw cycles.

    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • Commit f6eb9b1fc1411d22c073f5264e5630a541d0f7df, "tg3: Add 5717 asic
    rev" changed how the rx return ring size operations are done. It
    effectively inverts the sense of the previous test, but it failed to
    also invert the resulting sizes. This patch corrects that error.

    Signed-off-by: Matt Carlson
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • When CONFIG_INET is disabled, netxen has a build failure:

    netxen_nic_main.c:(.text+0x118fd1): undefined reference to `netxen_config_indev_addr'

    so make that function just an empty stub when CONFIG_INET=n.
    (not "inline" since that conflicts with other declarations of it)

    Signed-off-by: Randy Dunlap
    Acked-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • Signed-off-by: Rémi Denis-Courmont
    Signed-off-by: David S. Miller

    Rémi Denis-Courmont
     
  • In some cases, the network device driver knows what layer-3 address the
    device should have. This adds support for the Phonet stack to
    automatically request from the driver and add that address to the
    network device.

    Signed-off-by: Rémi Denis-Courmont
    Signed-off-by: David S. Miller

    Rémi Denis-Courmont
     
  • Signed-off-by: Rémi Denis-Courmont
    Signed-off-by: David S. Miller

    Rémi Denis-Courmont
     
  • Add IFA_F_DADFAILED flag to denote an IPv6 address that has
    failed Duplicate Address Detection, that way tools like
    /sbin/ip can be more informative.

    3: eth0: mtu 1500 qlen 1000
    inet6 2001:db8::1/64 scope global tentative dadfailed
    valid_lft forever preferred_lft forever

    Signed-off-by: Brian Haley
    Signed-off-by: David S. Miller

    Brian Haley
     
  • The Ethernet framing is used for a lot of devices these days. Most
    prominent are WiFi and WiMAX based devices. However for userspace
    application it is important to classify these devices correctly and
    not only see them as Ethernet devices. The daemons like HAL, DeviceKit
    or even NetworkManager with udev support tries to do the classification
    in userspace with a lot trickery and extra system calls. This is not
    good and actually reaches its limitations. Especially since the kernel
    does know the type of the Ethernet device it is pretty stupid.

    To solve this problem the underlying device type needs to be set and
    then the value will be exported as DEVTYPE via uevents and available
    within udev.

    # cat /sys/class/net/wlan0/uevent
    DEVTYPE=wlan
    INTERFACE=wlan0
    IFINDEX=5

    This is similar to subsystems like USB and SCSI that distinguish
    between hosts, devices, disks, partitions etc.

    The new SET_NETDEV_DEVTYPE() is a convenience helper to set the actual
    device type. All device types are free form, but for convenience the
    same strings as used with RFKILL are choosen.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: David S. Miller

    Marcel Holtmann
     
  • The txq_set_wrr() function in drivers/net/mv643xx_eth.c is
    unused, not even referenced under #if 0 or something like that,
    which results in a compile-time warning:

    drivers/net/mv643xx_eth.c:1070: warning: 'txq_set_wrr' defined but not used

    Fix: remove it.

    Signed-off-by: Mikael Pettersson
    Signed-off-by: David S. Miller

    Mikael Pettersson
     
  • MPC8360 QE UCC ethernet controllers hang when changing link duplex
    under a load (a bit of NFS activity is enough).

    PHY: mdio@e0102120:00 - Link is Up - 1000/Full
    sh-3.00# ethtool -s eth0 speed 100 duplex half autoneg off
    PHY: mdio@e0102120:00 - Link is Down
    PHY: mdio@e0102120:00 - Link is Up - 100/Half
    NETDEV WATCHDOG: eth0 (ucc_geth): transmit queue 0 timed out
    ------------[ cut here ]------------
    Badness at c01fcbd0 [verbose debug info unavailable]
    NIP: c01fcbd0 LR: c01fcbd0 CTR: c0194e44
    ...

    The cure is to disable the controller before changing speed/duplex
    and enable it afterwards.

    Though, disabling the controller might take quite a while, so we
    better not grab any spinlocks in adjust_link(). Instead, we quiesce
    the driver's activity, and only then disable the controller.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • We'll need ugeth_disable() and ugeth_enable() calls earlier in the
    file, so rearrange some code to avoid forward declarations.

    The patch doesn't contain any functional changes.

    Signed-off-by: Anton Vorontsov
    Acked-by: Timur Tabi
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • According to specs, when auto-negotiation is disabled, Marvell PHYs need
    a software reset after changing speed/duplex forcing bits. Otherwise,
    the modified bits have no effect.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • Error handling code following a kzalloc should free the allocated data.

    The semantic match that finds the problem is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @r exists@
    local idexpression x;
    statement S;
    expression E;
    identifier f,f1,l;
    position p1,p2;
    expression *ptr != NULL;
    @@

    x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
    ...
    if (x == NULL) S
    }
    (
    x->f1 = E
    |
    (x->f1 == NULL || ...)
    |
    f(...,x->f1,...)
    )
    ...>
    (
    return \(0\|\|ptr\);
    |
    return@p2 ...;
    )

    @script:python@
    p1 << r.p1;
    p2 << r.p2;
    @@

    print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     
  • Error handling code following a kmalloc should free the allocated data.

    The semantic match that finds the problem is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @r exists@
    local idexpression x;
    statement S;
    expression E;
    identifier f,f1,l;
    position p1,p2;
    expression *ptr != NULL;
    @@

    x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
    ...
    if (x == NULL) S
    }
    (
    x->f1 = E
    |
    (x->f1 == NULL || ...)
    |
    f(...,x->f1,...)
    )
    ...>
    (
    return \(0\|\|ptr\);
    |
    return@p2 ...;
    )

    @script:python@
    p1 << r.p1;
    p2 << r.p2;
    @@

    print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     
  • The only valid usage for the bridge frame hooks are by a
    GPL components (such as the bridge module).
    The kernel should not leave a crack in the door for proprietary
    networking stacks to slip in.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • And also do a better job of returning proper NET_{RX,XMIT}_ values.

    Based on a patch and suggestions by Mark Smith.

    This fixes CVE-2009-2903

    Reported-by: Mark Smith
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Arnaldo Carvalho de Melo
     
  • Kalle Olavi Niemitalo reported that:

    "..., when one process calls sendmsg once to send 43804 bytes of
    data and one file descriptor, and another process then calls recvmsg
    three times to receive the 16032+16032+11740 bytes, each of those
    recvmsg calls returns the file descriptor in the ancillary data. I
    confirmed this with strace. The behaviour differs from Linux
    2.6.26, where reportedly only one of those recvmsg calls (I think
    the first one) returned the file descriptor."

    This bug was introduced by a patch from me titled "net: unix: fix inflight
    counting bug in garbage collector", commit 6209344f5.

    And the reason is, quoting Kalle:

    "Before your patch, unix_attach_fds() would set scm->fp = NULL, so
    that if the loop in unix_stream_sendmsg() ran multiple iterations,
    it could not call unix_attach_fds() again. But now,
    unix_attach_fds() leaves scm->fp unchanged, and I think this causes
    it to be called multiple times and duplicate the same file
    descriptors to each struct sk_buff."

    Fix this by introducing a flag that is cleared at the start and set
    when the fds attached to the first buffer. The resulting code should
    work equivalently to the one on 2.6.26.

    Reported-by: Kalle Olavi Niemitalo
    Signed-off-by: Miklos Szeredi
    Signed-off-by: David S. Miller

    Miklos Szeredi
     

11 Sep, 2009

1 commit


10 Sep, 2009

6 commits


09 Sep, 2009

4 commits