30 Dec, 2009

1 commit


29 Dec, 2009

3 commits

  • mac80211 does not propagate failed hardware reconfiguration
    requests. For suspend and resume this is important due to all
    the possible issues that can come out of the suspend resume
    cycle. Not propagating the error means cfg80211 will assume
    the resume for the device went through fine and mac80211 will
    continue on trying to poke at the hardware, enable timers,
    queue work, and so on for a device which is completley
    unfunctional.

    The least we can do is to propagate device start issues and
    warn when this occurs upon resume. A side effect of this patch
    is we also now propagate the start errors upon harware
    reconfigurations (non-suspend), but this should also be desirable
    anyway, there is not point in continuing to reconfigure a
    device if mac80211 was unable to start the device.

    For further details refer to the thread:

    http://marc.info/?t=126151038700001&r=1&w=2

    Cc: stable@kernel.org
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • When mac80211 suspends it calls a driver's suspend callback
    as a last step and after that the driver assumes no calls will
    be made to it until we resume and its start callback is kicked.
    If such calls are made, however, suspend can end up throwing
    hardware in an unexpected state and making the device unusable
    upon resume.

    Fix this by preventing mac80211 to schedule dynamic_ps_disable_work
    by checking for when mac80211 starts to suspend and starts
    quiescing. Frames should be allowed to go through though as
    that is part of the quiescing steps and we do not flush the
    mac80211 workqueue since it was already done towards the
    beginning of suspend cycle.

    The other mac80211 issue will be hanled in the next patch.

    For further details see refer to the thread:

    http://marc.info/?t=126144866100001&r=1&w=2

    Cc: stable@kernel.org
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • When fixed bssid is requested when joining an ibss network, incoming
    beacons that match the configured bssid cause mac80211 to create new
    sta entries, even before the ibss interface is in joined state.
    When that happens, it fails to bring up the interface entirely, because
    it checks for existing sta entries before joining.
    This patch fixes this bug by refusing to create sta info entries before
    the interface is fully operational.

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     

22 Dec, 2009

3 commits

  • David S. Miller
     
  • My
    commit 77fdaa12cea26c204cc12c312fe40bc0f3dcdfd8
    Author: Johannes Berg
    Date: Tue Jul 7 03:45:17 2009 +0200

    mac80211: rework MLME for multiple authentications

    inadvertedly broke WMM because it removed, along with
    a bunch of other now useless initialisations, the line
    initialising sdata->u.mgd.wmm_last_param_set to -1
    which would make it adopt any WMM parameter set. If,
    as is usually the case, the AP uses WMM parameter set
    sequence number zero, we'd never update it until the
    AP changes the sequence number.

    Add the missing initialisation back to get the WMM
    settings from the AP applied locally.

    Signed-off-by: Johannes Berg
    Cc: stable@kernel.org [2.6.31+]
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • I noticed yesterday, because Jeff had noticed
    a speed regression, cf. bug
    http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2138
    that the SM PS settings for peers were wrong.
    Instead of overwriting the SM PS settings with
    the local bits, we need to keep the remote bits.

    The bug was part of the original HT code from
    over two years ago, but unfortunately nobody
    noticed that it makes no sense -- we shouldn't
    be overwriting the peer's setting with our own
    but rather keep it intact when masking the peer
    capabilities with our own.

    While fixing that, I noticed that the masking of
    capabilities is completely useless for most of
    the bits, so also fix those other bits.

    Finally, I also noticed that PSMP_SUPPORT no
    longer exists in the final 802.11n version, so
    also remove that.

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

    Johannes Berg
     

15 Dec, 2009

1 commit


12 Dec, 2009

1 commit


11 Dec, 2009

