On 3/15/2019 4:39 PM, Luca Coelho wrote:
From: Avraham Stern <[email protected]>

P2P device interface type was not indicated in the supported
interface types even when hwsim was configured with p2p device
support. Fix it.

Just wondering. Doesn't this affect the hwsim-based tests in wpa_supp? Or is that the intent behind this patch.

Regards,
Arend

Signed-off-by: Avraham Stern <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
  drivers/net/wireless/mac80211_hwsim.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/mac80211_hwsim.c 
b/drivers/net/wireless/mac80211_hwsim.c
index 0838af04d681..d79f3ee2a741 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -3894,6 +3894,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)

Reply via email to