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

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
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;
+1 −15
Original line number Diff line number Diff line
@@ -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;
+1 −5
Original line number Diff line number Diff line
@@ -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) {