History log of /haiku/src/libs/compat/freebsd_network/if.c
Revision Date Author Comments
# 9504fccf 26-Jan-2024 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: ether_input needs to support multiple packets.

It does on FreeBSD, though not many drivers make use
of this functionality (on Haiku, only iflib appeared to,
and it has a workaround at the moment.)


# 3c5b619e 09-Jun-2022 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Remove unneeded frees of if_l2com.

After 458c40fb2787fde1b9363cb43d15941591a7b923, if_l2com is not
allocated anymore, but I missed deleting these at that time.


# 8548a4ad 12-May-2022 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Adaptations in preparation for the OpenBSD layer.

Most of these changes however add things that FreeBSD has (with a few
exceptions noted in comments) which the OpenBSD shim layer merely needs
to make use of.

(FreeBSD used to have support for IFF_NEEDSGIANT but removed it. The
support instated here is very similar to what FreeBSD used to have.)


# 3ed50413 27-May-2022 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Fix SIOCSIFMTU handling in ether_ioctl.

We cannot set anything below ETHERMIN nor greater than ETHERMTU here,
because we do not know what capabilities the driver actually has.
(The driver will have already caught and handled this ioctl if it
supports something more than the required minimum.)


# 458c40fb 19-May-2022 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Drop arpcom from if_arp.h.

It was dropped from FreeBSD somewhere between 9 and 13.
OpenBSD has an equivalent structure but it is not compatible.
Best to avoid it altogether.


# c2a9a890 05-May-2022 Alexander von Gluck IV <kallisti5@unixzen.com>

compat/freebsd_network: Catch BSD socket ioctl and act on within stack

Change-Id: Iaf7e645836ffee58b3a8a8e5352048412035ab32
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5296
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 2155cf67 20-Oct-2021 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Add new APIs used by FreeBSD 13 drivers.


# dba28784 24-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

freebsd11_network -> freebsd_network.

FreeBSD 12 has no major changes to the ifnet KPIs that constitute a
source compatibility break, save a single one related to locking
which doesn't really apply to us, and so we don't need to create
a "freebsd12_network" directory to work through the upgrades.


# a7359754 18-Jan-2017 Andrew Aldridge <i80and@foxquill.com>

Sync atheros813x with FreeBSD

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #12328.
Fixed a style error (2 lines between functions).


# edfba0bb 24-Oct-2011 Michael Lotz <mmlr@mlotz.ch>

Actually put a note about the Haiku specific there, so that this isn't
overlooked accidentally on future updates.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42900 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a3f90d5c 24-Oct-2011 Michael Lotz <mmlr@mlotz.ch>

Unlike FreeBSD we use a ifmultiaddr struct field to store the address and let
the ifma_addr point to that. Therefore freeing it caused a misaligned free and
then a double free, resulting in heap corruption for the next user to fall
victim to. Only happened when removing multicast addresses though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42899 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8dc03de6 11-Apr-2011 Jérôme Duval <korli@users.berlios.de>

merged changes from 8.2 FreeBSD release for most wlan drivers and net80211.
updated several firmwares for iprowifi4965 and iprowifi3945. Tested on iprowifi4965 only.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41240 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25b74837 27-Dec-2009 Colin Günther <coling@gmx.de>

* Removing comments, that were leftovers from FreeBSD. These comments lead to
wrong impression about innerworkings of Haiku's compat layer.
* Use C++ comment style where appropriate.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34791 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cc83a821 18-Dec-2009 Michael Lotz <mmlr@mlotz.ch>

The wlan part uses a very specific way to update multicast addresses for the
parent interface. It calls if_addmulti() on it but temporarily sets the ioctl
hook to NULL. We need to account for that so we don't crash on multicast setup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# da0be4bf 26-Nov-2009 Colin Günther <coling@gmx.de>

Remove the wlan specific headers to allow a clearer distinction between
ethernet and wlan drivers when compiling them. Also this removes the burden to
recompile every ethernet driver just because of changes in the wlan part.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34306 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14627e08 22-Oct-2009 Colin Günther <coling@gmx.de>

