ソースを参照

qcacld-3.0: Save connection info to assoc link adapter

Currently, both ML adapter and assoc link adapter are mapped to same
VDEV. Hence STA connection info is expected to be same. But,
connection info is getting updated in only in ML adapter but not in
assoc link adapter. As a result, connection info is wrongly interpreted
when it is accessed through assoc link adapter.

To resolve this, update connection info in assoc link adapter with
the connection info present in ML adapter.

This change also includes 11BE mode conversion support from cfgdot11mode
to 80211mode.

Change-Id: Idb8371a6bcf7fc9e2dcc5972d0504d326d9e0aca
CRs-Fixed: 3121835
Bapiraju Alla 3 年 前
コミット
8120c5e78e
2 ファイル変更34 行追加0 行削除
  1. 3 0
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 31 0
      core/hdd/src/wlan_hdd_cm_connect.c

+ 3 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -23366,6 +23366,9 @@ hdd_convert_cfgdot11mode_to_80211mode(enum csr_cfgdot11mode mode)
 		return QCA_WLAN_802_11_MODE_11AX;
 	case eCSR_CFG_DOT11_MODE_11AX_ONLY:
 		return QCA_WLAN_802_11_MODE_11AX;
+	case eCSR_CFG_DOT11_MODE_11BE:
+	case eCSR_CFG_DOT11_MODE_11BE_ONLY:
+		return QCA_WLAN_802_11_MODE_11BE;
 	case eCSR_CFG_DOT11_MODE_ABG:
 	case eCSR_CFG_DOT11_MODE_AUTO:
 	default:

+ 31 - 0
core/hdd/src/wlan_hdd_cm_connect.c

@@ -1083,6 +1083,29 @@ static bool hdd_cm_is_roam_auth_required(struct hdd_station_ctx *sta_ctx,
 }
 #endif
 
+#if defined(WLAN_FEATURE_11BE_MLO) && defined(CFG80211_11BE_BASIC)
+static
+struct hdd_adapter *hdd_get_assoc_link_adapter(struct hdd_adapter *ml_adapter)
+{
+	int i;
+
+	for (i = 0; i < WLAN_MAX_MLD; i++) {
+		if (hdd_adapter_is_associated_with_ml_adapter(
+		    ml_adapter->mlo_adapter_info.link_adapter[i])) {
+			return ml_adapter->mlo_adapter_info.link_adapter[i];
+		}
+	}
+	return NULL;
+}
+
+#else
+static
+struct hdd_adapter *hdd_get_assoc_link_adapter(struct hdd_adapter *ml_adapter)
+{
+	return NULL;
+}
+#endif
+
 static void
 hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 				       struct wlan_cm_connect_resp *rsp)
@@ -1102,6 +1125,7 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 	uint8_t uapsd_mask = 0;
 	uint32_t phymode;
 	uint32_t time_buffer_size;
+	struct hdd_adapter *assoc_link_adapter;
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	if (!hdd_ctx) {
@@ -1131,6 +1155,13 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 	hdd_cm_rec_connect_info(adapter, rsp);
 
 	hdd_cm_save_connect_info(adapter, rsp);
+	if (adapter->device_mode == QDF_STA_MODE &&
+	    hdd_adapter_is_ml_adapter(adapter)) {
+		/* Save connection info in assoc link adapter as well */
+		assoc_link_adapter = hdd_get_assoc_link_adapter(adapter);
+		if (assoc_link_adapter)
+			hdd_cm_save_connect_info(assoc_link_adapter, rsp);
+	}
 	phymode = wlan_reg_get_max_phymode(hdd_ctx->pdev, REG_PHYMODE_MAX,
 					   rsp->freq);
 	sta_ctx->reg_phymode = csr_convert_from_reg_phy_mode(phymode);