Browse Source

qcacmn: Fix 6 GHz bss beamformee score 0 issue

Since 6 GHz bss doesn't support vht, can't get beamformer cap from vht cap,
beamformee score is always 0. 5 GHz bss has vht and beamformee score, so
always win 6 GHz bss of same mld if other conditions are same when select
candidate by score.

To fix it, for 6 GHz bss, get beamformer cap from eht cap.

Change-Id: Ic057928876a6ee58a96c3881d004886d0ac0d3fa
CRs-Fixed: 3249097
Jianmin Zhu 3 năm trước cách đây
mục cha
commit
b67f4a7465
1 tập tin đã thay đổi với 22 bổ sung0 xóa
  1. 22 0
      umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c

+ 22 - 0
umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c

@@ -1459,6 +1459,21 @@ static uint16_t cm_get_puncture_bw(struct scan_cache_entry *entry)
 	}
 	return num_puncture_bw * 20;
 }
+
+static bool cm_get_su_beam_former(struct scan_cache_entry *entry)
+{
+	struct wlan_ie_ehtcaps *eht_cap;
+	struct wlan_eht_cap_info *eht_cap_info;
+
+	eht_cap = (struct wlan_ie_ehtcaps *)util_scan_entry_ehtcap(entry);
+	if (eht_cap) {
+		eht_cap_info = (struct wlan_eht_cap_info *)eht_cap->eht_mac_cap;
+		if (eht_cap_info->su_beamformer)
+			return true;
+	}
+
+	return false;
+}
 #else
 static int cm_calculate_eht_score(struct scan_cache_entry *entry,
 				  struct scoring_cfg *score_config,
@@ -1472,6 +1487,11 @@ static uint16_t cm_get_puncture_bw(struct scan_cache_entry *entry)
 {
 	return 0;
 }
+
+static bool cm_get_su_beam_former(struct scan_cache_entry *entry)
+{
+	return false;
+}
 #endif
 
 #define CM_BAND_WIDTH_NUM 16
@@ -2081,6 +2101,8 @@ static int cm_calculate_bss_score(struct wlan_objmgr_psoc *psoc,
 	vht_cap = (struct wlan_ie_vhtcaps *)util_scan_entry_vhtcap(entry);
 	if (vht_cap && vht_cap->su_beam_former)
 		ap_su_beam_former = true;
+	else
+		ap_su_beam_former = cm_get_su_beam_former(entry);
 	if (phy_config->beamformee_cap && is_vht &&
 	    ap_su_beam_former &&
 	    (entry->rssi_raw > rssi_pref_5g_rssi_thresh) && !same_bucket)