* reordering of headerfile inclusion to comply to FreeBSD 8
ordering.
this makes porting driver (especially wifi ones) more
convinient
* based on FreeBSD svn revision 196691

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33739 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e78ad19f 21-Oct-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Added new methods introduced in freebsd head that encapsulate macros to allow better binary compatibility if the locking way ever changes. These are not really useful, but needed for newer drivers sourcecode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33714 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3e9b338e 18-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Applied cleaned patch by Adrian: the gDevices[] can now have empty entries,
the gDeviceNameList[] entries are no longer in the same order.
* This fixes bug #3124.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29593 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 30710739 29-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* compat_open() still needs to get the stack module, as the callout
functionality needs it.
* callout_init_mtx() now initializes the timer manually, since the stack
might not have been loaded yet (since a device is now attached in
init_driver()).
* Minor other fixes; the FreeBSD compatibility layer should now be functional
again.
* Accidently put pci.c into the repository, but that was never meant to happen.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23026 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 080b265a 29-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

Completely renovated the FreeBSD compatibility layer:
* Removed NETDEV() and DEVNET() macros and functionality.
* The exported devices are now attached to ifnet objects only, therefore, the
ifnet object now has the receive queue, and everything else a device could
need.
* There is now a root device where everything else is attached, it currently
only holds the pci_info structure, so it's more or less a PCI child.
* This simplified the device handling a bit everywhere.
* We now attach drivers already in init_driver() - this is needed as drivers
may publish more than one interface when being attached.
* Implemented device_delete_child(), device_attach() (which bus_generic_attach()
now uses), device_is_attached(), and device_is_alive().
* Therefore, if_initname() does now the actual job of registering the devices.
* On open, if_init() is called which comes pretty close to what our open()
is supposed to do.
* Updated ukphy.c to the one from FreeBSD 7 where used (we should probably
move that into the compat layer, anyway).
* The MII driver array must now be NULL terminated; therefore you don't need
to specify the count anymore.
* Moved PCI code from compat.c to bus.c.
* Moved the driver code from device.c to driver.c.
* Removed superfluous init_compat_layer() function.
* Fixed a few bugs, a few things weren't brought down correctly.
* The rtl8139 interrupt routine now checks if it really was the cause of the
interrupt - this code is not tested, either, it may not work (which would
then require a work-around like I did for the 3com driver).
* The HAIKU_PROTECT_INTR_REGISTER in the rtl8139 driver was pretty much useless
which is why I removed it.
* Probably introduced a lot of new bugs, though - I haven't tested this code
at all yet. It will probably just crash :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23019 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6b096660 28-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

The compatibility layer was calling if_init() too early, I've now moved it to the compat_open()
function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23014 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 239239c8 25-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Updated the FreeBSD compatibility layer for network drivers to FreeBSD 7
(RELENG_7_BP).
* There are many white spots, though, most notable PCI MSI(-X) support, and
jumbo frames.
* Fixed removing interrupts for the INTR_FAST case. Since FreeBSD 7 added
a new interrupt "filter" mechanism, we can finally report if the interface
was handled by a device or not (though only very few devices support this
yet).
* Updated the 3com, rtl8139, e1000, and via_rhine drivers to the latest code
base. They all compile, but I haven't tested them after the changes yet!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22991 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e60d7937 03-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

