linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kalle.valo@iki.fi>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 9/9] wl1251: fix sleep related error paths in wl1251_op_bss_info_changed()
Date: Sun, 03 Jan 2010 23:08:20 +0200	[thread overview]
Message-ID: <20100103210820.29287.1508.stgit@tikku> (raw)
In-Reply-To: <20100103210552.29287.20384.stgit@tikku>

From: Kalle Valo <kalle.valo@nokia.com>

In various cases wl1251_op_bss_info_changed() did not call elp_sleep()
after an error was noticed. Fix it by using correct goto label.

The bug was a theoretical one, in practise it doesn't matter because
if commands start returning errors there will be lots of other problems.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
---
 drivers/net/wireless/wl12xx/wl1251_main.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c
index 4728983..f17ce06 100644
--- a/drivers/net/wireless/wl12xx/wl1251_main.c
+++ b/drivers/net/wireless/wl12xx/wl1251_main.c
@@ -946,7 +946,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
 					      skb->data, skb->len);
 		dev_kfree_skb(skb);
 		if (ret < 0)
-			goto out;
+			goto out_sleep;
 
 		if (wl->bss_type != BSS_TYPE_IBSS) {
 			ret = wl1251_join(wl, wl->bss_type, wl->channel,
@@ -1018,7 +1018,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
 			ret = wl1251_acx_cts_protect(wl, CTSPROTECT_DISABLE);
 		if (ret < 0) {
 			wl1251_warning("Set ctsprotect failed %d", ret);
-			goto out;
+			goto out_sleep;
 		}
 	}
 
@@ -1029,7 +1029,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
 
 		if (ret < 0) {
 			dev_kfree_skb(beacon);
-			goto out;
+			goto out_sleep;
 		}
 
 		ret = wl1251_cmd_template_set(wl, CMD_PROBE_RESP, beacon->data,
@@ -1038,13 +1038,13 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
 		dev_kfree_skb(beacon);
 
 		if (ret < 0)
-			goto out;
+			goto out_sleep;
 
 		ret = wl1251_join(wl, wl->bss_type, wl->beacon_int,
 				  wl->channel, wl->dtim_period);
 
 		if (ret < 0)
-			goto out;
+			goto out_sleep;
 	}
 
 out_sleep:


  parent reply	other threads:[~2010-01-03 21:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-03 21:07 [PATCH 0/9] mac80211: templates for drivers Kalle Valo
2010-01-03 21:07 ` [PATCH 1/9] mac80211: add functions to create PS Poll and Nullfunc templates Kalle Valo
2010-01-03 21:07 ` [PATCH 2/9] mac80211: use PS Poll and Nullfunc templates when sending such frames Kalle Valo
2010-01-03 21:07 ` [PATCH 3/9] wl1251: get PS Poll and Nullfunc templates from mac80211 Kalle Valo
2010-01-03 21:07 ` [PATCH 4/9] mac80211: create Probe Request template Kalle Valo
2010-01-05  9:21   ` Johannes Berg
2010-01-05 10:15     ` Kalle Valo
2010-01-05 10:23       ` Johannes Berg
2010-01-03 21:07 ` [PATCH 5/9] mac80211: use Probe Request template when sending a direct scan Kalle Valo
2010-01-03 21:08 ` [PATCH 6/9] wl1251: cleanup scanning code Kalle Valo
2010-01-03 21:08 ` [PATCH 7/9] wl1251: get probe request template from mac80211 Kalle Valo
2010-01-03 21:08 ` [PATCH 8/9] wl1251: use mac80211 provided channel parameters in scanning Kalle Valo
2010-01-03 21:08 ` Kalle Valo [this message]
2010-01-05  9:22 ` [PATCH 0/9] mac80211: templates for drivers Johannes Berg
2010-01-05 10:17   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100103210820.29287.1508.stgit@tikku \
    --to=kalle.valo@iki.fi \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).