18 Jan, 2017

1 commit


11 Jan, 2017

1 commit

  • In the current minimum chandef code there's an issue in that the
    recalculation can happen after rate control is initialized for a
    station that has a wider bandwidth than the current chanctx, and
    then rate control can immediately start using those higher rates
    which could cause problems.

    Observe that first of all that this problem is because we don't
    take non-associated and non-uploaded stations into account. The
    restriction to non-associated is quite pointless and is one of
    the causes for the problem described above, since the rate init
    will happen before the station is set to associated; no frames
    could actually be sent until associated, but the rate table can
    already contain higher rates and that might cause problems.

    Also, rejecting non-uploaded stations is wrong, since the rate
    control can select higher rates for those as well.

    Secondly, it's then necessary to recalculate the minimal config
    before initializing rate control, so that when rate control is
    initialized, the higher rates are already available. This can be
    done easily by adding the necessary function call in rate init.

    Change-Id: Ib9bc02d34797078db55459d196993f39dcd43070
    Signed-off-by: Johannes Berg

    Johannes Berg
     

13 Dec, 2016

1 commit

  • Commit 5bcae31d9 (mac80211: implement multi-vif in-place reservations)
    introduced ieee80211_vif_use_reserved_switch() with a counter variable
    'i' that is set but not used. Compiling with W=1 gives the following
    warning, fix it.
    net/mac80211/chan.c: In function ‘ieee80211_vif_use_reserved_switch’:
    net/mac80211/chan.c:1273:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]

    This is a harmless warning, and is only being fixed to reduce the
    noise obtained with W=1 in the kernel.

    Fixes: 5bcae31d9 ("mac80211: implement multi-vif in-place reservations")
    Cc: Michal Kazior
    Cc: Johannes Berg
    Signed-off-by: Kirtika Ruchandani
    Signed-off-by: Johannes Berg

    Kirtika Ruchandani
     

30 Sep, 2016

2 commits

  • 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
     

05 Apr, 2016

1 commit


24 Feb, 2016

1 commit

  • The minimum chandef bandwidth calculation was done only in case
    a new station was inserted (or when an existing station was removed).
    However, it is possible that stations are inserted before they are
    associated, e.g., when FULL_AP_CLIENT_STATE is supported and user
    space adds stations unassociated.

    Fix this by calling ieee80211_recalc_min_chandef() whenever
    a station transitions in/out the associated state, and only
    consider station marked as associated.

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

    Ilan Peer
     

17 Jul, 2015

1 commit

  • Define a station chandef, to be used for wider-bw TDLS peers. When both
    peers support the feature, upgrade the channel bandwidth to the maximum
    allowed by both peers and regulatory. Currently widths up to 80MHz are
    supported in the 5GHz band.

    When a TDLS peer connects/disconnects recalculate the channel type of the
    current chanctx.
    Make the chanctx width calculation consider wider-bw TDLS peers and
    similarly fix the max_required_bw calculation for the chanctx min_def.
    Since the sta->bandwidth is calculated only later on, take
    bss_conf.chandef.width as the minimal width for station interface.

    Set the upgraded channel width in the VHT-operation set during TDLS setup.

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

    Arik Nemtsov
     

07 May, 2015

1 commit

  • When a vif starts using a reserved channel context (during CSA, for example)
    the required chandef was recalculated, however it was never applied.
    This could result in using chanctx with narrower width than actually
    required. Fix this by calling ieee80211_change_chanctx with the recalculated
    chandef. This both changes the chanctx's width and recalcs min_def.

    Signed-off-by: Andrei Otcheretianski
    Reviewed-by: Luciano Coelho
    Signed-off-by: Johannes Berg

    Andrei Otcheretianski
     

22 Apr, 2015

1 commit

  • In order to speed up mac80211's TX path, add the "fast-xmit" cache
    that will cache the data frame 802.11 header and other data to be
    able to build the frame more quickly. This cache is rebuilt when
    external triggers imply changes, but a lot of the checks done per
    packet today are simplified away to the check for the cache.

    There's also a more detailed description in the code.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

24 Feb, 2015

1 commit

  • If ieee80211_vif_use_channel() fails, we have to clear
    sdata->radar_required (which we might have just set).

    Failing to do it results in stale radar_required field
    which prevents starting new scan requests.

    Reported-by: Jouni Malinen
    Signed-off-by: Eliad Peller
    [use false instead of 0]
    Signed-off-by: Johannes Berg

    Eliad Peller
     

23 Jan, 2015

1 commit

  • Control per packet Transmit Power Control (TPC) in lower drivers
    according to TX power settings configured by the user. In particular TPC is
    enabled if value passed in enum nl80211_tx_power_setting is
    NL80211_TX_POWER_LIMITED (allow using less than specified from userspace),
    whereas TPC is disabled if nl80211_tx_power_setting is set to
    NL80211_TX_POWER_FIXED (use value configured from userspace)

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

    Lorenzo Bianconi
     

14 Jan, 2015

