26 Oct, 2016

1 commit


30 Sep, 2016

6 commits

  • The TXQ intermediate queues can cause packet reordering when more than
    one flow is active to a single station. Since some of the wifi-specific
    packet handling (notably sequence number and encryption handling) is
    sensitive to re-ordering, things break if they are applied before the
    TXQ.

    This splits up the TX handlers and fast_xmit logic into two parts: An
    early part and a late part. The former is applied before TXQ enqueue,
    and the latter after dequeue. The non-TXQ path just applies both parts
    at once.

    Because fragments shouldn't be split up or reordered, the fragmentation
    handler is run after dequeue. Any fragments are then kept in the TXQ and
    on subsequent dequeues they take precedence over dequeueing from the FQ
    structure.

    This approach avoids having to scatter special cases all over the place
    for when TXQ is enabled, at the cost of making the fast_xmit and TX
    handler code slightly more complex.

    Signed-off-by: Toke Høiland-Jørgensen
    [fix a few code-style nits, make ieee80211_xmit_fast_finish void,
    remove a useless txq->sta check]
    Signed-off-by: Johannes Berg

    Toke Høiland-Jørgensen
     
  • This allows the mesh sync (and debugfs) code to make incremental
    TSF adjustments, avoiding any uncertainty introduced by delay in
    programming absolute TSF.

    Signed-off-by: Thomas Pedersen
    Signed-off-by: Johannes Berg

    Pedersen, Thomas
     
  • Provide an API to report NAN function match. Mac80211 will lookup the
    corresponding cookie and report the match to cfg80211.

    Signed-off-by: Andrei Otcheretianski
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Ayala Beker
     
  • Implement add/rm_nan_func functions and handle NAN function
    termination notifications. Handle instance_id allocation for
    NAN functions and implement the reconfig flow.

    Signed-off-by: Andrei Otcheretianski
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Ayala Beker
     
  • Implement nan_change_conf callback which allows to change current
    NAN configuration (master preference and dual band operation).
    Store the current NAN configuration in sdata, so it can be used
    both to provide the driver the updated configuration with changes
    and also it will be used in hw reconfig flows in next patches.

    Signed-off-by: Andrei Otcheretianski
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Ayala Beker
     
  • This code doesn't do much besides allowing to start and
    stop the vif.

    Signed-off-by: Andrei Otcheretianski
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Ayala Beker
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Ayala Beker
     

15 Sep, 2016

2 commits

  • 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
     
  • No drivers implement this, relying either on the recursive
    directory removal to remove their debugfs, or not having any
    to start with. Remove the dead driver callback.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

12 Sep, 2016

2 commits

  • Use the existing device timestamp from the RX status information
    to add support for the new radiotap timestamp field. Currently
    only 32-bit counters are supported, but we also add the radiotap
    mactime where applicable. This new field allows more flexibility
    in where the timestamp is taken etc. The non-timestamp data in
    the field is taken from a new field in the hw struct.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • The ability to change the max_rx_aggregation frames is useful
    in cases of IOP.

    There exist some devices (latest mobile phones and some AP's)
    that tend to not respect a BA sessions maximum size (in Kbps).
    These devices won't respect the AMPDU size that was negotiated during
    association (even though they do respect the maximal number of packets).

    This violation is characterized by a valid number of packets in
    a single AMPDU. Even so, the total size will exceed the size negotiated
    during association.

    Eventually, this will cause some undefined behavior, which in turn
    causes the hw to drop packets, causing the throughput to plummet.

    This patch will make the subframe limitation to be held by each station,
    instead of being held only by hw.

    Signed-off-by: Maxim Altshul
    Signed-off-by: Johannes Berg

    Maxim Altshul
     

05 Aug, 2016

1 commit

  • The variable is added to allow the driver an easy access to
    it's own hw->priv when the op is invoked.

    This fixes a crash in wlcore because it was relying on a
    station pointer that wasn't initialized yet. It's the wrong
    way to fix the crash, but it solves the problem for now and
    it does make sense to have the hw pointer here.

    Signed-off-by: Maxim Altshul
    [rewrite commit message, fix indentation]
    Signed-off-by: Johannes Berg

    Maxim Altshul
     

06 Jul, 2016

1 commit

  • Add the following to support beacon report radio measurement
    with the measurement mode field set to passive or active:
    1. Propagate the required scan duration to the device
    2. Report the scan start time (in terms of TSF)
    3. Report each BSS's detection time (also in terms of TSF)

    TSF times refer to the BSS that the interface that requested the
    scan is connected to.

    Signed-off-by: Assaf Krauss
    Signed-off-by: Avraham Stern
    [changed ath9k/10k, at76c59x-usb, iwlegacy, wl1251 and wlcore to match
    the new API]
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Avraham Stern
     

09 Jun, 2016

2 commits

  • There is no other limit other than a global
    packet count limit when using software queuing.
    This means a single flow queue can grow insanely
    long. This is particularly bad for TCP congestion
    algorithms which requires a little more
    sophisticated frame dropping scheme than a mere
    headdrop on limit overflow.

    Hence apply (a slighly modified, to fit the knobs)
    CoDel5 on flow queues. This improves TCP
    convergence and stability when combined with
    wireless driver which keeps its own tx queue/fifo
    at a minimum fill level for given link conditions.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     
  • Qdiscs are designed with no regard to 802.11
    aggregation requirements and hand out
    packet-by-packet with no guarantee they are
    destined to the same tid. This does more bad than
    good no matter how fairly a given qdisc may behave
    on an ethernet interface.

    Software queuing used per-AC netdev subqueue
    congestion control whenever a global AC limit was
    hit. This meant in practice a single station or
    tid queue could starve others rather easily. This
    could resonate with qdiscs in a bad way or could
    just end up with poor aggregation performance.
    Increasing the AC limit would increase induced
    latency which is also bad.

    Disabling qdiscs by default and performing
    taildrop instead of netdev subqueue congestion
    control on the other hand makes it possible for
    tid queues to fill up "in the meantime" while
    preventing stations starving each other.

    This increases aggregation opportunities and
    should allow software queuing based drivers
    achieve better performance by utilizing airtime
    more efficiently with big aggregates.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     

12 May, 2016

2 commits

  • When using RSS, frames might not be processed in the correct order,
    and thus AP_LINK_PS must be used; most likely with firmware keeping
    track of the powersave state, this is the case in iwlwifi now.

    In this case, the driver can use ieee80211_sta_ps_transition() to
    still have mac80211 manage powersave buffering. However, for U-APSD
    and PS-Poll this isn't sufficient. If the device can't manage that
    entirely on its own, mac80211's code should be used.

    To allow this, export two functions: ieee80211_sta_uapsd_trigger()
    and ieee80211_sta_pspoll().

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Some hardware (iwlwifi an example) de-aggregate AMSDUs and copy the IV
    as is to the generated MPDUs, so the same PN appears in multiple
    packets without being a replay attack. Allow driver to explicitly
    indicate that a frame is allowed to have the same PN as the previous
    frame.

    Signed-off-by: Sara Sharon
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Sara Sharon
     

12 Apr, 2016

1 commit

  • This enum is already perfectly aliased to enum nl80211_band, and
    the only reason for it is that we get IEEE80211_NUM_BANDS out of
    it. There's no really good reason to not declare the number of
    bands in nl80211 though, so do that and remove the cfg80211 one.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

10 Apr, 2016

1 commit


06 Apr, 2016

4 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
     
  • Sometimes drivers already looked up, or know out-of-band
    from their device, which station transmitted a given RX
    frame. Allow them to pass the station pointer to mac80211
    to save the extra lookup.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Legacy clients don't support P2P power save mechanism, and thus if a P2P GO
    has a legacy client connected to it, it should disable P2P PS mechanisms.
    Let the driver know about this with a new bss_conf parameter.

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

    Ayala Beker
     

05 Apr, 2016

4 commits

  • Add documentation for the flag for duplication check.

    Fixes the following warning when running make htmldocs:
    warning: Enum value 'RX_FLAG_DUP_VALIDATED' not described in enum 'mac80211_rx_flags'

    Signed-off-by: Luis de Bethencourt
    [fix description]
    Signed-off-by: Johannes Berg

    Luis de Bethencourt
     
  • Some devices, like iwlwifi, have RSS queues. This may cause a
    situation where a disassociation is handled in control path and
    results in station removal while there are prior RX frames
    that were still not processed in other queues. When they will
    be processed the station will be gone, and the frames will be
    dropped.
    Add a synchronization interface to avoid that. When driver returns
    from the synchronization mac80211 may remove the station.

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

    Sara Sharon
     
  • When HW crypto is used, there's no need for the CCMP/GCMP MIC to
    be available to mac80211, and the hardware might have removed it
    already after checking. The MIC is also useless to have when the
    frame is already decrypted, so allow indicating that it's not
    present.

    Since we are running out of bits in mac80211_rx_flags, make
    the flags field a u64.

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

    Sara Sharon
     
  • This was requested by Android, and the appropriate cfg80211 API
    had been added by Dmitry. Support it in mac80211, allowing drivers
    to provide the timestamp.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

24 Feb, 2016

12 commits

  • Drivers may need to track which vif is using VHT MU-MIMO.
    Move the flag indicationg the ownership of MU_MIMO to
    ieee80211_vif.

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

    Sara Sharon
     
  • Provide an interface to the lower level driver to set the VHT
    MU-MIMO data. This is needed for example when there is an update
    of the group data during low power state, where the management
    frame will not be passed to the host at all.

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

    Sara Sharon
     
  • Since the PNs of all the tx keys are now tracked in the public
    part of the key struct (with atomic counter), we no longer
    need these functions.

    dvm and vt665{5,6} are currently the only users of these functions,
    so update them accordingly.

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

    Eliad Peller
     
  • Some drivers/devices might want to set the IVs by
    themselves (and still let mac80211 generate MMIC).

    Specifically, this is needed when the device does
    offloading at certain times, and the driver has
    to make sure that the IVs of new tx frames (from
    the host) are synchronized with IVs that were
    potentially used during the offloading.

    Similarly to CCMP, move the TX IVs of TKIP keys to the
    public part of the key struct, and export a function
    to add the IV right into the crypto header.

    The public tx_pn field is defined as atomic64, so define
    TKIP_PN_TO_IV16/32 helper macros to convert it to iv16/32
    when needed.

    Since the iv32 used for the p1k cache is taken
    directly from the frame, we can safely remove
    iv16/32 from being protected by tkip.txlock.

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

    Eliad Peller
     
  • If any frames are dropped that are part of a BA session, the reorder
    buffer will "indefinitely" (until the timeout) wait for them to come
    in (or a BAR moving the window) and won't release frames after them.
    This means it isn't possible to filter frames within a BA session in
    firmware.

    Introduce an API function that allows such filtering. Calling this
    function will move the BA window forward to the new SSN, and allows
    marking frames after the SSN as having been filtered, so any future
    reordering activity will release frames while skipping the holes.

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

    Sara Sharon
     
  • This will allow drivers to make more educated
    decisions whether to defer transmission or not.

    Relying on wake_tx_queue() call count implicitly
    was not possible because it could be called
    without queued frame count actually changing on
    software tx aggregation start/stop code paths.

    It was also not possible to know how long
    byte-wise queue was without dequeueing.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     
  • Drivers/devices without their own rate control algorithm can get the
    information what rates they should use from either the radiotap header of
    injected frames or from the rate control algorithm. But the parsing of the
    legacy rate information from the radiotap header was removed in commit
    e6a9854b05c1 ("mac80211/drivers: rewrite the rate control API").

    The removal of this feature heavily reduced the usefulness of frame
    injection when wanting to simulate specific transmission behavior. Having
    rate parsing together with MCS rates and retry support allows a fine
    grained selection of the tx behavior of injected frames for these kind of
    tests.

    Signed-off-by: Sven Eckelmann
    Cc: Simon Wunderlich
    Signed-off-by: Johannes Berg

    Sven Eckelmann
     
  • The timestamp given by iwlwifi is at the beginning of the
    frame over the air, at (or during) the SYNC field. Allow
    such timestamps to be given to mac80211, at least (for now)
    for frames with non-HT/VHT preambles.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Make the addr parameter const in SET_IEEE80211_PERM_ADDR() to save
    clients from having to cast away a const qualifier.

    Signed-off-by: Bjorn Andersson
    Signed-off-by: Johannes Berg

    Bjorn Andersson
     
  • In VHT, the specification allows to limit the number of
    MSDUs in an A-MSDU in the Extended Capabilities IE. There
    is also a limitation on the byte size in the VHT IE.
    In HT, the only limitation is on the byte size.
    Parse the capabilities from the peer and make them
    available to the driver.

    In HT, there is another limitation when a BA agreement
    is active: the byte size can't be greater than 4095.
    This is not enforced here.

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

    Emmanuel Grumbach
     
  • Some drivers offload some frames internally (e.g.
    AddBa). Reporting such frames to mac80211 would
    only confuse MLME. However it would be useful to
    be able to pass such frames to monitor interfaces
    for sniffing purposes, e.g. when running AP +
    monitor.

    To do that allow drivers to tell mac80211 whether
    a given frame should be:
    - processed but not delivered to any monitor vif
    - not processed but delievered to monitor vifs
    only

    Signed-off-by: Grzegorz Bajorski
    Signed-off-by: Johannes Berg

    Grzegorz Bajorski
     
  • Enable driver to manage the reordering logic itself.
    This is needed for example for the iwlwifi driver that
    will support hardware assisted reordering.

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

    Sara Sharon
     

14 Jan, 2016

1 commit

  • Currently mac80211 does not inform the driver of the session
    block ack timeout when starting a rx aggregation session.
    Drivers that manage the reorder buffer need to know this
    parameter.
    Seeing that there are now too many arguments for the
    drv_ampdu_action() function, wrap them inside a structure.

    Signed-off-by: Sara Sharon
    Signed-off-by: Johannes Berg

    Sara Sharon