23 Aug, 2008

1 commit

  • Converts a test in error handling code to a sequence of labels.

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

    //
    @@
    expression E,E1,E2;
    @@

    E = alloc_etherdev(...)
    ... when != E = E1
    if (...) { ... free_netdev(E); ... return ...; }
    ... when != E = E2
    (
    if (...)
    {
    ... when != free_netdev(E);
    return dev; }
    |
    * if (...)
    {
    ... when != free_netdev(E);
    return ...; }
    |
    register_netdev(E)
    )

    //

    Signed-off-by: Julia Lawall
    Signed-off-by: John W. Linville

    Julia Lawall
     

17 Jun, 2008

1 commit

  • Three major portions to this change:

    1) Add IW_EV_COMPAT_LCP_LEN, IW_EV_COMPAT_POINT_OFF,
    and IW_EV_COMPAT_POINT_LEN helper defines.

    2) Delete iw_stream_check_add_*(), they are unused.

    3) Add iw_request_info argument to iwe_stream_add_*(), and use it to
    size the event and pointer lengths correctly depending upon whether
    IW_REQUEST_FLAG_COMPAT is set or not.

    4) The mechanical transformations to the drivers and wireless stack
    bits to get the iw_request_info passed down into the routines
    modified in #3. Also, explicit references to IW_EV_LCP_LEN are
    replaced with iwe_stream_lcp_len(info).

    With a lot of help and bug fixes from Masakazu Mokuno.

    Signed-off-by: David S. Miller

    David S. Miller
     

15 May, 2008

1 commit

  • trying to clean up the signal/noise code. the previous code in mac80211 had
    confusing names for the related variables, did not have much definition of
    what units of signal and noise were provided and used implicit mechanisms from
    the wireless extensions.

    this patch introduces hardware capability flags to let the hardware specify
    clearly if it can provide signal and noise level values and which units it can
    provide. this also anticipates possible new units like RCPI in the future.

    for signal:

    IEEE80211_HW_SIGNAL_UNSPEC - unspecified, unknown, hw specific
    IEEE80211_HW_SIGNAL_DB - dB difference to unspecified reference point
    IEEE80211_HW_SIGNAL_DBM - dBm, difference to 1mW

    for noise we currently only have dBm:

    IEEE80211_HW_NOISE_DBM - dBm, difference to 1mW

    if IEEE80211_HW_SIGNAL_UNSPEC or IEEE80211_HW_SIGNAL_DB is used the driver has
    to provide the maximum value (max_signal) it reports in order for applications
    to make sense of the signal values.

    i tried my best to find out for each driver what it can provide and update it
    but i'm not sure (?) for some of them and used the more conservative guess in
    doubt. this can be fixed easily after this patch has been merged by changing
    the hardware flags of the driver.

    DRIVER SIGNAL MAX NOISE QUAL
    -----------------------------------------------------------------
    adm8211 unspec(?) 100 n/a missing
    at76_usb unspec(?) (?) unused missing
    ath5k dBm dBm percent rssi
    b43legacy dBm dBm percent jssi(?)
    b43 dBm dBm percent jssi(?)
    iwl-3945 dBm dBm percent snr+more
    iwl-4965 dBm dBm percent snr+more
    p54 unspec 127 n/a missing
    rt2x00 dBm n/a percent rssi+tx/rx frame success
    rt2400 dBm n/a
    rt2500pci dBm n/a
    rt2500usb dBm n/a
    rt61pci dBm n/a
    rt73usb dBm n/a
    rtl8180 unspec(?) 65 n/a (?)
    rtl8187 unspec(?) 65 (?) noise(?)
    zd1211 dB(?) 100 n/a percent

    drivers/net/wireless/ath5k/base.c: Changes-licensed-under: 3-Clause-BSD

    Signed-off-by: Bruno Randolf
    Signed-off-by: John W. Linville

    Bruno Randolf
     

08 May, 2008

2 commits


14 Apr, 2008

1 commit


09 Apr, 2008

1 commit

  • If print_mac() is used inside of a pr_debug() the compiler
    can't see that the call is redundant so still performs it
    even of pr_debug() ends up being a nop.

    So don't use print_mac() in such cases in hot code paths,
    use MAC_FMT et al. instead.

    As noted by Joe Perches, pr_debug() could be modified to
    handle this better, but that is a change to an interface
    used by the entire kernel and thus needs to be validated
    carefully. This here is thus the less risky fix for
    2.6.25

    Signed-off-by: David S. Miller

    David S. Miller
     

14 Mar, 2008

1 commit


06 Mar, 2008

1 commit


29 Jan, 2008

9 commits


30 Nov, 2007

2 commits


21 Nov, 2007

1 commit

  • if (net_ratelimit())
    IEEE80211_DEBUG_DROP(...)

    can pollute the logs with messages like:

    printk: 1 messages suppressed.
    printk: 2 messages suppressed.
    printk: 7 messages suppressed.

    if debugging information is disabled. These messages are printed by
    net_ratelimit(). Add a wrapper to net_ratelimit() that takes into account
    the log level, so that net_ratelimit() is called only when we really want
    to print something.

    Signed-off-by: Guillaume Chazarain
    Signed-off-by: John W. Linville

    Guillaume Chazarain
     

11 Nov, 2007

1 commit

  • The MLME request reason code is host-endian and our passing
    it to the low level functions is host-endian as well since
    they do the swapping. I noticed that the reason code 768 was
    sent (0x300) rather than 3 when wpa_supplicant terminates.
    This removes the superfluous cpu_to_le16() call.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

07 Nov, 2007

1 commit


02 Nov, 2007

1 commit


24 Oct, 2007

3 commits

  • Most drivers need to set length and offset as well, so may as well fold
    those three lines into one.

    Add sg_assign_page() for those two locations that only needed to set
    the page, where the offset/length is set outside of the function context.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Jens Axboe

    Geert Uytterhoeven
     
  • Commits

    58b053e4ce9d2fc3023645c1b96e537c72aa8d9a ("Update arch/ to use sg helpers")
    45711f1af6eff1a6d010703b4862e0d2b9afd056 ("[SG] Update drivers to use sg helpers")
    fa05f1286be25a8ce915c5dd492aea61126b3f33 ("Update net/ to use sg helpers")

    converted many files to use the scatter gather helpers without ensuring
    that the necessary headerfile is included. This
    happened to work for ia64, powerpc, sparc64 and x86 because they
    happened to drag in that file via their .

    On most of the others this probably broke.

    Instead of increasing the header file spider web I choose to include
    directly into the affectes files.

    Signed-off-by: Ralf Baechle
    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     

23 Oct, 2007

1 commit


20 Oct, 2007

1 commit


17 Oct, 2007

1 commit


11 Oct, 2007

4 commits

  • It seems I was actually able to hit this deadlock, on my quad G5 softmac
    locks up more often than not. This fixes it by using an own workqueue
    that can safely be flushed under RTNL.

    Not sure if the patch is correct with the workqueue naming. And don't
    think with the patch it doesn't continually lock up. It still does, just
    doesn't invoke lockdep warnings all the time.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • This is nicer than the MAC_FMT stuff.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • This patch makes /proc/net per network namespace. It modifies the global
    variables proc_net and proc_net_stat to be per network namespace.
    The proc_net file helpers are modified to take a network namespace argument,
    and all of their callers are fixed to pass &init_net for that argument.
    This ensures that all of the /proc/net files are only visible and
    usable in the initial network namespace until the code behind them
    has been updated to be handle multiple network namespaces.

    Making /proc/net per namespace is necessary as at least some files
    in /proc/net depend upon the set of network devices which is per
    network namespace, and even more files in /proc/net have contents
    that are relevant to a single network namespace.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • Hopefully captured all single statement cases under net/. I'm
    not too sure if there is some policy about #includes that are
    "guaranteed" (ie., in the current tree) to be available through
    some other #included header, so I just added linux/kernel.h to
    each changed file that didn't #include it previously.

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     

04 Oct, 2007

1 commit


03 Oct, 2007

1 commit

  • CC net/ieee80211/softmac/ieee80211softmac_wx.o
    /home/kernel/src/net/ieee80211/softmac/ieee80211softmac_wx.c: In function ‘ieee80211softmac_wx_set_essid’:
    /home/kernel/src/net/ieee80211/softmac/ieee80211softmac_wx.c:117: warning: label ‘out’ defined but not used

    due to commit: efe870f9f4ad74410a18ecbf0d9ba7c14b50a0fb. Removing the label.

    Signed-off-by: Richard Knutsson
    Signed-off-by: John W. Linville

    Richard Knutsson
     

02 Oct, 2007

1 commit

  • Reported by Chris Evans :

    > The summary is that an evil 80211 frame can crash out a victim's
    > machine. It only applies to drivers using the 80211 wireless code, and
    > only then to certain drivers (and even then depends on a card's
    > firmware not dropping a dubious packet). I must confess I'm not
    > keeping track of Linux wireless support, and the different protocol
    > stacks etc.
    >
    > Details are as follows:
    >
    > ieee80211_rx() does not explicitly check that "skb->len >= hdrlen".
    > There are other skb->len checks, but not enough to prevent a subtle
    > off-by-two error if the frame has the IEEE80211_STYPE_QOS_DATA flag
    > set.
    >
    > This leads to integer underflow and crash here:
    >
    > if (frag != 0)
    > flen -= hdrlen;
    >
    > (flen is subsequently used as a memcpy length parameter).

    How about this?

    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    John W. Linville
     

21 Sep, 2007

1 commit

  • Commit 4cf92a3c was submitted as a fix for bug #8686 at bugzilla.kernel.org
    (http://bugzilla.kernel.org/show_bug.cgi?id=8686). Unfortunately, the fix led to
    a new bug, reported by Yoshifuji Hideaki, that prevented association for WEP
    encrypted networks that use ifconfig to control the device. This patch effectively
    reverts the earlier commit and does a proper fix for bug #8686.

    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville

    Larry Finger
     

07 Aug, 2007

1 commit


18 Jul, 2007

1 commit