29 Nov, 2011

1 commit


22 Nov, 2011

2 commits


01 Oct, 2011

3 commits

  • My work and some previous work didn't add
    all the flags, add them now and while at it
    simplify the code.

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

    Johannes Berg
     
  • The flaglock in struct sta_info has long been
    something that I wanted to get rid of, this
    finally does the conversion to atomic bitops.

    The conversion itself is straight-forward in
    most places, a few things needed to change a
    bit since we can no longer use multiple bits
    at the same time.

    On x86-64, this is a fairly significant code
    size reduction:
    text data bss dec hex
    427861 23648 1008 452517 6e7a5 before
    425383 23648 976 450007 6ddd7 after

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

    Johannes Berg
     
  • For uAPSD support we'll need to have per-AC PS
    buffers. As this is a major undertaking, split
    the buffers before really adding support for
    uAPSD. This already makes some reference to the
    uapsd_queues variable, but for now that will
    never be non-zero.

    Since book-keeping is complicated, also change
    the logic for keeping a maximum of frames only
    and allow 64 frames per AC (up from 128 for a
    station).

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

    Johannes Berg
     

20 Apr, 2011

1 commit


13 Apr, 2011

1 commit


16 Dec, 2010

1 commit

  • Allow drivers or rate control algorithms to specify BlockAck session
    timeout when initiating an ADDBA transaction. This is useful in cases
    where maintaining persistent BA sessions does not incur any overhead.

    The current timeout value of 5000 TUs is retained for all non ath9k/ath9k_htc
    drivers.

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

    Sujith Manoharan
     

30 Nov, 2010

1 commit

  • The RX aggregation locking documentation was
    wrong, which led Christian to also code the
    timer timeout handling for it somewhat wrongly.

    Fix the documentation, the two places that
    need to hold the reorder lock across accesses
    to the structure, and the debugfs code that
    should just use RCU.

    Also, remove acquiring the sta->lock across
    reorder timeouts since it isn't necessary, and
    change a few places to GFP_KERNEL because the
    code path here doesn't need atomic allocations
    as I noticed when reviewing all this.

    Signed-off-by: Johannes Berg
    Acked-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Johannes Berg
     

16 Nov, 2010

1 commit


24 Oct, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits)
    bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
    vlan: Calling vlan_hwaccel_do_receive() is always valid.
    tproxy: use the interface primary IP address as a default value for --on-ip
    tproxy: added IPv6 support to the socket match
    cxgb3: function namespace cleanup
    tproxy: added IPv6 support to the TPROXY target
    tproxy: added IPv6 socket lookup function to nf_tproxy_core
    be2net: Changes to use only priority codes allowed by f/w
    tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
    tproxy: added tproxy sockopt interface in the IPV6 layer
    tproxy: added udp6_lib_lookup function
    tproxy: added const specifiers to udp lookup functions
    tproxy: split off ipv6 defragmentation to a separate module
    l2tp: small cleanup
    nf_nat: restrict ICMP translation for embedded header
    can: mcp251x: fix generation of error frames
    can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set
    can-raw: add msg_flags to distinguish local traffic
    9p: client code cleanup
    rds: make local functions/variables static
    ...

    Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and
    drivers/net/wireless/ath/ath9k/debug.c as per David

    Linus Torvalds
     

07 Oct, 2010

1 commit

  • When roaming while we have active BA session,
    we can end up transmitting delBA frames to
    the old AP while we're already on the new AP's
    channel, which can cause warnings.

    Simply avoid sending those frames, but still
    tear down the internal session state, since
    they are not really necessary anyway as we
    will implicitly disassociate when sending the
    association to the new AP.

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

    Johannes Berg
     

28 Sep, 2010

1 commit


16 Sep, 2010

1 commit

  • The default llseek operation is changing from
    default_llseek to no_llseek, so all code relying on
    the current behaviour needs to make that explicit.

    The wireless driver infrastructure and some of the drivers
    make use of generated debugfs files, so they cannot
    be converted by our script that automatically determines
    the right operation.

    All these files use debugfs and they typically rely
    on simple_read_from_buffer, so the best llseek operation
    here is generic_file_llseek.

    Signed-off-by: Arnd Bergmann
    Cc: "John W. Linville"
    Cc: linux-wireless@vger.kernel.org
    Cc: netdev@vger.kernel.org

    Arnd Bergmann
     

