MFC r346073:urtw(4), otus(4), iwi(4): allow to set non-default MAC address via ifconfig(8)Was tested with Netgear WG111 v3 (RTL8187B, urtw(4)), STA mode.
MFC r344990:Fix ieee80211_radiotap(9) usage in wireless drivers:- Alignment issues: * Add missing __packed attributes + padding across all drivers; inmost places there was an assumption that pad
MFC r344990:Fix ieee80211_radiotap(9) usage in wireless drivers:- Alignment issues: * Add missing __packed attributes + padding across all drivers; inmost places there was an assumption that padding will be alwaysminimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -padding was just missing. * Add __aligned(8) attribute for all Rx radiotap headers since they cancontain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, sojust drop the attribute here. Refresh ieee80211_radiotap(9) man pageaccordingly.- Since net80211 automatically updates channel frequency / flags inieee80211_radiotap_chan_change() drop duplicate setup for these fieldsin drivers.
show more ...
MFC r343474:Remove 2GHz channel list copies from wireless drivers.Wrap ieee80211_add_channel_list_2ghz into another functionwhich supplies default (1-14) channel list to it and dropits copies fr
MFC r343474:Remove 2GHz channel list copies from wireless drivers.Wrap ieee80211_add_channel_list_2ghz into another functionwhich supplies default (1-14) channel list to it and dropits copies from drivers.
MFC r342185:iwi(4): do not leak node reference when IWI_FLAG_ASSOCIATED flag is set.
Use an accessor function to access ifr_data.This fixes 32-bit compat (no ioctl command defintions are requiredas struct ifreq is the same size). This is believed to be sufficent tofully support
Use an accessor function to access ifr_data.This fixes 32-bit compat (no ioctl command defintions are requiredas struct ifreq is the same size). This is believed to be sufficent tofully support ifconfig on 32-bit systems.Reviewed by: kibObtained from: CheriBSDMFC after: 1 weekRelnotes: yesSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D14900
Remove unused variable.Sponsored by: The FreeBSD Foundation
iwi(4): factor out rateset setup into iwi_set_rateset().No functional change intended.
Revert r327828, r327949, r327953, r328016-r328026, r328041:Uses of mallocarray(9).The use of mallocarray(9) has rocketed the required swap to build FreeBSD.This is likely caused by the allocation
Revert r327828, r327949, r327953, r328016-r328026, r328041:Uses of mallocarray(9).The use of mallocarray(9) has rocketed the required swap to build FreeBSD.This is likely caused by the allocation size attributes which put extra pressureon the compiler.Given that most of these checks are superfluous we have to choose betterwhere to use mallocarray(9). We still have more uses of mallocarray(9) buthopefully this is enough to bring swap usage to a reasonable level.Reported by: woschPR: 225197
dev: make some use of mallocarray(9).Focus on code where we are doing multiplications within malloc(9). None ofthese is likely to overflow, however the change is still useful as somestatic checke
dev: make some use of mallocarray(9).Focus on code where we are doing multiplications within malloc(9). None ofthese is likely to overflow, however the change is still useful as somestatic checkers can benefit from the allocation attributes we use formallocarray.This initial sweep only covers malloc(9) calls with M_NOWAIT. No goodreason but I started doing the changes before r327796 and at that time itwas convenient to make sure the sorrounding code could handle NULL values.
[net80211] convert all of the WME use over to a temporary copy of WME info.This removes the direct WME info access in the ieee80211com struct and insteadprovides a method of fetching the data. Ri
[net80211] convert all of the WME use over to a temporary copy of WME info.This removes the direct WME info access in the ieee80211com struct and insteadprovides a method of fetching the data. Right now it's a no-op but eventuallyit'll turn into a per-VAP method for drivers that support it (eg iwn, iwm,upcoming ath10k work) as things like p2p support require this kind of behaviour.Tested:* ath(4), STA and AP modeTODO:* yes, this is slightly stack size-y, but it is an important first step to get drivers migrated over to a sensible WME API. A lot of per-phy things need to be converted to per-VAP before P2P, 11ac firmware, etc stuff shows up.
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
Fix drivers that assume ticks starts at zero. These drivers all have logicsimilar to "if (ticks > localvar+interval) {localvar=ticks; ...}" wherelocalvar is initialized to zero. Ticks is initiali
Fix drivers that assume ticks starts at zero. These drivers all have logicsimilar to "if (ticks > localvar+interval) {localvar=ticks; ...}" wherelocalvar is initialized to zero. Ticks is initialized to a negative valuesince r278230, and that leads to these if statements never being true.
iwi, ral, zyd: fix possible use-after-free.MFC after: 5 days
iwi: add 12-14 2GHz channels into channel list.Return full channel list via iwi_getradiocaps() method(ieee80211_init_channels() was replaced with iwi_getradiocaps()to be consistent with other dri
iwi: add 12-14 2GHz channels into channel list.Return full channel list via iwi_getradiocaps() method(ieee80211_init_channels() was replaced with iwi_getradiocaps()to be consistent with other drivers).PR: 216923Submitted and tested by: [email protected] (original patch)MFC after: 5 days
sys/dev: minor spelling fixes.Most affect comments, very few have user-visible effects.
net80211 + drivers: hide size of 'bands' array behind a macro.Auto-replace 'howmany(IEEE80211_MODE_MAX, 8)' with 'IEEE80211_MODE_BYTES'.No functional changes.
net80211 drivers: fix ieee80211_init_channels() usageFix out-of-bounds read (all) / write (11n capable) for driversthat are using ieee80211_init_channels() to initialize channel list.Tested with
net80211 drivers: fix ieee80211_init_channels() usageFix out-of-bounds read (all) / write (11n capable) for driversthat are using ieee80211_init_channels() to initialize channel list.Tested with: * RTL8188EU, STA mode. * RTL8188CUS, STA mode. * WUSB54GC, HOSTAP mode.Approved by: adrian (mentor)MFC after: 2 weeksDifferential Revision: https://reviews.freebsd.org/D4818
net80211: WME callback cleanup in various driversSince r288350, ic_wme_task() is called via ieee80211_runtask(),so, any additional deferring from the driver side is not needed.Approved by: adria
net80211: WME callback cleanup in various driversSince r288350, ic_wme_task() is called via ieee80211_runtask(),so, any additional deferring from the driver side is not needed.Approved by: adrian (mentor)Differential Revision: https://reviews.freebsd.org/D4072
net80211 & wireless drivers: remove duplicate defines (noop)* IEEE80211_DIR_DSTODS(wh) -> IEEE80211_IS_DSTODS(wh).* N(a) -> nitems(a).* Remove LE_READ_2(p)/LE_READ_4(p) definitions (and include i
net80211 & wireless drivers: remove duplicate defines (noop)* IEEE80211_DIR_DSTODS(wh) -> IEEE80211_IS_DSTODS(wh).* N(a) -> nitems(a).* Remove LE_READ_2(p)/LE_READ_4(p) definitions (and include ieee80211_input.h instead).* <drvname>_TXOP_TO_US(txop) -> IEEE80211_TXOP_TO_US(txop).* Put IEEE80211_RV(v) into ieee80211_proto.h and remove local RV(v) definitions.Submitted by: Andriy Voskoboinyk <[email protected]>Differential Revision: https://reviews.freebsd.org/D3705
Replay r286410. Change KPI of how device drivers that provide wirelessconnectivity interact with the net80211 stack.Historical background: originally wireless devices created an interface,just li
Replay r286410. Change KPI of how device drivers that provide wirelessconnectivity interact with the net80211 stack.Historical background: originally wireless devices created an interface,just like Ethernet devices do. Name of an interface matched the name ofthe driver that created. Later, wlan(4) layer was introduced, and thewlanX interfaces become the actual interface, leaving original ones as"a parent interface" of wlanX. Kernelwise, the KPI between net80211 layerand a driver became a mix of methods that pass a pointer to struct ifnetas identifier and methods that pass pointer to struct ieee80211com. Fromuser point of view, the parent interface just hangs on in the ifconfiglist, and user can't do anything useful with it.Now, the struct ifnet goes away. The struct ieee80211com is the onlyKPI between a device driver and net80211. Details:- The struct ieee80211com is embedded into drivers softc.- Packets are sent via new ic_transmit method, which is very much like the previous if_transmit.- Bringing parent up/down is done via new ic_parent method, which notifies driver about any changes: number of wlan(4) interfaces, number of them in promisc or allmulti state.- Device specific ioctls (if any) are received on new ic_ioctl method.- Packets/errors accounting are done by the stack. In certain cases, when driver experiences errors and can not attribute them to any specific interface, driver updates ic_oerrors or ic_ierrors counters.Details on interface configuration with new world order:- A sequence of commands needed to bring up wireless DOESN"T change.- /etc/rc.conf parameters DON'T change.- List of devices that can be used to create wlan(4) interfaces is now provided by net.wlan.devices sysctl.Most drivers in this change were converted by me, except of wpi(4),that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testingchanges to at least 8 drivers. Thanks to pluknet@, Oliver Hartmann,Olivier Cochard, gjb@, mmoll@, op@ and lev@, who also participated intesting.Reviewed by: adrianSponsored by: NetflixSponsored by: Nginx, Inc.
Revert the wifi ifnet changes until things are more baked and tested.* 286410* 286413* 286416The initial commit broke a variety of debug and features that aren'tin the GENERIC kernels but are
Revert the wifi ifnet changes until things are more baked and tested.* 286410* 286413* 286416The initial commit broke a variety of debug and features that aren'tin the GENERIC kernels but are enabled in other platforms.
Change KPI of how device drivers that provide wireless connectivity interactwith the net80211 stack.Historical background: originally wireless devices created an interface,just like Ethernet devi
Change KPI of how device drivers that provide wireless connectivity interactwith the net80211 stack.Historical background: originally wireless devices created an interface,just like Ethernet devices do. Name of an interface matched the name ofthe driver that created. Later, wlan(4) layer was introduced, and thewlanX interfaces become the actual interface, leaving original ones as"a parent interface" of wlanX. Kernelwise, the KPI between net80211 layerand a driver became a mix of methods that pass a pointer to struct ifnetas identifier and methods that pass pointer to struct ieee80211com. Fromuser point of view, the parent interface just hangs on in the ifconfiglist, and user can't do anything useful with it.Now, the struct ifnet goes away. The struct ieee80211com is the onlyKPI between a device driver and net80211. Details:- The struct ieee80211com is embedded into drivers softc.- Packets are sent via new ic_transmit method, which is very much like the previous if_transmit.- Bringing parent up/down is done via new ic_parent method, which notifies driver about any changes: number of wlan(4) interfaces, number of them in promisc or allmulti state.- Device specific ioctls (if any) are received on new ic_ioctl method.- Packets/errors accounting are done by the stack. In certain cases, when driver experiences errors and can not attribute them to any specific interface, driver updates ic_oerrors or ic_ierrors counters.Details on interface configuration with new world order:- A sequence of commands needed to bring up wireless DOESN"T change.- /etc/rc.conf parameters DON'T change.- List of devices that can be used to create wlan(4) interfaces is now provided by net.wlan.devices sysctl.Most drivers in this change were converted by me, except of wpi(4),that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testingchanges to at least 8 drivers. Thanks to Olivier Cochard, gjb@, mmoll@,op@ and lev@, who also participated in testing. Details here:https://wiki.freebsd.org/projects/ifnet/net80211Still, drivers: ndis, wtap, mwl, ipw, bwn, wi, upgt, uath were nottested. Changes to mwl, ipw, bwn, wi, upgt are trivial and chancesof problems are low. The wtap wasn't compilable even before this change.But the ndis driver is complex, and it is likely to be broken with thiscommit. Help with testing and debugging it is appreciated.Differential Revision: D2655, D2740Sponsored by: Nginx, Inc.Sponsored by: Netflix
Make the last revision compilable.Remove extra argument from iwi_wme_setparams(), a softc has 1 to 1accordance with ieee80211com.
The argument passed to the iwi_update_wme() is softc, not ieee80211com.This fatal mismatch appeared to be absolutely harmless, since both structshave pointer to struct ifnet as their first member,
The argument passed to the iwi_update_wme() is softc, not ieee80211com.This fatal mismatch appeared to be absolutely harmless, since both structshave pointer to struct ifnet as their first member, and they both point tothe same ifnet. And the first member is the only one used from the argument.
Set ic_softc in all 802.11 drivers. Not required right now, but will beused quite soon.Sponsored by: NetflixSponsored by: Nginx, Inc.
12345