qcacmn: Fix enum wlan_phymode to include proper phymode value
Few phymode are missing from enum wlan_phymode and many are not valid phymode, e.g for 5ghz 40minus and 40plus are not valid. So add the missing enums and remove invalid enums from enum wlan_phymode. Change-Id: Id6a1fb4cf0d629cc410bd262a048b5050d05ed5d CRs-fixed: 2505422
This commit is contained in:
@@ -396,20 +396,11 @@ static int32_t scm_calculate_bandwidth_score(
|
||||
cbmode = score_config->cb_mode_5G;
|
||||
}
|
||||
|
||||
if (entry->phy_mode == WLAN_PHYMODE_11AC_VHT80_80 ||
|
||||
entry->phy_mode == WLAN_PHYMODE_11AC_VHT160)
|
||||
if (IS_WLAN_PHYMODE_160MHZ(entry->phy_mode))
|
||||
ch_width_index = SCM_160MHZ_BW_INDEX;
|
||||
else if (entry->phy_mode == WLAN_PHYMODE_11AC_VHT80)
|
||||
ch_width_index = SCM_80MHZ_BW_INDEX;
|
||||
else if (entry->phy_mode == WLAN_PHYMODE_11NA_HT40PLUS ||
|
||||
entry->phy_mode == WLAN_PHYMODE_11NA_HT40MINUS ||
|
||||
entry->phy_mode == WLAN_PHYMODE_11NG_HT40PLUS ||
|
||||
entry->phy_mode == WLAN_PHYMODE_11NG_HT40MINUS ||
|
||||
entry->phy_mode == WLAN_PHYMODE_11NG_HT40 ||
|
||||
entry->phy_mode == WLAN_PHYMODE_11NA_HT40 ||
|
||||
entry->phy_mode == WLAN_PHYMODE_11AC_VHT40PLUS ||
|
||||
entry->phy_mode == WLAN_PHYMODE_11AC_VHT40MINUS ||
|
||||
entry->phy_mode == WLAN_PHYMODE_11AC_VHT40)
|
||||
else if (IS_WLAN_PHYMODE_80MHZ(entry->phy_mode))
|
||||
ch_width_index = SCM_80MHZ_BW_INDEX;
|
||||
else if (IS_WLAN_PHYMODE_40MHZ(entry->phy_mode))
|
||||
ch_width_index = SCM_40MHZ_BW_INDEX;
|
||||
else
|
||||
ch_width_index = SCM_20MHZ_BW_INDEX;
|
||||
|
@@ -205,14 +205,8 @@ util_scan_get_phymode_5g(struct scan_cache_entry *scan_params)
|
||||
if (util_scan_entry_vhtcap(scan_params) && vhtop) {
|
||||
switch (vhtop->vht_op_chwidth) {
|
||||
case WLAN_VHTOP_CHWIDTH_2040:
|
||||
if ((ht_cap & WLAN_HTCAP_C_CHWIDTH40) &&
|
||||
(htinfo->hi_extchoff ==
|
||||
WLAN_HTINFO_EXTOFFSET_ABOVE))
|
||||
phymode = WLAN_PHYMODE_11AC_VHT40PLUS;
|
||||
else if ((ht_cap & WLAN_HTCAP_C_CHWIDTH40) &&
|
||||
(htinfo->hi_extchoff ==
|
||||
WLAN_HTINFO_EXTOFFSET_BELOW))
|
||||
phymode = WLAN_PHYMODE_11AC_VHT40MINUS;
|
||||
if (ht_cap & WLAN_HTCAP_C_CHWIDTH40)
|
||||
phymode = WLAN_PHYMODE_11AC_VHT40;
|
||||
else
|
||||
phymode = WLAN_PHYMODE_11AC_VHT20;
|
||||
break;
|
||||
@@ -233,16 +227,14 @@ util_scan_get_phymode_5g(struct scan_cache_entry *scan_params)
|
||||
default:
|
||||
scm_err("bad channel: %d",
|
||||
vhtop->vht_op_chwidth);
|
||||
phymode = WLAN_PHYMODE_11AC_VHT20;
|
||||
break;
|
||||
}
|
||||
} else if ((ht_cap & WLAN_HTCAP_C_CHWIDTH40) &&
|
||||
(htinfo->hi_extchoff == WLAN_HTINFO_EXTOFFSET_ABOVE))
|
||||
phymode = WLAN_PHYMODE_11NA_HT40PLUS;
|
||||
else if ((ht_cap & WLAN_HTCAP_C_CHWIDTH40) &&
|
||||
(htinfo->hi_extchoff == WLAN_HTINFO_EXTOFFSET_BELOW))
|
||||
phymode = WLAN_PHYMODE_11NA_HT40MINUS;
|
||||
else
|
||||
} else if (ht_cap & WLAN_HTCAP_C_CHWIDTH40) {
|
||||
phymode = WLAN_PHYMODE_11NA_HT40;
|
||||
} else {
|
||||
phymode = WLAN_PHYMODE_11NA_HT20;
|
||||
}
|
||||
|
||||
return phymode;
|
||||
}
|
||||
@@ -291,6 +283,25 @@ util_scan_get_phymode_2g(struct scan_cache_entry *scan_params)
|
||||
}
|
||||
}
|
||||
|
||||
if (util_scan_entry_vhtcap(scan_params) && vhtop) {
|
||||
switch (vhtop->vht_op_chwidth) {
|
||||
case WLAN_VHTOP_CHWIDTH_2040:
|
||||
if (phymode == WLAN_PHYMODE_11NG_HT40PLUS)
|
||||
phymode = WLAN_PHYMODE_11AC_VHT40PLUS_2G;
|
||||
else if (phymode == WLAN_PHYMODE_11NG_HT40MINUS)
|
||||
phymode = WLAN_PHYMODE_11AC_VHT40MINUS_2G;
|
||||
else
|
||||
phymode = WLAN_PHYMODE_11AC_VHT20_2G;
|
||||
|
||||
break;
|
||||
default:
|
||||
scm_info("bad vht_op_chwidth: %d",
|
||||
vhtop->vht_op_chwidth);
|
||||
phymode = WLAN_PHYMODE_11AC_VHT20_2G;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return phymode;
|
||||
}
|
||||
|
||||
|
مرجع در شماره جدید
Block a user