summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
diff options
context:
space:
mode:
authorFranky Lin <frankyl@broadcom.com>2011-12-16 18:37:04 -0800
committerJohn W. Linville <linville@tuxdriver.com>2011-12-19 14:40:45 -0500
commit3fb1d8d2dad35f5094350c175b778b78df894284 (patch)
tree65fe010fac16fd127b81b64b1d0b0625710ed8ec /drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
parentb01a6b3ca714e2bb86ee387aee487c7360363c93 (diff)
downloadlwn-3fb1d8d2dad35f5094350c175b778b78df894284.tar.gz
lwn-3fb1d8d2dad35f5094350c175b778b78df894284.zip
brcm80211: fmac: move driver up status to struct brcmf_bus
Driver up/down status to network interface need to be shared by common layer and bus layer. Move it to bus interface structure brcmf_bus as part of the fullmac bus interface refactoring. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index 576cdc418b0e..5e9acf86d725 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -273,7 +273,7 @@ static void brcmf_netdev_set_multicast_list(struct net_device *ndev)
int brcmf_sendpkt(struct brcmf_pub *drvr, int ifidx, struct sk_buff *pktbuf)
{
/* Reject if down */
- if (!drvr->up || (drvr->bus_if->state == BRCMF_BUS_DOWN))
+ if (!drvr->bus_if->drvr_up || (drvr->bus_if->state == BRCMF_BUS_DOWN))
return -ENODEV;
/* Update multicast statistic */
@@ -303,10 +303,10 @@ static int brcmf_netdev_start_xmit(struct sk_buff *skb, struct net_device *ndev)
brcmf_dbg(TRACE, "Enter\n");
/* Reject if down */
- if (!drvr->up ||
+ if (!drvr->bus_if->drvr_up ||
(drvr->bus_if->state == BRCMF_BUS_DOWN)) {
- brcmf_dbg(ERROR, "xmit rejected pub.up=%d state=%d\n",
- drvr->up,
+ brcmf_dbg(ERROR, "xmit rejected drvup=%d state=%d\n",
+ drvr->bus_if->drvr_up,
drvr->bus_if->state);
netif_stop_queue(ndev);
return -ENODEV;
@@ -487,7 +487,7 @@ static struct net_device_stats *brcmf_netdev_get_stats(struct net_device *ndev)
brcmf_dbg(TRACE, "Enter\n");
- if (drvr->up)
+ if (drvr->bus_if->drvr_up)
/* Use the protocol to get dongle stats */
brcmf_proto_dstats(drvr);
@@ -633,7 +633,7 @@ static int brcmf_ethtool(struct brcmf_pub *drvr, void __user *uaddr)
}
/* otherwise, require dongle to be up */
- else if (!drvr->up) {
+ else if (!drvr->bus_if->drvr_up) {
brcmf_dbg(ERROR, "dongle is not up\n");
return -ENODEV;
}
@@ -785,11 +785,11 @@ static int brcmf_netdev_stop(struct net_device *ndev)
brcmf_dbg(TRACE, "Enter\n");
brcmf_cfg80211_down(drvr->config);
- if (drvr->up == 0)
+ if (drvr->bus_if->drvr_up == 0)
return 0;
/* Set state and stop OS transmissions */
- drvr->up = 0;
+ drvr->bus_if->drvr_up = 0;
netif_stop_queue(ndev);
return 0;
@@ -826,7 +826,7 @@ static int brcmf_netdev_open(struct net_device *ndev)
}
/* Allow transmit calls */
netif_start_queue(ndev);
- drvr->up = 1;
+ drvr->bus_if->drvr_up = 1;
if (brcmf_cfg80211_up(drvr->config)) {
brcmf_dbg(ERROR, "failed to bring up cfg80211\n");
return -1;