|
@@ -29,6 +29,7 @@
|
|
#include <wlan_cfg80211_mc_cp_stats.h>
|
|
#include <wlan_cfg80211_mc_cp_stats.h>
|
|
#include "wlan_osif_request_manager.h"
|
|
#include "wlan_osif_request_manager.h"
|
|
#include "wlan_objmgr_peer_obj.h"
|
|
#include "wlan_objmgr_peer_obj.h"
|
|
|
|
+#include "wlan_mlme_twt_ucfg_api.h"
|
|
|
|
|
|
/* max time in ms, caller may wait for stats request get serviced */
|
|
/* max time in ms, caller may wait for stats request get serviced */
|
|
#define CP_STATS_WAIT_TIME_STAT 800
|
|
#define CP_STATS_WAIT_TIME_STAT 800
|
|
@@ -821,6 +822,7 @@ wlan_cfg80211_mc_twt_clear_infra_cp_stats(
|
|
void *cookie;
|
|
void *cookie;
|
|
QDF_STATUS status;
|
|
QDF_STATUS status;
|
|
struct infra_cp_stats_event *priv;
|
|
struct infra_cp_stats_event *priv;
|
|
|
|
+ struct wlan_objmgr_psoc *psoc;
|
|
struct wlan_objmgr_peer *peer;
|
|
struct wlan_objmgr_peer *peer;
|
|
struct osif_request *request;
|
|
struct osif_request *request;
|
|
struct infra_cp_stats_cmd_info info = {0};
|
|
struct infra_cp_stats_cmd_info info = {0};
|
|
@@ -832,10 +834,19 @@ wlan_cfg80211_mc_twt_clear_infra_cp_stats(
|
|
|
|
|
|
osif_debug("Enter");
|
|
osif_debug("Enter");
|
|
|
|
|
|
|
|
+ psoc = wlan_vdev_get_psoc(vdev);
|
|
|
|
+ if (!psoc)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
request = osif_request_alloc(¶ms);
|
|
request = osif_request_alloc(¶ms);
|
|
if (!request)
|
|
if (!request)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
+ ucfg_mlme_set_twt_command_in_progress(psoc,
|
|
|
|
+ (struct qdf_mac_addr *)twt_peer_mac,
|
|
|
|
+ dialog_id,
|
|
|
|
+ WLAN_TWT_CLEAR_STATISTICS);
|
|
|
|
+
|
|
cookie = osif_request_cookie(request);
|
|
cookie = osif_request_cookie(request);
|
|
priv = osif_request_priv(request);
|
|
priv = osif_request_priv(request);
|
|
|
|
|
|
@@ -868,8 +879,7 @@ wlan_cfg80211_mc_twt_clear_infra_cp_stats(
|
|
}
|
|
}
|
|
wlan_objmgr_peer_release_ref(peer, WLAN_CP_STATS_ID);
|
|
wlan_objmgr_peer_release_ref(peer, WLAN_CP_STATS_ID);
|
|
|
|
|
|
- status = ucfg_infra_cp_stats_register_resp_cb(wlan_vdev_get_psoc(vdev),
|
|
|
|
- &info);
|
|
|
|
|
|
+ status = ucfg_infra_cp_stats_register_resp_cb(psoc, &info);
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
osif_err("Failed to register resp callback: %d", status);
|
|
osif_err("Failed to register resp callback: %d", status);
|
|
ret = qdf_status_to_os_return(status);
|
|
ret = qdf_status_to_os_return(status);
|
|
@@ -889,6 +899,10 @@ wlan_cfg80211_mc_twt_clear_infra_cp_stats(
|
|
osif_err("wait failed or timed out ret: %d", ret);
|
|
osif_err("wait failed or timed out ret: %d", ret);
|
|
|
|
|
|
clear_twt_stats_fail:
|
|
clear_twt_stats_fail:
|
|
|
|
+ ucfg_mlme_set_twt_command_in_progress(psoc,
|
|
|
|
+ (struct qdf_mac_addr *)twt_peer_mac,
|
|
|
|
+ dialog_id,
|
|
|
|
+ WLAN_TWT_NONE);
|
|
osif_request_put(request);
|
|
osif_request_put(request);
|
|
osif_debug("Exit");
|
|
osif_debug("Exit");
|
|
|
|
|