Commit 3338084a authored by Franky Lin's avatar Franky Lin Committed by John W. Linville

brcm80211: fmac: postpone dongle RF enabling.

BRCMF_C_UP is the command that asks the firmware to enable RF of
dongle. Some firmware initialization steps must be performed during
RF is down. Postpone BRCMF_C_UP firing until brcmf_netdev_open get
called to ensure firmware have enough time to finish
initialization.
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8f1ab44d
...@@ -799,7 +799,6 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr) ...@@ -799,7 +799,6 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
{ {
char iovbuf[BRCMF_EVENTING_MASK_LEN + 12]; /* Room for char iovbuf[BRCMF_EVENTING_MASK_LEN + 12]; /* Room for
"event_msgs" + '\0' + bitvec */ "event_msgs" + '\0' + bitvec */
uint up = 0;
char buf[128], *ptr; char buf[128], *ptr;
u32 dongle_align = drvr->bus_if->align; u32 dongle_align = drvr->bus_if->align;
u32 glom = 0; u32 glom = 0;
...@@ -853,9 +852,6 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr) ...@@ -853,9 +852,6 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf,
sizeof(iovbuf)); sizeof(iovbuf));
/* Force STA UP */
brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_UP, (char *)&up, sizeof(up));
/* Setup event_msgs */ /* Setup event_msgs */
brcmf_c_mkiovar("event_msgs", drvr->eventmask, BRCMF_EVENTING_MASK_LEN, brcmf_c_mkiovar("event_msgs", drvr->eventmask, BRCMF_EVENTING_MASK_LEN,
iovbuf, sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
......
...@@ -799,6 +799,7 @@ static int brcmf_netdev_open(struct net_device *ndev) ...@@ -799,6 +799,7 @@ static int brcmf_netdev_open(struct net_device *ndev)
struct brcmf_bus *bus_if = drvr->bus_if; struct brcmf_bus *bus_if = drvr->bus_if;
u32 toe_ol; u32 toe_ol;
s32 ret = 0; s32 ret = 0;
uint up = 0;
brcmf_dbg(TRACE, "ifidx %d\n", ifp->idx); brcmf_dbg(TRACE, "ifidx %d\n", ifp->idx);
...@@ -822,6 +823,10 @@ static int brcmf_netdev_open(struct net_device *ndev) ...@@ -822,6 +823,10 @@ static int brcmf_netdev_open(struct net_device *ndev)
drvr->iflist[ifp->idx]->ndev->features &= drvr->iflist[ifp->idx]->ndev->features &=
~NETIF_F_IP_CSUM; ~NETIF_F_IP_CSUM;
} }
/* make sure RF is ready for work */
brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_UP, (char *)&up, sizeof(up));
/* Allow transmit calls */ /* Allow transmit calls */
netif_start_queue(ndev); netif_start_queue(ndev);
drvr->bus_if->drvr_up = true; drvr->bus_if->drvr_up = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment