qcacld-3.0: Update ACS BW with HW Supported BW
In case if HW doesn't support 160 Mhz BW, driver doesn't update 160 Mhz capability in WIPHY and even in such case if Userspace configures ACS BW as 160 Mhz in hostapd, Driver selects this bw for acs without checking whether HW support this BW. This leads to mismatch between ACS BW and supported Wiphy BW and ultimately leading to SAP start failure for 160 Mhz for 5 ghz and 6 ghz band. So, Update ACS BW with HW Supported BW such that if hw doesn't support 160 Mhz bw then acs bw 160 Mhz shouldn't be selected. As in wiphy we won't enable 160 Mhz capability. Change-Id: I195b0e6bd0ce7640f136077ed9042c6e15088143 CRs-Fixed: 3170528
此提交包含在:
@@ -3202,6 +3202,59 @@ static void wlan_hdd_acs_set_eht_enabled(struct sap_config *sap_config,
|
||||
}
|
||||
#endif /* WLAN_FEATURE_11BE */
|
||||
|
||||
static uint16_t wlan_hdd_update_bw_from_mlme(struct hdd_context *hdd_ctx,
|
||||
struct sap_config *sap_config)
|
||||
{
|
||||
uint16_t ch_width, temp_ch_width = 0;
|
||||
QDF_STATUS status;
|
||||
uint8_t hw_mode = HW_MODE_DBS;
|
||||
struct wma_caps_per_phy caps_per_phy = {0};
|
||||
|
||||
ch_width = sap_config->acs_cfg.ch_width;
|
||||
|
||||
if (ch_width > CH_WIDTH_80P80MHZ)
|
||||
return ch_width;
|
||||
|
||||
/* 2.4ghz is already handled for acs */
|
||||
if (sap_config->acs_cfg.end_ch_freq <=
|
||||
WLAN_REG_CH_TO_FREQ(CHAN_ENUM_2484))
|
||||
return ch_width;
|
||||
|
||||
if (!policy_mgr_is_dbs_enable(hdd_ctx->psoc))
|
||||
hw_mode = HW_MODE_DBS_NONE;
|
||||
|
||||
status = wma_get_caps_for_phyidx_hwmode(&caps_per_phy, hw_mode,
|
||||
CDS_BAND_5GHZ);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
return ch_width;
|
||||
|
||||
switch (ch_width) {
|
||||
case CH_WIDTH_80P80MHZ:
|
||||
if (!(caps_per_phy.vht_5g & WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ))
|
||||
{
|
||||
if (caps_per_phy.vht_5g & WMI_VHT_CAP_CH_WIDTH_160MHZ)
|
||||
temp_ch_width = CH_WIDTH_160MHZ;
|
||||
else
|
||||
temp_ch_width = CH_WIDTH_80MHZ;
|
||||
}
|
||||
break;
|
||||
case CH_WIDTH_160MHZ:
|
||||
if (!((caps_per_phy.vht_5g & WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ)
|
||||
|| (caps_per_phy.vht_5g & WMI_VHT_CAP_CH_WIDTH_160MHZ)))
|
||||
temp_ch_width = CH_WIDTH_80MHZ;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!temp_ch_width)
|
||||
return ch_width;
|
||||
|
||||
hdd_debug("ch_width updated from %d to %d vht_5g: %x", ch_width,
|
||||
temp_ch_width, caps_per_phy.vht_5g);
|
||||
return temp_ch_width;
|
||||
}
|
||||
|
||||
/**
|
||||
* __wlan_hdd_cfg80211_do_acs(): CFG80211 handler function for DO_ACS Vendor CMD
|
||||
* @wiphy: Linux wiphy struct pointer
|
||||
@@ -3540,6 +3593,9 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
||||
channel_bonding_mode_2g);
|
||||
}
|
||||
|
||||
sap_config->acs_cfg.ch_width = wlan_hdd_update_bw_from_mlme(hdd_ctx,
|
||||
sap_config);
|
||||
|
||||
hdd_nofl_debug("ACS Config country %s ch_width %d hw_mode %d ACS_BW: %d HT: %d VHT: %d EHT: %d START_CH: %d END_CH: %d band %d",
|
||||
hdd_ctx->reg.alpha2, ch_width,
|
||||
sap_config->acs_cfg.hw_mode, sap_config->acs_cfg.ch_width,
|
||||
|
新增問題並參考
封鎖使用者