Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/rt2661.c
RevisionDateAuthorComments
 1.44  16-Jun-2021  riastradh if_attach and if_initialize cannot fail, don't test return value

These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so
that it could fail gracefully instead of panicking:

https://mail-index.NetBSD.org/source-changes/2017/10/23/msg089053.html

However, this spawned many seldom- or never-tested error branches,
which are risky to have around. And that softint in every interface
has since been replaced by a single global workqueue, because link
state changes require thread context but not low latency or high
throughput:

https://mail-index.NetBSD.org/source-changes/2020/02/06/msg113759.html

So there is no longer any reason for if_initialize to fail. (The
subroutine if_stats_init can't fail because percpu_alloc can't fail
either.)

There is a snag: the softint_establish in if_percpuq_create could
fail, potentially leading to bad consequences later on trying to use
the softint. This change doesn't introduce any new bugs because of
the snag -- if_percpuq_attach was already broken. However, the snag
can be better addressed without spawning error branches, either by
using a single softint or making softints less scarce.

(Separate commit will change the signatures of if_attach and
if_initialize to return void, scheduled to ride whatever is the next
convenient kernel bump.)

Patch and testing on amd64 and evbmips64-eb by maya@; commit message
soliloquy, and compile-testing on evbppc/i386/earmv7hf, by me.
 1.43  29-Jan-2020  thorpej branches: 1.43.10;
Adopt <net/if_stats.h>.
 1.42  10-Nov-2019  chs branches: 1.42.2;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.41  22-Dec-2018  maxv Replace: M_COPY_PKTHDR -> m_copy_pkthdr. No functional change, since the
former is a macro to the latter.
 1.40  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.39  26-Jun-2018  msaitoh branches: 1.39.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.38  26-Jun-2018  msaitoh bpf_mtap*() before ieee80211_encap() should be bpf_mtap() rather than
bpf_mtap3(). bpf_mtap3() is for raw bpf and be used after ieee80211_encap().
 1.37  01-May-2018  maya GC private 802.11 rateset declarations, use the standard ones.

Build tested only.
 1.36  23-Oct-2017  msaitoh branches: 1.36.2;
If if_initialize() failed in the attach function, free resources and return.
 1.35  23-May-2017  ozaki-r branches: 1.35.2;
Apply deferred if_start to more drivers

And annotate some XXX_start as it runs in softint to clarify that
it doesn't need deferred if_start.
 1.34  02-Feb-2017  nonaka wlan interfaces make interrupt routine running on softint context.

see http://mail-index.netbsd.org/tech-kern/2016/12/06/msg021281.html

tested device:
* ath at pci: AR5212, AR5424
* athn at pci: AR9287
* ipw at pci: 2100BG
* iwi at pci: 2915ABG
* iwm at pci: 3165, 7260, 8260
* iwn at pci: 4945, 6235
* ral at pci: RT2560
* rtwn at pci: RTL8192CE
 1.33  10-Jun-2016  ozaki-r branches: 1.33.2; 1.33.4;
Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
 1.32  26-May-2016  ozaki-r Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.
 1.31  26-May-2016  ozaki-r Use M_GETCTX

No functional change.
 1.30  07-Jan-2015  ozaki-r Pass a correct firmware size (instead of 0) to firmware_free

firmware_free now uses kmem_free(9) instead of free(9),
so we need to pass a correct size to it.
 1.29  18-Feb-2012  drochner branches: 1.29.2; 1.29.16;
split device_t/softc
 1.28  05-Apr-2010  joerg branches: 1.28.8; 1.28.12;
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.27  19-Jan-2010  pooka branches: 1.27.2; 1.27.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.26  05-Sep-2009  tsutsui Invert logic around nested pmf(9) registrations for readability.
 1.25  07-Nov-2008  dyoung *** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address. (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior. Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability. KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr. That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR. For example, pull ..._init() out of any switch
statement that looks like this:

switch (...->sa_family) {
case ...:
..._init();
...
break;
...
default:
..._init();
...
break;
}

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

switch (x & (IFF_UP|IFF_RUNNING)) {
case 0:
...
break;
case IFF_RUNNING:
...
break;
case IFF_UP:
...
break;
case IFF_UP|IFF_RUNNING:
...
break;
}

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure. Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls. In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source. In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset. Delete unnecessary casts to void *. Use
sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with
NULL instead of "testing truth". Replace some instances of (type
*)0 with NULL. Change some K&R prototypes to ANSI C, and join
lines.
 1.24  29-Apr-2008  scw branches: 1.24.6; 1.24.8;
Pull in some more changes from OpenBSD:

- replace rssadapt(9) with amrr for automatic rate control.
- don't blindly IFQ_DEQUEUE() then drop a Tx packet if there are no
available Tx resources.
- move default MAC/BBP/RF settings from rt2661.c to rt2661reg.h.
- enable packet bursting when operating as a STA.
- implement new ic_updateslot() callback.
- in hostap mode, we defer update of the slot time until all associated
STAs are notified with updated beacons.
- 802.11a uses a 16 microseconds short interframe space.
- Fix rt2661_set_macaddr() so that we don't override the "unicast to me"
flag in RT2661_MAC_CSR3 when setting the MAC address.
- fix index of ERP information element in beacons.

Add a couple of tweaks of my own:

- The RX/TX BUSY flag should be the last thing written to a descriptor.
- Check and service any additional h/w interrupts before returning
from the isr.

Tested in STA, AP, and Monitor modes. Tested with WEP, WPA, and WPA2 crypto.

Additional testing by xtraeme@
 1.23  08-Apr-2008  cegger branches: 1.23.2; 1.23.4;
use aprint_*_dev and device_xname
 1.22  17-Mar-2008  xtraeme Merge some changes from OpenBSD:

RT2560+RT2661: update the physical address in the RX descriptor after
bus_dmamap_load() in the case where the same mbuf is reloaded.

modify interrupt handlers to exit early and return 0 on shared interrupts.

RT2661:
flags for register TXRX_CSR4 were shifted one bit too much on the left.
this has probably affected short preamble support as well as hardware
multi-rate retries settings.

fix handling of the SIOCS80211CHANNEL ioctl in monitor mode:
don't call xxx_set_chan() if the interface is not up&running.

Tested with the following hw:

ral0 at pci5 dev 0 function 0: Ralink Technologies RT2561 802.11b/g (rev. 0x00)
ral0: interrupting at ioapic0 pin 20 (irq 10)
ral0: 802.11 address 00:80:5a:4f:ab:e2
ral0: MAC/BBP RT2561C, RF RT2527
 1.21  09-Dec-2007  jmcneill branches: 1.21.6; 1.21.10;
Merge jmcneill-pm branch.
 1.20  21-Oct-2007  degroote branches: 1.20.4; 1.20.6;
Fix a number of driver which doesn't check wep flag in *_tx_mgt.
It is incorrect because we need to encrypt some management frame in case of
shared authentification.
 1.19  19-Oct-2007  ad machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.18  29-Sep-2007  scw branches: 1.18.2;
- Fix bpf radiotap: s/NPBFILTER/NBPFILTER/
- In rt2661_set_chan(), handle the case where there is no previous channel.
(Can happen if we go directly to monitor mode before UP'ing the i/f)
 1.17  01-Sep-2007  dyoung branches: 1.17.2;
Change a bazillion occurrences of code resembling this,

error = (cmd == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->sc_ec) :
ether_delmulti(ifr, &sc->sc_ec);

if (error == ENETRESET) {

to this,

if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number. This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
 1.16  26-Aug-2007  dyoung branches: 1.16.2;
Constify: LLADDR -> CLLADDR. I'm aiming here to make it easier to
identify sockaddr_dl abuse that remains in the kernel, especially
the potential for overwriting memory past the end of a sockaddr_dl
with, e.g., memcpy(LLADDR(), ...).
 1.15  09-Jul-2007  ad branches: 1.15.2; 1.15.6;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.14  04-Mar-2007  christos branches: 1.14.2; 1.14.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13  16-Nov-2006  christos branches: 1.13.2; 1.13.4;
__unused removal on arguments; approved by core.
 1.12  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.11  04-Jul-2006  rpaulo branches: 1.11.4; 1.11.6; 1.11.8;
Add missing semicolon.
 1.10  04-Jul-2006  rpaulo Coverity CID 3805: Close the firmware_handle on error and avoid leaks.
 1.9  18-Jun-2006  rpaulo branches: 1.9.2; 1.9.4; 1.9.6;
Remove IF_PREPEND() to comply with altq. I think the logic is safe to just
remove the macro call.
 1.8  18-Jun-2006  rpaulo When calling IF_DEQUEUE() check if the dequeued mbuf is NULL to comply
with altq.
 1.7  09-Jun-2006  rpaulo branches: 1.7.2;
Revert previous. Wrong way of doing things...
 1.6  08-Jun-2006  rpaulo Bring the following change from OpenBSD:

Keep track of the average RSSI using an Exponential Moving Average (EMA).
Use it to dynamically tune radio receive sensitivity.

The idea is simple:
- increase sensitivity when the RSSI is bad to optimize throughput on
long distance to the AP, and
- decrease sensitivity when the RSSI is good to reduce noise level and
optimize throughput on short distance to the AP

The EMA allows to smooth RSSI variations so we don't end up changing the
sensitivity too frequently. We check if it would be worth updating the
sensitivity every one second.
RSSI thresholds were taken from the Ralink Tech. Linux driver.
 1.5  08-Jun-2006  rpaulo Rename sta variable. Pointed out by Havard Eidnes and Juergen Hannken-Illjes.
 1.4  06-Jun-2006  rpaulo branches: 1.4.2;
Oops, missing arg to firmware_free.
 1.3  05-Jun-2006  rpaulo Don't leak memory on error.
 1.2  05-Jun-2006  rpaulo Add missing firmware_close().
 1.1  04-Jun-2006  rpaulo Driver for Ralink chipsets RT2460A, RT2560, RT2561S, RT2561 and RT2661
from FreeBSD/OpenBSD that supersedes ral*.[ch].

Not yet enabled because I don't have a CardBus controller to test and it
will most likely crash during detach.

I tried to include our modifications, but if something is missing please
tell me or add it.

Special thanks to minipci.biz for the donation of one PCI RT2661 and
one CardBus RT2661.
 1.4.2.2  07-Jun-2006  kardel Sync with head.
 1.4.2.1  06-Jun-2006  kardel file rt2661.c was added on branch simonb-timecounters on 2006-06-07 15:51:09 +0000
 1.7.2.1  13-Jul-2006  gdamore Merge from HEAD.
 1.9.6.3  11-Aug-2006  yamt sync with head
 1.9.6.2  26-Jun-2006  yamt sync with head.
 1.9.6.1  18-Jun-2006  yamt file rt2661.c was added on branch yamt-pdpolicy on 2006-06-26 12:51:02 +0000
 1.9.4.7  24-Mar-2008  yamt sync with head.
 1.9.4.6  21-Jan-2008  yamt sync with head
 1.9.4.5  27-Oct-2007  yamt sync with head.
 1.9.4.4  03-Sep-2007  yamt sync with head.
 1.9.4.3  30-Dec-2006  yamt sync with head.
 1.9.4.2  21-Jun-2006  yamt sync with head.
 1.9.4.1  18-Jun-2006  yamt file rt2661.c was added on branch yamt-lazymbuf on 2006-06-21 15:02:56 +0000
 1.9.2.2  19-Jun-2006  chap Sync with head.
 1.9.2.1  18-Jun-2006  chap file rt2661.c was added on branch chap-midi on 2006-06-19 03:58:14 +0000
 1.11.8.2  10-Dec-2006  yamt sync with head.
 1.11.8.1  22-Oct-2006  yamt sync with head
 1.11.6.2  09-Sep-2006  rpaulo sync with head
 1.11.6.1  04-Jul-2006  rpaulo file rt2661.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:50:03 +0000
 1.11.4.1  18-Nov-2006  ad Sync with head.
 1.13.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.13.2.1  31-Mar-2009  bouyer Pull up following revision(s) (requested by msaitoh in ticket #1298):
sys/dev/usb/if_ural.c: revision 1.26 via patch
sys/dev/usb/if_rum.c: revision 1.17 via patch
sys/dev/ic/rt2661.c: revision 1.20 via patch
sys/dev/ic/rt2560.c: revision 1.14 via patch
Fix a number of driver which doesn't check wep flag in *_tx_mgt.
It is incorrect because we need to encrypt some management frame in case of
shared authentification.
 1.14.4.1  11-Jul-2007  mjf Sync with head.
 1.14.2.3  23-Oct-2007  ad Sync with head.
 1.14.2.2  09-Oct-2007  ad Sync with head.
 1.14.2.1  01-Jul-2007  ad Adapt to callout API change.
 1.15.6.5  08-Dec-2007  jmcneill Rename pnp(9) -> pmf(9), as requested by many.
 1.15.6.4  06-Nov-2007  joerg Refactor PNP API:
- Make suspend/resume directly a device functionality. It consists of
three layers (class logic, device logic, bus logic), all of them being
optional. This replaces D0/D3 transitions.
- device_is_active returns true if the device was not disabled and was
not suspended (even partially), device_is_enabled returns true if the
device was enabled.
- Change pnp_global_transition into pnp_system_suspend and
pnp_system_resume. Before running any suspend/resume handlers, check
that all currently attached devices support power management and bail
out otherwise. The latter is not done for the shutdown/panic case.
- Make the former bus-specific generic network handlers a class handler.
- Make PNP message like volume up/down/toogle PNP events. Each device
can register what events they are interested in and whether the handler
should be global or not.
- Introduce device_active API for devices to mark themselve in use from
either the system or the device. Use this to implement the idle handling
for audio and input devices. This is intended to replace most ad-hoc
watchdogs as well.
- Fix somes situations in which audio resume would lose mixer settings.
- Make USB host controllers better deal with suspend in the light of
shared interrupts.
- Flush filesystem cache on suspend.
- Flush disk caches on suspend. Put ATA disks into standby on suspend as
well.
- Adopt drivers to use the new PNP API.
- Fix a critical bug in the generic cardbus layer that made D0->D3
break.
- Fix ral(4) to set if_stop.
- Convert cbb(4) to the new PNP API.
- Apply the PCI Express SCI fix on resume again.
 1.15.6.3  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.15.6.2  02-Oct-2007  joerg Sync with HEAD.
 1.15.6.1  03-Sep-2007  jmcneill Sync with HEAD.
 1.15.2.1  03-Sep-2007  skrll Sync with HEAD.
 1.16.2.3  23-Mar-2008  matt sync with HEAD
 1.16.2.2  09-Jan-2008  matt sync with HEAD
 1.16.2.1  06-Nov-2007  matt sync with HEAD
 1.17.2.1  06-Oct-2007  yamt sync with head.
 1.18.2.1  25-Oct-2007  bouyer Sync with HEAD.
 1.20.6.1  11-Dec-2007  yamt sync with head.
 1.20.4.1  26-Dec-2007  ad Sync with head.
 1.21.10.3  17-Jan-2009  mjf Sync with HEAD.
 1.21.10.2  02-Jun-2008  mjf Sync with HEAD.
 1.21.10.1  03-Apr-2008  mjf Sync with HEAD.
 1.21.6.1  24-Mar-2008  keiichi sync with head.
 1.23.4.5  11-Aug-2010  yamt sync with head.
 1.23.4.4  11-Mar-2010  yamt sync with head
 1.23.4.3  16-Sep-2009  yamt sync with head
 1.23.4.2  04-May-2009  yamt sync with head.
 1.23.4.1  16-May-2008  yamt sync with head.
 1.23.2.1  18-May-2008  yamt sync with head.
 1.24.8.1  19-Jan-2009  skrll Sync with HEAD.
 1.24.6.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.27.4.1  30-May-2010  rmind sync with head
 1.27.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.28.12.1  24-Feb-2012  mrg sync to -current.
 1.28.8.1  17-Apr-2012  yamt sync with head
 1.29.16.5  28-Aug-2017  skrll Sync with HEAD
 1.29.16.4  05-Feb-2017  skrll Sync with HEAD
 1.29.16.3  09-Jul-2016  skrll Sync with HEAD
 1.29.16.2  29-May-2016  skrll Sync with HEAD
 1.29.16.1  06-Apr-2015  skrll Sync with HEAD
 1.29.2.1  03-Dec-2017  jdolecek update from HEAD
 1.33.4.1  21-Apr-2017  bouyer Sync with HEAD
 1.33.2.1  20-Mar-2017  pgoyette Sync with HEAD
 1.35.2.2  31-Jul-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #951):

sys/dev/ic/rt2661.c: revision 1.38

bpf_mtap*() before ieee80211_encap() should be bpf_mtap() rather than
bpf_mtap3(). bpf_mtap3() is for raw bpf and be used after ieee80211_encap().
 1.35.2.1  10-Dec-2017  snj Pull up following revision(s) (requested by msaitoh in ticket #427):
sys/arch/amiga/dev/if_bah_zbus.c: 1.17
sys/arch/arm/broadcom/bcm53xx_eth.c: 1.30
sys/arch/powerpc/booke/dev/pq3etsec.c: 1.32
sys/arch/usermode/dev/if_veth.c: 1.9
sys/dev/ic/an.c: 1.66
sys/dev/ic/athn.c: 1.17
sys/dev/ic/atw.c: 1.162
sys/dev/ic/bwi.c: 1.33
sys/dev/ic/dwc_gmac.c: 1.41-1.42
sys/dev/ic/malo.c: 1.10
sys/dev/ic/rt2560.c: 1.31
sys/dev/ic/rt2661.c: 1.36
sys/dev/ic/rt2860.c: 1.29
sys/dev/ic/rtw.c: 1.127
sys/dev/ic/rtwvar.h: 1.46
sys/dev/ic/smc90cx6.c: 1.71
sys/dev/ic/smc90cx6var.h: 1.12
sys/dev/ic/wi.c: 1.244
sys/dev/pci/if_ipw.c: 1.66
sys/dev/pci/if_iwi.c: 1.104
sys/dev/pci/if_iwm.c: 1.76
sys/dev/pci/if_iwn.c: 1.86
sys/dev/pci/if_rtwn.c: 1.13
sys/dev/pci/if_wm.c: 1.541
sys/dev/pci/if_wpi.c: 1.79
sys/dev/pci/ixgbe/ixgbe.c: 1.106
sys/dev/pci/ixgbe/ixv.c: 1.73 via patch
sys/dev/pcmcia/if_malo_pcmcia.c: 1.15
sys/dev/scsipi/if_se.c: 1.95
sys/dev/usb/if_upl.c: 1.60
sys/net/if.c: 1.396
sys/net/if.h: 1.241
sys/net/if_arc.h: 1.23
sys/net/if_arcsubr.c: 1.78
sys/net/if_bridge.c: 1.136-1.137
sys/net/if_etherip.c: 1.39
sys/net/if_faith.c: 1.56
sys/net/if_gif.c: 1.131
sys/net/if_loop.c: 1.96
sys/net/if_mpls.c: 1.30
sys/net/if_pppoe.c: 1.129
sys/net/if_srt.c: 1.27
sys/net/if_stf.c: 1.102
sys/net/if_tap.c: 1.100
sys/net/if_vlan.c: 1.105
sys/netinet/ip_carp.c: 1.91
sys/rump/net/lib/libshmif/if_shmem.c: 1.73-1.74
sys/rump/net/lib/libvirtif/if_virt.c: 1.55-1.56
if_initalize() and if_attach() failed when resource allocation failed
(e.g. allocating softint). Without this change, it panics. It's bad because
resource shortage really occured when a lot of pseudo interface is created.
To avoid this problem, don't panic and change return value of if_initialize()
and if_attach() to int. Caller fanction will be recover from error cleanly by
checking the return value.
Return if bah_attach_subr() failed.
If if_attach() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add some missing frees in bridge_clone_destroy().
- KNF
If error occured in bcmeth_ccb_attach(), free resources and return.
If error occured in pq3etsec_attach(), free resources and return.
If error occured in the attach function, free resources and return.
- If if_initialize() failed in athn_attach(), free resources and return.
- Add missing pmf_event_deregister() in athn_detach().
- Free resources correctly on some errors in atw_attach().
- Use apint*() insread of printf() in the attach function.
If if_initialize() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add missing dwc_gmac_free_dma_rings() and mutex_destroy() when attach
failed.
- If if_initialize() failed in the attach function, free resources and return.
- ifp is always not NULL in iwi_detach(). Check correctly with ifp->if_softc.
- If if_initialize() failed in the attach function, free resources and return.
- Fix error path in the attach function correctly.
If if_initialize() failed in the attach function, free resources and return.
If if_attach() failed in the attach function, free resources and return.
- If if_initialize() failed in the attach function, free resources and return.
- KNF
- If if_attach() failed in the attach function, free resources and return.
- KNF
Fix compile error.
Fix compile error.
We don't need '&mii', but just 'mii' for mii_detach().
Don't free sc_rthash twice
 1.36.2.4  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.36.2.3  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.36.2.2  28-Jul-2018  pgoyette Sync with HEAD
 1.36.2.1  02-May-2018  pgoyette Synch with HEAD
 1.39.2.3  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.39.2.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.39.2.1  10-Jun-2019  christos Sync with HEAD
 1.42.2.1  29-Feb-2020  ad Sync with head.
 1.43.10.1  17-Jun-2021  thorpej Sync w/ HEAD.

RSS XML Feed