diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-28 05:04:24 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-10 14:54:09 -0400 |
commit | a3304b0a17495183a2270d4a25978795226597a4 (patch) | |
tree | 1b1f91ab191e77833b84232ba5a61d6a584b3cd6 /net/wireless/nl80211.c | |
parent | d748b4642a53cd1ead303f9e2b008295391466b7 (diff) |
cfg80211/nl80211: clarify TX queue API
With the plan to change mac80211's queue API to
not map ACs to queues 1:1, it seems necessary to
clarify some APIs that act on ACs rather than on
queues to spell that out explicitly. Do this.
Also verify that the AC number given is valid.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index e49da2797022..344697df1177 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1104,17 +1104,20 @@ static const struct nla_policy txq_params_policy[NL80211_TXQ_ATTR_MAX + 1] = { | |||
1104 | static int parse_txq_params(struct nlattr *tb[], | 1104 | static int parse_txq_params(struct nlattr *tb[], |
1105 | struct ieee80211_txq_params *txq_params) | 1105 | struct ieee80211_txq_params *txq_params) |
1106 | { | 1106 | { |
1107 | if (!tb[NL80211_TXQ_ATTR_QUEUE] || !tb[NL80211_TXQ_ATTR_TXOP] || | 1107 | if (!tb[NL80211_TXQ_ATTR_AC] || !tb[NL80211_TXQ_ATTR_TXOP] || |
1108 | !tb[NL80211_TXQ_ATTR_CWMIN] || !tb[NL80211_TXQ_ATTR_CWMAX] || | 1108 | !tb[NL80211_TXQ_ATTR_CWMIN] || !tb[NL80211_TXQ_ATTR_CWMAX] || |
1109 | !tb[NL80211_TXQ_ATTR_AIFS]) | 1109 | !tb[NL80211_TXQ_ATTR_AIFS]) |
1110 | return -EINVAL; | 1110 | return -EINVAL; |
1111 | 1111 | ||
1112 | txq_params->queue = nla_get_u8(tb[NL80211_TXQ_ATTR_QUEUE]); | 1112 | txq_params->ac = nla_get_u8(tb[NL80211_TXQ_ATTR_AC]); |
1113 | txq_params->txop = nla_get_u16(tb[NL80211_TXQ_ATTR_TXOP]); | 1113 | txq_params->txop = nla_get_u16(tb[NL80211_TXQ_ATTR_TXOP]); |
1114 | txq_params->cwmin = nla_get_u16(tb[NL80211_TXQ_ATTR_CWMIN]); | 1114 | txq_params->cwmin = nla_get_u16(tb[NL80211_TXQ_ATTR_CWMIN]); |
1115 | txq_params->cwmax = nla_get_u16(tb[NL80211_TXQ_ATTR_CWMAX]); | 1115 | txq_params->cwmax = nla_get_u16(tb[NL80211_TXQ_ATTR_CWMAX]); |
1116 | txq_params->aifs = nla_get_u8(tb[NL80211_TXQ_ATTR_AIFS]); | 1116 | txq_params->aifs = nla_get_u8(tb[NL80211_TXQ_ATTR_AIFS]); |
1117 | 1117 | ||
1118 | if (txq_params->ac >= NL80211_NUM_ACS) | ||
1119 | return -EINVAL; | ||
1120 | |||
1118 | return 0; | 1121 | return 0; |
1119 | } | 1122 | } |
1120 | 1123 | ||