From 30c5dbd1ee191dca1c04c70df0ba1adf0a9769c3 Mon Sep 17 00:00:00 2001 From: Luciano Coelho Date: Wed, 18 Jan 2012 14:53:22 +0200 Subject: wl12xx: read chip ID and HW PG version during probe In order to read the MAC addresses from the fuse ROM, we need to know the chip ID and the HW PG version. We need to know the MAC address during probe, because that's when we register our HW with mac80211. To prepare for that, this patch reads the chip ID and HW PG version during probe instead of doing it at boot time. We power the chip on briefly in order to do that. Signed-off-by: Luciano Coelho --- drivers/net/wireless/wl12xx/boot.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'drivers/net/wireless/wl12xx/boot.c') diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c index 84d295126edf..599919e2a60d 100644 --- a/drivers/net/wireless/wl12xx/boot.c +++ b/drivers/net/wireless/wl12xx/boot.c @@ -488,19 +488,6 @@ static int wl1271_boot_write_irq_polarity(struct wl1271 *wl) return 0; } -static void wl1271_boot_hw_version(struct wl1271 *wl) -{ - u32 fuse; - - if (wl->chip.id == CHIP_ID_1283_PG20) - fuse = wl1271_top_reg_read(wl, WL128X_REG_FUSE_DATA_2_1); - else - fuse = wl1271_top_reg_read(wl, WL127X_REG_FUSE_DATA_2_1); - fuse = (fuse & PG_VER_MASK) >> PG_VER_OFFSET; - - wl->hw_pg_ver = (s8)fuse; -} - static int wl128x_switch_tcxo_to_fref(struct wl1271 *wl) { u16 spare_reg; @@ -694,8 +681,6 @@ int wl1271_load_firmware(struct wl1271 *wl) u32 tmp, clk; int selected_clock = -1; - wl1271_boot_hw_version(wl); - if (wl->chip.id == CHIP_ID_1283_PG20) { ret = wl128x_boot_clk(wl, &selected_clock); if (ret < 0) -- cgit v1.2.3