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

Commit 4503183a authored by Larry Finger's avatar Larry Finger Committed by John W. Linville
Browse files

ssb: Fix all-ones boardflags



In the SSB SPROM a field set to all ones means the value
is not defined in the SPROM.
In case of the boardflags, we need to set them to zero
to avoid confusing drivers. Drivers will only check the
flags by ANDing.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGabor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9fc38458
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -484,6 +484,11 @@ static int sprom_extract(struct ssb_bus *bus, struct ssb_sprom *out,
			goto unsupported;
	}

	if (out->boardflags_lo == 0xFFFF)
		out->boardflags_lo = 0;  /* per specs */
	if (out->boardflags_hi == 0xFFFF)
		out->boardflags_hi = 0;  /* per specs */

	return 0;
unsupported:
	ssb_printk(KERN_WARNING PFX "Unsupported SPROM revision %d "