mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacld-3.0: Set correct roam band mask
Currently, the driver sets roam band mask to REG_BAND_MASK_ALL(2.4G + 5G + 6G) when it receives the value of vendor bitmap as QCA_SETBAND_AUTO(0) regardless of whether the driver supports 6G or not. In case if the driver does not support 6G and userspace sends vendor bitmap as auto, the driver should convert roam band mask to REG_BAND_MASK_2G_AND_5G(2.4G + 5G). Change-Id: I45c2083aa18de8216ebdc8a9dbd22388d07c679a CRs-Fixed: 3068729
This commit is contained in:
parent
50bca68807
commit
0aebd5554e
1 changed files with 12 additions and 3 deletions
|
|
@ -12809,12 +12809,19 @@ const struct nla_policy setband_policy[QCA_WLAN_VENDOR_ATTR_MAX + 1] = {
|
|||
};
|
||||
|
||||
static uint32_t
|
||||
wlan_vendor_bitmap_to_reg_wifi_band_bitmap(uint32_t vendor_bitmap)
|
||||
wlan_vendor_bitmap_to_reg_wifi_band_bitmap(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t vendor_bitmap)
|
||||
{
|
||||
uint32_t reg_bitmap = 0;
|
||||
|
||||
if (vendor_bitmap == QCA_SETBAND_AUTO)
|
||||
if (vendor_bitmap == QCA_SETBAND_AUTO) {
|
||||
reg_bitmap |= REG_BAND_MASK_ALL;
|
||||
if (!wlan_reg_is_6ghz_supported(psoc)) {
|
||||
hdd_debug("Driver doesn't support 6ghz");
|
||||
reg_bitmap = (reg_bitmap & (~BIT(REG_BAND_6G)));
|
||||
}
|
||||
}
|
||||
|
||||
if (vendor_bitmap & QCA_SETBAND_2G)
|
||||
reg_bitmap |= BIT(REG_BAND_2G);
|
||||
if (vendor_bitmap & QCA_SETBAND_5G)
|
||||
|
|
@ -12859,7 +12866,9 @@ static int __wlan_hdd_cfg80211_setband(struct wiphy *wiphy,
|
|||
if (tb[QCA_WLAN_VENDOR_ATTR_SETBAND_MASK]) {
|
||||
band_mask = nla_get_u32(tb[QCA_WLAN_VENDOR_ATTR_SETBAND_MASK]);
|
||||
reg_wifi_band_bitmap =
|
||||
wlan_vendor_bitmap_to_reg_wifi_band_bitmap(band_mask);
|
||||
wlan_vendor_bitmap_to_reg_wifi_band_bitmap(hdd_ctx->psoc,
|
||||
band_mask);
|
||||
hdd_debug("[SET BAND] set band mask:%d", reg_wifi_band_bitmap);
|
||||
} else if (tb[QCA_WLAN_VENDOR_ATTR_SETBAND_VALUE]) {
|
||||
band_val = nla_get_u32(tb[QCA_WLAN_VENDOR_ATTR_SETBAND_VALUE]);
|
||||
reg_wifi_band_bitmap =
|
||||
|
|
|
|||
Loading…
Reference in a new issue