DragonFly BSD
DragonFly submit List (threaded) for 2005-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

style(9) cleanup for if_awi


From: Matthias Schmidt <schmidtm@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 01 Oct 2005 11:42:16 +0200

Moin,

style(9) cleanup for sys/dev/netif/if_awi/. I converted the old style to ANSI style. Compiles clean. I also renamed two unsigned char's to u_char to be consistent with the rest of the source.


Matthias
diff -urN sys.orig/dev/netif/awi/am79c930.c sys/dev/netif/awi/am79c930.c
--- sys.orig/dev/netif/awi/am79c930.c	2005-09-30 11:12:17.000000000 +0200
+++ sys/dev/netif/awi/am79c930.c	2005-09-30 18:27:39.000000000 +0200
@@ -117,10 +117,7 @@
 	mem_read_bytes
 };
 
-static void io_write_1 (sc, off, val)
-	struct am79c930_softc *sc;
-	u_int32_t off;
-	u_int8_t val;
+static void io_write_1 (struct am79c930_softc *sc, u_int32_t off, u_int8_t val)
 {
 	AM930_DELAY(1);
 	bus_space_write_1(sc->sc_iot, sc->sc_ioh, AM79C930_LMA_HI,
@@ -132,10 +129,7 @@
 	AM930_DELAY(1);
 }
 
-static void io_write_2 (sc, off, val)
-	struct am79c930_softc *sc;
-	u_int32_t off;
-	u_int16_t val;
+static void io_write_2 (struct am79c930_softc *sc, u_int32_t off, u_int16_t val)
 {
 	AM930_DELAY(1);
 	bus_space_write_1(sc->sc_iot, sc->sc_ioh, AM79C930_LMA_HI,
@@ -149,10 +143,7 @@
 	AM930_DELAY(1);
 }
 
-static void io_write_4 (sc, off, val)
-	struct am79c930_softc *sc;
-	u_int32_t off;
-	u_int32_t val;
+static void io_write_4 (struct am79c930_softc *sc, u_int32_t off, u_int32_t val)
 {
 	AM930_DELAY(1);
 	bus_space_write_1(sc->sc_iot, sc->sc_ioh, AM79C930_LMA_HI,
@@ -170,11 +161,8 @@
 	AM930_DELAY(1);
 }
 
-static void io_write_bytes (sc, off, ptr, len)
-	struct am79c930_softc *sc;
-	u_int32_t off;
-	u_int8_t *ptr;
-	size_t len;
+static void io_write_bytes (struct am79c930_softc *sc, u_int32_t off,
+    u_int8_t *ptr, size_t len)
 {
 	int i;
 
@@ -188,9 +176,7 @@
 		bus_space_write_1(sc->sc_iot,sc->sc_ioh,AM79C930_IODPA,ptr[i]);
 }
 
-static u_int8_t io_read_1 (sc, off)
-	struct am79c930_softc *sc;
-	u_int32_t off;
+static u_int8_t io_read_1 (struct am79c930_softc *sc, u_int32_t off)
 {
 	u_int8_t val;
 	
@@ -204,9 +190,7 @@
 	return val;
 }
 
-static u_int16_t io_read_2 (sc, off)
-	struct am79c930_softc *sc;
-	u_int32_t off;
+static u_int16_t io_read_2 (struct am79c930_softc *sc, u_int32_t off)
 {
 	u_int16_t val;
 
@@ -222,9 +206,7 @@
 	return val;
 }
 
-static u_int32_t io_read_4 (sc, off)
-	struct am79c930_softc *sc;
-	u_int32_t off;
+static u_int32_t io_read_4 (struct am79c930_softc *sc, u_int32_t off)
 {
 	u_int32_t val;
 
@@ -244,11 +226,8 @@
 	return val;
 }
 
-static void io_read_bytes (sc, off, ptr, len)
-	struct am79c930_softc *sc;
-	u_int32_t off;
-	u_int8_t *ptr;
-	size_t len;
+static void io_read_bytes (struct am79c930_softc *sc, u_int32_t off,
+    u_int8_t *ptr, size_t len)
 {
 	int i;
 	
@@ -262,18 +241,12 @@
 		    AM79C930_IODPA);
 }
 
-static void mem_write_1 (sc, off, val)
-	struct am79c930_softc *sc;
-	u_int32_t off;
-	u_int8_t val;
+static void mem_write_1 (struct am79c930_softc *sc, u_int32_t off, u_int8_t val)
 {
 	bus_space_write_1(sc->sc_memt, sc->sc_memh, off, val);
 }
 
-static void mem_write_2 (sc, off, val)
-	struct am79c930_softc *sc;
-	u_int32_t off;
-	u_int16_t val;
+static void mem_write_2 (struct am79c930_softc *sc, u_int32_t off, u_int16_t val)
 {
 	bus_space_tag_t t = sc->sc_memt;
 	bus_space_handle_t h = sc->sc_memh;
@@ -287,10 +260,7 @@
 	}
 }
 
-static void mem_write_4 (sc, off, val)
-	struct am79c930_softc *sc;
-	u_int32_t off;
-	u_int32_t val;
+static void mem_write_4 (struct am79c930_softc *sc, u_int32_t off, u_int32_t val)
 {
 	bus_space_tag_t t = sc->sc_memt;
 	bus_space_handle_t h = sc->sc_memh;
@@ -306,26 +276,19 @@
 	}
 }
 
