|
@@ -113,7 +113,7 @@ static QDF_STATUS p2p_scan_start(struct p2p_roc_context *roc_ctx)
|
|
|
req->scan_req.scan_type = SCAN_TYPE_P2P_LISTEN;
|
|
|
req->scan_req.scan_req_id = p2p_soc_obj->scan_req_id;
|
|
|
req->scan_req.chan_list.num_chan = 1;
|
|
|
- req->scan_req.chan_list.chan[0].freq = roc_ctx->chan;
|
|
|
+ req->scan_req.chan_list.chan[0].freq = roc_ctx->chan_freq;
|
|
|
req->scan_req.dwell_time_passive = roc_ctx->duration;
|
|
|
req->scan_req.dwell_time_active = 0;
|
|
|
req->scan_req.scan_priority = SCAN_PRIORITY_HIGH;
|
|
@@ -245,7 +245,7 @@ static QDF_STATUS p2p_send_roc_event(
|
|
|
p2p_evt.vdev_id = roc_ctx->vdev_id;
|
|
|
p2p_evt.roc_event = evt;
|
|
|
p2p_evt.cookie = (uint64_t)roc_ctx->id;
|
|
|
- p2p_evt.chan = roc_ctx->chan;
|
|
|
+ p2p_evt.chan_freq = roc_ctx->chan_freq;
|
|
|
p2p_evt.duration = roc_ctx->duration;
|
|
|
|
|
|
p2p_debug("roc_event: %d, cookie:%llx", p2p_evt.roc_event,
|
|
@@ -272,9 +272,10 @@ static QDF_STATUS p2p_destroy_roc_ctx(struct p2p_roc_context *roc_ctx,
|
|
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
struct p2p_soc_priv_obj *p2p_soc_obj = roc_ctx->p2p_soc_obj;
|
|
|
|
|
|
- p2p_debug("p2p_soc_obj:%pK, roc_ctx:%pK, up_layer_event:%d, in_roc_queue:%d vdev_id:%d chan:%d duration:%d",
|
|
|
- p2p_soc_obj, roc_ctx, up_layer_event, in_roc_queue,
|
|
|
- roc_ctx->vdev_id, roc_ctx->chan, roc_ctx->duration);
|
|
|
+ p2p_debug("p2p_soc_obj:%pK, roc_ctx:%pK, up_layer_event:%d,"
|
|
|
+ " in_roc_queue:%d vdev_id:%d freq:%d duration:%d",
|
|
|
+ p2p_soc_obj, roc_ctx, up_layer_event, in_roc_queue,
|
|
|
+ roc_ctx->vdev_id, roc_ctx->chan_freq, roc_ctx->duration);
|
|
|
|
|
|
if (up_layer_event) {
|
|
|
if (roc_ctx->roc_state < ROC_STATE_ON_CHAN)
|
|
@@ -358,11 +359,13 @@ static void p2p_roc_timeout(void *pdata)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d, scan_id:%d, tx ctx:%pK, chan:%d, phy_mode:%d, duration:%d, roc_type:%d, roc_state:%d",
|
|
|
- roc_ctx->p2p_soc_obj, roc_ctx, roc_ctx->vdev_id,
|
|
|
- roc_ctx->scan_id, roc_ctx->tx_ctx, roc_ctx->chan,
|
|
|
- roc_ctx->phy_mode, roc_ctx->duration,
|
|
|
- roc_ctx->roc_type, roc_ctx->roc_state);
|
|
|
+ p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d, scan_id:%d,"
|
|
|
+ " tx ctx:%pK, freq:%d, phy_mode:%d, duration:%d,"
|
|
|
+ " roc_type:%d, roc_state:%d",
|
|
|
+ roc_ctx->p2p_soc_obj, roc_ctx, roc_ctx->vdev_id,
|
|
|
+ roc_ctx->scan_id, roc_ctx->tx_ctx, roc_ctx->chan_freq,
|
|
|
+ roc_ctx->phy_mode, roc_ctx->duration,
|
|
|
+ roc_ctx->roc_type, roc_ctx->roc_state);
|
|
|
|
|
|
if (roc_ctx->roc_state == ROC_STATE_CANCEL_IN_PROG) {
|
|
|
p2p_err("Cancellation already in progress");
|
|
@@ -385,11 +388,13 @@ static QDF_STATUS p2p_execute_roc_req(struct p2p_roc_context *roc_ctx)
|
|
|
QDF_STATUS status;
|
|
|
struct p2p_soc_priv_obj *p2p_soc_obj = roc_ctx->p2p_soc_obj;
|
|
|
|
|
|
- p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d, scan_id:%d, tx ctx:%pK, chan:%d, phy_mode:%d, duration:%d, roc_type:%d, roc_state:%d",
|
|
|
- p2p_soc_obj, roc_ctx, roc_ctx->vdev_id,
|
|
|
- roc_ctx->scan_id, roc_ctx->tx_ctx, roc_ctx->chan,
|
|
|
- roc_ctx->phy_mode, roc_ctx->duration,
|
|
|
- roc_ctx->roc_type, roc_ctx->roc_state);
|
|
|
+ p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d, scan_id:%d,"
|
|
|
+ " tx ctx:%pK, freq:%d, phy_mode:%d, duration:%d,"
|
|
|
+ " roc_type:%d, roc_state:%d",
|
|
|
+ p2p_soc_obj, roc_ctx, roc_ctx->vdev_id,
|
|
|
+ roc_ctx->scan_id, roc_ctx->tx_ctx, roc_ctx->chan_freq,
|
|
|
+ roc_ctx->phy_mode, roc_ctx->duration,
|
|
|
+ roc_ctx->roc_type, roc_ctx->roc_state);
|
|
|
|
|
|
/* prevent runtime suspend */
|
|
|
qdf_runtime_pm_prevent_suspend(&p2p_soc_obj->roc_runtime_lock);
|
|
@@ -612,14 +617,14 @@ struct p2p_roc_context *p2p_find_current_roc_ctx(
|
|
|
struct p2p_roc_context, node);
|
|
|
if (roc_ctx->roc_state != ROC_STATE_IDLE) {
|
|
|
p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id"
|
|
|
- ":%d, scan_id:%d, tx ctx:%pK, chan:"
|
|
|
- "%d, phy_mode:%d, duration:%d, "
|
|
|
- "roc_type:%d, roc_state:%d",
|
|
|
- roc_ctx->p2p_soc_obj, roc_ctx,
|
|
|
- roc_ctx->vdev_id, roc_ctx->scan_id,
|
|
|
- roc_ctx->tx_ctx, roc_ctx->chan,
|
|
|
- roc_ctx->phy_mode, roc_ctx->duration,
|
|
|
- roc_ctx->roc_type, roc_ctx->roc_state);
|
|
|
+ ":%d, scan_id:%d, tx ctx:%pK, freq:"
|
|
|
+ "%d, phy_mode:%d, duration:%d, "
|
|
|
+ "roc_type:%d, roc_state:%d",
|
|
|
+ roc_ctx->p2p_soc_obj, roc_ctx,
|
|
|
+ roc_ctx->vdev_id, roc_ctx->scan_id,
|
|
|
+ roc_ctx->tx_ctx, roc_ctx->chan_freq,
|
|
|
+ roc_ctx->phy_mode, roc_ctx->duration,
|
|
|
+ roc_ctx->roc_type, roc_ctx->roc_state);
|
|
|
|
|
|
return roc_ctx;
|
|
|
}
|
|
@@ -652,8 +657,8 @@ struct p2p_roc_context *p2p_find_roc_by_tx_ctx(
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
-struct p2p_roc_context *p2p_find_roc_by_chan(
|
|
|
- struct p2p_soc_priv_obj *p2p_soc_obj, uint8_t chan)
|
|
|
+struct p2p_roc_context *p2p_find_roc_by_chan_freq(
|
|
|
+ struct p2p_soc_priv_obj *p2p_soc_obj, qdf_freq_t chan_freq)
|
|
|
{
|
|
|
struct p2p_roc_context *roc_ctx;
|
|
|
qdf_list_node_t *p_node;
|
|
@@ -664,11 +669,14 @@ struct p2p_roc_context *p2p_find_roc_by_chan(
|
|
|
roc_ctx = qdf_container_of(p_node,
|
|
|
struct p2p_roc_context,
|
|
|
node);
|
|
|
- if (roc_ctx->chan == chan) {
|
|
|
- p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d, scan_id:%d, tx ctx:%pK, chan:%d, phy_mode:%d, duration:%d, roc_type:%d, roc_state:%d",
|
|
|
+ if (roc_ctx->chan_freq == chan_freq) {
|
|
|
+ p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d,"
|
|
|
+ " scan_id:%d, tx ctx:%pK, freq:%d,"
|
|
|
+ " phy_mode:%d, duration:%d,"
|
|
|
+ " roc_type:%d, roc_state:%d",
|
|
|
roc_ctx->p2p_soc_obj, roc_ctx,
|
|
|
roc_ctx->vdev_id, roc_ctx->scan_id,
|
|
|
- roc_ctx->tx_ctx, roc_ctx->chan,
|
|
|
+ roc_ctx->tx_ctx, roc_ctx->chan_freq,
|
|
|
roc_ctx->phy_mode, roc_ctx->duration,
|
|
|
roc_ctx->roc_type, roc_ctx->roc_state);
|
|
|
|
|
@@ -775,10 +783,12 @@ QDF_STATUS p2p_process_cleanup_roc_queue(
|
|
|
roc_ctx = qdf_container_of(p_node,
|
|
|
struct p2p_roc_context, node);
|
|
|
|
|
|
- p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d, scan_id:%d, tx ctx:%pK, chan:%d, phy_mode:%d, duration:%d, roc_type:%d, roc_state:%d",
|
|
|
+ p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d, "
|
|
|
+ "scan_id:%d, tx ctx:%pK, freq:%d, phy_mode:%d, "
|
|
|
+ "duration:%d, roc_type:%d, roc_state:%d",
|
|
|
roc_ctx->p2p_soc_obj, roc_ctx,
|
|
|
roc_ctx->vdev_id, roc_ctx->scan_id,
|
|
|
- roc_ctx->tx_ctx, roc_ctx->chan,
|
|
|
+ roc_ctx->tx_ctx, roc_ctx->chan_freq,
|
|
|
roc_ctx->phy_mode, roc_ctx->duration,
|
|
|
roc_ctx->roc_type, roc_ctx->roc_state);
|
|
|
status = qdf_list_peek_next(&p2p_soc_obj->roc_q,
|
|
@@ -803,9 +813,11 @@ QDF_STATUS p2p_process_cleanup_roc_queue(
|
|
|
roc_ctx = qdf_container_of(p_node,
|
|
|
struct p2p_roc_context, node);
|
|
|
|
|
|
- p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d, scan_id:%d, tx ctx:%pK, chan:%d, phy_mode:%d, duration:%d, roc_type:%d, roc_state:%d",
|
|
|
+ p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d, "
|
|
|
+ "scan_id:%d, tx ctx:%pK, freq:%d, phy_mode:%d, "
|
|
|
+ "duration:%d, roc_type:%d, roc_state:%d",
|
|
|
roc_ctx->p2p_soc_obj, roc_ctx, roc_ctx->vdev_id,
|
|
|
- roc_ctx->scan_id, roc_ctx->tx_ctx, roc_ctx->chan,
|
|
|
+ roc_ctx->scan_id, roc_ctx->tx_ctx, roc_ctx->chan_freq,
|
|
|
roc_ctx->phy_mode, roc_ctx->duration,
|
|
|
roc_ctx->roc_type, roc_ctx->roc_state);
|
|
|
|
|
@@ -838,11 +850,13 @@ QDF_STATUS p2p_process_roc_req(struct p2p_roc_context *roc_ctx)
|
|
|
|
|
|
p2p_soc_obj = roc_ctx->p2p_soc_obj;
|
|
|
|
|
|
- p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d, scan_id:%d, tx_ctx:%pK, chan:%d, phy_mode:%d, duration:%d, roc_type:%d, roc_state:%d",
|
|
|
- p2p_soc_obj, roc_ctx, roc_ctx->vdev_id,
|
|
|
- roc_ctx->scan_id, roc_ctx->tx_ctx, roc_ctx->chan,
|
|
|
- roc_ctx->phy_mode, roc_ctx->duration,
|
|
|
- roc_ctx->roc_type, roc_ctx->roc_state);
|
|
|
+ p2p_debug("p2p soc obj:%pK, roc ctx:%pK, vdev_id:%d, scan_id:%d, "
|
|
|
+ "tx_ctx:%pK, freq:%d, phy_mode:%d, duration:%d, "
|
|
|
+ "roc_type:%d, roc_state:%d",
|
|
|
+ p2p_soc_obj, roc_ctx, roc_ctx->vdev_id,
|
|
|
+ roc_ctx->scan_id, roc_ctx->tx_ctx, roc_ctx->chan_freq,
|
|
|
+ roc_ctx->phy_mode, roc_ctx->duration,
|
|
|
+ roc_ctx->roc_type, roc_ctx->roc_state);
|
|
|
|
|
|
status = qdf_list_insert_back(&p2p_soc_obj->roc_q,
|
|
|
&roc_ctx->node);
|