3 commits

  • The patch ("mac80211: Use correct sign for mesh active path
    refresh.") was actually a bug. Reverted it and improved the
    explanation of how mesh path refresh works.

    Signed-off-by: Javier Cardona
    Signed-off-by: Andrey Yurovsky
    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    Javier Cardona
     
  • Paths to mesh portals were being timed out immediately after each use in
    intermediate forwarding nodes. mppath->exp_time is set to the expiration time
    so assigning it to jiffies was marking the path as expired.

    Signed-off-by: Javier Cardona
    Signed-off-by: Andrey Yurovsky
    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    Javier Cardona
     
  • Memset should be given the size of the structure, not the size of the pointer.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    type T;
    T *x;
    expression E;
    @@

    memset(x, E, sizeof(
    + *
    x))
    //

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

    Julia Lawall
     

10 Dec, 2009

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
    tree-wide: fix misspelling of "definition" in comments
    reiserfs: fix misspelling of "journaled"
    doc: Fix a typo in slub.txt.
    inotify: remove superfluous return code check
    hdlc: spelling fix in find_pvc() comment
    doc: fix regulator docs cut-and-pasteism
    mtd: Fix comment in Kconfig
    doc: Fix IRQ chip docs
    tree-wide: fix assorted typos all over the place
    drivers/ata/libata-sff.c: comment spelling fixes
    fix typos/grammos in Documentation/edac.txt
    sysctl: add missing comments
    fs/debugfs/inode.c: fix comment typos
    sgivwfb: Make use of ARRAY_SIZE.
    sky2: fix sky2_link_down copy/paste comment error
    tree-wide: fix typos "couter" -> "counter"
    tree-wide: fix typos "offest" -> "offset"
    fix kerneldoc for set_irq_msi()
    spidev: fix double "of of" in comment
    comment typo fix: sybsystem -> subsystem
    ...

    Linus Torvalds
     
  • This part was missed in "cfg80211: implement get_wireless_stats",
    probably because sta_set_sinfo already existed and was only handling
    dBm signals.

    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    John W. Linville
     

08 Dec, 2009

4 commits

  • On a 32-bit machine, BIT() macro does not give the required
    bit value if the bit is mroe than 31. In ieee802_11_parse_elems_crc(),
    BIT() is suppossed to get the bit value more than 31 (42 (id of ERP_INFO_IE),
    37 (CHANNEL_SWITCH_IE), (42), 32 (POWER_CONSTRAINT_IE), 45 (HT_CAP_IE),
    61 (HT_INFO_IE)). As we do not get the required bit value for the above
    IEs, crc over these IEs are never calculated, so any dynamic change in these
    IEs after the association is not really handled on 32-bit platforms.
    This patch fixes this issue.

    Cc: stable@kernel.org
    Signed-off-by: Vasanthakumar Thiagarajan
    Signed-off-by: John W. Linville

    Vasanthakumar Thiagarajan
     
  • Not only ps_sdata but also IEEE80211_CONF_PS is to be considered
    before restoring PS in scan_ps_disable(). For instance, when ps_sdata
    is set but CONF_PS is not set just because the dynamic timer is still
    running, a sw scan leads to setting of CONF_PS in scan_ps_disable
    instead of restarting the dynamic PS timer.
    Also for the above case, a null data frame is to be sent after
    returning to operating channel which was not happening with the
    current implementation. This patch fixes this too.

    Signed-off-by: Vivek Natarajan
    Reviewed-by: Kalle Valo
    Signed-off-by: John W. Linville

    Vivek Natarajan
     
  • hwsim testing has revealed that when the MLME
    recalculates the idle state of the device, it
    sometimes does so before sending the final
    deauthentication or disassociation frame. This
    patch changes the place where the idle state
    is recalculated, but of course driver transmit
    is typically asynchronous while configuration
    is expected to be synchronous, so it doesn't
    fix all possible cases yet.

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

    Johannes Berg
     
  • Conflicts:

    kernel/irq/chip.c

    Jiri Kosina
     

05 Dec, 2009

3 commits

  • My patch "mac80211: correctly place aMPDU RX reorder code"
    uses an skb queue for MPDUs that were released from the
    buffer. I intentially didn't initialise and use the skb
    queue's spinlock, but in this place forgot that the code
    variant that doesn't touch the spinlock is needed.

    Thanks to Christian Lamparter for quickly spotting the
    bug in the backtrace Reinette reported.

    Reported-by: Reinette Chatre
    Bug-identified-by: Christian Lamparter
    Tested-by: Reinette Chatre
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • David S. Miller
     
  • An earlier optimization on removing unnecessary traffic on cooked
    monitor interfaces ("mac80211: reduce the amount of unnecessary traffic
    on cooked monitor interfaces ") ended up removing quite a bit more
    than just unnecessary traffic. It was not supposed to remove TX status
    reporting for injected frames, but ended up doing it by checking the
    injected flag in skb->cb only after that field had been cleared with
    memset.. Fix this by taking a local copy of the injected flag before
    skb->cb is cleared.

    This broke user space applications that depend on getting TX status
    notifications for injected data frames. For example, STA inactivity
    poll from hostapd did not work and ended up kicking out stations even
    if they were still present.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     

04 Dec, 2009

1 commit

  • That is "success", "unknown", "through", "performance", "[re|un]mapping"
    , "access", "default", "reasonable", "[con]currently", "temperature"
    , "channel", "[un]used", "application", "example","hierarchy", "therefore"
    , "[over|under]flow", "contiguous", "threshold", "enough" and others.

    Signed-off-by: André Goddard Rosa
    Signed-off-by: Jiri Kosina

    André Goddard Rosa
     

02 Dec, 2009

1 commit


01 Dec, 2009

2 commits

  • Lennert Buytenhek noticed that delBA handling in mac80211
    was broken and has remotely triggerable problems, some of
    which are due to some code shuffling I did that ended up
    changing the order in which things were done -- this was

    commit d75636ef9c1af224f1097941879d5a8db7cd04e5
    Author: Johannes Berg
    Date: Tue Feb 10 21:25:53 2009 +0100

    mac80211: RX aggregation: clean up stop session

    and other parts were already present in the original

    commit d92684e66091c0f0101819619b315b4bb8b5bcc5
    Author: Ron Rindjunsky
    Date: Mon Jan 28 14:07:22 2008 +0200

    mac80211: A-MPDU Tx add delBA from recipient support

    The first problem is that I moved a BUG_ON before various
    checks -- thereby making it possible to hit. As the comment
    indicates, the BUG_ON can be removed since the ampdu_action
    callback must already exist when the state is != IDLE.

    The second problem isn't easily exploitable but there's a
    race condition due to unconditionally setting the state to
    OPERATIONAL when a delBA frame is received, even when no
    aggregation session was ever initiated. All the drivers
    accept stopping the session even then, but that opens a
    race window where crashes could happen before the driver
    accepts it. Right now, a WARN_ON may happen with non-HT
    drivers, while the race opens only for HT drivers.

    For this case, there are two things necessary to fix it:
    1) don't process spurious delBA frames, and be more careful
    about the session state; don't drop the lock

    2) HT drivers need to be prepared to handle a session stop
    even before the session was really started -- this is
    true for all drivers (that support aggregation) but
    iwlwifi which can be fixed easily. The other HT drivers
    (ath9k and ar9170) are behaving properly already.

    Reported-by: Lennert Buytenhek
    Cc: stable@kernel.org
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Lennert Buytenhek noticed a remotely triggerable problem
    in mac80211, which is due to some code shuffling I did
    that ended up changing the order in which things were
    done -- this was in

    commit d75636ef9c1af224f1097941879d5a8db7cd04e5
    Author: Johannes Berg
    Date: Tue Feb 10 21:25:53 2009 +0100

    mac80211: RX aggregation: clean up stop session

    The problem is that the BUG_ON moved before the various
    checks, and as such can be triggered.

    As the comment indicates, the BUG_ON can be removed since
    the ampdu_action callback must already exist when the
    state is OPERATIONAL.

    A similar code path leads to a WARN_ON in
    ieee80211_stop_tx_ba_session, which can also be removed.

    Cc: stable@kernel.org [2.6.29+]
    Cc: Lennert Buytenhek
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

