Skip to content

Commit

Permalink
cfg80211/mac80211: add netdev param to set_txq_params()
Browse files Browse the repository at this point in the history
tx params are currently configured per hw, although they
should be configured per interface.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Eliad Peller authored and John W. Linville committed Sep 27, 2011
1 parent aad14ce commit f70f01c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ struct cfg80211_ops {
int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
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);

int (*set_channel)(struct wiphy *wiphy, struct net_device *dev,
Expand Down
1 change: 1 addition & 0 deletions net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
}

static int ieee80211_set_txq_params(struct wiphy *wiphy,
struct net_device *dev,
struct ieee80211_txq_params *params)
{
struct ieee80211_local *local = wiphy_priv(wiphy);
Expand Down
6 changes: 6 additions & 0 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,11 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
goto bad_res;
}

if (!netdev) {
result = -EINVAL;
goto bad_res;
}

nla_for_each_nested(nl_txq_params,
info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS],
rem_txq_params) {
Expand All @@ -1248,6 +1253,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
goto bad_res;

result = rdev->ops->set_txq_params(&rdev->wiphy,
netdev,
&txq_params);
if (result)
goto bad_res;
Expand Down

0 comments on commit f70f01c

Please sign in to comment.