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

Commit 3bfe616b authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wil6210: new vr profile with power management"

parents 71d620b6 7e50c6e9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2760,8 +2760,9 @@ static int wil_cfg80211_set_power_mgmt(struct wiphy *wiphy,
	struct wil6210_priv *wil = wiphy_to_wil(wiphy);
	enum wmi_ps_profile_type ps_profile;

	if (wil->vr_profile != WMI_VR_PROFILE_DISABLED)
		/* disallow in VR mode */
	if (wil->vr_profile != WMI_VR_PROFILE_DISABLED &&
	    wil->vr_profile != WMI_VR_PROFILE_COMMON_STA_PS)
		/* disallow in non-power management VR mode */
		return -EINVAL;

	wil_dbg_misc(wil, "enabled=%d, timeout=%d\n",
+6 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: ISC
/*
 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/moduleparam.h>
@@ -22,6 +22,7 @@
#define WIL_BOARD_FILE_MAX_NAMELEN 128
#define WIL6210_ITR_VR_RX_MAX_BURST_DURATION (5) /* usec */
#define WIL6210_VR_TX_RING_ORDER 10
#define WIL6210_VR_AGG_WSIZE 16

bool debug_fw; /* = false; */
module_param(debug_fw, bool, 0444);
@@ -1596,6 +1597,7 @@ int wil_vr_update_profile(struct wil6210_priv *wil, u8 profile)
		drop_if_ring_full = false;
		wil->rx_max_burst_duration =
			WIL6210_ITR_RX_MAX_BURST_DURATION_DEFAULT;
		agg_wsize = 0;

		return 0;
	}
@@ -1605,10 +1607,12 @@ int wil_vr_update_profile(struct wil6210_priv *wil, u8 profile)
		return rc;

	/* VR default configuration */
	if (profile != WMI_VR_PROFILE_COMMON_STA_PS)
		wil->ps_profile = WMI_PS_PROFILE_TYPE_PS_DISABLED;
	tx_ring_order = WIL6210_VR_TX_RING_ORDER;
	drop_if_ring_full = true;
	wil->rx_max_burst_duration = WIL6210_ITR_VR_RX_MAX_BURST_DURATION;
	agg_wsize = WIL6210_VR_AGG_WSIZE;

	return 0;
}
+2 −0
Original line number Diff line number Diff line
@@ -4341,6 +4341,8 @@ wil_get_vr_profile_name(enum wmi_vr_profile profile)
		return "COMMON_AP";
	case WMI_VR_PROFILE_COMMON_STA:
		return "COMMON_STA";
	case WMI_VR_PROFILE_COMMON_STA_PS:
		return "COMMON_STA_PS";
	default:
		return "unknown";
	}
+1 −0
Original line number Diff line number Diff line
@@ -4267,6 +4267,7 @@ enum wmi_vr_profile {
	WMI_VR_PROFILE_DISABLED		= 0,
	WMI_VR_PROFILE_COMMON_AP	= 1,
	WMI_VR_PROFILE_COMMON_STA	= 2,
	WMI_VR_PROFILE_COMMON_STA_PS	= 3,
	WMI_VR_PROFILE_RESERVED0	= 250,
	WMI_VR_PROFILE_RESERVED1	= 251,
	WMI_VR_PROFILE_RESERVED2	= 252,