Skip to content

Commit

Permalink
brcm80211: fmac: discard packet received when net device not registered
Browse files Browse the repository at this point in the history
A new feature in the dongle firmware requires a handshake during
firmware intialization. The request is sent in event packets which the
host driver is not able to handle before any net device registered.
Discard those packets as the context for handling it is missing.
The initialization handler will be added as part of feature support
code in the future.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Franky Lin authored and John W. Linville committed Nov 28, 2011
1 parent a52dd17 commit 0c094c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,12 @@ void brcmf_rx_frame(struct brcmf_pub *drvr, int ifidx,
if (ifp == NULL)
ifp = drvr_priv->iflist[0];

if (!ifp || !ifp->ndev ||
ifp->ndev->reg_state != NETREG_REGISTERED) {
brcmu_pkt_buf_free_skb(skb);
continue;
}

skb->dev = ifp->ndev;
skb->protocol = eth_type_trans(skb, skb->dev);

Expand Down

0 comments on commit 0c094c7

Please sign in to comment.