aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_ioctl.c
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/ieee80211_ioctl.c
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/ieee80211_ioctl.c')
-rw-r--r--net/mac80211/ieee80211_ioctl.c80
1 files changed, 0 insertions, 80 deletions
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;