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

Commit 66340e5b authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Luciano Coelho
Browse files

wlcore: allow setting sleep_auth before interface init



Hold a value for sta_sleep_auth that is amenable to change by debugfs.
When detecting a legal value in this variable on interface init, use it
as an override value for sleep_auth.

This makes debugging more intuitive using the debugfs value.

Increment the conf version since we added an element to the conf
structure.

Note: An AP going up will always set sleep_auth to PSM_CAM.

Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 26b5858a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -246,6 +246,7 @@ static struct wlcore_conf wl12xx_conf = {
		.forced_ps                   = false,
		.keep_alive_interval         = 55000,
		.max_listen_interval         = 20,
		.sta_sleep_auth              = WL1271_PSM_ILLEGAL,
	},
	.itrim = {
		.enable = false,
+1 −0
Original line number Diff line number Diff line
@@ -372,6 +372,7 @@ static struct wlcore_conf wl18xx_conf = {
		.forced_ps                   = false,
		.keep_alive_interval         = 55000,
		.max_listen_interval         = 20,
		.sta_sleep_auth              = WL1271_PSM_ILLEGAL,
	},
	.itrim = {
		.enable = false,
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth)
	struct acx_sleep_auth *auth;
	int ret;

	wl1271_debug(DEBUG_ACX, "acx sleep auth");
	wl1271_debug(DEBUG_ACX, "acx sleep auth %d", sleep_auth);

	auth = kzalloc(sizeof(*auth), GFP_KERNEL);
	if (!auth) {
+3 −0
Original line number Diff line number Diff line
@@ -120,6 +120,9 @@ enum wl1271_psm_mode {
	WL1271_PSM_ELP = 2,

	WL1271_PSM_MAX = WL1271_PSM_ELP,

	/* illegal out of band value of PSM mode */
	WL1271_PSM_ILLEGAL = 0xff
};

struct acx_sleep_auth {
+7 −1
Original line number Diff line number Diff line
@@ -951,6 +951,12 @@ struct conf_conn_settings {
	 * Range: u16
	 */
	u8 max_listen_interval;

	/*
	 * Default sleep authorization for a new STA interface. This determines
	 * whether we can go to ELP.
	 */
	u8 sta_sleep_auth;
} __packed;

enum {
@@ -1276,7 +1282,7 @@ struct conf_hangover_settings {
 * version, the two LSB are the lower driver's private conf
 * version.
 */
#define WLCORE_CONF_VERSION	(0x0001 << 16)
#define WLCORE_CONF_VERSION	(0x0002 << 16)
#define WLCORE_CONF_MASK	0xffff0000
#define WLCORE_CONF_SIZE	(sizeof(struct wlcore_conf_header) +	\
				 sizeof(struct wlcore_conf))
Loading