13 Oct, 2018

1 commit

  • commit 211710ca74adf790b46ab3867fcce8047b573cd1 upstream.

    key->sta is only valid after ieee80211_key_link, which is called later
    in this function. Because of that, the IEEE80211_KEY_FLAG_RX_MGMT is
    never set when management frame protection is enabled.

    Fixes: e548c49e6dc6b ("mac80211: add key flag for management keys")
    Cc: stable@vger.kernel.org
    Signed-off-by: Felix Fietkau
    Signed-off-by: Johannes Berg
    Signed-off-by: Greg Kroah-Hartman

    Felix Fietkau
     

26 Sep, 2018

1 commit

  • [ Upstream commit 133bf90dbb8b873286f8ec2e81ba26e863114b8c ]

    As explained in ieee80211_delayed_tailroom_dec(), during roam,
    keys of the old AP will be destroyed and new keys will be
    installed. Deletion of the old key causes
    crypto_tx_tailroom_needed_cnt to go from 1 to 0 and the new key
    installation causes a transition from 0 to 1.

    Whenever crypto_tx_tailroom_needed_cnt transitions from 0 to 1,
    we invoke synchronize_net(); the reason for doing this is to avoid
    a race in the TX path as explained in increment_tailroom_need_count().
    This synchronize_net() operation can be slow and can affect the station
    roam time. To avoid this, decrementing the crypto_tx_tailroom_needed_cnt
    is delayed for a while so that upon installation of new key the
    transition would be from 1 to 2 instead of 0 to 1 and thereby
    improving the roam time.

    This is all correct for a STA iftype, but deferring the tailroom_needed
    decrement for other iftypes may be unnecessary.

    For example, let's consider the case of a 4-addr client connecting to
    an AP for which AP_VLAN interface is also created, let the initial
    value for tailroom_needed on the AP be 1.

    * 4-addr client connects to the AP (AP: tailroom_needed = 1)
    * AP will clear old keys, delay decrement of tailroom_needed count
    * AP_VLAN is created, it takes the tailroom count from master
    (AP_VLAN: tailroom_needed = 1, AP: tailroom_needed = 1)
    * Install new key for the station, assume key is plumbed in the HW,
    there won't be any change in tailroom_needed count on AP iface
    * Delayed decrement of tailroom_needed count on AP
    (AP: tailroom_needed = 0, AP_VLAN: tailroom_needed = 1)

    Because of the delayed decrement on AP iface, tailroom_needed count goes
    out of sync between AP(master iface) and AP_VLAN(slave iface) and
    there would be unnecessary tailroom created for the packets going
    through AP_VLAN iface.

    Also, WARN_ONs were observed while trying to bring down the AP_VLAN
    interface:
    (warn_slowpath_common) (warn_slowpath_null+0x18/0x20)
    (warn_slowpath_null) (ieee80211_free_keys+0x114/0x1e4)
    (ieee80211_free_keys) (ieee80211_del_virtual_monitor+0x51c/0x850)
    (ieee80211_del_virtual_monitor) (ieee80211_stop+0x30/0x3c)
    (ieee80211_stop) (__dev_close_many+0x94/0xb8)
    (__dev_close_many) (dev_close_many+0x5c/0xc8)

    Restricting delayed decrement to station interface alone fixes the problem
    and it makes sense to do so because delayed decrement is done to improve
    roam time which is applicable only for client devices.

    Signed-off-by: Manikanta Pubbisetty
    Signed-off-by: Johannes Berg
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Manikanta Pubbisetty
     

12 Apr, 2018

1 commit

  • [ Upstream commit 3a3713ec360138f806c6fc368d1de570f692b347 ]

    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

    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Peter Große
     

28 Feb, 2018

