mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacmn: Configure MAWC NLO parameters from host to firmware
Get the MAWC based NLO parameters from HDD/UMAC and pass them to firmware via target/if Change-Id: I76d7c8677ee73f9a3c54b7af4943b74a6b23323d CRs-Fixed: 2064837
This commit is contained in:
parent
bb8b274815
commit
f56e59833c
4 changed files with 51 additions and 18 deletions
|
|
@ -239,7 +239,17 @@ static QDF_STATUS
|
|||
target_if_pno_start(struct wlan_objmgr_psoc *psoc,
|
||||
struct pno_scan_req_params *req)
|
||||
{
|
||||
return wmi_unified_pno_start_cmd(GET_WMI_HDL_FROM_PSOC(psoc), req);
|
||||
QDF_STATUS status;
|
||||
|
||||
status = wmi_unified_pno_start_cmd(GET_WMI_HDL_FROM_PSOC(psoc), req);
|
||||
if (status == QDF_STATUS_SUCCESS) {
|
||||
if (req->mawc_params.enable)
|
||||
status = wmi_unified_nlo_mawc_cmd(
|
||||
GET_WMI_HDL_FROM_PSOC(psoc),
|
||||
&req->mawc_params);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static QDF_STATUS
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ struct scan_vdev_obj {
|
|||
* to be triggered.
|
||||
* @pno_wake_lock: pno wake lock
|
||||
* @pno_cb: callback to call on PNO completion
|
||||
* @mawc_params: Configuration parameters for NLO MAWC.
|
||||
*/
|
||||
struct pno_def_config {
|
||||
bool channel_prediction;
|
||||
|
|
@ -197,6 +198,7 @@ struct pno_def_config {
|
|||
uint32_t channel_prediction_full_scan;
|
||||
qdf_wake_lock_t pno_wake_lock;
|
||||
struct cb_handler pno_cb;
|
||||
struct nlo_mawc_params mawc_params;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -883,6 +883,11 @@ enum scan_cb_type {
|
|||
#define SCAN_STATIONARY_THRESHOLD 10
|
||||
#define SCAN_CHANNEL_PREDICTION_FULL_SCAN_MS 60000
|
||||
#define SCAN_ADAPTIVE_PNOSCAN_DWELL_MODE 0
|
||||
#define SCAN_MAWC_NLO_ENABLED 1
|
||||
#define SCAN_MAWC_NLO_EXP_BACKOFF_RATIO 3
|
||||
#define SCAN_MAWC_NLO_INIT_SCAN_INTERVAL 10000
|
||||
#define SCAN_MAWC_NLO_MAX_SCAN_INTERVAL 60000
|
||||
|
||||
|
||||
/**
|
||||
* enum ssid_bc_type - SSID broadcast type
|
||||
|
|
@ -927,6 +932,23 @@ struct cpno_band_rssi_pref {
|
|||
int8_t rssi;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct nlo_mawc_params - Motion Aided Wireless Connectivity based
|
||||
* Network List Offload configuration
|
||||
* @vdev_id: VDEV ID on which the configuration needs to be applied
|
||||
* @enable: flag to enable or disable
|
||||
* @exp_backoff_ratio: ratio of exponential backoff
|
||||
* @init_scan_interval: initial scan interval(msec)
|
||||
* @max_scan_interval: max scan interval(msec)
|
||||
*/
|
||||
struct nlo_mawc_params {
|
||||
uint8_t vdev_id;
|
||||
bool enable;
|
||||
uint32_t exp_backoff_ratio;
|
||||
uint32_t init_scan_interval;
|
||||
uint32_t max_scan_interval;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pno_scan_req_params - PNO Scan request structure
|
||||
* @networks_cnt: Number of networks
|
||||
|
|
@ -957,6 +979,7 @@ struct cpno_band_rssi_pref {
|
|||
* { fast_scan_period=120, fast_scan_max_cycles=2,
|
||||
* 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.
|
||||
*/
|
||||
struct pno_scan_req_params {
|
||||
uint32_t networks_cnt;
|
||||
|
|
@ -979,23 +1002,7 @@ struct pno_scan_req_params {
|
|||
bool relative_rssi_set;
|
||||
int8_t relative_rssi;
|
||||
struct cpno_band_rssi_pref band_rssi_pref;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct nlo_mawc_params - Motion Aided Wireless Connectivity based
|
||||
* Network List Offload configuration
|
||||
* @vdev_id: VDEV ID on which the configuration needs to be applied
|
||||
* @enable: flag to enable or disable
|
||||
* @exp_backoff_ratio: ratio of exponential backoff
|
||||
* @init_scan_interval: initial scan interval(msec)
|
||||
* @max_scan_interval: max scan interval(msec)
|
||||
*/
|
||||
struct nlo_mawc_params {
|
||||
uint8_t vdev_id;
|
||||
bool enable;
|
||||
uint32_t exp_backoff_ratio;
|
||||
uint32_t init_scan_interval;
|
||||
uint32_t max_scan_interval;
|
||||
struct nlo_mawc_params mawc_params;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1007,6 +1014,7 @@ struct nlo_mawc_params {
|
|||
* @pnoscan_adaptive_dwell_mode: def adaptive dwelltime mode for pno scan
|
||||
* @channel_prediction_full_scan: def periodic timer upon which full scan needs
|
||||
* to be triggered.
|
||||
* @mawc_params: Configuration parameters for NLO MAWC.
|
||||
*/
|
||||
struct pno_user_cfg {
|
||||
bool channel_prediction;
|
||||
|
|
@ -1014,6 +1022,7 @@ struct pno_user_cfg {
|
|||
uint8_t stationary_thresh;
|
||||
enum scan_dwelltime_adaptive_mode adaptive_dwell_mode;
|
||||
uint32_t channel_prediction_full_scan;
|
||||
struct nlo_mawc_params mawc_params;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -227,13 +227,20 @@ bool ucfg_scan_get_pno_match(struct wlan_objmgr_vdev *vdev)
|
|||
static QDF_STATUS
|
||||
wlan_pno_global_init(struct pno_def_config *pno_def)
|
||||
{
|
||||
struct nlo_mawc_params *mawc_cfg;
|
||||
|
||||
qdf_wake_lock_create(&pno_def->pno_wake_lock, "wlan_pno_wl");
|
||||
mawc_cfg = &pno_def->mawc_params;
|
||||
pno_def->channel_prediction = SCAN_PNO_CHANNEL_PREDICTION;
|
||||
pno_def->top_k_num_of_channels = SCAN_TOP_K_NUM_OF_CHANNELS;
|
||||
pno_def->stationary_thresh = SCAN_STATIONARY_THRESHOLD;
|
||||
pno_def->channel_prediction_full_scan =
|
||||
SCAN_CHANNEL_PREDICTION_FULL_SCAN_MS;
|
||||
pno_def->adaptive_dwell_mode = SCAN_ADAPTIVE_PNOSCAN_DWELL_MODE;
|
||||
mawc_cfg->enable = SCAN_MAWC_NLO_ENABLED;
|
||||
mawc_cfg->exp_backoff_ratio = SCAN_MAWC_NLO_EXP_BACKOFF_RATIO;
|
||||
mawc_cfg->init_scan_interval = SCAN_MAWC_NLO_INIT_SCAN_INTERVAL;
|
||||
mawc_cfg->max_scan_interval = SCAN_MAWC_NLO_MAX_SCAN_INTERVAL;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -273,6 +280,9 @@ ucfg_scan_get_pno_def_params(struct wlan_objmgr_vdev *vdev,
|
|||
req->stationary_thresh = pno_def->stationary_thresh;
|
||||
req->channel_prediction_full_scan =
|
||||
pno_def->channel_prediction_full_scan;
|
||||
req->mawc_params.vdev_id = wlan_vdev_get_id(vdev);
|
||||
qdf_mem_copy(&req->mawc_params, &pno_def->mawc_params,
|
||||
sizeof(req->mawc_params));
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -286,6 +296,8 @@ static QDF_STATUS ucfg_scan_update_pno_config(struct pno_def_config *pno,
|
|||
pno->adaptive_dwell_mode = pno_cfg->adaptive_dwell_mode;
|
||||
pno->channel_prediction_full_scan =
|
||||
pno_cfg->channel_prediction_full_scan;
|
||||
qdf_mem_copy(&pno->mawc_params, &pno_cfg->mawc_params,
|
||||
sizeof(pno->mawc_params));
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue