Skip to content

Commit

Permalink
brcmfmac: check bus state to be data before sending data.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hante Meuleman authored and John W. Linville committed Nov 14, 2012
1 parent 256c374 commit 6034d0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/brcm80211/brcmfmac/fwil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6034d0a

Please sign in to comment.