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

Arend van Spriel arend
Thu May 23 13:27:50 PDT 2013


On 05/23/2013 10:12 PM, Johannes Berg wrote:
> On Wed, 2013-05-22 at 22:15 +0200, Arend van Spriel wrote:
>
>>> I'd assume I had that in my tests. I was using a wireless-testing.git
>>> snapshot. Anyway, whether I had that there or not does not matter since
>>> there is obviously at least one snapshot of the kernel where this breaks
>>> P2P completely at least for hwsim tests. I cannot apply such changes
>>> into hostap.git without protection that avoids regressions with any past
>>> kernel snapshot in the default configuration. It would be unfortunate if
>>> we have managed to push kernel changes in to claim support for this
>>> without it actually working. That would mean that there may be need for
>>> manual configuration to enable this in wpa_supplicant and/or a new
>>> capability bit in the kernel once things start working.
>>
>> The drivers are indicating whether P2P Device is supported. Our brcmfmac
>> driver had it set to 3.9 but it was removed as wpa_supplicant had no
>> support. Bit of a chicken-egg story. Also at least a number of issues in
>> cfg80211 and mac80211 has been found and fixed in 3.10-rc1, so wireless
>> drivers can start to consider announcing P2P Device support. A quick
>> grep in v3.9 shows iwlwifi and mac80211_hwsim are the only driver
>> reporting P2P Device support. That should only be true when cfg80211 and
>> mac80211 changes are also applied to 3.9 kernel and those will probably
>> not work because cfg80211 and mac80211 fixes are missing.
>
> Yes, this is a bit unfortunate. We can probably send a patch to 3.9
> stable to remove the P2P_DEVICE advertising. However, I'm not all that
> worried about hwsim, and iwlmvm unfortunately is looking like we won't
> be able to ship firmware that works with the driver in 3.9 given the
> recent firmware changes. As such, I think there aren't and won't be any
> real drivers that actually advertise P2P_DEVICE.
>
>> Hope we can make an effort to get wpa_supplicant provide P2P Device
>> support for 3.10+ kernels.
>
> The current wireless-testing should have all the required fixes, can
> somebody verify that?

I actually did and it is working with brcmfmac advertising P2P_DEVICE 
and I would like to keep it in for 3.10, but it does not make much sense 
if there is no user-space support (apart from iw).

I tried getting hwsim to work with P2P_DEVICE by removing 
'p2p_no_group_iface=1' from the configuration files. wpa_supplicant will 
create a P2P_GO interface but I get a failure when bringing the 
interface up (see attached log). Creating a P2P_GO using iw and bringing 
it up with ifconfig works fine.

Gr. AvS

