Hi Johannes, > Android requires a "p2p0" netdev to exist for P2P Device > functionality, and will even set it "UP" to start the P2P > Device functionality. > > This is a hack to provide it so not only is Android happy > but also the current version of wpa_supplicant can work > with P2P-Device functionality without needing changes to > support the P2P-Device commands, just a little bit to not > attempt to change the interface type to station. personally I still think this sends the wrong message. It should be a perfect fine patch to carry out-of-tree. I am worried that it just gets enabled everywhere and we have to deal with yet another netdev showing up on non-Android devices. I still remember the the stupid IrDA netdev crazy that was essentially also only there for turning some chips on/off. It is an extremely bad idea. My point is that if you can not send IP packets over it, it should not be a netdev in the first place. We need less fake netdev and not more. > Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> > --- > include/net/cfg80211.h | 4 ++ > net/wireless/Kconfig | 7 +++ > net/wireless/Makefile | 1 + > net/wireless/android.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++++ > net/wireless/core.c | 14 +++++ > net/wireless/core.h | 6 ++ > net/wireless/nl80211.c | 34 ++++++++++++ > 7 files changed, 212 insertions(+) > create mode 100644 net/wireless/android.c > > diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h > index 87f7e1d..6e312ef 100644 > --- a/include/net/cfg80211.h > +++ b/include/net/cfg80211.h > @@ -2924,6 +2924,10 @@ struct wireless_dev { > bool prev_bssid_valid; > } wext; > #endif > + > +#ifdef CONFIG_CFG80211_ANDROID_P2P_HACK > + struct net_device *p2pdev; > +#endif > }; > > static inline u8 *wdev_address(struct wireless_dev *wdev) > diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig > index 16d08b3..7c2981c 100644 > --- a/net/wireless/Kconfig > +++ b/net/wireless/Kconfig > @@ -139,6 +139,13 @@ config CFG80211_WEXT > Enable this option if you need old userspace for wireless > extensions with cfg80211-based drivers. > > +config CFG80211_ANDROID_P2P_HACK > + bool "Android P2P netdevice hack" > + depends on CFG80211 > + depends on !CFG80211_WEXT > + help > + Enable this option for Android P2P w/ P2P Device. > + This kernel option help section is useless. It needs a proper explanation what this patch is doing and big fat warning to NOT enable it if you have no clue what you are doing. Regards Marcel -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html