Procházet zdrojové kódy

qcacld-3.0: Add missing implementation for 11be association

Currently below implementation is missing in the driver. So driver
is failing to associate in 11be. Add this implementation to support
11be association in the driver
  - Filling EHT IEs in probe response
  - Sending EHT mcs capabilities while creating the peer
  - Fix compilation issues when 11BE feature is enabled
  - Add the the 320MHZ to wma_chan_phy_mode

Change-Id: Ib535db413d5578840feed7fd18bb00e5e28cfb6f
CRs-Fixed: 2926471
Bapiraju Alla před 4 roky
rodič
revize
feddfb47cb

+ 39 - 2
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

@@ -271,6 +271,26 @@ static const char *cm_diag_get_ch_width_str(uint8_t ch_width)
 	}
 }
 
+#ifdef WLAN_FEATURE_11BE
+static const
+char *cm_diag_get_eht_dot11_mode_str(enum mgmt_dot11_mode dot11mode)
+{
+
+	switch (dot11mode) {
+	CASE_RETURN_STRING(DOT11_MODE_11BE);
+	CASE_RETURN_STRING(DOT11_MODE_11BE_ONLY);
+	default:
+		return "Unknown";
+	}
+}
+#else
+static const
+char *cm_diag_get_eht_dot11_mode_str(enum mgmt_dot11_mode dot11mode)
+{
+	return "Unknown";
+}
+#endif
+
 static const char *cm_diag_get_dot11_mode_str(enum mgmt_dot11_mode dot11mode)
 {
 	switch (dot11mode) {
@@ -287,7 +307,7 @@ static const char *cm_diag_get_dot11_mode_str(enum mgmt_dot11_mode dot11mode)
 	CASE_RETURN_STRING(DOT11_MODE_11AX);
 	CASE_RETURN_STRING(DOT11_MODE_11AX_ONLY);
 	default:
-		return "Unknown";
+		return cm_diag_get_eht_dot11_mode_str(dot11mode);
 	}
 }
 
@@ -368,6 +388,23 @@ static const uint8_t *cm_diag_get_akm_str(enum mgmt_auth_type auth_type,
 		return "NONE";
 }
 
+#ifdef WLAN_FEATURE_11BE
+static enum mgmt_dot11_mode
+cm_diag_eht_dot11_mode_from_phy_mode(enum wlan_phymode phymode)
+{
+	if (IS_WLAN_PHYMODE_EHT(phymode))
+		return DOT11_MODE_11BE;
+	else
+		return DOT11_MODE_MAX;
+}
+#else
+static enum mgmt_dot11_mode
+cm_diag_eht_dot11_mode_from_phy_mode(enum wlan_phymode phymode)
+{
+	return DOT11_MODE_MAX;
+}
+#endif
+
 static enum mgmt_dot11_mode
 cm_diag_dot11_mode_from_phy_mode(enum wlan_phymode phymode)
 {
@@ -390,7 +427,7 @@ cm_diag_dot11_mode_from_phy_mode(enum wlan_phymode phymode)
 		else if (IS_WLAN_PHYMODE_HE(phymode))
 			return DOT11_MODE_11AX;
 		else
-			return DOT11_MODE_MAX;
+			return cm_diag_eht_dot11_mode_from_phy_mode(phymode);
 	}
 }
 

+ 0 - 10
core/hdd/src/wlan_hdd_eht.c

@@ -148,13 +148,3 @@ void hdd_update_wiphy_eht_cap(struct hdd_context *hdd_ctx,
 	hdd_exit();
 }
 
-void wlan_hdd_check_11be_support(struct hdd_beacon_data *beacon,
-				 struct sap_config *config)
-{
-	const uint8_t *ie;
-
-	ie = wlan_get_ext_ie_ptr_from_ext_id(EHT_CAP_OUI_TYPE, EHT_CAP_OUI_SIZE,
-					     beacon->tail, beacon->tail_len);
-	if (ie)
-		config->SapHw_mode = eCSR_DOT11_MODE_11be;
-}

+ 0 - 4
core/mac/src/pe/lim/lim_process_assoc_req_frame.c

@@ -2781,10 +2781,6 @@ lim_convert_channel_width_enum(enum phy_ch_width ch_width)
 #endif
 	case CH_WIDTH_MAX:
 		return eHT_MAX_CHANNEL_WIDTH;
-#ifdef WLAN_FEATURE_11BE
-	case CH_WIDTH_320MHZ:
-		return eHT_CHANNEL_WIDTH_320MHZ;
-#endif
 	case CH_WIDTH_5MHZ:
 		break;
 	case CH_WIDTH_10MHZ:

+ 16 - 0
core/mac/src/pe/sch/sch_beacon_gen.c

@@ -943,6 +943,22 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(struct mac_context *mac,
 			     sizeof(beacon2->he_6ghz_band_cap));
 	}
 
+	if (beacon2->eht_cap.present) {
+		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
+					DOT11F_EID_EHT_CAP);
+		qdf_mem_copy((void *)&prb_rsp->eht_cap,
+			     (void *)&beacon2->eht_cap,
+			     sizeof(beacon2->eht_cap));
+	}
+
+	if (beacon2->eht_op.present) {
+		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
+					DOT11F_EID_EHT_OP);
+		qdf_mem_copy((void *)&prb_rsp->eht_op,
+			     (void *)&beacon2->eht_op,
+			     sizeof(beacon2->eht_op));
+	}
+
 }
 
 void set_probe_rsp_ie_bitmap(uint32_t *IeBitmap, uint32_t pos)

+ 1 - 1
core/sme/src/common/sme_api.c

@@ -15123,7 +15123,7 @@ void sme_reset_eht_caps(mac_handle_t mac_handle, uint8_t vdev_id)
 	}
 	sme_debug("reset EHT caps");
 	mac_ctx->mlme_cfg->eht_caps.dot11_eht_cap =
-		mac_ctx->mlme_cfg->eht_caps.eht_cap_orig;
+		mac_ctx->mlme_cfg->eht_caps.dot11_eht_cap;
 	csr_update_session_eht_cap(mac_ctx, session);
 
 	wlan_cm_reset_check_6ghz_security(mac_ctx->psoc);

+ 20 - 0
core/sme/src/csr/csr_api_roam.c

@@ -1800,6 +1800,26 @@ uint32_t csr_convert_phy_cb_state_to_ini_value(ePhyChanBondState phyCbState)
 void csr_update_session_eht_cap(struct mac_context *mac_ctx,
 				struct csr_roam_session *session)
 {
+	tDot11fIEeht_cap *eht_cap;
+	struct wlan_objmgr_vdev *vdev;
+	struct mlme_legacy_priv *mlme_priv;
+
+	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc,
+						    session->vdev_id,
+						    WLAN_LEGACY_SME_ID);
+	if (!vdev)
+		return;
+	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
+	if (!mlme_priv) {
+		wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
+		return;
+	}
+	qdf_mem_copy(&mlme_priv->eht_config,
+		     &mac_ctx->mlme_cfg->eht_caps.dot11_eht_cap,
+		     sizeof(mlme_priv->eht_config));
+	eht_cap = &mlme_priv->eht_config;
+	eht_cap->present = true;
+	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
 }
 #endif
 

+ 13 - 1
core/wma/src/wma_eht.c

@@ -104,7 +104,7 @@ void wma_update_target_ext_eht_cap(struct target_psoc_info *tgt_hdl,
 					    mac_cap->eht_cap_phy_info_2G);
 			wma_convert_eht_cap(eht_cap_2g,
 					    mac_cap->eht_cap_info_2G,
-					    mac_cap->eht_cap_info_2G,
+					    mac_cap->eht_cap_phy_info_2G);
 		}
 
 		if (supported_bands & WLAN_5G_CAPABILITY) {
@@ -163,6 +163,18 @@ void wma_populate_peer_eht_cap(struct peer_assoc_params *peer,
 	else
 		return;
 
+	qdf_mem_copy(peer->peer_eht_cap_macinfo, peer->peer_he_cap_macinfo,
+		     sizeof(mac_cap));
+	qdf_mem_copy(peer->peer_he_cap_phyinfo, peer->peer_he_cap_phyinfo,
+		     sizeof(peer->peer_he_cap_phyinfo));
+
+	qdf_mem_copy(peer->peer_eht_rx_mcs_set, peer->peer_he_rx_mcs_set,
+		     sizeof(peer->peer_he_rx_mcs_set));
+	qdf_mem_copy(peer->peer_eht_tx_mcs_set, peer->peer_he_tx_mcs_set,
+		     sizeof(peer->peer_he_tx_mcs_set));
+
+	peer->peer_eht_mcs_count = peer->peer_he_mcs_count;
+
 	wma_print_eht_cap(eht_cap);
 	wma_debug("Peer EHT Capabilities:");
 	wma_print_eht_phy_cap(phy_cap);

+ 46 - 0
core/wma/src/wma_features.c

@@ -557,6 +557,44 @@ QDF_STATUS wma_process_dhcp_ind(WMA_HANDLE handle,
 					    &peer_set_param_fp);
 }
 
+#ifdef WLAN_FEATURE_11BE
+static enum wlan_phymode
+wma_eht_chan_phy_mode(uint32_t freq, uint8_t dot11_mode, uint16_t bw_val,
+		      enum phy_ch_width chan_width)
+{
+	if((dot11_mode == MLME_DOT11_MODE_11BE) ||
+		(dot11_mode == MLME_DOT11_MODE_11BE_ONLY))
+	{
+		if (wlan_reg_is_24ghz_ch_freq(freq)) {
+			if (bw_val == 20)
+				return WLAN_PHYMODE_11BEG_EHT20;
+			else if (bw_val == 40)
+				return WLAN_PHYMODE_11BEG_EHT40;
+		} else {
+			if (bw_val == 20)
+				return WLAN_PHYMODE_11BEA_EHT20;
+			else if (bw_val == 40)
+				return WLAN_PHYMODE_11BEA_EHT40;
+			else if (bw_val == 80)
+				return WLAN_PHYMODE_11BEA_EHT80;
+			else if (chan_width == CH_WIDTH_160MHZ)
+				return WLAN_PHYMODE_11BEA_EHT160;
+			else if (chan_width == CH_WIDTH_320MHZ)
+				return WLAN_PHYMODE_11BEA_EHT320;
+		}
+	}
+
+	return WLAN_PHYMODE_AUTO;
+}
+#else
+static enum wlan_phymode
+wma_eht_chan_phy_mode(uint32_t freq, uint8_t dot11_mode, uint16_t bw_val,
+		      enum phy_ch_width chan_width)
+{
+	return WLAN_PHYMODE_AUTO;
+}
+#endif
+
 enum wlan_phymode wma_chan_phy_mode(uint32_t freq, enum phy_ch_width chan_width,
 				    uint8_t dot11_mode)
 {
@@ -619,6 +657,10 @@ enum wlan_phymode wma_chan_phy_mode(uint32_t freq, enum phy_ch_width chan_width,
 					phymode = WLAN_PHYMODE_11AXG_HE40;
 				break;
 			default:
+				phymode = wma_eht_chan_phy_mode(freq,
+								dot11_mode,
+								bw_val,
+								chan_width);
 				break;
 			}
 		}
@@ -674,6 +716,10 @@ enum wlan_phymode wma_chan_phy_mode(uint32_t freq, enum phy_ch_width chan_width,
 					phymode = WLAN_PHYMODE_11AXA_HE80_80;
 				break;
 			default:
+				phymode = wma_eht_chan_phy_mode(freq,
+								dot11_mode,
+								bw_val,
+								chan_width);
 				break;
 			}
 		}