aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wlcore
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2012-06-18 11:15:50 -0400
committerLuciano Coelho <coelho@ti.com>2012-06-22 03:49:45 -0400
commit2b80040782af56e1b13ad451f593dd4e1875b2b8 (patch)
tree267fe2a51b764532c57f97c0cc280c07169dd87c /drivers/net/wireless/ti/wlcore
parentb0f0ad39e3d2716fe9ca6e50ce4cda87eb409ee0 (diff)
wlcore: Propagate errors from wl1271_read_hwaddr
Propagate errors from wl1271_read_hwaddr. This function is only used when reading the FW log (following a recovery), so don't read the FW log in case of a bus error. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore')
-rw-r--r--drivers/net/wireless/ti/wlcore/io.h4
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/ti/wlcore/io.h b/drivers/net/wireless/ti/wlcore/io.h
index 5e4a3d174004..4a6688b03aea 100644
--- a/drivers/net/wireless/ti/wlcore/io.h
+++ b/drivers/net/wireless/ti/wlcore/io.h
@@ -131,7 +131,7 @@ static inline int wlcore_read_data(struct wl1271 *wl, int reg, void *buf,
131 return wlcore_read(wl, wl->rtable[reg], buf, len, fixed); 131 return wlcore_read(wl, wl->rtable[reg], buf, len, fixed);
132} 132}
133 133
134static inline void wl1271_read_hwaddr(struct wl1271 *wl, int hwaddr, 134static inline int wlcore_read_hwaddr(struct wl1271 *wl, int hwaddr,
135 void *buf, size_t len, bool fixed) 135 void *buf, size_t len, bool fixed)
136{ 136{
137 int physical; 137 int physical;
@@ -142,7 +142,7 @@ static inline void wl1271_read_hwaddr(struct wl1271 *wl, int hwaddr,
142 142
143 physical = wlcore_translate_addr(wl, addr); 143 physical = wlcore_translate_addr(wl, addr);
144 144
145 wlcore_raw_read(wl, physical, buf, len, fixed); 145 return wlcore_raw_read(wl, physical, buf, len, fixed);
146} 146}
147 147
148static inline int wlcore_read32(struct wl1271 *wl, int addr, u32 *val) 148static inline int wlcore_read32(struct wl1271 *wl, int addr, u32 *val)
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 546fcb074c6e..b0795aac4bac 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -851,8 +851,10 @@ static void wl12xx_read_fwlog_panic(struct wl1271 *wl)
851 /* Traverse the memory blocks linked list */ 851 /* Traverse the memory blocks linked list */
852 do { 852 do {
853 memset(block, 0, WL12XX_HW_BLOCK_SIZE); 853 memset(block, 0, WL12XX_HW_BLOCK_SIZE);
854 wl1271_read_hwaddr(wl, addr, block, WL12XX_HW_BLOCK_SIZE, 854 ret = wlcore_read_hwaddr(wl, addr, block, WL12XX_HW_BLOCK_SIZE,
855 false); 855 false);
856 if (ret < 0)
857 goto out;
856 858
857 /* 859 /*
858 * Memory blocks are linked to one another. The first 4 bytes 860 * Memory blocks are linked to one another. The first 4 bytes