1 commit

  • commit bee92d06157fc39d5d7836a061c7d41289a55797 upstream.

    gcc-8 warns about some obviously incorrect code:

    net/mac80211/cfg.c: In function 'cfg80211_beacon_dup':
    net/mac80211/cfg.c:2896:3: error: 'memcpy' source argument is the same as destination [-Werror=restrict]

    From the context, I conclude that we want to copy from beacon into
    new_beacon, as we do in the rest of the function.

    Cc: stable@vger.kernel.org
    Fixes: 73da7d5bab79 ("mac80211: add channel switch command and beacon callbacks")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Johannes Berg
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     

18 Oct, 2017

1 commit

  • Ben reported that when the user rate mask is rejected for not
    matching any basic rate, the driver had already been configured.
    This is clearly an oversight in my original change, fix this by
    doing the validation before calling the driver.

    Reported-by: Ben Greear
    Fixes: e8e4f5280ddd ("mac80211: reject/clear user rate mask if not usable")
    Signed-off-by: Johannes Berg

    Johannes Berg
     

16 Jun, 2017

1 commit

  • It seems like a historic accident that these return unsigned char *,
    and in many places that means casts are required, more often than not.

    Make these functions (skb_put, __skb_put and pskb_put) return void *
    and remove all the casts across the tree, adding a (u8 *) cast only
    where the unsigned char pointer was used directly, all done with the
    following spatch:

    @@
    expression SKB, LEN;
    typedef u8;
    identifier fn = { skb_put, __skb_put };
    @@
    - *(fn(SKB, LEN))
    + *(u8 *)fn(SKB, LEN)

    @@
    expression E, SKB, LEN;
    identifier fn = { skb_put, __skb_put };
    type T;
    @@
    - E = ((T *)(fn(SKB, LEN)))
    + E = fn(SKB, LEN)

    which actually doesn't cover pskb_put since there are only three
    users overall.

    A handful of stragglers were converted manually, notably a macro in
    drivers/isdn/i4l/isdn_bsdcomp.c and, oddly enough, one of the many
    instances in net/bluetooth/hci_sock.c. In the former file, I also
    had to fix one whitespace problem spatch introduced.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

15 Jun, 2017

1 commit


13 Jun, 2017

1 commit

  • mac80211 allows to modify the SMPS state of an AP both,
    when it is started, and after it has been started. Such a
    change will trigger an action frame to all the peers that
    are currently connected, and will be remembered so that
    new peers will get notified as soon as they connect (since
    the SMPS setting in the beacon may not be the right one).

    This means that we need to remember the SMPS state
    currently requested as well as the SMPS state that was
    configured initially (and advertised in the beacon).
    The former is bss->req_smps and the latter is
    sdata->smps_mode.

    Initially, the AP interface could only be started with
    SMPS_OFF, which means that sdata->smps_mode was SMPS_OFF
    always. Later, a nl80211 API was added to be able to start
    an AP with a different AP mode. That code forgot to update
    bss->req_smps and because of that, if the AP interface was
    started with SMPS_DYNAMIC, we had:
    sdata->smps_mode = SMPS_DYNAMIC
    bss->req_smps = SMPS_OFF

    That configuration made mac80211 think it needs to fire off
    an action frame to any new station connecting to the AP in
    order to let it know that the actual SMPS configuration is
    SMPS_OFF.

    Fix that by properly setting bss->req_smps in
    ieee80211_start_ap.

    Fixes: f69931748730 ("mac80211: set smps_mode according to ap params")
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Emmanuel Grumbach
     

19 May, 2017

1 commit


28 Apr, 2017

