aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wifi_display.c
Commit message (Collapse)AuthorAgeFilesLines
* WFD: Allow WFD_SUBELEM_SET/GET all to be used with full IE bufferJouni Malinen2014-12-051-3/+32
| | | | | | | | | This extends the previously used WFD_SUBELEM_SET/GET <subelem id> design to allow special "all" value to be used as an id to indicate that all WFD subelements are to be set/get. This uses similar interface as was previously added over D-Bus. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Avoid unsigned vs. signed comparison warningJouni Malinen2014-10-261-1/+1
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* WFD: Use cleaner bounds checking for sub-element length fieldJouni Malinen2014-10-111-2/+2
| | | | | | | | Mark the variable as unsigned and make the length check use "len > end - pos" version to makes this easier to understand for static analyzers (CID 74155). Signed-off-by: Jouni Malinen <j@w1.fi>
* wifi_display: Add a utility function to set WFD subelements from IEsTomasz Bursztyka2014-09-281-0/+54
| | | | | | This will be useful to update the WFD subelements from DBus. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
* wifi_display: Add a utility function to get the sub-elements as IEsTomasz Bursztyka2014-09-281-0/+28
| | | | | | This will be useful for DBus API to expose current WFD configuration. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
* WFD: Explicit limit for subelement length (CID 68127)Jouni Malinen2014-07-021-0/+10
| | | | | | | | | | This adds an explicit limit for the maximum Wi-Fi Display subelement length for ASCII hexdump. This would not really be needed since the buffer is already limited by maximum frame length. Anyway, since this can make static analyzers happier and the subelement used with this function is short, we may as well include an explicit check. Signed-off-by: Jouni Malinen <j@w1.fi>
* P2P: Fix wfd_dev_info parsing for P2P-DEVICE-FOUND (CID 68127)Jouni Malinen2014-06-131-0/+2
| | | | | | | | | | | | | | Commit b125c48fce823f28d22ebd68297c5b94366c6aa1 ('P2P: Add wfd_dev_info= field for device found event') added Wi-Fi Display device info to the P2P-DEVICE-FOUND events. However, it did not include proper bounds checking in wifi_display_subelem_hex() and could accept subelements with invalid length field values. This could result in buffer read overflow of up to 64 kB and inclusion of heap memory in the local control interface event and/or process crash due to invalid memory access. Fix this by checking the validity of the length field before writing a hexdump of the data. Signed-off-by: Jouni Malinen <j@w1.fi>
* Handle Wi-Fi Display commands more carefully if P2P is disabledJouni Malinen2014-02-061-0/+3
| | | | | | | | | | | | If P2P was disabled (e.g., due to driver not supporting it or through p2p_disabled=1 configuration), setting Wi-Fi Display parameters could result in segmentation fault when the WFD IE is updated without the P2P module being initialized. Fix this by skipping the update if P2P module is not in use. In addition, show Wi-Fi Display as disabled in "GET wifi_display" and refuse to enable it with "SET wifi_display 1" if P2P is not enabled. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Add wfd_dev_info= field for device found eventDmitry Shmidt2013-12-081-0/+41
| | | | | | | This field allows adds enough information into the P2P-DEVICE-FOUND events to figure out if the peer supports Wi-Fi Display. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* WFD: Add Wi-Fi Display supportJouni Malinen2012-08-291-0/+251
This commit adds control interface commands and internal storage of Wi-Fi Display related configuration. In addition, WFD IE is now added to various P2P frames, Probe Request/Response, and (Re)Association Request/Response frames. WFD subelements from peers are stored in the P2P peer table. Following control interface commands are now available: SET wifi_display <0/1> GET wifi_display WFD_SUBELEM_SET <subelem> [hexdump of length+body] WFD_SUBELEM_GET <subelem> Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>