Commit 05dde977 authored by Hante Meuleman's avatar Hante Meuleman Committed by John W. Linville

brcmfmac: Remove drvr_up from bus interface.

The tracking of up/down status in bus interface is unnecessary.
Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 008e33f7
...@@ -72,7 +72,6 @@ struct brcmf_bus_ops { ...@@ -72,7 +72,6 @@ struct brcmf_bus_ops {
* @drvr: public driver information. * @drvr: public driver information.
* @state: operational state of the bus interface. * @state: operational state of the bus interface.
* @maxctl: maximum size for rxctl request message. * @maxctl: maximum size for rxctl request message.
* @drvr_up: indicates driver up/down status.
* @tx_realloc: number of tx packets realloced for headroom. * @tx_realloc: number of tx packets realloced for headroom.
* @dstats: dongle-based statistical data. * @dstats: dongle-based statistical data.
* @align: alignment requirement for the bus. * @align: alignment requirement for the bus.
...@@ -87,7 +86,6 @@ struct brcmf_bus { ...@@ -87,7 +86,6 @@ struct brcmf_bus {
struct brcmf_pub *drvr; struct brcmf_pub *drvr;
enum brcmf_bus_state state; enum brcmf_bus_state state;
uint maxctl; uint maxctl;
bool drvr_up;
unsigned long tx_realloc; unsigned long tx_realloc;
struct dngl_stats dstats; struct dngl_stats dstats;
u8 align; u8 align;
......
...@@ -452,13 +452,7 @@ static int brcmf_ethtool(struct brcmf_if *ifp, void __user *uaddr) ...@@ -452,13 +452,7 @@ static int brcmf_ethtool(struct brcmf_if *ifp, void __user *uaddr)
sprintf(info.driver, "dhd"); sprintf(info.driver, "dhd");
strcpy(info.version, BRCMF_VERSION_STR); strcpy(info.version, BRCMF_VERSION_STR);
} }
/* report dongle driver type */
/* 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 */
else else
sprintf(info.driver, "wl"); sprintf(info.driver, "wl");
...@@ -545,18 +539,11 @@ static int brcmf_netdev_ioctl_entry(struct net_device *ndev, struct ifreq *ifr, ...@@ -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) 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"); brcmf_dbg(TRACE, "Enter\n");
if (drvr->bus_if->drvr_up == 0)
return 0;
brcmf_cfg80211_down(ndev); brcmf_cfg80211_down(ndev);
/* Set state and stop OS transmissions */ /* Set state and stop OS transmissions */
drvr->bus_if->drvr_up = false;
netif_stop_queue(ndev); netif_stop_queue(ndev);
return 0; return 0;
...@@ -591,7 +578,6 @@ static int brcmf_netdev_open(struct net_device *ndev) ...@@ -591,7 +578,6 @@ static int brcmf_netdev_open(struct net_device *ndev)
/* Allow transmit calls */ /* Allow transmit calls */
netif_start_queue(ndev); netif_start_queue(ndev);
drvr->bus_if->drvr_up = true;
if (brcmf_cfg80211_up(ndev)) { if (brcmf_cfg80211_up(ndev)) {
brcmf_err("failed to bring up cfg80211\n"); brcmf_err("failed to bring up cfg80211\n");
return -1; return -1;
......
...@@ -1962,8 +1962,7 @@ static uint brcmf_sdbrcm_sendfromq(struct brcmf_sdio *bus, uint maxframes) ...@@ -1962,8 +1962,7 @@ static uint brcmf_sdbrcm_sendfromq(struct brcmf_sdio *bus, uint maxframes)
} }
/* Deflow-control stack if needed */ /* Deflow-control stack if needed */
if (bus->sdiodev->bus_if->drvr_up && if ((bus->sdiodev->bus_if->state == BRCMF_BUS_DATA) &&
(bus->sdiodev->bus_if->state == BRCMF_BUS_DATA) &&
bus->txoff && (pktq_len(&bus->txq) < TXLOW)) { bus->txoff && (pktq_len(&bus->txq) < TXLOW)) {
bus->txoff = false; bus->txoff = false;
brcmf_txflowblock(bus->sdiodev->dev, false); brcmf_txflowblock(bus->sdiodev->dev, false);
...@@ -3308,9 +3307,6 @@ static int brcmf_sdbrcm_download_nvram(struct brcmf_sdio *bus) ...@@ -3308,9 +3307,6 @@ static int brcmf_sdbrcm_download_nvram(struct brcmf_sdio *bus)
{ {
int ret; int ret;
if (bus->sdiodev->bus_if->drvr_up)
return -EISCONN;
ret = request_firmware(&bus->firmware, BRCMF_SDIO_NV_NAME, ret = request_firmware(&bus->firmware, BRCMF_SDIO_NV_NAME,
&bus->sdiodev->func[2]->dev); &bus->sdiodev->func[2]->dev);
if (ret) { if (ret) {
......
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