aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-07-10 13:32:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-07-12 16:07:25 -0400
commit3ef8bed4692a0de6a47d162196c850c5dea85b70 (patch)
tree69aee2bb1eee824449dc74e9427248e4806661d0 /net/mac80211
parent40f7cac9f8dd662c1dd02334afdceef0be03e34f (diff)
[PATCH] mac80211: kill rate control ioctls
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>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/hostapd_ioctl.h4
-rw-r--r--net/mac80211/ieee80211.c2
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/ieee80211_ioctl.c80
-rw-r--r--net/mac80211/rc80211_simple.c8
5 files changed, 6 insertions, 90 deletions
diff --git a/net/mac80211/hostapd_ioctl.h b/net/mac80211/hostapd_ioctl.h
index 34fa128e9872..252204fd0abb 100644
--- a/net/mac80211/hostapd_ioctl.h
+++ b/net/mac80211/hostapd_ioctl.h
@@ -40,10 +40,6 @@ enum {
40 PRISM2_PARAM_ANTENNA_MODE = 1013, 40 PRISM2_PARAM_ANTENNA_MODE = 1013,
41 PRISM2_PARAM_STAT_TIME = 1016, 41 PRISM2_PARAM_STAT_TIME = 1016,
42 PRISM2_PARAM_STA_ANTENNA_SEL = 1017, 42 PRISM2_PARAM_STA_ANTENNA_SEL = 1017,
43 PRISM2_PARAM_FORCE_UNICAST_RATE = 1018,
44 PRISM2_PARAM_RATE_CTRL_NUM_UP = 1019,
45 PRISM2_PARAM_RATE_CTRL_NUM_DOWN = 1020,
46 PRISM2_PARAM_MAX_RATECTRL_RATE = 1021,
47 PRISM2_PARAM_TX_POWER_REDUCTION = 1022, 43 PRISM2_PARAM_TX_POWER_REDUCTION = 1022,
48 PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024, 44 PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024,
49 PRISM2_PARAM_DEFAULT_WEP_ONLY = 1026, 45 PRISM2_PARAM_DEFAULT_WEP_ONLY = 1026,
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index e91698308f31..773a103ee3a1 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -4924,8 +4924,6 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
4924 local->short_retry_limit = 7; 4924 local->short_retry_limit = 7;
4925 local->long_retry_limit = 4; 4925 local->long_retry_limit = 4;
4926 local->hw.conf.radio_enabled = 1; 4926 local->hw.conf.radio_enabled = 1;
4927 local->rate_ctrl_num_up = RATE_CONTROL_NUM_UP;
4928 local->rate_ctrl_num_down = RATE_CONTROL_NUM_DOWN;
4929 4927
4930 local->enabled_modes = (unsigned int) -1; 4928 local->enabled_modes = (unsigned int) -1;
4931 4929
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index fadcbccc0da2..b222a9afd4e9 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -514,8 +514,6 @@ struct ieee80211_local {
514 STA_ANTENNA_SEL_SW_CTRL_DEBUG = 2 514 STA_ANTENNA_SEL_SW_CTRL_DEBUG = 2
515 } sta_antenna_sel; 515 } sta_antenna_sel;
516 516
517 int rate_ctrl_num_up, rate_ctrl_num_down;
518
519#ifdef CONFIG_MAC80211_DEBUG_COUNTERS 517#ifdef CONFIG_MAC80211_DEBUG_COUNTERS
520 /* TX/RX handler statistics */ 518 /* TX/RX handler statistics */
521 unsigned int tx_handlers_drop; 519 unsigned int tx_handlers_drop;
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index ef74a91e02a5..f404f1f4251d 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -1074,62 +1074,6 @@ static int ieee80211_ioctl_clear_keys(struct net_device *dev)
1074} 1074}
1075 1075
1076 1076
1077static int
1078ieee80211_ioctl_force_unicast_rate(struct net_device *dev,
1079 struct ieee80211_sub_if_data *sdata,
1080 int rate)
1081{
1082 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
1083 struct ieee80211_hw_mode *mode;
1084 int i;
1085
1086 if (sdata->type != IEEE80211_IF_TYPE_AP)
1087 return -ENOENT;
1088
1089 if (rate == 0) {
1090 sdata->u.ap.force_unicast_rateidx = -1;
1091 return 0;
1092 }
1093
1094 mode = local->oper_hw_mode;
1095 for (i = 0; i < mode->num_rates; i++) {
1096 if (mode->rates[i].rate == rate) {
1097 sdata->u.ap.force_unicast_rateidx = i;
1098 return 0;
1099 }
1100 }
1101 return -EINVAL;
1102}
1103
1104
1105static int
1106ieee80211_ioctl_max_ratectrl_rate(struct net_device *dev,
1107 struct ieee80211_sub_if_data *sdata,
1108 int rate)
1109{
1110 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
1111 struct ieee80211_hw_mode *mode;
1112 int i;
1113
1114 if (sdata->type != IEEE80211_IF_TYPE_AP)
1115 return -ENOENT;
1116
1117 if (rate == 0) {
1118 sdata->u.ap.max_ratectrl_rateidx = -1;
1119 return 0;
1120 }
1121
1122 mode = local->oper_hw_mode;
1123 for (i = 0; i < mode->num_rates; i++) {
1124 if (mode->rates[i].rate == rate) {
1125 sdata->u.ap.max_ratectrl_rateidx = i;
1126 return 0;
1127 }
1128 }
1129 return -EINVAL;
1130}
1131
1132
1133static void ieee80211_key_enable_hwaccel(struct ieee80211_local *local, 1077static void ieee80211_key_enable_hwaccel(struct ieee80211_local *local,
1134 struct ieee80211_key *key) 1078 struct ieee80211_key *key)
1135{ 1079{
@@ -1317,22 +1261,6 @@ static int ieee80211_ioctl_prism2_param(struct net_device *dev,
1317 local->sta_antenna_sel = value; 1261 local->sta_antenna_sel = value;
1318 break; 1262 break;
1319 1263
1320 case PRISM2_PARAM_FORCE_UNICAST_RATE:
1321 ret = ieee80211_ioctl_force_unicast_rate(dev, sdata, value);
1322 break;
1323
1324 case PRISM2_PARAM_MAX_RATECTRL_RATE:
1325 ret = ieee80211_ioctl_max_ratectrl_rate(dev, sdata, value);
1326 break;
1327
1328 case PRISM2_PARAM_RATE_CTRL_NUM_UP:
1329 local->rate_ctrl_num_up = value;
1330 break;
1331
1332 case PRISM2_PARAM_RATE_CTRL_NUM_DOWN:
1333 local->rate_ctrl_num_down = value;
1334 break;
1335
1336 case PRISM2_PARAM_TX_POWER_REDUCTION: 1264 case PRISM2_PARAM_TX_POWER_REDUCTION:
1337 if (value < 0) 1265 if (value < 0)
1338 ret = -EINVAL; 1266 ret = -EINVAL;
@@ -1451,14 +1379,6 @@ static int ieee80211_ioctl_get_prism2_param(struct net_device *dev,
1451 *param = local->sta_antenna_sel; 1379 *param = local->sta_antenna_sel;
1452 break; 1380 break;
1453 1381
1454 case PRISM2_PARAM_RATE_CTRL_NUM_UP:
1455 *param = local->rate_ctrl_num_up;
1456 break;
1457
1458 case PRISM2_PARAM_RATE_CTRL_NUM_DOWN:
1459 *param = local->rate_ctrl_num_down;
1460 break;
1461
1462 case PRISM2_PARAM_TX_POWER_REDUCTION: 1382 case PRISM2_PARAM_TX_POWER_REDUCTION:
1463 *param = local->hw.conf.tx_power_reduction; 1383 *param = local->hw.conf.tx_power_reduction;
1464 break; 1384 break;
diff --git a/net/mac80211/rc80211_simple.c b/net/mac80211/rc80211_simple.c
index 5ae7fc454665..f6780d63b342 100644
--- a/net/mac80211/rc80211_simple.c
+++ b/net/mac80211/rc80211_simple.c
@@ -187,9 +187,13 @@ static void rate_control_simple_tx_status(void *priv, struct net_device *dev,
187 } 187 }
188#endif 188#endif
189 189
190 if (per_failed > local->rate_ctrl_num_down) { 190 /*
191 * XXX: Make these configurable once we have an
192 * interface to the rate control algorithms
193 */
194 if (per_failed > RATE_CONTROL_NUM_DOWN) {
191 rate_control_rate_dec(local, sta); 195 rate_control_rate_dec(local, sta);
192 } else if (per_failed < local->rate_ctrl_num_up) { 196 } else if (per_failed < RATE_CONTROL_NUM_UP) {
193 rate_control_rate_inc(local, sta); 197 rate_control_rate_inc(local, sta);
194 } 198 }
195 srctrl->tx_avg_rate_sum += status->control.rate->rate; 199 srctrl->tx_avg_rate_sum += status->control.rate->rate;