]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mac80211_hwsim: set p2p device interface support indication
authorAvraham Stern <avraham.stern@intel.com>
Fri, 15 Mar 2019 15:39:01 +0000 (17:39 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 26 Apr 2019 11:02:11 +0000 (13:02 +0200)
P2P device interface type was not indicated in the supported
interface types even when hwsim was configured with p2p device
support. Fix it.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c

index 4cc7b222859c9ecd6b6ebad64ee14f5607f1cc44..9df5b95c7390ee31bfe32fe670e35325cecd5b16 100644 (file)
@@ -3889,6 +3889,8 @@ static int __init init_mac80211_hwsim(void)
                param.p2p_device = support_p2p_device;
                param.use_chanctx = channels > 1;
                param.iftypes = HWSIM_IFTYPE_SUPPORT_MASK;
+               if (param.p2p_device)
+                       param.iftypes |= BIT(NL80211_IFTYPE_P2P_DEVICE);
 
                err = mac80211_hwsim_new_radio(NULL, &param);
                if (err < 0)