diff options
author | Luciano Coelho <luciano.coelho@nokia.com> | 2009-06-12 07:15:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 14:57:45 -0400 |
commit | 0d1c38398fa8cd478a229b4428fb511f813376e8 (patch) | |
tree | 483441e09e49dd0f2c38da54020ce09ba8664c25 /drivers/net/wireless/wl12xx/wl1251.c | |
parent | a336e266640cd9f7be96b14ff09bbb37dfa646de (diff) |
wl12xx: moved firmware version reading routine to chip-specific functions
With WL1271, the firmware version can only be read right after booting the
chip. To keep WL1251 aligned with this procedure, the code that reads the
firmware version initially has been moved to a common place where it can be
read from both chipsets.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251.c b/drivers/net/wireless/wl12xx/wl1251.c index e484a231e6e..b793325d619 100644 --- a/drivers/net/wireless/wl12xx/wl1251.c +++ b/drivers/net/wireless/wl12xx/wl1251.c | |||
@@ -288,9 +288,6 @@ static int wl1251_boot(struct wl12xx *wl) | |||
288 | if (ret < 0) | 288 | if (ret < 0) |
289 | goto out; | 289 | goto out; |
290 | 290 | ||
291 | /* Get and save the firmware version */ | ||
292 | wl12xx_acx_fw_version(wl, wl->chip.fw_ver, sizeof(wl->chip.fw_ver)); | ||
293 | |||
294 | out: | 291 | out: |
295 | return ret; | 292 | return ret; |
296 | } | 293 | } |
@@ -394,6 +391,11 @@ static void wl1251_target_enable_interrupts(struct wl12xx *wl) | |||
394 | wl12xx_boot_target_enable_interrupts(wl); | 391 | wl12xx_boot_target_enable_interrupts(wl); |
395 | } | 392 | } |
396 | 393 | ||
394 | static void wl1251_fw_version(struct wl12xx *wl) | ||
395 | { | ||
396 | wl12xx_acx_fw_version(wl, wl->chip.fw_ver, sizeof(wl->chip.fw_ver)); | ||
397 | } | ||
398 | |||
397 | static void wl1251_irq_work(struct work_struct *work) | 399 | static void wl1251_irq_work(struct work_struct *work) |
398 | { | 400 | { |
399 | u32 intr; | 401 | u32 intr; |
@@ -709,6 +711,7 @@ void wl1251_setup(struct wl12xx *wl) | |||
709 | wl->chip.op_target_enable_interrupts = wl1251_target_enable_interrupts; | 711 | wl->chip.op_target_enable_interrupts = wl1251_target_enable_interrupts; |
710 | wl->chip.op_hw_init = wl1251_hw_init; | 712 | wl->chip.op_hw_init = wl1251_hw_init; |
711 | wl->chip.op_plt_init = wl1251_plt_init; | 713 | wl->chip.op_plt_init = wl1251_plt_init; |
714 | wl->chip.op_fw_version = wl1251_fw_version; | ||
712 | 715 | ||
713 | wl->chip.p_table = wl1251_part_table; | 716 | wl->chip.p_table = wl1251_part_table; |
714 | wl->chip.acx_reg_table = wl1251_acx_reg_table; | 717 | wl->chip.acx_reg_table = wl1251_acx_reg_table; |