mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
mac80211: add vif to testmode cmd
Pass the wdev from cfg80211 on to the driver as the vif if given and it's valid for the driver. Signed-off-by: David Spinadel <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
parent
fc73f11f5f
commit
52981cd794
5 changed files with 19 additions and 6 deletions
|
|
@ -2305,11 +2305,20 @@ static int ieee80211_testmode_cmd(struct wiphy *wiphy,
|
|||
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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue