21 May, 2009

1 commit

  • We forgot to cancel all timers in mac80211 when suspending.
    In particular we forgot to deal with some things that can
    cause hardware reconfiguration -- while it is down.

    While at it we go ahead and add a warning in ieee80211_sta_work()
    if its run while the suspend->resume cycle is in effect. This
    should not happen and if it does it would indicate there is
    a bug lurking in either mac80211 or mac80211 drivers.

    With this now wpa_supplicant doesn't blink when I go to suspend
    and resume where as before there where issues with some timers
    running during the suspend->resume cycle. This caused a lot of
    incorrect assumptions and would at times bring back the device
    in an incoherent, but mostly recoverable, state.

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

30 Jan, 2009

3 commits


13 Jan, 2009

1 commit

  • This patch fixes a panic that might occur, if the device is part of a mesh
    and tries to send with a higher rate index than "0".

    kernel BUG at net/mac80211/rate.c:239!
    invalid opcode: 0000 [#1] SMP
    [...]
    Call Trace:
    ? invoke_tx_handlers+0x474/0xb57 [mac80211]
    ? __ieee80211_tx_prepare+0x260/0x2a8 [mac80211]
    ? ieee80211_master_start_xmit+0x300/0x43a [mac80211]
    ? __qdisc_run+0xde/0x1da
    ? net_tx_action+0xb4/0x102
    Kernel panic - not syncing: Fatal exception in interrupt

    Signed-off-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Christian Lamparter
     

28 Oct, 2008

1 commit


16 Sep, 2008

3 commits

  • As more preparation for a saner rate control algorithm API,
    share the supported rates bitmap in the public API.

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

    Johannes Berg
     
  • This patch changes mac80211 to share some more data about
    stations with drivers. Should help iwlwifi and ath9k when
    they get around to updating, and might also help with
    implementing rate control algorithms without internals.

    Signed-off-by: Johannes Berg
    Cc: Sujith Manoharan
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • This patch splits off mesh handling from the STA/IBSS.
    Unfortunately it increases mesh code size a bit, but I
    think it makes things clearer. The patch also reduces
    per-interface run-time memory usage.

    Also clean up a few places where ifdef is not required.

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

    Johannes Berg
     

12 Sep, 2008

2 commits

  • The ieee80211_sta_tx function isn't MLME code any more,
    it's getting used by a lot of code. Move it to utils and
    rename it to ieee80211_tx_skb.

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

    Johannes Berg
     
  • The action frame length checks are one too small, there's not just
    an action code as the comment makes you believe, there's a category
    code too, and the category code is required in each action frame
    (hence part of IEEE80211_MIN_ACTION_SIZE).

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

    Johannes Berg
     

23 Aug, 2008

2 commits

  • This patch replaces net_device arguments to mac80211 internal functions
    with ieee80211_{local,sub_if_data} as appropriate.

    It also does the same for many 802.11s mesh functions, and changes the
    mesh path table to be indexed on sub_if_data rather than net_device.

    If the mesh part needs to be a separate patch let me know, but since
    mesh uses a lot of mac80211 functions which were being converted anyway,
    the changes go hand-in-hand somewhat.

    This patch probably does not convert all the functions which could be
    converted, but it is a large chunk and followup patches will be
    provided.

    Signed-off-by: Jasper Bryant-Greene
    Signed-off-by: John W. Linville

    Jasper Bryant-Greene
     
  • Signed-off-by: Harvey Harrison
    Signed-off-by: John W. Linville

    Harvey Harrison
     

15 May, 2008

1 commit

  • As discussed earlier, we can unify locking in struct sta_info
    and use just a single spinlock protecting all members of the
    structure that need protection. Many don't, but one of the
    especially bad ones is the 'flags' member that can currently
    be clobbered when RX and TX is being processed on different
    CPUs at the same time.

    Because having four spinlocks for different, mostly exclusive
    parts of a single structure is overkill, this patch also kills
    the ampdu and mesh plink spinlocks and uses just a single one
    for everything. Because none of the spinlocks are nested, this
    is safe.

    It remains to be seen whether or not we should make the sta
    flags use atomic bit operations instead, for now though this
    is a safe thing and using atomic operations instead will be
    very simple using the new static inline functions this patch
    introduces for accessing sta->flags.

    Since spin_lock_bh() is used with this lock, there shouldn't
    be any contention even if aggregation is enabled at around the
    same time as both requires frame transmission/reception which
    is in a bh context.

    Signed-off-by: Johannes Berg
    Cc: Tomas Winkler
    Cc: Ron Rindjunsky
    Cc: Luis Carlos Cobo
    Signed-off-by: John W. Linville

    Johannes Berg
     

09 Apr, 2008

2 commits

  • This patch renames all mac80211 files (except ieee80211_i.h) to get rid
    of the useless ieee80211_ prefix.

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

    Johannes Berg
     
  • Really doesn't need to be defined four times.

    Also, while at it, remove a useless macro (IEEE80211_ALIGN32_PAD)
    and a function prototype for a function we don't actually have
    (ieee80211_set_compression.)

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

    Johannes Berg
     

02 Apr, 2008

1 commit

  • When STA structure insertion fails, it has been allocated but isn't
    really alive yet, it isn't reachable by any other code and also can't
    yet have much configured. This patch changes the code so that when
    the insertion fails, the resulting STA pointer is no longer valid
    because it is freed.

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

    Johannes Berg
     

07 Mar, 2008

10 commits

  • Signed-off-by: Luis Carlos Cobo
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Luis Carlos Cobo
     
  • Signed-off-by: Luis Carlos Cobo
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Luis Carlos Cobo
     
  • This patch fixes all the mesh related endianness warnings reported by sparse. As
    they were the reason why Johannes marked mesh as BROKEN, that flag has been
    removed.

    Signed-off-by: Luis Carlos Cobo
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Luis Carlos Cobo
     
  • I noticed a bug I introduced when mesh is enabled: sta_info_destroy()
    will end up calling cancel_timer() on a timer that has never been
    initialized because the timer is only initialized in mesh_plink_alloc(),
    not in sta_info_alloc(). This patch moves the initialization of all mesh
    related fields into sta_info_alloc(), adds a bit of sanity checking to
    the cfg80211 handlers and sta_info_insert() and makes mesh_plink_alloc()
    a static helper function that is only used from the mesh plink code.

    Signed-off-by: Johannes Berg
    Cc: Luis Carlos Cobo
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • sta_info_add() has two functions: allocating a station info
    structure and inserting it into the hash table/list. Splitting
    these two functions allows allocating with GFP_KERNEL in many
    places instead of GFP_ATOMIC which is now required by the RCU
    protection. Additionally, in many places RCU protection is now
    no longer needed at all because between sta_info_alloc() and
    sta_info_insert() the caller owns the structure.

    This fixes a few race conditions with setting initial flags
    and similar, but not all (see comments in ieee80211_sta.c and
    cfg.c). More documentation on the existing races will be in
    a follow-up patch.

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

    Johannes Berg
     
  • This makes access to the STA hash table/list use RCU to protect
    against freeing of items. However, it's not a true RCU, the
    copy step is missing: whenever somebody changes a STA item it
    is simply updated. This is an existing race condition that is
    now somewhat understandable.

    This patch also fixes the race key freeing vs. STA destruction
    by making sure that sta_info_destroy() is always called under
    RTNL and frees the key.

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

    Johannes Berg
     
  • Accidentally copied in a __mesh_plink_deactivate, noticed by Luis
    Carlos Cobo.

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

    Johannes Berg
     
  • This inserts a missing break statement which, if hit, would cause
    the code to fall-through and unlock a spinlock twice. Noticed via
    sparse's "lock count wrong in basic block" warning and careful
    code inspection.

    Signed-off-by: Johannes Berg
    Cc: Luis Carlos Cobo
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Various cleanups, reducing the #ifdef mess and other things.

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

    Johannes Berg
     
  • This file implements mesh discovery and peer link establishment support using
    the mesh peer link table provided in mesh_plinktbl.c.

    Secure peer links have not been implemented yet.

    Signed-off-by: Luis Carlos Cobo
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Luis Carlos Cobo