Move ether_driver.h to headers/private/net.

Add a sis900 sample settings file.
Add openbeos-sis900-cvs and openbeos-rtl8139-cvs packaging.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6033 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2004-01-12 23:23:03 +00:00
parent 8c07d0a8f3
commit e444964319
5 changed files with 70 additions and 128 deletions

View File

@ -3,11 +3,27 @@ SubDir OBOS_TOP src add-ons kernel drivers network rtl8139 ;
# set some additional flags
SubDirCcFlags -Wall ;
# For ether_driver.h
UsePrivateHeaders net ;
R5KernelAddon rtl8139 : kernel drivers bin :
driver.c
util.c
;
Package openbeos-rtl8139-cvs :
rtl8139 :
boot home config add-ons kernel drivers bin ;
Package openbeos-rtl8139-cvs :
<kernel!drivers!dev!net>rtl8139 :
boot home config add-ons kernel drivers dev net ;
# Package openbeos-rtl8139-cvs :
# rtl8139.settings :
# boot home config settings kernel drivers sample ;
# Link driver(s) to kernel/drivers/dev/net
{
local dir = [ FDirName $(OBOS_ADDON_DIR) kernel drivers dev net ] ;
@ -33,13 +49,13 @@ actions ignore InstallRTL8139
# Installation
# OBOSInstall install-networking : /boot/home/config/add-ons/kernel/drivers/bin :
# rtl8139
# ;
OBOSInstall install-networking : /boot/home/config/add-ons/kernel/drivers/bin :
rtl8139
;
# OBOSInstallRelSymLink install-networking : /boot/home/config/add-ons/kernel/drivers/dev/net :
# <installed>rtl8139 :
# installed-symlink
# ;
OBOSInstallRelSymLink install-networking : /boot/home/config/add-ons/kernel/drivers/dev/net :
<installed>rtl8139 :
installed-symlink
;

View File

@ -1,57 +0,0 @@
/*
* ether_driver.h
*
* Ethernet driver: handles NE2000 and 3C503 cards
*/
/*
Copyright 1999, Be Incorporated. All Rights Reserved.
This file may be used under the terms of the Be Sample Code License.
*/
#ifndef _ETHER_DRIVER_H
#define _ETHER_DRIVER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <Drivers.h>
/*
* ioctls: belongs in a public header file
* somewhere, so that the net_server and other ethernet drivers can use.
*/
enum {
ETHER_GETADDR = B_DEVICE_OP_CODES_END, /* get ethernet address */
ETHER_INIT, /* set irq and port */
ETHER_NONBLOCK, /* set/unset nonblocking mode */
ETHER_ADDMULTI, /* add multicast addr */
ETHER_REMMULTI, /* rem multicast addr */
ETHER_SETPROMISC, /* set promiscuous */
ETHER_GETFRAMESIZE /* get frame size */
};
/*
* 48-bit ethernet address, passed back from ETHER_GETADDR
*/
typedef struct {
unsigned char ebyte[6];
} ether_address_t;
/*
* info passed to ETHER_INIT
*/
typedef struct ether_init_params {
short port;
short irq;
unsigned long mem;
} ether_init_params_t;
#ifdef __cplusplus
}
#endif
#endif /* _ETHER_DRIVER_H */

View File

@ -3,6 +3,9 @@ SubDir OBOS_TOP src add-ons kernel drivers network sis900 ;
# set some additional flags
SubDirCcFlags -Wall ;
# For ether_driver.h
UsePrivateHeaders net ;
R5KernelAddon sis900 : kernel drivers bin :
driver.c
device.c
@ -10,6 +13,17 @@ R5KernelAddon sis900 : kernel drivers bin :
sis900.c
;
Package openbeos-sis900-cvs :
sis900 :
boot home config add-ons kernel drivers bin ;
Package openbeos-sis900-cvs :
<kernel!drivers!dev!net>sis900 :
boot home config add-ons kernel drivers dev net ;
Package openbeos-sis900-cvs :
sis900.settings :
boot home config settings kernel drivers sample ;
# Link driver(s) to kernel/drivers/dev/net
{
local dir = [ FDirName $(OBOS_ADDON_DIR) kernel drivers dev net ] ;
@ -34,12 +48,12 @@ actions ignore InstallSiS900
# Installation
# OBOSInstall install-networking : /boot/home/config/add-ons/kernel/drivers/bin :
# sis900
# ;
OBOSInstall install-networking : /boot/home/config/add-ons/kernel/drivers/bin :
sis900
;
# OBOSInstallRelSymLink install-networking : /boot/home/config/add-ons/kernel/drivers/dev/net :
# <installed>sis900 :
# installed-symlink
# ;
OBOSInstallRelSymLink install-networking : /boot/home/config/add-ons/kernel/drivers/dev/net :
<installed>sis900 :
installed-symlink
;

View File

@ -1,57 +0,0 @@
/*
* ether_driver.h
*
* Ethernet driver: handles NE2000 and 3C503 cards
*/
/*
Copyright 1999, Be Incorporated. All Rights Reserved.
This file may be used under the terms of the Be Sample Code License.
*/
#ifndef _ETHER_DRIVER_H
#define _ETHER_DRIVER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <Drivers.h>
/*
* ioctls: belongs in a public header file
* somewhere, so that the net_server and other ethernet drivers can use.
*/
enum {
ETHER_GETADDR = B_DEVICE_OP_CODES_END, /* get ethernet address */
ETHER_INIT, /* set irq and port */
ETHER_NONBLOCK, /* set/unset nonblocking mode */
ETHER_ADDMULTI, /* add multicast addr */
ETHER_REMMULTI, /* rem multicast addr */
ETHER_SETPROMISC, /* set promiscuous */
ETHER_GETFRAMESIZE /* get frame size */
};
/*
* 48-bit ethernet address, passed back from ETHER_GETADDR
*/
typedef struct {
unsigned char ebyte[6];
} ether_address_t;
/*
* info passed to ETHER_INIT
*/
typedef struct ether_init_params {
short port;
short irq;
unsigned long mem;
} ether_init_params_t;
#ifdef __cplusplus
}
#endif
#endif /* _ETHER_DRIVER_H */

View File

@ -0,0 +1,26 @@
# Sample settings file for the sis900 driver
#
# This file should be moved to the directory
# ~/config/settings/kernel/drivers/
#
# Currently supported settings are:
#
# speed <value>
#
# where value can be:
# 1 to force 1Mbits link speed
# 10 to force a 10Mbits link speed
# 100 to force a 100Mbits link speed
# auto to allow link speed auto negotiation (default)
#
# duplex <value>
#
# where value can be:
# half to force half duplex link mode
# full to force full duplex link mode
# auto to allow link mode auto negotiation (default)
# ---- WARNING:
# speed and duplex settings should both set, otherwise their (both) values are ignored.