Hi Luciano, On Tue, Jan 17, 2012 at 01:23, Luciano Coelho <coelho@xxxxxx> wrote: > Add a testmode command to retrieve the MAC address that is stored in > the Fuse ROM in newer PGs. In old PGs this operation is not > supported. > > Signed-off-by: Luciano Coelho <coelho@xxxxxx> > --- > drivers/net/wireless/wl12xx/boot.c | 3 +- > drivers/net/wireless/wl12xx/boot.h | 10 ---- > drivers/net/wireless/wl12xx/reg.h | 15 ++++++ > drivers/net/wireless/wl12xx/testmode.c | 87 ++++++++++++++++++++++++++++++++ > 4 files changed, 104 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/wireless/wl12xx/testmode.c b/drivers/net/wireless/wl12xx/testmode.c > index 25093c0..613e0b3 100644 > --- a/drivers/net/wireless/wl12xx/testmode.c > +++ b/drivers/net/wireless/wl12xx/testmode.c > @@ -264,6 +266,89 @@ static int wl1271_tm_cmd_recover(struct wl1271 *wl, struct nlattr *tb[]) > return 0; > } > > +static bool wl12xx_tm_mac_in_fuse(struct wl1271 *wl) > +{ > + bool supported = false; > + u8 major, minor; > + > + if (wl->chip.id == CHIP_ID_1283_PG20) { > + major = (wl->hw_pg_ver & WL128X_PG_MAJOR_VER_MASK) >> > + WL128X_PG_MAJOR_VER_OFFSET; > + minor = (wl->hw_pg_ver & WL128X_PG_MINOR_VER_MASK) >> > + WL128X_PG_MINOR_VER_OFFSET; > + > + /* in wl128x we have the MAC address if the PG is >= (2, 1) */ > + if (major > 2 || (major == 2 && minor >= 1)) > + supported = true; > + } else { > + major = (wl->hw_pg_ver & WL127X_PG_MAJOR_VER_MASK) >> > + WL127X_PG_MAJOR_VER_OFFSET; > + minor = (wl->hw_pg_ver & WL127X_PG_MINOR_VER_MASK) >> > + WL127X_PG_MINOR_VER_OFFSET; > + > + /* in wl127x we have the MAC address if the PG is >= (3, 1) */ > + if (major == 3 && minor >= 1) Is this test correct? Do only major == 3 PGs support this command? Thanks, -- Julian Calaby Email: julian.calaby@xxxxxxxxx Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/ -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html