|
@@ -1369,7 +1369,7 @@ static int hdd_twt_setup_session(struct hdd_adapter *adapter,
|
|
hdd_err_rl("Invalid state, vdev %d mode %d state %d",
|
|
hdd_err_rl("Invalid state, vdev %d mode %d state %d",
|
|
adapter->vdev_id, adapter->device_mode,
|
|
adapter->vdev_id, adapter->device_mode,
|
|
hdd_sta_ctx->conn_info.conn_state);
|
|
hdd_sta_ctx->conn_info.conn_state);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EAGAIN;
|
|
}
|
|
}
|
|
|
|
|
|
if (hdd_is_roaming_in_progress(hdd_ctx))
|
|
if (hdd_is_roaming_in_progress(hdd_ctx))
|
|
@@ -1657,7 +1657,11 @@ static int hdd_twt_terminate_session(struct hdd_adapter *adapter,
|
|
hdd_err_rl("Invalid state, vdev %d mode %d state %d",
|
|
hdd_err_rl("Invalid state, vdev %d mode %d state %d",
|
|
adapter->vdev_id, adapter->device_mode,
|
|
adapter->vdev_id, adapter->device_mode,
|
|
hdd_sta_ctx->conn_info.conn_state);
|
|
hdd_sta_ctx->conn_info.conn_state);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Return success, since STA is not associated and
|
|
|
|
+ * there is no TWT session.
|
|
|
|
+ */
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
|
|
|
|
qdf_mem_copy(params.peer_macaddr,
|
|
qdf_mem_copy(params.peer_macaddr,
|
|
@@ -1684,7 +1688,7 @@ static int hdd_twt_terminate_session(struct hdd_adapter *adapter,
|
|
params.dialog_id);
|
|
params.dialog_id);
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
hdd_debug("All TWT sessions not supported by target");
|
|
hdd_debug("All TWT sessions not supported by target");
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EOPNOTSUPP;
|
|
}
|
|
}
|
|
|
|
|
|
if (!ucfg_mlme_is_twt_setup_done(adapter->hdd_ctx->psoc,
|
|
if (!ucfg_mlme_is_twt_setup_done(adapter->hdd_ctx->psoc,
|
|
@@ -1692,7 +1696,7 @@ static int hdd_twt_terminate_session(struct hdd_adapter *adapter,
|
|
params.dialog_id)) {
|
|
params.dialog_id)) {
|
|
hdd_debug("vdev%d: TWT session %d setup incomplete",
|
|
hdd_debug("vdev%d: TWT session %d setup incomplete",
|
|
params.vdev_id, params.dialog_id);
|
|
params.vdev_id, params.dialog_id);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EAGAIN;
|
|
}
|
|
}
|
|
|
|
|
|
hdd_debug("twt_terminate: vdev_id %d dialog_id %d peer mac_addr "
|
|
hdd_debug("twt_terminate: vdev_id %d dialog_id %d peer mac_addr "
|
|
@@ -1985,7 +1989,7 @@ static int hdd_twt_pause_session(struct hdd_adapter *adapter,
|
|
hdd_err_rl("Invalid state, vdev %d mode %d state %d",
|
|
hdd_err_rl("Invalid state, vdev %d mode %d state %d",
|
|
adapter->vdev_id, adapter->device_mode,
|
|
adapter->vdev_id, adapter->device_mode,
|
|
hdd_sta_ctx->conn_info.conn_state);
|
|
hdd_sta_ctx->conn_info.conn_state);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EAGAIN;
|
|
}
|
|
}
|
|
|
|
|
|
qdf_mem_copy(params.peer_macaddr, hdd_sta_ctx->conn_info.bssid.bytes,
|
|
qdf_mem_copy(params.peer_macaddr, hdd_sta_ctx->conn_info.bssid.bytes,
|
|
@@ -2013,7 +2017,7 @@ static int hdd_twt_pause_session(struct hdd_adapter *adapter,
|
|
params.dialog_id);
|
|
params.dialog_id);
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
hdd_debug("All TWT sessions not supported by target");
|
|
hdd_debug("All TWT sessions not supported by target");
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EOPNOTSUPP;
|
|
}
|
|
}
|
|
|
|
|
|
if (!ucfg_mlme_is_twt_setup_done(adapter->hdd_ctx->psoc,
|
|
if (!ucfg_mlme_is_twt_setup_done(adapter->hdd_ctx->psoc,
|
|
@@ -2021,7 +2025,7 @@ static int hdd_twt_pause_session(struct hdd_adapter *adapter,
|
|
params.dialog_id)) {
|
|
params.dialog_id)) {
|
|
hdd_debug("vdev%d: TWT session %d setup incomplete",
|
|
hdd_debug("vdev%d: TWT session %d setup incomplete",
|
|
params.vdev_id, params.dialog_id);
|
|
params.vdev_id, params.dialog_id);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EAGAIN;
|
|
}
|
|
}
|
|
|
|
|
|
hdd_debug("twt_pause: vdev_id %d dialog_id %d peer mac_addr "
|
|
hdd_debug("twt_pause: vdev_id %d dialog_id %d peer mac_addr "
|
|
@@ -2084,14 +2088,14 @@ static int hdd_twt_nudge_session(struct hdd_adapter *adapter,
|
|
hdd_err_rl("Invalid state, vdev %d mode %d state %d",
|
|
hdd_err_rl("Invalid state, vdev %d mode %d state %d",
|
|
adapter->vdev_id, adapter->device_mode,
|
|
adapter->vdev_id, adapter->device_mode,
|
|
hdd_sta_ctx->conn_info.conn_state);
|
|
hdd_sta_ctx->conn_info.conn_state);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EAGAIN;
|
|
}
|
|
}
|
|
|
|
|
|
ucfg_mlme_get_twt_nudge_tgt_cap(adapter->hdd_ctx->psoc,
|
|
ucfg_mlme_get_twt_nudge_tgt_cap(adapter->hdd_ctx->psoc,
|
|
&is_nudge_tgt_cap_enabled);
|
|
&is_nudge_tgt_cap_enabled);
|
|
if (!is_nudge_tgt_cap_enabled) {
|
|
if (!is_nudge_tgt_cap_enabled) {
|
|
hdd_debug("Nudge not supported by target");
|
|
hdd_debug("Nudge not supported by target");
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EOPNOTSUPP;
|
|
}
|
|
}
|
|
|
|
|
|
params.vdev_id = adapter->vdev_id;
|
|
params.vdev_id = adapter->vdev_id;
|
|
@@ -2116,7 +2120,7 @@ static int hdd_twt_nudge_session(struct hdd_adapter *adapter,
|
|
|
|
|
|
id = QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_FLOW_ID;
|
|
id = QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_FLOW_ID;
|
|
if (!tb[id]) {
|
|
if (!tb[id]) {
|
|
- hdd_debug("TWT: FLOW_ID not specified.");
|
|
|
|
|
|
+ hdd_debug("TWT: FLOW_ID not specified");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
params.dialog_id = nla_get_u8(tb[id]);
|
|
params.dialog_id = nla_get_u8(tb[id]);
|
|
@@ -2125,12 +2129,12 @@ static int hdd_twt_nudge_session(struct hdd_adapter *adapter,
|
|
params.dialog_id);
|
|
params.dialog_id);
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
hdd_debug("All TWT sessions not supported by target");
|
|
hdd_debug("All TWT sessions not supported by target");
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EOPNOTSUPP;
|
|
}
|
|
}
|
|
|
|
|
|
id = QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_WAKE_TIME;
|
|
id = QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_WAKE_TIME;
|
|
if (!tb[id]) {
|
|
if (!tb[id]) {
|
|
- hdd_debug("TWT: WAKE_TIME not specified.");
|
|
|
|
|
|
+ hdd_debug("TWT: WAKE_TIME not specified");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
params.suspend_duration = nla_get_u32(tb[id]);
|
|
params.suspend_duration = nla_get_u32(tb[id]);
|
|
@@ -2147,7 +2151,7 @@ static int hdd_twt_nudge_session(struct hdd_adapter *adapter,
|
|
params.dialog_id)) {
|
|
params.dialog_id)) {
|
|
hdd_debug("vdev%d: TWT session %d setup incomplete",
|
|
hdd_debug("vdev%d: TWT session %d setup incomplete",
|
|
params.vdev_id, params.dialog_id);
|
|
params.vdev_id, params.dialog_id);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EAGAIN;
|
|
}
|
|
}
|
|
|
|
|
|
hdd_debug("twt_nudge: vdev_id %d dialog_id %d ", params.vdev_id,
|
|
hdd_debug("twt_nudge: vdev_id %d dialog_id %d ", params.vdev_id,
|
|
@@ -2417,7 +2421,7 @@ static int hdd_twt_get_capabilities(struct hdd_adapter *adapter,
|
|
if (!hdd_cm_is_vdev_associated(adapter)) {
|
|
if (!hdd_cm_is_vdev_associated(adapter)) {
|
|
hdd_err_rl("vdev %d not in connected state, mode %d",
|
|
hdd_err_rl("vdev %d not in connected state, mode %d",
|
|
adapter->vdev_id, adapter->device_mode);
|
|
adapter->vdev_id, adapter->device_mode);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EAGAIN;
|
|
}
|
|
}
|
|
|
|
|
|
if (hdd_is_roaming_in_progress(hdd_ctx))
|
|
if (hdd_is_roaming_in_progress(hdd_ctx))
|
|
@@ -2460,7 +2464,7 @@ static int hdd_twt_resume_session(struct hdd_adapter *adapter,
|
|
hdd_err_rl("Invalid state, vdev %d mode %d state %d",
|
|
hdd_err_rl("Invalid state, vdev %d mode %d state %d",
|
|
adapter->vdev_id, adapter->device_mode,
|
|
adapter->vdev_id, adapter->device_mode,
|
|
hdd_sta_ctx->conn_info.conn_state);
|
|
hdd_sta_ctx->conn_info.conn_state);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EAGAIN;
|
|
}
|
|
}
|
|
qdf_mem_copy(params.peer_macaddr, hdd_sta_ctx->conn_info.bssid.bytes,
|
|
qdf_mem_copy(params.peer_macaddr, hdd_sta_ctx->conn_info.bssid.bytes,
|
|
QDF_MAC_ADDR_SIZE);
|
|
QDF_MAC_ADDR_SIZE);
|
|
@@ -2485,7 +2489,7 @@ static int hdd_twt_resume_session(struct hdd_adapter *adapter,
|
|
params.dialog_id);
|
|
params.dialog_id);
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
hdd_debug("All TWT sessions not supported by target");
|
|
hdd_debug("All TWT sessions not supported by target");
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EOPNOTSUPP;
|
|
}
|
|
}
|
|
|
|
|
|
if (!ucfg_mlme_is_twt_setup_done(adapter->hdd_ctx->psoc,
|
|
if (!ucfg_mlme_is_twt_setup_done(adapter->hdd_ctx->psoc,
|
|
@@ -2493,7 +2497,7 @@ static int hdd_twt_resume_session(struct hdd_adapter *adapter,
|
|
params.dialog_id)) {
|
|
params.dialog_id)) {
|
|
hdd_debug("vdev%d: TWT session %d setup incomplete",
|
|
hdd_debug("vdev%d: TWT session %d setup incomplete",
|
|
params.vdev_id, params.dialog_id);
|
|
params.vdev_id, params.dialog_id);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EAGAIN;
|
|
}
|
|
}
|
|
|
|
|
|
id = QCA_WLAN_VENDOR_ATTR_TWT_RESUME_NEXT_TWT;
|
|
id = QCA_WLAN_VENDOR_ATTR_TWT_RESUME_NEXT_TWT;
|
|
@@ -2734,7 +2738,7 @@ static int hdd_twt_clear_session_traffic_stats(struct hdd_adapter *adapter,
|
|
&hdd_sta_ctx->conn_info.bssid,
|
|
&hdd_sta_ctx->conn_info.bssid,
|
|
dialog_id)) {
|
|
dialog_id)) {
|
|
hdd_debug("TWT session %d setup incomplete", dialog_id);
|
|
hdd_debug("TWT session %d setup incomplete", dialog_id);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EAGAIN;
|
|
}
|
|
}
|
|
|
|
|
|
ret = wlan_cfg80211_mc_twt_clear_infra_cp_stats(adapter->vdev,
|
|
ret = wlan_cfg80211_mc_twt_clear_infra_cp_stats(adapter->vdev,
|
|
@@ -2863,7 +2867,7 @@ static int hdd_twt_get_session_traffic_stats(struct hdd_adapter *adapter,
|
|
&hdd_sta_ctx->conn_info.bssid,
|
|
&hdd_sta_ctx->conn_info.bssid,
|
|
dialog_id)) {
|
|
dialog_id)) {
|
|
hdd_debug("TWT session %d setup incomplete", dialog_id);
|
|
hdd_debug("TWT session %d setup incomplete", dialog_id);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return -EAGAIN;
|
|
}
|
|
}
|
|
|
|
|
|
ucfg_mlme_set_twt_command_in_progress(adapter->hdd_ctx->psoc,
|
|
ucfg_mlme_set_twt_command_in_progress(adapter->hdd_ctx->psoc,
|