diff options
author | Pedersen, Thomas <twp@qca.qualcomm.com> | 2016-09-28 19:56:30 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2016-11-23 08:54:17 -0500 |
commit | f6f64cfb966d95a5d1e68d6bd3b74b2938ee18cd (patch) | |
tree | e053fbc13c5bff8f685e01d977b12ea81f62b29d /drivers/net/wireless | |
parent | 973324fff154beb51711136d5d242df7f328f708 (diff) |
ath10k: remove set/get_tsf ieee80211_ops
Neither of these did the right thing:
- get_tsf just returned 0
- set_tsf assumed a simple offset was applied against
get_tsf(), which works, except in the case of
calculating TSF from rx_mactime (actual TSF).
Just remove them for now. We can reimplement set_tsf in
terms of TSF increment/decrement in the future if get_tsf
is ever supported by FW.
Signed-off-by: Thomas Pedersen <twp@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 38 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi-tlv.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi.h | 1 |
4 files changed, 0 insertions, 44 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 7ab74a1b45dc..3918097ee46f 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
@@ -6976,42 +6976,6 @@ static void ath10k_sta_rc_update(struct ieee80211_hw *hw, | |||
6976 | ieee80211_queue_work(hw, &arsta->update_wk); | 6976 | ieee80211_queue_work(hw, &arsta->update_wk); |
6977 | } | 6977 | } |
6978 | 6978 | ||
6979 | static u64 ath10k_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | ||
6980 | { | ||
6981 | /* | ||
6982 | * FIXME: Return 0 for time being. Need to figure out whether FW | ||
6983 | * has the API to fetch 64-bit local TSF | ||
6984 | */ | ||
6985 | |||
6986 | return 0; | ||
6987 | } | ||
6988 | |||
6989 | static void ath10k_set_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | ||
6990 | u64 tsf) | ||
6991 | { | ||
6992 | struct ath10k *ar = hw->priv; | ||
6993 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); | ||
6994 | u32 tsf_offset, vdev_param = ar->wmi.vdev_param->set_tsf; | ||
6995 | int ret; | ||
6996 | |||
6997 | /* Workaround: | ||
6998 | * | ||
6999 | * Given tsf argument is entire TSF value, but firmware accepts | ||
7000 | * only TSF offset to current TSF. | ||
7001 | * | ||
7002 | * get_tsf function is used to get offset value, however since | ||
7003 | * ath10k_get_tsf is not implemented properly, it will return 0 always. | ||
7004 | * Luckily all the caller functions to set_tsf, as of now, also rely on | ||
7005 | * get_tsf function to get entire tsf value such get_tsf() + tsf_delta, | ||
7006 | * final tsf offset value to firmware will be arithmetically correct. | ||
7007 | */ | ||
7008 | tsf_offset = tsf - ath10k_get_tsf(hw, vif); | ||
7009 | ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, | ||
7010 | vdev_param, tsf_offset); | ||
7011 | if (ret && ret != -EOPNOTSUPP) | ||
7012 | ath10k_warn(ar, "failed to set tsf offset: %d\n", ret); | ||
7013 | } | ||
7014 | |||
7015 | static void ath10k_offset_tsf(struct ieee80211_hw *hw, | 6979 | static void ath10k_offset_tsf(struct ieee80211_hw *hw, |
7016 | struct ieee80211_vif *vif, s64 tsf_offset) | 6980 | struct ieee80211_vif *vif, s64 tsf_offset) |
7017 | { | 6981 | { |
@@ -7498,8 +7462,6 @@ static const struct ieee80211_ops ath10k_ops = { | |||
7498 | .get_survey = ath10k_get_survey, | 7462 | .get_survey = ath10k_get_survey, |
7499 | .set_bitrate_mask = ath10k_mac_op_set_bitrate_mask, | 7463 | .set_bitrate_mask = ath10k_mac_op_set_bitrate_mask, |
7500 | .sta_rc_update = ath10k_sta_rc_update, | 7464 | .sta_rc_update = ath10k_sta_rc_update, |
7501 | .get_tsf = ath10k_get_tsf, | ||
7502 | .set_tsf = ath10k_set_tsf, | ||
7503 | .offset_tsf = ath10k_offset_tsf, | 7465 | .offset_tsf = ath10k_offset_tsf, |
7504 | .ampdu_action = ath10k_ampdu_action, | 7466 | .ampdu_action = ath10k_ampdu_action, |
7505 | .get_et_sset_count = ath10k_debug_get_et_sset_count, | 7467 | .get_et_sset_count = ath10k_debug_get_et_sset_count, |
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index e64f59300a7c..5e399c67de3a 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c | |||
@@ -3464,7 +3464,6 @@ static struct wmi_vdev_param_map wmi_tlv_vdev_param_map = { | |||
3464 | .meru_vc = WMI_VDEV_PARAM_UNSUPPORTED, | 3464 | .meru_vc = WMI_VDEV_PARAM_UNSUPPORTED, |
3465 | .rx_decap_type = WMI_VDEV_PARAM_UNSUPPORTED, | 3465 | .rx_decap_type = WMI_VDEV_PARAM_UNSUPPORTED, |
3466 | .bw_nss_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, | 3466 | .bw_nss_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, |
3467 | .set_tsf = WMI_VDEV_PARAM_UNSUPPORTED, | ||
3468 | }; | 3467 | }; |
3469 | 3468 | ||
3470 | static const struct wmi_ops wmi_tlv_ops = { | 3469 | static const struct wmi_ops wmi_tlv_ops = { |
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index bc896137798c..95be2ba311fc 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c | |||
@@ -785,7 +785,6 @@ static struct wmi_vdev_param_map wmi_vdev_param_map = { | |||
785 | .meru_vc = WMI_VDEV_PARAM_UNSUPPORTED, | 785 | .meru_vc = WMI_VDEV_PARAM_UNSUPPORTED, |
786 | .rx_decap_type = WMI_VDEV_PARAM_UNSUPPORTED, | 786 | .rx_decap_type = WMI_VDEV_PARAM_UNSUPPORTED, |
787 | .bw_nss_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, | 787 | .bw_nss_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, |
788 | .set_tsf = WMI_VDEV_PARAM_UNSUPPORTED, | ||
789 | }; | 788 | }; |
790 | 789 | ||
791 | /* 10.X WMI VDEV param map */ | 790 | /* 10.X WMI VDEV param map */ |
@@ -861,7 +860,6 @@ static struct wmi_vdev_param_map wmi_10x_vdev_param_map = { | |||
861 | .meru_vc = WMI_VDEV_PARAM_UNSUPPORTED, | 860 | .meru_vc = WMI_VDEV_PARAM_UNSUPPORTED, |
862 | .rx_decap_type = WMI_VDEV_PARAM_UNSUPPORTED, | 861 | .rx_decap_type = WMI_VDEV_PARAM_UNSUPPORTED, |
863 | .bw_nss_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, | 862 | .bw_nss_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, |
864 | .set_tsf = WMI_VDEV_PARAM_UNSUPPORTED, | ||
865 | }; | 863 | }; |
866 | 864 | ||
867 | static struct wmi_vdev_param_map wmi_10_2_4_vdev_param_map = { | 865 | static struct wmi_vdev_param_map wmi_10_2_4_vdev_param_map = { |
@@ -936,7 +934,6 @@ static struct wmi_vdev_param_map wmi_10_2_4_vdev_param_map = { | |||
936 | .meru_vc = WMI_VDEV_PARAM_UNSUPPORTED, | 934 | .meru_vc = WMI_VDEV_PARAM_UNSUPPORTED, |
937 | .rx_decap_type = WMI_VDEV_PARAM_UNSUPPORTED, | 935 | .rx_decap_type = WMI_VDEV_PARAM_UNSUPPORTED, |
938 | .bw_nss_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, | 936 | .bw_nss_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, |
939 | .set_tsf = WMI_10X_VDEV_PARAM_TSF_INCREMENT, | ||
940 | }; | 937 | }; |
941 | 938 | ||
942 | static struct wmi_vdev_param_map wmi_10_4_vdev_param_map = { | 939 | static struct wmi_vdev_param_map wmi_10_4_vdev_param_map = { |
@@ -1012,7 +1009,6 @@ static struct wmi_vdev_param_map wmi_10_4_vdev_param_map = { | |||
1012 | .meru_vc = WMI_10_4_VDEV_PARAM_MERU_VC, | 1009 | .meru_vc = WMI_10_4_VDEV_PARAM_MERU_VC, |
1013 | .rx_decap_type = WMI_10_4_VDEV_PARAM_RX_DECAP_TYPE, | 1010 | .rx_decap_type = WMI_10_4_VDEV_PARAM_RX_DECAP_TYPE, |
1014 | .bw_nss_ratemask = WMI_10_4_VDEV_PARAM_BW_NSS_RATEMASK, | 1011 | .bw_nss_ratemask = WMI_10_4_VDEV_PARAM_BW_NSS_RATEMASK, |
1015 | .set_tsf = WMI_10_4_VDEV_PARAM_TSF_INCREMENT, | ||
1016 | .inc_tsf = WMI_10_4_VDEV_PARAM_TSF_INCREMENT, | 1012 | .inc_tsf = WMI_10_4_VDEV_PARAM_TSF_INCREMENT, |
1017 | .dec_tsf = WMI_10_4_VDEV_PARAM_TSF_DECREMENT, | 1013 | .dec_tsf = WMI_10_4_VDEV_PARAM_TSF_DECREMENT, |
1018 | }; | 1014 | }; |
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 9d13c6f1ba21..3a73b5cc1551 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h | |||
@@ -4676,7 +4676,6 @@ struct wmi_vdev_param_map { | |||
4676 | u32 meru_vc; | 4676 | u32 meru_vc; |
4677 | u32 rx_decap_type; | 4677 | u32 rx_decap_type; |
4678 | u32 bw_nss_ratemask; | 4678 | u32 bw_nss_ratemask; |
4679 | u32 set_tsf; | ||
4680 | u32 inc_tsf; | 4679 | u32 inc_tsf; |
4681 | u32 dec_tsf; | 4680 | u32 dec_tsf; |
4682 | }; | 4681 | }; |