09 Feb, 2011
1 commit
04 Feb, 2011
2 commits
-
Currently cfg80211 only configures the PSM state to the driver upon creation
of a new virtual interface, but not after interface type change. The mac80211
on the other hand reinitializes its sdata structure every time the interface
type is changed, losing the PSM configuration.Hence, if the interface type is changed to, say, ad-hoc and then back to
managed, "iw wlan0 get power_save" will claim that PSM is enabled, when in
fact on mac80211 level it is not.Fix this in cfg80211 by configuring the PSM state to the driver each time
the interface is brought up instead of just when the interface is created.Signed-off-by: Juuso Oikarinen
Signed-off-by: John W. Linville
29 Jan, 2011
2 commits
-
genlmsg_cancel subtracts some constants from its second argument before
calling nlmsg_cancel. nlmsg_cancel then calls nlmsg_trim on the same
arguments. nlmsg_trim tests for NULL before doing any computation, but a
NULL second argument to genlmsg_cancel is no longer NULL due to the initial
subtraction. Nothing else happens in this execution, so the call to
genlmsg_cancel is simply unnecessary in this case.The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression data;
@@if (data == NULL) { ...
* genlmsg_cancel(..., data);
...
return ...;
}
//Signed-off-by: Julia Lawall
Signed-off-by: John W. Linville -
Some vendor specific cipher suites require non-zero key indexes for pairwise
keys, but as of currently, the cfg80211 does not allow it.As validating they cipher parameters for vendor specific cipher suites is the
job of the driver or hardware/firmware, change the cfg80211 to allow also
non-zero pairwise key indexes for vendor specific ciphers.Signed-off-by: Juuso Oikarinen
Signed-off-by: John W. Linville
28 Jan, 2011
1 commit
22 Jan, 2011
1 commit
-
Extend channel to frequency mapping for 802.11j Japan 4.9GHz band, according to
IEEE802.11 section 17.3.8.3.2 and Annex J. Because there are now overlapping
channel numbers in the 2GHz and 5GHz band we can't map from channel to
frequency without knowing the band. This is no problem as in most contexts we
know the band. In places where we don't know the band (and WEXT compatibility)
we assume the 2GHz band for channels below 14.This patch does not implement all channel to frequency mappings defined in
802.11, it's just an extension for 802.11j 20MHz channels. 5MHz and 10MHz
channels as well as 802.11y channels have been omitted.The following drivers have been updated to reflect the API changes:
iwl-3945, iwl-agn, iwmc3200wifi, libertas, mwl8k, rt2x00, wl1251, wl12xx.
The drivers have been compile-tested only.Signed-off-by: Bruno Randolf
Signed-off-by: Brian Prodoehl
Acked-by: Luciano Coelho
Signed-off-by: John W. Linville
21 Jan, 2011
1 commit
-
The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
is used to configure any non-standard kernel with a much larger scope than
only small devices.This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
references to the option throughout the kernel. A new CONFIG_EMBEDDED
option is added that automatically selects CONFIG_EXPERT when enabled and
can be used in the future to isolate options that should only be
considered for embedded systems (RISC architectures, SLOB, etc).Calling the option "EXPERT" more accurately represents its intention: only
expert users who understand the impact of the configuration changes they
are making should enable it.Reviewed-by: Ingo Molnar
Acked-by: David Woodhouse
Signed-off-by: David Rientjes
Cc: Greg KH
Cc: "David S. Miller"
Cc: Jens Axboe
Cc: Arnd Bergmann
Cc: Robin Holt
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
05 Jan, 2011
1 commit
-
Fixes the misplaced article in the following:
"cfg80211: Updating information on frequency 5785 MHz for
20 a MHz width channel with regulatory rule:"Signed-off-by: Bob Copeland
Signed-off-by: John W. Linville
21 Dec, 2010
5 commits
-
Export the information which antennas are available for configuration as TX or
RX antennas via nl80211.Signed-off-by: Bruno Randolf
Signed-off-by: John W. Linville -
As has been pointed out by Daniel Halperin some devices (e.g. Intel IWL5100)
can only TX from a subset of RX antennas, so use separate availability masks
for RX and TX.Signed-off-by: Bruno Randolf
Signed-off-by: John W. Linville -
Let path selection frames for protocols other than HWMP be sent to
userspace via NL80211_CMD_REGISTER_FRAME. Also allow userspace to send
and receive mesh path selection frames.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
Userspace will now be allowed to toggle between the default path
selection algorithm (HWMP, implemented in the kernel), and a vendor
specific alternative. Also in the same patch, allow userspace to add
information elements to mesh beacons. This is accordance with the
Extensible Path Selection Framework specified in version 7.0 of the
802.11s draft.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
Mesh parameters can be to setup a mesh or to configure it.
This patch renames the ambiguous name mesh_params to mesh_config
in preparation for mesh_setup.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville
17 Dec, 2010
2 commits
-
Once we moved the core regulatory request to the queue and let
the scheduler process it last_request will have been left NULL
until the schedular decides to process the first request. When
this happens and we are loading a driver with a custom regulatory
request like all Atheros drivers we end up with a NULL pointer
dereference. We fix this by checking if the request was a
custom one.BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
IP: [] freq_reg_info_regd.clone.2+0x27/0x130 [cfg80211]
PGD 71f91067 PUD 712b2067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/firmware/2-1/loading
CPU 0
Modules linked in: ath9k_htc(+) ath9k_common ath9k_hw ath
Pid: 3094, comm: insmod Tainted: G W 2.6.37-rc5-wl #16 INVALID/28427ZQ
RIP: 0010:[] [] freq_reg_info_regd.clone.2+0x27/0x130 [cfg80211]
RSP: 0018:ffff88007045db78 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffffffffa047d9a0 RCX: ffff88007045dbd0
RDX: 0000000000004e20 RSI: 000000000024cde0 RDI: ffff8800700483e0
RBP: ffff88007045db98 R08: ffffffffa02f5b40 R09: 0000000000000001
R10: 000000000000000e R11: 0000000000000001 R12: 0000000000000000
R13: ffff88007004e3b0 R14: 0000000000000000 R15: ffff880070048340
FS: 00007f635a707700(0000) GS:ffff880077400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000004 CR3: 00000000708a9000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process insmod (pid: 3094, threadinfo ffff88007045c000, task ffff8800713e3ec0)
Stack:
ffffffffa047d9a0 0000000000000000 ffff88007004e3b0 0000000000000000
ffff88007045dc08 ffffffffa016e147 000000007045dc08 0000000000000002
ffff8800700483e0 ffffffffa02f5b40 ffff88007045dbd8 0000000000000000
Call Trace:
[] wiphy_apply_custom_regulatory+0x137/0x1d0 [cfg80211]
[] ? ath9k_reg_notifier+0x0/0x50 [ath9k_htc]
[] ath_regd_init+0x347/0x430 [ath]
[] ath9k_htc_probe_device+0x6c5/0x960 [ath9k_htc]
[] ath9k_htc_hw_init+0xc/0x30 [ath9k_htc]
[] ath9k_hif_usb_probe+0x216/0x3b0 [ath9k_htc]
[] usb_probe_interface+0x10c/0x210 [usbcore]
[] driver_probe_device+0x96/0x1c0
[] __driver_attach+0xa3/0xb0
[] ? __driver_attach+0x0/0xb0
[] bus_for_each_dev+0x5e/0x90
[] driver_attach+0x19/0x20
[] bus_add_driver+0x168/0x320
[] driver_register+0x71/0x140
[] ? __raw_spin_lock_init+0x38/0x70
[] usb_register_driver+0xdc/0x190 [usbcore]
[] ? ath9k_htc_init+0x0/0x4f [ath9k_htc]
[] ath9k_hif_usb_init+0x1e/0x20 [ath9k_htc]
[] ath9k_htc_init+0x2b/0x4f [ath9k_htc]
[] do_one_initcall+0x3f/0x180
[] sys_init_module+0xbb/0x200
[] system_call_fastpath+0x16/0x1b
Code:
RIP [] freq_reg_info_regd.clone.2+0x27/0x130 [cfg80211]
RSP
CR2: 0000000000000004
---[ end trace 79e4193601c8b713 ]---Reported-by: Sujith Manoharan
Signed-off-by: Luis R. Rodriguez
Signed-off-by: John W. Linville -
Add a new notification to indicate that a received, unprotected
Deauthentication or Disassociation frame was dropped due to
management frame protection being in use. This notification is
needed to allow user space (e.g., wpa_supplicant) to implement
SA Query procedure to recover from association state mismatch
between an AP and STA.This is needed to avoid getting stuck in non-working state when MFP
(IEEE 802.11w) is used and a protected Deauthentication or
Disassociation frame is dropped for any reason. After that, the
station would silently discard any unprotected Deauthentication or
Disassociation frame that could be indicating that the AP does not
have association for the STA (when the Reason Code would be 6 or 7).
IEEE Std 802.11w-2009, 11.13 describes this recovery mechanism.Signed-off-by: Jouni Malinen
Signed-off-by: John W. Linville
16 Dec, 2010
1 commit
-
With the upcoming hardware offload implementation,
some devices will have a different maximum duration
for the remain-on-channel command. Advertise the
maximum duration in mac80211, and make mac80211 set
it.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
14 Dec, 2010
3 commits
-
Allow userspace to specify that a given key
is default only for unicast and/or multicast
transmissions. Only WEP keys are for both,
WPA/RSN keys set here are GTKs for multicast
only. For more future flexibility, allow to
specify all combiations.Wireless extensions can only set both so use
nl80211; WEP keys (connect keys) must be set
as default for both (but 802.1X WEP is still
possible).Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
When a cached BSS struct is updated because a new beacon was received,
the code replaces the cached information elements by the IEs from the
new beacon. However it did not update the pub.information_elements
and pub.len_information_elements fields leaving them either pointing
to the old beacon IEs or in an inconsistent state where the data is
replaced by the new beacon IEs but len_information_elements still has
its value from the first beacon.Fix this by updating the information elements fields if they are
pointing to beacon IEs.Signed-off-by: Sven Neumann
Reviewed-by: Johannes Berg
Signed-off-by: John W. Linville -
Add a field to wiphy for the hardware to report the availble antennas for
configuration. Only if this is set to something bigger than zero, will the
anntenna configuration ops be executed.Allthough this could be a simple number of antennas, I defined it as a bitmap
of antennas which are available for configuration, since it's more consistent
with the rest of the antenna API and there could be cases where the
hardware allows only configuration of certain antennas. As it does not make
much of a difference in size or normal usage, I think it's better to be able to
support this, in case the need arises.The antenna configuration is now also checked against the availabe antennas and
rejected if it does not match.Signed-off-by: Bruno Randolf
--
v3: always apply available antenna mask (for "all" antennas case).v2: reject antenna configurations which don't match the available antennas
Signed-off-by: John W. Linville
09 Dec, 2010
1 commit
-
Add a new BSS attribute to allow hostapd to set the current HT opmode.
Otherwise drivers won't be able to set up protection for HT rates in
AP mode.Cc: Johannes Berg
Signed-off-by: Helmut Schaa
Signed-off-by: John W. Linville
08 Dec, 2010
1 commit
-
Extend nl80211 to report an exponential weighted moving average (EWMA) of the
signal value. Since the signal value usually fluctuates between different
packets, an average can be more useful than the value of the last packet.This uses the recently added generic EWMA library function.
--
v2: fix ABI breakage and change factor to be a power of 2.Signed-off-by: Bruno Randolf
Signed-off-by: John W. Linville
07 Dec, 2010
4 commits
-
Instead of tying mesh activity to interface up,
add join and leave commands for mesh. Since we
must be backward compatible, let cfg80211 handle
joining a mesh if a mesh ID was pre-configured
when the device goes up.Note that this therefore must modify mac80211 as
well since mac80211 needs to lose the logic to
start the mesh on interface up.We now allow querying mesh parameters before the
mesh is connected, which simply returns defaults.
Setting them (internally renamed to "update") is
only allowed while connected. Specify them with
the new mesh join command instead where needed.In mac80211, beaconing must now also follow the
mesh enabled/not enabled state, which is done
by testing the mesh ID.Signed-off-by: Javier Cardona
Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
I'm going to need this in a new place later.
Tested-by: Javier Cardona
Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
cfg80211 used to do all its bookkeeping in
the notifier, but some new stuff will have
to use local variables so make the callback
return the netdev pointer.Tested-by: Javier Cardona
Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
The TTL in path selection information elements is different from
the mesh ttl used in mesh data frames. Version 7.03 of the 11s
draft calls this ttl 'Element TTL'.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
30 Nov, 2010
1 commit
-
With p2p, it is sometimes necessary to transmit
a frame (typically an action frame) on another
channel than the current channel. Enable this
through the CMD_FRAME API, and allow it to wait
for a response. A new command allows that wait
to be aborted.However, allow userspace to specify whether or
not it wants to allow off-channel TX, it may
actually want to use the same channel only.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
25 Nov, 2010
5 commits
-
This adds the ability for drivers to use CQM events
to notify about packet loss for specific stations
(which could be the AP for the managed mode case).
Since the threshold might be determined by the
driver (it isn't passed in right now) it will be
passed out of the driver to userspace in the event.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
- store the multicast rate as an index instead of the rate value
(reduces cpu overhead in a hotpath)
- validate the rate values (must match a bitrate in at least one sband)Signed-off-by: Felix Fietkau
Signed-off-by: John W. Linville -
No change in output for pr_ prefixes.
netdev_ output is different, arguably improved.Signed-off-by: Joe Perches
Signed-off-by: John W. Linville -
This reverts commit 86107fd170bc379869250eb7e1bd393a3a70e8ae.
This patch inadvertantly changed the userland ABI.
Signed-off-by: John W. Linville
23 Nov, 2010
4 commits
-
When two cards are connected with the same regulatory domain
if CRDA had a delayed response then cfg80211's own set regulatory
domain would still be the world regulatory domain. There was a bug
on cfg80211's logic such that it assumed that once you pegged a
request as the last request it was already the currently set
regulatory domain. This would mean we would race setting a stale
regulatory domain to secondary cards which had the same regulatory
domain since the alpha2 would match.We fix this by processing each regulatory request atomically,
and only move on to the next one once we get it fully processed.
In the case CRDA is not present we will simply world roam.This issue is only present when you have a slow system and the
CRDA processing is delayed. Because of this it is not a known
regression.Without this fix when a delay is present with CRDA the second card
would end up with an intersected regulatory domain and not allow it
to use the channels it really is designed for. When two cards with
two different regulatory domains were inserted you'd end up
rejecting the second card's regulatory domain request.
This fails with mac80211_hswim's regtest=2 (two requests, same alpha2)
and regtest=3 (two requests, different alpha2) module parameter
options.This was reproduced and tested against mac80211_hwsim using this
CRDA delayer:#!/bin/bash
echo $COUNTRY >> /tmp/log
sleep 2
/sbin/crda.origAnd these regulatory tests:
modprobe mac80211_hwsim regtest=2
modprobe mac80211_hwsim regtest=3Reported-by: Mark Mentovai
Signed-off-by: Luis R. Rodriguez
Tested-by: Mark Mentovai
Tested-by: Bruno Randolf
Signed-off-by: John W. Linville -
This will be required in the next patch and it makes the
next patch easier to review.Signed-off-by: Luis R. Rodriguez
Tested-by: Mark Mentovai
Tested-by: Bruno Randolf
Signed-off-by: John W. Linville -
These will be used earlier in the next few patches.
Signed-off-by: Luis R. Rodriguez
Tested-by: Mark Mentovai
Tested-by: Bruno Randolf
Signed-off-by: John W. Linville -
This will simplify the synchronization for pending requests.
Without this we have a race between the core and when we
restore regulatory settings, although this is unlikely
its best to just avoid that race altogether.Signed-off-by: Luis R. Rodriguez
Tested-by: Mark Mentovai
Tested-by: Bruno Randolf
Signed-off-by: John W. Linville
19 Nov, 2010
2 commits
-
Extend nl80211 to report an exponential weighted moving average (EWMA) of the
signal value. Since the signal value usually fluctuates between different
packets, an average can be more useful than the value of the last packet.This uses the recently added generic EWMA library function.
Signed-off-by: Bruno Randolf
Signed-off-by: John W. Linville -
This follows wireless-testing 9236d838c920e90708570d9bbd7bb82d30a38130
("cfg80211: fix extension channel checks to initiate communication") and
fixes accidental case fall-through. Without this fix, HT40 is entirely
blocked.Signed-off-by: Mark Mentovai
Cc: stable@kernel.org
Acked-by: Luis R. Rodriguez
17 Nov, 2010
2 commits
-
Signed-off-by: Felix Fietkau
Signed-off-by: John W. Linville -
Allow setting of TX and RX antennas configuration via nl80211.
The antenna configuration is defined as a bitmap of allowed antennas to use.
This API can be used to mask out antennas which are not attached or should not
be used for other reasons like regulatory concerns or special setups.Separate bitmaps are used for RX and TX to allow configuring different antennas
for receiving and transmitting. Each bitmap is 32 bit long, each bit
representing one antenna, starting with antenna 1 at the first bit. If an
antenna bit is set, this means the driver is allowed to use this antenna for RX
or TX respectively; if the bit is not set the hardware is not allowed to use
this antenna.Using bitmaps has the benefit of allowing for a flexible configuration
interface which can support many different configurations and which can be used
for 802.11n as well as non-802.11n devices. Instead of relying on some hardware
specific assumptions, drivers can use this information to know which antennas
are actually attached to the system and derive their capabilities based on
that.802.11n devices should enable or disable chains, based on which antennas are
present (If all antennas belonging to a particular chain are disabled, the
entire chain should be disabled). HT capabilities (like STBC, TX Beamforming,
Antenna selection) should be calculated based on the available chains after
applying the antenna masks. Should a 802.11n device have diversity antennas
attached to one of their chains, diversity can be enabled or disabled based on
the antenna information.Non-802.11n drivers can use the antenna masks to select RX and TX antennas and
to enable or disable antenna diversity.While covering chainmasks for 802.11n and the standard "legacy" modes "fixed
antenna 1", "fixed antenna 2" and "diversity" this API also allows more rare,
but useful configurations as follows:1) Send on antenna 1, receive on antenna 2 (or vice versa). This can be used to
have a low gain antenna for TX in order to keep within the regulatory
constraints and a high gain antenna for RX in order to receive weaker signals
("speak softly, but listen harder"). This can be useful for building long-shot
outdoor links. Another usage of this setup is having a low-noise pre-amplifier
on antenna 1 and a power amplifier on the other antenna. This way transmit
noise is mostly kept out of the low noise receive channel.
(This would be bitmaps: tx 1 rx 2).2) Another similar setup is: Use RX diversity on both antennas, but always send
on antenna 1. Again that would allow us to benefit from a higher gain RX
antenna, while staying within the legal limits.
(This would be: tx 0 rx 3).3) And finally there can be special experimental setups in research and
development even with pre 802.11n hardware where more than 2 antennas are
available. It's good to keep the API simple, yet flexible.Signed-off-by: Bruno Randolf
--
v7: Made bitmasks 32 bit wide and rebased to latest wireless-testing.
Signed-off-by: John W. Linville