The MAC address might need to be copied to the arpcom structure as well
(the 3com driver needs this, for example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22814 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d8f9591f 30-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed the loop in bus_generic_attach() that I accidently broke with the previous commit.
* Calmed down the FreeBSD compatibility layer considerably.
* Now also sets the arpcom's ac_ifp field for completeness.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22772 a95241bf-73f2-0310-859d-f6bbb57e9c96


# afa1bfe5 29-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

IFT_ETHER expects an arpcom structure at if_l2com; this would actually need
to be expanded for other types, but for now, we'll probably only get IFT_ETHER
anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22766 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6509511 09-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: split device structure to handle for miibus devices, added a new network_device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21094 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 07ef8870 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: multicast support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21081 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dcaf1f47 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: splited freebsd original code into own files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21079 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b27873dc 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added ETHER_SETPROMISC, ETHER_GET_LINK_STATE and ETHER_SET_LINK_STATE_SEM support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21050 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 80df1125 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: now both receiving and sending work with PCNET.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21048 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e2941f52 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: couple fixes, sending now works with PCNET. enabled ifmedia_ioctl, and when opening a device, set it down, change media to ETHER/AUTO and set it back up so it sees a IFF_UP.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21047 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0bdff524 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: instead of disabling the IRQ, disable the device's interrupts on real interrupt request as suggested by Travis. This solves potential issues with shared IRQs. The check & disable interrupts function is part of the required glue code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21045 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1a99f77 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: use a thread for deferred interrupt handling. fixed a issue with bus_space_write_N. init the receive queue on device creation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21041 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ddcaaa61 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added open(), which calls into the driver's attach. when testing with PCNET, a interface is already presented to the stack, it is even able to obtain the MAC address from the device, but still more work to do.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21030 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 00212abe 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: a few more methods, preparing for pcnet


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21026 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a8ff4e33 03-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: ifnet and ethernet methods. missing MII and callout


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21000 a95241bf-73f2-0310-859d-f6bbb57e9c96


# edfba0bb0395bb825edc4766c990b246a7de92eb 24-Oct-2011 Michael Lotz <mmlr@mlotz.ch>

Actually put a note about the Haiku specific there, so that this isn't
overlooked accidentally on future updates.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42900 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a3f90d5ccafd3f0d6872196133e5786e6bac76e7 24-Oct-2011 Michael Lotz <mmlr@mlotz.ch>

Unlike FreeBSD we use a ifmultiaddr struct field to store the address and let
the ifma_addr point to that. Therefore freeing it caused a misaligned free and
then a double free, resulting in heap corruption for the next user to fall
victim to. Only happened when removing multicast addresses though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42899 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8dc03de632faeed754033a549eec60b411308cad 11-Apr-2011 Jérôme Duval <korli@users.berlios.de>

merged changes from 8.2 FreeBSD release for most wlan drivers and net80211.
updated several firmwares for iprowifi4965 and iprowifi3945. Tested on iprowifi4965 only.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41240 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25b74837168f2afdae5ce29b254acd4a60cbc1f6 27-Dec-2009 Colin Günther <coling@gmx.de>

* Removing comments, that were leftovers from FreeBSD. These comments lead to
wrong impression about innerworkings of Haiku's compat layer.
* Use C++ comment style where appropriate.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34791 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cc83a8213b49f0981a9ffb1108e5bfe89873d4ef 18-Dec-2009 Michael Lotz <mmlr@mlotz.ch>

The wlan part uses a very specific way to update multicast addresses for the
parent interface. It calls if_addmulti() on it but temporarily sets the ioctl
hook to NULL. We need to account for that so we don't crash on multicast setup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# da0be4bf3f3ba9cb391605e9d552df24933e0da7 26-Nov-2009 Colin Günther <coling@gmx.de>

Remove the wlan specific headers to allow a clearer distinction between
ethernet and wlan drivers when compiling them. Also this removes the burden to
recompile every ethernet driver just because of changes in the wlan part.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34306 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14627e087b920676d05d45cec5f28688744e1fdb 22-Oct-2009 Colin Günther <coling@gmx.de>

* reordering of headerfile inclusion to comply to FreeBSD 8
ordering.
this makes porting driver (especially wifi ones) more
convinient
* based on FreeBSD svn revision 196691

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33739 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e78ad19f6b090c1826c061f95a970450b6784ce2 21-Oct-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Added new methods introduced in freebsd head that encapsulate macros to allow better binary compatibility if the locking way ever changes. These are not really useful, but needed for newer drivers sourcecode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33714 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3e9b338ea7240c7e7cba1edc46584050d2d7634d 18-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Applied cleaned patch by Adrian: the gDevices[] can now have empty entries,
the gDeviceNameList[] entries are no longer in the same order.
* This fixes bug #3124.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29593 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 30710739a3f1dfd2b0070fac62ecbdd8540ba4be 29-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* compat_open() still needs to get the stack module, as the callout
functionality needs it.
* callout_init_mtx() now initializes the timer manually, since the stack
might not have been loaded yet (since a device is now attached in
init_driver()).
* Minor other fixes; the FreeBSD compatibility layer should now be functional
again.
* Accidently put pci.c into the repository, but that was never meant to happen.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23026 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 080b265acd2f9903dcaf3d1e5076b0ecb8c20c6c 29-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

Completely renovated the FreeBSD compatibility layer:
* Removed NETDEV() and DEVNET() macros and functionality.
* The exported devices are now attached to ifnet objects only, therefore, the
ifnet object now has the receive queue, and everything else a device could
need.
* There is now a root device where everything else is attached, it currently
only holds the pci_info structure, so it's more or less a PCI child.
* This simplified the device handling a bit everywhere.
* We now attach drivers already in init_driver() - this is needed as drivers
may publish more than one interface when being attached.
* Implemented device_delete_child(), device_attach() (which bus_generic_attach()
now uses), device_is_attached(), and device_is_alive().
* Therefore, if_initname() does now the actual job of registering the devices.
* On open, if_init() is called which comes pretty close to what our open()
is supposed to do.
* Updated ukphy.c to the one from FreeBSD 7 where used (we should probably
move that into the compat layer, anyway).
* The MII driver array must now be NULL terminated; therefore you don't need
to specify the count anymore.
* Moved PCI code from compat.c to bus.c.
* Moved the driver code from device.c to driver.c.
* Removed superfluous init_compat_layer() function.
* Fixed a few bugs, a few things weren't brought down correctly.
* The rtl8139 interrupt routine now checks if it really was the cause of the
interrupt - this code is not tested, either, it may not work (which would
then require a work-around like I did for the 3com driver).
* The HAIKU_PROTECT_INTR_REGISTER in the rtl8139 driver was pretty much useless
which is why I removed it.
* Probably introduced a lot of new bugs, though - I haven't tested this code
at all yet. It will probably just crash :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23019 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6b096660341e8accfb30a289541a75f4ea8c0c52 28-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

The compatibility layer was calling if_init() too early, I've now moved it to the compat_open()
function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23014 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 239239c8a0c6a2671f8f236ba32abf03e78f0c27 25-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Updated the FreeBSD compatibility layer for network drivers to FreeBSD 7
(RELENG_7_BP).
* There are many white spots, though, most notable PCI MSI(-X) support, and
jumbo frames.
* Fixed removing interrupts for the INTR_FAST case. Since FreeBSD 7 added
a new interrupt "filter" mechanism, we can finally report if the interface
was handled by a device or not (though only very few devices support this
yet).
* Updated the 3com, rtl8139, e1000, and via_rhine drivers to the latest code
base. They all compile, but I haven't tested them after the changes yet!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22991 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e60d7937c976f672880fd5805cfd91019c8c84c0 03-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

The MAC address might need to be copied to the arpcom structure as well
(the 3com driver needs this, for example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22814 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d8f9591fa7ff318195cbe37367bbd11cb245b46f 30-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed the loop in bus_generic_attach() that I accidently broke with the previous commit.
* Calmed down the FreeBSD compatibility layer considerably.
* Now also sets the arpcom's ac_ifp field for completeness.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22772 a95241bf-73f2-0310-859d-f6bbb57e9c96


# afa1bfe51da2ce663ad99105748c7ad55042b75f 29-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

IFT_ETHER expects an arpcom structure at if_l2com; this would actually need
to be expanded for other types, but for now, we'll probably only get IFT_ETHER
anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22766 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b650951128733ee316bb4c9b985b99363b2e72e8 09-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: split device structure to handle for miibus devices, added a new network_device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21094 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 07ef8870a37b1f275963aee79332df4b672335ee 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: multicast support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21081 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dcaf1f47c5ca382a5e1f5d71af88fec28d6c20c0 08-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: splited freebsd original code into own files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21079 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b27873dc4ad63e9121bf32a2301389cf869e1f9b 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added ETHER_SETPROMISC, ETHER_GET_LINK_STATE and ETHER_SET_LINK_STATE_SEM support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21050 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 80df11254fc518eac0c19463220d75381490b5e8 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: now both receiving and sending work with PCNET.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21048 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e2941f52fd986525ccfb757dd6c8020b2be38b68 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: couple fixes, sending now works with PCNET. enabled ifmedia_ioctl, and when opening a device, set it down, change media to ETHER/AUTO and set it back up so it sees a IFF_UP.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21047 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0bdff52467a7c86f9d0e33f2b4eb79bbf65aa5bb 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: instead of disabling the IRQ, disable the device's interrupts on real interrupt request as suggested by Travis. This solves potential issues with shared IRQs. The check & disable interrupts function is part of the required glue code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21045 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1a99f77d48faf3bd1d0e007afebb96c34016893 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: use a thread for deferred interrupt handling. fixed a issue with bus_space_write_N. init the receive queue on device creation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21041 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ddcaaa6129d2c66d69c4bd3d0c238ce813ed62d7 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added open(), which calls into the driver's attach. when testing with PCNET, a interface is already presented to the stack, it is even able to obtain the MAC address from the device, but still more work to do.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21030 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 00212abe1c16a1cd1fdef6f0fddb2a67e48af934 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: a few more methods, preparing for pcnet


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21026 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a8ff4e33f19740283612a360581fe7f5590112a5 03-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: ifnet and ethernet methods. missing MII and callout


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21000 a95241bf-73f2-0310-859d-f6bbb57e9c96