-static void mem_write_bytes (sc, off, ptr, len)
-	struct am79c930_softc *sc;
-	u_int32_t off;
-	u_int8_t *ptr;
-	size_t len;
+static void mem_write_bytes (struct am79c930_softc *sc, u_int32_t off,
+    u_int8_t *ptr, size_t len)
 {
 	bus_space_write_region_1 (sc->sc_memt, sc->sc_memh, off, ptr, len);
 }
 
 
-static u_int8_t mem_read_1 (sc, off)
-	struct am79c930_softc *sc;
-	u_int32_t off;
+static u_int8_t mem_read_1 (struct am79c930_softc *sc, u_int32_t off)
 {
 	return bus_space_read_1(sc->sc_memt, sc->sc_memh, off);
 }
 
-static u_int16_t mem_read_2 (sc, off)
-	struct am79c930_softc *sc;
-	u_int32_t off;
+static u_int16_t mem_read_2 (struct am79c930_softc *sc, u_int32_t off)
 {
 	/* could be unaligned */
 	if ((off & 0x1) == 0)
@@ -336,9 +299,7 @@
 		    (bus_space_read_1(sc->sc_memt, sc->sc_memh, off+1) << 8);
 }
 
-static u_int32_t mem_read_4 (sc, off)
-	struct am79c930_softc *sc;
-	u_int32_t off;
+static u_int32_t mem_read_4 (struct am79c930_softc *sc, u_int32_t off)
 {
 	/* could be unaligned */
 	if ((off & 0x3) == 0)
@@ -353,11 +314,8 @@
 
 
 
-static void mem_read_bytes (sc, off, ptr, len)
-	struct am79c930_softc *sc;
-	u_int32_t off;
-	u_int8_t *ptr;
-	size_t len;
+static void mem_read_bytes (struct am79c930_softc *sc, u_int32_t off,
+    u_int8_t *ptr, size_t len)
 {
 	bus_space_read_region_1 (sc->sc_memt, sc->sc_memh, off, ptr, len);
 }
@@ -369,9 +327,7 @@
  * Set bits in GCR.
  */
 
-void am79c930_gcr_setbits (sc, bits)
-	struct am79c930_softc *sc;
-	u_int8_t bits;
+void am79c930_gcr_setbits (struct am79c930_softc *sc, u_int8_t bits)
 {
 	u_int8_t gcr = bus_space_read_1 (sc->sc_iot, sc->sc_ioh, AM79C930_GCR);
 
@@ -384,9 +340,7 @@
  * Clear bits in GCR.
  */
 
-void am79c930_gcr_clearbits (sc, bits)
-	struct am79c930_softc *sc;
-	u_int8_t bits;
+void am79c930_gcr_clearbits (struct am79c930_softc *sc, u_int8_t bits)
 {
 	u_int8_t gcr = bus_space_read_1 (sc->sc_iot, sc->sc_ioh, AM79C930_GCR);
 
@@ -395,15 +349,13 @@
 	bus_space_write_1(sc->sc_iot, sc->sc_ioh, AM79C930_GCR, gcr);
 }
 
-u_int8_t am79c930_gcr_read (sc)
-	struct am79c930_softc *sc;
+u_int8_t am79c930_gcr_read (struct am79c930_softc *sc)
 {
 	return bus_space_read_1 (sc->sc_iot, sc->sc_ioh, AM79C930_GCR);
 }
 
 #if 0 
-void am79c930_regdump (sc) 
-	struct am79c930_softc *sc;
+void am79c930_regdump (struct am79c930_softc *sc) 
 {
 	u_int8_t buf[8];
 	int i;
@@ -421,8 +373,7 @@
 }
 #endif
 
-void am79c930_chip_init (sc, how)
-	struct am79c930_softc *sc;
+void am79c930_chip_init (struct am79c930_softc *sc, int how)
 {
 	/* zero the bank select register, and leave it that way.. */
 	bus_space_write_1(sc->sc_iot, sc->sc_ioh, AM79C930_BSS, 0);
diff -urN sys.orig/dev/netif/awi/awi.c sys/dev/netif/awi/awi.c
--- sys.orig/dev/netif/awi/awi.c	2005-09-30 11:12:17.000000000 +0200
+++ sys/dev/netif/awi/awi.c	2005-09-30 18:20:14.000000000 +0200
@@ -198,8 +198,7 @@
 devclass_t awi_devclass;
 
 int
-awi_attach(sc)
-	struct awi_softc *sc;
+awi_attach(struct awi_softc *sc)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	int error;
@@ -281,11 +280,7 @@
 }
 
 static int
-awi_ioctl(ifp, cmd, data, cr)
-	struct ifnet *ifp;
-	u_long cmd;
-	caddr_t data;
-	struct ucred *cr;
+awi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr)
 {
 	struct awi_softc *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *)data;
@@ -403,9 +398,7 @@
 
 #ifdef IFM_IEEE80211
 static int
-awi_media_rate2opt(sc, rate)
-	struct awi_softc *sc;
-	int rate;
+awi_media_rate2opt(struct awi_softc *sc, int rate)
 {
 	int mword;
 
@@ -436,9 +429,7 @@
 }
 
 static int
-awi_media_opt2rate(sc, opt)
-	struct awi_softc *sc;
-	int opt;
+awi_media_opt2rate(struct awi_softc *sc, int opt)
 {
 	int rate;
 
@@ -481,8 +472,7 @@
  * Called from ifmedia_ioctl via awi_ioctl with lock obtained.
  */
 static int
-awi_media_change(ifp)
-	struct ifnet *ifp;
+awi_media_change(struct ifnet *ifp)
 {
 	struct awi_softc *sc = ifp->if_softc;
 	struct ifmedia_entry *ime;
@@ -520,9 +510,7 @@
 }
 
 static void
-awi_media_status(ifp, imr)
-	struct ifnet *ifp;
-	struct ifmediareq *imr;
+awi_media_status(struct ifnet *ifp, struct ifmediareq *imr)
 {
 	struct awi_softc *sc = ifp->if_softc;
 
@@ -540,8 +528,7 @@
 #endif /* IFM_IEEE80211 */
 
 int
-awi_intr(arg)
-	void *arg;
+awi_intr(void *arg)
 {
 	struct awi_softc *sc = arg;
 	u_int16_t status;
@@ -591,8 +578,7 @@
 }
 
 int
-awi_init(sc)
-	struct awi_softc *sc;
+awi_init(struct awi_softc *sc)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	int error, ostatus;
@@ -662,8 +648,7 @@
 }
 
 void
-awi_stop(sc)
-	struct awi_softc *sc;
+awi_stop(struct awi_softc *sc)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	struct awi_bss *bp;
@@ -688,8 +673,7 @@
 }
 
 static void
-awi_watchdog(ifp)
-	struct ifnet *ifp;
+awi_watchdog(struct ifnet *ifp)
 {
 	struct awi_softc *sc = ifp->if_softc;
 	int ocansleep;
@@ -737,8 +721,7 @@
 }
 
 static void
-awi_start(ifp)
-	struct ifnet *ifp;
+awi_start(struct ifnet *ifp)
 {
 	struct awi_softc *sc = ifp->if_softc;
 	struct mbuf *m0, *m;
@@ -819,8 +802,7 @@
 }
 
 static void
-awi_txint(sc)
-	struct awi_softc *sc;
+awi_txint(struct awi_softc *sc)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	u_int8_t flags;
@@ -845,9 +827,7 @@
 }
 
 static struct mbuf *
