summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Mery <amery@geeks.cl>2013-01-07 22:56:46 +0400
committerAlejandro Mery <amery@geeks.cl>2013-01-07 22:56:46 +0400
commit2d24b29aeb3102da8767d22f06728bc226aff565 (patch)
treeee4ec26594dff8e022fece2acc7438608c1ba61a
parenta887d9d00d2fda21636b79bb8f18e8ee316dbebb (diff)
parent0bb376064ebdb1e694801f1a80a189fe5b61fe47 (diff)
downloadlinux-sunxi-2d24b29aeb3102da8767d22f06728bc226aff565.tar.xz
Merge branch 'mirror/android-3.0' into reference-3.0
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_linux.c15
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_sdio.c1
-rw-r--r--net/ipv4/fib_semantics.c2
-rw-r--r--net/ipv4/route.c7
4 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index 1630c4727917..9e9f5b62a427 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -1527,14 +1527,14 @@ dhd_rx_frame(dhd_pub_t *dhdp, int ifidx, void *pktbuf, int numpkt, uint8 chan)
wl_event_to_host_order(&event);
if (!tout_ctrl)
tout_ctrl = DHD_PACKET_TIMEOUT_MS;
- if (event.event_type == WLC_E_BTA_HCI_EVENT) {
- dhd_bta_doevt(dhdp, data, event.datalen);
- }
#ifdef PNO_SUPPORT
if (event.event_type == WLC_E_PFN_NET_FOUND) {
- tout_ctrl *= 2;
+ tout_ctrl = 7 * DHD_PACKET_TIMEOUT_MS;
}
#endif /* PNO_SUPPORT */
+ if (event.event_type == WLC_E_BTA_HCI_EVENT) {
+ dhd_bta_doevt(dhdp, data, event.datalen);
+ }
} else {
tout_rx = DHD_PACKET_TIMEOUT_MS;
}
@@ -3991,15 +3991,13 @@ dhd_os_wd_timer(void *bus, uint wdtick)
if (!dhd)
return;
- if (wdtick)
- DHD_OS_WD_WAKE_LOCK(pub);
-
flags = dhd_os_spin_lock(pub);
/* don't start the wd until fw is loaded */
if (pub->busstate == DHD_BUS_DOWN) {
dhd_os_spin_unlock(pub, flags);
- DHD_OS_WD_WAKE_UNLOCK(pub);
+ if (!wdtick)
+ DHD_OS_WD_WAKE_UNLOCK(pub);
return;
}
@@ -4017,6 +4015,7 @@ dhd_os_wd_timer(void *bus, uint wdtick)
}
if (wdtick) {
+ DHD_OS_WD_WAKE_LOCK(pub);
dhd_watchdog_ms = (uint)wdtick;
/* Re arm the timer, at last watchdog period */
mod_timer(&dhd->timer, jiffies + msecs_to_jiffies(dhd_watchdog_ms));
diff --git a/drivers/net/wireless/bcmdhd/dhd_sdio.c b/drivers/net/wireless/bcmdhd/dhd_sdio.c
index 09dc45a0e9e8..9ad997098b73 100644
--- a/drivers/net/wireless/bcmdhd/dhd_sdio.c
+++ b/drivers/net/wireless/bcmdhd/dhd_sdio.c
@@ -620,6 +620,7 @@ dhdsdio_htclk(dhd_bus_t *bus, bool on, bool pendok)
if (!SBSDIO_CLKAV(clkctl, bus->alp_only)) {
DHD_ERROR(("%s: HT Avail timeout (%d): clkctl 0x%02x\n",
__FUNCTION__, PMU_MAX_TRANSITION_DLY, clkctl));
+ dhd_os_send_hang_message(bus->dhd);
return BCME_ERROR;
}
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 7e454ba8e850..c60a396c44f4 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -1114,7 +1114,7 @@ void fib_select_default(struct fib_result *res)
order++;
}
- if (order <= 0 || fi == NULL) {
+ if (order <= 0 || fi == NULL || fi->fib_dev == NULL) {
tb->tb_default = -1;
goto out;
}
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 6b95f74a91d3..37be8f654866 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2751,10 +2751,15 @@ static struct rtable *ip_route_output_slow(struct net *net, struct flowi4 *fl4)
res.type == RTN_UNICAST && !fl4->flowi4_oif)
fib_select_default(&res);
+ dev_out = FIB_RES_DEV(res);
+ if (dev_out == NULL) {
+ rth = ERR_PTR(-ENODEV);
+ goto out;
+ }
+
if (!fl4->saddr)
fl4->saddr = FIB_RES_PREFSRC(net, res);
- dev_out = FIB_RES_DEV(res);
fl4->flowi4_oif = dev_out->ifindex;