1 commit

  • Existing API 'ieee80211_get_sdata_band' returns default 2 GHz band even
    if the channel context configuration is NULL. This crashes for chipsets
    which support 5 Ghz alone when it tries to access members of 'sband'.
    Channel context configuration can be NULL in multivif case and when
    channel switch is in progress (or) when it fails. Fix this by replacing
    the API 'ieee80211_get_sdata_band' with 'ieee80211_get_sband' which
    returns a NULL pointer for sband when the channel configuration is NULL.

    An example scenario is as below:

    In multivif mode (AP + STA) with drivers like ath10k, when we do a
    channel switch in the AP vif (which has a number of clients connected)
    and a STA vif which is connected to some other AP, when the channel
    switch in AP vif fails, while the STA vifs tries to connect to the
    other AP, there is a window where the channel context is NULL/invalid
    and this results in a crash while the clients connected to the AP vif
    tries to reconnect and this race is very similar to the one investigated
    by Michal in https://patchwork.kernel.org/patch/3788161/ and this does
    happens with hardware that supports 5Ghz alone after long hours of
    testing with continuous channel switch on the AP vif

    ieee80211 phy0: channel context reservation cannot be finalized because
    some interfaces aren't switching
    wlan0: failed to finalize CSA, disconnecting
    wlan0-1: deauthenticating from 8c:fd:f0:01:54:9c by local choice
    (Reason: 3=DEAUTH_LEAVING)

    WARNING: CPU: 1 PID: 19032 at net/mac80211/ieee80211_i.h:1013 sta_info_alloc+0x374/0x3fc [mac80211]
    [] (sta_info_alloc [mac80211])
    [] (ieee80211_add_station [mac80211]))
    [] (nl80211_new_station [cfg80211])

    Unable to handle kernel NULL pointer dereference at virtual
    address 00000014
    pgd = d5f4c000
    Internal error: Oops: 17 [#1] PREEMPT SMP ARM
    PC is at sta_info_alloc+0x380/0x3fc [mac80211]
    LR is at sta_info_alloc+0x37c/0x3fc [mac80211]
    [] (sta_info_alloc [mac80211])
    [] (ieee80211_add_station [mac80211])
    [] (nl80211_new_station [cfg80211]))

    Cc: Michal Kazior
    Signed-off-by: Mohammed Shafi Shajakhan
    Signed-off-by: Johannes Berg

    Mohammed Shafi Shajakhan
     

27 Apr, 2017

2 commits

  • At least on iwlwifi, sometimes lockdep complains that we can
    lock
    chanctx_mtx -> mvm.mutex -> iflist_mtx
    (due to iterate_interfaces)
    and
    iflist_mtx -> chanctx_mtx

    Remove the latter dependency in mac80211 by using the RTNL
    that we already hold in one case, and can relatively easily
    achieve in the other case.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • For multiple scheduled scan support the driver needs to know which
    scheduled scan request is being stopped. Pass the request id in the
    .sched_scan_stop() callback.

    Reviewed-by: Hante Meuleman
    Reviewed-by: Pieter-Paul Giesberts
    Reviewed-by: Franky Lin
    Signed-off-by: Arend van Spriel
    Signed-off-by: Johannes Berg

    Arend Van Spriel
     

13 Apr, 2017

4 commits

  • Refactor the code to have common code for changing monitor
    options when adding and changing virtual interfaces. This
    will make it easier to add BPF filters to both paths. Note
    that this code carefully checks the error conditions first
    and only then applies the changes, to guarantee atomicity.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Instead passing both flags, which can be NULL, and vif_params,
    which are never NULL, move the flags into the vif_params and
    use BIT(0), which is invalid from userspace, to indicate that
    the flags were changed.

    While updating all drivers, fix a small bug in wil6210 where
    it was setting the flags to 0 instead of leaving them unchanged.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • The MU-MIMO monitor follow functionality is broken because it
    doesn't clear the MU-MIMO owner even if both follow features
    are disabled. Fix that, and while at it move the code into a
    new helper function. Call this also when creating a new monitor
    interface to prepare for an upcoming cfg80211 change allowing
    that.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • When changing monitor parameters, not setting the MU-MIMO attributes
    should mean that they're not changed - it's documented that to turn
    the feature off it's necessary to set all-zero group membership and
    an invalid follow-address. This isn't implemented.

    Fix this by making the parameters pointers, stop reusing the macaddr
    struct member, and documenting that NULL pointers mean unchanged.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

08 Mar, 2017

