Explorar o código

qcacld-3.0: Add support for adaptive 11r

Adaptive 11r feature that enables the AP to support FT-AKM
without configuring the FT-AKM in the network. The AP will
advertise non-FT akm with a vendor specific IE having Adaptive
11r bit set to 1 in the IE data. The AP also advertises the
MDE in beacon/probe response.

The STA should check the adaptive 11r capability if the AP
advertises MDE in beacon/probe and adaptive 11r capability in
vendor specific IE.  If adaptive 11r capability is found,
STA should advertise the FT equivalent of the non-FT AKM.

Introdue a compile time flag WLAN_ADAPTIVE_11R_ENABLED to
enable/disable adaptive 11r support.

If the AP is adaptive 11r capable, set the is_adaptive_11r_ap
flag in bss descrtiptor. This flag will be sent in join request
and populated to pe_session. Also mark the CSR session as
adaptive 11r session based on this flag.

Add changes to check for the adaptive 11r service capability
advertised by firmware. If the host driver connects to adaptive
11r AP, enable RSO only if the firmware advertises adaptive
11r capability, else RSO should be disabled.

If the connection is adaptive 11r connection and if the adaptive
11r ini is enabled, set the adaptive_11r flag in
wmi_roam_11r_offload_tlv_param sent over the wmi command
WMI_ROAM_SCAN_MODE to the firmware. This will enable firmware to
filter the adaptive 11r AP from roam scan results.

Change-Id: If27a2393e3f4bb68942f5ebcec0135f57627f16b
CRs-Fixed: 2437988
Pragaspathi Thilagaraj %!s(int64=6) %!d(string=hai) anos
pai
achega
6ec1ca0054

+ 25 - 0
mlme/core/src/wlan_mlme_main.c

@@ -1513,6 +1513,30 @@ static void mlme_init_stats_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_REPORT_MAX_LINK_SPEED);
 }
 
+#ifdef WLAN_ADAPTIVE_11R
+/**
+ * mlme_init_adaptive_11r_cfg() - initialize enable_adaptive_11r
+ * flag
+ * @psoc: Pointer to PSOC
+ * @lfr:  pointer to mlme lfr config
+ *
+ * Return: None
+ */
+static void
+mlme_init_adaptive_11r_cfg(struct wlan_objmgr_psoc *psoc,
+			   struct wlan_mlme_lfr_cfg *lfr)
+{
+	lfr->enable_adaptive_11r = cfg_get(psoc, CFG_ADAPTIVE_11R);
+}
+
+#else
+static inline void
+mlme_init_adaptive_11r_cfg(struct wlan_objmgr_psoc *psoc,
+			   struct wlan_mlme_lfr_cfg *lfr)
+{
+}
+#endif
+
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 static void mlme_init_roam_offload_cfg(struct wlan_objmgr_psoc *psoc,
 				       struct wlan_mlme_lfr_cfg *lfr)
@@ -1752,6 +1776,7 @@ static void mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc,
 	mlme_init_roam_offload_cfg(psoc, lfr);
 	mlme_init_ese_cfg(psoc, lfr);
 	mlme_init_bss_load_trigger_params(psoc, &lfr->bss_load_trig);
+	mlme_init_adaptive_11r_cfg(psoc, lfr);
 	mlme_init_subnet_detection(psoc, lfr);
 }
 

+ 37 - 0
mlme/dispatcher/inc/cfg_mlme_lfr.h

@@ -2385,6 +2385,42 @@
 #define LFR_SUBNET_DETECTION_ALL
 #endif
 
+#ifdef WLAN_ADAPTIVE_11R
+/*
+ * <ini>
+ * adaptive_11r - Enable/disable adaptive 11r feature.
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * Adaptive 11r feature enables the AP to support FT-AKM without
+ * configuring the FT-AKM in the network. The AP will advertise non-FT akm
+ * with a vendor specific IE having Adaptive 11r bit set to 1 in the IE data.
+ * The AP also advertises the MDE in beacon/probe response.
+ *
+ * STA should check the adaptive 11r capability if the AP advertises MDE in
+ * beacon/probe and adaptive 11r capability in vendor specific IE.  If adaptive
+ * 11r capability is found, STA can advertise the FT equivalent of the non-FT
+ * AKM and connect with 11r protocol.
+ *
+ * Related: None.
+ *
+ * Supported Feature: Fast BSS Transition
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_ADAPTIVE_11R CFG_INI_BOOL( \
+		"enable_adaptive_11r", \
+		false, \
+		"Enable/disable adaptive 11r support")
+
+#define ADAPTIVE_11R_ALL CFG(CFG_ADAPTIVE_11R)
+#else
+#define ADAPTIVE_11R_ALL
+#endif
+
 /*
  * <ini>
  * roaming_scan_policy - To config roaming scan policy
@@ -2589,6 +2625,7 @@
 	CFG(CFG_POST_INACTIVITY_ROAM_SCAN_PERIOD) \
 	CFG(CFG_BSS_LOAD_TRIG_5G_RSSI_THRES) \
 	CFG(CFG_BSS_LOAD_TRIG_2G_RSSI_THRES) \
+	ADAPTIVE_11R_ALL \
 	ROAM_OFFLOAD_ALL \
 	LFR_ESE_ALL \
 	LFR_SUBNET_DETECTION_ALL

+ 7 - 0
mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -1352,6 +1352,9 @@ struct bss_load_trigger {
  * @roam_scan_hi_rssi_ub:           Upper bound after which 5GHz scan
  * @roam_prefer_5ghz:               Prefer roaming to 5GHz Bss
  * @roam_intra_band:                Prefer roaming within Band
+ * @enable_adaptive_11r             Flag to check if adaptive 11r ini is enabled
+ * @tgt_adaptive_11r_cap:           Flag to check if target supports adaptive
+ * 11r
  * @roam_scan_home_away_time:       The home away time to firmware
  * @roam_scan_n_probes:    The number of probes to be sent for firmware roaming
  * @delay_before_vdev_stop:Wait time for tx complete before vdev stop
@@ -1450,6 +1453,10 @@ struct wlan_mlme_lfr_cfg {
 	uint32_t roam_scan_hi_rssi_ub;
 	bool roam_prefer_5ghz;
 	bool roam_intra_band;
+#ifdef WLAN_ADAPTIVE_11R
+	bool enable_adaptive_11r;
+	bool tgt_adaptive_11r_cap;
+#endif
 	uint16_t roam_scan_home_away_time;
 	uint32_t roam_scan_n_probes;
 	uint8_t delay_before_vdev_stop;

+ 21 - 0
mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -1156,6 +1156,27 @@ QDF_STATUS
 ucfg_mlme_is_roam_scan_offload_enabled(struct wlan_objmgr_psoc *psoc,
 				       bool *val);
 
+#ifdef WLAN_ADAPTIVE_11R
+/**
+ * ucfg_mlme_set_tgt_adaptive_11r_cap() - Set adaptive 11r target service
+ * capability
+ * @psoc: pointer to psoc object
+ * @val:  Target capability of adaptive 11r
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS
+ucfg_mlme_set_tgt_adaptive_11r_cap(struct wlan_objmgr_psoc *psoc,
+				   bool val);
+#else
+static inline QDF_STATUS
+ucfg_mlme_set_tgt_adaptive_11r_cap(struct wlan_objmgr_psoc *psoc,
+				   bool val)
+{
+	return QDF_STATUS_SUCCESS;
+}
+#endif
+
 /**
  * ucfg_mlme_set_roam_scan_offload_enabled() - Set roam scan offload enable
  * @psoc: pointer to psoc object

+ 17 - 0
mlme/dispatcher/src/wlan_mlme_ucfg_api.c

@@ -849,6 +849,23 @@ ucfg_mlme_set_fast_transition_enabled(struct wlan_objmgr_psoc *psoc,
 	return QDF_STATUS_SUCCESS;
 }
 
+#ifdef WLAN_ADAPTIVE_11R
+QDF_STATUS
+ucfg_mlme_set_tgt_adaptive_11r_cap(struct wlan_objmgr_psoc *psoc,
+				   bool val)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj)
+		return QDF_STATUS_E_INVAL;
+
+	mlme_obj->cfg.lfr.tgt_adaptive_11r_cap = val;
+
+	return QDF_STATUS_SUCCESS;
+}
+#endif
+
 QDF_STATUS
 ucfg_mlme_is_roam_scan_offload_enabled(struct wlan_objmgr_psoc *psoc,
 				       bool *val)