Commit f70f01c2 authored by Eliad Peller's avatar Eliad Peller Committed by John W. Linville

cfg80211/mac80211: add netdev param to set_txq_params()

tx params are currently configured per hw, although they
should be configured per interface.
Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent aad14ceb
...@@ -1486,7 +1486,7 @@ struct cfg80211_ops { ...@@ -1486,7 +1486,7 @@ struct cfg80211_ops {
int (*change_bss)(struct wiphy *wiphy, struct net_device *dev, int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
struct bss_parameters *params); struct bss_parameters *params);
int (*set_txq_params)(struct wiphy *wiphy, int (*set_txq_params)(struct wiphy *wiphy, struct net_device *dev,
struct ieee80211_txq_params *params); struct ieee80211_txq_params *params);
int (*set_channel)(struct wiphy *wiphy, struct net_device *dev, int (*set_channel)(struct wiphy *wiphy, struct net_device *dev,
......
...@@ -1271,6 +1271,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy, ...@@ -1271,6 +1271,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
} }
static int ieee80211_set_txq_params(struct wiphy *wiphy, static int ieee80211_set_txq_params(struct wiphy *wiphy,
struct net_device *dev,
struct ieee80211_txq_params *params) struct ieee80211_txq_params *params)
{ {
struct ieee80211_local *local = wiphy_priv(wiphy); struct ieee80211_local *local = wiphy_priv(wiphy);
......
...@@ -1236,6 +1236,11 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) ...@@ -1236,6 +1236,11 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
goto bad_res; goto bad_res;
} }
if (!netdev) {
result = -EINVAL;
goto bad_res;
}
nla_for_each_nested(nl_txq_params, nla_for_each_nested(nl_txq_params,
info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS], info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS],
rem_txq_params) { rem_txq_params) {
...@@ -1248,6 +1253,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) ...@@ -1248,6 +1253,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
goto bad_res; goto bad_res;
result = rdev->ops->set_txq_params(&rdev->wiphy, result = rdev->ops->set_txq_params(&rdev->wiphy,
netdev,
&txq_params); &txq_params);
if (result) if (result)
goto bad_res; goto bad_res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment