nullfunc frames are better for connection monitoring, because probe requests
are answered even if the AP has already dropped the connection, whereas
nullfunc frames from an unassociated station will trigger a disassoc/deauth
frame from the AP (WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA), which allows
the station to reconnect immediately instead of waiting until it attempts to
transmit the next unicast frame.
This only works on hardware with reliable tx ACK reporting, any other hardware
needs to fall back to the probe request method.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
- 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 <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Check the connection by probing the AP (either using nullfunc or a
probe request). If nullfunc probing is supported and the assoc is no
longer valid, the AP will send a disassoc/deauth immediately.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Instead of using a fixed 2 second timeout, calculate beacon loss interval
from the advertised beacon interval and a frame count. With this beacon
loss happens after N (default 7) consecutive frames are missed which
for a typical setup (100TU beacon interval) is ~700ms (or ~1/3 previous).
Signed-off-by: Sam Leffler <sleffler@chromium.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Remove some typos, warnings, initialize some values to follow wl's code path.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Additional comment by Larry Finger <Larry.Finger@lwfinger.net>:
This change deserves a bit more explanation. You might include something like
"These tables came from reverse engineering the 5.10.56.46 version of the
Broadcom driver. Trace comparisons between b43 and the current Broadcom driver
(5.10.120.0) show byte reversals for the PHY register writes."
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
No change in output for pr_<level> prefixes.
netdev_<level> output is different, arguably improved.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fix unbalanced call to sdio_release_host() on the error path.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
wireless-testing commit a05b5d4504
ath9k: add support for reading eeprom from platform data on PCI devices
This change moved the initialization of the AH_USE_EEPROM flag from ath9k_hw
to ath9k. This needs to be added to ath9k_htc as well
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Under load, a large number of frames can produce decryption errors, even when
no key cache update is being done. Performing a key search for every single
frame in an A-MPDU improves reliability.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mark arrays const that are unmodified after initializations.
text data bss dec hex filename
19291 56 4136 23483 5bbb drivers/net/wireless/zd1211rw/zd_chip.o.old
19291 56 4136 23483 5bbb drivers/net/wireless/zd1211rw/zd_chip.o.new
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
text data bss dec hex filename
40197 56 8336 48589 bdcd drivers/net/wireless/rt2x00/rt2800lib.o.new
40205 56 8336 48597 bdd5 drivers/net/wireless/rt2x00/rt2800lib.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
text data bss dec hex filename
41757 2205 9896 53858 d262 drivers/net/wireless/rndis_wlan.o.old
41653 2205 9880 53738 d1ea drivers/net/wireless/rndis_wlan.o.new
Changed functions rndis_set_oid and set_bssid to take const *'s.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
text data bss dec hex filename
42607 3581 8536 54724 d5c4 drivers/net/wireless/ray_cs.o.new
42603 3585 8536 54724 d5c4 drivers/net/wireless/ray_cs.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
text data bss dec hex filename
3650 56 704 4410 113a drivers/net/wireless/libertas/rx.o.new
3695 56 704 4455 1167 drivers/net/wireless/libertas/rx.o.old
27328 964 5240 33532 82fc drivers/net/wireless/libertas/cfg.o.new
27328 964 5240 33532 82fc drivers/net/wireless/libertas/cfg.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
text data bss dec hex filename
48644 57 12120 60821 ed95 drivers/net/wireless/b43/phy_n.o.new
48661 57 12120 60838 eda6 drivers/net/wireless/b43/phy_n.o.old
37906 86 7904 45896 b348 drivers/net/wireless/iwlwifi/iwl-agn-lib.o.new
37937 86 7904 45927 b367 drivers/net/wireless/iwlwifi/iwl-agn-lib.o.old
37781 523 6752 45056 b000 drivers/net/wireless/iwlwifi/iwl-3945.o.new
37781 523 6752 45056 b000 drivers/net/wireless/iwlwifi/iwl-3945.o.old
Changed b43_nphy_write_clip_detection to take a const u16 *
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
text data bss dec hex filename
5502 56 1336 6894 1aee drivers/net/wireless/b43/phy_common.o.new
5511 56 1336 6903 1af7 drivers/net/wireless/b43/phy_common.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
text data bss dec hex filename
42578 720 8528 51826 ca72 drivers/net/wireless/atmel.o.old
42578 720 8528 51826 ca72 drivers/net/wireless/atmel.o.new
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
text data bss dec hex filename
1897 56 672 2625 a41 drivers/net/wireless/ath/carl9170/cmd.o.new
1897 56 672 2625 a41 drivers/net/wireless/ath/carl9170/cmd.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
text data bss dec hex filename
11266 56 2464 13786 35da drivers/net/wireless/ath/ath5k/ani.o.old
11181 56 2464 13701 3585 drivers/net/wireless/ath/ath5k/ani.o.new
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The commit: "carl9170: tx path review" introduced a regression.
gcc (with -Winit-self):
tx.c:1264: warning: ‘super’ is used uninitialized in this function
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Remove duplicated #include('s) in
drivers/net/wireless/libertas/cfg.c
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
If only 3945 is selected, and is a module, build
fails because iwl-legacy.c won't be compiled. Fix
this by adding it to the build correctly.
This doesn't happen for 4965 because it is a bool
option, not tristate, since it's built into the
AGN module.
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When using AP VLAN interfaces, each VLAN interface should be in its own
broadcast domain. Hostapd achieves this by assigning different GTKs to
different AP VLAN interfaces.
However, mac80211 drivers are not aware of AP VLAN interfaces and as
such mac80211 sends the GTK to the driver in the context of the base AP
mode interface. This causes problems when multiple AP VLAN interfaces
are used since the driver will use the same key slot for the different
GTKs (there's no way for the driver to distinguish the different GTKs
from different AP VLAN interfaces). Thus, only the clients associated
to one AP VLAN interface (the one that was created last) can actually
use broadcast traffic.
Fix this by not programming any GTKs for AP VLAN interfaces into the hw
but fall back to using software crypto. The GTK for the underlying AP
interface is still sent to the driver.
That means, broadcast traffic to stations associated to an AP VLAN
interface is encrypted in software whereas broadcast traffic to
stations associated to the non-VLAN AP interface is encrypted in
hardware.
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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.orig
And these regulatory tests:
modprobe mac80211_hwsim regtest=2
modprobe mac80211_hwsim regtest=3
Reported-by: Mark Mentovai <mark@moxienet.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Tested-by: Mark Mentovai <mark@moxienet.com>
Tested-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This will be required in the next patch and it makes the
next patch easier to review.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Tested-by: Mark Mentovai <mark@moxienet.com>
Tested-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
These will be used earlier in the next few patches.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Tested-by: Mark Mentovai <mark@moxienet.com>
Tested-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <lrodriguez@atheros.com>
Tested-by: Mark Mentovai <mark@moxienet.com>
Tested-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Devices which use LO enabled bit are covered by b43legacy
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Add new vendor for Broadcom 4318.
Signed-off-by: Daniel Klaffenbach <danielklaffenbach@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
It seems that using ath9k_hw_stoppcurecv to stop rx dma is not enough.
When it's time to stop DMA, the PCU is still busy, so the rx enable
bit never clears.
Using ath9k_hw_abortpcurecv helps with getting rx stopped much faster,
with this change, I cannot reproduce the rx stop related WARN_ON anymore.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
On the disassociation event from the mac80211, the wl12xx driver does not
clear the chipset configuration related to the AP - i.e. it does not perform
a DISCONNECT and then a JOIN with zero SSID and dummy BSSID. Also, it does not
unset the BSSID filter.
Often this is not a problem, as the above is performed upon entering idle
state. But if a scenario arises where a new association is attempted without
cycling through idle state, the new association will fail.
Fix this by resetting the firmware state on disassociation.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Indicate to mac80211 we support HW fragmentation.
Support updates of the fragmentation threshold via the
set_frag_threshold callback.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
The wl1271 does not support radar detection. Hence, prevent ad-hoc and
active scanning on frequencies requiring DFS.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Tested-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>