13 Jan, 2012

1 commit

  • commit a9b3cd7f32 (rcu: convert uses of rcu_assign_pointer(x, NULL) to
    RCU_INIT_POINTER) did a lot of incorrect changes, since it did a
    complete conversion of rcu_assign_pointer(x, y) to RCU_INIT_POINTER(x,
    y).

    We miss needed barriers, even on x86, when y is not NULL.

    Signed-off-by: Eric Dumazet
    CC: Stephen Hemminger
    CC: Paul E. McKenney
    Signed-off-by: David S. Miller

    Eric Dumazet
     

16 Dec, 2011

2 commits

  • In order to notify drivers and simplify the station
    management code, defer IBSS station insertion to a
    work item and don't do it directly while receiving
    a frame.

    This increases the complexity in IBSS a little bit,
    but it's pretty straight forward and it allows us
    to reduce the station management complexity (next
    patch) considerably.

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

    Johannes Berg
     
  • Station entries can have various states, the most
    important ones being auth, assoc and authorized.
    This patch prepares us for telling the driver about
    these states, we don't want to confuse drivers with
    strange transitions, so with this we enforce that
    they move in the right order between them (back and
    forth); some transitions might happen before the
    driver even knows about the station, but at least
    runtime transitions will be ordered correctly.

    As a consequence, IBSS and MESH stations will now
    have the ASSOC flag set (so they can transition to
    AUTHORIZED), and we can get rid of a special case
    in TX processing.

    When freeing a station, unwind the state so that
    other parts of the code (or drivers later) can rely
    on the transitions.

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

    Johannes Berg
     

15 Dec, 2011

1 commit


14 Dec, 2011

1 commit


07 Dec, 2011

2 commits

  • The HT mode is set by iw (previous patchsets).
    The interface is set into the specified HT mode.
    HT mode and capabilities are announced in beacons.

    If we add a station that uses HT also, the fastest matching HT mode will
    be used for transmission. That means if we are using HT40+ and we add a station
    running on HT40-, we would transfer at HT20.

    If we join an IBSS with HT40, but the secondary channel is not
    available, we will fall back into HT20 as well.

    Allow frame aggregation to start in IBSS mode.

    Signed-off-by: Alexander Simon
    [siwu@hrz.tu-chemnitz.de: Updates]
    * remove implicit channel_type enum assumptions
    * use rate_control_rate_init() if channel type changed
    * remove channel flags check
    * activate HT IBSS feature support
    * slightly reword commit message
    * rebase on wireless-testing

    Signed-off-by: Simon Wunderlich
    Signed-off-by: Mathias Kretschmer
    Reviewed-by: Johannes Berg
    Signed-off-by: John W. Linville

    Alexander Simon
     
  • * Follow 802.11n-2009 9.13.3.1 for protection mode and ADDBA
    * Send ADDBA only to HT STAs - implement 11.5.1.1 partially

    Signed-off-by: Simon Wunderlich
    Signed-off-by: Mathias Kretschmer
    Reviewed-by: Johannes Berg
    Signed-off-by: John W. Linville

    Simon Wunderlich
     

12 Nov, 2011

1 commit


12 Oct, 2011

1 commit


01 Oct, 2011

2 commits


28 Sep, 2011

1 commit


21 Sep, 2011

1 commit


02 Aug, 2011

1 commit

  • When assigning a NULL value to an RCU protected pointer, no barrier
    is needed. The rcu_assign_pointer, used to handle that but will soon
    change to not handle the special case.

    Convert all rcu_assign_pointer of NULL value.

    //smpl
    @@ expression P; @@

    - rcu_assign_pointer(P, NULL)
    + RCU_INIT_POINTER(P, NULL)

    //

    Signed-off-by: Stephen Hemminger
    Acked-by: Paul E. McKenney
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

09 Jun, 2011

