summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c
AgeCommit message (Collapse)Author
2019-04-29iwlwifi: mvm: report FTM start time TSF when applicableAvraham Stern
When the interface that is requesting an FTM measurement is connected to a BSS, it is possible that the FTM request was originated by an RRM request from the AP. In this case the station needs to report the measurement start time in terms of the TSF of the AP. Since there is no indication in the FTM request itself if the TSF is needed, always report the TSF if the station is associated. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-04-19iwlwifi: mvm: support rtt confidence indicationAvraham Stern
The range response notification API has changed to add a value that indicates the confidence of the rtt result. Support the new API and print the rtt confidence for debug. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-03-07iwlwifi: fix 64-bit divisionArnd Bergmann
do_div() expects unsigned operands and otherwise triggers a warning like: drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:465:2: error: comparison of distinct pointer types ('typeof ((rtt_avg)) *' (aka 'long long *') and 'uint64_t *' (aka 'unsigned long long *')) [-Werror,-Wcompare-distinct-pointer-types] do_div(rtt_avg, 6666); ^~~~~~~~~~~~~~~~~~~~~ include/asm-generic/div64.h:222:28: note: expanded from macro 'do_div' (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ 1 error generated. Change the do_div() to the simpler div_s64() that can handle negative inputs correctly. Fixes: 937b10c0de68 ("iwlwifi: mvm: add debug prints for FTM") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-14iwlwifi: mvm: add debug prints for FTMAvraham Stern
Add debug prints for FTM results info. These prints are used by tests automation. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-02-14iwlwifi: mvm: add support for new FTM fw APIAvraham Stern
The FTM new API uses API TLV bit 15. The driver mistakenly uses this bit for beacon filter API, although no TLV was assigned for the beacon filter API. For now, make beacon filter use bit 16 instead (not set by the fw anyway). Once a TLV is assigned to the beacon filter API it should be updated. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-02-14iwlwifi: mvm: support FTM initiatorJohannes Berg
Add support for FTM initiator, i.e. peer measurements with FTM if the firmware supports FTM. Additionally, add two defines we depend on in include/linux/ieee80211.h. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>