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/0x950Reported-by: Peter Große
Signed-off-by: Peter GroßeSigned-off-by: Johannes Berg
Signed-off-by: Sasha Levin
Signed-off-by: Greg Kroah-Hartman
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
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 -
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 -
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 -
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
15 Sep, 2016
1 commit
-
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
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
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
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
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
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
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 -
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
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 callsTotal 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 -
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 -
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 -
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 callTotal 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 -
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 -
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
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 -
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
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
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
06 May, 2015
1 commit
-
Extend the function to read the TKIP IV32/IV16 to read the IV/PN for
all ciphers in order to allow drivers with full hardware crypto to
properly support this.Signed-off-by: Johannes Berg
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
30 Mar, 2015
1 commit
-
We will be able to add more events, such as MLME events and
others. The low level driver may be interested in knowing
about these events to dump firmware data upon failures, or
to change parameters in case connection attempts fail etc...Signed-off-by: Emmanuel Grumbach
Signed-off-by: Johannes Berg
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
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 callsSigned-off-by: Felix Fietkau
Signed-off-by: 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
-
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 -
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
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 -
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 -
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
22 Oct, 2014
1 commit
-
There's no reason to ever set invalid CW_min/CW_max to the
drivers, we should catch it in higher layers. However, the
consequences of setting it wrong can be quite severe, so
double-check at a low level and error out for invalid data.Signed-off-by: Johannes Berg
09 Oct, 2014
3 commits
-
Channel switch with multiple channel contexts should now work fine.
Remove check that disallows switches when multiple contexts are in
use.Signed-off-by: Luciano Coelho
Signed-off-by: Johannes Berg -
As a counterpart to the pre_channel_switch operation, add a
post_channel_switch operation. This allows the drivers to go back to
a normal configuration after the channel switch is completed.Signed-off-by: Luciano Coelho
Signed-off-by: Johannes Berg -
Some drivers may need to prepare for a channel switch also when it is
initiated from the remote side (eg. station, P2P client). To make
this possible, add a generic callback that can be called for all
interface types.Signed-off-by: Luciano Coelho
Signed-off-by: Johannes Berg
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