-------------- next part --------------
1369339573.419211: wpa_supplicant v2.1-devel
1369339573.419269: random: Trying to read entropy from /dev/random
1369339573.419284: Successfully initialized wpa_supplicant
1369339573.419296: Initializing interface 'wlan0' conf '/home/arend/scm/hostap/tests/hwsim/p2p0.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
1369339573.419308: Configuration file '/home/arend/scm/hostap/tests/hwsim/p2p0.conf' -> '/home/arend/scm/hostap/tests/hwsim/p2p0.conf'
1369339573.419350: Reading configuration file '/home/arend/scm/hostap/tests/hwsim/p2p0.conf'
1369339573.419400: ctrl_interface='DIR=/var/run/wpa_supplicant GROUP=admin'
1369339573.419413: device_name='Device A'
1369339573.419943: rfkill: initial event: idx=31 type=1 op=0 soft=0 hard=0
1369339573.419956: rfkill: initial event: idx=32 type=1 op=0 soft=0 hard=0
1369339573.419965: rfkill: initial event: idx=33 type=1 op=0 soft=0 hard=0
1369339573.419974: rfkill: initial event: idx=34 type=1 op=0 soft=0 hard=0
1369339573.419983: rfkill: initial event: idx=35 type=1 op=0 soft=0 hard=0
1369339573.420138: nl80211: TDLS supported
1369339573.420149: nl80211: TDLS external setup
1369339573.420178: nl80211: Using driver-based off-channel TX
1369339573.420203: nl80211: Use separate P2P group interface (driver advertised support)
1369339573.420218: nl80211: Set mode ifindex 60 iftype 2 (STATION)
1369339573.420252: nl80211: Subscribe to mgmt frames with non-AP handle 0x1cbd7a0
1369339573.420265: nl80211: Register frame type=0xd0 nl_handle=0x1cbd7a0
1369339573.420275: nl80211: Register frame match - hexdump(len=2): 04 0a
1369339573.420297: nl80211: Register frame type=0xd0 nl_handle=0x1cbd7a0
1369339573.420308: nl80211: Register frame match - hexdump(len=2): 04 0b
1369339573.420327: nl80211: Register frame type=0xd0 nl_handle=0x1cbd7a0
1369339573.420337: nl80211: Register frame match - hexdump(len=2): 04 0c
1369339573.420395: nl80211: Register frame type=0xd0 nl_handle=0x1cbd7a0
1369339573.420406: nl80211: Register frame match - hexdump(len=2): 04 0d
1369339573.420427: nl80211: Register frame type=0xd0 nl_handle=0x1cbd7a0
1369339573.420437: nl80211: Register frame match - hexdump(len=6): 04 09 50 6f 9a 09
1369339573.420459: nl80211: Register frame type=0xd0 nl_handle=0x1cbd7a0
1369339573.420469: nl80211: Register frame match - hexdump(len=5): 7f 50 6f 9a 09
1369339573.420491: nl80211: Register frame type=0xd0 nl_handle=0x1cbd7a0
1369339573.420504: nl80211: Register frame match - hexdump(len=1): 06
1369339573.420523: nl80211: Register frame type=0xd0 nl_handle=0x1cbd7a0
1369339573.420532: nl80211: Register frame match - hexdump(len=2): 0a 07
1369339573.420549: nl80211: Register frame type=0xd0 nl_handle=0x1cbd7a0
1369339573.420557: nl80211: Register frame match - hexdump(len=2): 0a 11
1369339573.427852: netlink: Operstate: linkmode=1, operstate=5
1369339573.428120: nl80211: interface wlan0 in phy phy27
1369339573.428141: nl80211: driver param='(null)'
1369339573.428313: nl80211: Regulatory information - country=00
1369339573.428324: nl80211: 2402-2472 @ 40 MHz
1369339573.428334: nl80211: 2457-2482 @ 20 MHz
1369339573.428343: nl80211: 2474-2494 @ 20 MHz
1369339573.428351: nl80211: 5170-5250 @ 40 MHz
1369339573.428360: nl80211: 5735-5835 @ 40 MHz
1369339573.428378: nl80211: Added 802.11b mode based on 802.11g information
1369339573.436945: wlan0: Own MAC address: 02:00:00:00:00:00
1369339573.436986: wpa_driver_nl80211_set_key: ifindex=60 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
1369339573.437034: wpa_driver_nl80211_set_key: ifindex=60 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
1369339573.437059: wpa_driver_nl80211_set_key: ifindex=60 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
1369339573.437083: wpa_driver_nl80211_set_key: ifindex=60 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
1369339573.437104: wlan0: RSN: flushing PMKID list in the driver
1369339573.437116: nl80211: Flush PMKIDs
1369339573.437144: wlan0: State: DISCONNECTED -> INACTIVE
1369339573.437404: WPS: Set UUID for interface wlan0
1369339573.437468: WPS: UUID based on MAC address - hexdump(len=16): 36 2d b4 7b a5 3a 51 91 88 fb 54 58 b9 86 b2 e4
1369339573.439225: EAPOL: SUPP_PAE entering state DISCONNECTED
1369339573.439238: EAPOL: Supplicant port status: Unauthorized
1369339573.439285: EAPOL: KEY_RX entering state NO_KEY_RECEIVE
1369339573.439295: EAPOL: SUPP_BE entering state INITIALIZE
1369339573.439307: EAP: EAP entering state DISABLED
1369339573.439344: EAPOL: Supplicant port status: Unauthorized
1369339573.439373: EAPOL: Supplicant port status: Unauthorized
1369339573.439732: ctrl_interface_group=1004 (from group name 'admin')
1369339573.439790: wlan0: Added interface wlan0
1369339573.439801: wlan0: State: INACTIVE -> DISCONNECTED
1369339573.439810: wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
1369339573.439819: netlink: Operstate: linkmode=-1, operstate=5
1369339573.439868: nl80211: Create interface iftype 10 (P2P_DEVICE)
1369339573.439938: nl80211: New P2P Device interface p2p-dev-wlan0 (0x1b00000002) created
1369339573.439952: Initializing interface 'p2p-dev-wlan0' conf '/home/arend/scm/hostap/tests/hwsim/p2p0.conf' driver 'nl80211' ctrl_interface 'DIR=/var/run/wpa_supplicant GROUP=admin' bridge 'N/A'
1369339573.439962: Configuration file '/home/arend/scm/hostap/tests/hwsim/p2p0.conf' -> '/home/arend/scm/hostap/tests/hwsim/p2p0.conf'
1369339573.439972: Reading configuration file '/home/arend/scm/hostap/tests/hwsim/p2p0.conf'
1369339573.440000: ctrl_interface='DIR=/var/run/wpa_supplicant GROUP=admin'
1369339573.440011: device_name='Device A'
1369339573.440042: rfkill: initial event: idx=31 type=1 op=0 soft=0 hard=0
1369339573.440053: rfkill: initial event: idx=32 type=1 op=0 soft=0 hard=0
1369339573.440063: rfkill: initial event: idx=33 type=1 op=0 soft=0 hard=0
1369339573.440071: rfkill: initial event: idx=34 type=1 op=0 soft=0 hard=0
1369339573.440081: rfkill: initial event: idx=35 type=1 op=0 soft=0 hard=0
1369339573.451990: nl80211: TDLS supported
1369339573.452003: nl80211: TDLS external setup
1369339573.452034: nl80211: Using driver-based off-channel TX
1369339573.452050: nl80211: Use separate P2P group interface (driver advertised support)
1369339573.452072: nl80211: Set mode ifindex 0 iftype 10 (P2P_DEVICE)
1369339573.452098: nl80211: Failed to set interface 0 to mode 10: -22 (Invalid argument)
1369339573.452132: nl80211: Subscribe to mgmt frames with non-AP handle 0x1cdd1c0
1369339573.452143: nl80211: Register frame type=0xd0 nl_handle=0x1cdd1c0
1369339573.452152: nl80211: Register frame match - hexdump(len=2): 04 0a
1369339573.452171: nl80211: Register frame type=0xd0 nl_handle=0x1cdd1c0
1369339573.452182: nl80211: Register frame match - hexdump(len=2): 04 0b
1369339573.452198: nl80211: Register frame type=0xd0 nl_handle=0x1cdd1c0
1369339573.452207: nl80211: Register frame match - hexdump(len=2): 04 0c
1369339573.452223: nl80211: Register frame type=0xd0 nl_handle=0x1cdd1c0
1369339573.452232: nl80211: Register frame match - hexdump(len=2): 04 0d
1369339573.452248: nl80211: Register frame type=0xd0 nl_handle=0x1cdd1c0
1369339573.452257: nl80211: Register frame match - hexdump(len=6): 04 09 50 6f 9a 09
1369339573.452273: nl80211: Register frame type=0xd0 nl_handle=0x1cdd1c0
1369339573.452282: nl80211: Register frame match - hexdump(len=5): 7f 50 6f 9a 09
1369339573.452298: nl80211: Register frame type=0xd0 nl_handle=0x1cdd1c0
1369339573.452307: nl80211: Register frame match - hexdump(len=1): 06
1369339573.452323: nl80211: Register frame type=0xd0 nl_handle=0x1cdd1c0
1369339573.452332: nl80211: Register frame match - hexdump(len=2): 0a 07
1369339573.452348: nl80211: Register frame type=0xd0 nl_handle=0x1cdd1c0
1369339573.452357: nl80211: Register frame match - hexdump(len=2): 0a 11
1369339573.452403: nl80211: Start P2P Device p2p-dev-wlan0 (0x1b00000002): Success
1369339573.452457: nl80211: interface p2p-dev-wlan0 in phy phy27
1369339573.452475: nl80211: driver param='(null)'
1369339573.452511: nl80211: Regulatory information - country=00
1369339573.452521: nl80211: 2402-2472 @ 40 MHz
1369339573.452530: nl80211: 2457-2482 @ 20 MHz
1369339573.452539: nl80211: 2474-2494 @ 20 MHz
1369339573.452574: nl80211: 5170-5250 @ 40 MHz
1369339573.452583: nl80211: 5735-5835 @ 40 MHz
1369339573.452601: p2p-dev-wlan0: Own MAC address: 42:00:00:00:00:00
1369339573.452613: p2p-dev-wlan0: RSN: flushing PMKID list in the driver
1369339573.452622: nl80211: Flush PMKIDs
1369339573.456426: p2p-dev-wlan0: State: DISCONNECTED -> INACTIVE
1369339573.456439: WPS: Set UUID for interface p2p-dev-wlan0
1369339573.456448: WPS: UUID from the first interface - hexdump(len=16): 36 2d b4 7b a5 3a 51 91 88 fb 54 58 b9 86 b2 e4
1369339573.456553: EAPOL: SUPP_PAE entering state DISCONNECTED
1369339573.456562: EAPOL: Supplicant port status: Unauthorized
1369339573.460698: EAPOL: KEY_RX entering state NO_KEY_RECEIVE
1369339573.460709: EAPOL: SUPP_BE entering state INITIALIZE
1369339573.460837: EAP: EAP entering state DISABLED
1369339573.460857: EAPOL: Supplicant port status: Unauthorized
1369339573.464124: EAPOL: Supplicant port status: Unauthorized
1369339573.467939: Using existing control interface directory.
1369339573.467982: ctrl_interface_group=1004 (from group name 'admin')
1369339573.468368: P2P: Own listen channel: 6
1369339573.468791: P2P: Random operating channel: 81:6
1369339573.468813: P2P: Driver did not support fetching of all supported channels; assume dualband support
1369339573.468823: P2P: Enable operating classes for 2.4 GHz band
1369339573.468831: P2P: Enable operating classes for lower 5 GHz band
1369339573.468839: P2P: Enable operating classes for higher 5 GHz band
1369339573.469239: p2p-dev-wlan0: Added interface p2p-dev-wlan0
1369339573.469252: p2p-dev-wlan0: State: INACTIVE -> DISCONNECTED
1369339573.469262: wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
1369339573.469272: netlink: Operstate: linkmode=-1, operstate=5
1369339573.469360: RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
1369339573.469375: RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
1369339573.469646: nl80211: if_removed already cleared - ignore event
1369339573.469662: RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
1369339573.469673: RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
1369339573.469691: nl80211: if_removed already cleared - ignore event
1369339573.469705: nl80211: Ignore event for foreign ifindex 62
1369339573.469719: nl80211: Ignore event for foreign ifindex 62
1369339573.469734: nl80211: Ignore event for foreign ifindex 61
1369339573.469745: nl80211: Ignore event for foreign ifindex 61
1369339574.426777: nl80211: Ignore event for foreign ifindex 62
1369339574.426826: nl80211: Ignore event for foreign ifindex 61
1369339574.442529: EAPOL: disable timer tick
1369339574.442781: EAPOL: Supplicant port status: Unauthorized
1369339574.468073: EAPOL: disable timer tick
1369339574.468097: EAPOL: Supplicant port status: Unauthorized
1369339578.611719: CTRL_IFACE monitor attached - hexdump(len=21): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 34 37 37 30 2d 32 00
1369339578.612471: RX ctrl_iface - hexdump_ascii(len=22):
     42 53 53 20 52 41 4e 47 45 3d 41 4c 4c 20 4d 41   BSS RANGE=ALL MA
     53 4b 3d 30 78 32                                 SK=0x2          