1 commit

  • If the user rate mask results in no (basic) rates being usable,
    clear it. Also, if we're already operating when it's set, reject
    it instead.

    Technically, selecting basic rates as the criterion is a bit too
    restrictive, but calculating the usable rates over all stations
    (e.g. in AP mode) is harder, and all stations must support the
    basic rates. Similarly, in client mode, the basic rates will be
    used anyway for control frames.

    This fixes the "no supported rates (...) in rate_mask ..." warning
    that occurs on TX when you've selected a rate mask that's not
    compatible with the connection (e.g. an AP that enables only the
    rates 36, 48, 54 and you've selected only 6, 9, 12.)

    Reported-by: Kirtika Ruchandani
    Signed-off-by: Johannes Berg

    Johannes Berg
     

06 Mar, 2017

1 commit

  • Support .set_cqm_rssi_range_config if the beacons are available for
    processing in mac80211. There's no reason that this couldn't be
    offloaded by mac80211-based drivers but there's no driver method for
    that added in this patch.

    Signed-off-by: Andrew Zaborowski
    Signed-off-by: Johannes Berg

    Andrew Zaborowski
     

09 Feb, 2017

1 commit

  • The nl80211_nan_dual_band_conf enumeration doesn't make much sense.
    The default value is assigned to a bit, which makes it weird if the
    default bit and other bits are set at the same time.

    To improve this, get rid of NL80211_NAN_BAND_DEFAULT and add a wiphy
    configuration to let the drivers define which bands are supported.
    This is exposed to the userspace, which then can make a decision on
    which band(s) to use. Additionally, rename all "dual_band" elements
    to "bands", to make things clearer.

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

    Luca Coelho
     

13 Dec, 2016

1 commit

  • Add the ability for an AP (and associated VLANs) to perform
    multicast-to-unicast conversion for ARP, IPv4 and IPv6 frames
    (possibly within 802.1Q). If enabled, such frames are to be sent
    to each station separately, with the DA replaced by their own
    MAC address rather than the group address.

    Note that this may break certain expectations of the receiver,
    such as the ability to drop unicast IP packets received within
    multicast L2 frames, or the ability to not send ICMP destination
    unreachable messages for packets received in L2 multicast (which
    is required, but the receiver can't tell the difference if this
    new option is enabled.)

    This also doesn't implement the 802.11 DMS (directed multicast
    service).

    Signed-off-by: Michael Braun
    [use true/false, rename label to the correct "multicast",
    use __be16 for ethertype and network order for constants]
    Signed-off-by: Johannes Berg

    Michael Braun
     

27 Oct, 2016

1 commit

  • As part of interface combination checking, verify any new
    interface's beacon intervals. In fact, just always add the
    beacon interval since that's harmless.

    With this patch, mac80211 is prepared for drivers that set
    the min_beacon_int_gcd parameter in interface combinations.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

12 Oct, 2016

3 commits

  • This patch adds filtering for multicast data packets on AP_VLAN
    interfaces that have no authorized station connected and changes
    filtering on AP interfaces to not count stations assigned to
    AP_VLAN interfaces.

    This saves airtime and avoids waking up other stations currently
    authorized in this BSS. When using WPA, the packets dropped could
    not be decrypted by any station.

    The behaviour when there are no AP_VLAN interfaces is left unchanged.

    When there are AP_VLAN interfaces, this patch
    1. adds filtering multicast data packets sent on AP_VLAN interfaces
    that have no authorized station connected.
    No filtering happens on 4addr AP_VLAN interfaces.
    2. makes filtering of multicast data packets sent on AP interfaces
    depend on the number of authorized stations in this bss not
    assigned to an AP_VLAN interface.

    Therefore, a new num_mcast_sta counter is added for AP_VLAN interfaces.
    The existing one for AP interfaces is altered to not track stations
    assigned to an AP_VLAN interface.

    The new counter is exposed in debugfs.

    Signed-off-by: Michael Braun
    [reformat commit message a bit, unline ieee80211_vif_{inc,dec}_num_mcast]
    Signed-off-by: Johannes Berg

    Michael Braun
     
  • Checking for num_mcast_sta in __ieee80211_request_smps_ap() is
    unnecessary as sta list will be empty in this case anyway, so
    the list iteration will just exit immediately. Since this isn't
    a "hot" code path, it doesn't really matter, and the next patch
    will redefine num_mcast_sta to make this check invalid.

    Signed-off-by: Michael Braun
    [change commit message]
    Signed-off-by: Johannes Berg

    Michael Braun
     
  • sta_info_get_bss() is equivalent to sta_info_get() in the
    mesh case, since sta->sdata->bss will be NULL (it's only
    set for AP/AP_VLAN interfaces.) Thus, the mesh check here
    isn't actually needed - remove it.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

