summaryrefslogtreecommitdiff
path: root/sys/net80211
AgeCommit message (Collapse)Author
2019-07-29Add support for 802.11n Tx aggregation to net80211 and the iwn(4) driver.Stefan Sperling
In particular, add Tx block ack session management to net80211, with enough funcionality to support Tx aggregation on devices which perform A-MPDU subframe scheduling in firmware. Make use of the iwn(4) firmware Tx scheduler to build A-MPDUs. net80211's QoS support code is now enabled and used by Tx aggregation. A-MSDU frames inside A-MPDUs have been tested and work in principle. For now, this feature is disabled because unfair TCP connection sharing was observed during testing, where bursts of TCP Ack frames for a single tcpbench(1) connection arriving in A-MSDUs made other TCP connections stall. Switch off support for A-MSDUs inside A-MPDUs on the Rx side as well. Tested on iwn chipsets 1000, 4965, 5100, 5300, 2200, 6200, 6205, 6300 (committed version of tested diff has all debug printfs removed) tests/ok benno kmos mlarkin kevlo
2019-07-23In 11n hostap mode, properly disable HT protection when neededStefan Sperling
by actually overwriting the relevant bits in ni_htop1. ok tedu@ phessler@ kettenis@
2019-06-18Stop probing a Tx rate if transmission failure or too many retries occur.Stefan Sperling
Fixes stalling TCP connections on wifi in some situations. testing jmatthew@, jmc@, Bruno Flueckiger, Micah Muer, Matthias Schmidt
2019-06-10Revised version of 'ifconfig mode' command fix.Stefan Sperling
The 'mode' command is supposed to force a wireless interface into 11a/b/g/n media mode. This stopped working some time ago, probably during my work on background scanning. Problem spotted by mlarkin@ who noticed that interfaces were using 11g mode while forced to 11b mode. ok phessler, jmatthew (earlier version) relentless testing by krw@
2019-05-31Revert my "Repair the 'ifconfig mode' command" commit.Stefan Sperling
The "recursion in end_scan()" problem is apparently still present in the committed version of the diff (reported by krw@).
2019-05-29Repair the 'ifconfig mode' command.Stefan Sperling
The 'mode' command is supposed to force a wireless interface into 11a/b/g/n media mode. This stopped working some time ago, probably during my work on background scanning. Problem spotted by mlarkin@ who noticed that interfaces were using 11g mode while forced to 11b mode. ok phessler, jmatthew
2019-05-21Fix out-of-bounds array access in ieee80211_setbasicrates(); CID 1479607Stefan Sperling
ok kettenis@
2019-05-12Fix 'ifconfig nwflags; These flags ended up overlapping with other flagsStefan Sperling
in ieee80211com's ic_flags because we haven't been paying attention to them (they're not in the same place in the code and hence easy to miss). Move them to a dedicated variable to avoid this problem in the future. Add a new 'stayauth' nwflag which can be set to let net80211 ignore deauth frames. This can be useful when deauth frames are being persistently spoofed by an attacker. Idea from beck@ ok beck@ phessler@
2019-05-11Show driver name on net80211 scan debug lines.Stefan Sperling
ok mpi@
2019-05-10On the transmit path the ethernet and ip headers might not bePatrick Wildt
in contiguous memory. Taking the pointer to the data and simply looking at the IP header by adding an offset can lead to an out- of-bounds access. Make the ieee80211 classify function copy the ethernet and ip header into stack variables to fix it. Fixes a panic for florian@ Discussed with claudio@ ok stsp@
2019-04-28Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.Martin Pieuchot
This redefines the ifp <-> bridge relationship. No lock can be currently used across the multiples contexts where the bridge has tentacles to protect a pointer, use an interface index. Tested by various, ok dlg@, visa@
2019-03-29Use stricter validation checks for A-MPDUs in the net80211 input path.Stefan Sperling
Don't accept A-MPDUs if not in RUN state, and don't accept them from unassociated clients in hostap mode. ok jmatthew@ kevlo@
2019-03-15fix autojoin for WEP network by actually saving the WEP auth keyPeter Hessler
discovered while attempting to autojoin WEP networks
2019-03-01Improve handling of HT protection for 'mode 11n' hostap.Stefan Sperling
Consider the mere presence of HTCAP IEs as indicator of 11n support, rather than checking advertised Rx MCS. Fixes some devices being misclassified as 11a/g, causing HT protection to be enabled even though it is not needed. Use CTS-to-self frames for HT protection instead of RTS/CTS. These changes make my athn(4) AR9280 hostap perform much better. ok phessler@
2019-03-01Pick up the AP's 11g ERP protection setting properly in 11n client mode.Stefan Sperling
ok phessler@
2019-02-27Back in 2016 we enabled RTS threshold by default because it apparentlyStefan Sperling
helped us on a loaded hackathon wifi network. In 11n mode we are now using a heuristic for this. Disable RTS threshold for all other modes again because it can do more harm than good in many situations. This change may increase Tx throughput in 11a/g modes, though results depend on the driver. Some drivers, e.g. urtwn(4), keep using RTS regardless for unknown reasons and may need to be fixed separately. And we will keep using RTS if the AP enables 11g protection while 11b clients are around.
2019-02-27Implement support for dynamic RTS threshold in MiRA.Stefan Sperling
Improves throughput and latency on 11n networks. Tested by myself, jmc@, jcs@, phessler@, benno@
2019-02-24Remove 11n support from AMRR. All 11n drivers switched to MiRA long ago.Stefan Sperling
2019-02-19Make ifconfig(8) display whether bwfm(4) firmware is using 802.11ac.Stefan Sperling
ok patrick@ mpi@
2019-01-23Move 802.11n rateset definitions out of MiRA and make them available toStefan Sperling
net80211 and drivers in general. Add ratesets for 'short guard interval' (SGI) rates, and add SGI support to MiRA. SGI is currently only used by iwm(4), and of course internally by bwfm(4) firmware. Ratesets for 11n 40 MHz channels and 11ac will come later. ok mpi@ phessler@
2019-01-18when removing the currently active network from the join list, disconnectPeter Hessler
from it as well OK stsp@
2019-01-18add a len field when we delete an essid from the joinlist. this will havePeter Hessler
us properly match, instead of hoping we got lucky when selecting it. OK stsp@
2019-01-18let users automatically use join to connect to any open wifi network.Peter Hessler
if a known network is visible, always prefer that instead. requested by many, OK stsp@
2019-01-15Stop processing "no data" frames in ieee80211_input() before decryption.Stefan Sperling
Previously such frames would be counted as decryption failures which is nonsense because they don't carry any data which could be encrypted. Problem analyzed by, and fix developed together with, Lauri Tirkkonen.
2019-01-15Rename some data frame subtype macros to make the difference betweenStefan Sperling
"data" and "no data" frames more obvious. These renamed macros aren't actually used anywhere in net80211 yet. cross-checked with 802.11 specs by myself and Lauri Tirkkonen
2018-11-30MH_ALIGN -> m_align and make the spacing look the same in all three places.Claudio Jeker
OK bluhm@
2018-11-25print more details about the join'd networks we have saved when a user runsPeter Hessler
ifconfig if joinlist OK stsp@
2018-11-20fix whitespace in debugging functionPeter Hessler
2018-11-20The first packet received from each AP in each QoS class would bePatrick Wildt
dropped as the sequence number matches the initial value of the cached last sequence number (zero). On some APs (notably Android WIFI hotspots) this hits the first packet of the WPA2 4-way handshake. This causes connection delays and in some cases connection to the AP fails completely. Initialize the cached last sequence numbers for received packets to an invalid value instead. From Christian Ehrhardt ok gerhard@ stsp@
2018-11-12Add new routing socket message RTM_80211INFO to provide details ofKenneth R Westerback
802.11 interface state changes (e.g. SSID) to interested parties. Original diff from phessler@. Many suggestions and tweaks from claudio@, stsp@, anton@. ok claudio@ stsp@ anton@ phessler@
2018-11-09M_LEADINGSPACE() and M_TRAILINGSPACE() are just wrappers forClaudio Jeker
m_leadingspace() and m_trailingspace(). Convert all callers to call directly the functions and remove the defines. OK krw@, mpi@
2018-11-02Remove 'reused group key update received' printfs.Stefan Sperling
These have served no useful purpose in practice; all reported instances were legitimate group key retransmissions by the AP, e.g. after laptop suspend. We fixed KRACK long ago; re-used group key messages are nothing to worry about.
2018-10-27pass around the ess and ni structures we plan to use directly, insteadPeter Hessler
of rediscovering them (possibly badly). OK stsp@
2018-10-27clean up accounting of the AUTO_JOIN flag by making sure it is set or clearedPeter Hessler
based on the state of the joinlist OK stsp@
2018-10-27don't join to a network where we expect cleartext, and the AP is using cryptoPeter Hessler
OK stsp@
2018-09-24Prevent ieee80211_get_txkey() from returning the integrity group temporalStefan Sperling
key (IGTK) if a node doesn't have management frame protection (MFP) enabled. The IGTK is not initialized if MFP is disabled, so using it triggers this panic in ieee80211_encrypt(): panic("invalid key cipher 0x%x", k->k_cipher) (As far as I can tell, at present, MFP is never enabled.) Problem reported and fix tested by tj@ on athn(4) hostap
2018-09-18fix memory leak in ieee80211_end_scan()Ricardo Mestre
OK phessler@ jsg@
2018-09-17fix memory leaks in ieee80211_add_ess()Jonathan Gray
ok stsp@ phessler@
2018-09-11ues the format string for signed ints, for signed intsPeter Hessler
reminded by stsp@
2018-09-11Nuke unused LIST() ieee80211com_head.Kenneth R Westerback
ok stsp@
2018-09-11Nuke some trailing spaces that wandered into theKenneth R Westerback
crosshairs.
2018-09-11With the interface debug flag enabled, print a "score" for each AP wePeter Hessler
consider during auto-join. This can help users determine why a specific network was chosen. OK stsp@
2018-09-10do not immediately set the join'd network, the join command only updatesPeter Hessler
the list. makes /etc/netstart very fast when ran while the interface is up OK stsp@
2018-09-10fix typo in the length of the essid we want to switch toPeter Hessler
found with and OK stsp@
2018-09-10extract clearing WEP/WPA in ess into helper functionsPeter Hessler
2018-09-10use the correct essid when switching during the ioctl pathPeter Hessler
pointed out by stsp@
2018-09-10give set_ess a len variable, so we can correctly match the essid we wantPeter Hessler
to switch to. pointed out by stsp@
2018-09-09convert the things we save in 'join' into a single ioctl. mixing relatedPeter Hessler
settings over multiple calls was risky and racy. Pass essid, wpa, and wep paramaters in a single ioctl and process it atomically. no change for 'nwid' users OK stsp@ benno@
2018-09-06fix whitespaceJonathan Gray
2018-09-01Make 'ifconfig nwid' override 'ifconfig join'.Stefan Sperling
There was no way to override a decision made by join's network selection algorithm (apart from disabling the feature by clearing the join list). Automatic selection is based on heuristics which cannot always guess correctly so we need to provide an override. One specific problem was that if 'nwid foo' and 'nwid bar' were both visible in the scan and only 'nwid foo' was a member of the join list, then there was no way at all to connect to 'nwid bar'. The wireless stack would keep selecting 'nwid foo' instead. 'ifconfig iwm0 nwid bar' command will now disable automatic network selection and force the use of ESSID 'bar'. Any of these commands will re-enable automatic network selection: ifconfig iwm0 -nwid ifconfig iwm0 nwid '' ifconfig iwm0 join some-network-id ok phessler@ deraadt@