1369339578.612534: wlan0: Control interface command 'BSS RANGE=ALL MASK=0x2'
1369339581.419046: random: Cannot read from /dev/random: Resource temporarily unavailable
1369339584.045174: random: Cannot read from /dev/random: Resource temporarily unavailable
1369339584.049787: RX ctrl_iface - hexdump_ascii(len=13):
     50 32 50 5f 47 52 4f 55 50 5f 41 44 44            P2P_GROUP_ADD   
1369339584.049874: wlan0: Control interface command 'P2P_GROUP_ADD'
1369339584.049912: P2P: Stop any on-going P2P FIND
1369339584.050184: P2P: Stopping find
1369339584.050217: P2P: Clear timeout (state=IDLE)
1369339584.050242: P2P: State IDLE -> IDLE
1369339584.050298: P2P: Set GO freq 2412 MHz (no preference known)
1369339584.050321: nl80211: Get shared freq for PHY phy27
1369339584.050343: nl80211: No shared interface for PHY (phy27) in associated state
1369339584.052443: P2P: Create a new interface p2p-wlan0-0 for the group
1369339584.052466: nl80211: Create interface iftype 9 (P2P_GO)
1369339584.054219: nl80211: New interface p2p-wlan0-0 created: ifindex=66
1369339584.054391: nl80211: Set TX rates failed: ret=-100 (Network is down)
1369339584.054480: nl80211: Allocate new address for P2P group interface
1369339584.054503: nl80211: Assigned new P2P Interface Address 06:00:00:00:00:00
1369339584.054881: P2P: Created pending virtual interface p2p-wlan0-0 addr 06:00:00:00:00:00
1369339584.054954: Initializing interface 'p2p-wlan0-0' conf 'N/A' driver 'nl80211' ctrl_interface 'DIR=/var/run/wpa_supplicant GROUP=admin' bridge 'N/A'
1369339584.059030: rfkill: initial event: idx=31 type=1 op=0 soft=0 hard=0
1369339584.059056: rfkill: initial event: idx=32 type=1 op=0 soft=0 hard=0
1369339584.059079: rfkill: initial event: idx=33 type=1 op=0 soft=0 hard=0
1369339584.059103: rfkill: initial event: idx=34 type=1 op=0 soft=0 hard=0
1369339584.059126: rfkill: initial event: idx=35 type=1 op=0 soft=0 hard=0
1369339584.059468: nl80211: TDLS supported
1369339584.059547: nl80211: TDLS external setup
1369339584.059620: nl80211: Using driver-based off-channel TX
1369339584.059659: nl80211: Use separate P2P group interface (driver advertised support)
1369339584.060049: nl80211: Set mode ifindex 66 iftype 9 (P2P_GO)
1369339584.060109: nl80211: Set TX rates failed: ret=-100 (Network is down)
1369339584.060130: nl80211: Setup AP - device_ap_sme=0 use_monitor=0
1369339584.060169: nl80211: Subscribe to mgmt frames with AP handle 0x1ce0d80
1369339584.060191: nl80211: Register frame type=0xb0 nl_handle=0x1ce0d80
1369339584.060210: nl80211: Register frame match - hexdump(len=0): [NULL]
1369339584.060249: nl80211: Register frame type=0x0 nl_handle=0x1ce0d80
1369339584.060268: nl80211: Register frame match - hexdump(len=0): [NULL]
1369339584.060304: nl80211: Register frame type=0x20 nl_handle=0x1ce0d80
1369339584.060323: nl80211: Register frame match - hexdump(len=0): [NULL]
1369339584.060358: nl80211: Register frame type=0xa0 nl_handle=0x1ce0d80
1369339584.060377: nl80211: Register frame match - hexdump(len=0): [NULL]
1369339584.060471: nl80211: Register frame type=0xc0 nl_handle=0x1ce0d80
1369339584.060491: nl80211: Register frame match - hexdump(len=0): [NULL]
1369339584.060526: nl80211: Register frame type=0xd0 nl_handle=0x1ce0d80
1369339584.060545: nl80211: Register frame match - hexdump(len=0): [NULL]
1369339584.060580: nl80211: Register frame type=0x40 nl_handle=0x1ce0d80
1369339584.060599: nl80211: Register frame match - hexdump(len=0): [NULL]
1369339584.061679: Could not set interface p2p-wlan0-0 flags (UP): Device or resource busy
1369339584.061701: nl80211: Could not set interface 'p2p-wlan0-0' UP
1369339584.061747: netlink: Operstate: linkmode=0, operstate=6
1369339584.061819: nl80211: Set mode ifindex 66 iftype 2 (STATION)
1369339584.082746: nl80211: Unsubscribe mgmt frames handle 0x1ce0d80 (AP teardown)
1369339584.082969: p2p-wlan0-0: Failed to initialize driver interface
1369339584.082992: Failed to add interface p2p-wlan0-0
1369339584.083073: p2p-wlan0-0: Cancelling scan request
1369339584.083096: p2p-wlan0-0: P2P: Station mode scan operation not pending anymore (sta_scan_pending=0 p2p_cb_on_scan_complete=0)
1369339584.083118: p2p-wlan0-0: Cancelling authentication timeout
1369339584.083153: P2P: Failed to create new wpa_supplicant interface
1369339584.083176: P2P: Failed to initialize group interface
1369339584.083198: CTRL_IFACE monitor send - hexdump(len=21): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 34 37 37 30 2d 32 00
1369339584.083265: P2P: Removing pending group interface p2p-wlan0-0
1369339584.083321: nl80211: wpa_driver_nl80211_if_remove(type=3 ifname=p2p-wlan0-0) ifindex=66
1369339584.083738: nl80211: Remove interface ifindex=66
1369339584.218809: nl80211: Ignore event for foreign ifindex 66
1369339584.218853: nl80211: Ignore event for foreign ifindex 66
1369339584.218874: nl80211: Ignore dellink event for foreign ifindex 66
1369339588.667413: CTRL_IFACE monitor detached - hexdump(len=21): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 34 37 37 30 2d 32 00
1369339591.639442: random: G



More information about the Hostap mailing list