08 Feb, 2017

1 commit


07 Feb, 2017

1 commit


13 Dec, 2016

1 commit


19 Oct, 2016

1 commit

  • Currently mac80211 determines whether HW does fragmentation
    by checking whether the set_frag_threshold callback is set
    or not.
    However, some drivers may want to set the HW fragmentation
    capability depending on HW generation.
    Allow this by checking a HW flag instead of checking the
    callback.

    Signed-off-by: Sara Sharon
    [added the flag to ath10k and wlcore]
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Sara Sharon
     

30 Sep, 2016

1 commit


15 Sep, 2016

1 commit

  • Based on consecutive msdu failures, mac80211 triggers CQM packet-loss
    mechanism. Drivers like ath10k that have its own connection monitoring
    algorithm, offloaded to firmware for triggering station kickout. In case
    of station kickout, driver will report low ack status by mac80211 API
    (ieee80211_report_low_ack).

    This flag will enable the driver to completely rely on firmware events
    for station kickout and bypass mac80211 packet loss mechanism.

    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: Johannes Berg

    Rajkumar Manoharan
     

13 Sep, 2016

1 commit

  • Currently the 'aqm' stats in mac80211 only keeps overlimit drop stats,
    not CoDel stats. This moves the CoDel stats into the txqi structure to
    keep them per txq in order to show them in debugfs.

    In addition, the aqm debugfs output is restructured by splitting it up
    into three files: One global per phy, one per netdev and one per
    station, in the appropriate directories. The files are all called aqm,
    and are only created if the driver supports the wake_tx_queue op (rather
    than emitting an error on open as previously).

    Signed-off-by: Toke Høiland-Jørgensen
    Signed-off-by: Johannes Berg

    Toke Høiland-Jørgensen
     

09 Jun, 2016

1 commit


06 Apr, 2016

2 commits

  • Requires software tx queueing and fast-xmit support. For good
    performance, drivers need frag_list support as well. This avoids the
    need for copying data of aggregated frames. Running without it is only
    supported for debugging purposes.

    To avoid performance and packet size issues, the rate control module or
    driver needs to limit the maximum A-MSDU size by setting
    max_rc_amsdu_len in struct ieee80211_sta.

    Signed-off-by: Felix Fietkau
    [fix locking issue]
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • If the driver advertises the new HW flag USE_RSS, make the
    station statistics on the fast-rx path per-CPU. This will
    enable calling the RX in parallel, only hitting locking or
    shared cachelines when the fast-RX path isn't available.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

02 Mar, 2016

1 commit

  • …inux/kernel/git/jberg/mac80211-next

    Johannes Berg says:

    ====================
    Here's another round of updates for -next:
    * big A-MSDU RX performance improvement (avoid linearize of paged RX)
    * rfkill changes: cleanups, documentation, platform properties
    * basic PBSS support in cfg80211
    * MU-MIMO action frame processing support
    * BlockAck reordering & duplicate detection offload support
    * various cleanups & little fixes
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     

24 Feb, 2016

1 commit


21 Jan, 2016

1 commit

  • With upcoming CONFIG_UBSAN the following BUILD_BUG_ON in
    net/mac80211/debugfs.c starts to trigger:

    BUILD_BUG_ON(hw_flag_names[NUM_IEEE80211_HW_FLAGS] != (void *)0x1);

    It seems, that compiler instrumentation causes some code
    deoptimizations. Because of that GCC is not being able to resolve
    condition in BUILD_BUG_ON() at compile time.

    We could make size of hw_flag_names array unspecified and replace the
    condition in BUILD_BUG_ON() with following:

    ARRAY_SIZE(hw_flag_names) != NUM_IEEE80211_HW_FLAGS

    That will have the same effect as before (adding new flag without
    updating array will trigger build failure) except it doesn't fail with
    CONFIG_UBSAN. As a bonus this patch slightly decreases size of
    hw_flag_names array.

    Signed-off-by: Andrey Ryabinin
    Cc: Johannes Berg
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Ryabinin
     

04 Dec, 2015

1 commit


20 Oct, 2015

1 commit


13 Oct, 2015

