Commit 14beeed8 authored by Pagadala Yesu Anjaneyulu's avatar Pagadala Yesu Anjaneyulu Committed by Miri Korenblit
Browse files

wifi: iwlwifi: parse VLP AP not allowed nvm channel flag



OEMs need the option to enable/disable VLP AP.
Add NVM flag to control VLP AP configuration.

Signed-off-by: default avatarPagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250609211928.a433cb0ea0f3.Ifc6d7ba96d200dca0e3d38ec8d71625fd81a10ae@changeid
parent 34e33e39
Loading
Loading
Loading
Loading
+23 −18
Original line number Diff line number Diff line
@@ -160,6 +160,8 @@ static struct ieee80211_rate iwl_cfg80211_rates[] = {
 * @NVM_CHANNEL_DC_HIGH: DC HIGH required/allowed (?)
 * @NVM_CHANNEL_VLP: client support connection to UHB VLP AP
 * @NVM_CHANNEL_AFC: client support connection to UHB AFC AP
 * @NVM_CHANNEL_VLP_AP_NOT_ALLOWED: UHB VLP AP not allowed,
 *	Valid only when %NVM_CHANNEL_VLP is enabled.
 */
enum iwl_nvm_channel_flags {
	NVM_CHANNEL_VALID			= BIT(0),
@@ -177,6 +179,7 @@ enum iwl_nvm_channel_flags {
	NVM_CHANNEL_DC_HIGH			= BIT(12),
	NVM_CHANNEL_VLP				= BIT(13),
	NVM_CHANNEL_AFC				= BIT(14),
	NVM_CHANNEL_VLP_AP_NOT_ALLOWED		= BIT(15),
};

/**
@@ -1685,10 +1688,12 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan,
	}

	/* Set the AP type for the UHB case. */
	if (nvm_flags & NVM_CHANNEL_VLP)
	if (nvm_flags & NVM_CHANNEL_VLP) {
		if (!(nvm_flags & NVM_CHANNEL_VLP_AP_NOT_ALLOWED))
			flags |= NL80211_RRF_ALLOW_6GHZ_VLP_AP;
	else
	} else {
		flags |= NL80211_RRF_NO_6GHZ_VLP_CLIENT;
	}

	if (!(nvm_flags & NVM_CHANNEL_AFC))
		flags |= NL80211_RRF_NO_6GHZ_AFC_CLIENT;