Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e464011 authored by Nirav Shah's avatar Nirav Shah Committed by Gerrit - the friendly Code Review server
Browse files

qcacld-3.0: Do not configure 6GHz band if 802.11ax not supported

Do not configure 6GHz band channels in wiphy if 802.11ax mode
not supported.

Change-Id: Iac05d5dd4751cef28d918a9f37ae32a1df6151a2
CRs-Fixed: 2748041
parent adcbfc20
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -16625,6 +16625,9 @@ QDF_STATUS wlan_hdd_update_wiphy_supported_band(struct hdd_context *hdd_ctx)
	    cfg->dot11Mode != eHDD_DOT11_MODE_11ax_ONLY)
		 wlan_hdd_band_5_ghz.vht_cap.vht_supported = 0;
	if (cfg->dot11Mode == eHDD_DOT11_MODE_AUTO ||
	    cfg->dot11Mode == eHDD_DOT11_MODE_11ax ||
	    cfg->dot11Mode == eHDD_DOT11_MODE_11ax_ONLY)
		hdd_init_6ghz(hdd_ctx);
	return QDF_STATUS_SUCCESS;
+26 −0
Original line number Diff line number Diff line
@@ -2195,6 +2195,29 @@ static void hdd_component_cfg_chan_to_freq(struct wlan_objmgr_pdev *pdev)
	ucfg_mlme_cfg_chan_to_freq(pdev);
}

static uint32_t hdd_update_band_cap_from_dot11mode(
		struct hdd_context *hdd_ctx, uint32_t band_capability)
{
	if (hdd_ctx->config->dot11Mode == eHDD_DOT11_MODE_AUTO)
		return band_capability;

	if (hdd_ctx->config->dot11Mode == eHDD_DOT11_MODE_11b ||
	    hdd_ctx->config->dot11Mode == eHDD_DOT11_MODE_11g ||
	    hdd_ctx->config->dot11Mode == eHDD_DOT11_MODE_11g_ONLY ||
	    hdd_ctx->config->dot11Mode == eHDD_DOT11_MODE_11b_ONLY)
		band_capability = (band_capability & (~BIT(REG_BAND_5G)));

	if (hdd_ctx->config->dot11Mode == eHDD_DOT11_MODE_11a)
		band_capability = (band_capability & (~BIT(REG_BAND_2G)));

	if (hdd_ctx->config->dot11Mode != eHDD_DOT11_MODE_11ax_ONLY &&
	    hdd_ctx->config->dot11Mode != eHDD_DOT11_MODE_11ax)
		band_capability = (band_capability & (~BIT(REG_BAND_6G)));

	qdf_debug("Update band capability %x", band_capability);
	return band_capability;
}

int hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg)
{
	int ret;
@@ -2280,6 +2303,9 @@ int hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg)
		goto pdev_close;
	}

	band_capability =
		hdd_update_band_cap_from_dot11mode(hdd_ctx, band_capability);

	/* first store the INI band capability */
	temp_band_cap = band_capability;