30 Nov, 2009

1 commit


29 Nov, 2009

5 commits

  • Conflicts:
    drivers/ieee802154/fakehard.c
    drivers/net/e1000e/ich8lan.c
    drivers/net/e1000e/phy.c
    drivers/net/netxen/netxen_nic_init.c
    drivers/net/wireless/ath/ath9k/main.c

    David S. Miller
     
  • Enable logging of more configuration data when tracing
    is enabled. Except for the channel frequency this is
    only useful with the binary trace format, but that can
    be recorded and replayed with trace-cmd and I will be
    working on a plugin that reports all the information.

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

    Johannes Berg
     
  • As indicated by the comment, the aMPDU RX reorder code
    should logically be after ieee80211_rx_h_check(). The
    previous patch moved the code there, and this patch now
    hooks it up in that place by introducing a list of skbs
    that are then processed by the remaining handlers. The
    list may be empty if the function is buffering the skb
    to release it later.

    The only change needed to the RX data is that the crypto
    handler needs to clear the key that may be set from a
    previous loop iteration, and that not everything can be
    in the rx flags now.

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

    Johannes Berg
     
  • This code should be part of RX handlers, so move it
    to the place where it belongs without changing it.
    A follow-up patch will do the changes to hook it up.
    The sole purpose of this code move is to make the
    other patch readable, it doesn't change the code at
    all except that it now requires a different static
    function declaration (which will go away too).

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

    Johannes Berg
     
  • The RX flags should soon be used only for flags
    that cannot change within an a-MPDU, so move the
    cooked monitor flag into the RX status flags.

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

    Johannes Berg
     

26 Nov, 2009

1 commit


25 Nov, 2009

1 commit


24 Nov, 2009

4 commits


20 Nov, 2009

3 commits

  • Signed-off-by: Rui Paulo
    Signed-off-by: John W. Linville

    Rui Paulo
     
  • This is sometimes useful to debug HT issues
    as it shows what exactly the stack thinks
    the peer supports.

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

    Johannes Berg
     
  • With WEXT, it happens frequently that the SME
    requests an authentication but then deauthenticates
    right away because some new parameters came along.
    Every time this happens we print a deauth message
    and send a deauth frame, but both of that is rather
    confusing. Avoid it by aborting the authentication
    process silently, and telling cfg80211 about that.

    The patch looks larger than it really is:
    __cfg80211_auth_remove() is split out from
    cfg80211_send_auth_timeout(), there's no new code
    except __cfg80211_auth_canceled() (a one-liner) and
    the mac80211 bits (7 new lines of code).

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

    Johannes Berg