summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-02-17wpa: parse p2p-addr for AP-STA-(DIS)CONNECTEDHEADmasterDavid Herrmann3-5/+31
We need both, the p2p-addr and the iface address so we can correctly match them against previous events. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-17wpa: parse peer_iface= for P2P-GO-NEG-SUCCESSDavid Herrmann3-5/+14
If we run as local GO, we need the p2p-addr *and* the iface-addr of the remote peer. Both are advertised in the GO-NEG-SUCCESS event so parse them. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-08wpa: reduce default timeout to 1sDavid Herrmann1-2/+2
Instead of waiting 10s for an answer, lets use 1s as default. wpa-supplicant sometimes performs blocking actions that *might* take a while. However, waiting 10s just screws the whole applications and is the wrong approach to fix that. wpa_supplicant needs to learn asynchronous transactions and deal with incoming requests in a timely manner. Therefore, set the default to 1s and be happy \o/ Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-08wpa: reduce DETACH timeout to 10msDavid Herrmann1-2/+5
There's really no need to wait for DETACH to complete. We do not only for compatibility and to make sure the message is actually transmitted. However, if wpa-supplicant is currently terminating, the message might be in the queue, but not processed. We thus don't get any ECONNREFUSED and wait for 10s for an answer.. That's just awful. Set it to 10ms for now as that seems to work just fine. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-08wpa: make sure wpa-ctrl stays around during dispatchDavid Herrmann1-0/+4
If we call into user-callbacks, we need to make sure that they do not free the wpa-object. We want to explicitly allow that so take a ref before calling any callback and drop it afterwards. We already check for !open so we bail out early if sth fails. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-08wpa: add CTRL-EVENT-TERMINATING parserDavid Herrmann3-0/+3
Parse the TERMINATING event that is sent by wpa-supplicant on shutdown. This way we can cleanly react to shutdowns instead of waiting for a PING-timeout/refused. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-06wpa: parse CTRL-EVENT-SCAN-STARTEDDavid Herrmann3-0/+3
This is a dummy event sent by wpa_supplicant once a beacon scan is started. It's highly annoying in logs. Add a parser so we can ignore it in binaries. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-06wpa: rename _COUNT to _CNTDavid Herrmann3-6/+7
We use _CNT all the time, so be consistent and rename the max-values. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-06wpa: zero-terminate all repliesDavid Herrmann1-2/+7
Require reply-bufs to be at least of size 2 and use the last byte as terminating zero at all times. This makes dealing with ugly WPA requests much simpler and safer. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-05wpa: use usual 10s timeout for DETACHDavid Herrmann1-7/+2
We really *have* to call DETACH in a synchronous fashion, otherwise wpa_supplicant is too stupid to notice it immediately. Yey! It doesn't hurt to let the FD linger, but that just causes weird wpa_supplicant warnings that we want to avoid. Hence, do a synchronous DETACH. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-05wpa: add P2P-DEVICE-LOST parserDavid Herrmann3-0/+39
Add parser for P2P-DEVICE-LOST events so we can react on it. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-05build: remove unused MEMTESTDavid Herrmann1-1/+0
This variable is not used, remove it. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-05build: fix package-number to 1David Herrmann1-1/+1
This is a copy-paste error, so lets fix it before we do the first release. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-05Add wfd_wpa_* APIDavid Herrmann7-2/+1673
As wpa_supplicant is the de-facto standard for wifi on linux, add a common API to deal with it. It's mostly copied from old openwfd so should be working fine. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-04Import libwfd from OpenWFDDavid Herrmann20-0/+4376
Initial import of most generic WFD stuff from OpenWFD. The libwfd library will be independent of any Miracast implementation so it can be shared across projects. It will not provide any fancy integration or policy, but only the most basic protocol parsers and handling. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>