brcmfmac: Reopen netdev queue on bus state data.
authorHante Meuleman <meuleman@broadcom.com>
Sun, 25 Jan 2015 19:31:36 +0000 (20:31 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 29 Jan 2015 07:59:05 +0000 (09:59 +0200)
During suspend the bus state is put in the down state. When data
is being transmitted during this state then the netdev queue will
be close. This patch will wake the queue on state data if the
queue was closed.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/brcm80211/brcmfmac/bus.h
drivers/net/wireless/brcm80211/brcmfmac/core.c

index 55d36ff5439d91a3b085a028dde1ce94cc82f97c..89e6a4dc105ecff9e0251d44cc576bc8e5f4facd 100644 (file)
@@ -185,13 +185,6 @@ void brcmf_bus_wowl_config(struct brcmf_bus *bus, bool enabled)
                bus->ops->wowl_config(bus->dev, enabled);
 }
 
-static inline void brcmf_bus_change_state(struct brcmf_bus *bus,
-                                         enum brcmf_bus_state new_state)
-{
-       brcmf_dbg(TRACE, "%d -> %d\n", bus->state, new_state);
-       bus->state = new_state;
-}
-
 /*
  * interface functions from common layer
  */
@@ -214,6 +207,9 @@ void brcmf_txflowblock(struct device *dev, bool state);
 /* Notify the bus has transferred the tx packet to firmware */
 void brcmf_txcomplete(struct device *dev, struct sk_buff *txp, bool success);
 
+/* Configure the "global" bus state used by upper layers */
+void brcmf_bus_change_state(struct brcmf_bus *bus, enum brcmf_bus_state state);
+
 int brcmf_bus_start(struct device *dev);
 s32 brcmf_iovar_data_set(struct device *dev, char *name, void *data, u32 len);
 void brcmf_bus_add_txhdrlen(struct device *dev, uint len);
index ff8c97ba4bc5ddd326038fbf08196a36e796df7b..b8520c30af7c1a5cd2d4b6a2ef55427612c9eb3c 100644 (file)
@@ -1106,6 +1106,27 @@ int brcmf_netdev_wait_pend8021x(struct brcmf_if *ifp)
        return !err;
 }
 
+void brcmf_bus_change_state(struct brcmf_bus *bus, enum brcmf_bus_state state)
+{
+       struct brcmf_pub *drvr = bus->drvr;
+       struct net_device *ndev;
+       int ifidx;
+
+       brcmf_dbg(TRACE, "%d -> %d\n", bus->state, state);
+       bus->state = state;
+
+       if (state == BRCMF_BUS_UP) {
+               for (ifidx = 0; ifidx < BRCMF_MAX_IFS; ifidx++) {
+                       if ((drvr->iflist[ifidx]) &&
+                           (drvr->iflist[ifidx]->ndev)) {
+                               ndev = drvr->iflist[ifidx]->ndev;
+                               if (netif_queue_stopped(ndev))
+                                       netif_wake_queue(ndev);
+                       }
+               }
+       }
+}
+
 static void brcmf_driver_register(struct work_struct *work)
 {
 #ifdef CONFIG_BRCMFMAC_SDIO