Search Linux Wireless

Re: [RFC v4] cfg80211: Android P2P-Device workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
> 
> 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 | 147 +++++++++++++++++++++++++++++++++++++++++++++++++
> net/wireless/core.c    |  14 +++++
> net/wireless/core.h    |   6 ++
> net/wireless/nl80211.c |  63 +++++++++++++++++++++
> 7 files changed, 242 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.
> +

can we get a proper help entry with a big fat warning on what this is for. So that nobody enables this by accident on a major distro without being warned.

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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux