From: "Arend van Spriel" <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, "Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 4/7] brcmfmac: start netif queues only when setup is completed successful
Date: Wed, 6 Nov 2013 23:07:19 +0100 [thread overview]
Message-ID: <1383775642-647-5-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1383775642-647-1-git-send-email-arend@broadcom.com>
Moving the call to netif_start_queue() after brcmf_cfg80211_up() is
completed successful. If not return -EIO instead of -1 as that results
in 'Operation not permitted' which can put user on wrong track.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index ab207e2..f4eeaa1 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -769,7 +769,6 @@ static int brcmf_netdev_open(struct net_device *ndev)
struct brcmf_pub *drvr = ifp->drvr;
struct brcmf_bus *bus_if = drvr->bus_if;
u32 toe_ol;
- s32 ret = 0;
brcmf_dbg(TRACE, "Enter, idx=%d\n", ifp->bssidx);
@@ -788,14 +787,14 @@ static int brcmf_netdev_open(struct net_device *ndev)
else
ndev->features &= ~NETIF_F_IP_CSUM;
- /* Allow transmit calls */
- netif_start_queue(ndev);
if (brcmf_cfg80211_up(ndev)) {
brcmf_err("failed to bring up cfg80211\n");
- return -1;
+ return -EIO;
}
- return ret;
+ /* Allow transmit calls */
+ netif_start_queue(ndev);
+ return 0;
}
static const struct net_device_ops brcmf_netdev_ops_pri = {
--
1.8.1.3
next prev parent reply other threads:[~2013-11-06 22:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 22:07 [PATCH 0/7] brcm80211: cleanup fixes and out-of-order fix Arend van Spriel
2013-11-06 22:07 ` [PATCH 1/7] brcmfmac: Update fwsignal to fix out of order tx Arend van Spriel
2013-11-06 22:07 ` [PATCH 2/7] brcmfmac: add separate function for passing bus tx overhead Arend van Spriel
2013-11-06 22:07 ` [PATCH 3/7] brcmfmac: replace dongle command list with .preinit() callback Arend van Spriel
2013-11-06 22:07 ` Arend van Spriel [this message]
2013-11-06 22:07 ` [PATCH 5/7] brcmfmac: remove empty brcmf_proto_stop Arend van Spriel
2013-11-06 22:07 ` [PATCH 6/7] brcmfmac: reduce logging noise accessing SDIO SleepCSR register Arend van Spriel
2013-11-06 23:53 ` Joe Perches
2013-11-07 9:31 ` Arend van Spriel
2013-11-06 22:07 ` [PATCH 7/7] brcmsmac: select CONFIG_BCMA when possible Arend van Spriel
2013-11-20 9:36 ` [PATCH 0/7] brcm80211: cleanup fixes and out-of-order fix Arend van Spriel
2013-11-20 16:29 ` John W. Linville
2013-11-20 17:30 ` Arend van Spriel
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=1383775642-647-5-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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).