15 Jun, 2010

3 commits

  • When the driver or rate control requests starting
    or stopping an aggregation session, that currently
    causes a direct callback into the driver, which
    could potentially cause locking problems. Also,
    the functions need to be callable from contexts
    that cannot sleep, and thus will interfere with
    making the ampdu_action callback sleeping.

    To address these issues, add a new work item for
    each station that will process any start or stop
    requests out of line.

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

    Johannes Berg
     
  • Currently we allocate some memory for each TX
    aggregation session and additionally keep a
    state bitmap indicating the state it is in.
    By using RCU to protect the pointer, moving
    the state into the structure and some locking
    trickery we can avoid locking when the TX agg
    session is fully operational.

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

    Johannes Berg
     
  • Currently we allocate some memory for each RX
    aggregation session and additionally keep a
    flag indicating whether or not it is valid.
    By using RCU to protect the pointer and making
    sure that the memory is fully set up before it
    becomes visible to the RX path, we can remove
    the need for the bool that indicates validity,
    as well as for locking on the RX path since it
    is always synchronised against itself, and we
    can guarantee that all other modifications are
    done when the structure is not visible to the
    RX path.

    The net result is that since we remove locking
    requirements from the RX path, we can in the
    future use any kind of lock for the setup and
    teardown code paths.

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

    Johannes Berg
     

04 Jun, 2010

2 commits

  • This patch reduces the binary size by around 25k (measured on MIPS,
    with CONFIG_MAC80211_DEBUG_COUNTERS enabled).

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

    Felix Fietkau
     
  • There's no sense in letting anything but internal
    mac80211 functions set the initiator to anything
    but WLAN_BACK_INITIATOR, since WLAN_BACK_RECIPIENT
    is only valid when we have received a frame from
    the peer, which we react to directly in mac80211.

    The debugfs code I recently added got this wrong
    as well.

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

    Johannes Berg
     

04 May, 2010

1 commit

  • This allows enabling TX and disabling both TX and
    RX aggregation sessions manually in debugfs. It is
    very useful for debugging session initiation and
    teardown problems since with this you don't have
    to force a lot of traffic to get aggregation and
    thus have less data to analyse.

    Also, to debug mac80211 code itself, make hwsim
    "support" aggregation sessions. It will still just
    transfer the frame, but go through the setup and
    teardown handshakes.

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

    Johannes Berg
     

10 Apr, 2010

1 commit


08 Apr, 2010

1 commit

  • The aggregation code has a number of quirks, like
    inventing an unneeded WLAN_BACK_TIMER value and
    leaking memory under certain circumstances during
    station destruction. Fix these issues by using
    the regular aggregation session teardown code and
    blocking new aggregation sessions, all before the
    station is really destructed.

    As a side effect, this gets rid of the long code
    block to destroy aggregation safely.

    Additionally, rename tid_state_rx which can only
    have the values IDLE and OPERATIONAL to
    tid_active_rx to make it easier to understand
    that there is no bitwise stuff going on on the
    RX side -- the TX side remains because it needs
    to keep track of the driver and peer states.

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

    Johannes Berg
     

10 Mar, 2010

1 commit

  • The noise value as is won't be used, isn't
    filled by most drivers and doesn't really
    make a whole lot of sense on a per packet
    basis -- proper cfg80211 survey support in
    mac80211 will need to be different.

    Mark the struct member as deprecated so it
    will be removed from drivers.

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

    Johannes Berg
     

02 Feb, 2010

2 commits


23 Dec, 2009

3 commits

  • IEEE-802.11n spec says the RX highest data rate field does
    not specify the highest supported RX data rate if its not set.
    Ignore it if not set then. Refer to section 7.3.56.4

    Cc: johannes@sipsolutions.net
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • When debugging you want to be lazy and not have to parse
    bits yourself so let mac80211 debugfs do the parsing for you.

    This is what I get against my WRT610N:

    root@tux:~# cat /sys/kernel/debug/ieee80211/phy0/stations/00\:22\:6b\:aa\:bb\:01/ht_capa
    ht supported
    cap: 0x000e
    HT20/HT40
    SM Power Save disabled
    No RX STBC
    Max AMSDU length: 7935 bytes
    No DSSS/CCK HT40
    ampdu factor/density: 2/6
    MCS mask: ff ff 00 00 00 00 00 00 00 00
    MCS rx highest: 0
    MCS tx params: 0

    Cc: johannes@sipsolutions.net
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • The MCS set is 16 bits so when debugging ensure the full 16 bits
    are represented. Current reading would make you think its only
    8 bits.

    Cc: johannes@sipsolutions.net
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     

22 Dec, 2009

1 commit

  • For bluetooth 3, we will most likely not have
    a netdev for a virtual interface (sdata), so
    prepare for that by reducing the reliance on
    having a netdev. This patch moves the name
    and address fields into the sdata struct and
    uses them from there all over. Some work is
    needed to keep them sync'ed, but that's not
    a lot of work and in slow paths anyway.

    In doing so, this also reduces the number of
    pointer dereferences in many places, because
    of things like sdata->dev->dev_addr becoming
    sdata->vif.addr.

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

    Johannes Berg
     

20 Nov, 2009

1 commit


07 Nov, 2009

1 commit

  • Some devices require that all frames to a station
    are flushed when that station goes into powersave
    mode before being able to send frames to that
    station again when it wakes up or polls -- all in
    order to avoid reordering and too many or too few
    frames being sent to the station when it polls.

    Normally, this is the case unless the station
    goes to sleep and wakes up very quickly again.
    But in that case, frames for it may be pending
    on the hardware queues, and thus races could
    happen in the case of multiple hardware queues
    used for QoS/WMM. Normally this isn't a problem,
    but with the iwlwifi mechanism we need to make
    sure the race doesn't happen.

    This makes mac80211 able to cope with the race
    with driver help by a new WLAN_STA_PS_DRIVER
    per-station flag that can be controlled by the
    driver and tells mac80211 whether it can transmit
    frames or not. This flag must be set according to
    very specific rules outlined in the documentation
    for the function that controls it.

    When we buffer new frames for the station, we
    normally set the TIM bit right away, but while
    the driver has blocked transmission to that sta
    we need to avoid that as well since we cannot
    respond to the station if it wakes up due to the
    TIM bit. Once the driver unblocks, we can set
    the TIM bit.

    Similarly, when the station just wakes up, we
    need to wait until all other frames are flushed
    before we can transmit frames to that station,
    so the same applies here, we need to wait for
    the driver to give the OK.

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

    Johannes Berg
     

31 Oct, 2009

2 commits

  • This value is unused by mac80211, because it was only
    be used by wireless extensions, and turned out to not
    be useful there because the quality value needs to be
    comparable between scan results and the current value
    which is impossible when the qual value is calculated
    taking into account noise, for example.

    Since it is unused anyway, this patch deprecates it
    in the hope that drivers will remove their sometimes
    quite expensive calculations of the value.

    I'm open to actual uses of the value, but the best
    way of using it seems to be what the Intel drivers do
    which should probably be generalised if we have noise
    values from the hardware.

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

    Johannes Berg
     
  • We can save a lot of code and pointers in the structs
    by using debugfs_remove_recursive().

    First, change cfg80211 to use debugfs_remove_recursive()
    so that drivers do not need to clean up any files they
    added to the per-wiphy debugfs (if and only if they are
    ok to be accessed until after wiphy_unregister!).

    Then also make mac80211 use debugfs_remove_recursive()
    where necessary -- it need not remove per-wiphy files
    as cfg80211 now removes those, but netdev etc. files
    still need to be handled but can now be removed without
    needing struct dentry pointers to all of them.

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

    Johannes Berg
     

11 Jul, 2009

1 commit

  • We had code for a number of files, that we didn't publish
    in debugfs, fix that. Also make the agg_status file layout
    more readable and add more information to it.

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

    Johannes Berg
     

30 Jan, 2009

1 commit


01 Nov, 2008

2 commits


28 Oct, 2008

1 commit


15 Oct, 2008

1 commit

  • When debugfs_create_dir fails, sta_info_debugfs_add_work will not
    terminate because it will find the same station again and again.
    This is possible whenever debugfs fails for whatever reason; one
    reason is a race condition in mac80211, unfortunately we cannot
    do much about it, so just document it, it just means some station
    may be missing from debugfs.

    Signed-off-by: Johannes Berg
    Cc: Robin Holt
    Signed-off-by: John W. Linville

    Johannes Berg