2 commits

  • ctx->conf.radar_enabled should reflect whether radar
    detection is enabled for the channel context.

    When calculating it, make it consider only the vifs
    that have this context assigned (instead of all the
    vifs).

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

    Eliad Peller
     
  • local->radar_detect_enabled should tell whether
    radar_detect is enabled on any interface belonging
    to local.

    However, it's not getting updated correctly
    in many cases (actually, when testing with hwsim
    it's never been set, even when the dfs master
    is beaconing).

    Instead of handling all the corner cases
    (e.g. channel switch), simply check whether
    radar detection is enabled only when needed,
    instead of caching the result.

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

    Eliad Peller
     

12 Dec, 2014

1 commit

  • When the channel switch has been made, a vif is now using
    the channel context which was reserved. When that happens,
    we need to update the channel context since its parameters
    may change.

    I hit a case in which I switched to a 40Mhz channel but the
    reserved channel context was still on 20Mhz. The rate control
    would try to send 40Mhz packets on a 20Mhz channel context and
    that made iwlwifi's firmware unhappy.

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

    Emmanuel Grumbach
     

28 Nov, 2014

1 commit

  • Instead of keeping track of all those special cases where
    VLAN interfaces have no bss_conf.chandef, just make sure
    they have the same as the AP interface they belong to.

    Among others, this fixes a crash getting a VLAN's channel
    from userspace since a NULL channel is returned as a good
    result (return value 0) for VLANs since the commit below.

    Cc: stable@vger.kernel.org [3.18 only]
    Fixes: c12bc4885f4b3 ("mac80211: return the vif's chandef in ieee80211_cfg_get_channel()")
    Signed-off-by: Felix Fietkau
    [rewrite commit log]
    Signed-off-by: Johannes Berg

    Felix Fietkau
     

04 Nov, 2014

2 commits

  • 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
     
  • This patch adds new iface type (NL80211_IFTYPE_OCB) representing
    the OCB (Outside the Context of a BSS) mode.
    When establishing a connection to the network a cfg80211_join_ocb
    function is called (particular nl80211_command is added as well).
    A mandatory parameters during the ocb_join operation are 'center
    frequency' and 'channel width (5/10 MHz)'.

    Changes done in mac80211 are minimal possible required to avoid
    many warnings (warning: enumeration value 'NL80211_IFTYPE_OCB'
    not handled in switch) during compilation. Full functionality
    (where needed) is added in the following patch.

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

    Rostislav Lisovy
     

31 Oct, 2014

1 commit


08 Sep, 2014

1 commit


05 Sep, 2014

