aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-10-30 10:59:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-11-10 15:17:40 -0500
commit318884875bdddca663ecc373c813cf8e117d9e43 (patch)
treede9cfbe0bf24bea0ab1546a0613fbc9417bb6cb8 /net/mac80211/cfg.c
parent1e898ff83c31c303f73c3893d1ac519e4d9b59e5 (diff)
nl80211: Add TX queue parameter configuration
Add a new attribute, NL80211_ATTR_WIPHY_TXQ_PARAMS, that can be used with NL80211_CMD_SET_WIPHY for userspace (e.g., hostapd) to set TX queue parameters (txop, cwmin, cwmax, aifs). Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 442a4d7b1808..fe672faa819d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1069,6 +1069,30 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
1069 return 0; 1069 return 0;
1070} 1070}
1071 1071
1072static int ieee80211_set_txq_params(struct wiphy *wiphy,
1073 struct ieee80211_txq_params *params)
1074{
1075 struct ieee80211_local *local = wiphy_priv(wiphy);
1076 struct ieee80211_tx_queue_params p;
1077
1078 if (!local->ops->conf_tx)
1079 return -EOPNOTSUPP;
1080
1081 memset(&p, 0, sizeof(p));
1082 p.aifs = params->aifs;
1083 p.cw_max = params->cwmax;
1084 p.cw_min = params->cwmin;
1085 p.txop = params->txop;
1086 if (local->ops->conf_tx(local_to_hw(local), params->queue, &p)) {
1087 printk(KERN_DEBUG "%s: failed to set TX queue "
1088 "parameters for queue %d\n", local->mdev->name,
1089 params->queue);
1090 return -EINVAL;
1091 }
1092
1093 return 0;
1094}
1095
1072struct cfg80211_ops mac80211_config_ops = { 1096struct cfg80211_ops mac80211_config_ops = {
1073 .add_virtual_intf = ieee80211_add_iface, 1097 .add_virtual_intf = ieee80211_add_iface,
1074 .del_virtual_intf = ieee80211_del_iface, 1098 .del_virtual_intf = ieee80211_del_iface,
@@ -1095,4 +1119,5 @@ struct cfg80211_ops mac80211_config_ops = {
1095 .get_mesh_params = ieee80211_get_mesh_params, 1119 .get_mesh_params = ieee80211_get_mesh_params,
1096#endif 1120#endif
1097 .change_bss = ieee80211_change_bss, 1121 .change_bss = ieee80211_change_bss,
1122 .set_txq_params = ieee80211_set_txq_params,
1098}; 1123};