aboutsummaryrefslogtreecommitdiffstats
path: root/src/fst
Commit message (Collapse)AuthorAgeFilesLines
* FST: Fix session setup failure with peer without MB IEDedy Lansky2016-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Upon receiving FST setup request on old band, the peer is searched on new band. The assumption is that MB IE from this peer on new band previously received either in assoc event or in FST setup request. There are cases in which above assumption doesn't work, peer is not found and session setup fails. For example: - STA connects over 11ac. Due to driver limitation, MB IE is not included in assoc event - STA connects over 11ad. MB IE included in assoc event. - FST session established on 11ac band, with AP as initiator. i.e. FST setup request sent in AP=>STA direction. STA searches for peer's (AP) MB IE on 11ad band which exists. - FST switch occur - FST session established on 11ad band, with STA as initiator. i.e. FST setup request sent in STA=>AP direction. AP searches for peer's (STA) MB IE on 11ac band which are absent. For fixing the above, consider also peers without MB IE as candidates in the search algorithm. Change-Id: I3db41951aeec860fef9a1abf9fe78fabef269999 Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Git-commit: cc1af6faed963a33809c6bcd4b590c44a64b0d96 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 987506
* FST: Enlarge State Transition Timeout (STT)Dedy Lansky2016-03-091-1/+2
| | | | | | | | | | | | | | STT guards the exchange of FST Action frames with the peer station. It was observed that sometimes Action frames sending is delayed at driver/FW layers for few hundreds millisec. Enlarge the STT to overcome such cases. Change-Id: I3ad7392cd725e2a26babd8dec83faae85e260739 Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Git-commit: 0147afa9dfb03ee9f97101dc29bee178990d52a2 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 987544
* FST: Make FST peer connection check more permissive in hostapdAnton Nayshtut2015-12-026-10/+16
| | | | | | | | | | | | | | | | | | | | Modify the FST peer connection check so it won't skip peers without MB IEs making it more permissive for peers that didn't provide MB IEs during association request. This can be helpful, e.g., in cases where a STA's interface connected before it was added to the FST group. This allows the AP to receive FST Action frames and initiate session with a STA via STA's interface that doesn't expose MB IEs The adjusted FST protocol is still safe, as it protects itself in many other ways (checking band info and it's accordance to the interfaces, Setup IDs, connection states of the interfaces involved, etc.) effectively avoiding all types of invalid situations. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: b47d05aa458ed7c7dfbfe09fc2a2af1f2fee7fc7 Git-repo : git://w1.fi/srv/git/hostap.git CRs-Fixed: 945518 Change-Id: Ie1a94890d55dcd7027947cedd4313eddebe3d487
* FST: Fix STA MB IEs creationAnton Nayshtut2015-12-021-26/+0
| | | | | | | | | | | FST STA should always expose its MB IEs regardless of its connection state and whether the connected AP is currently FST-enabled or not. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: f231b3d816aa9818432b06b65e71114613b68a91 Git-repo : git://w1.fi/srv/git/hostap.git CRs-Fixed: 945518 Change-Id: Ie505405ed91b34fca17a1a6fe56b2a20357d3d64
* FST: Mark fst_ies buffer constJouni Malinen2015-10-062-3/+3
| | | | | | | | | | | | This buffer is owned by the FST module, so mark it const in the set_ies() callback to make it clearer which component is responsible for modifying and freeing this. Change-Id: I85ba3b57a539f1eee9628b9d8f5691a03b58f1d1 Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: 84bcb4e7a97c758900abebce4382c81ed2b70b75 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Fix MB IE clearing on detachAnton Nayshtut2015-10-061-0/+1
| | | | | | | | | | | | | | This fixes an issue where freed MB IEs buffer memory could potentially have been accessed after an interface is detached from FST group. Without this fix, if an interface is detached from FST group, it can use MB IEs buffer previously set by fst_iface_set_ies(), although the buffer was released by fst_iface_delete(). Change-Id: Iaaf680c78c588e8692c6fae21920a10d8800585d Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: 5e09f24a344d5043703a8d93cf51d9369247172f Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Make fst_hw_mode_to_band() non-inline functionJouni Malinen2015-10-062-16/+18
| | | | | | | | | | | There is no need for using an inline function for this. Save a bit in binary size by using a normal function. Change-Id: I64795bf99d2980929cdad3540cadafd942b0a575 Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: 8f997f044f4d024cd2b775614da1b9fe13f43c38 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Fix get_peer_mbies interface fetching in multi-group caseJouni Malinen2015-10-061-2/+2
| | | | | | | | | | | | | The foreach_fst_group() loop needs "break-if-found", not "continue-if-not-found" to do the search iteration properly. If there were multiple groups, the previous design could have failed to find the interface. Change-Id: I6e6e8518fa2f6c552f6ace86cce328fc27382167 Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: f4843c26451b520351aa485e3bac608c8c1bf405 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Merge unreachable error case to another error returnJouni Malinen2015-10-061-4/+1
| | | | | | | | | | | | fst_read_next_text_param() is never called with buflen <= 1, so this separate error path is practically unreachable. Merge it with another error path to make this a bit more compact. Change-Id: Ibb3ebc00f49ec20e91503d43cdeabf8887566dd0 Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: 1ab51fb595232e630d530169237833c7be0763a3 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Use more robust interface-find for TEST_REQUESTJouni Malinen2015-10-061-7/+5
| | | | | | | | | | | | | | It is possible for there to be multiple FST groups, so the hardcoded mechanism of selecting the first one when sending out an event message may not be sufficient. Get the interface from the caller, if available, and if not, go through all groups in search of an interface to send the event on. Change-Id: I6e001d1032f05c113300615ec19d2b15d1fbb3fb Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: fa95b7c0739481e578b903260892b9bc212bddb2 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Use more robust interface-find for event messagesJouni Malinen2015-10-061-11/+12
| | | | | | | | | | | | | | It is possible for there to be multiple FST groups, so the hardcoded mechanism of selecting the first one when sending out an event message may not be sufficient. Get the interface from the caller, if available, and if not, go through all groups in search of an interface to send the event on. Change-Id: I6e5d4de239b17ec66e9fb58ed76fad3a36f31b0e Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: 481fa8fb22b6e34887767c79e34ea2fc019e40bc Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Remove unnecessary fst_attach() already attached checkJouni Malinen2015-10-061-21/+0
| | | | | | | | | | | Now that both hostapd and wpa_supplicant already enforce no duplicate fst_attach() calls, there is no need for this check within fst_attach(). Change-Id: I7e89fac9cd66de9770becd02c7dc9bbec5e79827 Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: 55cd405a44f69335e424ee248d1c4ac107b4ca74 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Fix dialog token wrap-aroundJouni Malinen2015-10-061-1/+1
| | | | | | | | | | | | | | Dialog token is only 8 bits and maintaining u32 version of it in struct fst_group resulted in incorrect wrap-around behavior in fst_group_assign_dialog_token(). It was possible to assign u8 dialog_token value 0 because of this. Fix this by using u8 variable consistently. Change-Id: I9aee5eeb57eed1a6d252446c84107bd1a88c1759 Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: fe73b469e8a614b7e04e17d2f3e8fd9d542191a2 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Validate STIE header in FST Setup Request/ResponseJouni Malinen2015-10-061-0/+12
| | | | | | | | | | | | While this is always supposed to be the first element, check that this is indeed the case instead of blindly using values from within the element. Change-Id: Ieb197007e186f6b963ff58e3b393320cfbfca88d Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: b0199552973eb349dbf9cad165484070a3b2434b Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Fix Session Transition element length field valueJouni Malinen2015-10-061-6/+8
| | | | | | | | | | | | The Element ID and Length subfields are not supposed to be included in the Length. In addition, both of these subfields needs to be filled in even for non-zero status code cases. Change-Id: I92ca6b25c7a4243ff88dbcabc000e23f6780d75f Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: e49f535dc518f7609fbbe5ecff9966ad271cf3f2 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Print reason for ignoring FST Action frame in debug logJouni Malinen2015-10-061-0/+4
| | | | | | | | | | This makes it easier to understand why some frames are not processed. Change-Id: I143eebc04e4ac8c4b107026c92ab3be051ee49a8 Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: 94edea89fd1c1deb176eaea9f29cbc4e3ee3ddda Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Fix FST-MANAGER TEST_REQUEST parsingJouni Malinen2015-10-061-0/+21
| | | | | | | | | | | | The space separator between the command and the parameter was not skipped properly and the first integer ended up being interpreted as 0 in all cases. Change-Id: I0978933f72854336c6f98e92cd6f273f11a65b90 Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: 9c68b6af971e82621734f495c1ba9af490a37d0e Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Remove unreachable code in fst_session_handle_tear_down()Jouni Malinen2015-10-061-5/+0
| | | | | | | | | | | | | | fst_session_is_in_progress() is already checked as part of fst_find_session_in_progress() before calling fst_session_handle_action(). This is the only call path that can reach fst_session_handle_tear_down() and as such, fst_session_is_in_progress() cannot return 0 here. Change-Id: Icaa4baea2b9ba0840586eeec96a281586b5ef0ad Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: c715d5c36cace1c86ef5077e970119fe2980760a Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Remove duplicated dl_list_empty() check befor dl_list_first()Jouni Malinen2015-10-062-11/+5
| | | | | | | | | | | dl_list_first() takes care of this already, so there is no need to do a separate check here. Change-Id: I5d576778e2135286631d7fb39aa4458f122615da Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: a55ebeac26fa265d784523847c4fd10501863512 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Use EINVAL more consistently as a negative return valueJouni Malinen2015-10-062-25/+22
| | | | | | | | | | | | There was a mix of EINVAL and -EINVAL returns through the FST implementation. Make this more consistent by always returning -EINVAL in error cases. Change-Id: If6e9ccb43698113471eab267a88df4016eafbf29 Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: 73664e09855f5d9402934a6dfac42d4c0c0a4c63 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Mark get_mb_ie() return value constJouni Malinen2015-10-065-21/+22
| | | | | | | | | | | The caller is not expected to free or modify the value since this is returning a reference to a buffer maintained by the upper layer. Change-Id: I72c1f148bd130ea0f8567952e11abd790916728c Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: a0f04da517a5af848331fd978c1200cea28b6a33 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Replace print_mb_ies() with wpa_snprintf_hex()Jouni Malinen2015-10-063-34/+7
| | | | | | | | | | | There is no need to add new functions with more or less identical functionality of an already available helper function. Change-Id: I807e518367235dfa9ca4520daeb9014a37c0fbd8 Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: 74619cc15048dbfc1d6a371fd4c00d767ea41d0b Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Mark format_session_state_extra() staticJouni Malinen2015-10-061-5/+2
| | | | | | | | | | This is not used outside fst_ctrl_iface.c. Change-Id: I486fdb4a257cfb7c2076a103b7e6442f9c9bfaf3 Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: c836aa267e31b9869256735d2b0409abe810190c Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Avoid using pointer to mgmt->u.action.u.fst_actionJouni Malinen2015-10-061-10/+15
| | | | | | | | | | | | | | | Typecasting &mgmt->u.action.u.fst_action to a struct pointer for various FST Action frame payloads seemed to be triggering static analyzer warnings about bounds checking since sizeof(mgmt->u.action.u.fst_action) == 1 even though that is really a variable length structure. Try to avoid this by calculating the pointer for the beginning of the frame instead of variable length struct. (CID 125642) Change-Id: I4cc2bb64832a94517aa98d764fad76a487a0255b Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: 6462e7387d558fa4a95e98e61d5d5cd35a2d7690 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Remove the IE header len/size macrosJouni Malinen2015-10-062-13/+10
| | | | | | | | | | | These are confusing when the style used with the couple of FST IE checks differs from the rest of hostapd/wpa_supplicant implementation. Change-Id: I2171c0b72e09f3da1e7303da877688f51e012911 Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: 9721b083f4836db1170d4e77cd0d982766d6e4b1 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Clean up fst_group_update_ie()Jouni Malinen2015-10-063-21/+14
| | | | | | | | | | | None of the callers passed in cleaning_up == TRUE, so drop that unused code path. Change-Id: I38b1180e5de26dc9c3ce71da5f9c8005a1e14e86 Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: f5f1cc93070bb91b3444191b20e13319135f0a9e Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Move fst_mbie_get_peer_addr() into fst_group.cJouni Malinen2015-10-062-21/+21
| | | | | | | | | | | There is no need for this function to be an inline function in a header file since it is used only within fst_group.c. Change-Id: I98aa9b5f735a721b6f86858762b21b23a4918467 Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: 2bb51eddad7d877566e42a17368f2767b3aab0a0 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Fix FST Action frame length validationJouni Malinen2015-10-061-7/+38
| | | | | | | | | | | | | | | Commit 717333f4e4d027c69e7c1241dc124ef7d59a6c85 ('FST: Add the Fast Session Transfer (FST) module') performed incorrect frame length validation for Setup Request (did not remove 24+1 header from consideration) and did not include payload validation for other FST Action frames. Fix these by explicitly verifying that the payload of these frames is sufficiently long before reading the values from there. Change-Id: I70b301490825acf16d33f95d7968b0199b9c0917 Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: be9fbd9b675d8ea1977677e029113514958be6e8 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Testing supportAnton Nayshtut2015-10-064-0/+369
| | | | | | | | | | This patch introduces infrastructure needed for FST module tests. Change-Id: I749c835ff7a193a3bb25fcaf133f5a8547655666 Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: a8dab08a2887cca4faeebf355b41ecc4f69264ba Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
* FST: Add the Fast Session Transfer (FST) moduleAnton Nayshtut2015-10-0616-0/+4009
Fast Session Transfer (FST) is the transfer of a session from a channel to another channel in a different frequency band. The term "session" refers to non-physical layer state information kept by a pair of stations (STAs) that communicate directly (i.e., excludes forwarding). The FST is implemented in accordance with IEEE Std 802.11ad-2012. Definitions * FST interface - an interface for which FST functionality is enabled * FST group - a bunch of FST interfaces representing single multi-band STA * FST peer - a multi-band capable STA connected * FST module - multi-band operation functionality implemented in accordance with IEEE Std 802.11ad-2012 (see 10.32 Multi-band operation) as a part of hostapd/wpa_supplicant * FST manager - an external application that implements custom FST related logic, using the FST module's interfaces accessible via CLI or D-Bus This commit introduces only the FST module. Integration of the FST module into the hostapd/wpa_supplicant and corresponding CLI/D-Bus interfaces and FST related tests are covered in separate commits. FST manager application is out of scope of these commits. As FST aggregates a few interfaces into FST group, the FST module uses global CLI for both commands and notifications. It also exposes alternative non-interface based D-Bus subtree for this purposes. Configuration and Initialization * FST functionality can enabled by compilation flag (CONFIG_FST) * hostapd/wpa_supplicant controlling multiple interfaces are used for FST * once enabled by compilation, the FST can be enabled for specific interfaces in the configuration files * FST interfaces are aggregated in FST groups (fst_group_id config file entry), where each FST group: - represents one multi-band device - should have two or more FST interfaces in it * priority (fst_priority config file entry) must be configured for each FST interface. FST interface with higher priority is the interface FST will always try to switch to. Thus, for example, for the maximal throughput, it should be the fastest FST interface in the FST setup. * default Link Loss Timeout (LLT) value can be configured for each FST interface (fst_llt config file entry). It represents LLT to be used by FST when this interface is active. * FST interfaces advertise the Multi-band capability by including the Multi-band element in the corresponding frames FST CLI commands: * fst list_groups - list FST groups configured. * fst list_ifaces - list FST interfaces which belong to specific group * fst iface_peers - list Multi-Band STAs connected to specific interface * fst list_sessions - list existing FST sessions * fst session_get - get FST session info * fst session_add - create FST session object * fst session_set - set FST session parameters (old_iface, new_iface, peer_addr, llt) * fst session_initiate - initiate FST setup * fst session_respond - respond to FST setup establishemnt attempt by counterpart * fst session_transfer - initiate FST switch * fst session_teardown - tear down FST Setup but leave the session object for reuse * fst session_remove - remove FST session object FST CLI notifications: * FST-EVENT-PEER - peer state changed (CONNECT/DISCONNECT) * FST-EVENT-SESSION - FST session level notification with following sub-events: - EVENT_FST_SESSION_STATE - FST session state changed - EVENT_FST_ESTABLISHED - previously initiated FST session became established - EVENT_FST_SETUP - new FST session object created due to FST session negotiation attempt by counterpart All the FST CLI commands and notifications are also implemented on D-Bus for wpa_supplicant. IEEE 802.11 standard compliance FST module implements FST setup statemachine in compliance with IEEE 802.11ad (P802.11-REVmc/D3.3), as it described in 10.32 Multi-band operation (see also Figure 10-34 - States of the FST setup protocol). Thus, for example, the FST module initiates FST switch automatically when FST setup becomes established with LLT=0 in accordance with 10.32.2.2 Transitioning between states. At the moment, FST module only supports non-transparent STA-based FST (see 10.32.1 General). Change-Id: Ifb8acd13818cd348022afeebf5aa644c4b9986fc Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: 717333f4e4d027c69e7c1241dc124ef7d59a6c85 Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455