[RFC] nl80211: allow Android P2P functionality
Johannes Berg
johannes
Thu May 16 00:42:46 PDT 2013
Hi,
> Seems device is created success
> p2p0 DOWN 0.0.0.0/0 0x00001002
> 00:0a:62:27:26:4d
> wlan0 DOWN 0.0.0.0/0 0x00001002
> 00:0a:62:27:26:4c
Looks like.
> D/wpa_supplicant( 2431): nl80211: RFKILL status not available
> D/wpa_supplicant( 2431): nl80211: Set mode ifindex 23 iftype 2 (STATION)
> D/wpa_supplicant( 2431): nl80211: Failed to set interface 23 to mode
> 2: -22 (Invalid argument)
That seems like you didn't patch the supplicant with this patch? With
this patch it won't try to set to mode 2 (station). Or is 23 the 'wlan0'
interface? I doubt it though, it's in station mode and should be ok.
> And the reason the the wpa_supplicant get the "failed to set
> interface" is because the code run into nl80211.c
>
> #ifdef CPTCFG_CFG80211_ANDROID_P2P_HACK
> if (otype == NL80211_IFTYPE_P2P_DEVICE) {
> if (ntype == NL80211_IFTYPE_P2P_DEVICE)
> return 0;
> return -EINVAL;
> }
> #endif
Yes it's not supposed to change the iftype here.
> BTW the wlan0 will always keep in DOWN status after the p2p0 device
> UP, and it will show
> root at android:/data/misc/wifi # netcfg wlan0 up
> netcfg wlan0 up
> action 'up' failed (Device or resource busy)
>
> Seems the p2p0 and wlan0 can not be UP at the same time? I though
> there are both virtual interface and can work in different mode at the
> same time. anything I miss?
That depends on your driver.
johannes
More information about the Hostap
mailing list