* [PATCH] wlcore: don't hide real error code when booting fails
@ 2013-01-30 8:53 Luciano Coelho
2013-02-08 9:20 ` Luciano Coelho
0 siblings, 1 reply; 2+ messages in thread
From: Luciano Coelho @ 2013-01-30 8:53 UTC (permalink / raw)
To: linux-wireless; +Cc: coelho
There's no need to hide the actual error that was reported when
booting fails. For instance, on I/O error, we were returing
-EINVALID, which doesn't make sense at all.
Signed-off-by: Luciano Coelho <coelho@ti.com>
---
drivers/net/wireless/ti/wlcore/main.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 731dd26..6455e2d 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -2072,7 +2072,7 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif)
return 0;
}
-static bool wl12xx_init_fw(struct wl1271 *wl)
+static int wl12xx_init_fw(struct wl1271 *wl)
{
int retries = WL1271_BOOT_RETRIES;
bool booted = false;
@@ -2138,7 +2138,7 @@ power_off:
wl->state = WLCORE_STATE_ON;
out:
- return booted;
+ return ret;
}
static bool wl12xx_dev_role_started(struct wl12xx_vif *wlvif)
@@ -2206,7 +2206,6 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
struct vif_counter_data vif_count;
int ret = 0;
u8 role_type;
- bool booted = false;
vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER |
IEEE80211_VIF_SUPPORTS_CQM_RSSI;
@@ -2263,11 +2262,9 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
*/
memcpy(wl->addresses[0].addr, vif->addr, ETH_ALEN);
- booted = wl12xx_init_fw(wl);
- if (!booted) {
- ret = -EINVAL;
+ ret = wl12xx_init_fw(wl);
+ if (ret < 0)
goto out;
- }
}
ret = wl12xx_cmd_role_enable(wl, vif->addr,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] wlcore: don't hide real error code when booting fails
2013-01-30 8:53 [PATCH] wlcore: don't hide real error code when booting fails Luciano Coelho
@ 2013-02-08 9:20 ` Luciano Coelho
0 siblings, 0 replies; 2+ messages in thread
From: Luciano Coelho @ 2013-02-08 9:20 UTC (permalink / raw)
To: linux-wireless
On Wed, 2013-01-30 at 10:53 +0200, Luciano Coelho wrote:
> There's no need to hide the actual error that was reported when
> booting fails. For instance, on I/O error, we were returing
> -EINVALID, which doesn't make sense at all.
>
> Signed-off-by: Luciano Coelho <coelho@ti.com>
> ---
Applied.
--
Luca.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-08 9:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-30 8:53 [PATCH] wlcore: don't hide real error code when booting fails Luciano Coelho
2013-02-08 9:20 ` Luciano Coelho
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.