diff options
author | Luciano Coelho <coelho@ti.com> | 2013-01-30 03:53:14 -0500 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2013-02-08 03:05:02 -0500 |
commit | 5dc283fe9ab360433aa05fcbe0f43cad40f68774 (patch) | |
tree | 3414e26db6b794d88c576ae5f25908408a805104 /drivers/net/wireless/ti | |
parent | 6cc9efed707c575a9e5880ea68f8b9d36b235f1f (diff) |
wlcore: don't hide real error code when booting fails
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>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index cd70335cd5e8..28a37576d568 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -2162,7 +2162,7 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif) | |||
2162 | return 0; | 2162 | return 0; |
2163 | } | 2163 | } |
2164 | 2164 | ||
2165 | static bool wl12xx_init_fw(struct wl1271 *wl) | 2165 | static int wl12xx_init_fw(struct wl1271 *wl) |
2166 | { | 2166 | { |
2167 | int retries = WL1271_BOOT_RETRIES; | 2167 | int retries = WL1271_BOOT_RETRIES; |
2168 | bool booted = false; | 2168 | bool booted = false; |
@@ -2228,7 +2228,7 @@ power_off: | |||
2228 | 2228 | ||
2229 | wl->state = WLCORE_STATE_ON; | 2229 | wl->state = WLCORE_STATE_ON; |
2230 | out: | 2230 | out: |
2231 | return booted; | 2231 | return ret; |
2232 | } | 2232 | } |
2233 | 2233 | ||
2234 | static bool wl12xx_dev_role_started(struct wl12xx_vif *wlvif) | 2234 | static bool wl12xx_dev_role_started(struct wl12xx_vif *wlvif) |
@@ -2371,7 +2371,6 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw, | |||
2371 | struct vif_counter_data vif_count; | 2371 | struct vif_counter_data vif_count; |
2372 | int ret = 0; | 2372 | int ret = 0; |
2373 | u8 role_type; | 2373 | u8 role_type; |
2374 | bool booted = false; | ||
2375 | 2374 | ||
2376 | vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER | | 2375 | vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER | |
2377 | IEEE80211_VIF_SUPPORTS_CQM_RSSI; | 2376 | IEEE80211_VIF_SUPPORTS_CQM_RSSI; |
@@ -2432,11 +2431,9 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw, | |||
2432 | */ | 2431 | */ |
2433 | memcpy(wl->addresses[0].addr, vif->addr, ETH_ALEN); | 2432 | memcpy(wl->addresses[0].addr, vif->addr, ETH_ALEN); |
2434 | 2433 | ||
2435 | booted = wl12xx_init_fw(wl); | 2434 | ret = wl12xx_init_fw(wl); |
2436 | if (!booted) { | 2435 | if (ret < 0) |
2437 | ret = -EINVAL; | ||
2438 | goto out; | 2436 | goto out; |
2439 | } | ||
2440 | } | 2437 | } |
2441 | 2438 | ||
2442 | ret = wl12xx_cmd_role_enable(wl, vif->addr, | 2439 | ret = wl12xx_cmd_role_enable(wl, vif->addr, |