1 commit

  • Commit 30686bf7f5b3 ("mac80211: convert HW flags to unsigned long
    bitmap") accidentally removed the newline delimiter from the hwflags
    debugfs file. Fix this by adding back the newline between the HW flags.

    Cc: stable@vger.kernel.org [4.2]
    Signed-off-by: Mohammed Shafi Shajakhan
    [fix commit log]
    Signed-off-by: Jouni Malinen
    Signed-off-by: Johannes Berg

    Mohammed Shafi Shajakhan
     

29 Sep, 2015

1 commit

  • When debugging wireless powersave issues on the AP side it's quite helpful
    to see our own beacons that are transmitted by the hardware/driver. However,
    this is not that easy since beacons don't pass through the regular TX queues.

    Preferably drivers would call ieee80211_tx_status also for tx'ed beacons
    but that's not always possible. Hence, just send a copy of each beacon
    generated by ieee80211_beacon_get_tim to monitor devices when they are
    getting fetched by the driver.

    Also add a HW flag IEEE80211_HW_BEACON_TX_STATUS that can be used by
    drivers to indicate that they report TX status for beacons.

    Signed-off-by: Helmut Schaa
    (with a fix from Christian Lamparted rolled in)
    Signed-off-by: Johannes Berg

    Helmut Schaa
     

22 Sep, 2015

1 commit


17 Jul, 2015

2 commits

  • Allow a device to specify support for the TDLS wider-bandwidth feature.
    Indicate this support during TDLS setup in the ext-capab IE and set an
    appropriate station flag when our TDLS peer supports it.
    This feature gives TDLS peers the ability to use a wider channel than
    the base width of the BSS. For instance VHT capable TDLS peers connected
    on a 20MHz channel can extend the channel to 80MHz, if regulatory
    considerations allow it.

    Do not cap the bandwidth of such stations by the current BSS channel width
    in mac80211.

    Signed-off-by: Arik Nemtsov
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Arik Nemtsov
     
  • Short frames less than 16 octets are already blocked in the monitor
    code by the should_drop_frame() function, and cannot get into the
    regular RX path. Therefore, this check can never trigger and the
    counter invariably stays zero. Remove the useless code.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

10 Jun, 2015

1 commit

  • As we're running out of hardware capability flags pretty quickly,
    convert them to use the regular test_bit() style unsigned long
    bitmaps.

    This introduces a number of helper functions/macros to set and to
    test the bits, along with new debugfs code.

    The occurrences of an explicit __clear_bit() are intentional, the
    drivers were never supposed to change their supported bits on the
    fly. We should investigate changing this to be a per-frame flag.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

03 Jun, 2015

1 commit

  • There are no drivers setting IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE
    or IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE, so any code using the
    two flags is dead; it's also exceedingly unlikely that any new driver
    could ever need to set these flags.

    The wcn36xx code is almost certainly broken, but this preserves the
    previous behaviour.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

05 May, 2015

2 commits

  • Since these counters can only be read through debugfs, there's
    very little point in maintaining them all the time. However,
    even just making them depend on debugfs is pointless - they're
    not normally used. Additionally a number of them aren't even
    concurrency safe.

    Move them under MAC80211_DEBUG_COUNTERS so they're normally
    not even compiled in.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • The debugfs statistics macros are pointlessly verbose, so change
    that macro to just have a single argument. While at it, remove
    the unused counters and rename rx_expand_skb_head2 to the better
    rx_expand_skb_head_defrag.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

20 Mar, 2015

1 commit

  • This mechanism was historic, and only ever used by IBSS, which
    also doesn't need to have it as it properly manages station's
    802.1X PAE state (or, with WEP, always has a key.)

    Remove the mechanism to clean up the code.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

01 Mar, 2015

1 commit

  • Revert commit ad38bfc916da ("mac80211: Tx frame latency statistics")
    (along with some follow-up fixes).

    This code turned out not to be as useful in the current form as we
    thought, and we've internally hacked it up more, but that's not
    very suitable for upstream (for now), and we might just do that
    with tracing instead.

    Therefore, for now at least, remove this code. We might also need
    to use the skb->tstamp field for the TCP performance issue, which
    is more important than the debugging.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

15 Dec, 2014

1 commit

  • In order to let drivers have more dynamic U-APSD support,
    move the enablement flag to the virtual interface driver
    flags. This lets drivers not only set it up differently
    for different interfaces, but also enable/disable on the
    fly if needed.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

11 Sep, 2014

1 commit


05 Sep, 2014

1 commit

  • Our legal structure changed at some point (see wikipedia), but
    we forgot to immediately switch over to the new copyright
    notice.

    For files that we have modified in the time since the change,
    add the proper copyright notice now.

    Signed-off-by: Johannes Berg
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Johannes Berg
     

09 Apr, 2014

1 commit

  • rcu_assign_pointer() ensures that the initialization of a structure is
    carried out before storing a pointer to that structure. However, in the
    case that NULL is assigned there's no structure to initialize so using
    RCU_INIT_POINTER instead is safe and more efficient.

    Signed-off-by: Monam Agarwal
    [squash eight tiny patches, rewrite commit log]
    Signed-off-by: Johannes Berg

    Monam Agarwal
     

02 Dec, 2013

1 commit

  • Measure TX latency and jitter statistics per station per TID.
    These Measurements are disabled by default and can be enabled
    via debugfs.

    Features included for each station's TID:

    1. Keep count of the maximum and average latency of Tx frames.
    2. Keep track of many frames arrived in a specific time range
    (need to enable through debugfs and configure the bins ranges)

    Signed-off-by: Matti Gottlieb
    Signed-off-by: Johannes Berg

    Matti Gottlieb
     

01 Oct, 2013

1 commit

  • In some debugfs related functions snprintf was used
    while scnprintf should have been used instead.

    (blindly adding the return value of snprintf and supplying
    it to the next snprintf might result in buffer overflow when
    the input is too big)

    Signed-off-by: Eliad Peller
    Signed-off-by: Johannes Berg

    Eliad Peller
     

12 Feb, 2013

1 commit

  • There are only a few drivers that use HW scan, and
    all of those don't need a non-idle transition before
    starting the scan -- some don't even care about idle
    at all. Remove the flag and code associated with it.

    The only driver that really actually needed this is
    wl1251 and it can just do it itself in the hw_scan
    callback -- implement that.

    Acked-by: Luciano Coelho
    Signed-off-by: Johannes Berg

    Johannes Berg
     

31 Jan, 2013

1 commit

  • Currently, when the driver requires the DTIM period,
    mac80211 will wait to hear a beacon before association.
    This behavior is suboptimal since some drivers may be
    able to deal with knowing the DTIM period after the
    association, if they get it at all.

    To address this, notify the drivers with bss_info_changed
    with the new BSS_CHANGED_DTIM_PERIOD flag when the DTIM
    becomes known. This might be when changing to associated,
    or later when the entire association was done with only
    probe response information.

    Rename the hardware flag for the current behaviour to
    IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC to more accurately
    reflect its behaviour. IEEE80211_HW_NEED_DTIM_PERIOD is
    no longer accurate as all drivers get the DTIM period
    now, just not before association.

    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Emmanuel Grumbach
     

19 Sep, 2012

1 commit


20 Aug, 2012

1 commit


12 Jul, 2012

1 commit

  • Scan receive is rather inefficient when there are
    multiple virtual interfaces. We iterate all of the
    virtual interfaces and then notify cfg80211 about
    each beacon many times.

    Redesign scan RX to happen before everything else.
    Then we can also get rid of IEEE80211_RX_IN_SCAN
    since we don't have to accept frames into the RX
    handlers for scanning or scheduled scanning any
    more. Overall, this simplifies the code.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

06 Apr, 2012

1 commit

  • Many users of debugfs copy the implementation of default_open() when
    they want to support a custom read/write function op. This leads to a
    proliferation of the default_open() implementation across the entire
    tree.

    Now that the common implementation has been consolidated into libfs we
    can replace all the users of this function with simple_open().

    This replacement was done with the following semantic patch:

    @ open @
    identifier open_f != simple_open;
    identifier i, f;
    @@
    -int open_f(struct inode *i, struct file *f)
    -{
    (
    -if (i->i_private)
    -f->private_data = i->i_private;
    |
    -f->private_data = i->i_private;
    )
    -return 0;
    -}

    @ has_open depends on open @
    identifier fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ...
    -.open = open_f,
    +.open = simple_open,
    ...
    };

    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: Stephen Boyd
    Cc: Greg Kroah-Hartman
    Cc: Al Viro
    Cc: Julia Lawall
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     

16 Mar, 2012

1 commit

  • uapsd_queues and uapsd_max_sp_len are relevant only for managed
    interfaces, and can be configured differently for each vif.

    Move them from the local struct to sdata->u.mgd, and update
    the debugfs functions accordingly.

    Signed-off-by: Eliad Peller
    Signed-off-by: John W. Linville

    Eliad Peller
     

07 Feb, 2012

1 commit

  • Currently, mac80211 goes to idle-off before starting a scan.
    However, some devices that implement hw scan might not
    need going idle-off in order to perform a hw scan, and
    thus saving some energy and simplifying their state machine.

    (Note that this is also the case for sched scan - it
    currently doesn't make mac80211 go idle-off)

    Add a new flag to indicate support for hw scan while idle.

    Signed-off-by: Eliad Peller
    Signed-off-by: John W. Linville

    Eliad Peller