mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-29 16:44:03 +00:00
Lots of style(9) related white space fixes. Mostly missing spaces
after if, for, while, switch, '{', and '}' plus a bunch of bogus whitespace at the end of lines.
This commit is contained in:
parent
51331cf32a
commit
a744995d49
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83270
@ -184,7 +184,7 @@ sysctl_an_dump(SYSCTL_HANDLER_ARGS)
|
||||
last = an_dump;
|
||||
bzero(an_conf, sizeof(an_conf));
|
||||
|
||||
switch (an_dump){
|
||||
switch (an_dump) {
|
||||
case 0:
|
||||
strcat(an_conf, "off");
|
||||
break;
|
||||
@ -201,23 +201,23 @@ sysctl_an_dump(SYSCTL_HANDLER_ARGS)
|
||||
|
||||
error = sysctl_handle_string(oidp, an_conf, sizeof(an_conf), req);
|
||||
|
||||
if (strncmp(an_conf,"off", 4) == 0){
|
||||
if (strncmp(an_conf,"off", 4) == 0) {
|
||||
an_dump = 0;
|
||||
}
|
||||
if (strncmp(an_conf,"dump", 4) == 0){
|
||||
if (strncmp(an_conf,"dump", 4) == 0) {
|
||||
an_dump = 1;
|
||||
}
|
||||
if (strncmp(an_conf,"type", 4) == 0){
|
||||
if (strncmp(an_conf,"type", 4) == 0) {
|
||||
an_dump = 2;
|
||||
}
|
||||
if (*s == 'f'){
|
||||
if (*s == 'f') {
|
||||
r = 0;
|
||||
for(;;s++){
|
||||
if((*s >= '0') && (*s <= '9')){
|
||||
for (;;s++) {
|
||||
if ((*s >= '0') && (*s <= '9')) {
|
||||
r = r * 16 + (*s - '0');
|
||||
}else if ((*s >= 'a') && (*s <= 'f')) {
|
||||
} else if ((*s >= 'a') && (*s <= 'f')) {
|
||||
r = r * 16 + (*s - 'a' + 10);
|
||||
}else{
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -238,7 +238,8 @@ SYSCTL_PROC(_machdep, OID_AUTO, an_dump, CTLTYPE_STRING | CTLFLAG_RW,
|
||||
* the SSID list will contain the name "tsunami." If we don't
|
||||
* find this, then there's no card present.
|
||||
*/
|
||||
int an_probe(dev)
|
||||
int
|
||||
an_probe(dev)
|
||||
device_t dev;
|
||||
{
|
||||
struct an_softc *sc = device_get_softc(dev);
|
||||
@ -353,7 +354,8 @@ an_release_resources(dev)
|
||||
}
|
||||
}
|
||||
|
||||
int an_attach(sc, unit, flags)
|
||||
int
|
||||
an_attach(sc, unit, flags)
|
||||
struct an_softc *sc;
|
||||
int unit;
|
||||
int flags;
|
||||
@ -524,12 +526,12 @@ an_rxeof(sc)
|
||||
* system load a lot
|
||||
*/
|
||||
|
||||
if(!(sc->an_monitor & AN_MONITOR_INCLUDE_BEACON) &&
|
||||
(rx_frame.an_frame_ctl & IEEE80211_FC0_SUBTYPE_BEACON)){
|
||||
if (!(sc->an_monitor & AN_MONITOR_INCLUDE_BEACON) &&
|
||||
(rx_frame.an_frame_ctl & IEEE80211_FC0_SUBTYPE_BEACON)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (sc->an_monitor & AN_MONITOR_AIRONET_HEADER){
|
||||
if (sc->an_monitor & AN_MONITOR_AIRONET_HEADER) {
|
||||
len = rx_frame.an_rx_payload_len
|
||||
+ sizeof(rx_frame);
|
||||
/* Check for insane frame length */
|
||||
@ -546,7 +548,7 @@ an_rxeof(sc)
|
||||
error = an_read_data(sc, id, sizeof(rx_frame),
|
||||
(caddr_t)bpf_buf+sizeof(rx_frame),
|
||||
rx_frame.an_rx_payload_len);
|
||||
}else{
|
||||
} else {
|
||||
fc1=rx_frame.an_frame_ctl >> 8;
|
||||
ieee80211_header_len = sizeof(struct ieee80211_frame);
|
||||
if ((fc1 & IEEE80211_FC1_DIR_TODS) &&
|
||||
@ -645,7 +647,8 @@ an_rxeof(sc)
|
||||
}
|
||||
}
|
||||
|
||||
static void an_txeof(sc, status)
|
||||
static void
|
||||
an_txeof(sc, status)
|
||||
struct an_softc *sc;
|
||||
int status;
|
||||
{
|
||||
@ -682,7 +685,8 @@ static void an_txeof(sc, status)
|
||||
* the NIC has synchronized to the current cell (either as the master
|
||||
* in an ad-hoc group, or as a station connected to an access point).
|
||||
*/
|
||||
void an_stats_update(xsc)
|
||||
void
|
||||
an_stats_update(xsc)
|
||||
void *xsc;
|
||||
{
|
||||
struct an_softc *sc;
|
||||
@ -718,7 +722,8 @@ void an_stats_update(xsc)
|
||||
return;
|
||||
}
|
||||
|
||||
void an_intr(xsc)
|
||||
void
|
||||
an_intr(xsc)
|
||||
void *xsc;
|
||||
{
|
||||
struct an_softc *sc;
|
||||
@ -783,7 +788,8 @@ void an_intr(xsc)
|
||||
return;
|
||||
}
|
||||
|
||||
static int an_cmd(sc, cmd, val)
|
||||
static int
|
||||
an_cmd(sc, cmd, val)
|
||||
struct an_softc *sc;
|
||||
int cmd;
|
||||
int val;
|
||||
@ -830,7 +836,8 @@ static int an_cmd(sc, cmd, val)
|
||||
* most reliable method I've found to really kick the NIC in the
|
||||
* head and force it to reboot correctly.
|
||||
*/
|
||||
static void an_reset(sc)
|
||||
static void
|
||||
an_reset(sc)
|
||||
struct an_softc *sc;
|
||||
{
|
||||
if (sc->an_gone)
|
||||
@ -851,7 +858,8 @@ static void an_reset(sc)
|
||||
/*
|
||||
* Read an LTV record from the NIC.
|
||||
*/
|
||||
static int an_read_record(sc, ltv)
|
||||
static int
|
||||
an_read_record(sc, ltv)
|
||||
struct an_softc *sc;
|
||||
struct an_ltv_gen *ltv;
|
||||
{
|
||||
@ -908,7 +916,8 @@ static int an_read_record(sc, ltv)
|
||||
/*
|
||||
* Same as read, except we inject data instead of reading it.
|
||||
*/
|
||||
static int an_write_record(sc, ltv)
|
||||
static int
|
||||
an_write_record(sc, ltv)
|
||||
struct an_softc *sc;
|
||||
struct an_ltv_gen *ltv;
|
||||
{
|
||||
@ -946,7 +955,8 @@ static int an_write_record(sc, ltv)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static void an_dump_record(sc, ltv, string)
|
||||
static void
|
||||
an_dump_record(sc, ltv, string)
|
||||
struct an_softc *sc;
|
||||
struct an_ltv_gen *ltv;
|
||||
char *string;
|
||||
@ -990,7 +1000,8 @@ static void an_dump_record(sc, ltv, string)
|
||||
}
|
||||
}
|
||||
|
||||
static int an_seek(sc, id, off, chan)
|
||||
static int
|
||||
an_seek(sc, id, off, chan)
|
||||
struct an_softc *sc;
|
||||
int id, off, chan;
|
||||
{
|
||||
@ -1025,7 +1036,8 @@ static int an_seek(sc, id, off, chan)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static int an_read_data(sc, id, off, buf, len)
|
||||
static int
|
||||
an_read_data(sc, id, off, buf, len)
|
||||
struct an_softc *sc;
|
||||
int id, off;
|
||||
caddr_t buf;
|
||||
@ -1051,7 +1063,8 @@ static int an_read_data(sc, id, off, buf, len)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static int an_write_data(sc, id, off, buf, len)
|
||||
static int
|
||||
an_write_data(sc, id, off, buf, len)
|
||||
struct an_softc *sc;
|
||||
int id, off;
|
||||
caddr_t buf;
|
||||
@ -1081,7 +1094,8 @@ static int an_write_data(sc, id, off, buf, len)
|
||||
* Allocate a region of memory inside the NIC and zero
|
||||
* it out.
|
||||
*/
|
||||
static int an_alloc_nicmem(sc, len, id)
|
||||
static int
|
||||
an_alloc_nicmem(sc, len, id)
|
||||
struct an_softc *sc;
|
||||
int len;
|
||||
int *id;
|
||||
@ -1114,7 +1128,8 @@ static int an_alloc_nicmem(sc, len, id)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static void an_setdef(sc, areq)
|
||||
static void
|
||||
an_setdef(sc, areq)
|
||||
struct an_softc *sc;
|
||||
struct an_req *areq;
|
||||
{
|
||||
@ -1174,8 +1189,8 @@ static void an_setdef(sc, areq)
|
||||
(*ng_ether_detach_p) (ifp);
|
||||
sc->an_monitor = cfg->an_len;
|
||||
|
||||
if (sc->an_monitor & AN_MONITOR){
|
||||
if (sc->an_monitor & AN_MONITOR_AIRONET_HEADER){
|
||||
if (sc->an_monitor & AN_MONITOR) {
|
||||
if (sc->an_monitor & AN_MONITOR_AIRONET_HEADER) {
|
||||
bpfattach(ifp, DLT_AIRONET_HEADER,
|
||||
sizeof(struct ether_header));
|
||||
} else {
|
||||
@ -1207,13 +1222,14 @@ static void an_setdef(sc, areq)
|
||||
* Derived from Linux driver to enable promiscious mode.
|
||||
*/
|
||||
|
||||
static void an_promisc(sc, promisc)
|
||||
static void
|
||||
an_promisc(sc, promisc)
|
||||
struct an_softc *sc;
|
||||
int promisc;
|
||||
{
|
||||
if(sc->an_was_monitor)
|
||||
if (sc->an_was_monitor)
|
||||
an_reset(sc);
|
||||
if (sc->an_monitor ||sc->an_was_monitor )
|
||||
if (sc->an_monitor || sc->an_was_monitor)
|
||||
an_init(sc);
|
||||
|
||||
sc->an_was_monitor = sc->an_monitor;
|
||||
@ -1222,7 +1238,8 @@ static void an_promisc(sc, promisc)
|
||||
return;
|
||||
}
|
||||
|
||||
static int an_ioctl(ifp, command, data)
|
||||
static int
|
||||
an_ioctl(ifp, command, data)
|
||||
struct ifnet *ifp;
|
||||
u_long command;
|
||||
caddr_t data;
|
||||
@ -1257,7 +1274,7 @@ static int an_ioctl(ifp, command, data)
|
||||
goto out;
|
||||
}
|
||||
|
||||
switch(command) {
|
||||
switch (command) {
|
||||
case SIOCSIFADDR:
|
||||
case SIOCGIFADDR:
|
||||
case SIOCSIFMTU:
|
||||
@ -1327,7 +1344,7 @@ static int an_ioctl(ifp, command, data)
|
||||
break;
|
||||
case SIOCG80211:
|
||||
areq.an_len = sizeof(areq);
|
||||
switch(ireq->i_type) {
|
||||
switch (ireq->i_type) {
|
||||
case IEEE80211_IOC_SSID:
|
||||
if (ireq->i_val == -1) {
|
||||
areq.an_type = AN_RID_STATUS;
|
||||
@ -1388,7 +1405,6 @@ static int an_ioctl(ifp, command, data)
|
||||
ireq->i_val = IEEE80211_WEP_MIXED;
|
||||
else
|
||||
ireq->i_val = IEEE80211_WEP_ON;
|
||||
|
||||
} else {
|
||||
ireq->i_val = IEEE80211_WEP_OFF;
|
||||
}
|
||||
@ -1554,7 +1570,7 @@ static int an_ioctl(ifp, command, data)
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch(ireq->i_type) {
|
||||
switch (ireq->i_type) {
|
||||
case IEEE80211_IOC_SSID:
|
||||
areq.an_type = AN_RID_SSIDLIST;
|
||||
if (an_read_record(sc,
|
||||
@ -1717,7 +1733,8 @@ static int an_ioctl(ifp, command, data)
|
||||
return(error != 0);
|
||||
}
|
||||
|
||||
static int an_init_tx_ring(sc)
|
||||
static int
|
||||
an_init_tx_ring(sc)
|
||||
struct an_softc *sc;
|
||||
{
|
||||
int i;
|
||||
@ -1740,7 +1757,8 @@ static int an_init_tx_ring(sc)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static void an_init(xsc)
|
||||
static void
|
||||
an_init(xsc)
|
||||
void *xsc;
|
||||
{
|
||||
struct an_softc *sc = xsc;
|
||||
@ -1844,7 +1862,8 @@ static void an_init(xsc)
|
||||
return;
|
||||
}
|
||||
|
||||
static void an_start(ifp)
|
||||
static void
|
||||
an_start(ifp)
|
||||
struct ifnet *ifp;
|
||||
{
|
||||
struct an_softc *sc;
|
||||
@ -1867,7 +1886,7 @@ static void an_start(ifp)
|
||||
return;
|
||||
|
||||
if (sc->an_monitor && (ifp->if_flags & IFF_PROMISC)) {
|
||||
for(;;) {
|
||||
for (;;) {
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
if (m0 == NULL)
|
||||
break;
|
||||
@ -1878,7 +1897,7 @@ static void an_start(ifp)
|
||||
idx = sc->an_rdata.an_tx_prod;
|
||||
bzero((char *)&tx_frame_802_3, sizeof(tx_frame_802_3));
|
||||
|
||||
while(sc->an_rdata.an_tx_ring[idx] == 0) {
|
||||
while (sc->an_rdata.an_tx_ring[idx] == 0) {
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
if (m0 == NULL)
|
||||
break;
|
||||
@ -1941,7 +1960,8 @@ static void an_start(ifp)
|
||||
return;
|
||||
}
|
||||
|
||||
void an_stop(sc)
|
||||
void
|
||||
an_stop(sc)
|
||||
struct an_softc *sc;
|
||||
{
|
||||
struct ifnet *ifp;
|
||||
@ -1972,7 +1992,8 @@ void an_stop(sc)
|
||||
return;
|
||||
}
|
||||
|
||||
static void an_watchdog(ifp)
|
||||
static void
|
||||
an_watchdog(ifp)
|
||||
struct ifnet *ifp;
|
||||
{
|
||||
struct an_softc *sc;
|
||||
@ -1996,7 +2017,8 @@ static void an_watchdog(ifp)
|
||||
return;
|
||||
}
|
||||
|
||||
void an_shutdown(dev)
|
||||
void
|
||||
an_shutdown(dev)
|
||||
device_t dev;
|
||||
{
|
||||
struct an_softc *sc;
|
||||
@ -2067,8 +2089,8 @@ SYSCTL_INT(_machdep, OID_AUTO, an_cache_iponly, CTLFLAG_RW,
|
||||
* an_cache_store, per rx packet store signal
|
||||
* strength in MAC (src) indexed cache.
|
||||
*/
|
||||
static
|
||||
void an_cache_store (sc, eh, m, rx_quality)
|
||||
static void
|
||||
an_cache_store (sc, eh, m, rx_quality)
|
||||
struct an_softc *sc;
|
||||
struct ether_header *eh;
|
||||
struct mbuf *m;
|
||||
@ -2187,7 +2209,8 @@ void an_cache_store (sc, eh, m, rx_quality)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int an_media_change(ifp)
|
||||
static int
|
||||
an_media_change(ifp)
|
||||
struct ifnet *ifp;
|
||||
{
|
||||
struct an_softc *sc = ifp->if_softc;
|
||||
@ -2224,7 +2247,8 @@ static int an_media_change(ifp)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static void an_media_status(ifp, imr)
|
||||
static void
|
||||
an_media_status(ifp, imr)
|
||||
struct ifnet *ifp;
|
||||
struct ifmediareq *imr;
|
||||
{
|
||||
@ -2243,7 +2267,7 @@ static void an_media_status(ifp, imr)
|
||||
imr->ifm_active = IFM_IEEE80211|IFM_AUTO;
|
||||
if (sc->an_config.an_opmode == AN_OPMODE_IBSS_ADHOC)
|
||||
imr->ifm_active |= IFM_IEEE80211_ADHOC;
|
||||
switch(status.an_current_tx_rate) {
|
||||
switch (status.an_current_tx_rate) {
|
||||
case AN_RATE_1MBPS:
|
||||
imr->ifm_active |= IFM_IEEE80211_DS1;
|
||||
break;
|
||||
|
@ -85,7 +85,8 @@ static int an_probe_isa __P((device_t));
|
||||
static int an_attach_isa __P((device_t));
|
||||
static int an_detach_isa __P((device_t));
|
||||
|
||||
static int an_probe_isa(dev)
|
||||
static int
|
||||
an_probe_isa(dev)
|
||||
device_t dev;
|
||||
{
|
||||
int error = 0;
|
||||
|
@ -115,13 +115,14 @@ static int an_probe_pci __P((device_t));
|
||||
static int an_attach_pci __P((device_t));
|
||||
static int an_detach_pci __P((device_t));
|
||||
|
||||
static int an_probe_pci(device_t dev)
|
||||
static int
|
||||
an_probe_pci(device_t dev)
|
||||
{
|
||||
struct an_type *t;
|
||||
|
||||
t = an_devs;
|
||||
|
||||
while(t->an_name != NULL) {
|
||||
while (t->an_name != NULL) {
|
||||
if (pci_get_vendor(dev) == t->an_vid &&
|
||||
pci_get_device(dev) == t->an_did) {
|
||||
device_set_desc(dev, t->an_name);
|
||||
@ -133,7 +134,8 @@ static int an_probe_pci(device_t dev)
|
||||
return(ENXIO);
|
||||
}
|
||||
|
||||
static int an_attach_pci(dev)
|
||||
static int
|
||||
an_attach_pci(dev)
|
||||
device_t dev;
|
||||
{
|
||||
u_int32_t command;
|
||||
|
Loading…
Reference in New Issue
Block a user