From 30985b8600c243709e8f1cf16dc5fd696b8043ae Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 21 Apr 2009 18:01:43 +0300 Subject: [PATCH] Remove unused set_retry() driver op --- hostapd/driver_i.h | 9 --------- src/drivers/driver.h | 1 - src/drivers/driver_ndis.c | 1 - src/drivers/driver_nl80211.c | 31 ------------------------------- 4 files changed, 42 deletions(-) diff --git a/hostapd/driver_i.h b/hostapd/driver_i.h index a5e9d40a2..20ac9a11c 100644 --- a/hostapd/driver_i.h +++ b/hostapd/driver_i.h @@ -280,15 +280,6 @@ hostapd_set_frag(struct hostapd_data *hapd, int frag) return hapd->driver->set_frag(hapd->drv_priv, frag); } -static inline int -hostapd_set_retry(struct hostapd_data *hapd, int short_retry, int long_retry) -{ - if (hapd->driver == NULL || hapd->driver->set_retry == NULL) - return 0; - return hapd->driver->set_retry(hapd->drv_priv, short_retry, - long_retry); -} - static inline int hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr, int total_flags, int flags_or, int flags_and) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index efe66e64a..8339127e9 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1265,7 +1265,6 @@ struct wpa_driver_ops { int (*set_freq)(void *priv, struct hostapd_freq_params *freq); int (*set_rts)(void *priv, int rts); int (*set_frag)(void *priv, int frag); - int (*set_retry)(void *priv, int short_retry, int long_retry); int (*sta_set_flags)(void *priv, const u8 *addr, int total_flags, int flags_or, int flags_and); diff --git a/src/drivers/driver_ndis.c b/src/drivers/driver_ndis.c index b17622966..fd0e97e0c 100644 --- a/src/drivers/driver_ndis.c +++ b/src/drivers/driver_ndis.c @@ -3241,7 +3241,6 @@ const struct wpa_driver_ops wpa_driver_ndis_ops = { NULL /* set_freq */, NULL /* set_rts */, NULL /* set_frag */, - NULL /* set_retry */, NULL /* sta_set_flags */, NULL /* set_rate_sets */, NULL /* set_ieee80211d */, diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 4c5ae594c..2f87d43af 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -3437,36 +3437,6 @@ static int i802_set_frag(void *priv, int frag) } -static int i802_set_retry(void *priv, int short_retry, int long_retry) -{ -#ifdef NO_WEXT - return -1; -#else /* NO_WEXT */ - struct wpa_driver_nl80211_data *drv = priv; - struct iwreq iwr; - - memset(&iwr, 0, sizeof(iwr)); - os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); - - iwr.u.retry.value = short_retry; - iwr.u.retry.flags = IW_RETRY_LIMIT | IW_RETRY_MIN; - if (ioctl(drv->ioctl_sock, SIOCSIWRETRY, &iwr) < 0) { - perror("ioctl[SIOCSIWRETRY(short)]"); - return -1; - } - - iwr.u.retry.value = long_retry; - iwr.u.retry.flags = IW_RETRY_LIMIT | IW_RETRY_MAX; - if (ioctl(drv->ioctl_sock, SIOCSIWRETRY, &iwr) < 0) { - perror("ioctl[SIOCSIWRETRY(long)]"); - return -1; - } - - return 0; -#endif /* NO_WEXT */ -} - - static int i802_flush(void *priv) { struct wpa_driver_nl80211_data *drv = priv; @@ -3987,7 +3957,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = { .set_freq = i802_set_freq, .set_rts = i802_set_rts, .set_frag = i802_set_frag, - .set_retry = i802_set_retry, .set_rate_sets = i802_set_rate_sets, .hapd_set_beacon = i802_set_beacon, .set_cts_protect = i802_set_cts_protect,