]> err.no Git - linux-2.6/commitdiff
[PATCH] mac80211: kill rate control ioctls
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 10 Jul 2007 17:32:09 +0000 (19:32 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 12 Jul 2007 20:07:25 +0000 (16:07 -0400)
These aren't used anywhere (hostapd, wpa_supplicant) and until we
have a proper interface to the rate control algorithms they don't
make much sense either since e.g. rc80211_lowest won't honour them.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/hostapd_ioctl.h
net/mac80211/ieee80211.c
net/mac80211/ieee80211_i.h
net/mac80211/ieee80211_ioctl.c
net/mac80211/rc80211_simple.c

index 34fa128e9872883661fa5c2cb76cc5144f80b77d..252204fd0abb170f0a25bc0b640ca4ba20ef1e15 100644 (file)
@@ -40,10 +40,6 @@ enum {
        PRISM2_PARAM_ANTENNA_MODE = 1013,
        PRISM2_PARAM_STAT_TIME = 1016,
        PRISM2_PARAM_STA_ANTENNA_SEL = 1017,
-       PRISM2_PARAM_FORCE_UNICAST_RATE = 1018,
-       PRISM2_PARAM_RATE_CTRL_NUM_UP = 1019,
-       PRISM2_PARAM_RATE_CTRL_NUM_DOWN = 1020,
-       PRISM2_PARAM_MAX_RATECTRL_RATE = 1021,
        PRISM2_PARAM_TX_POWER_REDUCTION = 1022,
        PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024,
        PRISM2_PARAM_DEFAULT_WEP_ONLY = 1026,
index e91698308f31bfb4ba5ae7e0dcf791930c230929..773a103ee3a1527e8cb013fac61a475ae0b4cd69 100644 (file)
@@ -4924,8 +4924,6 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
        local->short_retry_limit = 7;
        local->long_retry_limit = 4;
        local->hw.conf.radio_enabled = 1;
-       local->rate_ctrl_num_up = RATE_CONTROL_NUM_UP;
-       local->rate_ctrl_num_down = RATE_CONTROL_NUM_DOWN;
 
        local->enabled_modes = (unsigned int) -1;
 
index fadcbccc0da2c29c9bdc06805194a74ea783f3b0..b222a9afd4e9fb38e681212eb9cf0109e6d27b47 100644 (file)
@@ -514,8 +514,6 @@ struct ieee80211_local {
                STA_ANTENNA_SEL_SW_CTRL_DEBUG = 2
        } sta_antenna_sel;
 
-       int rate_ctrl_num_up, rate_ctrl_num_down;
-
 #ifdef CONFIG_MAC80211_DEBUG_COUNTERS
        /* TX/RX handler statistics */
        unsigned int tx_handlers_drop;
index ef74a91e02a5afb26b466e914bcf7af304d57870..f404f1f4251d2233b7418475f9a8c296b380b4c2 100644 (file)
@@ -1074,62 +1074,6 @@ static int ieee80211_ioctl_clear_keys(struct net_device *dev)
 }
 
 
-static int
-ieee80211_ioctl_force_unicast_rate(struct net_device *dev,
-                                  struct ieee80211_sub_if_data *sdata,
-                                  int rate)
-{
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
-       struct ieee80211_hw_mode *mode;
-       int i;
-
-       if (sdata->type != IEEE80211_IF_TYPE_AP)
-               return -ENOENT;
-
-       if (rate == 0) {
-               sdata->u.ap.force_unicast_rateidx = -1;
-               return 0;
-       }
-
-       mode = local->oper_hw_mode;
-       for (i = 0; i < mode->num_rates; i++) {
-               if (mode->rates[i].rate == rate) {
-                       sdata->u.ap.force_unicast_rateidx = i;
-                       return 0;
-               }
-       }
-       return -EINVAL;
-}
-
-
-static int
-ieee80211_ioctl_max_ratectrl_rate(struct net_device *dev,
-                                 struct ieee80211_sub_if_data *sdata,
-                                 int rate)
-{
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
-       struct ieee80211_hw_mode *mode;
-       int i;
-
-       if (sdata->type != IEEE80211_IF_TYPE_AP)
-               return -ENOENT;
-
-       if (rate == 0) {
-               sdata->u.ap.max_ratectrl_rateidx = -1;
-               return 0;
-       }
-
-       mode = local->oper_hw_mode;
-       for (i = 0; i < mode->num_rates; i++) {
-               if (mode->rates[i].rate == rate) {
-                       sdata->u.ap.max_ratectrl_rateidx = i;
-                       return 0;
-               }
-       }
-       return -EINVAL;
-}
-
-
 static void ieee80211_key_enable_hwaccel(struct ieee80211_local *local,
                                         struct ieee80211_key *key)
 {
@@ -1317,22 +1261,6 @@ static int ieee80211_ioctl_prism2_param(struct net_device *dev,
                local->sta_antenna_sel = value;
                break;
 
-       case PRISM2_PARAM_FORCE_UNICAST_RATE:
-               ret = ieee80211_ioctl_force_unicast_rate(dev, sdata, value);
-               break;
-
-       case PRISM2_PARAM_MAX_RATECTRL_RATE:
-               ret = ieee80211_ioctl_max_ratectrl_rate(dev, sdata, value);
-               break;
-
-       case PRISM2_PARAM_RATE_CTRL_NUM_UP:
-               local->rate_ctrl_num_up = value;
-               break;
-
-       case PRISM2_PARAM_RATE_CTRL_NUM_DOWN:
-               local->rate_ctrl_num_down = value;
-               break;
-
        case PRISM2_PARAM_TX_POWER_REDUCTION:
                if (value < 0)
                        ret = -EINVAL;
@@ -1451,14 +1379,6 @@ static int ieee80211_ioctl_get_prism2_param(struct net_device *dev,
                *param = local->sta_antenna_sel;
                break;
 
-       case PRISM2_PARAM_RATE_CTRL_NUM_UP:
-               *param = local->rate_ctrl_num_up;
-               break;
-
-       case PRISM2_PARAM_RATE_CTRL_NUM_DOWN:
-               *param = local->rate_ctrl_num_down;
-               break;
-
        case PRISM2_PARAM_TX_POWER_REDUCTION:
                *param = local->hw.conf.tx_power_reduction;
                break;
index 5ae7fc45466547cddb6009abe8f04162f4c0287c..f6780d63b34279e672b96cb0cf6400e37f770f5d 100644 (file)
@@ -187,9 +187,13 @@ static void rate_control_simple_tx_status(void *priv, struct net_device *dev,
                }
 #endif
 
-               if (per_failed > local->rate_ctrl_num_down) {
+               /*
+                * XXX: Make these configurable once we have an
+                * interface to the rate control algorithms
+                */
+               if (per_failed > RATE_CONTROL_NUM_DOWN) {
                        rate_control_rate_dec(local, sta);
-               } else if (per_failed < local->rate_ctrl_num_up) {
+               } else if (per_failed < RATE_CONTROL_NUM_UP) {
                        rate_control_rate_inc(local, sta);
                }
                srctrl->tx_avg_rate_sum += status->control.rate->rate;