|
@@ -35,7 +35,7 @@
|
|
|
#include <wlan_reg_services_api.h>
|
|
|
#include "wlan_cfg80211_mc_cp_stats.h"
|
|
|
#include "sir_api.h"
|
|
|
-
|
|
|
+#include "wlan_tdls_ucfg_api.h"
|
|
|
|
|
|
#define TDLS_MAX_NO_OF_2_4_CHANNELS 14
|
|
|
|
|
@@ -238,8 +238,6 @@ tdls_calc_channels_from_staparams(struct tdls_update_peer_params *req_info,
|
|
|
}
|
|
|
|
|
|
#ifdef WLAN_FEATURE_11AX
|
|
|
-#define MIN_TDLS_HE_CAP_LEN 17
|
|
|
-#define MAX_TDLS_HE_CAP_LEN 29
|
|
|
|
|
|
static void
|
|
|
wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info,
|
|
@@ -276,7 +274,8 @@ wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info,
|
|
|
|
|
|
static void
|
|
|
wlan_cfg80211_tdls_extract_params(struct tdls_update_peer_params *req_info,
|
|
|
- struct station_parameters *params)
|
|
|
+ struct station_parameters *params,
|
|
|
+ bool tdls_11ax_support)
|
|
|
{
|
|
|
int i;
|
|
|
|
|
@@ -356,8 +355,10 @@ wlan_cfg80211_tdls_extract_params(struct tdls_update_peer_params *req_info,
|
|
|
osif_debug("TDLS peer pmf capable");
|
|
|
req_info->is_pmf = 1;
|
|
|
}
|
|
|
-
|
|
|
- wlan_cfg80211_tdls_extract_he_params(req_info, params);
|
|
|
+ if (tdls_11ax_support)
|
|
|
+ wlan_cfg80211_tdls_extract_he_params(req_info, params);
|
|
|
+ else
|
|
|
+ osif_debug("tdls ax disabled");
|
|
|
}
|
|
|
|
|
|
int wlan_cfg80211_tdls_update_peer(struct wlan_objmgr_vdev *vdev,
|
|
@@ -369,6 +370,8 @@ int wlan_cfg80211_tdls_update_peer(struct wlan_objmgr_vdev *vdev,
|
|
|
struct vdev_osif_priv *osif_priv;
|
|
|
struct osif_tdls_vdev *tdls_priv;
|
|
|
unsigned long rc;
|
|
|
+ struct wlan_objmgr_psoc *psoc;
|
|
|
+ bool tdls_11ax_support = false;
|
|
|
|
|
|
status = wlan_cfg80211_tdls_validate_mac_addr(mac);
|
|
|
|
|
@@ -382,7 +385,14 @@ int wlan_cfg80211_tdls_update_peer(struct wlan_objmgr_vdev *vdev,
|
|
|
if (!req_info)
|
|
|
return -EINVAL;
|
|
|
|
|
|
- wlan_cfg80211_tdls_extract_params(req_info, params);
|
|
|
+ psoc = wlan_vdev_get_psoc(vdev);
|
|
|
+ if (!psoc) {
|
|
|
+ osif_err_rl("Invalid psoc");
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ tdls_11ax_support = ucfg_tdls_is_fw_11ax_capable(psoc);
|
|
|
+ wlan_cfg80211_tdls_extract_params(req_info, params, tdls_11ax_support);
|
|
|
|
|
|
osif_priv = wlan_vdev_get_ospriv(vdev);
|
|
|
if (!osif_priv || !osif_priv->osif_tdls) {
|