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
     

03 Nov, 2015

2 commits

  • Channel context driver operations can sleep, so add might_sleep()
    and document this.

    Signed-off-by: Chaitanya T K
    Signed-off-by: Johannes Berg

    Chaitanya T K
     
  • If drv_start() fails during hw_restart, all the running
    interfaces are being closed/stopped, which results in
    drv_stop() being called, although the driver was never
    started successfully.

    This might cause drivers to perform operations on uninitialized
    memory (as they assume it was initialized on drv_start)

    Consider the local->started flag, and call the driver's stop()
    op only if drv_start() succeeded before.

    Move drv_start() and drv_stop() to driver-ops.c, as they are no
    longer simple wrappers.

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

    Eliad Peller
     

29 Sep, 2015

6 commits

  • With this .config: http://busybox.net/~vda/kernel_config_ALLYES_Os,
    after deinlining these functions have sizes and callsite counts
    as follows:

    drv_get_tsf: 634 bytes, 6 calls
    drv_set_tsf: 626 bytes, 2 calls
    drv_reset_tsf: 617 bytes, 2 calls

    Total size reduction is about 4.2 kbytes.

    Signed-off-by: Denys Vlasenko
    CC: Johannes Berg
    CC: John Linville
    CC: Michal Kazior
    CC: linux-wireless@vger.kernel.org
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: Johannes Berg

    Denys Vlasenko
     
  • With this .config: http://busybox.net/~vda/kernel_config_ALLYES_Os,
    after deinlining the function size is 755 bytes and there are
    6 callsites.

    Total size reduction is about 3.3 kbytes.

    Signed-off-by: Denys Vlasenko
    CC: Johannes Berg
    CC: John Linville
    CC: Michal Kazior
    CC: linux-wireless@vger.kernel.org
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: Johannes Berg

    Denys Vlasenko
     
  • With this .config: http://busybox.net/~vda/kernel_config_ALLYES_Os,
    after deinlining the function size is 821 bytes and there are
    2 callsites, reducing code size by about 800 bytes.

    Signed-off-by: Denys Vlasenko
    CC: Johannes Berg
    CC: John Linville
    CC: Michal Kazior
    CC: linux-wireless@vger.kernel.org
    CC: linux-kernel@vger.kernel.org
    [adjust code-style a bit]
    Signed-off-by: Johannes Berg

    Denys Vlasenko
     
  • With this .config: http://busybox.net/~vda/kernel_config_ALLYES_Os,
    after deinlining these functions have sizes and callsite counts
    as follows:

    drv_add_interface: 638 bytes, 5 calls
    drv_remove_interface: 611 bytes, 6 calls
    drv_change_interface: 658 bytes, 1 call

    Total size reduction is about 9 kbytes.

    Signed-off-by: Denys Vlasenko
    CC: John Linville
    CC: Michal Kazior
    CC: Johannes Berg
    CC: linux-wireless@vger.kernel.org
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: Johannes Berg

    Denys Vlasenko
     
  • With this .config: http://busybox.net/~vda/kernel_config_ALLYES_Os,
    after deinlining the function size is 706 bytes and there are
    2 callsites, reducing code size by about 700 bytes.

    Signed-off-by: Denys Vlasenko
    CC: John Linville
    CC: Michal Kazior
    CC: Johannes Berg
    CC: linux-wireless@vger.kernel.org
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: Johannes Berg

    Denys Vlasenko
     
  • With this .config: http://busybox.net/~vda/kernel_config_ALLYES_Os,
    after deinlining the function size is 785 bytes and there are
    7 callsites.

    Total size reduction is about 3.5 kbytes.

    Signed-off-by: Denys Vlasenko
    CC: John Linville
    CC: Michal Kazior
    CC: Johannes Berg
    CC: linux-wireless@vger.kernel.org
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: Johannes Berg

    Denys Vlasenko
     

22 Sep, 2015

2 commits

  • Advertise the capability to send A-MSDU within A-MPDU
    in the AddBA request sent by mac80211. Let the driver
    know about the peer's capabilities.

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

    Emmanuel Grumbach
     
  • Currently the cfg80211's frame registration api receives wdev, however
    mac80211 assumes per device filter configuration and ignores wdev.
    Per device filtering is too wasteful, especially for multi-channel
    devices.
    Introduce new per vif frame registration API and use it for probe
    request registrations in ieee80211_mgmt_frame_register()
    Also call directly to ieee80211_configure_filter instead of using a work
    since it is now allowed to sleep in ieee80211_mgmt_frame_register.

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

    Andrei Otcheretianski
     

17 Jul, 2015

1 commit

  • With this .config: http://busybox.net/~vda/kernel_config,
    after deinlining the function size is 3132 bytes and there are
    7 callsites.

    Total size reduction: about 20 kbytes.

    Signed-off-by: Denys Vlasenko
    CC: John Linville
    CC: Michal Kazior
    Cc: Johannes Berg
    Cc: linux-wireless@vger.kernel.org
    Cc: netdev@vger.kernel.org
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: Johannes Berg

    Denys Vlasenko
     

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
     

06 May, 2015

1 commit


02 Apr, 2015

1 commit

  • This allows drivers to request per-vif and per-sta-tid queues from which
    they can pull frames. This makes it easier to keep the hardware queues
    short, and to improve fairness between clients and vifs.

    The task of scheduling packet transmission is left up to the driver -
    queueing is controlled by mac80211. Drivers can only dequeue packets by
    calling ieee80211_tx_dequeue. This makes it possible to add active queue
    management later without changing drivers using this code.

    This can also be used as a starting point to implement A-MSDU
    aggregation in a way that does not add artificially induced latency.

    Signed-off-by: Felix Fietkau
    [resolved minor context conflict, minor changes, endian annotations]
    Signed-off-by: Johannes Berg

    Felix Fietkau
     

30 Mar, 2015

1 commit


08 Jan, 2015

1 commit

  • In many cases, drivers can filter things like beacons that will
    skew statistics reported by mac80211. To get correct statistics
    in these cases, call drivers to obtain statistics and let them
    override all values, filling values from mac80211 if the driver
    didn't provide them. Not all of them make sense for the driver
    to fill, so some are still always done by mac80211.

    Note that this doesn't currently allow a driver to say "I know
    this value is wrong, don't report it at all", or to sum it up
    with a mac80211 value (as could be useful for "dropped misc"),
    that can be added if it turns out to be needed.

    This also gets rid of the get_rssi() method as is can now be
    implemented using sta_statistics().

    Signed-off-by: Johannes Berg

    Johannes Berg
     

20 Nov, 2014

4 commits

  • This allows drivers with a firmware or chip-based rate lookup table to
    use the most recent default rate selection without having to get it from
    per-packet data or explicit ieee80211_get_tx_rate calls

    Signed-off-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Allow drivers to support NL80211_SCAN_FLAG_RANDOM_ADDR with software
    based scanning and generate a random MAC address for them for every
    scan request with the flag.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • When receiving a TDLS channel switch request or response, parse the frame
    and call a new tdls_recv_channel_switch op in the low level driver with
    the parsed data.

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

    Arik Nemtsov
     
  • Implement the cfg80211 TDLS channel switch ops and introduce new mac80211
    ones for low-level drivers.
    Verify low-level driver support for the new ops when using the relevant
    wiphy feature bit. Also verify the peer supports channel switching before
    passing the command down.

    Add a new STA flag to track the off-channel state with the TDLS peer and
    make sure to cancel the channel-switch if the peer STA is unexpectedly
    removed.

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

    Arik Nemtsov
     

04 Nov, 2014

3 commits

  • Drivers might want to know also when mac80211 has
    completed reconfiguring after resume (e.g. in order
    to know when frames can be passed to mac80211).

    Rename restart_complete() to a more-generic reconfig_complete(),
    and add a new enum to indicate the reconfiguration type.

    Update the current users with the new prototype.

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

    Eliad Peller
     
  • This patch adds 802.11p OCB (Outside the Context of a BSS) mode
    support.

    When communicating in OCB mode a mandatory wildcard BSSID
    (48 '1' bits) is used.

    The EDCA parameters handling function was changed to support
    802.11p specific values.

    The insertion of a newly discovered STAs is done in the similar way
    as in the IBSS mode -- through the deferred insertion.

    The OCB mode uses a periodic 'housekeeping task' for expiration of
    disconnected STAs (in the similar manner as in the MESH mode).

    New Kconfig option for verbose OCB debugging outputs is added.

    Signed-off-by: Rostislav Lisovy
    Signed-off-by: Johannes Berg

    Rostislav Lisovy
     
  • The configured tx power is often limited by hardware capabilities,
    channel settings, antenna configuration, etc.

    Signed-off-by: Felix Fietkau
    [fix tracing compilation]
    Signed-off-by: Johannes Berg

    Felix Fietkau
     

22 Oct, 2014

1 commit


09 Oct, 2014

3 commits


05 Sep, 2014

