brcmfmac: check bus state to be data before sending data.
authorHante Meuleman <meuleman@broadcom.com>
Tue, 6 Nov 2012 00:22:29 +0000 (16:22 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 14 Nov 2012 19:56:02 +0000 (14:56 -0500)
brcmf_netdev_start_xmit and brcmf_fil_cmd_data are checking
bus state for down. These functions should check for data
state.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
drivers/net/wireless/brcm80211/brcmfmac/fwil.c

index 0f81f31be018aeb4ce7d91aff4d0f9b78fd0fd97..a0d8950ed5b1b95698fdee52980393967627fad3 100644 (file)
@@ -216,7 +216,7 @@ static int brcmf_netdev_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 
        /* Reject if down */
        if (!drvr->bus_if->drvr_up ||
-           (drvr->bus_if->state == BRCMF_BUS_DOWN)) {
+           (drvr->bus_if->state != BRCMF_BUS_DATA)) {
                brcmf_dbg(ERROR, "xmit rejected drvup=%d state=%d\n",
                          drvr->bus_if->drvr_up,
                          drvr->bus_if->state);
index f121d412495a3965e42ec91769046130a9071970..62e0960c1d3ef2751cd56e04c938da8f24cfa517 100644 (file)
@@ -35,7 +35,7 @@ brcmf_fil_cmd_data(struct brcmf_if *ifp, u32 cmd, void *data, u32 len, bool set)
        struct brcmf_pub *drvr = ifp->drvr;
        s32 err;
 
-       if (drvr->bus_if->state == BRCMF_BUS_DOWN) {
+       if (drvr->bus_if->state != BRCMF_BUS_DATA) {
                brcmf_dbg(ERROR, "bus is down. we have nothing to do.\n");
                return -EIO;
        }