summaryrefslogtreecommitdiffstats
path: root/sys/net80211 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* the pattr argument to IFQ_ENQUEUE is unused, so let's get rid of it.dlg2015-10-121-2/+2
| | | | | | also the comment above IFQ_ENQUEUE that says the pattr argument is unused. ok mpi@
* Add macros for A-MPDU and MCS data, both found in HT capabilities element.stsp2015-10-101-1/+24
| | | | typo fix + ok sthen@
* Revert if_oqdrops accounting changes done in kernel, per request from mpi@.uebayasi2015-10-051-3/+2
| | | | | | | | | | | | | (Especially adding IF_DROP() after IFQ_ENQUEUE() was completely wrong because IFQ_ENQUEUE() already does it. Oops.) After this revert, the situation becomes: - if_snd.ifq_drops is incremented in either IFQ_ENQUEUE() or IF_DROP(), but it is not shown to userland, and - if_data.ifi_oqdrops is shown to userland, but it is not incremented by anyone.
* Count IFQ_ENQUEUE() failure as output drop.uebayasi2015-10-051-2/+3
| | | | | | mpi@ prefers checking IFQ_ENQUEUE() error, and this matches that. OK dlg@
* Add ieee80211_channel_init(), factored out from ieee80211_ifattach().stsp2015-09-272-15/+24
| | | | | Will be used by iwm(4) soon. ok kettenis@
* Make code in ieee80211_send_4way_msg3() more readable and make sure a localstsp2015-09-161-9/+11
| | | | | | variable is initialized to NULL in the WPA case. No functional change. Pointed out by Maxime Villard's brainy code scanner. ok claudio@ zhuk@
* Make room for media types of the future. Extend the ifmedia word to 64 bits.stsp2015-09-112-13/+15
| | | | | | | | | | | | | | | | 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
* m_freem() can handle NULL, do not check for this condition beforehands.deraadt2015-07-158-34/+21
| | | | ok stsp mpi
* In ieee80211.h update references to standard sections to 802.11-2012.stsp2015-07-141-46/+200
| | | | | | | | 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
* Rename if_output() into if_enqueue() to avoid confusion with commentsmpi2015-06-302-4/+4
| | | | | | talking about (*ifp->if_output)(). ok claudio@, dlg@
* Increment if_ipackets in if_input().mpi2015-06-241-2/+2
| | | | | | | Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
* Use if_output() instead of rerolling it.mpi2015-05-262-39/+6
| | | | ok stsp@
* add a #define for IEEE80211_ELEMID_CSA, 802.11h-2003 Channel Switch Announcementsthen2015-04-081-1/+2
| | | | ok stsp@
* Remove some includes include-what-you-use claims don'tjsg2015-03-148-25/+8
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* tweak the new if_input function so it takes an mbuf_list insteaddlg2015-02-091-3/+6
| | | | | | | | | 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@
* Convert wirless devices to if_input(), tested with iwn(4) and urtwn(4).mpi2015-02-081-11/+11
| | | | ok pelikan@, reyk@, blambert@, henning@
* remove the second void * argument on tasks.dlg2015-01-271-4/+4
| | | | | | | | | | | | | | | | | | | | | 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@
* In IBSS mode, stop calling the driver's newassoc() each time a probestsp2015-01-131-12/+3
| | | | | | | | 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
* Change rssi passed to ifconfig(8) to a signed value to fix printing signalsthen2015-01-091-3/+3
| | | | | | | | | | | 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.
* unifdef some more INET. v4 4life.tedu2014-12-2316-52/+16
|
* move arc4random prototype to systm.h. more appropriate for most codetedu2014-11-185-13/+5
| | | | to include that than rdnvar.h. ok deraadt dlg
* remove uneeded proc.h includesjsg2014-09-149-18/+9
| | | | ok mpi@ kspillner@
* Remove cached 802.11 nodes in IEEE80211_STA_CACHE state (these are nodessthen2014-09-123-4/+22
| | | | | | 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@
* Fix wrong IEEE 802.11 ioctl's:zhuk2014-08-241-2/+2
| | | | | | | | | | | | | | | * 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@
* use nitems() instead of various local constructsjasper2014-08-083-21/+10
| | | | ok stsp@
* Fix debug printf, from Nathanael Rensen and chris@.mpi2014-07-241-2/+3
|
* Fewer <netinet/in_systm.h> !mpi2014-07-223-6/+3
|
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-128-23/+23
| | | | after discussions with beck deraadt kettenis.
* move ieee80211 message printing from workq to taskqblambert2014-07-111-13/+16
| | | | | testing stsp@ ok stsp@, dlg@
* Return RSN (WPA) information to userland during wireless scan, andstsp2014-07-103-10/+23
| | | | | | | | 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@
* Do not pull <sys/tree.h> unconditionally in <net/if.h>, only the addressmpi2014-03-201-1/+3
| | | | | | tree and the 80211 nodes need it. ok henning@, mikeb@
* Stop abusing the rcvif pointer to pass wireless nodes down to thempi2014-03-191-12/+11
| | | | | | | | | | 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@
* #if 0 out the ieee80211_edca_table table to appease the LLVM warning.brad2013-12-071-1/+3
| | | | | | ieee80211_output.c:311:5: error: unused variable 'ieee80211_edca_table' [-Werror,-Wunused-const-variable] ok stsp@
* Reset txrate array index after changing a node's rate list.stsp2013-12-011-1/+3
| | | | | | Should prevent "bogus xmit rate %d setup" panics, which I ran into again in IBSS mode. ok kettenis
* Remove unneeded include.mpi2013-11-217-14/+7
| | | | ok deraadt@
* improve maths and conditionals around ticks to cope with wraparound better.dlg2013-11-141-2/+2
|
* Replace all ovbcopy with memmove; swap the src and dst arguments tooderaadt2013-06-111-2/+2
| | | | ok otto
* Make ieee80211_set_tim() available from outside of ieee80211_node.cclaudio2013-03-242-3/+3
| | | | | so drivers like acx(4) can use that function directly instead of reimplementing the function again. Requested by kettenis@ long time ago.
* Create a printb() suitable string for IEEE80211_FC1 field. Needed to showclaudio2013-01-171-1/+4
| | | | more info in tcpdump. OK giovanni@
* Make the ieee80211_node_incref() macro a static inline function, as itsstsp2012-11-071-9/+14
| | | | | | 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
* Fix DPRINTF() format string treating n->ni_refcnt, which is unsigned, as signed.stsp2012-11-071-2/+2
| | | | diff from dhill; ok kettenis reyk
* Cleanup false positives for uninitialized uses.haesbaert2012-10-121-1/+4
| | | | | | Part of the work to remove -Wno-uninitialized. ok blambert jsg
* Clear the powersave flag and purge queued packets when a node leaves the APkettenis2012-10-101-2/+10
| | | | | | | | | (either by disassociating or by timeout). Fixes (most) remaining issues with power saving. From Nathanael Rensen. ok claudio@, krw@, sthen@
* Point an interface directly to its bridgeport configuration, insteadcamield2012-10-051-5/+5
| | | | | | | | | | 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
* Nuke M_80211_NODE #define which mapped to M_DEVBUF and use M_DEVBUF directly.stsp2012-09-201-5/+3
| | | | ok henning
* Set up ni_savedq for the initial BSS node such that it can actually be usedkettenis2012-08-251-1/+4
| | | | | | | to store multicast frames when one of the associated stations is in power saving mode. ok stsp@
* Fix possible panic while switching from STA mode into hostap/ibss modes.stsp2012-08-171-1/+2
| | | | | | | | | 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@
* Print messages about nodes purged from the node cache if hostap/ibss modes arestsp2012-07-181-3/+4
| | | | compiled in and the interface is in debug mode. ok sthen
* Move increment of ic_nnodes closer to where the node is actually insertedstsp2012-07-161-3/+26
| | | | | | 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.
* Fix a couple of possible node leaks in ieee80211_input().stsp2012-07-161-4/+10
|