[PATCH 00/20] wpa_s: p2p: support nl80211 P2P_DEVICE interface

Arend van Spriel arend
Fri May 24 01:15:03 PDT 2013


On 05/24/2013 10:10 AM, Johannes Berg wrote:
> On Fri, 2013-05-24 at 10:05 +0200, Arend van Spriel wrote:
>
>>>   From the log it seems you get -EBUSY, which is a bit odd. Are you sure
>>> your advertised interface combinations support what you were doing?
>>
>> This log was testing with mac80211_hwsim, which has the following:
>
> Oh. I thought it was brcmfmac. With hwsim there shouldn't be an issue.
>
>> static const struct ieee80211_iface_limit hwsim_if_limits[] = {
>> 	{ .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) },
>> 	{ .max = 2048,  .types = BIT(NL80211_IFTYPE_STATION) |
>> 				 BIT(NL80211_IFTYPE_P2P_CLIENT) |
>> #ifdef CONFIG_MAC80211_MESH
>> 				 BIT(NL80211_IFTYPE_MESH_POINT) |
>> #endif
>> 				 BIT(NL80211_IFTYPE_AP) |
>> 				 BIT(NL80211_IFTYPE_P2P_GO) },
>> 	{ .max = 1, .types = BIT(NL80211_IFTYPE_P2P_DEVICE) },
>> };
>>
>> static struct ieee80211_iface_combination hwsim_if_comb = {
>> 	.limits = hwsim_if_limits,
>> 	.n_limits = ARRAY_SIZE(hwsim_if_limits),
>> 	.max_interfaces = 2048,
>> 	.num_different_channels = 1,
>> };
>>
>> Crap. num_different_channels should probably be 2 here, right?
>
> No, P2P_DEVICE doesn't use up a channel (in hwsim.) And setting an
> interface UP won't consume and require a channel anyway.

The situation is this:
1. load hwsim -> wlan0 down.
2. start wpa_supplicant -> wlan0 up, p2p-dev-wlan0 started.
3. do P2P_GROUP_ADD in wpa_cli -> p2p-wlan0-0 created.

So the -EBUSY is coming because wlan0 is UP as already.

Gr. AvS




More information about the Hostap mailing list