aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorTed Merrill <ted@atheros.com>2008-01-13 01:48:02 (GMT)
committerJouni Malinen <j@w1.fi>2008-01-13 01:48:02 (GMT)
commit332c4d3d60bcd925023ea509bb81799cef6d0bcf (patch)
tree67fe09f72054f68e94490597ce9dba756dff1baf /hostapd
parentbf817611705b1091b1e78894f633e83e9d4d3be6 (diff)
downloadhostap-history-332c4d3d60bcd925023ea509bb81799cef6d0bcf.zip
hostap-history-332c4d3d60bcd925023ea509bb81799cef6d0bcf.tar.gz
hostap-history-332c4d3d60bcd925023ea509bb81799cef6d0bcf.tar.bz2
madwifi: No need to include extra code for figuring out last ioctl number
The array index is already verified to be within the bounds of the array, so the extra validation for 'last' was not really needed. Since the last value had not been updated for the old driver version, some of the ioctls were already potentially missed. Better just remove this extra code to get rid of such problems.
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/driver_madwifi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hostapd/driver_madwifi.c b/hostapd/driver_madwifi.c
index 2ccffeb..b2934c8 100644
--- a/hostapd/driver_madwifi.c
+++ b/hostapd/driver_madwifi.c
@@ -100,7 +100,6 @@ set80211priv(struct madwifi_driver_data *drv, int op, void *data, int len)
if (ioctl(drv->ioctl_sock, op, &iwr) < 0) {
#ifdef MADWIFI_NG
int first = IEEE80211_IOCTL_SETPARAM;
- int last = IEEE80211_IOCTL_KICKMAC;
static const char *opnames[] = {
"ioctl[IEEE80211_IOCTL_SETPARAM]",
"ioctl[IEEE80211_IOCTL_GETPARAM]",
@@ -136,7 +135,6 @@ set80211priv(struct madwifi_driver_data *drv, int op, void *data, int len)
};
#else /* MADWIFI_NG */
int first = IEEE80211_IOCTL_SETPARAM;
- int last = IEEE80211_IOCTL_CHANLIST;
static const char *opnames[] = {
"ioctl[IEEE80211_IOCTL_SETPARAM]",
"ioctl[IEEE80211_IOCTL_GETPARAM]",
@@ -160,7 +158,7 @@ set80211priv(struct madwifi_driver_data *drv, int op, void *data, int len)
};
#endif /* MADWIFI_NG */
int idx = op - first;
- if (first <= op && op <= last &&
+ if (first <= op &&
idx < (int) (sizeof(opnames) / sizeof(opnames[0])) &&
opnames[idx])
perror(opnames[idx]);