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 r343603:ipw(4): reuse ieee80211_tx_complete functionThis should partially fix 'netstat -b -I wlan0' output
MFhead r339643: Fix ipw_start(), where logic was reverted in r287197.PR 232554Approved by: re (kib)
Reapply, with minor tweaks, r338025, from the original commit:Remove unused and easy to misuse PNP macro parameterInspired by r338025, just remove the element size parameter to theMODULE_PNP_INF
Reapply, with minor tweaks, r338025, from the original commit:Remove unused and easy to misuse PNP macro parameterInspired by r338025, just remove the element size parameter to theMODULE_PNP_INFO macro entirely. The 'table' parameter is now required tohave correct pointer (or array) type. Since all invocations of the macroalready had this property and the emitted PNP data continues to include theelement size, there is no functional change.Mostly done with the coccinelle 'spatch' tool: $ cat modpnpsize0.cocci @normaltables@ identifier b,c; expression a,d,e; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,d, -sizeof(d[0]), e); @singletons@ identifier b,c,d; expression a; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,&d, -sizeof(d), 1); $ rg -l MODULE_PNP_INFO -- sys | \ xargs spatch --in-place --sp-file modpnpsize0.cocci(Note that coccinelle invokes diff(1) via a PATH search and expects diff totolerate the -B flag, which BSD diff does not. So I had to link gdiff intoPATH as diff to use spatch.)Tinderbox'd (-DMAKE_JUST_KERNELS).Approved by: re (glen)
Back out r338035 until Warner is finished churning GSoC PNP patchesI was not aware Warner was making or planning to make forward progress inthis area and have since been informed of that.It's ea
Back out r338035 until Warner is finished churning GSoC PNP patchesI was not aware Warner was making or planning to make forward progress inthis area and have since been informed of that.It's easy to apply/reapply when churn dies down.
Remove unused and easy to misuse PNP macro parameterInspired by r338025, just remove the element size parameter to theMODULE_PNP_INFO macro entirely. The 'table' parameter is now required tohave
Remove unused and easy to misuse PNP macro parameterInspired by r338025, just remove the element size parameter to theMODULE_PNP_INFO macro entirely. The 'table' parameter is now required tohave correct pointer (or array) type. Since all invocations of the macroalready had this property and the emitted PNP data continues to include theelement size, there is no functional change.Mostly done with the coccinelle 'spatch' tool: $ cat modpnpsize0.cocci @normaltables@ identifier b,c; expression a,d,e; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,d, -sizeof(d[0]), e); @singletons@ identifier b,c,d; expression a; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,&d, -sizeof(d), 1); $ rg -l MODULE_PNP_INFO -- sys | \ xargs spatch --in-place --sp-file modpnpsize0.cocci(Note that coccinelle invokes diff(1) via a PATH search and expects diff totolerate the -B flag, which BSD diff does not. So I had to link gdiff intoPATH as diff to use spatch.)Tinderbox'd (-DMAKE_JUST_KERNELS).
Add PNP info to PCI attachment of ipw driverReviewed by: imp, chuckSubmitted by: Lakhan Shiva Kamireddy <[email protected]>Sponsored by: Google, Inc. (GSoC 2018)Differential Revision: https:
Add PNP info to PCI attachment of ipw driverReviewed by: imp, chuckSubmitted by: Lakhan Shiva Kamireddy <[email protected]>Sponsored by: Google, Inc. (GSoC 2018)Differential Revision: https://reviews.freebsd.org/D15979
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.
ipw: switch to ieee80211_add_channel()- Convert to ieee80211_add_channel().- Add ic_getradiocaps() method.Differential Revision: https://reviews.freebsd.org/D6236
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.
Convert more ifp->if_softc -> ic->ic_softc.These should be a big no-op.Tested:* make universe
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
Set ic_softc in all 802.11 drivers. Not required right now, but will beused quite soon.Sponsored by: NetflixSponsored by: Nginx, Inc.
Don't compare array to NULL.Found by: clang
Make net80211 drivers supply their device name to the net80211 layer, sothat the latter doesn't need to go through struct ifnet to get their name.Sponsored by: NetflixSponsored by: Nginx, Inc.
Mechanically convert to if_inc_counter().
Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED.The origin of WEP comes from IEEE Std 802.11-1997 where it defineswhether the frame body of MAC frame has been encrypted using WEP
Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED.The origin of WEP comes from IEEE Std 802.11-1997 where it defineswhether the frame body of MAC frame has been encrypted using WEPalgorithm or not.IEEE Std. 802.11-2007 changes WEP to Protected Frame, indicateswhether the frame is protected by a cryptographic encapsulationalgorithm.Reviewed by: adrian, rpaulo
- Probe with BUS_PROBE_DEFAULT instead of 0.- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices.- Use PCIR_BAR instead of a homegrown macro.- There's no need to ke
- Probe with BUS_PROBE_DEFAULT instead of 0.- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices.- Use PCIR_BAR instead of a homegrown macro.- There's no need to keep track of resource IDs.- Quiesce the interrupt before actually detaching.- Use DEVMETHOD_END.- Use NULL instead of 0 for pointers.- Nuke dupe $FreeBSD$.MFC after: 1 week
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareto this event, adding if_var.h to files that do need it. Also, includeall includes that now are included due to implicit po
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareto this event, adding if_var.h to files that do need it. Also, includeall includes that now are included due to implicit pollution via if_var.hSponsored by: NetflixSponsored by: Nginx, Inc.
Mechanically substitute flags from historic mbuf allocator withmalloc(9) flags in sys/dev.
Use suspend/resume methods provided by net80211. This ensures that theappropriate state handling takes place, not doing so results in thedevice doing nothing until manual intervention.Reviewed by
Use suspend/resume methods provided by net80211. This ensures that theappropriate state handling takes place, not doing so results in thedevice doing nothing until manual intervention.Reviewed by: iwasakiTested by: iwasaki (iwi)MFC after: 4 weeks
More conversions of drivers to use the PCI parent DMA tag.
Fix some net80211 enum nits:- ic_vap_create() uses an ieee80211_opmode argument- ieee80211_rate2media() takes an ieee80211_phymode argument- ieee80211_plcp2rate() takes an ieee80211_phytype argume
Fix some net80211 enum nits:- ic_vap_create() uses an ieee80211_opmode argument- ieee80211_rate2media() takes an ieee80211_phymode argument- ieee80211_plcp2rate() takes an ieee80211_phytype argument- cast to enum ieee80211_protmode and ieee80211_roamingmode to silence compiler warningsSubmitted by: arundel@
1234