qcacld-3.0: Consider Only dot11mode profiles if configured

If device is configured to Only dot11mode profile. Don't
connect to lesser profile the configured.

Change-Id: I7bf5157c0d7324c5ee7c4cdaac7806c0991d5dae
CRs-Fixed: 2683763
This commit is contained in:
Utkarsh Bhatnagar 2020-05-15 20:09:39 +05:30 committed by nshrivas
parent 2eee1707ab
commit 0d0fadb0dd

View File

@ -5299,6 +5299,8 @@ static bool csr_roam_select_bss(struct mac_context *mac_ctx,
struct wlan_objmgr_vdev *vdev;
enum policy_mgr_con_mode mode;
QDF_STATUS qdf_status;
eCsrPhyMode self_phymode = mac_ctx->roam.configParam.phyMode;
tDot11fBeaconIEs *bcn_ies;
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac_ctx->pdev,
vdev_id,
@ -5321,6 +5323,29 @@ static bool csr_roam_select_bss(struct mac_context *mac_ctx,
* sessions exempted
*/
result = &scan_result->Result;
bcn_ies = result->pvIes;
/*
* If phymode is configured to DOT11 Only profile.
* Don't connect to profile which is less than them.
*/
if (bcn_ies && ((self_phymode == eCSR_DOT11_MODE_11n_ONLY &&
!bcn_ies->HTCaps.present) ||
(self_phymode == eCSR_DOT11_MODE_11ac_ONLY &&
!bcn_ies->VHTCaps.present) ||
(self_phymode == eCSR_DOT11_MODE_11ax_ONLY &&
!bcn_ies->he_cap.present))) {
sme_info("self_phymode %d mismatch HT %d VHT %d HE %d",
self_phymode, bcn_ies->HTCaps.present,
bcn_ies->VHTCaps.present,
bcn_ies->he_cap.present);
*roam_state = eCsrStopRoamingDueToConcurrency;
status = true;
*roam_bss_entry = csr_ll_next(&bss_list->List,
*roam_bss_entry,
LL_ACCESS_LOCK);
continue;
}
/*
* Ignore the BSS if any other vdev is already connected
* to it.