diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-08-16 14:24:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-16 14:24:51 -0400 |
commit | d0746663667f37e7be5646bf68cb452c8375a23d (patch) | |
tree | 85ae5a3d5e5bae53815baba5dba372e4d53a9745 /net/mac80211/cfg.c | |
parent | 41caa760d6acaf47cbd44c3d78307fb9be089111 (diff) | |
parent | 27b3eb9c06a7193bdc9800cd00764a130343bc8a (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 31fc2247bc3..2e7855a1b10 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2302,14 +2302,25 @@ static void ieee80211_rfkill_poll(struct wiphy *wiphy) } #ifdef CONFIG_NL80211_TESTMODE -static int ieee80211_testmode_cmd(struct wiphy *wiphy, void *data, int len) +static int ieee80211_testmode_cmd(struct wiphy *wiphy, + struct wireless_dev *wdev, + void *data, int len) { struct ieee80211_local *local = wiphy_priv(wiphy); + struct ieee80211_vif *vif = NULL; if (!local->ops->testmode_cmd) return -EOPNOTSUPP; - return local->ops->testmode_cmd(&local->hw, data, len); + if (wdev) { + struct ieee80211_sub_if_data *sdata; + + sdata = IEEE80211_WDEV_TO_SUB_IF(wdev); + if (sdata->flags & IEEE80211_SDATA_IN_DRIVER) + vif = &sdata->vif; + } + + return local->ops->testmode_cmd(&local->hw, vif, data, len); } static int ieee80211_testmode_dump(struct wiphy *wiphy, |