-awi_fix_txhdr(sc, m0)
-	struct awi_softc *sc;
-	struct mbuf *m0;
+awi_fix_txhdr(struct awi_softc *sc, struct mbuf *m0)
 {
 	struct ether_header eh;
 	struct ieee80211_frame *wh;
@@ -891,9 +871,7 @@
 }
 
 static struct mbuf *
-awi_fix_rxhdr(sc, m0)
-	struct awi_softc *sc;
-	struct mbuf *m0;
+awi_fix_rxhdr(struct awi_softc *sc, struct mbuf *m0)
 {
 	struct ieee80211_frame wh;
 	struct ether_header *eh;
@@ -977,11 +955,7 @@
 }
 
 static void
-awi_input(sc, m, rxts, rssi)
-	struct awi_softc *sc;
-	struct mbuf *m;
-	u_int32_t rxts;
-	u_int8_t rssi;
+awi_input(struct awi_softc *sc, struct mbuf *m, u_int32_t rxts, u_int8_t rssi)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	struct ieee80211_frame *wh;
@@ -1079,8 +1053,7 @@
 }
 
 static void
-awi_rxint(sc)
-	struct awi_softc *sc;
+awi_rxint(struct awi_softc *sc)
 {
 	u_int8_t state, rate, rssi;
 	u_int16_t len;
@@ -1124,10 +1097,7 @@
 }
 
 static struct mbuf *
-awi_devget(sc, off, len)
-	struct awi_softc *sc;
-	u_int32_t off;
-	u_int16_t len;
+awi_devget(struct awi_softc *sc, u_int32_t off, u_int16_t len)
 {
 	struct mbuf *m;
 	struct mbuf *top, **mp;
@@ -1195,8 +1165,7 @@
  */
 
 static int
-awi_init_hw(sc)
-	struct awi_softc *sc;
+awi_init_hw(struct awi_softc *sc)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	u_int8_t status;
@@ -1286,8 +1255,7 @@
  */
 
 static int
-awi_init_mibs(sc)
-	struct awi_softc *sc;
+awi_init_mibs(struct awi_softc *sc)
 {
 	int i, error;
 	u_int8_t *rate;
@@ -1338,8 +1306,7 @@
  */
 
 static int
-awi_init_txrx(sc)
-	struct awi_softc *sc;
+awi_init_txrx(struct awi_softc *sc)
 {
 	int error;
 
@@ -1375,8 +1342,7 @@
 }
 
 static void
-awi_stop_txrx(sc)
-	struct awi_softc *sc;
+awi_stop_txrx(struct awi_softc *sc)
 {
 
 	if (sc->sc_cmd_inprog)
@@ -1394,8 +1360,7 @@
 }
 
 int
-awi_init_region(sc)
-	struct awi_softc *sc;
+awi_init_region(struct awi_softc *sc)
 {
 
 	if (sc->sc_mib_phy.IEEE_PHY_Type == AWI_PHY_TYPE_FH) {
@@ -1459,8 +1424,7 @@
 }
 
 static int
-awi_start_scan(sc)
-	struct awi_softc *sc;
+awi_start_scan(struct awi_softc *sc)
 {
 	int error = 0;
 	struct awi_bss *bp;
@@ -1497,8 +1461,7 @@
 }
 
 static int
-awi_next_scan(sc)
-	struct awi_softc *sc;
+awi_next_scan(struct awi_softc *sc)
 {
 	int error;
 
@@ -1525,8 +1488,7 @@
 }
 
 static void
-awi_stop_scan(sc)
-	struct awi_softc *sc;
+awi_stop_scan(struct awi_softc *sc)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	struct awi_bss *bp, *sbp;
@@ -1627,11 +1589,7 @@
 }
 
 static void
-awi_recv_beacon(sc, m0, rxts, rssi)
-	struct awi_softc *sc;
-	struct mbuf *m0;
-	u_int32_t rxts;
-	u_int8_t rssi;
+awi_recv_beacon(struct awi_softc *sc, struct mbuf *m0, u_int32_t rxts, u_int8_t rssi)
 {
 	struct ieee80211_frame *wh;
 	struct awi_bss *bp;
@@ -1738,8 +1696,7 @@
 }
 
 static int
-awi_set_ss(sc)
-	struct awi_softc *sc;
+awi_set_ss(struct awi_softc *sc)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	struct awi_bss *bp;
@@ -1763,8 +1720,7 @@
 }
 
 static void
-awi_try_sync(sc)
-	struct awi_softc *sc;
+awi_try_sync(struct awi_softc *sc)
 {
 	struct awi_bss *bp;
 
@@ -1790,8 +1746,7 @@
 }
 
 static void
-awi_sync_done(sc)
-	struct awi_softc *sc;
+awi_sync_done(struct awi_softc *sc)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 
@@ -1821,8 +1776,7 @@
 }
 
 static void
-awi_send_deauth(sc)
-	struct awi_softc *sc;
+awi_send_deauth(struct awi_softc *sc)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	struct mbuf *m;
@@ -1857,9 +1811,7 @@
 }
 
 static void
-awi_send_auth(sc, seq)
-	struct awi_softc *sc;
-	int seq;
+awi_send_auth(struct awi_softc *sc, int seq)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	struct mbuf *m;
@@ -1904,9 +1856,7 @@
 }
 
 static void
-awi_recv_auth(sc, m0)
-	struct awi_softc *sc;
-	struct mbuf *m0;
+awi_recv_auth(struct awi_softc *sc, struct mbuf *m0)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	struct ieee80211_frame *wh;
@@ -1957,9 +1907,7 @@
 }
 
 static void
-awi_send_asreq(sc, reassoc)
-	struct awi_softc *sc;
-	int reassoc;
+awi_send_asreq(struct awi_softc *sc, int reassoc)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	struct mbuf *m;
@@ -2022,9 +1970,7 @@
 }
 
 static void
-awi_recv_asresp(sc, m0)
-	struct awi_softc *sc;
-	struct mbuf *m0;
+awi_recv_asresp(struct awi_softc *sc, struct mbuf *m0)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	struct ieee80211_frame *wh;
@@ -2098,10 +2044,7 @@
 }
 
 static int
-awi_mib(sc, cmd, mib)
-	struct awi_softc *sc;
-	u_int8_t cmd;
-	u_int8_t mib;
+awi_mib(struct awi_softc *sc, u_int8_t cmd, u_int8_t mib)
 {
 	int error;
 	u_int8_t size, *ptr;
@@ -2169,8 +2112,7 @@
 }
 
 static int
-awi_cmd_scan(sc)
-	struct awi_softc *sc;
+awi_cmd_scan(struct awi_softc *sc)
 {
 	int error;
 	u_int8_t scan_mode;
@@ -2210,9 +2152,7 @@
 }
 
 static int
-awi_cmd(sc, cmd)
-	struct awi_softc *sc;
-	u_int8_t cmd;
+awi_cmd(struct awi_softc *sc, u_int8_t cmd)
 {
 	u_int8_t status;
 	int error = 0;
@@ -2240,8 +2180,7 @@
 }
 
 static void
-awi_cmd_done(sc)
-	struct awi_softc *sc;
+awi_cmd_done(struct awi_softc *sc)
 {
 	u_int8_t cmd, status;
 
@@ -2278,10 +2217,7 @@
 }
 
 static int
