summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2006-12-08 09:17:35 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2006-12-08 09:17:35 +0000
commit9924d2811cfd65d87bbd6ed98b2cdcde59f96d5a (patch)
tree8d2e9dbefdcc22adedf3df7c44427013b0a33a29
parent6ec1e59ad26eb6d85f7a1b86387f12d7ac6e4315 (diff)
First round of evil macro removal. _acx_set_##name##_tmplt bites the dust.
OK mglocker@
-rw-r--r--sys/dev/ic/acx.c10
-rw-r--r--sys/dev/ic/acx100.c4
-rw-r--r--sys/dev/ic/acxreg.h19
3 files changed, 9 insertions, 24 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c
index d5a673c0c17..fcded71f528 100644
--- a/sys/dev/ic/acx.c
+++ b/sys/dev/ic/acx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acx.c,v 1.55 2006/11/26 17:20:33 jsg Exp $ */
+/* $OpenBSD: acx.c,v 1.56 2006/12/08 09:17:34 claudio Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -2276,7 +2276,7 @@ acx_set_null_tmplt(struct acx_softc *sc)
IEEE80211_ADDR_COPY(wh->i_addr2, ic->ic_myaddr);
IEEE80211_ADDR_COPY(wh->i_addr3, etherbroadcastaddr);
- return (_acx_set_null_data_tmplt(sc, &n, sizeof(n)));
+ return (acx_set_tmplt(sc, ACXCMD_TMPLT_NULL_DATA, &n, sizeof(n)));
}
int
@@ -2304,7 +2304,7 @@ acx_set_probe_req_tmplt(struct acx_softc *sc, const char *ssid, int ssid_len)
frm = ieee80211_add_xrates(frm, &ic->ic_sup_rates[sc->chip_phymode]);
len = frm - req.data.u_data.var;
- return (_acx_set_probe_req_tmplt(sc, &req,
+ return (acx_set_tmplt(sc, ACXCMD_TMPLT_PROBE_REQ, &req,
ACX_TMPLT_PROBE_REQ_SIZ(len)));
}
@@ -2323,7 +2323,7 @@ acx_set_probe_resp_tmplt(struct acx_softc *sc, struct ieee80211_node *ni)
len = m->m_pkthdr.len + sizeof(resp.size);
m_freem(m);
- return (_acx_set_probe_resp_tmplt(sc, &resp, len));
+ return (acx_set_tmplt(sc, ACXCMD_TMPLT_PROBE_RESP, &resp, len));
}
int
@@ -2341,7 +2341,7 @@ acx_set_beacon_tmplt(struct acx_softc *sc, struct ieee80211_node *ni)
len = m->m_pkthdr.len + sizeof(beacon.size);
m_freem(m);
- return (_acx_set_beacon_tmplt(sc, &beacon, len));
+ return (acx_set_tmplt(sc, ACXCMD_TMPLT_BEACON, &beacon, len));
}
void
diff --git a/sys/dev/ic/acx100.c b/sys/dev/ic/acx100.c
index 32dad387abc..8078cb13919 100644
--- a/sys/dev/ic/acx100.c
+++ b/sys/dev/ic/acx100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acx100.c,v 1.14 2006/11/26 19:46:28 deraadt Exp $ */
+/* $OpenBSD: acx100.c,v 1.15 2006/12/08 09:17:34 claudio Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -408,7 +408,7 @@ acx100_init_tmplt(struct acx_softc *sc)
bzero(&tim, sizeof(tim));
tim.tim_eid = IEEE80211_ELEMID_TIM;
tim.tim_len = ACX_TIM_LEN(ACX_TIM_BITMAP_LEN);
- if (_acx_set_tim_tmplt(sc, &tim,
+ if (acx_set_tmplt(sc, ACXCMD_TMPLT_TIM, &tim,
ACX_TMPLT_TIM_SIZ(ACX_TIM_BITMAP_LEN)) != 0) {
printf("%s: can't set tim tmplt\n", ifp->if_xname);
return (1);
diff --git a/sys/dev/ic/acxreg.h b/sys/dev/ic/acxreg.h
index 76b454ace7c..e1523a47933 100644
--- a/sys/dev/ic/acxreg.h
+++ b/sys/dev/ic/acxreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acxreg.h,v 1.6 2006/08/15 15:43:34 deraadt Exp $ */
+/* $OpenBSD: acxreg.h,v 1.7 2006/12/08 09:17:34 claudio Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -439,17 +439,6 @@ acx_init_##name##_tmplt(struct acx_softc *_sc) \
} \
struct __hack
-#define ACX_SET_TMPLT_FUNC(name) \
-static __inline int \
-_acx_set_##name##_tmplt(struct acx_softc *_sc, \
- struct acx_tmplt_##name *_tmplt, \
- uint16_t _tmplt_len) \
-{ \
- return acx_set_tmplt(_sc, ACXCMD_TMPLT_##name, \
- _tmplt, _tmplt_len); \
-} \
-struct __hack
-
#define _ACX_CONF_FUNC(sg, name, chip) \
static __inline int \
acx##chip##_##sg##_##name##_conf(struct acx_softc *_sc, \
@@ -475,16 +464,12 @@ struct __hack
#define ACXCMD_TMPLT_probe_resp ACXCMD_TMPLT_PROBE_RESP
#define ACXCMD_TMPLT_null_data ACXCMD_TMPLT_NULL_DATA
#define ACXCMD_TMPLT_probe_req ACXCMD_TMPLT_PROBE_REQ
+
ACX_INIT_TMPLT_FUNC(tim);
ACX_INIT_TMPLT_FUNC(null_data);
ACX_INIT_TMPLT_FUNC(beacon);
ACX_INIT_TMPLT_FUNC(probe_req);
ACX_INIT_TMPLT_FUNC(probe_resp);
-ACX_SET_TMPLT_FUNC(tim);
-ACX_SET_TMPLT_FUNC(null_data);
-ACX_SET_TMPLT_FUNC(beacon);
-ACX_SET_TMPLT_FUNC(probe_req);
-ACX_SET_TMPLT_FUNC(probe_resp);
#define ACX_CONF_FUNC(sg, name) _ACX_CONF_FUNC(sg, name,)
#define ACX_CONF_wepopt ACX_CONF_WEPOPT