2 commits

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

    Johannes Berg <johannes@sipsolutions.net> says:

    "Not that much content this time. Some RCU cleanups, crypto
    performance improvements, and various patches all over,
    rather than listing them one might as well look into the
    git log instead."

    Signed-off-by: John W. Linville <linville@tuxdriver.com>

    Conflicts:
    drivers/net/wireless/ath/wil6210/wmi.c

    John W. Linville
     
  • …ernel/git/jberg/mac80211

    Johannes Berg <johannes@sipsolutions.net> says:

    "Here are a few fixes for mac80211. One has been discussed for a while
    and adds a terminating NUL-byte to the alpha2 sent to userspace, which
    shouldn't be necessary but since many places treat it as a string we
    couldn't move to just sending two bytes.

    In addition to that, we have two VLAN fixes from Felix, a mesh fix, a
    fix for the recently introduced RX aggregation offload, a revert for
    a broken patch (that luckily didn't really cause any harm) and a small
    fix for alignment in debugfs."

    Signed-off-by: John W. Linville <linville@redhat.com>

    John W. Linville
     

29 Aug, 2014

1 commit

  • When a device driver is unloaded local->interfaces
    list is cleared. If there was more than 1
    interface running and connected (bound to a
    chanctx) then chantype recalc was called and it
    ended up with compat being NULL causing a call
    trace warning.

    Warn if compat becomes NULL as a result of
    incompatible bss_conf.chandef of interfaces bound
    to a given channel context only.

    The call trace looked like this:

    WARNING: CPU: 2 PID: 2594 at /devel/src/linux/net/mac80211/chan.c:557 ieee80211_recalc_chanctx_chantype+0x2cd/0x2e0()
    Modules linked in: ath10k_pci(-) ath10k_core ath
    CPU: 2 PID: 2594 Comm: rmmod Tainted: G W 3.16.0-rc1+ #150
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
    0000000000000009 ffff88001ea279c0 ffffffff818dfa93 0000000000000000
    ffff88001ea279f8 ffffffff810514a8 ffff88001ce09cd0 ffff88001e03cc58
    0000000000000000 ffff88001ce08840 ffff88001ce09cd0 ffff88001ea27a08
    Call Trace:
    [] dump_stack+0x4d/0x66
    [] warn_slowpath_common+0x78/0xa0
    [] warn_slowpath_null+0x15/0x20
    [] ieee80211_recalc_chanctx_chantype+0x2cd/0x2e0
    [] ? ieee80211_recalc_chanctx_chantype+0x2a/0x2e0
    [] ieee80211_assign_vif_chanctx+0x1a9/0x770
    [] __ieee80211_vif_release_channel+0x70/0x130
    [] ieee80211_vif_release_channel+0x43/0xb0
    [] ieee80211_stop_ap+0x21e/0x5a0
    [] __cfg80211_stop_ap+0x85/0x520
    [] __cfg80211_leave+0x68/0x120
    [] cfg80211_leave+0x28/0x40
    [] cfg80211_netdev_notifier_call+0x373/0x6b0
    [] notifier_call_chain+0x55/0x110
    [] raw_notifier_call_chain+0x11/0x20
    [] call_netdevice_notifiers_info+0x30/0x60
    [] __dev_close_many+0x59/0xf0
    [] dev_close_many+0x81/0x120
    [] rollback_registered_many+0x115/0x2a0
    [] unregister_netdevice_many+0x16/0xa0
    [] ieee80211_remove_interfaces+0x121/0x1b0
    [] ieee80211_unregister_hw+0x56/0x110
    [] ath10k_mac_unregister+0x14/0x60 [ath10k_core]
    [] ath10k_core_unregister+0x27/0x40 [ath10k_core]
    [] ath10k_pci_remove+0x44/0xa0 [ath10k_pci]
    [] pci_device_remove+0x28/0x60
    [] __device_release_driver+0x64/0xd0
    [] driver_detach+0xb8/0xc0
    [] bus_remove_driver+0x4a/0xb0
    [] driver_unregister+0x27/0x50

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

    Michal Kazior
     

26 Aug, 2014

2 commits


23 Aug, 2014

1 commit

  • The new_ctx pointer is set only for non-chanctx drivers. This yielded a
    crash for chanctx-based drivers during channel switch finalization:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
    IP: ieee80211_vif_use_reserved_switch+0x71c/0xb00 [mac80211]

    Use an adequate chanctx pointer to fix this.

    Reported-by: Linus Torvalds
    Signed-off-by: Michal Kazior
    Signed-off-by: Linus Torvalds

    Michal Kazior
     

18 Jul, 2014

1 commit


26 Jun, 2014

3 commits

  • Channel switch finalization is now 2-step. First
    step is when driver calls chswitch_done(), the
    other is when reservation is actually finalized
    (which be defered for in-place reservation).

    It is now safe to call ieee80211_chswitch_done()
    more than once.

    Also remove the ieee80211_vif_change_channel()
    because it is no longer used.

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

    Michal Kazior
     
  • Channel switch finalization is now 2-step. First
    step is when driver calls csa_finish(), the other
    is when reservation is actually finalized (which
    can be deferred for in-place reservation).

    It is now safe to call ieee80211_csa_finish() more
    than once.

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

    Michal Kazior
     
  • Multi-vif in-place reservations happen when
    it is impossible to allocate more channel contexts
    as indicated by interface combinations.

    Such reservations are not finalized until all
    assigned interfaces are ready.

    This still doesn't handle all possible cases
    (i.e. degradation of number of channels) properly.

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

    Michal Kazior
     

23 May, 2014

1 commit


05 May, 2014

1 commit

  • The 'local' variable in __ieee80211_vif_copy_chanctx_to_vlans()
    is only used/needed when lockdep is compiled in, mark it as such
    to avoid compile warnings in the other case.

    While at it, fix some indentation where it's used.

    Reviewed-by: Luciano Coelho
    Reviewed-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Johannes Berg
     

01 May, 2014

1 commit


25 Apr, 2014

7 commits

  • It doesn't make much sense to store refcount in
    the chanctx structure. One still needs to hold
    chanctx_mtx to get the value safely. Besides,
    refcount isn't on performance critical paths.

    This will make implementing chanctx reservation
    refcounting a little easier.

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

    Michal Kazior
     
  • The function did a little too much. Split it up so
    the code can be easily reused in the future.

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

    Michal Kazior
     
  • The function did a little too much. Split it up so
    the code can be easily reused in the future.

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

    Michal Kazior
     
  • Use a separate function to look for reservation
    chanctx. For multi-interface/channel reservation
    search sematics differ slightly.

    The new routine allows reservations to be merged
    with chanctx that are already reserved by other
    interface(s).

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

    Michal Kazior
     
  • This allows new vifs to be assigned to a chanctx
    as long as chanctx's reservation chandefs (if any)
    and chanctx's current chandef (implied by assigned
    vifs at the time, if any) and the new vif chandef
    are all compatible.

    This implies it is impossible to assign a new vif
    to an in-place reservation chanctx.

    This gives no advantages for single-channel
    hardware. It makes sense for multi-channel
    hardware only.

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

    Michal Kazior
     
  • This can be useful. Provides a more straghtforward
    way to iterate over interfaces taking part in
    chanctx reservation and allows tracking chanctx
    usage explicitly.

    The structure is protected by local->chanctx_mtx.

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

    Michal Kazior
     
  • This can be useful. Provides a more straghtforward
    way to iterate over interfaces bound to a given
    chanctx and allows tracking chanctx usage
    explicitly.

    The structure is protected by local->chanctx_mtx.

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

    Michal Kazior