* [PATCH 0/2] wl12xx: read MAC from fuse rom @ 2012-01-16 14:23 Luciano Coelho 2012-01-16 14:23 ` [PATCH 1/2] wl12xx: move partition table definition to io.c Luciano Coelho 2012-01-16 14:23 ` [PATCH 2/2] wl12xx: add operation to retrieve the MAC address from Fuse ROM Luciano Coelho 0 siblings, 2 replies; 7+ messages in thread From: Luciano Coelho @ 2012-01-16 14:23 UTC (permalink / raw) To: linux-wireless; +Cc: coelho Hi, This patchset implements a new testmode command to read the MAC address from the fuse when available (it's only correctly burnt for newer PG versions). In theory, we can read the MAC in either PLT or normal mode, but I wanted to restrict it to PLT so people don't start doing funny things without knowing what they're doing. Patches to use this new feature with ti-utils calibrator tool will soon be released. Cheers, Luca. Luciano Coelho (2): wl12xx: move partition table definition to io.c wl12xx: add operation to retrieve the MAC address from Fuse ROM drivers/net/wireless/wl12xx/boot.c | 62 +---------------------- drivers/net/wireless/wl12xx/boot.h | 10 ---- drivers/net/wireless/wl12xx/io.c | 59 +++++++++++++++++++++ drivers/net/wireless/wl12xx/io.h | 2 + drivers/net/wireless/wl12xx/reg.h | 15 ++++++ drivers/net/wireless/wl12xx/testmode.c | 87 ++++++++++++++++++++++++++++++++ 6 files changed, 165 insertions(+), 70 deletions(-) -- 1.7.4.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] wl12xx: move partition table definition to io.c 2012-01-16 14:23 [PATCH 0/2] wl12xx: read MAC from fuse rom Luciano Coelho @ 2012-01-16 14:23 ` Luciano Coelho 2012-01-16 14:23 ` [PATCH 2/2] wl12xx: add operation to retrieve the MAC address from Fuse ROM Luciano Coelho 1 sibling, 0 replies; 7+ messages in thread From: Luciano Coelho @ 2012-01-16 14:23 UTC (permalink / raw) To: linux-wireless; +Cc: coelho Up till now we only needed to access the partition table in boot.c. But to add support for reading the MAC address from the FUSE in testmode, we will have to change the partition in testmode.c. Thus, we move the partition table to io.c and export it via io.h. It makes more sense to have it in the io part anyway. Signed-off-by: Luciano Coelho <coelho@ti.com> --- drivers/net/wireless/wl12xx/boot.c | 59 ------------------------------------ drivers/net/wireless/wl12xx/io.c | 59 ++++++++++++++++++++++++++++++++++++ drivers/net/wireless/wl12xx/io.h | 2 + 3 files changed, 61 insertions(+), 59 deletions(-) diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c index 8f9cf5a..9197a07 100644 --- a/drivers/net/wireless/wl12xx/boot.c +++ b/drivers/net/wireless/wl12xx/boot.c @@ -33,65 +33,6 @@ #include "event.h" #include "rx.h" -static struct wl1271_partition_set part_table[PART_TABLE_LEN] = { - [PART_DOWN] = { - .mem = { - .start = 0x00000000, - .size = 0x000177c0 - }, - .reg = { - .start = REGISTERS_BASE, - .size = 0x00008800 - }, - .mem2 = { - .start = 0x00000000, - .size = 0x00000000 - }, - .mem3 = { - .start = 0x00000000, - .size = 0x00000000 - }, - }, - - [PART_WORK] = { - .mem = { - .start = 0x00040000, - .size = 0x00014fc0 - }, - .reg = { - .start = REGISTERS_BASE, - .size = 0x0000a000 - }, - .mem2 = { - .start = 0x003004f8, - .size = 0x00000004 - }, - .mem3 = { - .start = 0x00040404, - .size = 0x00000000 - }, - }, - - [PART_DRPW] = { - .mem = { - .start = 0x00040000, - .size = 0x00014fc0 - }, - .reg = { - .start = DRPW_BASE, - .size = 0x00006000 - }, - .mem2 = { - .start = 0x00000000, - .size = 0x00000000 - }, - .mem3 = { - .start = 0x00000000, - .size = 0x00000000 - } - } -}; - static void wl1271_boot_set_ecpu_ctrl(struct wl1271 *wl, u32 flag) { u32 cpu_ctrl; diff --git a/drivers/net/wireless/wl12xx/io.c b/drivers/net/wireless/wl12xx/io.c index 079ad38..6ad0181 100644 --- a/drivers/net/wireless/wl12xx/io.c +++ b/drivers/net/wireless/wl12xx/io.c @@ -45,6 +45,65 @@ #define OCP_STATUS_REQ_FAILED 0x20000 #define OCP_STATUS_RESP_ERROR 0x30000 +struct wl1271_partition_set part_table[PART_TABLE_LEN] = { + [PART_DOWN] = { + .mem = { + .start = 0x00000000, + .size = 0x000177c0 + }, + .reg = { + .start = REGISTERS_BASE, + .size = 0x00008800 + }, + .mem2 = { + .start = 0x00000000, + .size = 0x00000000 + }, + .mem3 = { + .start = 0x00000000, + .size = 0x00000000 + }, + }, + + [PART_WORK] = { + .mem = { + .start = 0x00040000, + .size = 0x00014fc0 + }, + .reg = { + .start = REGISTERS_BASE, + .size = 0x0000a000 + }, + .mem2 = { + .start = 0x003004f8, + .size = 0x00000004 + }, + .mem3 = { + .start = 0x00040404, + .size = 0x00000000 + }, + }, + + [PART_DRPW] = { + .mem = { + .start = 0x00040000, + .size = 0x00014fc0 + }, + .reg = { + .start = DRPW_BASE, + .size = 0x00006000 + }, + .mem2 = { + .start = 0x00000000, + .size = 0x00000000 + }, + .mem3 = { + .start = 0x00000000, + .size = 0x00000000 + } + } +}; + bool wl1271_set_block_size(struct wl1271 *wl) { if (wl->if_ops->set_block_size) { diff --git a/drivers/net/wireless/wl12xx/io.h b/drivers/net/wireless/wl12xx/io.h index d398cbc..458f1f1 100644 --- a/drivers/net/wireless/wl12xx/io.h +++ b/drivers/net/wireless/wl12xx/io.h @@ -43,6 +43,8 @@ #define HW_ACCESS_PRAM_MAX_RANGE 0x3c000 +extern struct wl1271_partition_set part_table[PART_TABLE_LEN]; + struct wl1271; void wl1271_disable_interrupts(struct wl1271 *wl); -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] wl12xx: add operation to retrieve the MAC address from Fuse ROM 2012-01-16 14:23 [PATCH 0/2] wl12xx: read MAC from fuse rom Luciano Coelho 2012-01-16 14:23 ` [PATCH 1/2] wl12xx: move partition table definition to io.c Luciano Coelho @ 2012-01-16 14:23 ` Luciano Coelho 2012-01-17 0:46 ` Julian Calaby 1 sibling, 1 reply; 7+ messages in thread From: Luciano Coelho @ 2012-01-16 14:23 UTC (permalink / raw) To: linux-wireless; +Cc: coelho 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@ti.com> --- 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/boot.c b/drivers/net/wireless/wl12xx/boot.c index 9197a07..8c46182 100644 --- a/drivers/net/wireless/wl12xx/boot.c +++ b/drivers/net/wireless/wl12xx/boot.c @@ -639,7 +639,8 @@ static int wl127x_boot_clk(struct wl1271 *wl) u32 pause; u32 clk; - if (((wl->hw_pg_ver & PG_MAJOR_VER_MASK) >> PG_MAJOR_VER_OFFSET) < 3) + if (((wl->hw_pg_ver & + WL127X_PG_MAJOR_VER_MASK) >> WL127X_PG_MAJOR_VER_OFFSET) < 3) wl->quirks |= WL12XX_QUIRK_END_OF_TRANSACTION; if (wl->ref_clock == CONF_REF_CLK_19_2_E || diff --git a/drivers/net/wireless/wl12xx/boot.h b/drivers/net/wireless/wl12xx/boot.h index 06dad93..c3adc09 100644 --- a/drivers/net/wireless/wl12xx/boot.h +++ b/drivers/net/wireless/wl12xx/boot.h @@ -55,16 +55,6 @@ struct wl1271_static_data { #define OCP_REG_CLK_POLARITY 0x0cb2 #define OCP_REG_CLK_PULL 0x0cb4 -#define WL127X_REG_FUSE_DATA_2_1 0x050a -#define WL128X_REG_FUSE_DATA_2_1 0x2152 -#define PG_VER_MASK 0x3c -#define PG_VER_OFFSET 2 - -#define PG_MAJOR_VER_MASK 0x3 -#define PG_MAJOR_VER_OFFSET 0x0 -#define PG_MINOR_VER_MASK 0xc -#define PG_MINOR_VER_OFFSET 0x2 - #define CMD_MBOX_ADDRESS 0x407B4 #define POLARITY_LOW BIT(1) diff --git a/drivers/net/wireless/wl12xx/reg.h b/drivers/net/wireless/wl12xx/reg.h index df34d59..d649bf5 100644 --- a/drivers/net/wireless/wl12xx/reg.h +++ b/drivers/net/wireless/wl12xx/reg.h @@ -525,4 +525,19 @@ b12-b0 - Supported Rate indicator bits as defined below. */ #define INTR_TRIG_TX_PROC1 BIT(18) +#define WL127X_REG_FUSE_DATA_2_1 0x050a +#define WL128X_REG_FUSE_DATA_2_1 0x2152 +#define PG_VER_MASK 0x3c +#define PG_VER_OFFSET 2 + +#define WL127X_PG_MAJOR_VER_MASK 0x3 +#define WL127X_PG_MAJOR_VER_OFFSET 0x0 +#define WL127X_PG_MINOR_VER_MASK 0xc +#define WL127X_PG_MINOR_VER_OFFSET 0x2 + +#define WL128X_PG_MAJOR_VER_MASK 0xc +#define WL128X_PG_MAJOR_VER_OFFSET 0x2 +#define WL128X_PG_MINOR_VER_MASK 0x3 +#define WL128X_PG_MINOR_VER_OFFSET 0x0 + #endif 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 @@ -30,6 +30,7 @@ #include "acx.h" #include "reg.h" #include "ps.h" +#include "io.h" #define WL1271_TM_MAX_DATA_LENGTH 1024 @@ -41,6 +42,7 @@ enum wl1271_tm_commands { WL1271_TM_CMD_NVS_PUSH, /* Not in use. Keep to not break ABI */ WL1271_TM_CMD_SET_PLT_MODE, WL1271_TM_CMD_RECOVER, + WL1271_TM_CMD_GET_MAC, __WL1271_TM_CMD_AFTER_LAST }; @@ -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) + supported = true; + } + + wl1271_debug(DEBUG_TESTMODE, + "PG Ver major = %d minor = %d, MAC %s present", + major, minor, supported ? "is" : "is not"); + + return supported; +} + +static int wl12xx_tm_cmd_get_mac(struct wl1271 *wl, struct nlattr *tb[]) +{ + struct sk_buff *skb; + u8 mac_addr[ETH_ALEN]; + u32 tmp; + int ret = 0; + + if (wl->state != WL1271_STATE_PLT) { + ret = -EINVAL; + goto out; + } + + if(!wl12xx_tm_mac_in_fuse(wl)) { + ret = -EOPNOTSUPP; + goto out; + } + + wl1271_set_partition(wl, &part_table[PART_DRPW]); + + tmp = wl1271_read32(wl, 0x00310eb4); + mac_addr[2] = (tmp & 0xff000000) >> 24; + mac_addr[3] = (tmp & 0xff0000) >> 16; + mac_addr[4] = (tmp & 0xff00) >> 8; + mac_addr[5] = tmp & 0xff; + + tmp = wl1271_read32(wl, 0x00310eb8); + mac_addr[0] = (tmp & 0xff00) >> 8; + mac_addr[1] = tmp & 0xff; + + wl1271_set_partition(wl, &part_table[PART_WORK]); + + skb = cfg80211_testmode_alloc_reply_skb(wl->hw->wiphy, sizeof(ETH_ALEN)); + if (!skb) { + ret = -ENOMEM; + goto out; + } + + NLA_PUT(skb, WL1271_TM_ATTR_DATA, ETH_ALEN, mac_addr); + ret = cfg80211_testmode_reply(skb); + if (ret < 0) + goto out; + +out: + return ret; + +nla_put_failure: + kfree_skb(skb); + ret = -EMSGSIZE; + goto out; +} + int wl1271_tm_cmd(struct ieee80211_hw *hw, void *data, int len) { struct wl1271 *wl = hw->priv; @@ -288,6 +373,8 @@ int wl1271_tm_cmd(struct ieee80211_hw *hw, void *data, int len) return wl1271_tm_cmd_set_plt_mode(wl, tb); case WL1271_TM_CMD_RECOVER: return wl1271_tm_cmd_recover(wl, tb); + case WL1271_TM_CMD_GET_MAC: + return wl12xx_tm_cmd_get_mac(wl, tb); default: return -EOPNOTSUPP; } -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] wl12xx: add operation to retrieve the MAC address from Fuse ROM 2012-01-16 14:23 ` [PATCH 2/2] wl12xx: add operation to retrieve the MAC address from Fuse ROM Luciano Coelho @ 2012-01-17 0:46 ` Julian Calaby 2012-01-17 3:48 ` Luciano Coelho 0 siblings, 1 reply; 7+ messages in thread From: Julian Calaby @ 2012-01-17 0:46 UTC (permalink / raw) To: Luciano Coelho; +Cc: linux-wireless Hi Luciano, On Tue, Jan 17, 2012 at 01:23, Luciano Coelho <coelho@ti.com> 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@ti.com> > --- > 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@gmail.com Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] wl12xx: add operation to retrieve the MAC address from Fuse ROM 2012-01-17 0:46 ` Julian Calaby @ 2012-01-17 3:48 ` Luciano Coelho 2012-01-17 3:51 ` Julian Calaby 0 siblings, 1 reply; 7+ messages in thread From: Luciano Coelho @ 2012-01-17 3:48 UTC (permalink / raw) To: Julian Calaby; +Cc: linux-wireless On Tue, 2012-01-17 at 11:46 +1100, Julian Calaby wrote: > Hi Luciano, > > On Tue, Jan 17, 2012 at 01:23, Luciano Coelho <coelho@ti.com> 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@ti.com> > > --- > > 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? Yes, major == 3 and minor greater than or equal to 1. Actually, there can't be a major greater than 3, because it's only 2 bits, so 3 is the maximum value. -- Cheers, Luca. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] wl12xx: add operation to retrieve the MAC address from Fuse ROM 2012-01-17 3:48 ` Luciano Coelho @ 2012-01-17 3:51 ` Julian Calaby 2012-01-17 4:02 ` Luciano Coelho 0 siblings, 1 reply; 7+ messages in thread From: Julian Calaby @ 2012-01-17 3:51 UTC (permalink / raw) To: Luciano Coelho; +Cc: linux-wireless Hi Luciano, On Tue, Jan 17, 2012 at 14:48, Luciano Coelho <coelho@ti.com> wrote: > On Tue, 2012-01-17 at 11:46 +1100, Julian Calaby wrote: >> Hi Luciano, >> >> On Tue, Jan 17, 2012 at 01:23, Luciano Coelho <coelho@ti.com> 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@ti.com> >> > --- >> > 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? > > Yes, major == 3 and minor greater than or equal to 1. Actually, there > can't be a major greater than 3, because it's only 2 bits, so 3 is the > maximum value. Just wanted to check as it seemed odd compared to the block for the WL128X parts. I'm guessing TI never expected these parts to last long enough to have more than 3 major revisions =) Thanks, -- Julian Calaby Email: julian.calaby@gmail.com Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] wl12xx: add operation to retrieve the MAC address from Fuse ROM 2012-01-17 3:51 ` Julian Calaby @ 2012-01-17 4:02 ` Luciano Coelho 0 siblings, 0 replies; 7+ messages in thread From: Luciano Coelho @ 2012-01-17 4:02 UTC (permalink / raw) To: Julian Calaby; +Cc: linux-wireless On Tue, 2012-01-17 at 14:51 +1100, Julian Calaby wrote: > On Tue, Jan 17, 2012 at 14:48, Luciano Coelho <coelho@ti.com> wrote: > > On Tue, 2012-01-17 at 11:46 +1100, Julian Calaby wrote: > >> > + /* 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? > > > > Yes, major == 3 and minor greater than or equal to 1. Actually, there > > can't be a major greater than 3, because it's only 2 bits, so 3 is the > > maximum value. > > Just wanted to check as it seemed odd compared to the block for the > WL128X parts. I'm guessing TI never expected these parts to last long > enough to have more than 3 major revisions =) Yeah, and 16 HW revisions in total is usually more than enough. And, if really needed, there may be some bits elsewhere to be used. I understand your point and I actually had a similar check as for wl128x, but then I realized the "major >= 3" was useless and removed it. Thanks for looking into this! :) -- Cheers, Luca. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-01-17 4:02 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-01-16 14:23 [PATCH 0/2] wl12xx: read MAC from fuse rom Luciano Coelho 2012-01-16 14:23 ` [PATCH 1/2] wl12xx: move partition table definition to io.c Luciano Coelho 2012-01-16 14:23 ` [PATCH 2/2] wl12xx: add operation to retrieve the MAC address from Fuse ROM Luciano Coelho 2012-01-17 0:46 ` Julian Calaby 2012-01-17 3:48 ` Luciano Coelho 2012-01-17 3:51 ` Julian Calaby 2012-01-17 4:02 ` Luciano Coelho
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox