Commit 0936ea3f authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo

ath10k: move cycle_count macro

The macro isn't WMI specific. Instead it is
related to hardware chip so move the macro
accordingly. While at it document the magic value.
Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 1d36f46b
...@@ -449,6 +449,9 @@ enum ath10k_hw_rate_cck { ...@@ -449,6 +449,9 @@ enum ath10k_hw_rate_cck {
#define SCRATCH_3_ADDRESS ar->regs->scratch_3_address #define SCRATCH_3_ADDRESS ar->regs->scratch_3_address
#define CPU_INTR_ADDRESS 0x0010 #define CPU_INTR_ADDRESS 0x0010
/* Cycle counters are running at 88MHz */
#define CCNT_TO_MSEC(x) ((x) / 88000)
/* Firmware indications to the Host via SCRATCH_3 register. */ /* Firmware indications to the Host via SCRATCH_3 register. */
#define FW_INDICATOR_ADDRESS (SOC_CORE_BASE_ADDRESS + SCRATCH_3_ADDRESS) #define FW_INDICATOR_ADDRESS (SOC_CORE_BASE_ADDRESS + SCRATCH_3_ADDRESS)
#define FW_IND_EVENT_PENDING 1 #define FW_IND_EVENT_PENDING 1
......
...@@ -1644,8 +1644,8 @@ void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb) ...@@ -1644,8 +1644,8 @@ void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb)
rx_clear_count -= ar->survey_last_rx_clear_count; rx_clear_count -= ar->survey_last_rx_clear_count;
survey = &ar->survey[idx]; survey = &ar->survey[idx];
survey->time = WMI_CHAN_INFO_MSEC(cycle_count); survey->time = CCNT_TO_MSEC(cycle_count);
survey->time_busy = WMI_CHAN_INFO_MSEC(rx_clear_count); survey->time_busy = CCNT_TO_MSEC(rx_clear_count);
survey->noise = noise_floor; survey->noise = noise_floor;
survey->filled = SURVEY_INFO_TIME | survey->filled = SURVEY_INFO_TIME |
SURVEY_INFO_TIME_BUSY | SURVEY_INFO_TIME_BUSY |
......
...@@ -4665,7 +4665,6 @@ struct wmi_peer_sta_kickout_event { ...@@ -4665,7 +4665,6 @@ struct wmi_peer_sta_kickout_event {
} __packed; } __packed;
#define WMI_CHAN_INFO_FLAG_COMPLETE BIT(0) #define WMI_CHAN_INFO_FLAG_COMPLETE BIT(0)
#define WMI_CHAN_INFO_MSEC(x) ((x) / 88000)
/* Beacon filter wmi command info */ /* Beacon filter wmi command info */
#define BCN_FLT_MAX_SUPPORTED_IES 256 #define BCN_FLT_MAX_SUPPORTED_IES 256
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment