Search Linux Wireless

[PATCH 2/5] d80211: Do not require drivers to implement reset callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michael Wu <flamingice@xxxxxxxxxxxx>

This prevents drivers from crashing if there is a TX timeout and the reset
callback isn't implemented.

Signed-off-by: Michael Wu <flamingice@xxxxxxxxxxxx>
---

 net/mac80211/ieee80211.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index bbdf928..15344c7 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -2084,7 +2084,7 @@ static void ieee80211_tx_timeout(struct
 
 	printk(KERN_WARNING "%s: resetting interface.\n", dev->name);
 
-	if (local->ops->reset(local_to_hw(local)))
+	if (local->ops->reset && local->ops->reset(local_to_hw(local)))
 		printk(KERN_ERR "%s: failed to reset interface.\n", dev->name);
 	else
 		netif_wake_queue(dev);

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux