Remove unused driver_ops
authorJouni Malinen <jouni.malinen@atheros.com>
Fri, 3 Apr 2009 08:59:08 +0000 (11:59 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 3 Apr 2009 08:59:08 +0000 (11:59 +0300)
get_rts, get_frag, get_retry, and set_key_tx_rx_threshold were not used
anywhere, so get rid of them.

hostapd/driver.h
hostapd/driver_i.h
hostapd/driver_nl80211.c

index a7b371a..41cb3d7 100644 (file)
@@ -128,11 +128,8 @@ struct hapd_driver_ops {
 
        int (*set_freq)(void *priv, struct hostapd_freq_params *freq);
        int (*set_rts)(void *priv, int rts);
-       int (*get_rts)(void *priv, int *rts);
        int (*set_frag)(void *priv, int frag);
-       int (*get_frag)(void *priv, int *frag);
        int (*set_retry)(void *priv, int short_retry, int long_retry);
-       int (*get_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);
@@ -159,7 +156,6 @@ struct hapd_driver_ops {
         */
        int (*set_broadcast_ssid)(void *priv, int value);
        int (*set_cts_protect)(void *priv, int value);
-       int (*set_key_tx_rx_threshold)(void *priv, int value);
        int (*set_preamble)(void *priv, int value);
        int (*set_short_slot_time)(void *priv, int value);
        int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min,
index cceb6d1..ce0eb77 100644 (file)
@@ -250,14 +250,6 @@ hostapd_set_rts(struct hostapd_data *hapd, int rts)
 }
 
 static inline int
-hostapd_get_rts(struct hostapd_data *hapd, int *rts)
-{
-       if (hapd->driver == NULL || hapd->driver->get_rts == NULL)
-               return 0;
-       return hapd->driver->get_rts(hapd->drv_priv, rts);
-}
-
-static inline int
 hostapd_set_frag(struct hostapd_data *hapd, int frag)
 {
        if (hapd->driver == NULL || hapd->driver->set_frag == NULL)
@@ -266,14 +258,6 @@ hostapd_set_frag(struct hostapd_data *hapd, int frag)
 }
 
 static inline int
-hostapd_get_frag(struct hostapd_data *hapd, int *frag)
-{
-       if (hapd->driver == NULL || hapd->driver->get_frag == NULL)
-               return 0;
-       return hapd->driver->get_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)
@@ -283,15 +267,6 @@ hostapd_set_retry(struct hostapd_data *hapd, int short_retry, int long_retry)
 }
 
 static inline int
-hostapd_get_retry(struct hostapd_data *hapd, int *short_retry, int *long_retry)
-{
-       if (hapd->driver == NULL || hapd->driver->get_retry == NULL)
-               return 0;
-       return hapd->driver->get_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)
 {
@@ -381,15 +356,6 @@ hostapd_set_cts_protect(struct hostapd_data *hapd, int value)
 }
 
 static inline int
-hostapd_set_key_tx_rx_threshold(struct hostapd_data *hapd, int value)
-{
-       if (hapd->driver == NULL ||
-           hapd->driver->set_key_tx_rx_threshold == NULL)
-               return 0;
-       return hapd->driver->set_key_tx_rx_threshold(hapd->drv_priv, value);
-}
-
-static inline int
 hostapd_set_preamble(struct hostapd_data *hapd, int value)
 {
        if (hapd->driver == NULL || hapd->driver->set_preamble == NULL)
index f76dd94..8716a9f 100644 (file)
@@ -573,25 +573,6 @@ static int i802_set_rts(void *priv, int rts)
 }
 
 
-static int i802_get_rts(void *priv, int *rts)
-{
-       struct i802_driver_data *drv = priv;
-       struct iwreq iwr;
-
-       memset(&iwr, 0, sizeof(iwr));
-       os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
-
-       if (ioctl(drv->ioctl_sock, SIOCGIWRTS, &iwr) < 0) {
-               perror("ioctl[SIOCGIWRTS]");
-               return -1;
-       }
-
-       *rts = iwr.u.rts.value;
-
-       return 0;
-}
-
-
 static int i802_set_frag(void *priv, int frag)
 {
        struct i802_driver_data *drv = priv;
@@ -611,25 +592,6 @@ static int i802_set_frag(void *priv, int frag)
 }
 
 
-static int i802_get_frag(void *priv, int *frag)
-{
-       struct i802_driver_data *drv = priv;
-       struct iwreq iwr;
-
-       memset(&iwr, 0, sizeof(iwr));
-       os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
-
-       if (ioctl(drv->ioctl_sock, SIOCGIWFRAG, &iwr) < 0) {
-               perror("ioctl[SIOCGIWFRAG]");
-               return -1;
-       }
-
-       *frag = iwr.u.frag.value;
-
-       return 0;
-}
-
-
 static int i802_set_retry(void *priv, int short_retry, int long_retry)
 {
        struct i802_driver_data *drv = priv;
@@ -656,32 +618,6 @@ static int i802_set_retry(void *priv, int short_retry, int long_retry)
 }
 
 
-static int i802_get_retry(void *priv, int *short_retry, int *long_retry)
-{
-       struct i802_driver_data *drv = priv;
-       struct iwreq iwr;
-
-       memset(&iwr, 0, sizeof(iwr));
-       os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
-
-       iwr.u.retry.flags = IW_RETRY_LIMIT | IW_RETRY_MIN;
-       if (ioctl(drv->ioctl_sock, SIOCGIWRETRY, &iwr) < 0) {
-               perror("ioctl[SIOCGIWFRAG(short)]");
-               return -1;
-       }
-       *short_retry = iwr.u.retry.value;
-
-       iwr.u.retry.flags = IW_RETRY_LIMIT | IW_RETRY_MAX;
-       if (ioctl(drv->ioctl_sock, SIOCGIWRETRY, &iwr) < 0) {
-               perror("ioctl[SIOCGIWFRAG(long)]");
-               return -1;
-       }
-       *long_retry = iwr.u.retry.value;
-
-       return 0;
-}
-
-
 static int i802_flush(void *priv)
 {
        struct i802_driver_data *drv = priv;
@@ -3090,11 +3026,8 @@ const struct hapd_driver_ops wpa_driver_nl80211_ops = {
        .sta_clear_stats = i802_sta_clear_stats,
        .set_freq = i802_set_freq,
        .set_rts = i802_set_rts,
-       .get_rts = i802_get_rts,
        .set_frag = i802_set_frag,
-       .get_frag = i802_get_frag,
        .set_retry = i802_set_retry,
-       .get_retry = i802_get_retry,
        .set_rate_sets = i802_set_rate_sets,
        .set_beacon = i802_set_beacon,
        .set_internal_bridge = i802_set_internal_bridge,