ath10k: Populate ACS survey results
ACS fails as channel details are null in survey info. Add the missing fields in survey_info structure and populate the channel details in survey results. CRs-Fixed: 2027495 Change-Id: I1ca933ded4ca039845203ccd51d77cf7cef1c000 Signed-off-by: Ashutosh Kumar <askuma@codeaurora.org>
This commit is contained in:
parent
823d04d683
commit
09002ed79c
4 changed files with 56 additions and 3 deletions
|
@ -6633,7 +6633,8 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
ath10k_mac_update_bss_chan_survey(ar, &sband->channels[idx]);
|
||||
if (!QCA_REV_WCN3990(ar))
|
||||
ath10k_mac_update_bss_chan_survey(ar, &sband->channels[idx]);
|
||||
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
memcpy(survey, ar_survey, sizeof(*survey));
|
||||
|
|
|
@ -684,6 +684,13 @@ static int ath10k_wmi_tlv_op_pull_ch_info_ev(struct ath10k *ar,
|
|||
arg->noise_floor = ev->noise_floor;
|
||||
arg->rx_clear_count = ev->rx_clear_count;
|
||||
arg->cycle_count = ev->cycle_count;
|
||||
arg->chan_tx_pwr_range = ev->chan_tx_pwr_range;
|
||||
arg->chan_tx_pwr_tp = ev->chan_tx_pwr_tp;
|
||||
arg->rx_frame_count = ev->rx_frame_count;
|
||||
arg->my_bss_rx_cycle_count = ev->my_bss_rx_cycle_count;
|
||||
arg->rx_11b_mode_data_duration = ev->rx_11b_mode_data_duration;
|
||||
arg->tx_frame_cnt = ev->tx_frame_cnt;
|
||||
arg->mac_clk_mhz = ev->mac_clk_mhz;
|
||||
|
||||
kfree(tb);
|
||||
return 0;
|
||||
|
@ -1527,11 +1534,14 @@ ath10k_wmi_tlv_op_gen_start_scan(struct ath10k *ar,
|
|||
cmd->ie_len = __cpu_to_le32(arg->ie_len);
|
||||
cmd->num_probes = __cpu_to_le32(3);
|
||||
|
||||
if (QCA_REV_WCN3990(ar))
|
||||
if (QCA_REV_WCN3990(ar)) {
|
||||
cmd->common.scan_ctrl_flags = ar->fw_flags->flags;
|
||||
else
|
||||
cmd->common.scan_ctrl_flags |=
|
||||
__cpu_to_le32(WMI_SCAN_CHAN_STAT_EVENT);
|
||||
} else {
|
||||
cmd->common.scan_ctrl_flags ^=
|
||||
__cpu_to_le32(WMI_SCAN_FILTER_PROBE_REQ);
|
||||
}
|
||||
|
||||
ptr += sizeof(*tlv);
|
||||
ptr += sizeof(*cmd);
|
||||
|
|
|
@ -2446,6 +2446,31 @@ static int ath10k_wmi_10_4_op_pull_ch_info_ev(struct ath10k *ar,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void wlan_fill_survey_result(struct ath10k *ar,
|
||||
struct survey_info *survey,
|
||||
struct wmi_ch_info_ev_arg arg)
|
||||
{
|
||||
u64 clock_freq;
|
||||
|
||||
if (!arg.mac_clk_mhz || !survey)
|
||||
return;
|
||||
|
||||
clock_freq = arg.mac_clk_mhz * 1000;
|
||||
|
||||
memset(survey, 0, sizeof(*survey));
|
||||
|
||||
survey->noise = __le32_to_cpu(arg.noise_floor);
|
||||
survey->time = __le32_to_cpu(arg.cycle_count) / clock_freq;
|
||||
survey->time_busy = __le32_to_cpu(arg.rx_clear_count) / clock_freq;
|
||||
survey->time_tx = __le32_to_cpu(arg.rx_clear_count) / clock_freq;
|
||||
|
||||
survey->filled = SURVEY_INFO_NOISE_DBM;
|
||||
ar->ch_info_can_report_survey = true;
|
||||
|
||||
survey->filled |= (SURVEY_INFO_TIME | SURVEY_INFO_TIME_BUSY |
|
||||
SURVEY_INFO_TIME_TX);
|
||||
}
|
||||
|
||||
void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb)
|
||||
{
|
||||
struct wmi_ch_info_ev_arg arg = {};
|
||||
|
@ -2490,6 +2515,12 @@ void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (QCA_REV_WCN3990(ar)) {
|
||||
survey = &ar->survey[idx];
|
||||
wlan_fill_survey_result(ar, survey, arg);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (cmd_flags & WMI_CHAN_INFO_FLAG_COMPLETE) {
|
||||
if (ar->ch_info_can_report_survey) {
|
||||
survey = &ar->survey[idx];
|
||||
|
|
|
@ -6034,6 +6034,13 @@ struct wmi_chan_info_event {
|
|||
__le32 noise_floor;
|
||||
__le32 rx_clear_count;
|
||||
__le32 cycle_count;
|
||||
__le32 chan_tx_pwr_range;
|
||||
__le32 chan_tx_pwr_tp;
|
||||
__le32 rx_frame_count;
|
||||
__le32 my_bss_rx_cycle_count;
|
||||
__le32 rx_11b_mode_data_duration;
|
||||
__le32 tx_frame_cnt;
|
||||
__le32 mac_clk_mhz;
|
||||
} __packed;
|
||||
|
||||
struct wmi_10_4_chan_info_event {
|
||||
|
@ -6247,6 +6254,10 @@ struct wmi_ch_info_ev_arg {
|
|||
__le32 chan_tx_pwr_range;
|
||||
__le32 chan_tx_pwr_tp;
|
||||
__le32 rx_frame_count;
|
||||
__le32 my_bss_rx_cycle_count;
|
||||
__le32 rx_11b_mode_data_duration;
|
||||
__le32 tx_frame_cnt;
|
||||
__le32 mac_clk_mhz;
|
||||
};
|
||||
|
||||
struct wmi_vdev_start_ev_arg {
|
||||
|
|
Loading…
Add table
Reference in a new issue