Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Whitespace tweaks.



details:   https://anonhg.NetBSD.org/src/rev/0221217b14e3
branches:  trunk
changeset: 569942:0221217b14e3
user:      lukem <lukem%NetBSD.org@localhost>
date:      Tue Sep 14 00:38:37 2004 +0000

description:
Whitespace tweaks.
Remove vendor RCSID, since it's out of sync already (due to manual patches).

diffstat:

 sys/dev/pci/if_ipw.c |  193 +++++++++++++++++++++++++-------------------------
 1 files changed, 96 insertions(+), 97 deletions(-)

diffs (truncated from 690 to 300 lines):

diff -r 8a946d2c1dd1 -r 0221217b14e3 sys/dev/pci/if_ipw.c
--- a/sys/dev/pci/if_ipw.c      Tue Sep 14 00:35:10 2004 +0000
+++ b/sys/dev/pci/if_ipw.c      Tue Sep 14 00:38:37 2004 +0000
@@ -1,5 +1,4 @@
-/*     $NetBSD: if_ipw.c,v 1.7 2004/09/14 00:35:10 lukem Exp $ */
-/*     Id: if_ipw.c,v 1.1.2.7 2004/08/20 11:20:11 damien Exp   */
+/*     $NetBSD: if_ipw.c,v 1.8 2004/09/14 00:38:37 lukem Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -29,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.7 2004/09/14 00:35:10 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.8 2004/09/14 00:38:37 lukem Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2100 MiniPCI driver
@@ -84,7 +83,7 @@
 static int ipw_newstate(struct ieee80211com *, enum ieee80211_state, int);
 static void ipw_command_intr(struct ipw_softc *, struct ipw_soft_buf *);
 static void ipw_newstate_intr(struct ipw_softc *, struct ipw_soft_buf *);
-static void ipw_data_intr(struct ipw_softc *, struct ipw_status *, 
+static void ipw_data_intr(struct ipw_softc *, struct ipw_status *,
     struct ipw_soft_bd *, struct ipw_soft_buf *);
 static void ipw_notification_intr(struct ipw_softc *, struct ipw_soft_buf *);
 static void ipw_rx_intr(struct ipw_softc *);
@@ -113,9 +112,9 @@
 static int ipw_config(struct ipw_softc *);
 static int ipw_init(struct ifnet *);
 static void ipw_stop(struct ifnet *, int);
-static void ipw_read_mem_1(struct ipw_softc *, bus_size_t, u_int8_t *, 
+static void ipw_read_mem_1(struct ipw_softc *, bus_size_t, u_int8_t *,
     bus_size_t);
-static void ipw_write_mem_1(struct ipw_softc *, bus_size_t, u_int8_t *, 
+static void ipw_write_mem_1(struct ipw_softc *, bus_size_t, u_int8_t *,
     bus_size_t);
 static void ipw_zero_mem_4(struct ipw_softc *, bus_size_t, bus_size_t);
 
@@ -146,7 +145,7 @@
 #define DPRINTFN(n, x)
 #endif
 
-CFATTACH_DECL(ipw, sizeof (struct ipw_softc), ipw_match, ipw_attach, 
+CFATTACH_DECL(ipw, sizeof (struct ipw_softc), ipw_match, ipw_attach,
     ipw_detach, NULL);
 
 static int
@@ -154,7 +153,7 @@
 {
        struct pci_attach_args *pa = aux;
 
-       if (PCI_VENDOR (pa->pa_id) == PCI_VENDOR_INTEL && 
+       if (PCI_VENDOR (pa->pa_id) == PCI_VENDOR_INTEL &&
            PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_INTEL_PRO_WL_2100)
                return 1;
 
@@ -193,10 +192,10 @@
        pci_conf_write(sc->sc_pct, pa->pa_tag, PCI_COMMAND_STATUS_REG, data);
 
        /* map the register window */
-       error = pci_mapreg_map(pa, IPW_PCI_BAR0, PCI_MAPREG_TYPE_MEM | 
+       error = pci_mapreg_map(pa, IPW_PCI_BAR0, PCI_MAPREG_TYPE_MEM |
            PCI_MAPREG_MEM_TYPE_32BIT, 0, &memt, &memh, &base, &sc->sc_sz);
        if (error != 0) {
-               aprint_error("%s: could not map memory space\n", 
+               aprint_error("%s: could not map memory space\n",
                    sc->sc_dev.dv_xname);
                return;
        }
@@ -209,7 +208,7 @@
        CSR_WRITE_4(sc, IPW_CSR_INTR_MASK, 0);
 
        if (pci_intr_map(pa, &ih) != 0) {
-               aprint_error("%s: could not map interrupt\n", 
+               aprint_error("%s: could not map interrupt\n",
                    sc->sc_dev.dv_xname);
                return;
        }
@@ -217,7 +216,7 @@
        intrstr = pci_intr_string(sc->sc_pct, ih);
        sc->sc_ih = pci_intr_establish(sc->sc_pct, ih, IPL_NET, ipw_intr, sc);
        if (sc->sc_ih == NULL) {
-               aprint_error("%s: could not establish interrupt", 
+               aprint_error("%s: could not establish interrupt",
                    sc->sc_dev.dv_xname);
                if (intrstr != NULL)
                        aprint_error(" at %s", intrstr);
@@ -231,7 +230,7 @@
        ic->ic_state = IEEE80211_S_INIT;
 
        /* set device capabilities */
-       ic->ic_caps =  IEEE80211_C_IBSS | IEEE80211_C_MONITOR | 
+       ic->ic_caps =  IEEE80211_C_IBSS | IEEE80211_C_MONITOR |
            IEEE80211_C_PMGT | IEEE80211_C_TXPMGT | IEEE80211_C_WEP;
 
        /* set supported 11.b rates */
@@ -240,11 +239,11 @@
        rs->rs_rates[0] = 2;    /* 1Mbps */
        rs->rs_rates[1] = 4;    /* 2Mbps */
        rs->rs_rates[2] = 11;   /* 5.5Mbps */
-       rs->rs_rates[3] = 22;   /* 11Mbps */
+       rs->rs_rates[3] = 22;   /* 11Mbps */
 
        /* set supported 11.b channels (1 through 14) */
        for (i = 1; i <= 14; i++) {
-               ic->ic_channels[i].ic_freq = 
+               ic->ic_channels[i].ic_freq =
                    ieee80211_ieee2mhz(i, IEEE80211_CHAN_B);
                ic->ic_channels[i].ic_flags = IEEE80211_CHAN_B;
        }
@@ -270,7 +269,7 @@
        ieee80211_media_init(ifp, ipw_media_change, ieee80211_media_status);
 
 #if NBPFILTER > 0
-       bpfattach2(ifp, DLT_IEEE802_11_RADIO, 
+       bpfattach2(ifp, DLT_IEEE802_11_RADIO,
            sizeof (struct ieee80211_frame) + 64, &sc->sc_drvbpf);
 
        sc->sc_rxtap_len = sizeof sc->sc_rxtapu;
@@ -368,12 +367,12 @@
 
        cmd = mtod(sbuf->m, struct ipw_cmd *);
 
-       DPRINTFN(2, ("RX!CMD!%u!%u!%u!%u!%u\n", 
+       DPRINTFN(2, ("RX!CMD!%u!%u!%u!%u!%u\n",
            le32toh(cmd->type), le32toh(cmd->subtype), le32toh(cmd->seq),
            le32toh(cmd->len), le32toh(cmd->status)));
 
-       /* 
-        * Wake up processes waiting for command ack. In the case of the 
+       /*
+        * Wake up processes waiting for command ack. In the case of the
         * IPW_CMD_DISABLE command, wake up the process only when the adapter
         * enters the IPW_STATE_DISABLED state. This is notified in
         * ipw_newstate_intr().
@@ -419,7 +418,7 @@
 }
 
 static void
-ipw_data_intr(struct ipw_softc *sc, struct ipw_status *status, 
+ipw_data_intr(struct ipw_softc *sc, struct ipw_status *status,
     struct ipw_soft_bd *sbd, struct ipw_soft_buf *sbuf)
 {
        struct ieee80211com *ic = &sc->sc_ic;
@@ -465,22 +464,22 @@
 
        MGETHDR(m, M_DONTWAIT, MT_DATA);
        if (m == NULL) {
-               aprint_error("%s: could not allocate rx mbuf\n", 
+               aprint_error("%s: could not allocate rx mbuf\n",
                    sc->sc_dev.dv_xname);
                return;
        }
        MCLGET(m, M_DONTWAIT);
        if (!(m->m_flags & M_EXT)) {
                m_freem(m);
-               aprint_error("%s: could not allocate rx mbuf cluster\n", 
+               aprint_error("%s: could not allocate rx mbuf cluster\n",
                    sc->sc_dev.dv_xname);
                return;
        }
 
-       error = bus_dmamap_load(sc->sc_dmat, sbuf->map, mtod(m, void *), 
+       error = bus_dmamap_load(sc->sc_dmat, sbuf->map, mtod(m, void *),
            MCLBYTES, NULL, BUS_DMA_NOWAIT);
        if (error != 0) {
-               aprint_error("%s: could not map rxbuf dma memory\n", 
+               aprint_error("%s: could not map rxbuf dma memory\n",
                    sc->sc_dev.dv_xname);
                m_freem(m);
                return;
@@ -508,12 +507,12 @@
 
        for (i = (sc->rxcur + 1) % IPW_NRBD; i != r; i = (i + 1) % IPW_NRBD) {
 
-               bus_dmamap_sync(sc->sc_dmat, sc->rbd_map, 
-                   i * sizeof (struct ipw_bd), sizeof (struct ipw_bd), 
+               bus_dmamap_sync(sc->sc_dmat, sc->rbd_map,
+                   i * sizeof (struct ipw_bd), sizeof (struct ipw_bd),
                    BUS_DMASYNC_POSTREAD);
 
-               bus_dmamap_sync(sc->sc_dmat, sc->status_map, 
-                   i * sizeof (struct ipw_status), sizeof (struct ipw_status), 
+               bus_dmamap_sync(sc->sc_dmat, sc->status_map,
+                   i * sizeof (struct ipw_status), sizeof (struct ipw_status),
                    BUS_DMASYNC_POSTREAD);
 
                status = &sc->status_list[i];
@@ -539,13 +538,13 @@
                        break;
 
                default:
-                       aprint_debug("%s: unknown status code %u\n", 
+                       aprint_debug("%s: unknown status code %u\n",
                            sc->sc_dev.dv_xname, le16toh(status->code));
                }
                sbd->bd->flags = 0;
 
-               bus_dmamap_sync(sc->sc_dmat, sc->rbd_map, 
-                   i * sizeof (struct ipw_bd), sizeof (struct ipw_bd), 
+               bus_dmamap_sync(sc->sc_dmat, sc->rbd_map,
+                   i * sizeof (struct ipw_bd), sizeof (struct ipw_bd),
                    BUS_DMASYNC_PREWRITE);
        }
 
@@ -648,10 +647,10 @@
 
        sbd = &sc->stbd_list[sc->txcur];
 
-       error = bus_dmamap_load(sc->sc_dmat, sc->cmd_map, sc->cmd, 
+       error = bus_dmamap_load(sc->sc_dmat, sc->cmd_map, sc->cmd,
            sizeof (struct ipw_cmd), NULL, BUS_DMA_NOWAIT);
        if (error != 0) {
-               aprint_error("%s: could not map cmd dma memory\n", 
+               aprint_error("%s: could not map cmd dma memory\n",
                    sc->sc_dev.dv_xname);
                return error;
        }
@@ -667,13 +666,13 @@
        sbd->bd->physaddr = htole32(sc->cmd_map->dm_segs[0].ds_addr);
        sbd->bd->len = htole32(sizeof (struct ipw_cmd));
        sbd->bd->nfrag = 1;
-       sbd->bd->flags = IPW_BD_FLAG_TX_FRAME_COMMAND | 
+       sbd->bd->flags = IPW_BD_FLAG_TX_FRAME_COMMAND |
                         IPW_BD_FLAG_TX_LAST_FRAGMENT;
 
        bus_dmamap_sync(sc->sc_dmat, sc->cmd_map, 0, sizeof (struct ipw_cmd),
            BUS_DMASYNC_PREWRITE);
-       
-       bus_dmamap_sync(sc->sc_dmat, sc->tbd_map, 
+
+       bus_dmamap_sync(sc->sc_dmat, sc->tbd_map,
            sc->txcur * sizeof (struct ipw_bd), sizeof (struct ipw_bd),
            BUS_DMASYNC_PREWRITE);
 
@@ -737,12 +736,12 @@
        m_adj(m, sizeof (struct ieee80211_frame));
 
        /*
-        * We need to map the mbuf first to know how many buffer descriptors  
+        * We need to map the mbuf first to know how many buffer descriptors
         * are needed for this transfer.
         */
        error = bus_dmamap_load_mbuf(sc->sc_dmat, sbuf->map, m, BUS_DMA_NOWAIT);
        if (error != 0) {
-               aprint_error("%s: could not map mbuf (error %d)\n", 
+               aprint_error("%s: could not map mbuf (error %d)\n",
                    sc->sc_dev.dv_xname, error);
                m_freem(m);
                return error;
@@ -751,7 +750,7 @@
        error = bus_dmamap_load(sc->sc_dmat, shdr->map, &shdr->hdr,
            sizeof (struct ipw_hdr), NULL, BUS_DMA_NOWAIT);
        if (error != 0) {
-               aprint_error("%s: could not map hdr (error %d)\n", 
+               aprint_error("%s: could not map hdr (error %d)\n",
                    sc->sc_dev.dv_xname, error);
                bus_dmamap_unload(sc->sc_dmat, sbuf->map);
                m_freem(m);
@@ -770,13 +769,13 @@
        sbd->bd->flags = IPW_BD_FLAG_TX_FRAME_802_3 |
                         IPW_BD_FLAG_TX_NOT_LAST_FRAGMENT;
 
-       DPRINTFN(5, ("TX!HDR!%u!%u!%u!%u\n", shdr->hdr.type, shdr->hdr.subtype, 
-           shdr->hdr.encrypted, shdr->hdr.encrypt)); 
-       DPRINTFN(5, ("!%s", ether_sprintf(shdr->hdr.src_addr))); 
+       DPRINTFN(5, ("TX!HDR!%u!%u!%u!%u\n", shdr->hdr.type, shdr->hdr.subtype,
+           shdr->hdr.encrypted, shdr->hdr.encrypt));
+       DPRINTFN(5, ("!%s", ether_sprintf(shdr->hdr.src_addr)));
        DPRINTFN(5, ("!%s\n", ether_sprintf(shdr->hdr.dst_addr)));
 
-       bus_dmamap_sync(sc->sc_dmat, sc->tbd_map, 
-           sc->txcur * sizeof (struct ipw_bd), 
+       bus_dmamap_sync(sc->sc_dmat, sc->tbd_map,
+           sc->txcur * sizeof (struct ipw_bd),
            sizeof (struct ipw_bd), BUS_DMASYNC_PREWRITE);
 
        sc->txcur = (sc->txcur + 1) % IPW_NTBD;
@@ -799,20 +798,20 @@
                        sbd->bd->flags |= IPW_BD_FLAG_TX_NOT_LAST_FRAGMENT;
                }
 
-               DPRINTFN(5, ("TX!FRAG!%d!%ld\n", i, 
+               DPRINTFN(5, ("TX!FRAG!%d!%ld\n", i,
                    sbuf->map->dm_segs[i].ds_len));
 
-               bus_dmamap_sync(sc->sc_dmat, sc->tbd_map, 
-                   sc->txcur * sizeof (struct ipw_bd), 
+               bus_dmamap_sync(sc->sc_dmat, sc->tbd_map,
+                   sc->txcur * sizeof (struct ipw_bd),
                    sizeof (struct ipw_bd), BUS_DMASYNC_PREWRITE);
 
                sc->txcur = (sc->txcur + 1) % IPW_NTBD;
        }
 
-       bus_dmamap_sync(sc->sc_dmat, shdr->map, 0, sizeof (struct ipw_hdr), 
+       bus_dmamap_sync(sc->sc_dmat, shdr->map, 0, sizeof (struct ipw_hdr),
            BUS_DMASYNC_PREWRITE);



Home | Main Index | Thread Index | Old Index