brcmfmac: Remove drvr_up from bus interface.
authorHante Meuleman <meuleman@broadcom.com>
Wed, 6 Feb 2013 17:40:36 +0000 (18:40 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 8 Feb 2013 19:51:32 +0000 (14:51 -0500)
The tracking of up/down status in bus interface is unnecessary.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c

index 64c38f4226a3f145b57973a9369bd0f03f9040a4..57826dcbe9b9acac1a22869e014185e2a8debb3d 100644 (file)
@@ -72,7 +72,6 @@ struct brcmf_bus_ops {
  * @drvr: public driver information.
  * @state: operational state of the bus interface.
  * @maxctl: maximum size for rxctl request message.
- * @drvr_up: indicates driver up/down status.
  * @tx_realloc: number of tx packets realloced for headroom.
  * @dstats: dongle-based statistical data.
  * @align: alignment requirement for the bus.
@@ -87,7 +86,6 @@ struct brcmf_bus {
        struct brcmf_pub *drvr;
        enum brcmf_bus_state state;
        uint maxctl;
-       bool drvr_up;
        unsigned long tx_realloc;
        struct dngl_stats dstats;
        u8 align;
index e3326a58bdb17241a9c29e786550dbcccacd09d9..2104a4fb9e283c3af29b7cef5bcdce2c82a07601 100644 (file)
@@ -452,13 +452,7 @@ static int brcmf_ethtool(struct brcmf_if *ifp, void __user *uaddr)
                        sprintf(info.driver, "dhd");
                        strcpy(info.version, BRCMF_VERSION_STR);
                }
-
-               /* otherwise, require dongle to be up */
-               else if (!drvr->bus_if->drvr_up) {
-                       brcmf_err("dongle is not up\n");
-                       return -ENODEV;
-               }
-               /* finally, report dongle driver type */
+               /* report dongle driver type */
                else
                        sprintf(info.driver, "wl");
 
@@ -545,18 +539,11 @@ static int brcmf_netdev_ioctl_entry(struct net_device *ndev, struct ifreq *ifr,
 
 static int brcmf_netdev_stop(struct net_device *ndev)
 {
-       struct brcmf_if *ifp = netdev_priv(ndev);
-       struct brcmf_pub *drvr = ifp->drvr;
-
        brcmf_dbg(TRACE, "Enter\n");
 
-       if (drvr->bus_if->drvr_up == 0)
-               return 0;
-
        brcmf_cfg80211_down(ndev);
 
        /* Set state and stop OS transmissions */
-       drvr->bus_if->drvr_up = false;
        netif_stop_queue(ndev);
 
        return 0;
@@ -591,7 +578,6 @@ static int brcmf_netdev_open(struct net_device *ndev)
 
        /* Allow transmit calls */
        netif_start_queue(ndev);
-       drvr->bus_if->drvr_up = true;
        if (brcmf_cfg80211_up(ndev)) {
                brcmf_err("failed to bring up cfg80211\n");
                return -1;
index 7fef9b5ba00364b2c65d88049e580a06288e0032..df8a185719514a09615e20693ba3a3dc048a503e 100644 (file)
@@ -1962,8 +1962,7 @@ static uint brcmf_sdbrcm_sendfromq(struct brcmf_sdio *bus, uint maxframes)
        }
 
        /* Deflow-control stack if needed */
-       if (bus->sdiodev->bus_if->drvr_up &&
-           (bus->sdiodev->bus_if->state == BRCMF_BUS_DATA) &&
+       if ((bus->sdiodev->bus_if->state == BRCMF_BUS_DATA) &&
            bus->txoff && (pktq_len(&bus->txq) < TXLOW)) {
                bus->txoff = false;
                brcmf_txflowblock(bus->sdiodev->dev, false);
@@ -3308,9 +3307,6 @@ static int brcmf_sdbrcm_download_nvram(struct brcmf_sdio *bus)
 {
        int ret;
 
-       if (bus->sdiodev->bus_if->drvr_up)
-               return -EISCONN;
-
        ret = request_firmware(&bus->firmware, BRCMF_SDIO_NV_NAME,
                               &bus->sdiodev->func[2]->dev);
        if (ret) {