summaryrefslogtreecommitdiff
path: root/sys/net80211
AgeCommit message (Collapse)Author
2015-09-11Make room for media types of the future. Extend the ifmedia word to 64 bits.Stefan Sperling
This changes numbers of the SIOCSIFMEDIA and SIOCGIFMEDIA ioctls and grows struct ifmediareq. Old ifconfig and dhclient binaries can still assign addresses, however the 'media' subcommand stops working. Recompiling ifconfig and dhclient with new headers before a reboot should not be necessary unless in very special circumstances where non-default media settings must be used to get link and console access is not available. There may be some MD fallout but that will be cleared up later. ok deraadt miod with help and suggestions from several sharks attending l2k15
2015-07-15m_freem() can handle NULL, do not check for this condition beforehands.Theo de Raadt
ok stsp mpi
2015-07-14In ieee80211.h update references to standard sections to 802.11-2012.Stefan Sperling
Add missing element IDs (and remove some non-standard ones), action field categories and values, some 11n related stuff, and other small things. Use the same element ID symbolic names as FreeBSD where applicable as suggested by millert. ok mpi millert
2015-06-30Rename if_output() into if_enqueue() to avoid confusion with commentsMartin Pieuchot
talking about (*ifp->if_output)(). ok claudio@, dlg@
2015-06-24Increment if_ipackets in if_input().Martin Pieuchot
Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
2015-05-26Use if_output() instead of rerolling it.Martin Pieuchot
ok stsp@
2015-04-08add a #define for IEEE80211_ELEMID_CSA, 802.11h-2003 Channel Switch AnnouncementStuart Henderson
ok stsp@
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2015-02-09tweak the new if_input function so it takes an mbuf_list insteadDavid Gwynne
of a single mbuf. this forces us to batch work between the hardware rx handlers and the stack. this includes a converstion of bge from ether_input to if_input. ok claudio@ pelikan@ mpi@
2015-02-08Convert wirless devices to if_input(), tested with iwn(4) and urtwn(4).Martin Pieuchot
ok pelikan@, reyk@, blambert@, henning@
2015-01-27remove the second void * argument on tasks.David Gwynne
when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier. now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument. so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it. ok krw@
2015-01-13In IBSS mode, stop calling the driver's newassoc() each time a probeStefan Sperling
response is received from a node. Only call it once when the node is initially discovered, as used to be the case before r1.4 of this file. Asking the driver to set up its per-node private state once is enough. Also remove an outdated comment. ok sthen deraadt jsg
2015-01-09Change rssi passed to ifconfig(8) to a signed value to fix printing signalStuart Henderson
strengths on 802.11 interfaces. ok stsp@ Power on wireless interfaces is usually scaled in dBm. rssi (received signal strength) is expected to be a -ve dBm values (i.e. [much] <1mW). Some (though not all!) drivers store this as negative values, so it needs to be passed to ifconfig that way for printing, not cast to an unsigned value. Valid range is something like -40 to -90dBm, so the range available with a signed char is reasonable whether it's stored as a +ve or -ve number.
2014-12-23unifdef some more INET. v4 4life.Ted Unangst
2014-11-18move arc4random prototype to systm.h. more appropriate for most codeTed Unangst
to include that than rdnvar.h. ok deraadt dlg
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-09-12Remove cached 802.11 nodes in IEEE80211_STA_CACHE state (these are nodesStuart Henderson
which have been seen but which haven't otherwise interacted with us), fixing a problem where old cached nodes are seen when doing a scan. From Marcin Piotr Pawlowski, feedback stsp@ ok kspillner@ dcoppa@
2014-08-24Fix wrong IEEE 802.11 ioctl's:Vadim Zhukov
* SIOCG80211ALLNODES operates on struct ieee80211_nodereq_all, not struct ieee80211_nodereq. * Six SIOC* from wi(4) were using same codes with generic parts of IEEE 802.11 framework. Things worked due to the fact that size of data struct being passed is encoded in actual SIOC*, too. This commit means that ifconfig and some ports will need to be rebuilt, if any of affected SIOC* codes is used. Port bumps to follow. First part okay reyk@, whole diff okay mpi@ Heavy prodding to commit now from deraadt@
2014-08-08use nitems() instead of various local constructsJasper Lievisse Adriaanse
ok stsp@
2014-07-24Fix debug printf, from Nathanael Rensen and chris@.Martin Pieuchot
2014-07-22Fewer <netinet/in_systm.h> !Martin Pieuchot
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-11move ieee80211 message printing from workq to taskqBret Lambert
testing stsp@ ok stsp@, dlg@
2014-07-10Return RSN (WPA) information to userland during wireless scan, andStefan Sperling
make ifconfig show whether a wireless network uses WEP or WPA. Since struct ieee80211_nodereq grows in size old ifconfig won't be able to scan when running on a new kernel. While here, add missing ioctl constant IEEE80211_WPA_CIPHER_BIP. ok jsg@
2014-03-20Do not pull <sys/tree.h> unconditionally in <net/if.h>, only the addressMartin Pieuchot
tree and the 80211 nodes need it. ok henning@, mikeb@
2014-03-19Stop abusing the rcvif pointer to pass wireless nodes down to theMartin Pieuchot
driver start routines. Instead add & use a pointer in the pkthdr since we don't want the overhead of using a mbuf_tags(9). claudio@ pointed out that other subsystems might want to use this pointer too, so here's a new cookie! ok claudio@, mikeb@, deraadt@
2013-12-07#if 0 out the ieee80211_edca_table table to appease the LLVM warning.Brad Smith
ieee80211_output.c:311:5: error: unused variable 'ieee80211_edca_table' [-Werror,-Wunused-const-variable] ok stsp@
2013-12-01Reset txrate array index after changing a node's rate list.Stefan Sperling
Should prevent "bogus xmit rate %d setup" panics, which I ran into again in IBSS mode. ok kettenis
2013-11-21Remove unneeded include.Martin Pieuchot
ok deraadt@
2013-11-14improve maths and conditionals around ticks to cope with wraparound better.David Gwynne
2013-06-11Replace all ovbcopy with memmove; swap the src and dst arguments tooTheo de Raadt
ok otto
2013-03-24Make ieee80211_set_tim() available from outside of ieee80211_node.cClaudio Jeker
so drivers like acx(4) can use that function directly instead of reimplementing the function again. Requested by kettenis@ long time ago.
2013-01-17Create a printb() suitable string for IEEE80211_FC1 field. Needed to showClaudio Jeker
more info in tcpdump. OK giovanni@
2012-11-07Make the ieee80211_node_incref() macro a static inline function, as itsStefan Sperling
siblings already are. And fix return value of ieee80211_node_decref() which should be unsigned but was signed. diff originally from dhill; ok kettenis reyk
2012-11-07Fix DPRINTF() format string treating n->ni_refcnt, which is unsigned, as signed.Stefan Sperling
diff from dhill; ok kettenis reyk
2012-10-12Cleanup false positives for uninitialized uses.Christiano F. Haesbaert
Part of the work to remove -Wno-uninitialized. ok blambert jsg
2012-10-10Clear the powersave flag and purge queued packets when a node leaves the APMark Kettenis
(either by disassociating or by timeout). Fixes (most) remaining issues with power saving. From Nathanael Rensen. ok claudio@, krw@, sthen@
2012-10-05Point an interface directly to its bridgeport configuration, insteadCamiel Dobbelaar
of to the bridge itself. This is ok, since an interface can only be part of one bridge, and the parent bridge is easy to find from the bridgeport. This way we can get rid of a lot of list walks, improving performance and shortening the code. ok henning stsp sthen reyk
2012-09-20Nuke M_80211_NODE #define which mapped to M_DEVBUF and use M_DEVBUF directly.Stefan Sperling
ok henning
2012-08-25Set up ni_savedq for the initial BSS node such that it can actually be usedMark Kettenis
to store multicast frames when one of the associated stations is in power saving mode. ok stsp@
2012-08-17Fix possible panic while switching from STA mode into hostap/ibss modes.Stefan Sperling
ieee80211_create_ibss() resets the set of supported rates but failed to update the index into the rate set array accordingly. If the rate configured during STA operation didn't belong to the newly configured rate set the system ran into an assertion ("bogus xmit rate %u setup") while trying to create the IBSS. ok fgsch@
2012-07-18Print messages about nodes purged from the node cache if hostap/ibss modes areStefan Sperling
compiled in and the interface is in debug mode. ok sthen
2012-07-16Move increment of ic_nnodes closer to where the node is actually insertedStefan Sperling
into the cache. Make sure we're at IPL_NET while incrementing/decrementing ic_nnodes. Add a debug message that warns about possible node leaks. All of this affects hostap mode only.
2012-07-16Fix a couple of possible node leaks in ieee80211_input().Stefan Sperling
2012-07-13Fix wireless scanning on slow systems with a high RX rate and interfaceStefan Sperling
in debug mode. If the interface is in debug mode ieee80211_input() will print messages about received frames to the console. On slow systems, printf() calls can take so long that the next RX interrupt will be serviced immediately, if the RX rate is sufficiently high. This effectively locks the system at IPL_NET. If a concurrent scan is running, the scan will never finish because it relies on a timeout at IPL_SOFTCLOCK to hop channels every 200msec. This timeout never runs in the above situation, leaving the wireless interface in 'scan' state forever. To give the timeout a chance to run, perform the printf() call from a work queue (idea from guenther@). This allows edd's slow soekris AP to recover from 'ifconfig ral0 debug down up' in noisy RF environments. With input from guenther, kettenis, blambert and deraadt. ok deraadt
2012-07-13Tweak node cache eviction strategy when the cache is full: kick off new nodesStefan Sperling
in AUTH state that weren't active during the cache wait interval rather than keeping them for the entire cache timeout interval. Fixes association failures in noisy RF environments. Tested by edd and myself with a slow soekris suffering from RF noise with about of 50 interrupts per second on ral0. ok deraadt
2012-01-25There is no need to explicitly skip ic_bss when iterating over cached nodes.Stefan Sperling
The ic_bss is never put into the RB tree.
2012-01-25Clean inactive authenticated nodes during cache timeout as well.Stefan Sperling
There is no need to keep nodes cached with never associated and were inactive within the last 5 minutes or more. Keeps the node cache pretty clean in my environment with typical city-center wlan noise.
2012-01-21Implement missing bits of node inactivity accounting in hostap mode.Stefan Sperling
Small parts of code for this feature were already present but unused. A node becomes inactive after not sending or receiving a frame within 5 minutes. Inactive cached nodes (not authenticated or associated) are automatically cleared from the cache once every hour, making room for new nodes. If the node cache is full and room must be made for a new node, clean either a cached node (active or inactive), or an inactive authenticated or associated node. Also, do not send de-auth frames to nodes which never authenticated, and only send a de-auth frame once for a given node. This part was contributed by Steven Chamberlain, thanks! Tested by myself, krw@, edd@, Steven Chamberlain, and Markus Schatzl. ok deraadt@
2012-01-21Hold interrupts blocked while comparing a cached node's refcount to zeroStefan Sperling
and freeing the node. Just in case an interrupt happens to ref the node after the refcount was checked but before the node is freed. Tested by several as part of a larger diff.