1 commit

  • Extend mac80211 set_coverage_class API in order to enable ACK timeout
    estimation algorithm (dynack) passing coverage class equals to -1
    to lower drivers. Synchronize set_coverage_class routine signature with
    mac80211 function pointer for p54, ath9k, ath9k_htc and ath5k drivers.

    Signed-off-by: Lorenzo Bianconi
    Signed-off-by: Johannes Berg

    Lorenzo Bianconi
     

25 Jun, 2014

2 commits

  • Split sched scan IEs to band specific and not band specific
    blocks. Common IEs blocks may be sent to the FW once per command,
    instead of per band.

    This allows optimization of size of the command, which may be
    required by some drivers (eg. iwlmvm with newer firmware version).

    As this changes the mac80211 API, update all drivers to use the
    new version correctly, even if they don't (yet) make use of the
    split data.

    Signed-off-by: David Spinadel
    Reviewed-by: Alexander Bondar
    Signed-off-by: Johannes Berg

    David Spinadel
     
  • Some drivers (such as iwlmvm) can handle multiple bands in a single
    HW scan request. Add a HW flag to indicate that the driver support
    this. To hold the required data, create a separate structure for
    HW scan request that holds cfg scan request and data about
    different parts of the scan IEs.

    As this changes the mac80211 API, update all drivers using it to
    use the correct new function type/argument.

    Signed-off-by: David Spinadel
    Signed-off-by: Johannes Berg

    David Spinadel
     

23 Jun, 2014

1 commit

  • After sending a TDLS discovery-request, we expect a reply to arrive on
    the AP's channel. We must stay on the channel (no PSM, scan, etc.), since
    a TDLS setup-response is a direct packet not buffered by the AP.
    Add a new mac80211 driver callback to allow discovery session protection.

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

    Arik Nemtsov
     

26 May, 2014

1 commit

  • In some cases, when the driver is already using all the channel
    contexts it can handle at once, we have to do an in-place switch
    (ie. we cannot afford using an extra context temporarily for the
    transaction). But some drivers may not support switching the channel
    context assigned to a vif on the fly (ie. without unassigning and
    assigning it) while others may only work if the context is changed on
    the fly, without unassigning it first.

    To allow these different scenarios, add a new driver operation that
    let's the driver decide how to handle an in-place switch.

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

    Luciano Coelho
     

21 May, 2014

1 commit

  • Add get_expected_throughput() API to mac80211 so that each
    driver can implement its own version based on the RC
    algorithm they are using (might be using an HW RC algo).
    The API returns a value expressed in Kbps.

    Also, add the new get_expected_throughput() member
    to the rate_control_ops structure in order to be
    able to query the RC algorithm (this patch provides an
    implementation of this API for both minstrel and
    minstrel_ht).

    The related member in the station_info object is now
    filled accordingly when dumping a station.

    Cc: Felix Fietkau
    Signed-off-by: Antonio Quartulli
    Signed-off-by: Johannes Berg

    Antonio Quartulli
     

09 May, 2014

1 commit

  • When the driver fails during HW restart or resume, the whole
    stack goes into a very confused state with interfaces being
    up while the hardware is down etc.

    Address this by shutting down everything; we'll run into a
    lot of warnings in the process but that's better than having
    the whole stack get messed up.

    Reviewed-by: Arik Nemtsov
    Signed-off-by: Johannes Berg

    Johannes Berg
     

09 Apr, 2014

1 commit

  • This will allow the low level driver to make decision based
    on the vif such as queues etc...
    Since the vif might be NULL, we can't add it to the tracing
    functions.

    Signed-off-by: Emmanuel Grumbach
    [fix staging rtl8821ae driver]
    Signed-off-by: Johannes Berg

    Emmanuel Grumbach
     

20 Feb, 2014

1 commit


16 Dec, 2013

1 commit

  • Currently, mac80211 allows drivers to keep RCU-protected station
    references that are cleared when the station is removed from the
    driver and consequently needs to synchronize twice, once before
    removing the station from the driver (so it can guarantee that
    the station is no longer used in TX towards the driver) and once
    after the station is removed from the driver.

    Add a new pre-RCU-synchronisation station removal operation to
    the API to allow drivers to clear/invalidate their RCU-protected
    station pointers before the RCU synchronisation.

    This will allow removing the second synchronisation by changing
    the driver API so that the driver may no longer assume a valid
    RCU-protected pointer after sta_remove/sta_state returns.

    The alternative to this would be to synchronize_rcu() in all the
    drivers that currently rely on this behaviour (only iwlmvm) but
    that would defeat the purpose.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

03 Dec, 2013

1 commit


01 Oct, 2013

1 commit