-awi_next_txd(sc, len, framep, ntxdp)
-	struct awi_softc *sc;
-	int len;
-	u_int32_t *framep, *ntxdp;
+awi_next_txd(struct awi_softc *sc, int len, u_int32_t *framep, u_int32_t *ntxdp)
 {
 	u_int32_t txd, ntxd, frame;
 
@@ -2316,8 +2252,7 @@
 }
 
 static int
-awi_lock(sc)
-	struct awi_softc *sc;
+awi_lock(struct awi_softc *sc)
 {
 	int error = 0;
 
@@ -2353,8 +2288,7 @@
 }
 
 static void
-awi_unlock(sc)
-	struct awi_softc *sc;
+awi_unlock(struct awi_softc *sc)
 {
 	sc->sc_busy = 0;
 	sc->sc_cansleep = 0;
@@ -2363,8 +2297,7 @@
 }
 
 static int
-awi_intr_lock(sc)
-	struct awi_softc *sc;
+awi_intr_lock(struct awi_softc *sc)
 {
 	u_int8_t status;
 	int i, retry;
@@ -2393,16 +2326,14 @@
 }
 
 static void
-awi_intr_unlock(sc)
-	struct awi_softc *sc;
+awi_intr_unlock(struct awi_softc *sc)
 {
 
 	awi_write_1(sc, AWI_LOCKOUT_MAC, 0);
 }
 
 static int
-awi_cmd_wait(sc)
-	struct awi_softc *sc;
+awi_cmd_wait(struct awi_softc *sc)
 {
 	int i, error = 0;
 
@@ -2437,8 +2368,7 @@
 }
 
 static void
-awi_print_essid(essid)
-	u_int8_t *essid;
+awi_print_essid(u_int8_t *essid)
 {
 	int i, len;
 	u_int8_t *p;
@@ -2465,10 +2395,7 @@
 
 #ifdef AWI_DEBUG
 static void
-awi_dump_pkt(sc, m, rssi)
-	struct awi_softc *sc;
-	struct mbuf *m;
-	int rssi;
+awi_dump_pkt(struct awi_softc *sc, struct mbuf *m, int rssi)
 {
 	struct ieee80211_frame *wh;
 	int i, l;
diff -urN sys.orig/dev/netif/awi/awi_wep.c sys/dev/netif/awi/awi_wep.c
--- sys.orig/dev/netif/awi/awi_wep.c	2005-09-30 11:12:17.000000000 +0200
+++ sys/dev/netif/awi/awi_wep.c	2005-10-01 11:08:15.000000000 +0200
@@ -121,9 +121,7 @@
 };
 
 int
-awi_wep_setnwkey(sc, nwkey)
-	struct awi_softc *sc;
-	struct ieee80211_nwkey *nwkey;
+awi_wep_setnwkey(struct awi_softc *sc, struct ieee80211_nwkey *nwkey)
 {
 	int i, len, error;
 	u_int8_t keybuf[AWI_MAX_KEYLEN];
@@ -159,9 +157,7 @@
 }
 
 int
-awi_wep_getnwkey(sc, nwkey)
-	struct awi_softc *sc;
-	struct ieee80211_nwkey *nwkey;
+awi_wep_getnwkey(struct awi_softc *sc, struct ieee80211_nwkey *nwkey)
 {
 	int i, len, error, suerr;
 	u_int8_t keybuf[AWI_MAX_KEYLEN];
@@ -195,8 +191,7 @@
 }
 
 int
-awi_wep_getalgo(sc)
-	struct awi_softc *sc;
+awi_wep_getalgo(struct awi_softc *sc)
 {
 
 	if (sc->sc_wep_algo == NULL)
@@ -205,9 +200,7 @@
 }
 
 int
-awi_wep_setalgo(sc, algo)
-	struct awi_softc *sc;
-	int algo;
+awi_wep_setalgo(struct awi_softc *sc, int algo)
 {
 	struct awi_wep_algo *awa;
 	int ctxlen;
@@ -237,11 +230,7 @@
 }
 
 int
-awi_wep_setkey(sc, kid, key, keylen)
-	struct awi_softc *sc;
-	int kid;
-	unsigned char *key;
-	int keylen;
+awi_wep_setkey(struct awi_softc *sc, int kid, u_char *key, int keylen)
 {
 
 	if (kid < 0 || kid >= IEEE80211_WEP_NKID)
@@ -255,11 +244,7 @@
 }
 
 int
-awi_wep_getkey(sc, kid, key, keylen)
-	struct awi_softc *sc;
-	int kid;
-	unsigned char *key;
-	int *keylen;
+awi_wep_getkey(struct awi_softc *sc, int kid, u_char *key, int *keylen)
 {
 
 	if (kid < 0 || kid >= IEEE80211_WEP_NKID)
@@ -273,10 +258,7 @@
 }
 
 struct mbuf *
-awi_wep_encrypt(sc, m0, txflag)
-	struct awi_softc *sc;
-	struct mbuf *m0;
-	int txflag;
+awi_wep_encrypt(struct awi_softc *sc, struct mbuf *m0, int txflag)
 {
 	struct mbuf *m, *n, *n0;
 	struct ieee80211_frame *wh;
@@ -456,10 +438,7 @@
  */
 
 static u_int32_t
-awi_crc_update(crc, buf, len)
-	u_int32_t crc;
-	u_int8_t *buf;
-	int len;
+awi_crc_update(u_int32_t crc, u_int8_t *buf, int len)
 {
 	u_int8_t *endbuf;
 
@@ -480,19 +459,12 @@
 }
 
 static void
-awi_null_setkey(ctx, key, keylen)
-	void *ctx;
-	u_char *key;
-	int keylen;
+awi_null_setkey(void *ctx, u_char *key, int keylen)
 {
 }
 
 static void
-awi_null_copy(ctx, dst, src, len)
-	void *ctx;
-	u_char *dst;
-	u_char *src;
-	int len;
+awi_null_copy(void *ctx, u_char *dst, u_char *src, int len)
 {
 
 	memcpy(dst, src, len);
diff -urN sys.orig/dev/netif/awi/awi_wicfg.c sys/dev/netif/awi/awi_wicfg.c
--- sys.orig/dev/netif/awi/awi_wicfg.c	2005-09-30 11:12:17.000000000 +0200
+++ sys/dev/netif/awi/awi_wicfg.c	2005-10-01 10:52:21.000000000 +0200
@@ -75,10 +75,7 @@
 static int awi_cfgset (struct ifnet *ifp, u_long cmd, caddr_t data);
 
 int
-awi_wicfg(ifp, cmd, data)
-	struct ifnet *ifp;
-	u_long cmd;
-	caddr_t data;
+awi_wicfg(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
 	int error;
 	struct thread *td = curthread;
@@ -101,10 +98,7 @@
 }
 
 static int
-awi_cfgget(ifp, cmd, data)
-	struct ifnet *ifp;
-	u_long cmd;
-	caddr_t data;
+awi_cfgget(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
 	int i, error, keylen;
 	char *p;
@@ -302,10 +296,7 @@
 }
 
 static int
-awi_cfgset(ifp, cmd, data)
-	struct ifnet *ifp;
-	u_long cmd;
-	caddr_t data;
+awi_cfgset(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
 	int i, error, rate, oregion;
 	u_int8_t *phy_rates;
diff -urN sys.orig/dev/netif/awi/awivar.h sys/dev/netif/awi/awivar.h
--- sys.orig/dev/netif/awi/awivar.h	2005-09-30 11:12:17.000000000 +0200
+++ sys/dev/netif/awi/awivar.h	2005-10-01 11:08:57.000000000 +0200
@@ -199,6 +199,6 @@
 int awi_wep_getnwkey (struct awi_softc *, struct ieee80211_nwkey *);
 int awi_wep_getalgo (struct awi_softc *);
 int awi_wep_setalgo (struct awi_softc *, int);
-int awi_wep_setkey (struct awi_softc *, int, unsigned char *, int);
-int awi_wep_getkey (struct awi_softc *, int, unsigned char *, int *);
+int awi_wep_setkey (struct awi_softc *, int, u_char *, int);
+int awi_wep_getkey (struct awi_softc *, int, u_char *, int *);
 struct mbuf *awi_wep_encrypt (struct awi_softc *, struct mbuf *, int);



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]