18 Sep, 2020

2 commits

  • This is needed for encapsulation offload of 4-address mode packets

    Signed-off-by: Felix Fietkau
    Link: https://lore.kernel.org/r/20200908123702.88454-14-nbd@nbd.name
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • The current API (which lets the driver turn on/off per vif directly) has a
    number of limitations:
    - it does not deal with AP_VLAN
    - conditions for enabling (no tkip, no monitor) are only checked at
    add_interface time
    - no way to indicate 4-addr support

    In order to address this, store offload flags in struct ieee80211_vif
    (easy to extend for decap offload later). mac80211 initially sets the enable
    flag, but gives the driver a chance to modify it before its settings are
    applied. In addition to the .add_interface op, a .update_vif_offload op is
    introduced, which can be used for runtime changes.

    If a driver can't disable encap offload at runtime, or if it has some extra
    limitations, it can simply override the flags within those ops.

    Support for encap offload with 4-address mode interfaces can be enabled
    by setting a flag from .add_interface or .update_vif_offload.

    Signed-off-by: Felix Fietkau
    Link: https://lore.kernel.org/r/20200908123702.88454-6-nbd@nbd.name
    [resolved conflict with commit aa2092a9bab3 ("ath11k: add raw mode and
    software crypto support")]
    Signed-off-by: Johannes Berg

    Felix Fietkau
     

31 Jul, 2020

1 commit

  • Ben Greear has repeatedly reported in the past (for a few years
    probably) that this triggers repeatedly in certain scenarios.

    Make this a macro so that each callsite can trigger the warning
    only once - that will still give us an idea of what's going on
    and what paths can reach it, but avoids being too noisy.

    Link: https://lore.kernel.org/r/20200730155212.06fd3a95dbfb.I0b16829aabfaf5f642bce401502a29d16e2dd444@changeid
    Signed-off-by: Johannes Berg

    Johannes Berg
     

27 May, 2020

1 commit


24 Feb, 2020

1 commit

  • Implement drv_set_tid_config api to allow TID specific
    configuration and drv_reset_tid_config api to reset peer
    specific TID configuration. This per-TID onfiguration
    will be applied for all the connected stations when MAC is NULL.

    Signed-off-by: Tamizh chelvam
    Link: https://lore.kernel.org/r/1579506687-18296-7-git-send-email-tamizhr@codeaurora.org
    Signed-off-by: Johannes Berg

    Tamizh chelvam
     

26 Jul, 2019

1 commit


27 Apr, 2019

1 commit

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

    Johannes Berg says:

    ====================
    Various updates, notably:
    * extended key ID support (from 802.11-2016)
    * per-STA TX power control support
    * mac80211 TX performance improvements
    * HE (802.11ax) updates
    * mesh link probing support
    * enhancements of multi-BSSID support (also related to HE)
    * OWE userspace processing support
    ====================

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

    David S. Miller
     

26 Apr, 2019

1 commit

  • This patch introduce a new driver callback drv_sta_set_txpwr. This API will
    copy the transmit power value passed from user space and call the driver
    callback to set the tx power for the station.

    Co-developed-by: Balaji Pothunoori
    Signed-off-by: Ashok Raj Nagarajan
    Signed-off-by: Balaji Pothunoori
    Signed-off-by: Johannes Berg

    Ashok Raj Nagarajan
     

29 Mar, 2019

1 commit

  • There are several scenarios in which mac80211 can call drv_wake_tx_queue
    after ieee80211_restart_hw has been called and has not yet completed.
    Driver private structs are considered uninitialized until mac80211 has
    uploaded the vifs, stations and keys again, so using private tx queue
    data during that time is not safe.

    The driver can also not rely on drv_reconfig_complete to figure out when
    it is safe to accept drv_wake_tx_queue calls again, because it is only
    called after all tx queues are woken again.

    To fix this, bail out early in drv_wake_tx_queue if local->in_reconfig
    is set.

    Cc: stable@vger.kernel.org
    Signed-off-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Felix Fietkau
     

22 Feb, 2019

2 commits


25 Jan, 2019

1 commit


19 Jan, 2019

1 commit

  • This adds an API to mac80211 to handle scheduling of TXQs. The interface
    between driver and mac80211 for TXQ handling is changed by adding two new
    functions: ieee80211_next_txq(), which will return the next TXQ to schedule
    in the current round-robin rotation, and ieee80211_return_txq(), which the
    driver uses to indicate that it has finished scheduling a TXQ (which will
    then be put back in the scheduling rotation if it isn't empty).

    The driver must call ieee80211_txq_schedule_start() at the start of each
    scheduling session, and ieee80211_txq_schedule_end() at the end. The API
    then guarantees that the same TXQ is not returned twice in the same
    session (so a driver can loop on ieee80211_next_txq() without worrying
    about breaking the loop.

    Usage of the new API is optional, so drivers can be ported one at a time.
    In this patch, the actual scheduling performed by mac80211 is simple
    round-robin, but a subsequent commit adds airtime fairness awareness to the
    scheduler.

    Signed-off-by: Toke Høiland-Jørgensen
    [minor kernel-doc fix, propagate sparse locking checks out]
    Signed-off-by: Johannes Berg

    Toke Høiland-Jørgensen
     

09 Nov, 2018

1 commit


12 Oct, 2018

1 commit


05 Sep, 2018

1 commit


23 May, 2018

1 commit

  • There are specific cases, such as SAE authentication exchange, that
    might require long duration to complete. For such cases, add support
    for indicating to the driver the required duration of the prepare_tx()
    operation, so the driver would still be able to complete the frame
    exchange.

    Currently, indicate the duration only for SAE authentication exchange,
    as SAE authentication can take up to 2000 msec (as defined in IEEE
    P802.11-REVmd D1.0 p. 3504).

    As the patch modified the prepare_tx() callback API, also modify
    the relevant code in iwlwifi.

    Signed-off-by: Ilan Peer
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Ilan Peer
     

04 Jan, 2018

1 commit

  • Instead of calling ieee80211_recalc_txpower on monitor interfaces
    directly, call it using the virtual monitor interface, if one exists.

    In case of a single monitor interface given, reject setting TX power,
    if no virtual monitor interface exists.

    That being checked, don't warn in ieee80211_bss_info_change_notify,
    after setting TX power on a monitor interface.

    Fixes warning:
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 2193 at net/mac80211/driver-ops.h:167
    ieee80211_bss_info_change_notify+0x111/0x190 Modules linked in: uvcvideo
    videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core
    rndis_host cdc_ether usbnet mii tp_smapi(O) thinkpad_ec(O) ohci_hcd vboxpci(O)
    vboxnetadp(O) vboxnetflt(O) v boxdrv(O) x86_pkg_temp_thermal kvm_intel kvm
    irqbypass iwldvm iwlwifi ehci_pci ehci_hcd tpm_tis tpm_tis_core tpm CPU: 0
    PID: 2193 Comm: iw Tainted: G O 4.12.12-gentoo #2 task:
    ffff880186fd5cc0 task.stack: ffffc90001b54000 RIP:
    0010:ieee80211_bss_info_change_notify+0x111/0x190 RSP: 0018:ffffc90001b57a10
    EFLAGS: 00010246 RAX: 0000000000000006 RBX: ffff8801052ce840 RCX:
    0000000000000064 RDX: 00000000fffffffc RSI: 0000000000040000 RDI:
    ffff8801052ce840 RBP: ffffc90001b57a38 R08: 0000000000000062 R09:
    0000000000000000 R10: ffff8802144b5000 R11: ffff880049dc4614 R12:
    0000000000040000 R13: 0000000000000064 R14: ffff8802105f0760 R15:
    ffffc90001b57b48 FS: 00007f92644b4580(0000) GS:ffff88021e200000(0000)
    knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007f9263c109f0 CR3: 00000001df850000 CR4: 00000000000406f0
    Call Trace:
    ieee80211_recalc_txpower+0x33/0x40
    ieee80211_set_tx_power+0x40/0x180
    nl80211_set_wiphy+0x32e/0x950

    Reported-by: Peter Große
    Signed-off-by: Peter Große

    Signed-off-by: Johannes Berg

    Peter Große
     

19 Dec, 2017

1 commit

  • This reverts commit e937b8da5a591f141fe41aa48a2e898df9888c95.

    Turns out that a new driver (mt76) is coming in through
    Kalle's tree, and will conflict with this. It also has some
    conflicting requirements, so we'll revisit this later.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

11 Dec, 2017

1 commit

  • This adds an API to mac80211 to handle scheduling of TXQs and changes the
    interface between driver and mac80211 for TXQ handling as follows:

    - The wake_tx_queue callback interface no longer includes the TXQ. Instead,
    the driver is expected to retrieve that from ieee80211_next_txq()

    - Two new mac80211 functions are added: ieee80211_next_txq() and
    ieee80211_schedule_txq(). The former returns the next TXQ that should be
    scheduled, and is how the driver gets a queue to pull packets from. The
    latter is called internally by mac80211 to start scheduling a queue, and
    the driver is supposed to call it to re-schedule the TXQ after it is
    finished pulling packets from it (unless the queue emptied).

    The ath9k and ath10k drivers are changed to use the new API.

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

    Toke Høiland-Jørgensen
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

30 Sep, 2016

4 commits

  • 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
     
  • 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

1 commit


12 Sep, 2016

1 commit

  • add support to MU-MIMO air sniffer according groupID:
    in monitor mode, use a given MU-MIMO groupID to monitor stations
    that belongs to that group using MU-MIMO.

    add support for following a station according to its MAC address
    using VHT MU-MIMO sniffer:
    the monitors wait until they get an action MU-MIMO notification
    frame, then parses it in order to find the groupID that corresponds
    to the given MAC address and monitors packets destined to that
    groupID using VHT MU-MIMO.

    Signed-off-by: Aviya Erenfeld
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Aviya Erenfeld
     

12 Aug, 2016

1 commit

  • Depending on which method the driver implements, userspace could
    call this (indirectly, by getting station info) before the driver
    knows about the station, possibly causing it to misbehave.

    Therefore, add a check for sta->uploaded which indicates that the
    driver knows about the station.

    Signed-off-by: Maxim Altshul
    [reword commit message]
    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
     

05 Apr, 2016

1 commit

  • 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
     

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

1 commit