1 commit

  • Ignacy reports that sometimes after leaving an IBSS
    joining a new one didn't work because there still
    were stations on the list. He fixed it by flushing
    stations when attempting to join a new IBSS, but
    this shouldn't be happening in the first case. When
    I looked into it I saw a race condition in teardown
    that could cause stations to be added after flush,
    and thus cause this situation. Ignacy confirms that
    after applying my patch he hasn't seen this happen
    again.

    Reported-by: Ignacy Gawedzki
    Debugged-by: Ignacy Gawedzki
    Tested-by: Ignacy Gawedzki
    Cc: stable@kernel.org
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

17 May, 2011

1 commit

  • This adds sparse RCU annotations to most of
    mac80211, only the mesh code remains to be
    done.

    Due the the previous patches, the annotations
    are pretty simple. The only thing that this
    actually changes is removing the RCU usage of
    key->sta in debugfs since this pointer isn't
    actually an RCU-managed pointer (it only has
    a single assignment done before the key even
    goes live). As that is otherwise harmless, I
    decided to make it part of this patch.

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

    Johannes Berg
     

27 Apr, 2011

1 commit

  • These warnings are exposed by gcc 4.6.
    net/mac80211/sta_info.c: In function 'sta_info_cleanup_expire_buffered':
    net/mac80211/sta_info.c:590:32: warning: variable 'sdata' set but not used
    net/mac80211/ibss.c: In function 'ieee80211_rx_mgmt_auth_ibss':
    net/mac80211/ibss.c:43:34: warning: variable 'status_code' set but not used
    net/mac80211/work.c: In function 'ieee80211_send_assoc':
    net/mac80211/work.c:203:9: warning: variable 'len' set but not used
    net/mac80211/tx.c: In function '__ieee80211_parse_tx_radiotap':
    net/mac80211/tx.c:1039:35: warning: variable 'sband' set but not used
    net/mac80211/mesh.c: In function 'ieee80211_mesh_rx_queued_mgmt':
    net/mac80211/mesh.c:616:28: warning: variable 'ifmsh' set but not used
    ...

    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     

05 Apr, 2011

1 commit

  • The commit "mac80211: reply to directed probes in IBSS" changed ad-hoc
    specific code to respond to unicast probe requests, even if
    drv_tx_last_beacon returns false, however due to confusion over the
    meaning of the IEEE80211_RX_RA_MATCH flag, it also unconditionally
    enabled responding to multicast probe requests.
    Fix this by explicitly checking for a multicast destination address
    instead.

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

    Felix Fietkau
     

26 Feb, 2011

1 commit

  • This reverts 4a332a38
    ("mac80211: Give it some time to do the TSF sync").

    There's no point in waiting with a new IBSS merge
    just because the hardware hasn't merged up with
    the old IBSS yet, and since 34e8f082 we no longer
    attempt to merge with the IBSS we're already in.

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

    Johannes Berg
     

24 Feb, 2011

1 commit

  • The flag isn't very descriptive -- the intention
    is that the driver provides a TSF timestamp at
    the beginning of the MPDU -- make that clearer
    by renaming the flag to RX_FLAG_MACTIME_MPDU.

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

    Johannes Berg
     

15 Feb, 2011

1 commit


22 Jan, 2011

1 commit

  • Extend channel to frequency mapping for 802.11j Japan 4.9GHz band, according to
    IEEE802.11 section 17.3.8.3.2 and Annex J. Because there are now overlapping
    channel numbers in the 2GHz and 5GHz band we can't map from channel to
    frequency without knowing the band. This is no problem as in most contexts we
    know the band. In places where we don't know the band (and WEXT compatibility)
    we assume the 2GHz band for channels below 14.

    This patch does not implement all channel to frequency mappings defined in
    802.11, it's just an extension for 802.11j 20MHz channels. 5MHz and 10MHz
    channels as well as 802.11y channels have been omitted.

    The following drivers have been updated to reflect the API changes:
    iwl-3945, iwl-agn, iwmc3200wifi, libertas, mwl8k, rt2x00, wl1251, wl12xx.
    The drivers have been compile-tested only.

    Signed-off-by: Bruno Randolf
    Signed-off-by: Brian Prodoehl
    Acked-by: Luciano Coelho
    Signed-off-by: John W. Linville

    Bruno Randolf
     

