qcacmn: Send default ies in scan request to fw
On framework initiated scan, ies are not sent in scan request from upper layer and default scan ies are not sent as part of scan request sent to firmware. This results in not including oce ie in probe requests for framework initated scans Fix is to copy default ies to ie field in scan request sent to firmware. Change-Id: I895563bafc2a2b6e483d08cb28ee44ad34f5af70 CRs-Fixed: 2087124
This commit is contained in:

committed by
snandini

parent
3a133b7ca3
commit
074f5e91b8
@@ -113,6 +113,17 @@ struct scan_req {
|
|||||||
uint8_t source;
|
uint8_t source;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct scan_params - Scan params
|
||||||
|
* @source: scan request source
|
||||||
|
* @default_ie: default scan ie
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
struct scan_params {
|
||||||
|
uint8_t source;
|
||||||
|
struct element_info default_ie;
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef FEATURE_WLAN_SCAN_PNO
|
#ifdef FEATURE_WLAN_SCAN_PNO
|
||||||
/**
|
/**
|
||||||
* wlan_cfg80211_sched_scan_start() - cfg80211 scheduled scan(pno) start
|
* wlan_cfg80211_sched_scan_start() - cfg80211 scheduled scan(pno) start
|
||||||
@@ -176,7 +187,7 @@ QDF_STATUS wlan_cfg80211_scan_priv_deinit(
|
|||||||
* wlan_cfg80211_scan() - API to process cfg80211 scan request
|
* wlan_cfg80211_scan() - API to process cfg80211 scan request
|
||||||
* @pdev: Pointer to pdev
|
* @pdev: Pointer to pdev
|
||||||
* @request: Pointer to scan request
|
* @request: Pointer to scan request
|
||||||
* @source: source of scan request
|
* @params: scan params
|
||||||
*
|
*
|
||||||
* API to trigger scan and update cfg80211 scan database.
|
* API to trigger scan and update cfg80211 scan database.
|
||||||
* scan dump command can be used to fetch scan results
|
* scan dump command can be used to fetch scan results
|
||||||
@@ -186,7 +197,7 @@ QDF_STATUS wlan_cfg80211_scan_priv_deinit(
|
|||||||
*/
|
*/
|
||||||
int wlan_cfg80211_scan(struct wlan_objmgr_pdev *pdev,
|
int wlan_cfg80211_scan(struct wlan_objmgr_pdev *pdev,
|
||||||
struct cfg80211_scan_request *request,
|
struct cfg80211_scan_request *request,
|
||||||
uint8_t source);
|
struct scan_params *params);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_cfg80211_inform_bss_frame() - API to inform beacon to cfg80211
|
* wlan_cfg80211_inform_bss_frame() - API to inform beacon to cfg80211
|
||||||
|
@@ -1080,17 +1080,9 @@ void wlan_cfg80211_cleanup_scan_queue(struct wlan_objmgr_pdev *pdev)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* wlan_cfg80211_scan() - Process scan request
|
|
||||||
* @pdev: pdev object pointer
|
|
||||||
* @request: scan request
|
|
||||||
* @source : returns source of the scan request
|
|
||||||
*
|
|
||||||
* Return: 0 on success, error number otherwise
|
|
||||||
*/
|
|
||||||
int wlan_cfg80211_scan(struct wlan_objmgr_pdev *pdev,
|
int wlan_cfg80211_scan(struct wlan_objmgr_pdev *pdev,
|
||||||
struct cfg80211_scan_request *request,
|
struct cfg80211_scan_request *request,
|
||||||
uint8_t source)
|
struct scan_params *params)
|
||||||
{
|
{
|
||||||
struct net_device *dev = request->wdev->netdev;
|
struct net_device *dev = request->wdev->netdev;
|
||||||
struct scan_start_request *req;
|
struct scan_start_request *req;
|
||||||
@@ -1288,6 +1280,18 @@ int wlan_cfg80211_scan(struct wlan_objmgr_pdev *pdev,
|
|||||||
req->scan_req.extraie.len = request->ie_len;
|
req->scan_req.extraie.len = request->ie_len;
|
||||||
qdf_mem_copy(req->scan_req.extraie.ptr, request->ie,
|
qdf_mem_copy(req->scan_req.extraie.ptr, request->ie,
|
||||||
request->ie_len);
|
request->ie_len);
|
||||||
|
} else if (params->default_ie.ptr && params->default_ie.len) {
|
||||||
|
req->scan_req.extraie.ptr =
|
||||||
|
qdf_mem_malloc(params->default_ie.len);
|
||||||
|
if (!req->scan_req.extraie.ptr) {
|
||||||
|
cfg80211_err("Failed to allocate memory");
|
||||||
|
status = -ENOMEM;
|
||||||
|
qdf_mem_free(req);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
req->scan_req.extraie.len = params->default_ie.len;
|
||||||
|
qdf_mem_copy(req->scan_req.extraie.ptr, params->default_ie.ptr,
|
||||||
|
params->default_ie.len);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_p2p_scan) {
|
if (!is_p2p_scan) {
|
||||||
@@ -1302,7 +1306,8 @@ int wlan_cfg80211_scan(struct wlan_objmgr_pdev *pdev,
|
|||||||
ucfg_scan_flush_results(pdev, NULL);
|
ucfg_scan_flush_results(pdev, NULL);
|
||||||
|
|
||||||
/* Enqueue the scan request */
|
/* Enqueue the scan request */
|
||||||
wlan_scan_request_enqueue(pdev, request, source, req->scan_req.scan_id);
|
wlan_scan_request_enqueue(pdev, request, params->source,
|
||||||
|
req->scan_req.scan_id);
|
||||||
|
|
||||||
qdf_runtime_pm_prevent_suspend(
|
qdf_runtime_pm_prevent_suspend(
|
||||||
&osif_priv->osif_scan->runtime_pm_lock);
|
&osif_priv->osif_scan->runtime_pm_lock);
|
||||||
@@ -1316,7 +1321,8 @@ int wlan_cfg80211_scan(struct wlan_objmgr_pdev *pdev,
|
|||||||
} else {
|
} else {
|
||||||
status = -EIO;
|
status = -EIO;
|
||||||
}
|
}
|
||||||
wlan_scan_request_dequeue(pdev, scan_id, &request, &source);
|
wlan_scan_request_dequeue(pdev, scan_id, &request,
|
||||||
|
¶ms->source);
|
||||||
if (qdf_list_empty(&osif_priv->osif_scan->scan_req_q))
|
if (qdf_list_empty(&osif_priv->osif_scan->scan_req_q))
|
||||||
qdf_runtime_pm_allow_suspend(
|
qdf_runtime_pm_allow_suspend(
|
||||||
&osif_priv->osif_scan->runtime_pm_lock);
|
&osif_priv->osif_scan->runtime_pm_lock);
|
||||||
|
Reference in New Issue
Block a user