qcacmn: Allow FW to pno scan 6G chan based on RNR flag only

First host checks below two things in PNO scan request:
1. Userspace sets NL80211_SCAN_FLAG_COLOCATED_6GHZ flag
in pno scan request.
2. At least one 6G channel is present in the pno scan req.

If any of above conditions satisfy, Host fills all remaining
(other than channel(s) present in pno scan req) valid 6 GHz
channel(s) to pno scan requests and set the flag
FLAG_SCAN_ONLY_IF_RNR_FOUND for each remaining channel(s).
Host sends this updated channel list via WMI command
WMI_START_SCAN_CMDID_param_tlvs->channel_list for pno scan
to firmware.

By this driver allows Firmware to scan 6G channels based on
RNR IEs only (for colocated APs reported by 2.4/5 GHz APs).

Change-Id: Ib6118c4525e9fbe233eb6a7e07a4a3345d486e8a
CRs-Fixed: 3103923
このコミットが含まれているのは:
abhinav kumar
2021-12-31 00:42:44 +05:30
committed by Madan Koyyalamudi
コミット 3b1731aa70
7個のファイルの変更187行の追加46行の削除

ファイルの表示

@@ -250,6 +250,7 @@ scm_is_scan_type_exempted_from_optimization(struct scan_start_request *req)
* @vdev: vdev on which scan request is issued
* @req: Scan start request
* @num_scan_ch: Total number of scan channels
* @is_colocated_6ghz_scan_enabled: colocated 6ghz scan flag enabled in scan req
*
* If colocated 6ghz scan flag present in host scan request or at least one 6G
* channel is present in the host scan request, then this API
@@ -260,13 +261,13 @@ scm_is_scan_type_exempted_from_optimization(struct scan_start_request *req)
*
* Return: None
*/
static void scm_add_all_valid_6g_channels(struct wlan_objmgr_pdev *pdev,
struct scan_start_request *req,
uint8_t *num_scan_ch)
void scm_add_all_valid_6g_channels(struct wlan_objmgr_pdev *pdev,
struct chan_list *chan_list,
uint8_t *num_scan_ch,
bool is_colocated_6ghz_scan_enabled)
{
uint8_t i, j;
enum channel_enum freq_idx;
struct chan_list *chan_list = &req->scan_req.chan_list;
struct regulatory_channel *cur_chan_list;
bool is_6g_ch_present = false, found;
QDF_STATUS status;
@@ -281,8 +282,7 @@ static void scm_add_all_valid_6g_channels(struct wlan_objmgr_pdev *pdev,
}
}
if (!is_6g_ch_present &&
!req->scan_req.scan_policy_colocated_6ghz) {
if (!is_6g_ch_present && !is_colocated_6ghz_scan_enabled) {
scm_debug("Neither 6G chan present nor flag set in scan req");
return;
}
@@ -331,6 +331,18 @@ static void scm_add_all_valid_6g_channels(struct wlan_objmgr_pdev *pdev,
qdf_mem_free(cur_chan_list);
}
static void scm_scan_add_all_valid_6g_channels(struct wlan_objmgr_pdev *pdev,
struct scan_start_request *req,
uint8_t *num_scan_ch)
{
bool is_colocated_6ghz_scan_enabled =
req->scan_req.scan_policy_colocated_6ghz;
scm_add_all_valid_6g_channels(pdev, &req->scan_req.chan_list,
num_scan_ch,
is_colocated_6ghz_scan_enabled);
}
static void
scm_copy_valid_channels(struct wlan_objmgr_psoc *psoc,
enum scan_mode_6ghz scan_mode,
@@ -513,7 +525,7 @@ scm_update_6ghz_channel_list(struct scan_start_request *req,
* set the flag FLAG_SCAN_ONLY_IF_RNR_FOUND for each remaining
* channels.
*/
scm_add_all_valid_6g_channels(pdev, req, &num_scan_ch);
scm_scan_add_all_valid_6g_channels(pdev, req, &num_scan_ch);
break;
default:
/*

ファイルの表示

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -70,6 +71,27 @@ scm_update_6ghz_channel_list(struct scan_start_request *req,
*/
bool
scm_is_6ghz_scan_optimization_supported(struct wlan_objmgr_psoc *psoc);
/**
* scm_add_all_valid_6g_channels() - Add all valid 6g channels to scan request
* @vdev: vdev on which scan request is issued
* @req: Scan start request
* @num_scan_ch: Total number of scan channels
*
* If colocated 6ghz scan flag present in host scan request or at least one 6G
* channel is present in the host scan request, then this API
* fills all remaining (other than channel(s) resent in host scan req) valid
* 6 GHz channel(s) to scan requests channel list and set the flag
* FLAG_SCAN_ONLY_IF_RNR_FOUND for each of those added channels.
* By this driver allows Firmware to scan 6G channels based on RNR IEs only.
*
* Return: None
*/
void scm_add_all_valid_6g_channels(struct wlan_objmgr_pdev *pdev,
struct chan_list *chan_list,
uint8_t *num_scan_ch,
bool is_colocated_6ghz);
#else
static inline void
scm_update_6ghz_channel_list(struct scan_start_request *req,
@@ -82,6 +104,13 @@ scm_is_6ghz_scan_optimization_supported(struct wlan_objmgr_psoc *psoc)
{
return false;
}
static inline void scm_add_all_valid_6g_channels(struct wlan_objmgr_pdev *pdev,
struct chan_list *chan_list,
uint8_t *num_scan_ch,
bool is_colocated_6ghz)
{
}
#endif
#endif

ファイルの表示

@@ -1389,18 +1389,16 @@ enum ssid_bc_type {
* @ssid: ssid
* @authentication: authentication type
* @encryption: encryption type
* @bcastNetwType: broadcast nw type
* @ucChannelCount: uc channel count
* @aChannels: pno channel
* @rssiThreshold: rssi threshold
* @bc_new_type: broadcast nw type
* @pno_chan_list: pno channel list info
* @rssi_thresh: rssi threshold
*/
struct pno_nw_type {
struct wlan_ssid ssid;
uint32_t authentication;
uint32_t encryption;
uint32_t bc_new_type;
uint8_t channel_cnt;
uint32_t channels[SCAN_PNO_MAX_NETW_CHANNELS_EX];
struct chan_list pno_chan_list;
int32_t rssi_thresh;
};
@@ -1434,6 +1432,7 @@ struct nlo_mawc_params {
/**
* struct pno_scan_req_params - PNO Scan request structure
* @vdev: vdev object
* @networks_cnt: Number of networks
* @do_passive_scan: Flag to request passive scan to fw
* @vdev_id: vdev id
@@ -1464,8 +1463,10 @@ struct nlo_mawc_params {
* slow_scan_period=1800, scan_backoff_multiplier=2 }
* Result: 120s x2, 240s x2, 480s x2, 960s x2, 1800s xN
* @mawc_params: Configuration parameters for NLO MAWC.
* @scan_policy_colocated_6ghz: colocated_6ghz flag is set in pno scan req
*/
struct pno_scan_req_params {
struct wlan_objmgr_vdev *vdev;
uint32_t networks_cnt;
bool do_passive_scan;
uint32_t vdev_id;
@@ -1488,6 +1489,7 @@ struct pno_scan_req_params {
int8_t relative_rssi;
struct cpno_band_rssi_pref band_rssi_pref;
struct nlo_mawc_params mawc_params;
bool scan_policy_colocated_6ghz;
};
/**

ファイルの表示

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -105,7 +106,30 @@ wlan_scan_id ucfg_scan_get_scan_id(struct wlan_objmgr_psoc *psoc)
* Return: 0 for success or error code.
*/
QDF_STATUS ucfg_scan_pno_start(struct wlan_objmgr_vdev *vdev,
struct pno_scan_req_params *req);
struct pno_scan_req_params *req);
/**
* ucfg_scan_pno_add_all_valid_6g_channels() - This API to update all valid 6g
* channels to pno scan request
* @vdev: vdev pointer
* @req: pno req params
* @num_scan_ch: total number of channels present in pno scan request
*
* Return: None
*/
void ucfg_scan_pno_add_all_valid_6g_channels(struct wlan_objmgr_vdev *vdev,
struct pno_scan_req_params *req,
uint8_t *num_scan_ch);
/**
* ucfg_is_6ghz_pno_scan_optimization_supported() - Public API to check
* 6ghz pno scan optimization supported in fw
* @psoc: psoc object
*
* Return: 0 for success.
*/
bool
ucfg_is_6ghz_pno_scan_optimization_supported(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_scan_pno_stop() - Public API to stop PNO

ファイルの表示

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -153,6 +153,12 @@ QDF_STATUS ucfg_scan_deinit(void)
}
#ifdef FEATURE_WLAN_SCAN_PNO
bool
ucfg_is_6ghz_pno_scan_optimization_supported(struct wlan_objmgr_psoc *psoc)
{
return wlan_psoc_nif_fw_ext_cap_get(psoc,
WLAN_SOC_PNO_SCAN_CONFIG_PER_CHANNEL);
}
QDF_STATUS ucfg_scan_pno_start(struct wlan_objmgr_vdev *vdev,
struct pno_scan_req_params *req)
@@ -179,6 +185,22 @@ QDF_STATUS ucfg_scan_pno_start(struct wlan_objmgr_vdev *vdev,
return status;
}
void ucfg_scan_pno_add_all_valid_6g_channels(struct wlan_objmgr_vdev *vdev,
struct pno_scan_req_params *req,
uint8_t *num_scan_ch)
{
struct wlan_objmgr_pdev *pdev;
struct chan_list *pno_chan_list = &req->networks_list[0].pno_chan_list;
bool is_colocated_6ghz = req->scan_policy_colocated_6ghz;
pdev = wlan_vdev_get_pdev(vdev);
if (!pdev)
return;
scm_add_all_valid_6g_channels(pdev, pno_chan_list, num_scan_ch,
is_colocated_6ghz);
}
QDF_STATUS ucfg_scan_pno_stop(struct wlan_objmgr_vdev *vdev)
{
struct scan_vdev_obj *scan_vdev_obj;