30 Sep, 2016

5 commits

  • 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
     
  • This allows user space to start/stop NAN interface.
    A NAN interface is like P2P device in a few aspects: it
    doesn't have a netdev associated to it.
    Add the new interface type and prevent operations that
    can't be executed on NAN interface like scan.

    Define several attributes that may be configured by user space
    when starting NAN functionality (master preference and dual
    band operation)

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

    Ayala Beker
     

15 Sep, 2016

1 commit


12 Sep, 2016

2 commits

  • 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
     
  • Insert the u32 monitor flags variable in a new structure
    that represents a monitor interface.
    This will allow to add more configuration variables to
    that structure which will happen in an upcoming change.

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

    Aviya Erenfeld
     

05 Aug, 2016

1 commit

  • The code currently assumes that buffered multicast PS frames don't have
    a pending ACK frame for tx status reporting.
    However, hostapd sends a broadcast deauth frame on teardown for which tx
    status is requested. This can lead to the "Have pending ack frames"
    warning on module reload.
    Fix this by using ieee80211_free_txskb/ieee80211_purge_tx_queue.

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

    Felix Fietkau
     

06 Jul, 2016

1 commit

  • Previously, mesh power management functionality works only with kernel
    MPM. Because user space MPM did not report mesh peer AID to kernel,
    the kernel could not identify the bit in TIM element. So this patch
    adds mesh peer AID setting API.

    Signed-off-by: Masashi Honma
    Signed-off-by: Johannes Berg

    Masashi Honma
     

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
     

06 Apr, 2016

2 commits

  • The regular RX path has a lot of code, but with a few
    assumptions on the hardware it's possible to reduce the
    amount of code significantly. Currently the assumptions
    on the driver are the following:
    * hardware/driver reordering buffer (if supporting aggregation)
    * hardware/driver decryption & PN checking (if using encryption)
    * hardware/driver did de-duplication
    * hardware/driver did A-MSDU deaggregation
    * AP_LINK_PS is used (in AP mode)
    * no client powersave handling in mac80211 (in client mode)

    of which some are actually checked per packet:
    * de-duplication
    * PN checking
    * decryption
    and additionally packets must
    * not be A-MSDU (have been deaggregated by driver/device)
    * be data packets
    * not be fragmented
    * be unicast
    * have RFC 1042 header

    Additionally dynamically we assume:
    * no encryption or CCMP/GCMP, TKIP/WEP/other not allowed
    * station must be authorized
    * 4-addr format not enabled

    Some data needed for the RX path is cached in a new per-station
    "fast_rx" structure, so that we only need to look at this and
    the packet, no other memory when processing packets on the fast
    RX path.

    After doing the above per-packet checks, the data path collapses
    down to a pretty simple conversion function taking advantage of
    the data cached in the small fast_rx struct.

    This should speed up the RX processing, and will make it easier
    to reason about parallelizing RX (for which statistics will need
    to be per-CPU still.)

    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

1 commit

  • The mesh path and mesh gate hashtables are global, containing
    all of the mpaths for every mesh interface, but the paths are
    all tied logically to a single interface. The common case is
    just a single mesh interface, so optimize for that by moving
    the global hashtable into the per-interface struct.

    Doing so allows us to drop sdata pointer comparisons inside
    the lookups and also saves a few bytes of BSS and data.

    Signed-off-by: Bob Copeland
    Signed-off-by: Johannes Berg

    Bob Copeland
     

24 Feb, 2016

2 commits

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