DragonFly submit List (threaded) for 2005-10
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
style(9) cleanup for if_an
He,
style(9) cleanup for sys/dev/netif/if_an/. I converted the old style to
ANSI style. Compiles clean.
Matthias
diff -urN sys.orig/dev/netif/an/if_an.c sys/dev/netif/an/if_an.c
--- sys.orig/dev/netif/an/if_an.c 2005-09-30 11:12:19.000000000 +0200
+++ sys/dev/netif/an/if_an.c 2005-09-30 18:03:38.000000000 +0200
@@ -310,8 +310,7 @@
* find this, then there's no card present.
*/
int
-an_probe(dev)
- device_t dev;
+an_probe(device_t dev)
{
struct an_softc *sc = device_get_softc(dev);
struct an_ltv_ssidlist_new ssid;
@@ -364,10 +363,7 @@
* Allocate a port resource with the given resource id.
*/
int
-an_alloc_port(dev, rid, size)
- device_t dev;
- int rid;
- int size;
+an_alloc_port(device_t dev, int rid, int size)
{
struct an_softc *sc = device_get_softc(dev);
struct resource *res;
@@ -427,10 +423,7 @@
* Allocate an irq resource with the given resource id.
*/
int
-an_alloc_irq(dev, rid, flags)
- device_t dev;
- int rid;
- int flags;
+an_alloc_irq(device_t dev, int rid, int flags)
{
struct an_softc *sc = device_get_softc(dev);
struct resource *res;
@@ -447,11 +440,7 @@
}
static void
-an_dma_malloc_cb(arg, segs, nseg, error)
- void *arg;
- bus_dma_segment_t *segs;
- int nseg;
- int error;
+an_dma_malloc_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error)
{
bus_addr_t *paddr = (bus_addr_t*) arg;
*paddr = segs->ds_addr;
@@ -461,11 +450,8 @@
* Alloc DMA memory and set the pointer to it
*/
static int
-an_dma_malloc(sc, size, dma, mapflags)
- struct an_softc *sc;
- bus_size_t size;
- struct an_dma_alloc *dma;
- int mapflags;
+an_dma_malloc(struct an_softc *sc, bus_size_t size, struct an_dma_alloc *dma,
+ int mapflags)
{
int r;
@@ -500,9 +486,7 @@
}
static void
-an_dma_free(sc, dma)
- struct an_softc *sc;
- struct an_dma_alloc *dma;
+an_dma_free(struct an_softc *sc, struct an_dma_alloc *dma)
{
bus_dmamap_unload(sc->an_dtag, dma->an_dma_map);
bus_dmamem_free(sc->an_dtag, dma->an_dma_vaddr, dma->an_dma_map);
@@ -514,8 +498,7 @@
* Release all resources
*/
void
-an_release_resources(dev)
- device_t dev;
+an_release_resources(device_t dev)
{
struct an_softc *sc = device_get_softc(dev);
int i;
@@ -558,8 +541,7 @@
}
int
-an_init_mpi350_desc(sc)
- struct an_softc *sc;
+an_init_mpi350_desc(struct an_softc *sc)
{
struct an_command cmd_struct;
struct an_reply reply;
@@ -667,10 +649,7 @@
}
int
-an_attach(sc, dev, flags)
- struct an_softc *sc;
- device_t dev;
- int flags;
+an_attach(struct an_softc *sc, device_t dev, int flags)
{
struct ifnet *ifp = &sc->arpcom.ac_if;
int error;
@@ -824,8 +803,7 @@
}
static void
-an_rxeof(sc)
- struct an_softc *sc;
+an_rxeof(struct an_softc *sc)
{
struct ifnet *ifp;
struct ether_header *eh;
@@ -1068,9 +1046,7 @@
}
static void
-an_txeof(sc, status)
- struct an_softc *sc;
- int status;
+an_txeof(struct an_softc *sc, int status)
{
struct ifnet *ifp;
int id, i;
@@ -1118,8 +1094,7 @@
* in an ad-hoc group, or as a station connected to an access point).
*/
static void
-an_stats_update(xsc)
- void *xsc;
+an_stats_update(void *xsc)
{
struct an_softc *sc;
struct ifnet *ifp;
@@ -1151,8 +1126,7 @@
}
void
-an_intr(xsc)
- void *xsc;
+an_intr(void *xsc)
{
struct an_softc *sc;
struct ifnet *ifp;
@@ -1213,10 +1187,7 @@
}
static int
-an_cmd_struct(sc, cmd, reply)
- struct an_softc *sc;
- struct an_command *cmd;
- struct an_reply *reply;
+an_cmd_struct(struct an_softc *sc, struct an_command *cmd, struct an_reply *reply)
{
int i;
@@ -1260,10 +1231,7 @@
}
static int
-an_cmd(sc, cmd, val)
- struct an_softc *sc;
- int cmd;
- int val;
+an_cmd(struct an_softc *sc, int cmd, int val)
{
int i, s = 0;
@@ -1308,8 +1276,7 @@
* head and force it to reboot correctly.
*/
static void
-an_reset(sc)
- struct an_softc *sc;
+an_reset(struct an_softc *sc)
{
an_cmd(sc, AN_CMD_ENABLE, 0);
an_cmd(sc, AN_CMD_FW_RESTART, 0);
@@ -1327,9 +1294,7 @@
* Read an LTV record from the NIC.
*/
static int
-an_read_record(sc, ltv)
- struct an_softc *sc;
- struct an_ltv_gen *ltv;
+an_read_record(struct an_softc *sc, struct an_ltv_gen *ltv)
{
struct an_ltv_gen *an_ltv;
struct an_card_rid_desc an_rid_desc;
@@ -1440,9 +1405,7 @@
* Same as read, except we inject data instead of reading it.
*/
static int
-an_write_record(sc, ltv)
- struct an_softc *sc;
- struct an_ltv_gen *ltv;
+an_write_record(struct an_softc *sc, struct an_ltv_gen *ltv)
{
struct an_card_rid_desc an_rid_desc;
struct an_command cmd;
@@ -1541,10 +1504,7 @@
}
static void
-an_dump_record(sc, ltv, string)
- struct an_softc *sc;
- struct an_ltv_gen *ltv;
- char *string;
+an_dump_record(struct an_softc *sc, struct an_ltv_gen *ltv, char *string)
{
u_int8_t *ptr2;
int len;
@@ -1586,9 +1546,7 @@
}
static int
-an_seek(sc, id, off, chan)
- struct an_softc *sc;
- int id, off, chan;
+an_seek(struct an_softc *sc, int id, int off, int chan)
{
int i;
int selreg, offreg;
@@ -1622,11 +1580,7 @@
}
static int
-an_read_data(sc, id, off, buf, len)
- struct an_softc *sc;
- int id, off;
- caddr_t buf;
- int len;
+an_read_data(struct an_softc *sc, int id, int off, caddr_t buf, int len)
{
int i;
u_int16_t *ptr;
@@ -1649,11 +1603,7 @@
}
static int
-an_write_data(sc, id, off, buf, len)
- struct an_softc *sc;
- int id, off;
- caddr_t buf;
- int len;
+an_write_data(struct an_softc *sc, int id, int off, caddr_t buf, int len)
{
int i;
u_int16_t *ptr;
@@ -1680,10 +1630,7 @@
* it out.
*/
static int
-an_alloc_nicmem(sc, len, id)
- struct an_softc *sc;
- int len;
- int *id;
+an_alloc_nicmem(struct an_softc *sc, int len, int *id)
{
int i;
@@ -1714,9 +1661,7 @@
}
static void
-an_setdef(sc, areq)
- struct an_softc *sc;
- struct an_req *areq;
+an_setdef(struct an_softc *sc, struct an_req *areq)
{
struct ifnet *ifp;
struct an_ltv_genconfig *cfg;
@@ -1825,9 +1770,7 @@
*/
static void
-an_promisc(sc, promisc)
- struct an_softc *sc;
- int promisc;
+an_promisc(struct an_softc *sc, int promisc)
{
if (sc->an_was_monitor)
an_reset(sc);
@@ -1843,11 +1786,7 @@
}
static int
-an_ioctl(ifp, command, data, cr)
- struct ifnet *ifp;
- u_long command;
- caddr_t data;
- struct ucred *cr;
+an_ioctl(struct ifnet *ifp, u_long command, caddr_t data, struct ucred *cr)
{
int error = 0;
int len;
@@ -2427,8 +2366,7 @@
}
static int
-an_init_tx_ring(sc)
- struct an_softc *sc;
+an_init_tx_ring(struct an_softc *sc)
{
int i;
int id;
@@ -2451,8 +2389,7 @@
}
static void
-an_init(xsc)
- void *xsc;
+an_init(void *xsc)
{
struct an_softc *sc = xsc;
struct ifnet *ifp = &sc->arpcom.ac_if;
@@ -2553,8 +2490,7 @@
}
static void
-an_start(ifp)
- struct ifnet *ifp;
+an_start(struct ifnet *ifp)
{
struct an_softc *sc;
struct mbuf *m0 = NULL;
@@ -2722,8 +2658,7 @@
}
void
-an_stop(sc)
- struct an_softc *sc;
+an_stop(struct an_softc *sc)
{
struct ifnet *ifp;
int i;
@@ -2752,8 +2687,7 @@
}
static void
-an_watchdog(ifp)
- struct ifnet *ifp;
+an_watchdog(struct ifnet *ifp)
{
struct an_softc *sc;
@@ -2772,8 +2706,7 @@
}
void
-an_shutdown(dev)
- device_t dev;
+an_shutdown(device_t dev)
{
struct an_softc *sc;
@@ -2784,8 +2717,7 @@
}
void
-an_resume(dev)
- device_t dev;
+an_resume(device_t dev)
{
struct an_softc *sc;
struct ifnet *ifp;
@@ -2875,11 +2807,7 @@
* strength in MAC (src) indexed cache.
*/
static void
-an_cache_store (sc, m, rx_rssi, rx_quality)
- struct an_softc *sc;
- struct mbuf *m;
- u_int8_t rx_rssi;
- u_int8_t rx_quality;
+an_cache_store (struct an_softc *sc, struct mbuf *m, u_int8_t rx_rssi, u_int8_t rx_quality)
{
struct ether_header *eh = mtod(m, struct ether_header *);
struct ip *ip = NULL;
@@ -3017,8 +2945,7 @@
#endif
static int
-an_media_change(ifp)
- struct ifnet *ifp;
+an_media_change(struct ifnet *ifp)
{
struct an_softc *sc = ifp->if_softc;
struct an_ltv_genconfig *cfg;
@@ -3072,9 +2999,7 @@
}
static void
-an_media_status(ifp, imr)
- struct ifnet *ifp;
- struct ifmediareq *imr;
+an_media_status(struct ifnet *ifp, struct ifmediareq *imr)
{
struct an_ltv_status status;
struct an_softc *sc = ifp->if_softc;
@@ -3122,9 +3047,7 @@
*/
static int
-readrids(ifp, l_ioctl)
- struct ifnet *ifp;
- struct aironet_ioctl *l_ioctl;
+readrids(struct ifnet *ifp, struct aironet_ioctl *l_ioctl)
{
unsigned short rid;
struct an_softc *sc;
@@ -3193,9 +3116,7 @@
}
static int
-writerids(ifp, l_ioctl)
- struct ifnet *ifp;
- struct aironet_ioctl *l_ioctl;
+writerids(struct ifnet *ifp, struct aironet_ioctl *l_ioctl)
{
struct an_softc *sc;
int rid, command;
@@ -3296,8 +3217,7 @@
#define FLASH_SIZE 32 * 1024
static int
-unstickbusy(ifp)
- struct ifnet *ifp;
+unstickbusy(struct ifnet *ifp)
{
struct an_softc *sc = ifp->if_softc;
@@ -3315,9 +3235,7 @@
*/
static int
-WaitBusy(ifp, uSec)
- struct ifnet *ifp;
- int uSec;
+WaitBusy(struct ifnet *ifp, int uSec)
{
int statword = 0xffff;
int delay = 0;
@@ -3341,8 +3259,7 @@
*/
static int
-cmdreset(ifp)
- struct ifnet *ifp;
+cmdreset(struct ifnet *ifp)
{
int status;
struct an_softc *sc = ifp->if_softc;
@@ -3372,8 +3289,7 @@
*/
static int
-setflashmode(ifp)
- struct ifnet *ifp;
+setflashmode(struct ifnet *ifp)
{
int status;
struct an_softc *sc = ifp->if_softc;
@@ -3401,10 +3317,7 @@
*/
static int
-flashgchar(ifp, matchbyte, dwelltime)
- struct ifnet *ifp;
- int matchbyte;
- int dwelltime;
+flashgchar(struct ifnet *ifp, int matchbyte, int dwelltime)
{
int rchar;
unsigned char rbyte = 0;
@@ -3440,10 +3353,7 @@
*/
static int
-flashpchar(ifp, byte, dwelltime)
- struct ifnet *ifp;
- int byte;
- int dwelltime;
+flashpchar(struct ifnet *ifp, int byte, int dwelltime)
{
int echo;
int pollbusy, waittime;
@@ -3499,8 +3409,7 @@
*/
static int
-flashputbuf(ifp)
- struct ifnet *ifp;
+flashputbuf(struct ifnet *ifp)
{
unsigned short *bufp;
int nwords;
@@ -3534,8 +3443,7 @@
*/
static int
-flashrestart(ifp)
- struct ifnet *ifp;
+flashrestart(struct ifnet *ifp)
{
int status = 0;
struct an_softc *sc = ifp->if_softc;
@@ -3553,9 +3461,7 @@
*/
static int
-flashcard(ifp, l_ioctl)
- struct ifnet *ifp;
- struct aironet_ioctl *l_ioctl;
+flashcard(struct ifnet *ifp, struct aironet_ioctl *l_ioctl)
{
int z = 0, status;
struct an_softc *sc;
diff -urN sys.orig/dev/netif/an/if_an_isa.c sys/dev/netif/an/if_an_isa.c
--- sys.orig/dev/netif/an/if_an_isa.c 2005-09-30 11:12:19.000000000 +0200
+++ sys/dev/netif/an/if_an_isa.c 2005-09-30 18:04:18.000000000 +0200
@@ -81,8 +81,7 @@
static int an_attach_isa (device_t);
static int
-an_probe_isa(dev)
- device_t dev;
+an_probe_isa(device_t dev)
{
int error;
@@ -103,8 +102,7 @@
}
static int
-an_attach_isa(dev)
- device_t dev;
+an_attach_isa(device_t dev)
{
struct an_softc *sc = device_get_softc(dev);
int flags = device_get_flags(dev);
diff -urN sys.orig/dev/netif/an/if_an_pci.c sys/dev/netif/an/if_an_pci.c
--- sys.orig/dev/netif/an/if_an_pci.c 2005-09-30 11:12:19.000000000 +0200
+++ sys/dev/netif/an/if_an_pci.c 2005-09-30 18:04:54.000000000 +0200
@@ -138,8 +138,7 @@
}
static int
-an_attach_pci(dev)
- device_t dev;
+an_attach_pci(device_t dev)
{
struct an_softc *sc;
int flags, error;
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]