18 Dec, 2010

1 commit


14 Dec, 2010

1 commit

  • dev_open will eventually call ieee80211_ibss_join which sets up the
    skb used for beacons/probe-responses however it is possible to
    receive beacons that attempt to merge before this occurs causing
    a null pointer dereference. Check ssid_len as that is the last
    thing set in ieee80211_ibss_join.

    This occurs quite easily in the presence of adhoc nodes with hidden SSID's

    revised previous patch to check further up based on irc feedback

    Signed-off-by: Tim Harvey
    Reviewed-by: Johannes Berg
    Signed-off-by: John W. Linville

    Tim Harvey
     

25 Nov, 2010

1 commit


17 Nov, 2010

1 commit


26 Oct, 2010

1 commit


06 Oct, 2010

1 commit


26 Aug, 2010

1 commit


17 Aug, 2010

1 commit


22 Jul, 2010

2 commits

  • IBSS has never had locking, instead relying on some
    memory barriers etc. That's hard to get right, and
    I think we had it wrong too until the previous patch.
    Since this is not performance sensitive, it doesn't
    make sense to have the maintenance overhead of that,
    so add proper locking.

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

    Johannes Berg
     
  • Bob reported a lockdep complaint originating in
    the mac80211 IBSS code due to the common work
    struct patch. The reason is that the IBSS and
    station mode code have different locking orders
    for the cfg80211 wdev lock and the work struct
    (where "locking" implies running/canceling).

    Fix this by simply not canceling the work in
    the IBSS code, it is not necessary since when
    the REQ_RUN bit is cleared, the work will run
    without effect if it runs. When the interface
    is set down, it is flushed anyway, so there's
    no concern about it running after memory has
    been invalidated either.

    This fixes
    https://bugzilla.kernel.org/show_bug.cgi?id=16419

    Additionally, looking into this I noticed that
    there's a small window while the IBSS is torn
    down in which the work may be rescheduled and
    the REQ_RUN bit be set again after leave() has
    cleared it when a scan finishes at exactly the
    same time. Avoid that by setting the ssid_len
    to zero before clearing REQ_RUN which signals
    to the scan finish code that this interface is
    not active.

    Reported-by: Bob Copeland
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

15 Jun, 2010

8 commits

  • Remove BSS from cfg80211 BSS list if we are only member in IBSS when
    leaving it.

    Signed-off-by: Teemu Paasikivi
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Teemu Paasikivi
     
  • Add changed basic rates flag to bss_changed while joinig ibss network.

    This patch is split from the patch containing support for setting basic
    rates when creating ibss network. Original patch was posted by Johannes
    Berg on the linux-wireless posting list.

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

    Teemu Paasikivi
     
  • This patch adds support to nl80211 and mac80211 to set basic rates when
    joining/creating ibss network.

    Original patch was posted by Johannes Berg on the linux-wireless posting list.

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

    Teemu Paasikivi
     
  • Some code is duplicated between ibss, mesh and
    managed mode regarding the queueing of management
    frames. Since all modes now use a common skb
    queue and a common work function, we can pull
    the queueing code into the rx handler directly
    and remove the duplicated length checks etc.

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

    Johannes Berg
     
  • All the management processing functions free the
    skb after they are done, so this can be done in
    the new common code instead.

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

    Johannes Berg
     
  • Even with the previous patch, IBSS, managed
    and mesh modes all attach their own work
    function to the shared work struct, which
    means some duplicated code. Change that to
    only have a frame processing function and a
    further work function for each of them and
    share some common code.

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

    Johannes Berg
     
  • IBSS, managed and mesh modes all have their
    own work struct, and in the future we want
    to also use it in other modes to process
    frames from the now common skb queue.

    This also makes the skb queue and work safe
    to use from other interface types.

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

    Johannes Berg
     
  • IBSS, managed and mesh modes all have an
    skb queue, and in the future we want to
    also use it in other modes, so make them
    all use a common skb queue already.

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

    Johannes Berg